@abtnode/blocklet-services 1.16.40-beta-20250227-133316-292acf31 → 1.16.40-beta-20250228-001738-e9367fea

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 (141) hide show
  1. package/api/index.js +74 -36
  2. package/dist/assets/{Add-CehHkXtu.js → Add-DkUPsN8z.js} +1 -1
  3. package/dist/assets/{ArrowDropDown-C9ESZaJj.js → ArrowDropDown-CHNO4p8Y.js} +1 -1
  4. package/dist/assets/{CheckCircle-Cux_Aj3D.js → CheckCircle-BjQOt6L6.js} +1 -1
  5. package/dist/assets/{ChevronLeft-sep8bYo6.js → ChevronLeft-D_tV9CKg.js} +1 -1
  6. package/dist/assets/{ChevronRight-E1JFBSBQ.js → ChevronRight-CLZL7Esj.js} +1 -1
  7. package/dist/assets/{DeleteOutline--b0uhBXu.js → DeleteOutline-D4Mo1apM.js} +1 -1
  8. package/dist/assets/{Done-Bh7hkuyF.js → Done-D21xt3JW.js} +1 -1
  9. package/dist/assets/{Download-DauItc6L.js → Download-CVCkdSN_.js} +1 -1
  10. package/dist/assets/{Error-DHOJb02F.js → Error-taY9yUOf.js} +1 -1
  11. package/dist/assets/{Google-Dc5CpY7r.js → Google-CQvb6wJw.js} +1 -1
  12. package/dist/assets/{InfoOutlined-CaT2OjoW.js → InfoOutlined-VknYPDw1.js} +1 -1
  13. package/dist/assets/{Launch-DLH9cYau.js → Launch-41PptIQn.js} +1 -1
  14. package/dist/assets/{LaunchOutlined-CJoRhUht.js → LaunchOutlined-BzWUvyO6.js} +1 -1
  15. package/dist/assets/{MoreHoriz-BdiHG-9g.js → MoreHoriz-DIJLu3Ae.js} +1 -1
  16. package/dist/assets/{PlayArrow-D3Xnrt2P.js → PlayArrow-BqXSiw_w.js} +1 -1
  17. package/dist/assets/{ViewList-vuv6XoB6.js → ViewList-r6XukP80.js} +1 -1
  18. package/dist/assets/{access-control-BvYVIpWS.js → access-control-BnkKUaaG.js} +1 -1
  19. package/dist/assets/{actions-Bejw-e5O.js → actions-De-aapuY.js} +1 -1
  20. package/dist/assets/add-component-core-CXgJvJfw.js +765 -0
  21. package/dist/assets/{add-resource-CDUyyqzt.js → add-resource-Dj69QEWN.js} +1 -1
  22. package/dist/assets/{addon-BpqDO9tj.js → addon-D29Axdkl.js} +1 -1
  23. package/dist/assets/{analytics-BJtYxYJj.js → analytics-Ckf1U0KC.js} +1 -1
  24. package/dist/assets/ar-Cb7KoCsT.js +3 -0
  25. package/dist/assets/{audit-logs-CElQxuBw.js → audit-logs-BJQ6hZCQ.js} +1 -1
  26. package/dist/assets/{base32-Dxx2uO-0.js → base32-npzNEcfW.js} +1 -1
  27. package/dist/assets/{branding-Co6nc32C.js → branding-CmLvHbCB.js} +2 -2
  28. package/dist/assets/{bundle-avatar-CKPO4II3.js → bundle-avatar-BKALp9R9.js} +1 -1
  29. package/dist/assets/{button-DgAPN-lt.js → button-CulAsk2o.js} +1 -1
  30. package/dist/assets/{click-to-copy-SiMa2cN1.js → click-to-copy-BeyU2nOg.js} +1 -1
  31. package/dist/assets/{complete-DmlGFAlQ.js → complete-C08C9NOL.js} +1 -1
  32. package/dist/assets/{component-DiDY-Kw4.js → component-Cm_2oGIv.js} +1 -1
  33. package/dist/assets/{config-CLiczBaW.js → config-BkHeEWYU.js} +1 -1
  34. package/dist/assets/{config-Czk-fLJI.js → config-C9FrOVeq.js} +1 -1
  35. package/dist/assets/{config-navigation-BB7iqfQe.js → config-navigation-CHQROgyP.js} +3 -3
  36. package/dist/assets/{config-space-DDnvKnd8.js → config-space-BraBdsSu.js} +1 -1
  37. package/dist/assets/{confirm-0Ay4zz5F.js → confirm-D2Cq0BwQ.js} +1 -1
  38. package/dist/assets/{connect-NWnGxDqK.js → connect-ClQWCIbu.js} +1 -1
  39. package/dist/assets/{connect-COTQTs95.js → connect-CwY75INr.js} +1 -1
  40. package/dist/assets/{connect-to-BWm1tQwA.js → connect-to-BiWpwCyy.js} +1 -1
  41. package/dist/assets/{dashboard-Dr8B5iTX.js → dashboard-B9pjvkNz.js} +3 -3
  42. package/dist/assets/de-CNLk-YoA.js +3 -0
  43. package/dist/assets/{delete-confirm-CRp06UUb.js → delete-confirm-BPAm1d23.js} +1 -1
  44. package/dist/assets/{did-address-B8WelYg7.js → did-address-BTUUYWtX.js} +1 -1
  45. package/dist/assets/{domain-CjvQEI6b.js → domain-Dg-vn_Ms.js} +1 -1
  46. package/dist/assets/{domain-action-card-DjmDH3Uj.js → domain-action-card-CaNCF5Px.js} +2 -2
  47. package/dist/assets/domains-CePBNK-w.js +1 -0
  48. package/dist/assets/{email-DOlX0xe4.js → email-CFuTqdUe.js} +1 -1
  49. package/dist/assets/es-CoaCqz4_.js +3 -0
  50. package/dist/assets/{exchange-passport-CoUK8I9Y.js → exchange-passport-MpEQfzBJ.js} +1 -1
  51. package/dist/assets/{form-text-input-CIKBwPcu.js → form-text-input-CyFB4VH8.js} +1 -1
  52. package/dist/assets/fr-BwbWMUiF.js +3 -0
  53. package/dist/assets/{fuel-CIXFsXuA.js → fuel-Cb9_vj80.js} +1 -1
  54. package/dist/assets/{fullpage-D6C9sgie.js → fullpage-BOoOpnua.js} +1 -1
  55. package/dist/assets/{get-safe-url-CvMgdIsM.js → get-safe-url-DRF8Bvcq.js} +1 -1
  56. package/dist/assets/{get-safe-url-Cww9J3VK.js → get-safe-url-DgPsuumy.js} +1 -1
  57. package/dist/assets/hi-BYJrF5gg.js +1 -0
  58. package/dist/assets/{home-BcaRSPYx.js → home-ClvhZXHI.js} +1 -1
  59. package/dist/assets/id-DIMbFIsL.js +3 -0
  60. package/dist/assets/{iframe-BeZaO9bZ.js → iframe-B-PrBIP9.js} +1 -1
  61. package/dist/assets/{index-C5E0f4MM.js → index-B67qUeIU.js} +1 -1
  62. package/dist/assets/{index-CqFqcj_v.js → index-Cn0Onsad.js} +1 -1
  63. package/dist/assets/{index-BSEUYLtR.js → index-D-WfBLbj.js} +3 -3
  64. package/dist/assets/{index-DvZ2VDrh.js → index-DAgCHyVJ.js} +16 -16
  65. package/dist/assets/{index-COMBNFIf.js → index-DDD646DZ.js} +4 -4
  66. package/dist/assets/{index-C8diuKw-.js → index-Df9PQ04c.js} +1 -1
  67. package/dist/assets/{index-BgO4U6d_.js → index-Dga1JNKq.js} +1 -1
  68. package/dist/assets/{index-6U1CWqVe.js → index-DholRuTY.js} +1 -1
  69. package/dist/assets/{index-19jBKgbd.js → index-DhpLFI07.js} +1 -1
  70. package/dist/assets/{index-d-LGBl0-.js → index-P6dRq_pi.js} +1 -1
  71. package/dist/assets/{index-BCiJnwmE.js → index-bvxkpJj2.js} +1 -1
  72. package/dist/assets/{index-C2rpN-Mh.js → index-gYKrdClL.js} +1 -1
  73. package/dist/assets/{index-D9unNEiC.js → index-gtCgk2W2.js} +1 -1
  74. package/dist/assets/{index-2YkwBVJx.js → index-pTlGGg5d.js} +1 -1
  75. package/dist/assets/{index-CIovcKjE.js → index-pvNG297c.js} +4 -4
  76. package/dist/assets/{invitation-CXP1edIt.js → invitation-Cp1JZfwo.js} +1 -1
  77. package/dist/assets/{invite-B-tph_rB.js → invite-D22eVw1v.js} +1 -1
  78. package/dist/assets/{issue-passport-BUVkg2-O.js → issue-passport-D_zDn1e_.js} +1 -1
  79. package/dist/assets/{item-CuvjqLrq.js → item-_PH3JxrR.js} +1 -1
  80. package/dist/assets/ja-STj-gOdw.js +3 -0
  81. package/dist/assets/ko-LA_iuCmL.js +3 -0
  82. package/dist/assets/{layout-DH6138ux.js → layout-CCIWvzPj.js} +1 -1
  83. package/dist/assets/{list-WWP8bcK6.js → list-grXLmFRC.js} +1 -1
  84. package/dist/assets/{list-header-MogH2bs1.js → list-header-Doz19uCr.js} +1 -1
  85. package/dist/assets/{localization-D_98hbR7.js → localization-nx40EvqX.js} +1 -1
  86. package/dist/assets/{log-Bt5p-4Xe.js → log-wsPJS_hp.js} +1 -1
  87. package/dist/assets/{login-CIIEVvdS.js → login-GpKKM01p.js} +1 -1
  88. package/dist/assets/{login-oauth-callback-DjEWdBzQ.js → login-oauth-callback-cVd1SI72.js} +1 -1
  89. package/dist/assets/{logo-uploader-B7U1Vq_i.js → logo-uploader-DOA0AXyl.js} +3 -3
  90. package/dist/assets/{lost-passport-CoAoO7Df.js → lost-passport-CiD9Slc-.js} +1 -1
  91. package/dist/assets/{open-window-HNe0hOEj.js → open-window-Diek_iiu.js} +1 -1
  92. package/dist/assets/{overview-i1NNuzDM.js → overview-L56qTxf9.js} +1 -1
  93. package/dist/assets/{page-header-DdgQ5XYN.js → page-header-CmlsKL9T.js} +1 -1
  94. package/dist/assets/{permission-Yia679mu.js → permission-BuqPdCdk.js} +1 -1
  95. package/dist/assets/{preferences-BBS3DDBv.js → preferences-ShWJcHeD.js} +1 -1
  96. package/dist/assets/pt-Bo_HMVg7.js +1 -0
  97. package/dist/assets/{publish-resource-D_iibuC8.js → publish-resource-BST3fY1U.js} +1 -1
  98. package/dist/assets/{react-beautiful-dnd.esm-DCOKNvGX.js → react-beautiful-dnd.esm-O3pyNwoa.js} +1 -1
  99. package/dist/assets/{relative-time-Tv8VzuvC.js → relative-time-BTynCt1i.js} +1 -1
  100. package/dist/assets/ru-B3xObx6J.js +1 -0
  101. package/dist/assets/sdk-BCCz6CLo.js +1 -0
  102. package/dist/assets/{session-C4pA5XYh.js → session-CXzOHPQH.js} +1 -1
  103. package/dist/assets/{setup-VtCz7ZF5.js → setup-8ZfLwx6e.js} +3 -3
  104. package/dist/assets/{start-DyNFzLUm.js → start-C4T5vLf8.js} +1 -1
  105. package/dist/assets/{status-EWGG72pb.js → status-Cl-seDvL.js} +1 -1
  106. package/dist/assets/{step-actions-CYRP8hK4.js → step-actions-DAwK9FcN.js} +1 -1
  107. package/dist/assets/{studio-scrRCunQ.js → studio-B7fqsZeP.js} +1 -1
  108. package/dist/assets/{switch-control-BzT1Su42.js → switch-control-DsiGlDhR.js} +1 -1
  109. package/dist/assets/th-DERHVYhL.js +1 -0
  110. package/dist/assets/{traffic-CzR0nh2V.js → traffic-DK7GKSDB.js} +1 -1
  111. package/dist/assets/{transfer-CQc79y3K.js → transfer-dfow6ske.js} +1 -1
  112. package/dist/assets/{unsubscribe-Bl6Rt5x9.js → unsubscribe-BIkYEYON.js} +1 -1
  113. package/dist/assets/{useLocalStorage-Cd4aCng4.js → useLocalStorage-B1EHcXLK.js} +1 -1
  114. package/dist/assets/{user-center-DlCGGhhc.js → user-center-BXypboG2.js} +1 -1
  115. package/dist/assets/{util-AoFN7OG5.js → util-BI3SHCkh.js} +1 -1
  116. package/dist/assets/{util-qn_aF3F7.js → util-BRifAZTv.js} +1 -1
  117. package/dist/assets/{vendor-arcblock-Cn3IZfUJ.js → vendor-arcblock-Bx50wV2r.js} +1 -1
  118. package/dist/assets/vi-UayKvKal.js +1 -0
  119. package/dist/assets/wrap-locale-DCvzpv6A.js +1 -0
  120. package/dist/assets/{zh-DhdNY_Mb.js → zh-DQRvL72i.js} +1 -1
  121. package/dist/assets/zh-tw-abLdc6PN.js +3 -0
  122. package/dist/index.html +2 -2
  123. package/dist/service-worker.js +1 -1
  124. package/package.json +21 -21
  125. package/dist/assets/add-component-core-RBE5ELHU.js +0 -765
  126. package/dist/assets/ar-CsSmyJif.js +0 -3
  127. package/dist/assets/de-Ck9YpIMJ.js +0 -3
  128. package/dist/assets/domains-C7Nqnf0f.js +0 -1
  129. package/dist/assets/es-C27J2JeQ.js +0 -3
  130. package/dist/assets/fr-VZUGRssx.js +0 -3
  131. package/dist/assets/hi-0Dd5nSCH.js +0 -1
  132. package/dist/assets/id-DnRIoIgL.js +0 -3
  133. package/dist/assets/ja-CV7QuyLJ.js +0 -3
  134. package/dist/assets/ko-Cc-UWhAC.js +0 -3
  135. package/dist/assets/pt-BSP6S8OX.js +0 -1
  136. package/dist/assets/ru-6g_ewyGj.js +0 -1
  137. package/dist/assets/sdk-CLSP2XpB.js +0 -1
  138. package/dist/assets/th-esVTW-ew.js +0 -1
  139. package/dist/assets/vi-hhbCmVdC.js +0 -1
  140. package/dist/assets/wrap-locale-DigqkQih.js +0 -1
  141. package/dist/assets/zh-tw-joa-mQa2.js +0 -3
@@ -1,4 +1,4 @@
1
- import{r as b}from"./vendor-react-D-afvo_7.js";import{j as e,E as d,a1 as Pe,R as bt,a4 as jt,T as G,a3 as R,A as Fe,bH as _e,cn as et,cm as Te,aN as Ie,bL as De,x as ye,aj as Ee,a2 as tt,aa as ae,V as nt,bO as Ye,bI as vt,aP as yt,al as Je,co as St}from"./vendor-mui-core-BWT1QT-d.js";import{b as Z,aq as re,z as Ct}from"./vendor-utils-CzbloUV0.js";import{j as V,b as L,ad as Nt,a0 as Be,e as Y,bD as wt,D as st,a3 as Ae,aX as at,aF as be,a8 as Rt,ao as Tt,bl as It}from"./vendor-arcblock-Cn3IZfUJ.js";import{z as Dt,G as $,m as Et,I as Qe}from"./index-DvZ2VDrh.js";import{e as pe,a as Oe}from"./vendor-hooks-6khEvbqa.js";import{S as ue}from"./shorten-label-CRTt8ftG.js";import{I as it}from"./index-19jBKgbd.js";import{S as At,a as Ot}from"./list-WWP8bcK6.js";import{R as ze}from"./relative-time-Tv8VzuvC.js";import{b as We}from"./dashboard-Dr8B5iTX.js";import{W as Lt}from"./did-address-B8WelYg7.js";import{p as ot}from"./util-AoFN7OG5.js";import{D as kt,g as Pt}from"./traffic-CzR0nh2V.js";import{B as rt}from"./bundle-avatar-CKPO4II3.js";import{B as Ft}from"./index-C5E0f4MM.js";import"./index-CV3ZYUK0.js";import"./InfoOutlined-CaT2OjoW.js";import"./useLocalStorage-Cd4aCng4.js";import"./confirm-0Ay4zz5F.js";import"./format-error-C0Ke3VXF.js";import"./PlayArrow-D3Xnrt2P.js";import"./get-safe-url-Cww9J3VK.js";import"./session-C4pA5XYh.js";import"./useAsyncRetry-DCwz7CH3.js";import"./useAsync-DIcJhKIm.js";import"./useSetState-Crt4S51m.js";import"./base32-Dxx2uO-0.js";import"./iframe-BeZaO9bZ.js";import"./LaunchOutlined-CJoRhUht.js";import"./ChevronLeft-sep8bYo6.js";import"./ChevronRight-E1JFBSBQ.js";import"./index-BPho8CPY.js";import"./vendor-mui-x-VJmvJUkN.js";const lt=b.createContext({}),{Provider:_t,Consumer:Qn}=lt;function Bt({children:t,blocklet:n=""}){const{api:s,inService:i}=Dt(),[a,l]=b.useState([]),[p,f]=b.useState({total:0,pageSize:20,pageCount:0,page:1}),y=pe(()=>{var j;return(j=n.meta)==null?void 0:j.did},[n]),[S,T]=b.useState([]),N=async({page:j=1,pageSize:v=20,...x}={})=>{if(!y)return[];try{const w={paging:{page:j,pageSize:v},...x,teamDid:y,dateRange:x.dateRange?[$(x.dateRange[0]).toISOString(),$(x.dateRange[1]).toISOString()]:void 0},{dids:M,...B}=w;let K="";M.includes("system")&&(K="system");const _=M.filter(ee=>ee!=="system"),Q=await s.getNotificationSendLog({input:{...B,source:K,componentDids:_}});return l(Q.list),f(Q.paging),Q.list}catch(w){return V.error(w.message),[]}},A=async()=>{const j=await s.getNotificationComponents({input:{teamDid:y}});T(j.componentDids)},P=b.useCallback(j=>{const v=n.children.find(x=>{var w;return((w=x.meta)==null?void 0:w.did)===j});if(v)return v.ancestors=[n],v},[n]),O=async({notificationId:j,receivers:v,channels:x,...w})=>{await s.resendNotification({input:{teamDid:y,notificationId:j,receivers:v,channels:x.map(M=>M==="wallet"?L.NOTIFICATION_SEND_CHANNEL.WALLET:M==="pushKit"?L.NOTIFICATION_SEND_CHANNEL.PUSH:M),...w}})},F=b.useCallback(async j=>(await s.getUser({input:{teamDid:y,user:{did:j}}})).user,[s,y]),I=b.useCallback(async({page:j=1,pageSize:v=20,...x}={})=>{try{const w={paging:{page:j,pageSize:v},...x,userName:x.searchText||"",teamDid:y,dateRange:x.dateRange?[$(x.dateRange[0]).toISOString(),$(x.dateRange[1]).toISOString()]:void 0};return await s.getReceivers({input:w})}catch(w){throw V.error(w.message),w}},[s,y]);b.useEffect(()=>{y&&A()},[y]);const U={fetch:N,data:a,paging:p,blocklet:n,getComponent:P,resendNotification:O,getUser:F,componentDids:S,getReceivers:I,inService:i,teamDid:y};return e.jsx(_t,{value:{notificationRecords:U},children:t})}function Me(){const{notificationRecords:t}=b.useContext(lt);return t}fe.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const zt={info:"primary",success:"success",error:"error",warning:"warning"};function fe({severity:t="info"}){return e.jsx(Nt,{type:zt[t],children:t})}var qe={},Wt=Pe;Object.defineProperty(qe,"__esModule",{value:!0});var ct=qe.default=void 0,Mt=Wt(Be()),qt=e;ct=qe.default=(0,Mt.default)((0,qt.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");var Ke={},Kt=Pe;Object.defineProperty(Ke,"__esModule",{value:!0});var dt=Ke.default=void 0,Ht=Kt(Be()),$t=e;dt=Ke.default=(0,Ht.default)((0,$t.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var He={},Ut=Pe;Object.defineProperty(He,"__esModule",{value:!0});var ut=He.default=void 0,Vt=Ut(Be()),Gt=e;ut=He.default=(0,Vt.default)((0,Gt.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");const Xt=(t,n,s="")=>{if(!s||!n)return"";switch(s){case L.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return s}};function pt(t,n,s={}){const{status:i,updatedAt:a,reason:l="",channel:p="wallet"}=s,f=a?t("notification.sendStatus.sentTime",{date:Et(a,n)}):"",y=Xt(t,p,l);return i===L.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:f,reason:y}:i===L.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:f}:{status:"pending",title:t("notification.sendStatus.pending"),reason:y,sentTime:f}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ze=["info","success","error","warning"],ft=t=>{var s,i;const{settings:n}=t;return(i=(s=n==null?void 0:n.notification)==null?void 0:s.email)==null?void 0:i.enabled},mt=t=>{var s,i;const{settings:n}=t;return(i=(s=n==null?void 0:n.notification)==null?void 0:s.pushKit)==null?void 0:i.enabled},Yt=(t,n)=>{const s=Z(n,"extra.notifications.email",!0);return{available:ft(t),enabled:s}},Jt=(t,n)=>{const s=Z(n,"extra.notifications.push",!0);return{available:mt(t),enabled:s}},Qt=t=>({enabled:Z(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:Z(t,"extra.webhooks",[]).length>0}),ge=(t=3)=>new Promise(n=>{setTimeout(()=>{n()},t*1e3)}),en=(t,n)=>n==="wallet"||n==="webhook"?[{channel:n,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:n}),fail:t("notification.sendStatus.reason.disabled",{channel:n})}]:n==="pushKit"||n==="email"?[{channel:n,type:"available",pass:t("notification.sendStatus.reason.available",{channel:n}),fail:t("notification.sendStatus.reason.unavailable",{channel:n})},{channel:n,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:n}),fail:t("notification.sendStatus.reason.disabled",{channel:n})}]:[],xe=(t=[])=>{const n=$().startOf("day");return t.filter(s=>$(s.sendAt).isSame(n,"day")).length},tn=(t,n="")=>{if(n&&ke.includes(n)){const l=`${n}SendRecord`,p=Z(t,l,[]);return xe(p)}const s=Z(t,"webhook",{}),i=Object.keys(s??{})??[];if(n&&i.includes(n)){const l=s[n]??[];return xe(l)}const a={};return ke.forEach(l=>{const p=`${l}SendRecord`,f=Z(t,p,[]),y=xe(f);a[l]=y}),i.length>0&&i.forEach(l=>{const p=s[l]??[],f=xe(p);a[l]=f}),a},je=(t,n,s)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[s].splice(n,1),t},ve=(t,n)=>{if(!Array.isArray(n))throw new Error("filters must be an array");return n.length?!n.includes(t):!1},nn=t=>{switch(t){case L.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case L.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case L.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case L.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ht=()=>bt({typography:{fontSize:14,button:{textTransform:"none"}},palette:{primary:{main:"#1DC1C7",contrastText:"#fff"},secondary:{main:"#030712",contrastText:"#fff"},storeSecondary:{main:"#EBFEFF",contrastText:"#fff"}},components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function J({config:t,enableTooltip:n=!0,showTitle:s=!1,children:i}){const{status:a,title:l="",sentTime:p="",reason:f=""}=t,y=[l,f].filter(Boolean).join(", ");return e.jsx(jt,{title:n?e.jsxs(e.Fragment,{children:[e.jsx(G,{color:"inherit",sx:{fontSize:12},children:y}),e.jsx("span",{children:p})]}):null,arrow:!0,placement:"top",children:e.jsxs(R,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(R,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(R,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a],style:{opacity:.15}}),e.jsx(R,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]})]}),e.jsx(G,{color:"inherit",sx:{fontSize:12},children:s?l:i})]})})}J.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};J.defaultProps={enableTooltip:!0,showTitle:!1,children:null};le.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};le.defaultProps={onDelete:()=>{}};function le({list:t,label:n,onDelete:s}){const{t:i,locale:a}=Y();return e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[n,": "]}),t.map(l=>{const p=pt(i,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(R,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(J,{config:p,enableTooltip:!1,children:p.title})}),onDelete:f=>s(f,l)},l)})]})}$e.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function $e({filterList:t,onChange:n,index:s,column:i,filterValues:a,label:l,renderLabel:p}){return e.jsxs(_e,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(f=>e.jsx(Ie,{control:e.jsx(De,{checked:t[s].indexOf(f.value??f)>-1,onChange:y=>{const S=[...t];y.target.checked?S[s]=[...S[s],f.value??f]:S[s]=S[s].filter(T=>T!==(f.value??f)),n(S[s],s,i)},name:f.value??f}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:p(f)})},f.value??f))})]})}function Re(t){return e.jsx($e,{...t,renderLabel:n=>e.jsx(J,{enableTooltip:!1,config:{status:n.status},children:n.label})})}oe.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function oe({status:t,updatedAt:n,reason:s="",channel:i="wallet",onResend:a}){const{t:l,locale:p}=Y(),f=pt(l,p,{status:t,updatedAt:n,reason:s,channel:i});return e.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(J,{config:f,showTitle:!0}),f.status!=="success"&&e.jsx(ye,{className:"resend-btn",size:"small",startIcon:e.jsx(We,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}Ue.propTypes={value:d.array.isRequired,onChange:d.func};function Ue({value:t,onChange:n}){const{locale:s}=Y(),i=$().toDate(),[a,l]=b.useState(null),p=b.useCallback(S=>{l(a?null:S.currentTarget)},[a]),f=!!a,y=b.useCallback(S=>{if(!S.startDate||!S.endDate){V.error("Please select a date range");return}if($(S.startDate).isAfter(S.endDate)||!$(S.startDate).isValid()||!$(S.endDate).isValid()){V.error("Invalid date range");return}n([S.startDate,S.endDate]),l(null)},[n]);return e.jsxs("div",{children:[e.jsx(G,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(ye,{onClick:p,variant:"outlined",size:"small",color:"inherit",children:[Qe(t[0],s)," - ",Qe(t[1],s)]})}),e.jsx(Ee,{open:f,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(kt,{open:!0,maxDate:i,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:p,definedRanges:Pt(i),onChange:y})})]})}Ve.propTypes={itemComponent:d.elementType.isRequired};function Ve({itemComponent:t,...n}){var a;const{t:s}=Y();return!((a=n==null?void 0:n.filterList)!=null&&a.filter(l=>l.length).length)?null:e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:s("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(wt.TableFilterList,{...n,ItemComponent:t})})]})}function Se({label:t,onDelete:n,canDelete:s=()=>!0,...i}){const a=n&&typeof n=="function"?n:void 0;let l=!0;return s&&typeof s=="function"&&(l=s({label:t,...i})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}Se.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};Se.defaultProps={canDelete:()=>!0};const sn=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];Ge.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ge.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ge({loading:t=!1,onCancel:n,onConfirm:s}){const{t:i}=Y(),[a,l]=b.useState(sn),[p,f]=b.useState(!0),y=(T,N)=>{N.checked=T.target.checked;const A=a.map(P=>({...P,checked:P.value===N.value?N.checked:P.checked}));l(A)},S=T=>{T.stopPropagation(),s({channels:a.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:p})};return e.jsxs(R,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(G,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:i("notification.config")}),e.jsx(R,{className:"choose-channel",children:e.jsxs(_e,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:i("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(T=>e.jsx(Ie,{control:e.jsx(De,{checked:T.checked,onChange:N=>y(N,T),name:T.value}),label:T.label},T.value))})]})}),e.jsx(R,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(De,{checked:p,onChange:T=>f(T.target.checked)}),label:i("notification.resendFailedOnly")})})}),e.jsxs(R,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(ye,{onClick:T=>{T.stopPropagation(),n()},color:"inherit",children:i("common.cancel")}),e.jsxs(ye,{onClick:S,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),i("common.confirm")]})]})]})}gt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function gt({notificationId:t,handleResend:n,resending:s=!1}){const{t:i,locale:a}=Y(),{getReceivers:l,inService:p,teamDid:f,getUser:y,blocklet:S}=Me(),[T,N]=b.useState(!1),[A,P]=b.useState([]),O=Oe({anchorEl:null,position:null}),F=Oe({anchorEl:null,position:null}),[I,U]=b.useState(null),[j,v]=b.useState({total:0,pageSize:10,pageCount:0,page:1}),[x,w]=b.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),[M,B]=b.useState([]),K=[{label:i("notification.sendStatus.pending"),value:0,status:"pending"},{label:i("notification.sendStatus.success"),value:1,status:"success"},{label:i("notification.sendStatus.failed"),value:2,status:"failed"}],_=async()=>{if(!T&&t)try{N(!0);const o=await l({notificationId:t,...x}),r=o.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:ot(c.receiverUser.avatar,f,p)}}));P(r),v(o.paging),N(!1)}catch(o){V.error(o.message),N(!1)}};b.useEffect(()=>{_()},[x]);const Q=o=>{o.stopPropagation();const r=o.currentTarget;F.anchorEl=r;const c=r.getBoundingClientRect();F.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ee=o=>o.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ae,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(We,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:Q,children:i("notification.resend")})}):null,Ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:i("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:j.page-1,rowsPerPage:j.pageSize,count:j.total,searchText:x.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:M,onRowSelectionChange:(o,r)=>{B(r.map(c=>c.dataIndex))},customToolbarSelect:ee},we=({page:o,rowsPerPage:r,searchText:c,filterList:C})=>{const[,k=[],H=[],q=[]]=C;x.pageSize!==r?w(W=>({...W,pageSize:r,page:1})):x.page!==o+1?w(W=>({...W,page:o+1})):x.searchText!==c?w(W=>({...W,searchText:c,page:1})):re(k,x.walletSendStatus)?re(H,x.pushKitSendStatus)?re(q,x.emailSendStatus)||w(W=>({...W,emailSendStatus:q,page:1})):w(W=>({...W,pushKitSendStatus:H,page:1})):w(W=>({...W,walletSendStatus:k,page:1}))},me=b.useCallback(async(o,r)=>{if(!r)return!1;const c=await y(r);return c?o==="wallet"?Qt(c):o==="email"?Yt(S,c):o==="pushKit"?Jt(S,c):o==="webhook"?Zt(c):!0:!1},[y,S]),h=b.useCallback(o=>en(i,o),[i]),u=()=>{O.anchorEl=null,O.position=null,U(null)},m=()=>{F.anchorEl=null,F.position=null},g=async(o,r,c=!0,C="")=>{if(!(!r.length||!o.length))try{n(o,r,c,C),F.anchorEl||(await ge(.5),u())}catch(k){console.error("handleResend error",{error:k})}},D=async({channels:o,isResendFailedOnly:r})=>{const c=M.map(C=>A[C].receiver);await g(o,c,r),await ge(.5),m(),B([])},E=async(o,r=[],c=!0)=>{try{await g(["webhook"],[o.receiver],c,r)}catch(C){V.error(C.response?C.response.statusText:C.message)}},z=async(o,r,c,C=[],k=!0)=>{if(o.stopPropagation(),tn(r,c)>=4){V.warning(i("notification.resendLimit"));return}if(!ke.includes(c)){await E(r,C,k);return}if(o){const q=o.currentTarget,W=q.getBoundingClientRect();O.anchorEl=q,O.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}U({channel:c});try{const q=await me(c,r.receiver);await ge(1),U({channel:c,result:q}),(typeof q=="boolean"&&q||Ct(q)&&Object.values(q).every(W=>!!W))&&(await n([c],[r.receiver],k),F.anchorEl||(await ge(.5),u()))}catch(q){V.error(q.message)}},X=o=>{w(r=>({...r,dateRange:o,page:1}))},te=(o,r,c,C)=>{o.stopPropagation();const k=c.filter(H=>H!==r);w(H=>({...H,[C]:k,page:1}))},ie=pe(()=>[{label:i("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:o=>{const{receiverUser:r,receiver:c}=A[o];return r?e.jsxs(R,{"data-cy":`member-name-${r.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(st,{src:`${r.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(ue,{children:r.fullName})]},c):e.jsx(Lt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:x.walletSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Wallet",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[1].options.filterList,"walletSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Wallet",filterList:o,onChange:r,index:c,column:C,filterValues:K})},customBodyRenderLite:o=>{const{walletSendStatus:r,walletSendAt:c,walletSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"wallet",onResend:k=>z(k,A[o],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{pushKitSendStatus:r,pushKitSendAt:c,pushKitSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"pushkit",onResend:k=>z(k,A[o],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:x.pushKitSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Push Kit",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[2].options.filterList,"pushKitSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Push Kit",filterList:o,onChange:r,index:c,column:C,filterValues:K})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{emailSendStatus:r,emailSendAt:c,emailSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"email",onResend:k=>z(k,A[o],"email",[],!1)})},filter:!0,filterType:"custom",filterList:x.emailSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Email",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[3].options.filterList,"emailSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Email",filterList:o,onChange:r,index:c,column:C,filterValues:K})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{webhook:r}=A[o];if(!r)return null;const c=Object.entries(r)[0];if(!c)return null;const[C,k]=c,H=k[0];return e.jsx(R,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(R,{className:"webhook-item",fontSize:12,children:[e.jsx(ue,{maxLength:30,children:C},C),e.jsx(oe,{status:H.status,updatedAt:H.sendAt,reason:H.failedReason,channel:"webhook",onResend:q=>z(q,A[o],"webhook",[C],!1)})]},C)})}}},{label:i("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:o=>{const{createdAt:r}=A[o];return e.jsx(ze,{value:r,locale:a,shouldUpdate:!0})}}}],[A,a,x,i]),he=[e.jsx(Ue,{value:x.dateRange,onChange:X},"date-picker"),e.jsx(Ae,{variant:"contained",size:"small",color:"primary",loading:T,startIcon:e.jsx(ut,{}),onClick:()=>_(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:i("common.refresh")},"refresh")];return e.jsx(R,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(on,{children:e.jsxs(nt,{theme:ht(),children:[e.jsx(at,{className:"receivers-table",locale:a,loading:T,columns:ie,data:A,onChange:we,options:Ne,customButtons:he,components:{TableFilterList:o=>e.jsx(Ve,{...o,itemComponent:r=>e.jsx(Se,{...r,canDelete:()=>!1})})}}),O.anchorEl&&e.jsx(Ee,{open:!!O.anchorEl,anchorReference:"anchorPosition",anchorPosition:O.position,onClose:u,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(rn,{children:[e.jsxs(G,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(R,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:h(I==null?void 0:I.channel).map(o=>{var k,H;const{type:r,pass:c,fail:C}=o;return!(I!=null&&I.result)||(k=I==null?void 0:I.result)!=null&&k[r]?e.jsxs(G,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(H=I==null?void 0:I.result)!=null&&H[r]?be.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ct,{}):e.jsx(tt,{size:12,sx:{color:be.primary.main}}),e.jsx("span",{children:c})]},r):e.jsxs(G,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:be.error.main},children:[e.jsx(dt,{}),e.jsx("span",{children:C})]},r)})})]})}),F.anchorEl&&e.jsx(Ee,{open:!!F.anchorEl,anchorReference:"anchorPosition",anchorPosition:F.position,onClose:m,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ge,{loading:s,onCancel:m,onConfirm:D})})]})})})}const an=b.memo(gt),on=ae.div`
1
+ import{r as b}from"./vendor-react-D-afvo_7.js";import{j as e,E as d,a1 as Pe,R as bt,a4 as jt,T as G,a3 as R,A as Fe,bH as _e,cn as et,cm as Te,aN as Ie,bL as De,x as ye,aj as Ee,a2 as tt,aa as ae,V as nt,bO as Xe,bI as vt,aP as yt,al as Je,co as St}from"./vendor-mui-core-BWT1QT-d.js";import{b as Z,aq as re,z as Ct}from"./vendor-utils-CzbloUV0.js";import{j as V,b as L,ad as Nt,a0 as Be,e as X,bD as wt,D as st,a3 as Ae,aY as at,aF as be,a8 as Rt,ao as Tt,bl as It}from"./vendor-arcblock-Bx50wV2r.js";import{z as Dt,G as $,m as Et,I as Qe}from"./index-DAgCHyVJ.js";import{e as pe,a as Oe}from"./vendor-hooks-6khEvbqa.js";import{S as ue}from"./shorten-label-CRTt8ftG.js";import{I as it}from"./index-DhpLFI07.js";import{S as At,a as Ot}from"./list-grXLmFRC.js";import{R as ze}from"./relative-time-BTynCt1i.js";import{b as We}from"./dashboard-B9pjvkNz.js";import{W as Lt}from"./did-address-BTUUYWtX.js";import{p as ot}from"./util-BI3SHCkh.js";import{D as kt,g as Pt}from"./traffic-DK7GKSDB.js";import{B as rt}from"./bundle-avatar-BKALp9R9.js";import{B as Ft}from"./index-B67qUeIU.js";import"./index-CV3ZYUK0.js";import"./InfoOutlined-VknYPDw1.js";import"./useLocalStorage-B1EHcXLK.js";import"./confirm-D2Cq0BwQ.js";import"./format-error-C0Ke3VXF.js";import"./PlayArrow-BqXSiw_w.js";import"./get-safe-url-DRF8Bvcq.js";import"./session-CXzOHPQH.js";import"./useAsyncRetry-DCwz7CH3.js";import"./useAsync-DIcJhKIm.js";import"./useSetState-Crt4S51m.js";import"./base32-npzNEcfW.js";import"./iframe-B-PrBIP9.js";import"./LaunchOutlined-BzWUvyO6.js";import"./ChevronLeft-D_tV9CKg.js";import"./ChevronRight-CLZL7Esj.js";import"./index-BPho8CPY.js";import"./vendor-mui-x-VJmvJUkN.js";const lt=b.createContext({}),{Provider:_t,Consumer:Qn}=lt;function Bt({children:t,blocklet:n=""}){const{api:s,inService:i}=Dt(),[a,l]=b.useState([]),[p,f]=b.useState({total:0,pageSize:20,pageCount:0,page:1}),y=pe(()=>{var j;return(j=n.meta)==null?void 0:j.did},[n]),[S,T]=b.useState([]),N=async({page:j=1,pageSize:v=20,...x}={})=>{if(!y)return[];try{const w={paging:{page:j,pageSize:v},...x,teamDid:y,dateRange:x.dateRange?[$(x.dateRange[0]).toISOString(),$(x.dateRange[1]).toISOString()]:void 0},{dids:M,...B}=w;let K="";M.includes("system")&&(K="system");const _=M.filter(ee=>ee!=="system"),Q=await s.getNotificationSendLog({input:{...B,source:K,componentDids:_}});return l(Q.list),f(Q.paging),Q.list}catch(w){return V.error(w.message),[]}},A=async()=>{const j=await s.getNotificationComponents({input:{teamDid:y}});T(j.componentDids)},P=b.useCallback(j=>{const v=n.children.find(x=>{var w;return((w=x.meta)==null?void 0:w.did)===j});if(v)return v.ancestors=[n],v},[n]),O=async({notificationId:j,receivers:v,channels:x,...w})=>{await s.resendNotification({input:{teamDid:y,notificationId:j,receivers:v,channels:x.map(M=>M==="wallet"?L.NOTIFICATION_SEND_CHANNEL.WALLET:M==="pushKit"?L.NOTIFICATION_SEND_CHANNEL.PUSH:M),...w}})},F=b.useCallback(async j=>(await s.getUser({input:{teamDid:y,user:{did:j}}})).user,[s,y]),I=b.useCallback(async({page:j=1,pageSize:v=20,...x}={})=>{try{const w={paging:{page:j,pageSize:v},...x,userName:x.searchText||"",teamDid:y,dateRange:x.dateRange?[$(x.dateRange[0]).toISOString(),$(x.dateRange[1]).toISOString()]:void 0};return await s.getReceivers({input:w})}catch(w){throw V.error(w.message),w}},[s,y]);b.useEffect(()=>{y&&A()},[y]);const U={fetch:N,data:a,paging:p,blocklet:n,getComponent:P,resendNotification:O,getUser:F,componentDids:S,getReceivers:I,inService:i,teamDid:y};return e.jsx(_t,{value:{notificationRecords:U},children:t})}function Me(){const{notificationRecords:t}=b.useContext(lt);return t}fe.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const zt={info:"primary",success:"success",error:"error",warning:"warning"};function fe({severity:t="info"}){return e.jsx(Nt,{type:zt[t],children:t})}var qe={},Wt=Pe;Object.defineProperty(qe,"__esModule",{value:!0});var ct=qe.default=void 0,Mt=Wt(Be()),qt=e;ct=qe.default=(0,Mt.default)((0,qt.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");var Ke={},Kt=Pe;Object.defineProperty(Ke,"__esModule",{value:!0});var dt=Ke.default=void 0,Ht=Kt(Be()),$t=e;dt=Ke.default=(0,Ht.default)((0,$t.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var He={},Ut=Pe;Object.defineProperty(He,"__esModule",{value:!0});var ut=He.default=void 0,Vt=Ut(Be()),Gt=e;ut=He.default=(0,Vt.default)((0,Gt.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");const Yt=(t,n,s="")=>{if(!s||!n)return"";switch(s){case L.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return s}};function pt(t,n,s={}){const{status:i,updatedAt:a,reason:l="",channel:p="wallet"}=s,f=a?t("notification.sendStatus.sentTime",{date:Et(a,n)}):"",y=Yt(t,p,l);return i===L.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:f,reason:y}:i===L.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:f}:{status:"pending",title:t("notification.sendStatus.pending"),reason:y,sentTime:f}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ze=["info","success","error","warning"],ft=t=>{var s,i;const{settings:n}=t;return(i=(s=n==null?void 0:n.notification)==null?void 0:s.email)==null?void 0:i.enabled},mt=t=>{var s,i;const{settings:n}=t;return(i=(s=n==null?void 0:n.notification)==null?void 0:s.pushKit)==null?void 0:i.enabled},Xt=(t,n)=>{const s=Z(n,"extra.notifications.email",!0);return{available:ft(t),enabled:s}},Jt=(t,n)=>{const s=Z(n,"extra.notifications.push",!0);return{available:mt(t),enabled:s}},Qt=t=>({enabled:Z(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:Z(t,"extra.webhooks",[]).length>0}),ge=(t=3)=>new Promise(n=>{setTimeout(()=>{n()},t*1e3)}),en=(t,n)=>n==="wallet"||n==="webhook"?[{channel:n,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:n}),fail:t("notification.sendStatus.reason.disabled",{channel:n})}]:n==="pushKit"||n==="email"?[{channel:n,type:"available",pass:t("notification.sendStatus.reason.available",{channel:n}),fail:t("notification.sendStatus.reason.unavailable",{channel:n})},{channel:n,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:n}),fail:t("notification.sendStatus.reason.disabled",{channel:n})}]:[],xe=(t=[])=>{const n=$().startOf("day");return t.filter(s=>$(s.sendAt).isSame(n,"day")).length},tn=(t,n="")=>{if(n&&ke.includes(n)){const l=`${n}SendRecord`,p=Z(t,l,[]);return xe(p)}const s=Z(t,"webhook",{}),i=Object.keys(s??{})??[];if(n&&i.includes(n)){const l=s[n]??[];return xe(l)}const a={};return ke.forEach(l=>{const p=`${l}SendRecord`,f=Z(t,p,[]),y=xe(f);a[l]=y}),i.length>0&&i.forEach(l=>{const p=s[l]??[],f=xe(p);a[l]=f}),a},je=(t,n,s)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[s].splice(n,1),t},ve=(t,n)=>{if(!Array.isArray(n))throw new Error("filters must be an array");return n.length?!n.includes(t):!1},nn=t=>{switch(t){case L.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case L.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case L.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case L.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ht=()=>bt({typography:{fontSize:14,button:{textTransform:"none"}},palette:{primary:{main:"#1DC1C7",contrastText:"#fff"},secondary:{main:"#030712",contrastText:"#fff"},storeSecondary:{main:"#EBFEFF",contrastText:"#fff"}},components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function J({config:t,enableTooltip:n=!0,showTitle:s=!1,children:i}){const{status:a,title:l="",sentTime:p="",reason:f=""}=t,y=[l,f].filter(Boolean).join(", ");return e.jsx(jt,{title:n?e.jsxs(e.Fragment,{children:[e.jsx(G,{color:"inherit",sx:{fontSize:12},children:y}),e.jsx("span",{children:p})]}):null,arrow:!0,placement:"top",children:e.jsxs(R,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(R,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(R,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a],style:{opacity:.15}}),e.jsx(R,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]})]}),e.jsx(G,{color:"inherit",sx:{fontSize:12},children:s?l:i})]})})}J.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};J.defaultProps={enableTooltip:!0,showTitle:!1,children:null};le.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};le.defaultProps={onDelete:()=>{}};function le({list:t,label:n,onDelete:s}){const{t:i,locale:a}=X();return e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[n,": "]}),t.map(l=>{const p=pt(i,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(R,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(J,{config:p,enableTooltip:!1,children:p.title})}),onDelete:f=>s(f,l)},l)})]})}$e.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function $e({filterList:t,onChange:n,index:s,column:i,filterValues:a,label:l,renderLabel:p}){return e.jsxs(_e,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(f=>e.jsx(Ie,{control:e.jsx(De,{checked:t[s].indexOf(f.value??f)>-1,onChange:y=>{const S=[...t];y.target.checked?S[s]=[...S[s],f.value??f]:S[s]=S[s].filter(T=>T!==(f.value??f)),n(S[s],s,i)},name:f.value??f}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:p(f)})},f.value??f))})]})}function Re(t){return e.jsx($e,{...t,renderLabel:n=>e.jsx(J,{enableTooltip:!1,config:{status:n.status},children:n.label})})}oe.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function oe({status:t,updatedAt:n,reason:s="",channel:i="wallet",onResend:a}){const{t:l,locale:p}=X(),f=pt(l,p,{status:t,updatedAt:n,reason:s,channel:i});return e.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(J,{config:f,showTitle:!0}),f.status!=="success"&&e.jsx(ye,{className:"resend-btn",size:"small",startIcon:e.jsx(We,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}Ue.propTypes={value:d.array.isRequired,onChange:d.func};function Ue({value:t,onChange:n}){const{locale:s}=X(),i=$().toDate(),[a,l]=b.useState(null),p=b.useCallback(S=>{l(a?null:S.currentTarget)},[a]),f=!!a,y=b.useCallback(S=>{if(!S.startDate||!S.endDate){V.error("Please select a date range");return}if($(S.startDate).isAfter(S.endDate)||!$(S.startDate).isValid()||!$(S.endDate).isValid()){V.error("Invalid date range");return}n([S.startDate,S.endDate]),l(null)},[n]);return e.jsxs("div",{children:[e.jsx(G,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(ye,{onClick:p,variant:"outlined",size:"small",color:"inherit",children:[Qe(t[0],s)," - ",Qe(t[1],s)]})}),e.jsx(Ee,{open:f,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(kt,{open:!0,maxDate:i,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:p,definedRanges:Pt(i),onChange:y})})]})}Ve.propTypes={itemComponent:d.elementType.isRequired};function Ve({itemComponent:t,...n}){var a;const{t:s}=X();return!((a=n==null?void 0:n.filterList)!=null&&a.filter(l=>l.length).length)?null:e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:s("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(wt.TableFilterList,{...n,ItemComponent:t})})]})}function Se({label:t,onDelete:n,canDelete:s=()=>!0,...i}){const a=n&&typeof n=="function"?n:void 0;let l=!0;return s&&typeof s=="function"&&(l=s({label:t,...i})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}Se.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};Se.defaultProps={canDelete:()=>!0};const sn=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];Ge.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ge.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ge({loading:t=!1,onCancel:n,onConfirm:s}){const{t:i}=X(),[a,l]=b.useState(sn),[p,f]=b.useState(!0),y=(T,N)=>{N.checked=T.target.checked;const A=a.map(P=>({...P,checked:P.value===N.value?N.checked:P.checked}));l(A)},S=T=>{T.stopPropagation(),s({channels:a.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:p})};return e.jsxs(R,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(G,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:i("notification.config")}),e.jsx(R,{className:"choose-channel",children:e.jsxs(_e,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:i("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(T=>e.jsx(Ie,{control:e.jsx(De,{checked:T.checked,onChange:N=>y(N,T),name:T.value}),label:T.label},T.value))})]})}),e.jsx(R,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(De,{checked:p,onChange:T=>f(T.target.checked)}),label:i("notification.resendFailedOnly")})})}),e.jsxs(R,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(ye,{onClick:T=>{T.stopPropagation(),n()},color:"inherit",children:i("common.cancel")}),e.jsxs(ye,{onClick:S,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),i("common.confirm")]})]})]})}gt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function gt({notificationId:t,handleResend:n,resending:s=!1}){const{t:i,locale:a}=X(),{getReceivers:l,inService:p,teamDid:f,getUser:y,blocklet:S}=Me(),[T,N]=b.useState(!1),[A,P]=b.useState([]),O=Oe({anchorEl:null,position:null}),F=Oe({anchorEl:null,position:null}),[I,U]=b.useState(null),[j,v]=b.useState({total:0,pageSize:10,pageCount:0,page:1}),[x,w]=b.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),[M,B]=b.useState([]),K=[{label:i("notification.sendStatus.pending"),value:0,status:"pending"},{label:i("notification.sendStatus.success"),value:1,status:"success"},{label:i("notification.sendStatus.failed"),value:2,status:"failed"}],_=async()=>{if(!T&&t)try{N(!0);const o=await l({notificationId:t,...x}),r=o.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:ot(c.receiverUser.avatar,f,p)}}));P(r),v(o.paging),N(!1)}catch(o){V.error(o.message),N(!1)}};b.useEffect(()=>{_()},[x]);const Q=o=>{o.stopPropagation();const r=o.currentTarget;F.anchorEl=r;const c=r.getBoundingClientRect();F.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ee=o=>o.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ae,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(We,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:Q,children:i("notification.resend")})}):null,Ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:i("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:j.page-1,rowsPerPage:j.pageSize,count:j.total,searchText:x.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:M,onRowSelectionChange:(o,r)=>{B(r.map(c=>c.dataIndex))},customToolbarSelect:ee},we=({page:o,rowsPerPage:r,searchText:c,filterList:C})=>{const[,k=[],H=[],q=[]]=C;x.pageSize!==r?w(W=>({...W,pageSize:r,page:1})):x.page!==o+1?w(W=>({...W,page:o+1})):x.searchText!==c?w(W=>({...W,searchText:c,page:1})):re(k,x.walletSendStatus)?re(H,x.pushKitSendStatus)?re(q,x.emailSendStatus)||w(W=>({...W,emailSendStatus:q,page:1})):w(W=>({...W,pushKitSendStatus:H,page:1})):w(W=>({...W,walletSendStatus:k,page:1}))},me=b.useCallback(async(o,r)=>{if(!r)return!1;const c=await y(r);return c?o==="wallet"?Qt(c):o==="email"?Xt(S,c):o==="pushKit"?Jt(S,c):o==="webhook"?Zt(c):!0:!1},[y,S]),h=b.useCallback(o=>en(i,o),[i]),u=()=>{O.anchorEl=null,O.position=null,U(null)},m=()=>{F.anchorEl=null,F.position=null},g=async(o,r,c=!0,C="")=>{if(!(!r.length||!o.length))try{n(o,r,c,C),F.anchorEl||(await ge(.5),u())}catch(k){console.error("handleResend error",{error:k})}},D=async({channels:o,isResendFailedOnly:r})=>{const c=M.map(C=>A[C].receiver);await g(o,c,r),await ge(.5),m(),B([])},E=async(o,r=[],c=!0)=>{try{await g(["webhook"],[o.receiver],c,r)}catch(C){V.error(C.response?C.response.statusText:C.message)}},z=async(o,r,c,C=[],k=!0)=>{if(o.stopPropagation(),tn(r,c)>=4){V.warning(i("notification.resendLimit"));return}if(!ke.includes(c)){await E(r,C,k);return}if(o){const q=o.currentTarget,W=q.getBoundingClientRect();O.anchorEl=q,O.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}U({channel:c});try{const q=await me(c,r.receiver);await ge(1),U({channel:c,result:q}),(typeof q=="boolean"&&q||Ct(q)&&Object.values(q).every(W=>!!W))&&(await n([c],[r.receiver],k),F.anchorEl||(await ge(.5),u()))}catch(q){V.error(q.message)}},Y=o=>{w(r=>({...r,dateRange:o,page:1}))},te=(o,r,c,C)=>{o.stopPropagation();const k=c.filter(H=>H!==r);w(H=>({...H,[C]:k,page:1}))},ie=pe(()=>[{label:i("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:o=>{const{receiverUser:r,receiver:c}=A[o];return r?e.jsxs(R,{"data-cy":`member-name-${r.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(st,{src:`${r.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(ue,{children:r.fullName})]},c):e.jsx(Lt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:x.walletSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Wallet",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[1].options.filterList,"walletSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Wallet",filterList:o,onChange:r,index:c,column:C,filterValues:K})},customBodyRenderLite:o=>{const{walletSendStatus:r,walletSendAt:c,walletSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"wallet",onResend:k=>z(k,A[o],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{pushKitSendStatus:r,pushKitSendAt:c,pushKitSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"pushkit",onResend:k=>z(k,A[o],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:x.pushKitSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Push Kit",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[2].options.filterList,"pushKitSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Push Kit",filterList:o,onChange:r,index:c,column:C,filterValues:K})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{emailSendStatus:r,emailSendAt:c,emailSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"email",onResend:k=>z(k,A[o],"email",[],!1)})},filter:!0,filterType:"custom",filterList:x.emailSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Email",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[3].options.filterList,"emailSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Email",filterList:o,onChange:r,index:c,column:C,filterValues:K})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{webhook:r}=A[o];if(!r)return null;const c=Object.entries(r)[0];if(!c)return null;const[C,k]=c,H=k[0];return e.jsx(R,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(R,{className:"webhook-item",fontSize:12,children:[e.jsx(ue,{maxLength:30,children:C},C),e.jsx(oe,{status:H.status,updatedAt:H.sendAt,reason:H.failedReason,channel:"webhook",onResend:q=>z(q,A[o],"webhook",[C],!1)})]},C)})}}},{label:i("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:o=>{const{createdAt:r}=A[o];return e.jsx(ze,{value:r,locale:a,shouldUpdate:!0})}}}],[A,a,x,i]),he=[e.jsx(Ue,{value:x.dateRange,onChange:Y},"date-picker"),e.jsx(Ae,{variant:"contained",size:"small",color:"primary",loading:T,startIcon:e.jsx(ut,{}),onClick:()=>_(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:i("common.refresh")},"refresh")];return e.jsx(R,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(on,{children:e.jsxs(nt,{theme:ht(),children:[e.jsx(at,{className:"receivers-table",locale:a,loading:T,columns:ie,data:A,onChange:we,options:Ne,customButtons:he,components:{TableFilterList:o=>e.jsx(Ve,{...o,itemComponent:r=>e.jsx(Se,{...r,canDelete:()=>!1})})}}),O.anchorEl&&e.jsx(Ee,{open:!!O.anchorEl,anchorReference:"anchorPosition",anchorPosition:O.position,onClose:u,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(rn,{children:[e.jsxs(G,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(R,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:h(I==null?void 0:I.channel).map(o=>{var k,H;const{type:r,pass:c,fail:C}=o;return!(I!=null&&I.result)||(k=I==null?void 0:I.result)!=null&&k[r]?e.jsxs(G,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(H=I==null?void 0:I.result)!=null&&H[r]?be.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ct,{}):e.jsx(tt,{size:12,sx:{color:be.primary.main}}),e.jsx("span",{children:c})]},r):e.jsxs(G,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:be.error.main},children:[e.jsx(dt,{}),e.jsx("span",{children:C})]},r)})})]})}),F.anchorEl&&e.jsx(Ee,{open:!!F.anchorEl,anchorReference:"anchorPosition",anchorPosition:F.position,onClose:m,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ge,{loading:s,onCancel:m,onConfirm:D})})]})})})}const an=b.memo(gt),on=ae.div`
2
2
  td.MuiTableCell-footer {
3
3
  border: none !important;
4
4
  }
@@ -27,7 +27,7 @@ import{r as b}from"./vendor-react-D-afvo_7.js";import{j as e,E as d,a1 as Pe,R a
27
27
  }
28
28
  font-size: 12px;
29
29
  }
30
- `,ce=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function ln(t){const{wallet:n,push:s,email:i,webhook:a}=t;return[{name:"Wallet",value:e.jsx(ne,{item:n})},{name:"Push",value:e.jsx(ne,{item:s})},{name:"Email",value:e.jsx(ne,{item:i})},...a.total>0?[{name:"Webhook",value:e.jsx(ne,{item:a,isWebhook:!0})}]:[]]}function cn(t,n,s){const{wallet:i,push:a,email:l,webhook:p}=t;return[{name:"Wallet",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.WALLET,item:i,onResend:n})},{name:"Push",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.PUSH,item:a,onResend:n})},{name:"Email",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.EMAIL,item:l,onResend:n})},...p.total>0?[{name:"Webhook",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:p,isWebhook:!0,onResend:n})}]:[]]}Ce.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};Ce.defaultProps={mode:"simple",onResend:()=>{},resending:!1};ne.propTypes={item:d.object.isRequired,isWebhook:d.bool};ne.defaultProps={isWebhook:!1};function ne({item:t,isWebhook:n=!1}){const{t:s}=Y(),i=n?t.success.length:t.success,a=t.total,l=i===a?"success":"failed";return e.jsx(R,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(R,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(J,{config:{status:l},enableTooltip:!1,children:[ce(i)," / ",ce(a)," ",s("notification.sendStatus.success")]})})})}se.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};se.defaultProps={isWebhook:!1,channel:L.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function se({channel:t,item:n,isWebhook:s=!1,onResend:i,loading:a}){const{t:l}=Y(),{success:p,failed:f,pending:y}=n,S=nn(t),T=s?p.length:p,N=s?f.length:f,A=s?y.length:y,P=async U=>{U.stopPropagation();const j=s?[...new Set([...p,...f].map(v=>v))]:[];await i([t],[],!0,j)},O=T+N,F=O>0?T/O*100:0,I=O>0?N/O*100:0;return e.jsxs(dn,{successRatio:F,failedRatio:I,children:[e.jsxs(G,{variant:"h6",children:[S," (",n.total,")"]}),e.jsxs(G,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Le.success,fontWeight:600,fontSize:24},children:ce(T)}),e.jsx("small",{style:{paddingLeft:4},children:l("notification.sendStatus.success")})]}),e.jsxs(R,{className:"unsent-area",children:[e.jsxs(R,{children:[e.jsxs(J,{config:{status:"failed"},enableTooltip:!1,children:[ce(N)," ",l("notification.sendStatus.failed")]}),e.jsxs(J,{config:{status:"pending"},enableTooltip:!1,children:[ce(A)," ",l("notification.sendStatus.pending")]})]}),N>0&&e.jsx(R,{className:"resend-btn",children:e.jsx(Ae,{size:"small",color:"primary",loading:a,variant:"contained",startIcon:e.jsx(We,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:P,children:l("notification.resend")})})]})]})}function Ce({statistics:t,mode:n="simple",onResend:s,resending:i}){const a=pe(()=>n==="simple"?ln(t):cn(t,s,i),[t,n]);return n==="simple"?e.jsx("div",{children:a.map(l=>e.jsx(it,{style:{alignItems:"flex-start",marginBottom:n==="simple"?0:16},valueComponent:"div",nameWidth:100,name:l.name,children:l.value},l.name))}):e.jsx(Ye,{container:!0,spacing:2,children:a.map(l=>e.jsx(Ye,{item:!0,md:4,sm:6,xs:12,children:l.value},l.name))})}const dn=ae(R)`
30
+ `,ce=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function ln(t){const{wallet:n,push:s,email:i,webhook:a}=t;return[{name:"Wallet",value:e.jsx(ne,{item:n})},{name:"Push",value:e.jsx(ne,{item:s})},{name:"Email",value:e.jsx(ne,{item:i})},...a.total>0?[{name:"Webhook",value:e.jsx(ne,{item:a,isWebhook:!0})}]:[]]}function cn(t,n,s){const{wallet:i,push:a,email:l,webhook:p}=t;return[{name:"Wallet",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.WALLET,item:i,onResend:n})},{name:"Push",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.PUSH,item:a,onResend:n})},{name:"Email",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.EMAIL,item:l,onResend:n})},...p.total>0?[{name:"Webhook",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:p,isWebhook:!0,onResend:n})}]:[]]}Ce.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};Ce.defaultProps={mode:"simple",onResend:()=>{},resending:!1};ne.propTypes={item:d.object.isRequired,isWebhook:d.bool};ne.defaultProps={isWebhook:!1};function ne({item:t,isWebhook:n=!1}){const{t:s}=X(),i=n?t.success.length:t.success,a=t.total,l=i===a?"success":"failed";return e.jsx(R,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(R,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(J,{config:{status:l},enableTooltip:!1,children:[ce(i)," / ",ce(a)," ",s("notification.sendStatus.success")]})})})}se.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};se.defaultProps={isWebhook:!1,channel:L.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function se({channel:t,item:n,isWebhook:s=!1,onResend:i,loading:a}){const{t:l}=X(),{success:p,failed:f,pending:y}=n,S=nn(t),T=s?p.length:p,N=s?f.length:f,A=s?y.length:y,P=async U=>{U.stopPropagation();const j=s?[...new Set([...p,...f].map(v=>v))]:[];await i([t],[],!0,j)},O=T+N,F=O>0?T/O*100:0,I=O>0?N/O*100:0;return e.jsxs(dn,{successRatio:F,failedRatio:I,children:[e.jsxs(G,{variant:"h6",children:[S," (",n.total,")"]}),e.jsxs(G,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Le.success,fontWeight:600,fontSize:24},children:ce(T)}),e.jsx("small",{style:{paddingLeft:4},children:l("notification.sendStatus.success")})]}),e.jsxs(R,{className:"unsent-area",children:[e.jsxs(R,{children:[e.jsxs(J,{config:{status:"failed"},enableTooltip:!1,children:[ce(N)," ",l("notification.sendStatus.failed")]}),e.jsxs(J,{config:{status:"pending"},enableTooltip:!1,children:[ce(A)," ",l("notification.sendStatus.pending")]})]}),N>0&&e.jsx(R,{className:"resend-btn",children:e.jsx(Ae,{size:"small",color:"primary",loading:a,variant:"contained",startIcon:e.jsx(We,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:P,children:l("notification.resend")})})]})]})}function Ce({statistics:t,mode:n="simple",onResend:s,resending:i}){const a=pe(()=>n==="simple"?ln(t):cn(t,s,i),[t,n]);return n==="simple"?e.jsx("div",{children:a.map(l=>e.jsx(it,{style:{alignItems:"flex-start",marginBottom:n==="simple"?0:16},valueComponent:"div",nameWidth:100,name:l.name,children:l.value},l.name))}):e.jsx(Xe,{container:!0,spacing:2,children:a.map(l=>e.jsx(Xe,{item:!0,md:4,sm:6,xs:12,children:l.value},l.name))})}const dn=ae(R)`
31
31
  display: flex;
32
32
  flex-direction: column;
33
33
  align-items: flex-start;
@@ -45,7 +45,7 @@ import{r as b}from"./vendor-react-D-afvo_7.js";import{j as e,E as d,a1 as Pe,R a
45
45
  bottom: 0;
46
46
  }
47
47
  }
48
- `;xt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function xt({notification:t,onCancel:n=()=>{},blocklet:s,tab:i="info"}){const{t:a,locale:l}=Y(),{getComponent:p,resendNotification:f}=Me(),[y,S]=b.useState(!1),T=pe(()=>p(t.componentDid)||s,[s,t.componentDid]),N=Oe({tab:i||"info"}),A=b.useCallback(async(j,v,x=!0,w=[])=>{var K;if(!j.length||!t.id)return;const M=v.length>0?v:(K=t==null?void 0:t.receivers)==null?void 0:K.map(_=>_.receiver);if(!M.length)return;let B=[...j];if(B.includes(L.NOTIFICATION_SEND_CHANNEL.PUSH)&&!mt(s)&&(V.warning(a("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),B=B.filter(_=>_!==L.NOTIFICATION_SEND_CHANNEL.PUSH)),B.includes(L.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ft(s)&&(V.warning(a("notification.sendStatus.reason.unavailable",{channel:"Email"})),B=B.filter(_=>_!==L.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!B.length)try{S(!0),await f({notificationId:t.id,receivers:M,channels:B,resendFailedOnly:x,...B.includes("webhook")&&w.length?{webhookUrls:w}:{}}),V.success("Message has been sent!")}catch(_){console.error("handleResend error",{error:_}),V.error(_.response?_.response.statusText:_.message)}finally{S(!1)}},[s,t.id,t==null?void 0:t.receivers,f,a]);function P(){return[{name:a("notification.from"),value:e.jsx(At,{size:32,blocklet:T,showName:!0,hideDot:!0})},{name:a("notification.notificationTitle"),value:e.jsx(ue,{maxLength:50,children:t.title})},{name:a("notification.body"),value:e.jsx(Ot,{notification:t,rows:0})},{name:a("notification.severity"),value:e.jsx(fe,{severity:t.severity})},{name:a("notification.createdAt"),value:e.jsx(ze,{value:t.createdAt,locale:l,shouldUpdate:!0})}].map(v=>e.jsx(it,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:v.name,children:v.value},v.name))}const O={info:{label:a("common.basicInfo"),value:"info",component:P},receivers:{label:a("notification.receiver"),value:"receivers"},statistics:{label:a("notification.statistics"),value:"statistics"}},F=Object.values(O).map(({label:j,value:v})=>({label:j,value:v})),I=O[N.tab]||O.info,U=j=>{N.tab=j};return e.jsx(Rt,{title:a("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{N.tab="info",n()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(pn,{children:[e.jsx(R,{mx:3,className:"tabs",children:e.jsx(Tt,{tabs:F,current:N.tab,onChange:U,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[N.tab==="receivers"&&e.jsx(an,{notificationId:t.id,resending:y,handleResend:A}),N.tab==="statistics"&&e.jsx(Ce,{statistics:t.statistics,mode:"detail",resending:y,onResend:A}),N.tab==="info"&&e.jsx(I.component,{})]})]})})}const un=b.memo(xt),pn=ae.div`
48
+ `;xt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function xt({notification:t,onCancel:n=()=>{},blocklet:s,tab:i="info"}){const{t:a,locale:l}=X(),{getComponent:p,resendNotification:f}=Me(),[y,S]=b.useState(!1),T=pe(()=>p(t.componentDid)||s,[s,t.componentDid]),N=Oe({tab:i||"info"}),A=b.useCallback(async(j,v,x=!0,w=[])=>{var K;if(!j.length||!t.id)return;const M=v.length>0?v:(K=t==null?void 0:t.receivers)==null?void 0:K.map(_=>_.receiver);if(!M.length)return;let B=[...j];if(B.includes(L.NOTIFICATION_SEND_CHANNEL.PUSH)&&!mt(s)&&(V.warning(a("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),B=B.filter(_=>_!==L.NOTIFICATION_SEND_CHANNEL.PUSH)),B.includes(L.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ft(s)&&(V.warning(a("notification.sendStatus.reason.unavailable",{channel:"Email"})),B=B.filter(_=>_!==L.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!B.length)try{S(!0),await f({notificationId:t.id,receivers:M,channels:B,resendFailedOnly:x,...B.includes("webhook")&&w.length?{webhookUrls:w}:{}}),V.success("Message has been sent!")}catch(_){console.error("handleResend error",{error:_}),V.error(_.response?_.response.statusText:_.message)}finally{S(!1)}},[s,t.id,t==null?void 0:t.receivers,f,a]);function P(){return[{name:a("notification.from"),value:e.jsx(At,{size:32,blocklet:T,showName:!0,hideDot:!0})},{name:a("notification.notificationTitle"),value:e.jsx(ue,{maxLength:50,children:t.title})},{name:a("notification.body"),value:e.jsx(Ot,{notification:t,rows:0})},{name:a("notification.severity"),value:e.jsx(fe,{severity:t.severity})},{name:a("notification.createdAt"),value:e.jsx(ze,{value:t.createdAt,locale:l,shouldUpdate:!0})}].map(v=>e.jsx(it,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:v.name,children:v.value},v.name))}const O={info:{label:a("common.basicInfo"),value:"info",component:P},receivers:{label:a("notification.receiver"),value:"receivers"},statistics:{label:a("notification.statistics"),value:"statistics"}},F=Object.values(O).map(({label:j,value:v})=>({label:j,value:v})),I=O[N.tab]||O.info,U=j=>{N.tab=j};return e.jsx(Rt,{title:a("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{N.tab="info",n()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(pn,{children:[e.jsx(R,{mx:3,className:"tabs",children:e.jsx(Tt,{tabs:F,current:N.tab,onChange:U,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[N.tab==="receivers"&&e.jsx(an,{notificationId:t.id,resending:y,handleResend:A}),N.tab==="statistics"&&e.jsx(Ce,{statistics:t.statistics,mode:"detail",resending:y,onResend:A}),N.tab==="info"&&e.jsx(I.component,{})]})]})})}const un=b.memo(xt),pn=ae.div`
49
49
  & > .notification-row {
50
50
  padding: 0;
51
51
  }
@@ -92,7 +92,7 @@ import{r as b}from"./vendor-react-D-afvo_7.js";import{j as e,E as d,a1 as Pe,R a
92
92
  overflow: hidden;
93
93
  text-overflow: ellipsis;
94
94
  }
95
- `;function de({blocklet:t,label:n}){var s;return e.jsx(fn,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(rt,{size:24,blocklet:t,ancestors:t.ancestors}),e.jsx("span",{className:"name",children:t.title||((s=t.meta)==null?void 0:s.title)})]}):e.jsx("span",{className:"name",children:n})})}Xe.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};Xe.defaultProps={onDelete:()=>{}};function Xe({list:t,label:n,onDelete:s}){return e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[n,": "]}),t.map(i=>e.jsx(Fe,{size:"small",label:e.jsx(R,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(fe,{severity:i})}),onDelete:a=>s(a,i)},i))]})}function mn(t){return e.jsx($e,{...t,renderLabel:n=>e.jsx(fe,{severity:n})})}function hn(){var me;const{t,locale:n}=Y(),[s,i]=b.useState(!1),{data:a,paging:l,blocklet:p,fetch:f,getComponent:y,componentDids:S,inService:T,teamDid:N}=Me(),A=b.useRef(null),[P,O]=b.useState(null),[F,I]=b.useState("info"),U=`notification-records-${(me=p.meta)==null?void 0:me.did}`,j=It(U),[v,x]=b.useState({pageSize:j.rowsPerPage||10,page:j.page?j.page+1:1,dids:j.dids||[],dateRange:j.dateRange||[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),w=pe(()=>{if(!p.children||!p.children.length)return[];const h=[];return p.children.forEach(u=>{var g;const m=u.did||((g=u.meta)==null?void 0:g.did);S.includes(m)&&(u.ancestors=[p],h.push(u))}),h},[S,p]),M=b.useCallback(async()=>{try{i(!0),await f(v),i(!1)}finally{i(!1)}},[f,v]);b.useEffect(()=>{M()},[]),b.useEffect(()=>{const h=setInterval(()=>{document.visibilityState==="visible"&&f(v).then(u=>{const m=u.find(g=>g.id===(P==null?void 0:P.id));P&&m&&O({...m})})},3e3);return()=>clearInterval(h)},[v,P]);const B=(h,u,m,g)=>{h.stopPropagation();const D=m.filter(E=>E!==u);x(E=>({...E,[g]:D,page:1}))},K=({page:h,rowsPerPage:u,filterList:m})=>{const[g=[],,,,D=[]]=m;v.pageSize!==u?x(E=>({...E,pageSize:u,page:1})):v.page!==h+1?x(E=>({...E,page:h+1})):re(v.dids,g)?re(v.severities,D)||x(E=>({...E,severities:D,page:1})):x(E=>({...E,dids:g,page:1}))},_=b.useCallback(()=>{O(null),I("info")},[]),Q=b.useCallback(()=>{f(v)},[f,v]),ee=[{label:t("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:h=>h.map((u,m)=>{var D;if(u==="system")return e.jsx("span",{children:t("notification.system")},`system-${m}`);const g=w.find(E=>{var X;return(E.did||((X=E.meta)==null?void 0:X.did))===u});return e.jsx(de,{blocklet:g,label:(g==null?void 0:g.title)||((D=g==null?void 0:g.meta)==null?void 0:D.title)},u)}),update:(h,u,m)=>(h[m].splice(u,1),h)},filterOptions:{names:w,logic:(h,u)=>u.length?!u.includes(h):!1,display:(h,u,m,g)=>e.jsxs(_e,{style:{width:"380px"},children:[e.jsx(vt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(yt,{multiple:!0,value:h[m],renderValue:D=>e.jsx(R,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:D.map(E=>{var X;if(E==="system")return e.jsx("span",{children:t("notification.system")},E);const z=w.find(te=>{var he;return(te.did||((he=te.meta)==null?void 0:he.did))===E});return e.jsx(de,{blocklet:z,label:(z==null?void 0:z.title)||((X=z==null?void 0:z.meta)==null?void 0:X.title)},E)})}),onChange:D=>{h[m]=D.target.value,u(h[m],m,g)},children:[e.jsx(Je,{value:"system",children:t("notification.system")}),w.map(D=>{var z,X;const E=D.did||((z=D.meta)==null?void 0:z.did);return e.jsx(Je,{value:E,children:e.jsx(de,{blocklet:D,label:D.title||((X=D.meta)==null?void 0:X.title)})},E)})]})]})},customBodyRenderLite:h=>{var g,D;const u=a[h],m=y(u.componentDid);return e.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[m?e.jsx(rt,{size:32,blocklet:m,ancestors:m.ancestors??[]}):e.jsx(Ft,{blocklet:p,size:32}),e.jsx(ue,{maxLength:50,children:((g=m==null?void 0:m.meta)==null?void 0:g.title)||((D=p==null?void 0:p.meta)==null?void 0:D.title)})]})}}},{label:t("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:h=>{const u=a[h],{receivers:m}=u;return e.jsx(St,{total:m.length,renderSurplus:g=>g<100?e.jsxs("span",{children:["+",g]}):e.jsx("span",{children:"99+"}),max:3,sx:{justifyContent:"flex-end",height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px",border:0,zIndex:2}},onClick:g=>{g.stopPropagation(),O(u),I("receivers")},children:m.map(g=>{const{receiverUser:D}=g,E=ot(D.avatar,N,T);return e.jsx(st,{alt:D.fullName,src:`${E}?imageFilter=resize&w=48&h=48`,size:32,did:g.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},g.receiver)})})}}},{label:t("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:h=>{const u=a[h];return e.jsx(R,{onClick:m=>{m.stopPropagation(),O(u),I("statistics")},children:e.jsx(Ce,{statistics:u.statistics})})}}},{label:t("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:h=>{const u=a[h];return e.jsx(ue,{maxLength:50,children:u.title})}}},{label:t("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:h=>{const u=a[h];return e.jsx(fe,{severity:u.severity})},filter:!0,filterType:"custom",filterList:v.severities??[],customFilterListOptions:{render:h=>e.jsx(Xe,{list:h,label:t("notification.severity"),onDelete:(u,m)=>{u.stopPropagation(),B(u,m,ee[4].options.filterList,"severities")}}),update:je},filterOptions:{names:Ze,fullWidth:!0,logic:ve,display:(h,u,m,g)=>e.jsx(mn,{label:t("notification.severity"),filterList:h,onChange:u,index:m,column:g,filterValues:Ze})}}},{label:t("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:h=>{const{createdAt:u}=a[h];return e.jsx(ze,{value:u,locale:n,shouldUpdate:!0})}}}],Ne=h=>{x(u=>({...u,dateRange:h,page:1}))},we=[e.jsx(Ue,{value:v.dateRange,onChange:Ne})];return e.jsxs(R,{ref:A,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(gn,{children:e.jsx(nt,{theme:ht(),children:e.jsx(at,{className:"main-data",verticalKeyWidth:100,loading:s,locale:n,columns:ee,data:a,durable:U,onChange:K,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:l.page-1,rowsPerPage:l.pageSize,count:l.total,...j,onRowClick:(h,{dataIndex:u})=>{O(a[u])}},customButtons:we,components:{TableFilterList:h=>e.jsx(Ve,{...h,itemComponent:u=>e.jsx(Se,{...u,canDelete:m=>{var D;const g=(D=m==null?void 0:m.columnNames)==null?void 0:D[(m==null?void 0:m.index)||0];return(g==null?void 0:g.name)==="sender"}})})}})})}),P&&e.jsx(un,{refresh:Q,onCancel:_,notification:P,blocklet:p,tab:F})]})}const gn=ae.div`
95
+ `;function de({blocklet:t,label:n}){var s;return e.jsx(fn,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(rt,{size:24,blocklet:t,ancestors:t.ancestors}),e.jsx("span",{className:"name",children:t.title||((s=t.meta)==null?void 0:s.title)})]}):e.jsx("span",{className:"name",children:n})})}Ye.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};Ye.defaultProps={onDelete:()=>{}};function Ye({list:t,label:n,onDelete:s}){return e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[n,": "]}),t.map(i=>e.jsx(Fe,{size:"small",label:e.jsx(R,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(fe,{severity:i})}),onDelete:a=>s(a,i)},i))]})}function mn(t){return e.jsx($e,{...t,renderLabel:n=>e.jsx(fe,{severity:n})})}function hn(){var me;const{t,locale:n}=X(),[s,i]=b.useState(!1),{data:a,paging:l,blocklet:p,fetch:f,getComponent:y,componentDids:S,inService:T,teamDid:N}=Me(),A=b.useRef(null),[P,O]=b.useState(null),[F,I]=b.useState("info"),U=`notification-records-${(me=p.meta)==null?void 0:me.did}`,j=It(U),[v,x]=b.useState({pageSize:j.rowsPerPage||10,page:j.page?j.page+1:1,dids:j.dids||[],dateRange:j.dateRange||[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),w=pe(()=>{if(!p.children||!p.children.length)return[];const h=[];return p.children.forEach(u=>{var g;const m=u.did||((g=u.meta)==null?void 0:g.did);S.includes(m)&&(u.ancestors=[p],h.push(u))}),h},[S,p]),M=b.useCallback(async()=>{try{i(!0),await f(v),i(!1)}finally{i(!1)}},[f,v]);b.useEffect(()=>{M()},[]),b.useEffect(()=>{const h=setInterval(()=>{document.visibilityState==="visible"&&f(v).then(u=>{const m=u.find(g=>g.id===(P==null?void 0:P.id));P&&m&&O({...m})})},3e3);return()=>clearInterval(h)},[v,P]);const B=(h,u,m,g)=>{h.stopPropagation();const D=m.filter(E=>E!==u);x(E=>({...E,[g]:D,page:1}))},K=({page:h,rowsPerPage:u,filterList:m})=>{const[g=[],,,,D=[]]=m;v.pageSize!==u?x(E=>({...E,pageSize:u,page:1})):v.page!==h+1?x(E=>({...E,page:h+1})):re(v.dids,g)?re(v.severities,D)||x(E=>({...E,severities:D,page:1})):x(E=>({...E,dids:g,page:1}))},_=b.useCallback(()=>{O(null),I("info")},[]),Q=b.useCallback(()=>{f(v)},[f,v]),ee=[{label:t("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:h=>h.map((u,m)=>{var D;if(u==="system")return e.jsx("span",{children:t("notification.system")},`system-${m}`);const g=w.find(E=>{var Y;return(E.did||((Y=E.meta)==null?void 0:Y.did))===u});return e.jsx(de,{blocklet:g,label:(g==null?void 0:g.title)||((D=g==null?void 0:g.meta)==null?void 0:D.title)},u)}),update:(h,u,m)=>(h[m].splice(u,1),h)},filterOptions:{names:w,logic:(h,u)=>u.length?!u.includes(h):!1,display:(h,u,m,g)=>e.jsxs(_e,{style:{width:"380px"},children:[e.jsx(vt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(yt,{multiple:!0,value:h[m],renderValue:D=>e.jsx(R,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:D.map(E=>{var Y;if(E==="system")return e.jsx("span",{children:t("notification.system")},E);const z=w.find(te=>{var he;return(te.did||((he=te.meta)==null?void 0:he.did))===E});return e.jsx(de,{blocklet:z,label:(z==null?void 0:z.title)||((Y=z==null?void 0:z.meta)==null?void 0:Y.title)},E)})}),onChange:D=>{h[m]=D.target.value,u(h[m],m,g)},children:[e.jsx(Je,{value:"system",children:t("notification.system")}),w.map(D=>{var z,Y;const E=D.did||((z=D.meta)==null?void 0:z.did);return e.jsx(Je,{value:E,children:e.jsx(de,{blocklet:D,label:D.title||((Y=D.meta)==null?void 0:Y.title)})},E)})]})]})},customBodyRenderLite:h=>{var g,D;const u=a[h],m=y(u.componentDid);return e.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[m?e.jsx(rt,{size:32,blocklet:m,ancestors:m.ancestors??[]}):e.jsx(Ft,{blocklet:p,size:32}),e.jsx(ue,{maxLength:50,children:((g=m==null?void 0:m.meta)==null?void 0:g.title)||((D=p==null?void 0:p.meta)==null?void 0:D.title)})]})}}},{label:t("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:h=>{const u=a[h],{receivers:m}=u;return e.jsx(St,{total:m.length,renderSurplus:g=>g<100?e.jsxs("span",{children:["+",g]}):e.jsx("span",{children:"99+"}),max:3,sx:{justifyContent:"flex-end",height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px",border:0,zIndex:2}},onClick:g=>{g.stopPropagation(),O(u),I("receivers")},children:m.map(g=>{const{receiverUser:D}=g,E=ot(D.avatar,N,T);return e.jsx(st,{alt:D.fullName,src:`${E}?imageFilter=resize&w=48&h=48`,size:32,did:g.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},g.receiver)})})}}},{label:t("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:h=>{const u=a[h];return e.jsx(R,{onClick:m=>{m.stopPropagation(),O(u),I("statistics")},children:e.jsx(Ce,{statistics:u.statistics})})}}},{label:t("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:h=>{const u=a[h];return e.jsx(ue,{maxLength:50,children:u.title})}}},{label:t("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:h=>{const u=a[h];return e.jsx(fe,{severity:u.severity})},filter:!0,filterType:"custom",filterList:v.severities??[],customFilterListOptions:{render:h=>e.jsx(Ye,{list:h,label:t("notification.severity"),onDelete:(u,m)=>{u.stopPropagation(),B(u,m,ee[4].options.filterList,"severities")}}),update:je},filterOptions:{names:Ze,fullWidth:!0,logic:ve,display:(h,u,m,g)=>e.jsx(mn,{label:t("notification.severity"),filterList:h,onChange:u,index:m,column:g,filterValues:Ze})}}},{label:t("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:h=>{const{createdAt:u}=a[h];return e.jsx(ze,{value:u,locale:n,shouldUpdate:!0})}}}],Ne=h=>{x(u=>({...u,dateRange:h,page:1}))},we=[e.jsx(Ue,{value:v.dateRange,onChange:Ne})];return e.jsxs(R,{ref:A,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(gn,{children:e.jsx(nt,{theme:ht(),children:e.jsx(at,{className:"main-data",verticalKeyWidth:100,loading:s,locale:n,columns:ee,data:a,durable:U,onChange:K,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:l.page-1,rowsPerPage:l.pageSize,count:l.total,...j,onRowClick:(h,{dataIndex:u})=>{O(a[u])}},customButtons:we,components:{TableFilterList:h=>e.jsx(Ve,{...h,itemComponent:u=>e.jsx(Se,{...u,canDelete:m=>{var D;const g=(D=m==null?void 0:m.columnNames)==null?void 0:D[(m==null?void 0:m.index)||0];return(g==null?void 0:g.name)==="sender"}})})}})})}),P&&e.jsx(un,{refresh:Q,onCancel:_,notification:P,blocklet:p,tab:F})]})}const gn=ae.div`
96
96
  td.MuiTableCell-footer {
97
97
  border: none !important;
98
98
  }
@@ -1,4 +1,4 @@
1
- import{j as t,a2 as h,a3 as c,E as d,aa as g}from"./vendor-mui-core-BWT1QT-d.js";import{r as y}from"./vendor-react-D-afvo_7.js";import{a2 as v,C as w,a3 as m}from"./vendor-arcblock-Cn3IZfUJ.js";import{P}from"./page-header-DdgQ5XYN.js";import{C as E}from"./index-DvZ2VDrh.js";import{u as T}from"./config-space-DDnvKnd8.js";import{C as B,D,a as N}from"./connect-to-BWm1tQwA.js";import{S as u}from"./step-actions-CYRP8hK4.js";import{S as b}from"./layout-DH6138ux.js";import"./vendor-utils-CzbloUV0.js";import"./vendor-hooks-6khEvbqa.js";import"./api-CSRyy6oj.js";import"./DeleteOutline--b0uhBXu.js";import"./format-error-C0Ke3VXF.js";import"./content-layout-Dw7m52fz.js";function l({onNext:o,onPrevious:x}){var n,r,p;const{t:a}=y.useContext(v),{blocklet:e}=E(),{spaceGateway:f,settingStorageEndpoint:C,updateSpaceGateway:j,hasStorageEndpoint:S,loading:i,storageEndpoint:s}=T();return i?t.jsx(w,{relative:"parent",children:t.jsx(h,{})}):t.jsxs(G,{children:[t.jsx("div",{className:"header",children:t.jsx(P,{title:a("setup.didSpace.title"),subTitle:a("setup.didSpace.subTitle"),onClickBack:x})}),t.jsx(c,{sx:{width:"100%",maxWidth:"720px"},children:S?t.jsx(B,{spaceGateway:f,settingStorageEndpoint:C}):t.jsx(D,{})}),((n=e==null?void 0:e.capabilities)==null?void 0:n.didSpace)&&t.jsx(c,{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"24px",children:t.jsx(N,{onConnect:j,storageEndpoint:s})}),((r=e==null?void 0:e.capabilities)==null?void 0:r.didSpace)==="required"&&t.jsx(u,{mt:8,children:t.jsx(m,{loading:i,variant:"contained",disabled:i||!s,onClick:()=>o(),children:a("setup.continue")})}),((p=e==null?void 0:e.capabilities)==null?void 0:p.didSpace)==="optional"&&t.jsx(u,{blocklet:e,onStartNow:()=>o("complete"),children:t.jsx(m,{className:"start-now",loading:i,variant:"contained",disabled:i,onClick:()=>o(),children:a(s?"setup.continue":"setup.skip")})})]})}l.propTypes={onNext:d.func,onPrevious:d.func};l.defaultProps={onNext:()=>{},onPrevious:()=>{}};const G=g(b)`
1
+ import{j as t,a2 as h,a3 as c,E as d,aa as g}from"./vendor-mui-core-BWT1QT-d.js";import{r as y}from"./vendor-react-D-afvo_7.js";import{a2 as v,C as w,a3 as m}from"./vendor-arcblock-Bx50wV2r.js";import{P}from"./page-header-CmlsKL9T.js";import{C as E}from"./index-DAgCHyVJ.js";import{u as T}from"./config-space-BraBdsSu.js";import{C as B,D,a as N}from"./connect-to-BiWpwCyy.js";import{S as u}from"./step-actions-DAwK9FcN.js";import{S as b}from"./layout-CCIWvzPj.js";import"./vendor-utils-CzbloUV0.js";import"./vendor-hooks-6khEvbqa.js";import"./api-CSRyy6oj.js";import"./DeleteOutline-D4Mo1apM.js";import"./format-error-C0Ke3VXF.js";import"./content-layout-Dw7m52fz.js";function l({onNext:o,onPrevious:x}){var n,r,p;const{t:a}=y.useContext(v),{blocklet:e}=E(),{spaceGateway:f,settingStorageEndpoint:C,updateSpaceGateway:j,hasStorageEndpoint:S,loading:i,storageEndpoint:s}=T();return i?t.jsx(w,{relative:"parent",children:t.jsx(h,{})}):t.jsxs(G,{children:[t.jsx("div",{className:"header",children:t.jsx(P,{title:a("setup.didSpace.title"),subTitle:a("setup.didSpace.subTitle"),onClickBack:x})}),t.jsx(c,{sx:{width:"100%",maxWidth:"720px"},children:S?t.jsx(B,{spaceGateway:f,settingStorageEndpoint:C}):t.jsx(D,{})}),((n=e==null?void 0:e.capabilities)==null?void 0:n.didSpace)&&t.jsx(c,{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"24px",children:t.jsx(N,{onConnect:j,storageEndpoint:s})}),((r=e==null?void 0:e.capabilities)==null?void 0:r.didSpace)==="required"&&t.jsx(u,{mt:8,children:t.jsx(m,{loading:i,variant:"contained",disabled:i||!s,onClick:()=>o(),children:a("setup.continue")})}),((p=e==null?void 0:e.capabilities)==null?void 0:p.didSpace)==="optional"&&t.jsx(u,{blocklet:e,onStartNow:()=>o("complete"),children:t.jsx(m,{className:"start-now",loading:i,variant:"contained",disabled:i,onClick:()=>o(),children:a(s?"setup.continue":"setup.skip")})})]})}l.propTypes={onNext:d.func,onPrevious:d.func};l.defaultProps={onNext:()=>{},onPrevious:()=>{}};const G=g(b)`
2
2
  height: 100%;
3
3
  overflow-y: auto;
4
4
  `;export{l as default};
@@ -1,4 +1,4 @@
1
- import{r as b,g as qe}from"./vendor-react-D-afvo_7.js";import{j as e,T as O,M as R,bI as ke,bY as Le,bZ as Z,bK as Ne,bN as Ae,a2 as E,br as Ge,ad as Ve,E as w,aa as $,aN as Ke,bL as Ue,I as z,a3 as y,a1 as Ze,al as _e,K as Ye,a4 as ee,t as Je}from"./vendor-mui-core-BWT1QT-d.js";import{d as ce}from"./Add-CehHkXtu.js";import{e as q,a8 as G,a3 as N,j as A,x as Qe,a0 as Xe,b as de,aw as ue,n as et,ad as tt,a2 as Be,bn as X,bo as be,ax as st}from"./vendor-arcblock-Cn3IZfUJ.js";import{d as te}from"./EditIcon-lehrw0S5.js";import{d as rt}from"./LockIcon-D4mzr6Ds.js";import{L as pe,S as me,d as nt}from"./list-header-MogH2bs1.js";import{L as V,an as Se,H as at}from"./vendor-utils-CzbloUV0.js";import{z as B,O as K,au as Re,C as ot,ab as it,f as lt,h as ct,b as J,av as dt}from"./index-DvZ2VDrh.js";import{u as U}from"./dashboard-Dr8B5iTX.js";import{w as H,P as we}from"./permission-Yia679mu.js";import{C as fe}from"./confirm-0Ay4zz5F.js";import{f as Y}from"./format-error-C0Ke3VXF.js";import{C as ut}from"./Google-Dc5CpY7r.js";import{W as ze}from"./did-address-B8WelYg7.js";import{_ as pt}from"./useSetState-Crt4S51m.js";import"./vendor-hooks-6khEvbqa.js";import"./useLocalStorage-Cd4aCng4.js";import"./PlayArrow-D3Xnrt2P.js";import"./get-safe-url-Cww9J3VK.js";import"./index-C5E0f4MM.js";import"./session-C4pA5XYh.js";import"./useAsyncRetry-DCwz7CH3.js";import"./useAsync-DIcJhKIm.js";import"./InfoOutlined-CaT2OjoW.js";import"./cloneDeep-DvDcCvik.js";var he={};Object.defineProperty(he,"__esModule",{value:!0});var Q=he.default=void 0;mt(b);var Te=e;function mt(o){return o&&o.__esModule?o:{default:o}}function Pe(o,u){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(o);u&&(d=d.filter(function(m){return Object.getOwnPropertyDescriptor(o,m).enumerable})),i.push.apply(i,d)}return i}function Ie(o){for(var u=1;u<arguments.length;u++){var i=arguments[u]!=null?arguments[u]:{};u%2?Pe(Object(i),!0).forEach(function(d){ft(o,d,i[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach(function(d){Object.defineProperty(o,d,Object.getOwnPropertyDescriptor(i,d))})}return o}function ft(o,u,i){return(u=ht(u))in o?Object.defineProperty(o,u,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[u]=i,o}function ht(o){var u=xt(o,"string");return typeof u=="symbol"?u:u+""}function xt(o,u){if(typeof o!="object"||!o)return o;var i=o[Symbol.toPrimitive];if(i!==void 0){var d=i.call(o,u||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(o)}var xe=function(u){return(0,Te.jsx)("svg",Ie(Ie({},u),{},{children:(0,Te.jsx)("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"})}))};xe.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};xe.displayName="delete";Q=he.default=xe;var Oe={exports:{}},Ee={exports:{}};(function(){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u={rotl:function(i,d){return i<<d|i>>>32-d},rotr:function(i,d){return i<<32-d|i>>>d},endian:function(i){if(i.constructor==Number)return u.rotl(i,8)&16711935|u.rotl(i,24)&4278255360;for(var d=0;d<i.length;d++)i[d]=u.endian(i[d]);return i},randomBytes:function(i){for(var d=[];i>0;i--)d.push(Math.floor(Math.random()*256));return d},bytesToWords:function(i){for(var d=[],m=0,c=0;m<i.length;m++,c+=8)d[c>>>5]|=i[m]<<24-c%32;return d},wordsToBytes:function(i){for(var d=[],m=0;m<i.length*32;m+=8)d.push(i[m>>>5]>>>24-m%32&255);return d},bytesToHex:function(i){for(var d=[],m=0;m<i.length;m++)d.push((i[m]>>>4).toString(16)),d.push((i[m]&15).toString(16));return d.join("")},hexToBytes:function(i){for(var d=[],m=0;m<i.length;m+=2)d.push(parseInt(i.substr(m,2),16));return d},bytesToBase64:function(i){for(var d=[],m=0;m<i.length;m+=3)for(var c=i[m]<<16|i[m+1]<<8|i[m+2],h=0;h<4;h++)m*8+h*6<=i.length*8?d.push(o.charAt(c>>>6*(3-h)&63)):d.push("=");return d.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var d=[],m=0,c=0;m<i.length;c=++m%4)c!=0&&d.push((o.indexOf(i.charAt(m-1))&Math.pow(2,-2*c+8)-1)<<c*2|o.indexOf(i.charAt(m))>>>6-c*2);return d}};Ee.exports=u})();var gt=Ee.exports,le={utf8:{stringToBytes:function(o){return le.bin.stringToBytes(unescape(encodeURIComponent(o)))},bytesToString:function(o){return decodeURIComponent(escape(le.bin.bytesToString(o)))}},bin:{stringToBytes:function(o){for(var u=[],i=0;i<o.length;i++)u.push(o.charCodeAt(i)&255);return u},bytesToString:function(o){for(var u=[],i=0;i<o.length;i++)u.push(String.fromCharCode(o[i]));return u.join("")}}},Fe=le;/*!
1
+ import{r as b,g as qe}from"./vendor-react-D-afvo_7.js";import{j as e,T as O,M as R,bI as ke,bY as Le,bZ as Z,bK as Ne,bN as Ae,a2 as E,br as Ge,ad as Ve,E as w,aa as $,aN as Ke,bL as Ue,I as z,a3 as y,a1 as Ze,al as _e,K as Ye,a4 as ee,t as Je}from"./vendor-mui-core-BWT1QT-d.js";import{d as ce}from"./Add-DkUPsN8z.js";import{e as q,a8 as G,a3 as N,j as A,x as Qe,a0 as Xe,b as de,aw as ue,n as et,ad as tt,a2 as Be,bn as X,bo as be,ax as st}from"./vendor-arcblock-Bx50wV2r.js";import{d as te}from"./EditIcon-lehrw0S5.js";import{d as rt}from"./LockIcon-D4mzr6Ds.js";import{L as pe,S as me,d as nt}from"./list-header-Doz19uCr.js";import{L as V,an as Se,H as at}from"./vendor-utils-CzbloUV0.js";import{z as B,O as K,au as Re,C as ot,ab as it,f as lt,h as ct,b as J,av as dt}from"./index-DAgCHyVJ.js";import{u as U}from"./dashboard-B9pjvkNz.js";import{w as H,P as we}from"./permission-BuqPdCdk.js";import{C as fe}from"./confirm-D2Cq0BwQ.js";import{f as Y}from"./format-error-C0Ke3VXF.js";import{C as ut}from"./Google-CQvb6wJw.js";import{W as ze}from"./did-address-BTUUYWtX.js";import{_ as pt}from"./useSetState-Crt4S51m.js";import"./vendor-hooks-6khEvbqa.js";import"./useLocalStorage-B1EHcXLK.js";import"./PlayArrow-BqXSiw_w.js";import"./get-safe-url-DRF8Bvcq.js";import"./index-B67qUeIU.js";import"./session-CXzOHPQH.js";import"./useAsyncRetry-DCwz7CH3.js";import"./useAsync-DIcJhKIm.js";import"./InfoOutlined-VknYPDw1.js";import"./cloneDeep-DvDcCvik.js";var he={};Object.defineProperty(he,"__esModule",{value:!0});var Q=he.default=void 0;mt(b);var Te=e;function mt(o){return o&&o.__esModule?o:{default:o}}function Pe(o,u){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(o);u&&(d=d.filter(function(m){return Object.getOwnPropertyDescriptor(o,m).enumerable})),i.push.apply(i,d)}return i}function Ie(o){for(var u=1;u<arguments.length;u++){var i=arguments[u]!=null?arguments[u]:{};u%2?Pe(Object(i),!0).forEach(function(d){ft(o,d,i[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach(function(d){Object.defineProperty(o,d,Object.getOwnPropertyDescriptor(i,d))})}return o}function ft(o,u,i){return(u=ht(u))in o?Object.defineProperty(o,u,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[u]=i,o}function ht(o){var u=xt(o,"string");return typeof u=="symbol"?u:u+""}function xt(o,u){if(typeof o!="object"||!o)return o;var i=o[Symbol.toPrimitive];if(i!==void 0){var d=i.call(o,u||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(o)}var xe=function(u){return(0,Te.jsx)("svg",Ie(Ie({},u),{},{children:(0,Te.jsx)("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"})}))};xe.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};xe.displayName="delete";Q=he.default=xe;var Oe={exports:{}},Ee={exports:{}};(function(){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u={rotl:function(i,d){return i<<d|i>>>32-d},rotr:function(i,d){return i<<32-d|i>>>d},endian:function(i){if(i.constructor==Number)return u.rotl(i,8)&16711935|u.rotl(i,24)&4278255360;for(var d=0;d<i.length;d++)i[d]=u.endian(i[d]);return i},randomBytes:function(i){for(var d=[];i>0;i--)d.push(Math.floor(Math.random()*256));return d},bytesToWords:function(i){for(var d=[],m=0,c=0;m<i.length;m++,c+=8)d[c>>>5]|=i[m]<<24-c%32;return d},wordsToBytes:function(i){for(var d=[],m=0;m<i.length*32;m+=8)d.push(i[m>>>5]>>>24-m%32&255);return d},bytesToHex:function(i){for(var d=[],m=0;m<i.length;m++)d.push((i[m]>>>4).toString(16)),d.push((i[m]&15).toString(16));return d.join("")},hexToBytes:function(i){for(var d=[],m=0;m<i.length;m+=2)d.push(parseInt(i.substr(m,2),16));return d},bytesToBase64:function(i){for(var d=[],m=0;m<i.length;m+=3)for(var c=i[m]<<16|i[m+1]<<8|i[m+2],h=0;h<4;h++)m*8+h*6<=i.length*8?d.push(o.charAt(c>>>6*(3-h)&63)):d.push("=");return d.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var d=[],m=0,c=0;m<i.length;c=++m%4)c!=0&&d.push((o.indexOf(i.charAt(m-1))&Math.pow(2,-2*c+8)-1)<<c*2|o.indexOf(i.charAt(m))>>>6-c*2);return d}};Ee.exports=u})();var gt=Ee.exports,le={utf8:{stringToBytes:function(o){return le.bin.stringToBytes(unescape(encodeURIComponent(o)))},bytesToString:function(o){return decodeURIComponent(escape(le.bin.bytesToString(o)))}},bin:{stringToBytes:function(o){for(var u=[],i=0;i<o.length;i++)u.push(o.charCodeAt(i)&255);return u},bytesToString:function(o){for(var u=[],i=0;i<o.length;i++)u.push(String.fromCharCode(o[i]));return u.join("")}}},Fe=le;/*!
2
2
  * Determine if an object is a Buffer
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lottie-react.esm-CHpXrEmm.js","assets/vendor-react-D-afvo_7.js"])))=>i.map(i=>d[i]);
2
- import{j as a,a3 as m,bO as y,T as V,M as R,bx as L,aN as _,by as U,b$ as j,x as v,aa as D,as as w,d8 as J,d9 as W,da as q,I as H,db as X,e as K,bR as Y}from"./vendor-mui-core-BWT1QT-d.js";import{r as u}from"./vendor-react-D-afvo_7.js";import{B as Q,a as M,f as Z,j as a0,b as i0}from"./vendor-hooks-6khEvbqa.js";import{c0 as r0,aV as x0}from"./vendor-arcblock-Cn3IZfUJ.js";import{_ as t0}from"./index-DvZ2VDrh.js";import{aA as k0}from"./vendor-utils-CzbloUV0.js";import{getAIKitComponent as s0}from"./index-BSEUYLtR.js";import"./index-ISNTpwcS.js";import"./index-DoZ2YM4T.js";const O=u.createContext({}),I=()=>u.useContext(O);function m0({children:i,restrictions:n,i18n:s,theme:r}){const[e,h]=Q({loading:!1}),l=x=>h(f=>({...f,loading:x})),c=u.useMemo(()=>({...e,onLoading:l,restrictions:n,i18n:s}),[e]);return a.jsx(r0,{theme:r,children:a.jsx(O.Provider,{value:c,children:i})})}const e0=["1024x1024","1024x1792","1792x1024"],o0=["256x256","512x512","1024x1024"],n0=[{label:"DALL·E 3",value:"dall-e-3"},{label:"DALL·E 2",value:"dall-e-2"}];function l0({onSubmit:i}){const{loading:n,i18n:s}=I(),r=M({model:"dall-e-3",prompt:"",size:"1024x1024",number:1}),e=()=>{const x=JSON.parse(JSON.stringify(r));Object.values(r).every(G=>!!G)&&i(x)},{run:h}=Z(e,{wait:500}),l={width:"100%",pl:"12px",pr:"16px"},c=r.model==="dall-e-2"?o0:e0;return a.jsxs(p0,{onSubmit:x=>x.preventDefault(),children:[a.jsx(m,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",m:2,mb:0},children:a.jsxs(y,{container:!0,gap:2.5,children:[a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:s("aiImagePrompt")}),a.jsx(R,{sx:{width:1,mt:1},size:"small",type:"text",required:!0,placeholder:s("aiImagePromptTip"),multiline:!0,minRows:5,maxRows:6,value:r.prompt??"",onChange:x=>{x.stopPropagation(),r.prompt=x.target.value},inputProps:{maxLength:1e3}})]}),a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageModel")}`}),a.jsx(L,{row:!0,sx:{".MuiFormControlLabel-label":{fontSize:"12px"}},value:r.model,onChange:x=>{r.number=1,r.size="1024x1024",r.model=x.target.value},children:n0.map(x=>a.jsx(_,{value:x.value,control:a.jsx(U,{size:"small"}),label:x.label},x.label))})]}),a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageSize")}: ${r.size}`}),a.jsx(y,{container:!0,sx:{gap:2.5,pt:1},children:a.jsx(m,{flex:1,children:a.jsx(m,{...l,children:a.jsx(j,{size:"small",min:0,max:c.length-1,step:1,value:c.findIndex(x=>x==r.size),onChange:(x,f)=>{r.size=c[f]}})})})})]}),r.model==="dall-e-2"&&a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageNumber")}: ${r.number}`}),a.jsx(m,{...l,children:a.jsx(j,{size:"small",defaultValue:1,valueLabelDisplay:"auto",step:1,min:1,max:10,value:r.number,onChange:(x,f)=>{x.stopPropagation(),r.number=Number(f)}})})]})]})}),a.jsx(v,{sx:{m:2,transition:"all 0.3s"},className:"submit-ai",variant:"contained",onClick:h,disabled:n,children:s(n?"aiImageGenerating":"aiImageGenerate")},n?"loading-submit":"submit")]})}const p0=D(m)`
2
+ import{j as a,a3 as m,bO as y,T as V,M as R,bx as L,aN as _,by as U,b$ as j,x as v,aa as D,as as w,d8 as J,d9 as W,da as q,I as H,db as X,e as K,bR as Y}from"./vendor-mui-core-BWT1QT-d.js";import{r as u}from"./vendor-react-D-afvo_7.js";import{B as Q,a as M,f as Z,j as a0,b as i0}from"./vendor-hooks-6khEvbqa.js";import{c0 as r0,aW as x0}from"./vendor-arcblock-Bx50wV2r.js";import{_ as t0}from"./index-DAgCHyVJ.js";import{aA as k0}from"./vendor-utils-CzbloUV0.js";import{getAIKitComponent as s0}from"./index-D-WfBLbj.js";import"./index-ISNTpwcS.js";import"./index-DoZ2YM4T.js";const O=u.createContext({}),I=()=>u.useContext(O);function m0({children:i,restrictions:n,i18n:s,theme:r}){const[e,h]=Q({loading:!1}),l=x=>h(f=>({...f,loading:x})),c=u.useMemo(()=>({...e,onLoading:l,restrictions:n,i18n:s}),[e]);return a.jsx(r0,{theme:r,children:a.jsx(O.Provider,{value:c,children:i})})}const e0=["1024x1024","1024x1792","1792x1024"],o0=["256x256","512x512","1024x1024"],n0=[{label:"DALL·E 3",value:"dall-e-3"},{label:"DALL·E 2",value:"dall-e-2"}];function l0({onSubmit:i}){const{loading:n,i18n:s}=I(),r=M({model:"dall-e-3",prompt:"",size:"1024x1024",number:1}),e=()=>{const x=JSON.parse(JSON.stringify(r));Object.values(r).every(G=>!!G)&&i(x)},{run:h}=Z(e,{wait:500}),l={width:"100%",pl:"12px",pr:"16px"},c=r.model==="dall-e-2"?o0:e0;return a.jsxs(p0,{onSubmit:x=>x.preventDefault(),children:[a.jsx(m,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",m:2,mb:0},children:a.jsxs(y,{container:!0,gap:2.5,children:[a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:s("aiImagePrompt")}),a.jsx(R,{sx:{width:1,mt:1},size:"small",type:"text",required:!0,placeholder:s("aiImagePromptTip"),multiline:!0,minRows:5,maxRows:6,value:r.prompt??"",onChange:x=>{x.stopPropagation(),r.prompt=x.target.value},inputProps:{maxLength:1e3}})]}),a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageModel")}`}),a.jsx(L,{row:!0,sx:{".MuiFormControlLabel-label":{fontSize:"12px"}},value:r.model,onChange:x=>{r.number=1,r.size="1024x1024",r.model=x.target.value},children:n0.map(x=>a.jsx(_,{value:x.value,control:a.jsx(U,{size:"small"}),label:x.label},x.label))})]}),a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageSize")}: ${r.size}`}),a.jsx(y,{container:!0,sx:{gap:2.5,pt:1},children:a.jsx(m,{flex:1,children:a.jsx(m,{...l,children:a.jsx(j,{size:"small",min:0,max:c.length-1,step:1,value:c.findIndex(x=>x==r.size),onChange:(x,f)=>{r.size=c[f]}})})})})]}),r.model==="dall-e-2"&&a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageNumber")}: ${r.number}`}),a.jsx(m,{...l,children:a.jsx(j,{size:"small",defaultValue:1,valueLabelDisplay:"auto",step:1,min:1,max:10,value:r.number,onChange:(x,f)=>{x.stopPropagation(),r.number=Number(f)}})})]})]})}),a.jsx(v,{sx:{m:2,transition:"all 0.3s"},className:"submit-ai",variant:"contained",onClick:h,disabled:n,children:s(n?"aiImageGenerating":"aiImageGenerate")},n?"loading-submit":"submit")]})}const p0=D(m)`
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  height: 100%;
@@ -1,4 +1,4 @@
1
- import{j as r,T as i}from"./vendor-mui-core-BWT1QT-d.js";import{T as p,ae as x}from"./vendor-utils-CzbloUV0.js";import{aH as c}from"./vendor-arcblock-Cn3IZfUJ.js";function h({name:t,nameFormatter:a=o=>typeof o=="string"?o.split(" ").map(f=>p(x(f))).join(" "):o,layout:n="horizontal",children:e,valueComponent:l="div",nameWidth:s=90,...m}){return r.jsxs(u,{layout:n,width:s,...m,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:a(t)}),e&&r.jsx(i,{color:"textPrimary",component:l,className:"info-row__value",children:e})]})}const u=c("div")`
1
+ import{j as r,T as i}from"./vendor-mui-core-BWT1QT-d.js";import{T as p,ae as x}from"./vendor-utils-CzbloUV0.js";import{aH as c}from"./vendor-arcblock-Bx50wV2r.js";function h({name:t,nameFormatter:a=o=>typeof o=="string"?o.split(" ").map(f=>p(x(f))).join(" "):o,layout:n="horizontal",children:e,valueComponent:l="div",nameWidth:s=90,...m}){return r.jsxs(u,{layout:n,width:s,...m,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:a(t)}),e&&r.jsx(i,{color:"textPrimary",component:l,className:"info-row__value",children:e})]})}const u=c("div")`
2
2
  display: flex;
3
3
  flex-direction: ${t=>t.layout==="vertical"?"column":"row"};
4
4
  justify-content: flex-start;
@@ -1,4 +1,4 @@
1
- import{r as d}from"./vendor-react-D-afvo_7.js";import{E as l,j as n,a3 as g,aj as A,M as G,I as L,a2 as H,bS as U,aa as Y}from"./vendor-mui-core-BWT1QT-d.js";import{a2 as J,x as Q,ag as Z}from"./vendor-arcblock-Cn3IZfUJ.js";import{d as v}from"./Done-Bh7hkuyF.js";import{C as ee}from"./Google-Dc5CpY7r.js";import{ab as te,f as ne}from"./index-DvZ2VDrh.js";import{R as re,F as oe,L as se}from"./logo-uploader-B7U1Vq_i.js";const S={description:l.string,editing:l.bool,onChange:l.func,required:l.bool,value:l.any,componentProps:l.object,render:l.func,renderFormItem:l.func};function N({editing:r,value:o,onChange:a}){const[c,u]=d.useState(!1),m=d.useRef(),p=d.useRef(o);d.useEffect(()=>{let s=null;return r&&(s=setTimeout(()=>{u(!0)},50)),()=>{clearTimeout(s)}},[r]);const k=s=>{p.current=s,a(s)},b=()=>{u(!1),a(p.current)},I=n.jsx(g,{className:"form-item-input slot",px:1,children:n.jsxs(g,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&n.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),f=n.jsxs(g,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:b,children:[n.jsx(g,{display:"flex",alignItems:"center",onClick:()=>u(!0),children:n.jsx("div",{ref:m,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),n.jsx(A,{open:c,anchorEl:m.current,onClose:()=>u(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:n.jsx(ee,{color:o,onChange:s=>k(s.hex)})})]});return r?f:I}N.propTypes=S;function _({editing:r,description:o,value:a,onChange:c,componentProps:u,...m}){const{placeholder:p}=u,k=d.useRef(a),{t:b}=d.useContext(J),I=s=>{s.key==="Enter"&&c(k.current,"confirm")},f=s=>{k.current=s,c(s)};return r?n.jsx(G,{style:{flex:1},fullWidth:!0,value:a,onChange:s=>{s.persist(),f(s.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||p,onKeyDown:I,...m}):n.jsx(g,{px:1,className:"form-item-input slot",children:a||n.jsx("span",{className:"placeholder",children:b("common.requiredInputPlaceholder",{name:o||p})})})}_.propTypes=S;_.defaultProps={componentProps:{}};function T({editing:r,value:o,onChange:a,componentProps:c,...u}){const{blocklet:m}=c,p=o==="auto"?Q.getPassportColorFromDid(m.appDid):o;return n.jsxs(g,{display:"flex",alignItems:"center",children:[n.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:te({title:"Owner",issuer:ne.getDisplayName(m),issuerDid:m.appDid,ownerName:"Your Name",ownerDid:m.appDid,preferredColor:o||"auto"})}}),n.jsx(N,{...u,editing:r,value:r?p:o,onChange:a,componentProps:c})]})}T.propTypes={...S,componentProps:l.shape({blocklet:l.object.isRequired}).isRequired};T.defaultProps={};const ie=U`
1
+ import{r as d}from"./vendor-react-D-afvo_7.js";import{E as l,j as n,a3 as g,aj as A,M as G,I as L,a2 as H,bS as U,aa as Y}from"./vendor-mui-core-BWT1QT-d.js";import{a2 as J,x as Q,ag as Z}from"./vendor-arcblock-Bx50wV2r.js";import{d as v}from"./Done-D21xt3JW.js";import{C as ee}from"./Google-CQvb6wJw.js";import{ab as te,f as ne}from"./index-DAgCHyVJ.js";import{R as re,F as oe,L as se}from"./logo-uploader-DOA0AXyl.js";const S={description:l.string,editing:l.bool,onChange:l.func,required:l.bool,value:l.any,componentProps:l.object,render:l.func,renderFormItem:l.func};function N({editing:r,value:o,onChange:a}){const[c,u]=d.useState(!1),m=d.useRef(),p=d.useRef(o);d.useEffect(()=>{let s=null;return r&&(s=setTimeout(()=>{u(!0)},50)),()=>{clearTimeout(s)}},[r]);const k=s=>{p.current=s,a(s)},b=()=>{u(!1),a(p.current)},I=n.jsx(g,{className:"form-item-input slot",px:1,children:n.jsxs(g,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&n.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),f=n.jsxs(g,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:b,children:[n.jsx(g,{display:"flex",alignItems:"center",onClick:()=>u(!0),children:n.jsx("div",{ref:m,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),n.jsx(A,{open:c,anchorEl:m.current,onClose:()=>u(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:n.jsx(ee,{color:o,onChange:s=>k(s.hex)})})]});return r?f:I}N.propTypes=S;function _({editing:r,description:o,value:a,onChange:c,componentProps:u,...m}){const{placeholder:p}=u,k=d.useRef(a),{t:b}=d.useContext(J),I=s=>{s.key==="Enter"&&c(k.current,"confirm")},f=s=>{k.current=s,c(s)};return r?n.jsx(G,{style:{flex:1},fullWidth:!0,value:a,onChange:s=>{s.persist(),f(s.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||p,onKeyDown:I,...m}):n.jsx(g,{px:1,className:"form-item-input slot",children:a||n.jsx("span",{className:"placeholder",children:b("common.requiredInputPlaceholder",{name:o||p})})})}_.propTypes=S;_.defaultProps={componentProps:{}};function T({editing:r,value:o,onChange:a,componentProps:c,...u}){const{blocklet:m}=c,p=o==="auto"?Q.getPassportColorFromDid(m.appDid):o;return n.jsxs(g,{display:"flex",alignItems:"center",children:[n.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:te({title:"Owner",issuer:ne.getDisplayName(m),issuerDid:m.appDid,ownerName:"Your Name",ownerDid:m.appDid,preferredColor:o||"auto"})}}),n.jsx(N,{...u,editing:r,value:r?p:o,onChange:a,componentProps:c})]})}T.propTypes={...S,componentProps:l.shape({blocklet:l.object.isRequired}).isRequired};T.defaultProps={};const ie=U`
2
2
  0%, 100% {
3
3
  transform: scale(1) translateX(0);
4
4
  }
@@ -1,4 +1,4 @@
1
- import{g as w}from"./vendor-react-D-afvo_7.js";import{af as b}from"./index-DvZ2VDrh.js";var x=(n,t=1,e)=>{if(e={indent:" ",includeEmptyLines:!1,...e},typeof n!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof n}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof e.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof e.indent}\``);if(t===0)return n;const r=e.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return n.replace(r,e.indent.repeat(t))};const m=b,E=/\s+at.*(?:\(|\s)(.*)\)?/,$=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,j=typeof m.homedir>"u"?"":m.homedir();var v=(n,t)=>(t=Object.assign({pretty:!1},t),n.replace(/\\/g,"/").split(`
1
+ import{g as w}from"./vendor-react-D-afvo_7.js";import{af as b}from"./index-DAgCHyVJ.js";var x=(n,t=1,e)=>{if(e={indent:" ",includeEmptyLines:!1,...e},typeof n!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof n}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof e.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof e.indent}\``);if(t===0)return n;const r=e.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return n.replace(r,e.indent.repeat(t))};const m=b,E=/\s+at.*(?:\(|\s)(.*)\)?/,$=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,j=typeof m.homedir>"u"?"":m.homedir();var v=(n,t)=>(t=Object.assign({pretty:!1},t),n.replace(/\\/g,"/").split(`
2
2
  `).filter(e=>{const r=e.match(E);if(r===null||!r[1])return!0;const a=r[1];return a.includes(".app/Contents/Resources/electron.asar")||a.includes(".app/Contents/Resources/default_app.asar")?!1:!$.test(a)}).filter(e=>e.trim()!=="").map(e=>t.pretty?e.replace(E,(r,a)=>r.replace(a,a.replace(j,"~"))):e).join(`
3
3
  `));const A=x,S=v,I=n=>n.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"");let k=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);t=[...t].map(r=>r instanceof Error?r:r!==null&&typeof r=="object"?Object.assign(new Error(r.message),r):new Error(r));let e=t.map(r=>typeof r.stack=="string"?I(S(r.stack)):String(r)).join(`
4
4
  `);e=`
@@ -1,4 +1,4 @@
1
- import{r as H,t as ei,g as ti,e as Ur,a as ri}from"./vendor-react-D-afvo_7.js";import{a1 as hn,j as i,a3 as se,bH as Jt,bI as er,aP as tr,al as jt,T as Le,M as Et,a2 as nt,br as sr,ad as rt,E as B,aa as Te,a4 as ut,v as ni,x as gn,aM as ii,bm as oi,bn as ai,I as si,aK as ci,aN as li,bL as ui}from"./vendor-mui-core-BWT1QT-d.js";import{p as Ie,B as rr,b as nr,T as fi,am as di,n as Lr,x as pi,y as mi}from"./vendor-utils-CzbloUV0.js";import{c as hi}from"./index-DoZ2YM4T.js";import{a0 as yn,b4 as ft,b5 as gi,b6 as yi,b7 as bn,b8 as bi,b9 as vi,ba as xi,bb as vn,bc as wi,bd as cr,be as ji,bf as Ei,bg as Si,bh as Pi,o as lr,b3 as xn,m as Ci,n as Oi,e as _e,D as wn,E as Ai,a8 as Ge,a3 as je,av as Ii,_ as Ri,ag as Ni,a2 as dt,j as Ke,a1 as Ti,bi as jn,b as Ye,aw as En,bj as _i,aE as Di,ao as Ui,aI as Li,aW as Sn,ab as qi,aX as Pn,bk as Cn,bl as ki,bm as Bi}from"./vendor-arcblock-Cn3IZfUJ.js";import{d as St}from"./Add-CehHkXtu.js";import{d as Ki}from"./ViewList-vuv6XoB6.js";import{L as Fi,S as $i,d as On}from"./list-header-MogH2bs1.js";import{a0 as Mi,f as zi,z as Ce,ar as ur,m as Qe,a1 as Vi,O as Xe,as as Wi,h as Ze,C as An,at as In,b as Hi}from"./index-DvZ2VDrh.js";import{y as Gi,u as fr,a as Rn,l as Yi}from"./vendor-hooks-6khEvbqa.js";import{u as De,d as qr,W as Nn}from"./dashboard-Dr8B5iTX.js";import{W as Pt}from"./did-address-B8WelYg7.js";import{P as Be}from"./permission-Yia679mu.js";import{C as Rt}from"./click-to-copy-SiMa2cN1.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Zi}from"./useAsync-DIcJhKIm.js";import{I as Pe}from"./index-19jBKgbd.js";import{d as Qi}from"./DeleteOutline--b0uhBXu.js";import{C as pt}from"./confirm-0Ay4zz5F.js";import{u as mt}from"./session-C4pA5XYh.js";import{i as Tn,a as Ct,p as _n}from"./util-AoFN7OG5.js";import{b as Xi}from"./sdk-CLSP2XpB.js";import{p as Ji}from"./index-BCiJnwmE.js";import{A as eo}from"./actions-Bejw-e5O.js";import{S as to}from"./shorten-label-CRTt8ftG.js";import"./useLocalStorage-Cd4aCng4.js";import"./PlayArrow-D3Xnrt2P.js";import"./get-safe-url-Cww9J3VK.js";import"./index-C5E0f4MM.js";import"./useAsyncRetry-DCwz7CH3.js";import"./InfoOutlined-CaT2OjoW.js";import"./useSetState-Crt4S51m.js";import"./base32-Dxx2uO-0.js";import"./MoreHoriz-BdiHG-9g.js";var dr={},ro=hn;Object.defineProperty(dr,"__esModule",{value:!0});var Dn=dr.default=void 0,no=ro(yn()),io=i;Dn=dr.default=(0,no.default)((0,io.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"}),"Loop");var pr={};Object.defineProperty(pr,"__esModule",{value:!0});var Un=pr.default=void 0;oo(H);var et=i;function oo(e){return e&&e.__esModule?e:{default:e}}function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Br(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(r),!0).forEach(function(n){ao(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ao(e,t,r){return(t=so(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function so(e){var t=co(e,"string");return typeof t=="symbol"?t:t+""}function co(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mr=function(t){return(0,et.jsxs)("svg",Br(Br({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]}))};mr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};mr.displayName="person";Un=pr.default=mr;var xt={},lo=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Ln="%[a-f0-9]{2}",Kr=new RegExp("("+Ln+")|([^%]+?)","gi"),Fr=new RegExp("("+Ln+")+","gi");function ir(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ir(r),ir(n))}function uo(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Kr)||[],r=1;r<t.length;r++)e=ir(t,r).join(""),t=e.match(Kr)||[];return e}}function fo(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Fr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=uo(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Fr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var h=s[l];e=e.replace(new RegExp(h,"g"),t[h])}return e}var po=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return fo(e)}},mo=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},ho=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],C=e[h];(s?t.indexOf(h)!==-1:t(h,C,e))&&(r[h]=C)}return r};(function(e){const t=lo,r=po,n=mo,s=ho,l=a=>a==null;function h(a){switch(a.arrayFormat){case"index":return o=>(u,f)=>{const g=u.length;return f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[",g,"]"].join("")]:[...u,[x(o,a),"[",x(g,a),"]=",x(f,a)].join("")]};case"bracket":return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[]"].join("")]:[...u,[x(o,a),"[]=",x(f,a)].join("")];case"comma":case"separator":return o=>(u,f)=>f==null||f.length===0?u:u.length===0?[[x(o,a),"=",x(f,a)].join("")]:[[u,x(f,a)].join(a.arrayFormatSeparator)];default:return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,x(o,a)]:[...u,[x(o,a),"=",x(f,a)].join("")]}}function C(a){let o;switch(a.arrayFormat){case"index":return(u,f,g)=>{if(o=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!o){g[u]=f;return}g[u]===void 0&&(g[u]={}),g[u][o[1]]=f};case"bracket":return(u,f,g)=>{if(o=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!o){g[u]=f;return}if(g[u]===void 0){g[u]=[f];return}g[u]=[].concat(g[u],f)};case"comma":case"separator":return(u,f,g)=>{const T=typeof f=="string"&&f.includes(a.arrayFormatSeparator),S=typeof f=="string"&&!T&&b(f,a).includes(a.arrayFormatSeparator);f=S?b(f,a):f;const X=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=X};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function j(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function x(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function b(a,o){return o.decode?r(a):a}function _(a){return Array.isArray(a)?a.sort():typeof a=="object"?_(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function E(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function P(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=E(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function k(a,o){return o.parseNumbers&&!Number.isNaN(Number(a))&&typeof a=="string"&&a.trim()!==""?a=Number(a):o.parseBooleans&&a!==null&&(a.toLowerCase()==="true"||a.toLowerCase()==="false")&&(a=a.toLowerCase()==="true"),a}function w(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),j(o.arrayFormatSeparator);const u=C(o),f=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return f;for(const g of a.split("&")){if(g==="")continue;let[T,S]=n(o.decode?g.replace(/\+/g," "):g,"=");S=S===void 0?null:["comma","separator"].includes(o.arrayFormat)?S:b(S,o),u(b(T,o),S,f)}for(const g of Object.keys(f)){const T=f[g];if(typeof T=="object"&&T!==null)for(const S of Object.keys(T))T[S]=k(T[S],o);else f[g]=k(T,o)}return o.sort===!1?f:(o.sort===!0?Object.keys(f).sort():Object.keys(f).sort(o.sort)).reduce((g,T)=>{const S=f[T];return S&&typeof S=="object"&&!Array.isArray(S)?g[T]=_(S):g[T]=S,g},Object.create(null))}e.extract=d,e.parse=w,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),j(o.arrayFormatSeparator);const u=S=>o.skipNull&&l(a[S])||o.skipEmptyString&&a[S]==="",f=h(o),g={};for(const S of Object.keys(a))u(S)||(g[S]=a[S]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(S=>{const X=a[S];return X===void 0?"":X===null?x(S,o):Array.isArray(X)?X.reduce(f(S),[]).join("&"):x(S,o)+"="+x(X,o)}).filter(S=>S.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[u,f]=n(a,"#");return Object.assign({url:u.split("?")[0]||"",query:w(d(a),o)},o&&o.parseFragmentIdentifier&&f?{fragmentIdentifier:b(f,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const u=E(a.url).split("?")[0]||"",f=e.extract(a.url),g=e.parse(f,{sort:!1}),T=Object.assign(g,a.query);let S=e.stringify(T,o);S&&(S=`?${S}`);let X=P(a.url);return a.fragmentIdentifier&&(X=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${X}`},e.pick=(a,o,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:f,query:g,fragmentIdentifier:T}=e.parseUrl(a,u);return e.stringifyUrl({url:f,query:s(g,o),fragmentIdentifier:T},u)},e.exclude=(a,o,u)=>{const f=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,f,u)}})(xt);const st=ei,go={parseNumbers:!1,parseBooleans:!1},yo={skipNull:!1,skipEmptyString:!1},bo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},C=Object.assign(Object.assign({},go),l),j=Object.assign(Object.assign({},yo),h),x=st.useLocation(),b=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),_=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),E=Gi(),P=H.useRef(typeof e=="function"?e():e||{}),d=H.useMemo(()=>xt.parse(x.search,C),[x.search]),k=H.useMemo(()=>Object.assign(Object.assign({},P.current),d),[d]);return[k,fr(a=>{const o=typeof a=="function"?a(k):a;E(),b&&b[s]({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},x.state),_&&_({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},{replace:s==="replace",state:x.state})})]},vo=bo;var Lt={exports:{}},qt={},$r;function qn(){if($r)return qt;$r=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(o)}function t(o,u,f){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}function n(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&s(o,u)}function s(o,u){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,u)}function l(o){var u=j();return function(){var g=x(o),T;if(u){var S=x(this).constructor;T=Reflect.construct(g,arguments,S)}else T=g.apply(this,arguments);return h(this,T)}}function h(o,u){if(u&&(e(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(o)}function C(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function x(o){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},x(o)}var b={},_,E;function P(o,u,f){f||(f=Error);function g(S,X,Z){return typeof u=="string"?u:u(S,X,Z)}var T=function(S){n(Z,S);var X=l(Z);function Z(G,Y,F){var V;return r(this,Z),V=X.call(this,g(G,Y,F)),V.code=o,V}return t(Z)}(f);b[o]=T}function d(o,u){if(Array.isArray(o)){var f=o.length;return o=o.map(function(g){return String(g)}),f>2?"one of ".concat(u," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function k(o,u,f){return o.substr(0,u.length)===u}function w(o,u,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-u.length,f)===u}function a(o,u,f){return typeof f!="number"&&(f=0),f+u.length>o.length?!1:o.indexOf(u,f)!==-1}return P("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),P("ERR_INVALID_ARG_TYPE",function(o,u,f){_===void 0&&(_=or()),_(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&k(u,"not ")?(g="must not be",u=u.replace(/^not /,"")):g="must be";var T;if(w(o," argument"))T="The ".concat(o," ").concat(g," ").concat(d(u,"type"));else{var S=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(S," ").concat(g," ").concat(d(u,"type"))}return T+=". Received type ".concat(e(f)),T},TypeError),P("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";E===void 0&&(E=ft);var g=E.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),P("ERR_INVALID_RETURN_VALUE",function(o,u,f){var g;return f&&f.constructor&&f.constructor.name?g="instance of ".concat(f.constructor.name):g="type ".concat(e(f)),"Expected ".concat(o,' to be returned from the "').concat(u,'"')+" function but got ".concat(g,".")},TypeError),P("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];_===void 0&&(_=or()),_(u.length>0,"At least one arg needs to be specified");var g="The ",T=u.length;switch(u=u.map(function(S){return'"'.concat(S,'"')}),T){case 1:g+="".concat(u[0]," argument");break;case 2:g+="".concat(u[0]," and ").concat(u[1]," arguments");break;default:g+=u.slice(0,T-1).join(", "),g+=", and ".concat(u[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),qt.codes=b,qt}var kt,Mr;function xo(){if(Mr)return kt;Mr=1;function e(O,A){var K=Object.keys(O);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(O);A&&(R=R.filter(function(W){return Object.getOwnPropertyDescriptor(O,W).enumerable})),K.push.apply(K,R)}return K}function t(O){for(var A=1;A<arguments.length;A++){var K=arguments[A]!=null?arguments[A]:{};A%2?e(Object(K),!0).forEach(function(R){r(O,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(O,R,Object.getOwnPropertyDescriptor(K,R))})}return O}function r(O,A,K){return A=h(A),A in O?Object.defineProperty(O,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):O[A]=K,O}function n(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function s(O,A){for(var K=0;K<A.length;K++){var R=A[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,h(R.key),R)}}function l(O,A,K){return A&&s(O.prototype,A),Object.defineProperty(O,"prototype",{writable:!1}),O}function h(O){var A=C(O,"string");return o(A)==="symbol"?A:String(A)}function C(O,A){if(o(O)!=="object"||O===null)return O;var K=O[Symbol.toPrimitive];if(K!==void 0){var R=K.call(O,A||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(O)}function j(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),A&&w(O,A)}function x(O){var A=d();return function(){var R=a(O),W;if(A){var y=a(this).constructor;W=Reflect.construct(R,arguments,y)}else W=R.apply(this,arguments);return b(this,W)}}function b(O,A){if(A&&(o(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(O)}function _(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function E(O){var A=typeof Map=="function"?new Map:void 0;return E=function(R){if(R===null||!k(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A<"u"){if(A.has(R))return A.get(R);A.set(R,W)}function W(){return P(R,arguments,a(this).constructor)}return W.prototype=Object.create(R.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),w(W,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(W,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(W,v),N=new D;return p&&w(N,p.prototype),N},P.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function k(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function w(O,A){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,W){return R.__proto__=W,R},w(O,A)}function a(O){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(O)}function o(O){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},o(O)}var u=ft,f=u.inspect,g=qn(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(O,A,K){return(K===void 0||K>O.length)&&(K=O.length),O.substring(K-A.length,K)===A}function X(O,A){if(A=Math.floor(A),O.length==0||A==0)return"";var K=O.length*A;for(A=Math.floor(Math.log(A)/Math.log(2));A;)O+=O,A--;return O+=O.substring(0,K-O.length),O}var Z="",G="",Y="",F="",V={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},be=10;function Q(O){var A=Object.keys(O),K=Object.create(Object.getPrototypeOf(O));return A.forEach(function(R){K[R]=O[R]}),Object.defineProperty(K,"message",{value:O.message}),K}function de(O){return f(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(O,A,K){var R="",W="",y=0,p="",v=!1,D=de(O),N=D.split(`
1
+ import{r as H,t as ei,g as ti,e as Ur,a as ri}from"./vendor-react-D-afvo_7.js";import{a1 as hn,j as i,a3 as se,bH as Jt,bI as er,aP as tr,al as jt,T as Le,M as Et,a2 as nt,br as sr,ad as rt,E as B,aa as Te,a4 as ut,v as ni,x as gn,aM as ii,bm as oi,bn as ai,I as si,aK as ci,aN as li,bL as ui}from"./vendor-mui-core-BWT1QT-d.js";import{p as Ie,B as rr,b as nr,T as fi,am as di,n as Lr,x as pi,y as mi}from"./vendor-utils-CzbloUV0.js";import{c as hi}from"./index-DoZ2YM4T.js";import{a0 as yn,b5 as ft,b6 as gi,b7 as yi,b8 as bn,b9 as bi,ba as vi,bb as xi,bc as vn,bd as wi,be as cr,bf as ji,bg as Ei,bh as Si,bi as Pi,o as lr,b4 as xn,m as Ci,n as Oi,e as _e,D as wn,E as Ai,a8 as Ge,a3 as je,av as Ii,_ as Ri,ag as Ni,a2 as dt,j as Ke,a1 as Ti,bj as jn,b as Ye,aw as En,bk as _i,aE as Di,ao as Ui,aI as Li,aX as Sn,ab as qi,aY as Pn,aQ as Cn,bl as ki,bm as Bi}from"./vendor-arcblock-Bx50wV2r.js";import{d as St}from"./Add-DkUPsN8z.js";import{d as Ki}from"./ViewList-r6XukP80.js";import{L as Fi,S as $i,d as On}from"./list-header-Doz19uCr.js";import{a0 as Mi,f as zi,z as Ce,ar as ur,m as Qe,a1 as Vi,O as Xe,as as Wi,h as Ze,C as An,at as In,b as Hi}from"./index-DAgCHyVJ.js";import{y as Gi,u as fr,a as Rn,l as Yi}from"./vendor-hooks-6khEvbqa.js";import{u as De,d as qr,W as Nn}from"./dashboard-B9pjvkNz.js";import{W as Pt}from"./did-address-BTUUYWtX.js";import{P as Be}from"./permission-BuqPdCdk.js";import{C as Rt}from"./click-to-copy-BeyU2nOg.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Zi}from"./useAsync-DIcJhKIm.js";import{I as Pe}from"./index-DhpLFI07.js";import{d as Qi}from"./DeleteOutline-D4Mo1apM.js";import{C as pt}from"./confirm-D2Cq0BwQ.js";import{u as mt}from"./session-CXzOHPQH.js";import{i as Tn,a as Ct,p as _n}from"./util-BI3SHCkh.js";import{b as Xi}from"./sdk-BCCz6CLo.js";import{p as Ji}from"./index-bvxkpJj2.js";import{A as eo}from"./actions-De-aapuY.js";import{S as to}from"./shorten-label-CRTt8ftG.js";import"./useLocalStorage-B1EHcXLK.js";import"./PlayArrow-BqXSiw_w.js";import"./get-safe-url-DRF8Bvcq.js";import"./index-B67qUeIU.js";import"./useAsyncRetry-DCwz7CH3.js";import"./InfoOutlined-VknYPDw1.js";import"./useSetState-Crt4S51m.js";import"./base32-npzNEcfW.js";import"./MoreHoriz-DIJLu3Ae.js";var dr={},ro=hn;Object.defineProperty(dr,"__esModule",{value:!0});var Dn=dr.default=void 0,no=ro(yn()),io=i;Dn=dr.default=(0,no.default)((0,io.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"}),"Loop");var pr={};Object.defineProperty(pr,"__esModule",{value:!0});var Un=pr.default=void 0;oo(H);var et=i;function oo(e){return e&&e.__esModule?e:{default:e}}function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Br(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(r),!0).forEach(function(n){ao(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ao(e,t,r){return(t=so(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function so(e){var t=co(e,"string");return typeof t=="symbol"?t:t+""}function co(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mr=function(t){return(0,et.jsxs)("svg",Br(Br({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]}))};mr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};mr.displayName="person";Un=pr.default=mr;var xt={},lo=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Ln="%[a-f0-9]{2}",Kr=new RegExp("("+Ln+")|([^%]+?)","gi"),Fr=new RegExp("("+Ln+")+","gi");function ir(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ir(r),ir(n))}function uo(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Kr)||[],r=1;r<t.length;r++)e=ir(t,r).join(""),t=e.match(Kr)||[];return e}}function fo(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Fr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=uo(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Fr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var h=s[l];e=e.replace(new RegExp(h,"g"),t[h])}return e}var po=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return fo(e)}},mo=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},ho=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],C=e[h];(s?t.indexOf(h)!==-1:t(h,C,e))&&(r[h]=C)}return r};(function(e){const t=lo,r=po,n=mo,s=ho,l=a=>a==null;function h(a){switch(a.arrayFormat){case"index":return o=>(u,f)=>{const g=u.length;return f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[",g,"]"].join("")]:[...u,[x(o,a),"[",x(g,a),"]=",x(f,a)].join("")]};case"bracket":return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[]"].join("")]:[...u,[x(o,a),"[]=",x(f,a)].join("")];case"comma":case"separator":return o=>(u,f)=>f==null||f.length===0?u:u.length===0?[[x(o,a),"=",x(f,a)].join("")]:[[u,x(f,a)].join(a.arrayFormatSeparator)];default:return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,x(o,a)]:[...u,[x(o,a),"=",x(f,a)].join("")]}}function C(a){let o;switch(a.arrayFormat){case"index":return(u,f,g)=>{if(o=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!o){g[u]=f;return}g[u]===void 0&&(g[u]={}),g[u][o[1]]=f};case"bracket":return(u,f,g)=>{if(o=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!o){g[u]=f;return}if(g[u]===void 0){g[u]=[f];return}g[u]=[].concat(g[u],f)};case"comma":case"separator":return(u,f,g)=>{const T=typeof f=="string"&&f.includes(a.arrayFormatSeparator),S=typeof f=="string"&&!T&&b(f,a).includes(a.arrayFormatSeparator);f=S?b(f,a):f;const X=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=X};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function j(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function x(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function b(a,o){return o.decode?r(a):a}function _(a){return Array.isArray(a)?a.sort():typeof a=="object"?_(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function E(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function P(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=E(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function k(a,o){return o.parseNumbers&&!Number.isNaN(Number(a))&&typeof a=="string"&&a.trim()!==""?a=Number(a):o.parseBooleans&&a!==null&&(a.toLowerCase()==="true"||a.toLowerCase()==="false")&&(a=a.toLowerCase()==="true"),a}function w(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),j(o.arrayFormatSeparator);const u=C(o),f=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return f;for(const g of a.split("&")){if(g==="")continue;let[T,S]=n(o.decode?g.replace(/\+/g," "):g,"=");S=S===void 0?null:["comma","separator"].includes(o.arrayFormat)?S:b(S,o),u(b(T,o),S,f)}for(const g of Object.keys(f)){const T=f[g];if(typeof T=="object"&&T!==null)for(const S of Object.keys(T))T[S]=k(T[S],o);else f[g]=k(T,o)}return o.sort===!1?f:(o.sort===!0?Object.keys(f).sort():Object.keys(f).sort(o.sort)).reduce((g,T)=>{const S=f[T];return S&&typeof S=="object"&&!Array.isArray(S)?g[T]=_(S):g[T]=S,g},Object.create(null))}e.extract=d,e.parse=w,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),j(o.arrayFormatSeparator);const u=S=>o.skipNull&&l(a[S])||o.skipEmptyString&&a[S]==="",f=h(o),g={};for(const S of Object.keys(a))u(S)||(g[S]=a[S]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(S=>{const X=a[S];return X===void 0?"":X===null?x(S,o):Array.isArray(X)?X.reduce(f(S),[]).join("&"):x(S,o)+"="+x(X,o)}).filter(S=>S.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[u,f]=n(a,"#");return Object.assign({url:u.split("?")[0]||"",query:w(d(a),o)},o&&o.parseFragmentIdentifier&&f?{fragmentIdentifier:b(f,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const u=E(a.url).split("?")[0]||"",f=e.extract(a.url),g=e.parse(f,{sort:!1}),T=Object.assign(g,a.query);let S=e.stringify(T,o);S&&(S=`?${S}`);let X=P(a.url);return a.fragmentIdentifier&&(X=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${X}`},e.pick=(a,o,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:f,query:g,fragmentIdentifier:T}=e.parseUrl(a,u);return e.stringifyUrl({url:f,query:s(g,o),fragmentIdentifier:T},u)},e.exclude=(a,o,u)=>{const f=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,f,u)}})(xt);const st=ei,go={parseNumbers:!1,parseBooleans:!1},yo={skipNull:!1,skipEmptyString:!1},bo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},C=Object.assign(Object.assign({},go),l),j=Object.assign(Object.assign({},yo),h),x=st.useLocation(),b=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),_=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),E=Gi(),P=H.useRef(typeof e=="function"?e():e||{}),d=H.useMemo(()=>xt.parse(x.search,C),[x.search]),k=H.useMemo(()=>Object.assign(Object.assign({},P.current),d),[d]);return[k,fr(a=>{const o=typeof a=="function"?a(k):a;E(),b&&b[s]({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},x.state),_&&_({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},{replace:s==="replace",state:x.state})})]},vo=bo;var Lt={exports:{}},qt={},$r;function qn(){if($r)return qt;$r=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(o)}function t(o,u,f){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}function n(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&s(o,u)}function s(o,u){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,u)}function l(o){var u=j();return function(){var g=x(o),T;if(u){var S=x(this).constructor;T=Reflect.construct(g,arguments,S)}else T=g.apply(this,arguments);return h(this,T)}}function h(o,u){if(u&&(e(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(o)}function C(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function x(o){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},x(o)}var b={},_,E;function P(o,u,f){f||(f=Error);function g(S,X,Z){return typeof u=="string"?u:u(S,X,Z)}var T=function(S){n(Z,S);var X=l(Z);function Z(G,Y,F){var V;return r(this,Z),V=X.call(this,g(G,Y,F)),V.code=o,V}return t(Z)}(f);b[o]=T}function d(o,u){if(Array.isArray(o)){var f=o.length;return o=o.map(function(g){return String(g)}),f>2?"one of ".concat(u," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function k(o,u,f){return o.substr(0,u.length)===u}function w(o,u,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-u.length,f)===u}function a(o,u,f){return typeof f!="number"&&(f=0),f+u.length>o.length?!1:o.indexOf(u,f)!==-1}return P("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),P("ERR_INVALID_ARG_TYPE",function(o,u,f){_===void 0&&(_=or()),_(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&k(u,"not ")?(g="must not be",u=u.replace(/^not /,"")):g="must be";var T;if(w(o," argument"))T="The ".concat(o," ").concat(g," ").concat(d(u,"type"));else{var S=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(S," ").concat(g," ").concat(d(u,"type"))}return T+=". Received type ".concat(e(f)),T},TypeError),P("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";E===void 0&&(E=ft);var g=E.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),P("ERR_INVALID_RETURN_VALUE",function(o,u,f){var g;return f&&f.constructor&&f.constructor.name?g="instance of ".concat(f.constructor.name):g="type ".concat(e(f)),"Expected ".concat(o,' to be returned from the "').concat(u,'"')+" function but got ".concat(g,".")},TypeError),P("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];_===void 0&&(_=or()),_(u.length>0,"At least one arg needs to be specified");var g="The ",T=u.length;switch(u=u.map(function(S){return'"'.concat(S,'"')}),T){case 1:g+="".concat(u[0]," argument");break;case 2:g+="".concat(u[0]," and ").concat(u[1]," arguments");break;default:g+=u.slice(0,T-1).join(", "),g+=", and ".concat(u[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),qt.codes=b,qt}var kt,Mr;function xo(){if(Mr)return kt;Mr=1;function e(O,A){var K=Object.keys(O);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(O);A&&(R=R.filter(function(W){return Object.getOwnPropertyDescriptor(O,W).enumerable})),K.push.apply(K,R)}return K}function t(O){for(var A=1;A<arguments.length;A++){var K=arguments[A]!=null?arguments[A]:{};A%2?e(Object(K),!0).forEach(function(R){r(O,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(O,R,Object.getOwnPropertyDescriptor(K,R))})}return O}function r(O,A,K){return A=h(A),A in O?Object.defineProperty(O,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):O[A]=K,O}function n(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function s(O,A){for(var K=0;K<A.length;K++){var R=A[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,h(R.key),R)}}function l(O,A,K){return A&&s(O.prototype,A),Object.defineProperty(O,"prototype",{writable:!1}),O}function h(O){var A=C(O,"string");return o(A)==="symbol"?A:String(A)}function C(O,A){if(o(O)!=="object"||O===null)return O;var K=O[Symbol.toPrimitive];if(K!==void 0){var R=K.call(O,A||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(O)}function j(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),A&&w(O,A)}function x(O){var A=d();return function(){var R=a(O),W;if(A){var y=a(this).constructor;W=Reflect.construct(R,arguments,y)}else W=R.apply(this,arguments);return b(this,W)}}function b(O,A){if(A&&(o(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(O)}function _(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function E(O){var A=typeof Map=="function"?new Map:void 0;return E=function(R){if(R===null||!k(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A<"u"){if(A.has(R))return A.get(R);A.set(R,W)}function W(){return P(R,arguments,a(this).constructor)}return W.prototype=Object.create(R.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),w(W,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(W,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(W,v),N=new D;return p&&w(N,p.prototype),N},P.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function k(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function w(O,A){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,W){return R.__proto__=W,R},w(O,A)}function a(O){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(O)}function o(O){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},o(O)}var u=ft,f=u.inspect,g=qn(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(O,A,K){return(K===void 0||K>O.length)&&(K=O.length),O.substring(K-A.length,K)===A}function X(O,A){if(A=Math.floor(A),O.length==0||A==0)return"";var K=O.length*A;for(A=Math.floor(Math.log(A)/Math.log(2));A;)O+=O,A--;return O+=O.substring(0,K-O.length),O}var Z="",G="",Y="",F="",V={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},be=10;function Q(O){var A=Object.keys(O),K=Object.create(Object.getPrototypeOf(O));return A.forEach(function(R){K[R]=O[R]}),Object.defineProperty(K,"message",{value:O.message}),K}function de(O){return f(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(O,A,K){var R="",W="",y=0,p="",v=!1,D=de(O),N=D.split(`
2
2
  `),L=de(A).split(`
3
3
  `),$=0,ne="";if(K==="strictEqual"&&o(O)==="object"&&o(A)==="object"&&O!==null&&A!==null&&(K="strictEqualObject"),N.length===1&&L.length===1&&N[0]!==L[0]){var ue=N[0].length+L[0].length;if(ue<=be){if((o(O)!=="object"||O===null)&&(o(A)!=="object"||A===null)&&(O!==0||A!==0))return"".concat(V[K],`
4
4