@abtnode/blocklet-services 1.16.41-beta-20250321-223009-25dace48 → 1.16.41-beta-20250325-054737-39c060ca
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.
- package/api/util/attach-shared-utils.js +10 -1
- package/dist/assets/{ArrowDropDown-ydRfHJ2x.js → ArrowDropDown-BZ7nr-4O.js} +1 -1
- package/dist/assets/{CheckCircle-DgSwRUf8.js → CheckCircle-V33X02sL.js} +1 -1
- package/dist/assets/{ChevronLeft-CqDoHwdJ.js → ChevronLeft-BhAwkTPM.js} +1 -1
- package/dist/assets/{ChevronRight-Bpkf9aqI.js → ChevronRight-BFn5n61K.js} +1 -1
- package/dist/assets/{Community-BJ5wbECZ.js → Community-CJcr3sxm.js} +1 -1
- package/dist/assets/{DeleteOutline-D4DYIaUj.js → DeleteOutline-CI9d5QQr.js} +1 -1
- package/dist/assets/{Done-B8c93MpP.js → Done-CvHaNROm.js} +1 -1
- package/dist/assets/{Download-DANYdeZR.js → Download-CA6PpJRL.js} +1 -1
- package/dist/assets/{EditIcon-SYuT6kHe.js → EditIcon-d_J6X2-M.js} +1 -1
- package/dist/assets/{Email-BWlcFaBq.js → Email-Cv_Ltuyk.js} +1 -1
- package/dist/assets/{Error-wKO1hXtU.js → Error-CkH40x6R.js} +1 -1
- package/dist/assets/{ExpandLess-BqrBuxL9.js → ExpandLess-DPn_CrO1.js} +1 -1
- package/dist/assets/{ExternalIssuerIcon-ln92O441.js → ExternalIssuerIcon-BLzCUF1d.js} +1 -1
- package/dist/assets/{Google-CBPWeaVC.js → Google-cBME17GZ.js} +1 -1
- package/dist/assets/{Holiday-BzLLup0b.js → Holiday-DtecZXIQ.js} +1 -1
- package/dist/assets/{InfoOutlined-HP5LuELQ.js → InfoOutlined-DNOhP8aN.js} +1 -1
- package/dist/assets/{Launch-XvyEoGhF.js → Launch-DR5uY37Q.js} +1 -1
- package/dist/assets/{LaunchOutlined-BfbVRiJT.js → LaunchOutlined-DzKl31aT.js} +1 -1
- package/dist/assets/{Location-BeKcnHxQ.js → Location-CdiPklKa.js} +1 -1
- package/dist/assets/{LockIcon-CPeBOE7f.js → LockIcon-CzTeIv2K.js} +1 -1
- package/dist/assets/{Meeting-BJefXT64.js → Meeting-DQYhfakU.js} +1 -1
- package/dist/assets/{MoreHoriz-Cv3BqpRU.js → MoreHoriz-DvRtrl2X.js} +1 -1
- package/dist/assets/{OffSick-CM_MXKaO.js → OffSick-DwG4gWQF.js} +1 -1
- package/dist/assets/{Phone-R5GzuDhR.js → Phone-CETYuRms.js} +1 -1
- package/dist/assets/{PlayArrow-DI84Lay5.js → PlayArrow-B_DkcrSm.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-D4HZAY1P.js → QuestionMarkCircle-CJiBom-M.js} +1 -1
- package/dist/assets/{ServerLogo-Ck0Cn0r-.js → ServerLogo-Ow_B_zvr.js} +1 -1
- package/dist/assets/{Timezone-B4-rlCyr.js → Timezone-BX4VhFOS.js} +1 -1
- package/dist/assets/{ViewList-DLzG9ldE.js → ViewList-CVmPM3e1.js} +1 -1
- package/dist/assets/{WorkingRemotely-CR0GUC58.js → WorkingRemotely-DIBVduhu.js} +1 -1
- package/dist/assets/{access-control-DhtMFrrc.js → access-control-Dk5vBHfS.js} +1 -1
- package/dist/assets/{actions-CBPbCBQc.js → actions-DqC3kJCr.js} +1 -1
- package/dist/assets/{add-component-core-duRCoSri.js → add-component-core-DAx5yIIg.js} +1 -1
- package/dist/assets/{add-resource-BFCxRUjw.js → add-resource-DkZqrFbC.js} +1 -1
- package/dist/assets/{addon-bbJfiLal.js → addon-BUKk8W1Q.js} +1 -1
- package/dist/assets/{analytics-BzYDejNJ.js → analytics-BpEvUU_V.js} +1 -1
- package/dist/assets/{ar-BYhFX1RC.js → ar-CVfYi9he.js} +1 -1
- package/dist/assets/{audit-logs-Boixygak.js → audit-logs-CzmQ7awq.js} +1 -1
- package/dist/assets/{base32-gJJTbpiB.js → base32-CwsOMJzz.js} +1 -1
- package/dist/assets/{branding-DRuzH-TI.js → branding-COlKYnkW.js} +2 -2
- package/dist/assets/{bundle-avatar-ByTSTw6q.js → bundle-avatar-mGTppfmO.js} +1 -1
- package/dist/assets/button-Bp47Zc1i.js +1 -0
- package/dist/assets/{click-to-copy-Dc16fHKA.js → click-to-copy-BF_uUMNm.js} +1 -1
- package/dist/assets/{complete-Dcrfpetb.js → complete-BGei1NKc.js} +1 -1
- package/dist/assets/{component-BQWq8U2p.js → component-D_dh8l-k.js} +1 -1
- package/dist/assets/{config-C3tQWDAE.js → config-C4ca73g2.js} +1 -1
- package/dist/assets/{config-Ho-e6TmS.js → config-D7fEb50y.js} +1 -1
- package/dist/assets/{config-navigation-CiIrM1Fo.js → config-navigation-D8XsruhL.js} +3 -3
- package/dist/assets/{config-space-C0DOvHCl.js → config-space-BsNunj5H.js} +1 -1
- package/dist/assets/{confirm-Bk48-qWj.js → confirm-SUs_DctB.js} +1 -1
- package/dist/assets/{connect-TboxsI7I.js → connect-B1JNOfKg.js} +1 -1
- package/dist/assets/{connect-C3MWBgHk.js → connect-CHnKwaTE.js} +1 -1
- package/dist/assets/{connect-to-BKKH2Cvc.js → connect-to-D_r9o9e2.js} +1 -1
- package/dist/assets/{content-layout--DV54O6i.js → content-layout-BQE-NWxj.js} +1 -1
- package/dist/assets/{dashboard-C07uhZlB.js → dashboard-CcevSjZB.js} +3 -3
- package/dist/assets/{de-BGb-B8X8.js → de-B4s5NdlK.js} +1 -1
- package/dist/assets/{delete-confirm-BMM7KvBu.js → delete-confirm-CIzTutM8.js} +1 -1
- package/dist/assets/{did-address-DIKoCoBp.js → did-address-DnGQ03FF.js} +1 -1
- package/dist/assets/{domain-D7OtVpWm.js → domain-Cs9dCGZy.js} +1 -1
- package/dist/assets/{domain-action-card-CgDTJRIU.js → domain-action-card-CmEjTVIf.js} +1 -1
- package/dist/assets/domains-ByJLKnQ7.js +1 -0
- package/dist/assets/{email-CQ7-0SMy.js → email-DcW8pu9K.js} +1 -1
- package/dist/assets/{es-7qfy0ZFR.js → es-C48Qrhnr.js} +1 -1
- package/dist/assets/{exchange-passport-Dz30tcA6.js → exchange-passport-SiIAETh-.js} +1 -1
- package/dist/assets/{form-text-input-BnAspRzv.js → form-text-input-B4Ezw4UV.js} +1 -1
- package/dist/assets/{fr-D45_Vbdp.js → fr-C_zb-sN3.js} +1 -1
- package/dist/assets/{fuel-iMiQT_Y0.js → fuel-BkpixTuh.js} +1 -1
- package/dist/assets/{fullpage-kiX9qo3H.js → fullpage-BK45P92Z.js} +1 -1
- package/dist/assets/{get-safe-url-BvS0hy8W.js → get-safe-url-BPBKhLNl.js} +1 -1
- package/dist/assets/{get-safe-url-CXJBjnNj.js → get-safe-url-D5pnveC6.js} +1 -1
- package/dist/assets/{hi-DZgSSG0g.js → hi-Bd1v0vAT.js} +1 -1
- package/dist/assets/{home-A4FborU_.js → home-qm_lBtgD.js} +1 -1
- package/dist/assets/{id-ClLYhQcd.js → id-CAHN8LyN.js} +1 -1
- package/dist/assets/{iframe-CrXg6lQs.js → iframe-MARzuPzd.js} +1 -1
- package/dist/assets/index-2hZd332d.js +138 -0
- package/dist/assets/{index-Aq7Gmh7c.js → index-9twdGxCF.js} +1 -1
- package/dist/assets/{index-DJCrE6Wk.js → index-BJQAwe5r.js} +1 -1
- package/dist/assets/{index-BP3Y-5Lk.js → index-BMxUr1Yy.js} +1 -1
- package/dist/assets/index-BRMrRxju.js +6 -0
- package/dist/assets/{index-BXjJechq.js → index-BSEtdOzl.js} +1 -1
- package/dist/assets/{index-C46rA4HG.js → index-BhEkFtB1.js} +1 -1
- package/dist/assets/{index-B67Mm1i9.js → index-BvH3rra0.js} +1 -1
- package/dist/assets/{index-DmZVGf4-.js → index-BwhP13EW.js} +1 -1
- package/dist/assets/{index-CBS4EwIH.js → index-C482NgPS.js} +5 -5
- package/dist/assets/{index-Bs92gDoG.js → index-CZIXrPaX.js} +1 -1
- package/dist/assets/{index-BTiNa1bp.js → index-CcooKt06.js} +1 -1
- package/dist/assets/{index-D58h54sQ.js → index-CjVqsxIQ.js} +3 -3
- package/dist/assets/index-CqnBzijY.js +137 -0
- package/dist/assets/{index-oXEi5lCg.js → index-D9S8aCU6.js} +1 -1
- package/dist/assets/{index-DWJc5Rxl.js → index-De6c2gZ_.js} +1 -1
- package/dist/assets/{index-D5oVpOhg.js → index-DkVrxjpZ.js} +1 -1
- package/dist/assets/{index-D5rqbUOM.js → index-MSp2Bfol.js} +1 -1
- package/dist/assets/{index-Di80FuhU.js → index-RkynV8Hy.js} +4 -4
- package/dist/assets/{index-DwGRFFPu.js → index-mdmh1Xx6.js} +1 -1
- package/dist/assets/{invitation-CIPRNDhh.js → invitation-ehDH3V7F.js} +1 -1
- package/dist/assets/{invite-CA2lONVP.js → invite-BVZfCzI6.js} +1 -1
- package/dist/assets/{issue-passport-D_79TMoj.js → issue-passport-UNdxuvTV.js} +1 -1
- package/dist/assets/{item-CSshCCU4.js → item-vIB3V7Bi.js} +1 -1
- package/dist/assets/{ja-Bt-ViiAE.js → ja-DTJzPeZ-.js} +1 -1
- package/dist/assets/{ko-BEKHcSck.js → ko--y3FSpCf.js} +1 -1
- package/dist/assets/{launch-result-message-WNYdod-D.js → launch-result-message-irP4_5v3.js} +1 -1
- package/dist/assets/{layout-DfxD4-7B.js → layout-C6s5HhIK.js} +1 -1
- package/dist/assets/{list-YzyHuFx0.js → list-DS45KBMo.js} +1 -1
- package/dist/assets/{list-header-Bzt7zKtS.js → list-header-s-ciXcTm.js} +1 -1
- package/dist/assets/localization-BAzVJOkA.js +1 -0
- package/dist/assets/{log-DwhEj58A.js → log-lc82BnEg.js} +1 -1
- package/dist/assets/{login-aikPs5C4.js → login-BMWayJcu.js} +1 -1
- package/dist/assets/{login-oauth-callback-BQ3BcD5g.js → login-oauth-callback-CNErXZTB.js} +1 -1
- package/dist/assets/{logo-uploader-BiPAPqlc.js → logo-uploader-CEXNuQSC.js} +3 -3
- package/dist/assets/{lost-passport-CdpQ1c6a.js → lost-passport-CvNrb0v1.js} +1 -1
- package/dist/assets/{open-window-yeboX1Ru.js → open-window-B6eFUa8p.js} +1 -1
- package/dist/assets/{overview-CEq2dp-I.js → overview-mT5IG7r5.js} +1 -1
- package/dist/assets/{page-header-DyeTxe1U.js → page-header-B4LQuuxg.js} +1 -1
- package/dist/assets/{permission-ZvUR5Tj-.js → permission-C4cBxu8K.js} +1 -1
- package/dist/assets/{preferences-D5E_lTTa.js → preferences-tDE3WRRj.js} +1 -1
- package/dist/assets/{profile-embed-C5ZGYP34.js → profile-embed-CNrAUity.js} +1 -1
- package/dist/assets/{pt-B0dqFDL5.js → pt-vs00P-F0.js} +1 -1
- package/dist/assets/publish-resource-ApDQigSb.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-DcDZ_Ghe.js → react-beautiful-dnd.esm-BnCmTyEw.js} +1 -1
- package/dist/assets/{relative-time-BMk6-Cz4.js → relative-time-W13XZ7qT.js} +1 -1
- package/dist/assets/{ru-CQaxksxw.js → ru-CMsriCRQ.js} +1 -1
- package/dist/assets/sdk-CdntdIAz.js +1 -0
- package/dist/assets/{session-CD9NaM-v.js → session-D0E4yKh1.js} +1 -1
- package/dist/assets/{setup-5CzEE7u_.js → setup-vmtHxx8b.js} +3 -3
- package/dist/assets/{shorten-label-DXrhdUJE.js → shorten-label-CYUVOsQQ.js} +1 -1
- package/dist/assets/{simple-select-ZyzPurqn.js → simple-select-CI23fC_x.js} +1 -1
- package/dist/assets/{slicedToArray-BNN_9uYO.js → slicedToArray-W0RilTJp.js} +1 -1
- package/dist/assets/{start-bvp0eBWn.js → start-B6iWRYkb.js} +1 -1
- package/dist/assets/{status-CvHaULR6.js → status-CBD3RDbA.js} +1 -1
- package/dist/assets/{step-actions-BQ7v9BTH.js → step-actions-D1bVdqNc.js} +1 -1
- package/dist/assets/{studio-uVz4gu18.js → studio-CI-t_7sU.js} +1 -1
- package/dist/assets/{switch-control-DD9yYD7L.js → switch-control-BqINsLim.js} +1 -1
- package/dist/assets/{th-CjA3_x5X.js → th-_91ROtZM.js} +1 -1
- package/dist/assets/{traffic-D-ugFE9e.js → traffic-kGqrk2bv.js} +1 -1
- package/dist/assets/{transfer-Bx1MySon.js → transfer-ii7u2wA5.js} +1 -1
- package/dist/assets/{unsubscribe-B9kFqlcu.js → unsubscribe-DvsPQr2X.js} +1 -1
- package/dist/assets/{use-mobile-Cb_97PZu.js → use-mobile-CVbqh2Dx.js} +1 -1
- package/dist/assets/{useAsyncRetry-CEJwVPZ6.js → useAsyncRetry-Dju2R4r6.js} +1 -1
- package/dist/assets/{useLocalStorage-CtbpqE0c.js → useLocalStorage-B4mjl5_Q.js} +1 -1
- package/dist/assets/{user-center-Di3tptHr.js → user-center-Bi7zYk4z.js} +1 -1
- package/dist/assets/{util-CzgwETtC.js → util-BT3jBHtZ.js} +1 -1
- package/dist/assets/{util-CzeZDYqJ.js → util-CVH97CBw.js} +1 -1
- package/dist/assets/{vendor-arcblock-CZsH3o1m.js → vendor-arcblock-CCyyB91P.js} +5 -5
- package/dist/assets/{vendor-mui-core-O22FPGM4.js → vendor-mui-core-DSM7ZGuY.js} +1 -1
- package/dist/assets/{vendor-mui-x-K-9WHqhO.js → vendor-mui-x-BTReKX4-.js} +1 -1
- package/dist/assets/{vendor-ux-did-connect-D75Zatzm.js → vendor-ux-did-connect-Dg7MsmIi.js} +1 -1
- package/dist/assets/{vi-CEplaB_p.js → vi-BAo1CsMy.js} +1 -1
- package/dist/assets/wrap-locale-BMEB19si.js +1 -0
- package/dist/assets/{zh-CDegQD7Y.js → zh-8LRwh-dv.js} +2 -2
- package/dist/assets/{zh-tw-BunOPLC9.js → zh-tw-C8jGxySi.js} +1 -1
- package/dist/index.html +4 -4
- package/dist/service-worker.js +1 -1
- package/package.json +21 -21
- package/dist/assets/button-BqyvGZC-.js +0 -1
- package/dist/assets/domains-C4ORv-aP.js +0 -1
- package/dist/assets/index-BakF-08E.js +0 -138
- package/dist/assets/index-CtLsy_jW.js +0 -137
- package/dist/assets/index-D2FJkd1U.js +0 -6
- package/dist/assets/localization-DXr2qb5k.js +0 -1
- package/dist/assets/publish-resource-CHXi7gR6.js +0 -1
- package/dist/assets/sdk-CVa22Xgm.js +0 -1
- package/dist/assets/wrap-locale-RuOaicAg.js +0 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import{u as q,V as z,bK as K,i as be,X as fe,a2 as ge,bC as je}from"./vendor-ux-did-connect-Dg7MsmIi.js";import{w as ye,l as de,j as we}from"./vendor-hooks-CYyfK9g3.js";import{r as C,b as X}from"./vendor-react-DoD83n6N.js";import{d as Z}from"./InfoOutlined-DNOhP8aN.js";import{z as N,C as ce,G as ke}from"./index-C482NgPS.js";import{u as F}from"./dashboard-CcevSjZB.js";import{E as o,j as e,D as ve,ab as Ee,r as Ce,a3 as f,M as ie,T as S,a2 as U,ac as ee,y as Te,x as B,bn as le,bO as V,a4 as O,L as G,z as Q,bg as Se,A,I as _,C as Re,bl as Ie,ad as P,cI as Me,ak as Pe,bd as Y,bk as De,b1 as We,cJ as ze,cK as Oe,b2 as Ae,af as $e,bS as qe,s as pe,t as Le,cL as Be,cM as He,cN as Ne,cO as Fe,cP as Ue}from"./vendor-mui-core-DSM7ZGuY.js";import{u as _e,C as J}from"./index.esm-CWepf7I_.js";import{n as Ke}from"./vendor-arcblock-CCyyB91P.js";import{d as Ve}from"./ExpandLess-DPn_CrO1.js";import{y as ue,w as Ye,x as Je}from"./vendor-utils-CbeKtci8.js";import{C as Ge}from"./confirm-SUs_DctB.js";import{A as Qe}from"./actions-DqC3kJCr.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-B4mjl5_Q.js";import"./PlayArrow-B_DkcrSm.js";import"./get-safe-url-D5pnveC6.js";import"./format-error-LAoTjvJe.js";import"./index-BvH3rra0.js";import"./session-D0E4yKh1.js";import"./useAsyncRetry-Dju2R4r6.js";import"./useAsync-D2OhgEkV.js";import"./useSetState-BL3ktMon.js";import"./MoreHoriz-DvRtrl2X.js";const Xe=t=>{var j,y;const[d,c]=C.useState(null),[a,b]=C.useState(!t),[R,p]=C.useState(null),{blocklet:n}=ce(),l=(y=(j=n==null?void 0:n.site)==null?void 0:j.domainAliases[0])==null?void 0:y.value,v=C.useMemo(()=>{const h={};return d&&(d.sources.forEach(r=>{h[r.did]={source:r,events:[],count:0}}),d.events.forEach(r=>{h[r.source]&&(h[r.source].events.push(r),h[r.source].count+=1)})),h},[d]),T=async()=>{try{if(b(!0),!l)return;const r=await(await fetch(`https://${l}/.well-known/service/openevent.json`)).json();c(r),p(null)}catch(h){p(h instanceof Error?h:new Error(String(h)))}finally{b(!1)}};return C.useEffect(()=>{T()},[l]),{openEvent:d,setOpenEvent:c,eventsBySource:v,loading:a,error:R,loadData:T}};function te({eventsBySource:t,selectedEvents:d,setSelectedEvents:c,error:a}){const{t:b}=q(),[R,p]=C.useState({}),n=C.useMemo(()=>{const r={};return Object.entries(t).forEach(([w,{events:g}])=>{const E=g.filter(u=>d[`${u.type}-${u.source}`]).length;r[w]=E}),r},[t,d]),l=C.useMemo(()=>Object.values(n).reduce((r,w)=>r+w,0),[n]),v=C.useMemo(()=>Object.values(t).reduce((r,{events:w})=>r+w.length,0),[t]),T=(r,w)=>{w.stopPropagation(),p({...R,[r]:!R[r]})},j=r=>{const w=`${r.type}-${r.source}`;c(g=>({...g,[w]:!g[w]}))},y=(r,w)=>{const g={};r.forEach(E=>{const u=`${E.type}-${E.source}`;g[u]=!w}),c(E=>({...E,...g}))},h=r=>{const w={};Object.values(t).forEach(({events:g})=>{g.forEach(E=>{const u=`${E.type}-${E.source}`;w[u]=r.target.checked})}),c(w)};return e.jsxs(f,{sx:{width:"100%"},children:[e.jsxs(f,{sx:{display:"flex",alignItems:"center",mb:1,mt:1},children:[e.jsx(le,{control:e.jsx(V,{onChange:h,checked:l>0&&l===v}),label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",cursor:"pointer"},children:[b("webhookEndpoint.selectAllEvents"),e.jsx(f,{sx:{display:"flex",alignItems:"center"},children:e.jsx(O,{title:b("webhookEndpoint.selectAllEventsTooltip"),placement:"right",children:e.jsx(Z,{fontSize:"small",sx:{ml:.5,cursor:"help"}})})})]}),sx:{m:0}}),l>0&&e.jsx(S,{variant:"body2",color:"primary",sx:{ml:"auto"},children:b("webhookEndpoint.selectedEventsCount",{count:l})})]}),e.jsx(f,{sx:{maxHeight:"50vh",overflow:"auto"},children:e.jsx(G,{disablePadding:!0,sx:{border:"1px solid #e0e0e0",borderRadius:"4px"},children:Object.entries(t).map(([r,{source:w,events:g,count:E}],u)=>{const M=n[r]>0,i=n[r]===g.length&&g.length>0,x=R[r];return e.jsxs(X.Fragment,{children:[e.jsx(Q,{sx:{borderBottom:u<Object.keys(t).length-1?"1px solid #f0f0f0":"none",px:2,py:1.5,"&:hover":{bgcolor:"rgba(0, 0, 0, 0.02)"}},children:e.jsxs(f,{sx:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},onClick:s=>{s.target.closest(".MuiFormControlLabel-root")||T(r,s)},children:[e.jsx(f,{sx:{display:"flex",alignItems:"center"},children:g.length>0&&e.jsx(le,{control:e.jsx(V,{checked:i,indeterminate:M&&!i,onChange:s=>{s.stopPropagation(),y(g,i)}}),label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1},children:[w.logo&&e.jsx(Se,{src:w.logo,sx:{width:24,height:24}}),e.jsx(f,{children:w.title||r}),M&&e.jsx(A,{label:b("webhookEndpoint.selectedCount",{count:n[r]}),size:"small",sx:{mt:"2px",height:"20px",fontSize:"12px",bgcolor:s=>`${s.palette.primary.main}20`,color:"primary.main",fontWeight:500}})]}),sx:{m:0,"& .MuiFormControlLabel-label":{flex:1}}})}),e.jsxs(f,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(S,{variant:"body2",color:"text.secondary",sx:{mr:1},children:b("webhookEndpoint.eventsCount",{count:E})}),g.length>0&&e.jsx(_,{size:"small",edge:"end",children:x?e.jsx(Ve,{}):e.jsx(Ke,{})})]})]})}),g.length>0&&e.jsx(Re,{in:x,timeout:"auto",unmountOnExit:!0,children:e.jsx(G,{disablePadding:!0,sx:{pl:2,pr:2,py:1,bgcolor:"rgba(0, 0, 0, 0.01)"},children:g.map(s=>{const m=`${s.type}-${s.source}`,k=!!d[m];return e.jsx(Q,{dense:!0,sx:{py:.75},onClick:()=>j(s),children:e.jsxs(f,{sx:{display:"flex",alignItems:"flex-start",width:"100%"},children:[e.jsx(V,{checked:k,sx:{mr:1}}),e.jsxs(f,{children:[e.jsx(S,{variant:"body1",sx:{cursor:"pointer"},children:s.type}),e.jsx(S,{variant:"caption",color:"text.disabled",sx:{display:"block",cursor:"pointer"},children:s.description})]})]})},m)})})})]},r)})})}),a&&e.jsx(Ie,{error:!0,sx:{mt:1},children:a})]})}te.propTypes={eventsBySource:o.objectOf(o.shape({source:o.shape({did:o.string.isRequired,title:o.string,description:o.string,version:o.string,logo:o.string}).isRequired,events:o.arrayOf(o.shape({type:o.string.isRequired,description:o.string.isRequired,source:o.string.isRequired})).isRequired,count:o.number.isRequired})).isRequired,selectedEvents:o.objectOf(o.bool).isRequired,setSelectedEvents:o.func.isRequired,error:o.string};te.defaultProps={error:null};function oe({id:t,url:d,description:c,enabledEvents:a,onSubmit:b,onClose:R}){var s;const{t:p}=q(),[n,l]=C.useState({}),{teamDid:v}=F(),{api:T}=N(),{loading:j,error:y,eventsBySource:h}=Xe(),{control:r,handleSubmit:w,formState:{errors:g},reset:E,setValue:u,trigger:M}=_e({defaultValues:{url:"",description:""}});C.useEffect(()=>{const m=Object.values(n).some(k=>k);u("selectedEvents",m?"valid":""),M("selectedEvents")},[n,u,M]);const i=()=>{l({}),E(),R()},x=async m=>{const k=Object.keys(n).filter(I=>n[I]),D={url:m.url,description:m.description,enabledEvents:k.map(I=>{const[$,L]=I.split("-");return!$||!L?null:{type:$,source:L}}).filter(Boolean)};try{if(t){const I=await T.updateWebhookEndpoint({input:{teamDid:v,id:t,data:D}});z.success(`${p("webhookEndpoint.updateWebhook")} ${p("webhookEndpoint.success")}`),b(I)}else{const I=await T.createWebhookEndpoint({input:{teamDid:v,input:D}});z.success(`${p("webhookEndpoint.createWebhook")} ${p("webhookEndpoint.success")}`),b(I)}}catch(I){z.error(I==null?void 0:I.message)}i()};return C.useEffect(()=>{E({url:d,description:c}),l(a.reduce((m,k)=>(m[`${k.type}-${k.source}`]=!0,m),{}))},[E,l,d,c,a]),e.jsx(ve,{open:!0,onClose:i,maxWidth:"lg",fullWidth:!0,sx:{"& .MuiDialog-paper":{minHeight:600}},children:e.jsxs("form",{onSubmit:w(x),children:[e.jsx(Ee,{children:p(t?"webhookEndpoint.editWebhookTitle":"webhookEndpoint.createWebhookTitle")}),e.jsx(Ce,{children:e.jsxs(f,{sx:{display:"flex",flexDirection:"column",gap:2,mt:2},children:[e.jsx(J,{name:"url",control:r,rules:{required:p("webhookEndpoint.validation.urlRequired"),pattern:{value:/^(http|https):\/\/[^ "]+$/,message:p("webhookEndpoint.validation.urlInvalid")}},render:({field:m})=>{var k;return e.jsx(ie,{...m,label:p("webhookEndpoint.url.label"),fullWidth:!0,error:!!g.url,helperText:(k=g.url)==null?void 0:k.message})}}),e.jsx(J,{name:"description",control:r,rules:{required:p("webhookEndpoint.validation.descriptionRequired")},render:({field:m})=>{var k;return e.jsx(ie,{...m,label:p("webhookEndpoint.description.label"),fullWidth:!0,multiline:!0,minRows:2,maxRows:4,error:!!g.description,helperText:(k=g.description)==null?void 0:k.message})}}),e.jsx(J,{name:"selectedEvents",control:r,rules:{required:p("webhookEndpoint.validation.eventRequired")},render:({field:m})=>e.jsx("input",{type:"hidden",...m})}),!j&&h&&Object.keys(h).length>0&&e.jsx(te,{eventsBySource:h,selectedEvents:n,setSelectedEvents:l,error:(s=g.selectedEvents)==null?void 0:s.message}),!j&&(!h||Object.keys(h).length===0)&&e.jsx(S,{color:"text.secondary",children:p("webhookEndpoint.noAvailableEvents")}),j&&e.jsx(f,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"500px",width:"100%"},children:e.jsx(U,{size:20})}),y&&e.jsx(ee,{severity:"error",children:p("webhookEndpoint.loadingError",{message:y==null?void 0:y.message})})]})}),e.jsxs(Te,{sx:{p:"8px 24px 24px"},children:[e.jsx(B,{onClick:i,children:p("common.cancel")}),e.jsx(B,{type:"submit",variant:"contained",color:"primary",children:p(t?"webhookEndpoint.updateWebhook":"webhookEndpoint.saveWebhook")})]})]})})}oe.propTypes={onSubmit:o.func.isRequired,id:o.string,url:o.string,description:o.string,enabledEvents:o.arrayOf(o.shape({type:o.string.isRequired,source:o.string.isRequired})),onClose:o.func};oe.defaultProps={id:null,url:"",description:"",enabledEvents:[],onClose:()=>{}};function he(t){switch(t){case"enabled":return"success";case"disabled":default:return"default"}}const Ze=(t="en")=>t==="tw"?"zh":t;function H(t,d="YYYY-MM-DD HH:mm:ss",c="en"){return t?ke(t).locale(Ze(c)).format(d):"-"}function et(t){return typeof t=="number"?!1:ue(t)}function tt(t){return t>=200&&t<300}function W(t){const d=et(t.value);return e.jsxs(e.Fragment,{children:[e.jsxs(P,{direction:"column",alignItems:"flex-start",children:[e.jsxs(S,{component:"div",variant:"body1",mb:1,color:"text.primary",sx:{fontWeight:500},children:[t.label,!!t.tip&&e.jsx(O,{title:t.tip,children:e.jsx(Me,{fontSize:"small"})})]}),e.jsx(S,{component:"div",variant:"body1",color:d?"text.disabled":"text.secondary",sx:{width:"100%",minHeight:"24px"},children:d?"-":t.value})]}),t.divider&&e.jsx(Pe,{orientation:"vertical",flexItem:!0})]})}W.propTypes={label:o.oneOfType([o.string,o.node]).isRequired,value:o.oneOfType([o.string,o.node]).isRequired,tip:o.oneOfType([o.string,o.node]),divider:o.bool};W.defaultProps={tip:"",divider:!1};function ne(t){return e.jsxs(P,{className:"section-header",direction:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:1,sx:{mb:t.mb,mt:t.mt,pb:1},children:[e.jsx(S,{variant:"h3",sx:{fontSize:{xs:"18px",md:"1.09375rem"}},component:"div",children:t.title}),t.children]})}ne.propTypes={title:o.oneOfType([o.string,o.node]).isRequired,children:o.node,mb:o.number,mt:o.number};ne.defaultProps={children:null,mb:1.5,mt:1.5};const ot={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6m-7 1l9-9m-5 0h5v5"/>'},nt=t=>{const d={};return t.forEach(c=>{var b;const a=new Date(c.createdAt).toLocaleDateString();d[a]||(d[a]=[]),(b=d[a])==null||b.push(c)}),d};function se({eventId:t,webhookEndpointId:d,event:c}){const{api:a}=N(),{t:b}=q(),{teamDid:R}=F(),{blocklet:p}=ce(),{data:n,loadMore:l,loadingMore:v,loading:T}=ye(u=>{const i=u?Math.ceil(u.list.length/15)+1:1;return a.getWebhookAttempts({input:{teamDid:R,input:{eventId:t,webhookId:d},paging:{page:i,pageSize:15}}})},{reloadDeps:[t,d]}),j=(n==null?void 0:n.list)||[],[y,h]=C.useState(null),r=nt(j);C.useEffect(()=>{!y&&(n!=null&&n.list.length)&&h(n.list[0])},[n==null?void 0:n.list.length,y]);const w=u=>{h(u)};if(T)return e.jsx(U,{});const g=n&&n.list.length<n.paging.total,E=u=>{var M,i,x,s,m;if(u.responseBody&&((M=u.responseBody)!=null&&M.sessionId)&&((i=u.responseBody)!=null&&i.projectId)&&((x=u.responseBody)!=null&&x.agentId)){const k=(m=(s=p==null?void 0:p.site)==null?void 0:s.domainAliases[0])==null?void 0:m.value,D=(p.children||[]).find($=>{var L;return((L=$==null?void 0:$.meta)==null?void 0:L.name)==="ai-studio"}),I=Ye(Je(`https://${k}`,(D==null?void 0:D.mountPoint)||"","projects",u.responseBody.projectId,"logs/main"),{sessionId:u.responseBody.sessionId,agentId:u.responseBody.agentId});return e.jsx(_,{sx:{fontSize:20},onClick:()=>window.open(I,"_blank"),children:e.jsx(f,{component:be,icon:ot})})}return null};return e.jsxs(Y,{container:!0,spacing:{xs:0,md:1},sx:{height:1},children:[e.jsx(Y,{item:!0,xs:12,md:4,height:1,children:ue(Object.keys(r))?e.jsx(S,{color:"text.secondary",children:b("webhookEndpoint.waitingForEvents")}):e.jsxs(e.Fragment,{children:[e.jsx(G,{sx:{maxHeight:"calc(100% - 40px)",py:0,overflowY:"auto"},children:Object.entries(r).map(([u,M])=>e.jsxs(X.Fragment,{children:[e.jsx(De,{children:u}),M.map(i=>e.jsxs(Q,{sx:{cursor:"pointer"},onClick:()=>w(i),selected:y===i,secondaryAction:e.jsx(S,{color:"text.secondary",children:H(i.createdAt,"HH:mm:ss")}),children:[e.jsx(We,{sx:{minWidth:0,mr:1.5},children:tt(i.responseStatus)===!1?e.jsx(ze,{color:"error"}):e.jsx(Oe,{color:"success"})}),e.jsx(Ae,{primary:e.jsx(S,{color:"text.primary",children:i.event.type})})]},i.id))]},u))}),g&&e.jsx(f,{display:"flex",justifyContent:"center",alignItems:"center",width:1,children:e.jsx(B,{variant:"text",type:"button",color:"inherit",onClick:l,disabled:v,sx:{color:u=>u.palette.text.disabled},children:b(v?"webhookEndpoint.loadingMore":"webhookEndpoint.loadMore")})})]})}),e.jsxs(Y,{item:!0,xs:12,md:8,height:1,children:[y&&e.jsxs(P,{height:1,overflow:"auto",direction:"column",spacing:2,sx:{pl:{xs:0,md:1},mt:{xs:2,md:0},borderLeft:{xs:"none"}},children:[e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(S,{variant:"h6",children:t?y.endpoint.url:y.event.type}),e.jsx(f,{children:E(y)})]}),e.jsxs(f,{children:[e.jsxs(S,{variant:"h6",children:[b("webhookEndpoint.response")," (",y.responseStatus,")"]}),e.jsx(K,{language:"json",children:JSON.stringify(y.responseBody,null,2)})]}),e.jsxs(f,{children:[e.jsx(P,{direction:"row",alignItems:"center",spacing:1,children:e.jsx(S,{variant:"h6",children:b("webhookEndpoint.request")})}),e.jsx(K,{language:"json",sx:{margin:0},children:JSON.stringify(y.event,null,2)})]})]}),(n==null?void 0:n.list.length)===0&&c&&e.jsxs(f,{children:[e.jsx(P,{direction:"row",alignItems:"center",spacing:1,children:e.jsx(S,{variant:"h6",children:b("webhookEndpoint.eventData")})}),e.jsx(K,{language:"json",sx:{margin:0},children:JSON.stringify(c.data,null,2)})]})]})]})}se.propTypes={eventId:o.string,webhookEndpointId:o.string,event:o.shape({type:o.string,data:o.object,request:o.object,requestInfo:o.object})};se.defaultProps={eventId:"",webhookEndpointId:"",event:null};function xe({id:t,onClose:d}){var v,T,j,y;const{t:c}=q(),{api:a}=N(),{teamDid:b}=F(),{loading:R,error:p,data:n}=de(()=>a.getWebhookEndpoint({input:{teamDid:b,id:t}})),l=n==null?void 0:n.data;return p?e.jsx(ee,{severity:"error",children:p.message}):R||!l?e.jsx(f,{display:"flex",justifyContent:"center",alignItems:"center",height:1,width:1,children:e.jsx(U,{})}):e.jsxs(st,{direction:"column",sx:{height:{xs:"auto",md:1}},children:[e.jsxs(f,{children:[e.jsxs(P,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e.jsx(P,{flex:1,width:0,children:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(S,{variant:"h5",fontWeight:600,sx:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:l.description}),e.jsx(O,{title:l.url,children:e.jsx(Z,{sx:{fontSize:"16px",marginTop:"2px"}})})]})}),e.jsx(P,{direction:"row",alignItems:"center",children:e.jsx(_,{edge:"end",color:"inherit",onClick:d,children:e.jsx(qe,{})})})]}),e.jsx(f,{mt:2,children:e.jsxs(P,{className:"section-body",direction:{xs:"column",md:"row"},spacing:{xs:1,md:3},justifyContent:"flex-start",flexWrap:"wrap",sx:{pt:2,mt:2,borderTop:"1px solid #eee"},children:[e.jsx(W,{label:c("common.status"),value:e.jsx(A,{size:"small",variant:"filled",label:l.status,color:he(l.status),sx:{borderRadius:"4px",lineHeight:"20px",textTransform:"capitalize"}}),divider:!0}),e.jsx(W,{label:c("webhookEndpoint.listen"),value:e.jsx(O,{arrow:!0,title:e.jsx("ul",{style:{padding:0,margin:0},children:l.enabledEvents.map(h=>e.jsx("li",{style:{fontSize:"0.7875rem"},children:h==null?void 0:h.type},h))}),children:e.jsx(A,{size:"small",variant:"filled",label:c("webhookEndpoint.eventsCount",{count:l.enabledEvents.length}),sx:{borderRadius:"4px",lineHeight:"20px",textTransform:"capitalize"}})}),divider:!0}),e.jsx(W,{label:c("webhookEndpoint.version"),value:l.apiVersion,divider:!0}),e.jsx(W,{label:c("common.createdAt"),value:H(l.createdAt),divider:!0}),e.jsx(W,{label:c("common.updatedAt"),value:H(l.updatedAt),divider:!0}),e.jsx(W,{label:c("common.createdBy"),value:e.jsx(O,{arrow:!0,title:(v=l.createUser)==null?void 0:v.did,children:e.jsx(A,{size:"small",variant:"filled",label:(T=l.createUser)==null?void 0:T.fullName,sx:{borderRadius:"4px",lineHeight:"20px",textTransform:"capitalize"}})}),divider:!0}),e.jsx(W,{label:c("common.updatedBy"),value:e.jsx(O,{arrow:!0,title:(j=l.updateUser)==null?void 0:j.did,children:e.jsx(A,{size:"small",variant:"filled",label:(y=l.updateUser)==null?void 0:y.fullName,sx:{borderRadius:"4px",lineHeight:"20px",textTransform:"capitalize"}})})})]})})]}),e.jsxs(P,{className:"section",flex:1,height:0,overflow:"hidden",children:[e.jsx(ne,{title:c("webhookEndpoint.attempts"),mb:0,mt:4}),e.jsx(P,{height:0,flex:1,overflow:"hidden",children:e.jsx(se,{webhookEndpointId:l.id})})]})]})}xe.propTypes={id:o.string.isRequired,onClose:o.func.isRequired};const st=pe(P)``;function me({open:t,onClose:d,id:c}){return e.jsx($e,{anchor:"right",open:t,onClose:d,PaperProps:{sx:{width:"90vw",maxWidth:"1200px"}},children:e.jsx(f,{sx:{height:"100vh",p:3},children:e.jsx(xe,{id:c,onClose:d})})})}me.propTypes={open:o.bool.isRequired,onClose:o.func.isRequired,id:o.string.isRequired};function ae(){return null}const re=X.memo(({options:t,columns:d,toolbar:c=!0,footer:a=!0,hasRowLink:b=!1,emptyNodeText:R="",...p})=>{const{locale:n}=q(),l=Le(j=>j.breakpoints.down("md")),v={print:!1,download:!1,filter:!1,selectableRows:"none",rowsPerPage:l?5:10,rowsPerPageOptions:[5,10,20,50,100],searchDebounceTime:300,tableBodyHeight:"100%",loading:!0},T={};return c||(T.TableToolbar=ae),a||(T.TableFooter=ae),e.jsx(rt,{locale:n,options:{...v,...t},columns:(d||[]).map(j=>(j.options=j.options||{},j.options.filter=j.options.filter||!1,j.options.sort=j.options.sort||!1,j)),emptyNode:e.jsx(fe,{children:R}),...p,components:T,hasRowLink:b,isMobile:l})});re.propTypes={options:o.object,columns:o.array,toolbar:o.bool,footer:o.bool,hasRowLink:o.bool,emptyNodeText:o.node,durable:o.string,durableKeys:o.array,data:o.array,loading:o.bool,onChange:o.func,title:o.node,components:o.object};re.defaultProps={options:{},columns:[],toolbar:!0,footer:!0,hasRowLink:!1,emptyNodeText:null,durable:"",durableKeys:[],data:[],loading:!1,onChange:()=>{},title:null,components:{}};const rt=pe(ge)`
|
|
2
|
+
.MuiPaper-root {
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
}
|
|
6
|
+
table.MuiTable-root {
|
|
7
|
+
outline: 1px solid var(--stroke-border-base, #eff1f5);
|
|
8
|
+
border-radius: var(--radius-m, 8px);
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
}
|
|
11
|
+
[class*='MUIDataTable-responsiveBase'] {
|
|
12
|
+
outline: 1px solid var(--stroke-border-base, #eff1f5);
|
|
13
|
+
border-radius: var(--radius-m, 8px);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
th.MuiTableCell-head {
|
|
17
|
+
padding: 8px 16px 8px 16px;
|
|
18
|
+
text-transform: inherit;
|
|
19
|
+
background: var(--backgrounds-bg-subtle, #f9fafb);
|
|
20
|
+
border-bottom: none;
|
|
21
|
+
&:first-of-type {
|
|
22
|
+
border-top-left-radius: 8px;
|
|
23
|
+
padding-left: 20px;
|
|
24
|
+
}
|
|
25
|
+
&:last-of-type {
|
|
26
|
+
border-top-right-radius: 8px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
tr.MuiTableRow-root:not(.MuiTableRow-footer):hover {
|
|
31
|
+
background: var(--backgrounds-bg-highlight, #eff6ff);
|
|
32
|
+
}
|
|
33
|
+
tr.MuiTableRow-root:last-of-type td:first-of-type {
|
|
34
|
+
border-bottom-left-radius: 8px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
tr.MuiTableRow-root:last-of-type td:last-of-type {
|
|
38
|
+
border-bottom-right-radius: 8px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
tr.MuiTableRow-root:nth-of-type(even) {
|
|
42
|
+
background: var(--backgrounds-bg-subtle, #f9fafb);
|
|
43
|
+
}
|
|
44
|
+
td.MuiTableCell-root {
|
|
45
|
+
border-bottom: none;
|
|
46
|
+
padding-top: 12px;
|
|
47
|
+
padding-bottom: 12px;
|
|
48
|
+
padding-left: 16px;
|
|
49
|
+
padding-right: 16px;
|
|
50
|
+
&:first-of-type {
|
|
51
|
+
padding-left: 20px;
|
|
52
|
+
}
|
|
53
|
+
&.MuiTableCell-footer {
|
|
54
|
+
border: none;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.datatable-footer {
|
|
59
|
+
.MuiTableRow-root.MuiTableRow-footer {
|
|
60
|
+
border: none;
|
|
61
|
+
}
|
|
62
|
+
table.MuiTable-root {
|
|
63
|
+
outline: none;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
}
|
|
66
|
+
.MuiTablePagination-input {
|
|
67
|
+
background: none;
|
|
68
|
+
}
|
|
69
|
+
div.MuiSelect-select {
|
|
70
|
+
padding: 0 24px 0 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
th a,
|
|
75
|
+
td a {
|
|
76
|
+
text-decoration: none;
|
|
77
|
+
display: block;
|
|
78
|
+
color: inherit;
|
|
79
|
+
&:first-of-type {
|
|
80
|
+
padding-left: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
> div {
|
|
85
|
+
overflow: auto;
|
|
86
|
+
}
|
|
87
|
+
.custom-toobar-title-inner {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
}
|
|
91
|
+
@media (max-width: ${({theme:t})=>t.breakpoints.values.md}px) {
|
|
92
|
+
th a,
|
|
93
|
+
td a {
|
|
94
|
+
text-decoration: none;
|
|
95
|
+
display: block;
|
|
96
|
+
color: inherit;
|
|
97
|
+
padding-top: 0;
|
|
98
|
+
padding-bottom: 0;
|
|
99
|
+
padding-right: 0;
|
|
100
|
+
}
|
|
101
|
+
tr.MuiTableRow-root {
|
|
102
|
+
border: none;
|
|
103
|
+
padding: 20px;
|
|
104
|
+
display: block;
|
|
105
|
+
}
|
|
106
|
+
td.MuiTableCell-root:first-of-type {
|
|
107
|
+
padding-left: 0;
|
|
108
|
+
margin-top: 0;
|
|
109
|
+
}
|
|
110
|
+
td.MuiTableCell-root {
|
|
111
|
+
margin: 0;
|
|
112
|
+
margin-top: 8px;
|
|
113
|
+
align-items: center;
|
|
114
|
+
padding: 0;
|
|
115
|
+
flex-wrap: wrap;
|
|
116
|
+
flex-direction: ${({mobileTDFlexDirection:t="column"})=>t||"row"};
|
|
117
|
+
align-items: ${({mobileTDFlexDirection:t="column"})=>t==="column"?"flex-start":"center"};
|
|
118
|
+
justify-content: ${({mobileTDFlexDirection:t="column"})=>t==="column"?"flex-start":"space-between"};
|
|
119
|
+
}
|
|
120
|
+
td.MuiTableCell-root > div {
|
|
121
|
+
margin-bottom: 4px;
|
|
122
|
+
}
|
|
123
|
+
.MuiTable-root > .MuiTableBody-root > .MuiTableRow-root > td.MuiTableCell-root {
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: ${({mobileTDFlexDirection:t="column"})=>t||"row"};
|
|
126
|
+
align-items: flex-start;
|
|
127
|
+
justify-content: ${({mobileTDFlexDirection:t="column"})=>t==="row"?"space-between":"flex-start"};
|
|
128
|
+
flex-wrap: ${({mobileTDFlexDirection:t="column"})=>t==="row"?"nowrap":"wrap"};
|
|
129
|
+
word-break: break-all;
|
|
130
|
+
&.datatables-noprint {
|
|
131
|
+
justify-content: center;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
[class*='MUIDataTable-responsiveBase'] tr:not([class*='responsiveSimple']) td.MuiTableCell-body > div {
|
|
135
|
+
width: inherit;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
`,it=re;function Pt(){const{teamDid:t}=F(),d=`webhook-endpoints-${t}`,c=je(d),{t:a}=q(),{api:b}=N(),[R,p]=C.useState(""),[n,l]=C.useState({webhookDetail:{open:!1,id:null},createEdit:{open:!1,id:null,url:"",description:"",enabledEvents:[]},deleteConfirm:null}),[v,T]=we(d,{defaultValue:{pageSize:c.rowsPerPage||20,page:c.page?c.page+1:1}}),{loading:j,error:y,data:h,refresh:r}=de(()=>b.getWebhookEndpoints({input:{teamDid:t,paging:{page:v.page,pageSize:v.pageSize}}}));C.useEffect(()=>{r()},[v,r]);const w=C.useCallback(async(i,x)=>{try{await b.updateWebhookEndpoint({input:{teamDid:t,id:i.id,data:{status:x?"disabled":"enabled"}}}),r(),z.success(`${a(x?"webhookEndpoint.disable":"webhookEndpoint.enable")}${a("webhookEndpoint.success")}`)}catch(s){z.error(s==null?void 0:s.message)}},[b,t,r,a]),g=C.useCallback(async i=>{try{await b.deleteWebhookEndpoint({input:{teamDid:t,id:i}}),r(),l(x=>({...x,deleteConfirm:null})),z.success(`${a("common.delete")}${a("webhookEndpoint.success")}`)}catch(x){z.error(x==null?void 0:x.message)}},[b,t,r,a]),E=(i,x)=>{let s=i.page+1;const m=i.searchText||"";if(m!==R){p(m);return}if(x==="changePage"||x==="changeRowsPerPage"){x!=="changePage"&&(s=1);const k={page:s,pageSize:i.rowsPerPage};p(""),T(k)}};if(y)return e.jsx(ee,{severity:"error",children:y.message});if(j||!h)return e.jsx(f,{display:"flex",justifyContent:"center",alignItems:"center",width:1,height:500,children:e.jsx(U,{})});const u=((h==null?void 0:h.list)||[]).filter(i=>{if(!R)return!0;const x=R.toLowerCase();return i.description.toLowerCase().includes(x)||i.url.toLowerCase().includes(x)}),M=[{label:"URL",name:"url",options:{customBodyRenderLite:(i,x)=>{const s=u[x];return e.jsxs(f,{sx:{display:"flex",alignItems:"center",cursor:"pointer",gap:.5},children:[e.jsx(S,{variant:"body2",children:s.description}),e.jsx(f,{sx:{display:"flex"},onClick:m=>{m.stopPropagation()},children:e.jsx(O,{title:s.url,children:e.jsx(Z,{sx:{fontSize:"15px",marginTop:"1px"}})})})]})}}},{label:"Events",name:"events",options:{customBodyRenderLite:(i,x)=>{const s=u[x];return e.jsx(f,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:s.enabledEvents.map(m=>e.jsx(A,{size:"small",variant:"filled",label:m.type,sx:{borderRadius:"4px",textTransform:"capitalize"}},`${s.source}-${m.type}`))})}}},{label:a("common.status"),name:"status",options:{customBodyRenderLite:(i,x)=>{const s=u[x];return e.jsx(A,{size:"small",variant:"filled",label:a(`webhookEndpoint.${s==null?void 0:s.status}`),color:he(s==null?void 0:s.status),sx:{borderRadius:"4px",textTransform:"capitalize"}},`status-${s.status}`)}}},{label:a("common.createdAt"),name:"createdAt",minWidth:200,options:{customBodyRender:i=>H(i)}},{label:a("common.actions"),name:"actions",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite:(i,x)=>{const s=u[x],m=(s==null?void 0:s.status)==="enabled";return e.jsx(Qe,{actions:[{icon:m?e.jsx(Be,{}):e.jsx(He,{}),text:a(m?"webhookEndpoint.disable":"webhookEndpoint.enable"),onClick:k=>{k.stopPropagation(),w(s,m)}},{icon:e.jsx(Ne,{}),text:a("common.edit"),onClick:k=>{k.stopPropagation(),l(D=>({...D,createEdit:{open:!0,id:s.id,url:s.url,description:s.description,enabledEvents:s.enabledEvents}}))}},{icon:e.jsx(Fe,{}),text:a("common.delete"),onClick:k=>{k.stopPropagation(),l(D=>({...D,deleteConfirm:{title:a("webhookEndpoint.deleteWebhook.title"),description:a("webhookEndpoint.deleteWebhook.description"),confirm:a("common.confirm"),cancel:a("common.cancel"),onConfirm:()=>g(s.id),onCancel:()=>l(I=>({...I,deleteConfirm:null}))}}))}}]})}}}];return e.jsxs(e.Fragment,{children:[e.jsx(it,{durable:d,durableKeys:["page","rowsPerPage"],data:u,columns:M,options:{count:h.count,page:v.page-1,rowsPerPage:v.pageSize,customToolbar:()=>e.jsx(_,{onClick:()=>l(i=>({...i,createEdit:{...i.createEdit,open:!0}})),children:e.jsx(Ue,{})},"add"),onRowClick:(i,{dataIndex:x})=>{const s=h.list[x];l(m=>({...m,webhookDetail:{open:!0,id:s.id}}))}},loading:j,onChange:E,title:e.jsx(S,{variant:"h6",children:a("webhookEndpoint.title")}),emptyNodeText:e.jsxs(P,{gap:1,children:[a("webhookEndpoint.noWebhooksAdded"),e.jsx(B,{variant:"contained",color:"primary",onClick:()=>l(i=>({...i,createEdit:{...i.createEdit,open:!0}})),children:a("webhookEndpoint.createWebhook")})]})}),n.webhookDetail.open&&e.jsx(me,{open:!0,onClose:()=>l(i=>({...i,webhookDetail:{open:!1,id:null}})),id:n.webhookDetail.id}),n.createEdit.open&&e.jsx(oe,{onSubmit:r,...n.createEdit,onClose:()=>l(i=>({...i,createEdit:{id:null,url:"",description:"",enabledEvents:[],open:!1}}))}),n.deleteConfirm&&e.jsx(Ge,{title:n.deleteConfirm.title,description:n.deleteConfirm.description,confirm:n.deleteConfirm.confirm,cancel:n.deleteConfirm.cancel,params:n.deleteConfirm.params,onConfirm:n.deleteConfirm.onConfirm,onCancel:n.deleteConfirm.onCancel})]})}export{Pt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as A,v as R,p as w,e as p}from"./index-
|
|
1
|
+
import{d as A,v as R,p as w,e as p}from"./index-D9S8aCU6.js";const O=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,x=/^[a-zA-Z]:\\/;function N(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return x.test(e)?!1:O.test(e)}const _=["http","https"],z=["nofollow"],L={};function T(e){const r=e||L,g=r.protocols||_,u=A(r.test);return function(h){R(h,"element",function(t,y,E){if(t.tagName==="a"&&typeof t.properties.href=="string"&&u(t,y,E)){const o=t.properties.href;if(N(o)?g.includes(o.slice(0,o.indexOf(":"))):o.startsWith("//")){const n=s(r.content,t),c=n&&!Array.isArray(n)?[n]:n,i=s(r.rel,t)||z,a=typeof i=="string"?w(i):i,f=s(r.target,t),l=s(r.properties,t);if(l&&Object.assign(t.properties,p(l)),a.length>0&&(t.properties.rel=[...a]),f&&(t.properties.target=f),c){const m=s(r.contentProperties,t)||{};t.children.push({type:"element",tagName:"span",properties:p(m),children:p(c)})}}}})}}function s(e,r){return typeof e=="function"?e(r):e}export{T as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,a2 as h,a3 as c,E as d,a9 as g}from"./vendor-mui-core-
|
|
1
|
+
import{j as t,a2 as h,a3 as c,E as d,a9 as g}from"./vendor-mui-core-DSM7ZGuY.js";import{r as y}from"./vendor-react-DoD83n6N.js";import{aX as v,C as w,B as m}from"./vendor-ux-did-connect-Dg7MsmIi.js";import{P}from"./page-header-B4LQuuxg.js";import{C as E}from"./index-C482NgPS.js";import{u as T}from"./config-space-BsNunj5H.js";import{C as B,D,a as N}from"./connect-to-D_r9o9e2.js";import{S as u}from"./step-actions-D1bVdqNc.js";import{S as b}from"./layout-C6s5HhIK.js";import"./vendor-utils-CbeKtci8.js";import"./vendor-hooks-CYyfK9g3.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-CCyyB91P.js";import"./api-CvDkueg1.js";import"./DeleteOutline-CI9d5QQr.js";import"./format-error-LAoTjvJe.js";import"./content-layout-BQE-NWxj.js";function l({onNext:a,onPrevious:x}){var n,r,p;const{t:i}=y.useContext(v),{blocklet:e}=E(),{spaceGateway:f,settingStorageEndpoint:C,updateSpaceGateway:j,hasStorageEndpoint:S,loading:o,storageEndpoint:s}=T();return o?t.jsx(w,{relative:"parent",children:t.jsx(h,{})}):t.jsxs(G,{children:[t.jsx("div",{className:"header",children:t.jsx(P,{title:i("setup.didSpace.title"),subTitle:i("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:o,variant:"contained",disabled:o||!s,onClick:()=>a(),children:i("setup.continue")})}),((p=e==null?void 0:e.capabilities)==null?void 0:p.didSpace)==="optional"&&t.jsx(u,{blocklet:e,onStartNow:()=>a("complete"),children:t.jsx(m,{className:"start-now",loading:o,variant:"contained",disabled:o,onClick:()=>a(),children:i(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 Y,t as Fn,g as Mn,e as Ar,a as $n}from"./vendor-react-DoD83n6N.js";import{a1 as en,j as i,a3 as se,bj as Zt,bm as Xt,bi as Qt,ai as wt,T as qe,M as lt,a2 as rt,br as ir,ac as tt,E as B,a9 as je,a4 as ut,v as zn,x as tn,bg as Vn,b1 as Wn,b2 as Hn,I as Gn,bf as Yn,bn as Zn,bO as Xn}from"./vendor-mui-core-O22FPGM4.js";import{p as Re,B as Jt,b as er,X as Qn,aq as Jn,n as Ir,x as ei,y as ti}from"./vendor-utils-CbeKtci8.js";import{c as ri}from"./index-tUQxVYYQ.js";import{r as rn,bo as ft,bp as ni,bq as ii,br as nn,bs as oi,bt as ai,bu as si,bv as on,bw as ci,bx as or,by as li,bz as ui,bA as fi,bB as di,a as ar,bn as an,l as pi,aj as mi,u as De,U as sn,P as hi,ak as Ge,B as Ee,n as gi,am as yi,f as bi,aX as dt,V as Ke,be as vi,p as Ye,X as cn,ae as xi,i as wi,aq as Ei,R as ln,aZ as ji,a2 as un,a1 as fn,bC as Si}from"./vendor-ux-did-connect-D75Zatzm.js";import{N as Ci,v as dn,h as Et,c as Pi,w as Ai}from"./vendor-arcblock-CZsH3o1m.js";import{d as Ii}from"./ViewList-DLzG9ldE.js";import{E as pn}from"./ExternalIssuerIcon-ln92O441.js";import{$ as Oi,f as Ri,z as Ae,aq as sr,m as Xe,a0 as Ni,O as Qe,ar as Ti,h as Ze,C as mn,as as hn,b as Di}from"./index-CBS4EwIH.js";import{y as _i,u as cr,a as gn,k as Ui}from"./vendor-hooks-CYyfK9g3.js";import{u as _e,d as Or,W as yn}from"./dashboard-C07uhZlB.js";import{W as jt}from"./did-address-DIKoCoBp.js";import{P as Be}from"./permission-ZvUR5Tj-.js";import{C as It}from"./click-to-copy-Dc16fHKA.js";import{f as Fe}from"./format-error-LAoTjvJe.js";import{_ as qi}from"./useAsync-D2OhgEkV.js";import{I as Pe}from"./index-D5rqbUOM.js";import{d as ki}from"./DeleteOutline-D4DYIaUj.js";import{C as pt}from"./confirm-Bk48-qWj.js";import{u as mt}from"./session-CD9NaM-v.js";import{i as bn,a as St,p as vn}from"./util-CzgwETtC.js";import{b as Li}from"./sdk-CVa22Xgm.js";import{p as Bi}from"./index-BTiNa1bp.js";import{A as Ki}from"./actions-CBPbCBQc.js";import{S as Fi}from"./shorten-label-DXrhdUJE.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-CtbpqE0c.js";import"./PlayArrow-DI84Lay5.js";import"./get-safe-url-BvS0hy8W.js";import"./index-B67Mm1i9.js";import"./useAsyncRetry-CEJwVPZ6.js";import"./InfoOutlined-HP5LuELQ.js";import"./useSetState-BL3ktMon.js";import"./base32-gJJTbpiB.js";import"./MoreHoriz-Cv3BqpRU.js";var lr={},Mi=en;Object.defineProperty(lr,"__esModule",{value:!0});var xn=lr.default=void 0,$i=Mi(rn()),zi=i;xn=lr.default=(0,$i.default)((0,zi.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 ur=function(e){return i.jsxs("svg",{...e,children:[i.jsx("g",{clipPath:"url(#clip0)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0",children:i.jsx("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]})};ur.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};ur.displayName="person";const Vi=ur;var vt={},Wi=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),wn="%[a-f0-9]{2}",Rr=new RegExp("("+wn+")|([^%]+?)","gi"),Nr=new RegExp("("+wn+")+","gi");function tr(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([],tr(r),tr(n))}function Hi(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Rr)||[],r=1;r<t.length;r++)e=tr(t,r).join(""),t=e.match(Rr)||[];return e}}function Gi(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Nr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=Hi(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Nr.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 Yi=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 Gi(e)}},Zi=(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)]},Xi=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],P=e[h];(s?t.indexOf(h)!==-1:t(h,P,e))&&(r[h]=P)}return r};(function(e){const t=Wi,r=Yi,n=Zi,s=Xi,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 P(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 Q=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=Q};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function E(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 D(a){return Array.isArray(a)?a.sort():typeof a=="object"?D(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function j(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function C(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=j(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function L(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),E(o.arrayFormatSeparator);const u=P(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]=L(T[S],o);else f[g]=L(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]=D(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),E(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 Q=a[S];return Q===void 0?"":Q===null?x(S,o):Array.isArray(Q)?Q.reduce(f(S),[]).join("&"):x(S,o)+"="+x(Q,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=j(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 Q=C(a.url);return a.fragmentIdentifier&&(Q=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${Q}`},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)}})(vt);const at=Fn,Qi={parseNumbers:!1,parseBooleans:!1},Ji={skipNull:!1,skipEmptyString:!1},eo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},P=Object.assign(Object.assign({},Qi),l),E=Object.assign(Object.assign({},Ji),h),x=at.useLocation(),b=(r=at.useHistory)===null||r===void 0?void 0:r.call(at),D=(n=at.useNavigate)===null||n===void 0?void 0:n.call(at),j=_i(),C=Y.useRef(typeof e=="function"?e():e||{}),d=Y.useMemo(()=>vt.parse(x.search,P),[x.search]),L=Y.useMemo(()=>Object.assign(Object.assign({},C.current),d),[d]);return[L,cr(a=>{const o=typeof a=="function"?a(L):a;j(),b&&b[s]({hash:x.hash,search:vt.stringify(Object.assign(Object.assign({},d),o),E)||"?"},x.state),D&&D({hash:x.hash,search:vt.stringify(Object.assign(Object.assign({},d),o),E)||"?"},{replace:s==="replace",state:x.state})})]},to=eo;var _t={exports:{}},Ut={},Tr;function En(){if(Tr)return Ut;Tr=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=E();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 P(o)}function P(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function E(){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={},D,j;function C(o,u,f){f||(f=Error);function g(S,Q,Z){return typeof u=="string"?u:u(S,Q,Z)}var T=function(S){n(Z,S);var Q=l(Z);function Z(H,G,F){var V;return r(this,Z),V=Q.call(this,g(H,G,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 L(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 C("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),C("ERR_INVALID_ARG_TYPE",function(o,u,f){D===void 0&&(D=rr()),D(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&L(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),C("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";j===void 0&&(j=ft);var g=j.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),C("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),C("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];D===void 0&&(D=rr()),D(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),Ut.codes=b,Ut}var qt,Dr;function ro(){if(Dr)return qt;Dr=1;function e(A,I){var K=Object.keys(A);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(A);I&&(R=R.filter(function(W){return Object.getOwnPropertyDescriptor(A,W).enumerable})),K.push.apply(K,R)}return K}function t(A){for(var I=1;I<arguments.length;I++){var K=arguments[I]!=null?arguments[I]:{};I%2?e(Object(K),!0).forEach(function(R){r(A,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(A,R,Object.getOwnPropertyDescriptor(K,R))})}return A}function r(A,I,K){return I=h(I),I in A?Object.defineProperty(A,I,{value:K,enumerable:!0,configurable:!0,writable:!0}):A[I]=K,A}function n(A,I){if(!(A instanceof I))throw new TypeError("Cannot call a class as a function")}function s(A,I){for(var K=0;K<I.length;K++){var R=I[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(A,h(R.key),R)}}function l(A,I,K){return I&&s(A.prototype,I),Object.defineProperty(A,"prototype",{writable:!1}),A}function h(A){var I=P(A,"string");return o(I)==="symbol"?I:String(I)}function P(A,I){if(o(A)!=="object"||A===null)return A;var K=A[Symbol.toPrimitive];if(K!==void 0){var R=K.call(A,I||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(I==="string"?String:Number)(A)}function E(A,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(I&&I.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),Object.defineProperty(A,"prototype",{writable:!1}),I&&w(A,I)}function x(A){var I=d();return function(){var R=a(A),W;if(I){var y=a(this).constructor;W=Reflect.construct(R,arguments,y)}else W=R.apply(this,arguments);return b(this,W)}}function b(A,I){if(I&&(o(I)==="object"||typeof I=="function"))return I;if(I!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(A)}function D(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function j(A){var I=typeof Map=="function"?new Map:void 0;return j=function(R){if(R===null||!L(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof I<"u"){if(I.has(R))return I.get(R);I.set(R,W)}function W(){return C(R,arguments,a(this).constructor)}return W.prototype=Object.create(R.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),w(W,R)},j(A)}function C(A,I,K){return d()?C=Reflect.construct.bind():C=function(W,y,p){var v=[null];v.push.apply(v,y);var _=Function.bind.apply(W,v),N=new _;return p&&w(N,p.prototype),N},C.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 L(A){return Function.toString.call(A).indexOf("[native code]")!==-1}function w(A,I){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,W){return R.__proto__=W,R},w(A,I)}function a(A){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(A)}function o(A){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},o(A)}var u=ft,f=u.inspect,g=En(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(A,I,K){return(K===void 0||K>A.length)&&(K=A.length),A.substring(K-I.length,K)===I}function Q(A,I){if(I=Math.floor(I),A.length==0||I==0)return"";var K=A.length*I;for(I=Math.floor(Math.log(I)/Math.log(2));I;)A+=A,I--;return A+=A.substring(0,K-A.length),A}var Z="",H="",G="",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 X(A){var I=Object.keys(A),K=Object.create(Object.getPrototypeOf(A));return I.forEach(function(R){K[R]=A[R]}),Object.defineProperty(K,"message",{value:A.message}),K}function de(A){return f(A,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(A,I,K){var R="",W="",y=0,p="",v=!1,_=de(A),N=_.split(`
|
|
1
|
+
import{r as Y,t as Fn,g as Mn,e as Ar,a as $n}from"./vendor-react-DoD83n6N.js";import{a1 as en,j as i,a3 as se,bj as Zt,bm as Xt,bi as Qt,ai as wt,T as qe,M as lt,a2 as rt,br as ir,ac as tt,E as B,a9 as je,a4 as ut,v as zn,x as tn,bg as Vn,b1 as Wn,b2 as Hn,I as Gn,bf as Yn,bn as Zn,bO as Xn}from"./vendor-mui-core-DSM7ZGuY.js";import{p as Re,B as Jt,b as er,X as Qn,aq as Jn,n as Ir,x as ei,y as ti}from"./vendor-utils-CbeKtci8.js";import{c as ri}from"./index-tUQxVYYQ.js";import{r as rn,bo as ft,bp as ni,bq as ii,br as nn,bs as oi,bt as ai,bu as si,bv as on,bw as ci,bx as or,by as li,bz as ui,bA as fi,bB as di,a as ar,bn as an,l as pi,aj as mi,u as De,U as sn,P as hi,ak as Ge,B as Ee,n as gi,am as yi,f as bi,aX as dt,V as Ke,be as vi,p as Ye,X as cn,ae as xi,i as wi,aq as Ei,R as ln,aZ as ji,a2 as un,a1 as fn,bC as Si}from"./vendor-ux-did-connect-Dg7MsmIi.js";import{N as Ci,v as dn,h as Et,c as Pi,w as Ai}from"./vendor-arcblock-CCyyB91P.js";import{d as Ii}from"./ViewList-CVmPM3e1.js";import{E as pn}from"./ExternalIssuerIcon-BLzCUF1d.js";import{$ as Oi,f as Ri,z as Ae,aq as sr,m as Xe,a0 as Ni,O as Qe,ar as Ti,h as Ze,C as mn,as as hn,b as Di}from"./index-C482NgPS.js";import{y as _i,u as cr,a as gn,k as Ui}from"./vendor-hooks-CYyfK9g3.js";import{u as _e,d as Or,W as yn}from"./dashboard-CcevSjZB.js";import{W as jt}from"./did-address-DnGQ03FF.js";import{P as Be}from"./permission-C4cBxu8K.js";import{C as It}from"./click-to-copy-BF_uUMNm.js";import{f as Fe}from"./format-error-LAoTjvJe.js";import{_ as qi}from"./useAsync-D2OhgEkV.js";import{I as Pe}from"./index-MSp2Bfol.js";import{d as ki}from"./DeleteOutline-CI9d5QQr.js";import{C as pt}from"./confirm-SUs_DctB.js";import{u as mt}from"./session-D0E4yKh1.js";import{i as bn,a as St,p as vn}from"./util-BT3jBHtZ.js";import{b as Li}from"./sdk-CdntdIAz.js";import{p as Bi}from"./index-CcooKt06.js";import{A as Ki}from"./actions-DqC3kJCr.js";import{S as Fi}from"./shorten-label-CYUVOsQQ.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-B4mjl5_Q.js";import"./PlayArrow-B_DkcrSm.js";import"./get-safe-url-D5pnveC6.js";import"./index-BvH3rra0.js";import"./useAsyncRetry-Dju2R4r6.js";import"./InfoOutlined-DNOhP8aN.js";import"./useSetState-BL3ktMon.js";import"./base32-CwsOMJzz.js";import"./MoreHoriz-DvRtrl2X.js";var lr={},Mi=en;Object.defineProperty(lr,"__esModule",{value:!0});var xn=lr.default=void 0,$i=Mi(rn()),zi=i;xn=lr.default=(0,$i.default)((0,zi.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 ur=function(e){return i.jsxs("svg",{...e,children:[i.jsx("g",{clipPath:"url(#clip0)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0",children:i.jsx("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]})};ur.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};ur.displayName="person";const Vi=ur;var vt={},Wi=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),wn="%[a-f0-9]{2}",Rr=new RegExp("("+wn+")|([^%]+?)","gi"),Nr=new RegExp("("+wn+")+","gi");function tr(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([],tr(r),tr(n))}function Hi(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Rr)||[],r=1;r<t.length;r++)e=tr(t,r).join(""),t=e.match(Rr)||[];return e}}function Gi(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Nr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=Hi(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Nr.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 Yi=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 Gi(e)}},Zi=(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)]},Xi=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],P=e[h];(s?t.indexOf(h)!==-1:t(h,P,e))&&(r[h]=P)}return r};(function(e){const t=Wi,r=Yi,n=Zi,s=Xi,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 P(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 Q=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=Q};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function E(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 D(a){return Array.isArray(a)?a.sort():typeof a=="object"?D(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function j(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function C(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=j(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function L(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),E(o.arrayFormatSeparator);const u=P(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]=L(T[S],o);else f[g]=L(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]=D(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),E(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 Q=a[S];return Q===void 0?"":Q===null?x(S,o):Array.isArray(Q)?Q.reduce(f(S),[]).join("&"):x(S,o)+"="+x(Q,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=j(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 Q=C(a.url);return a.fragmentIdentifier&&(Q=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${Q}`},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)}})(vt);const at=Fn,Qi={parseNumbers:!1,parseBooleans:!1},Ji={skipNull:!1,skipEmptyString:!1},eo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},P=Object.assign(Object.assign({},Qi),l),E=Object.assign(Object.assign({},Ji),h),x=at.useLocation(),b=(r=at.useHistory)===null||r===void 0?void 0:r.call(at),D=(n=at.useNavigate)===null||n===void 0?void 0:n.call(at),j=_i(),C=Y.useRef(typeof e=="function"?e():e||{}),d=Y.useMemo(()=>vt.parse(x.search,P),[x.search]),L=Y.useMemo(()=>Object.assign(Object.assign({},C.current),d),[d]);return[L,cr(a=>{const o=typeof a=="function"?a(L):a;j(),b&&b[s]({hash:x.hash,search:vt.stringify(Object.assign(Object.assign({},d),o),E)||"?"},x.state),D&&D({hash:x.hash,search:vt.stringify(Object.assign(Object.assign({},d),o),E)||"?"},{replace:s==="replace",state:x.state})})]},to=eo;var _t={exports:{}},Ut={},Tr;function En(){if(Tr)return Ut;Tr=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=E();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 P(o)}function P(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function E(){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={},D,j;function C(o,u,f){f||(f=Error);function g(S,Q,Z){return typeof u=="string"?u:u(S,Q,Z)}var T=function(S){n(Z,S);var Q=l(Z);function Z(H,G,F){var V;return r(this,Z),V=Q.call(this,g(H,G,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 L(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 C("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),C("ERR_INVALID_ARG_TYPE",function(o,u,f){D===void 0&&(D=rr()),D(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&L(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),C("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";j===void 0&&(j=ft);var g=j.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),C("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),C("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];D===void 0&&(D=rr()),D(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),Ut.codes=b,Ut}var qt,Dr;function ro(){if(Dr)return qt;Dr=1;function e(A,I){var K=Object.keys(A);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(A);I&&(R=R.filter(function(W){return Object.getOwnPropertyDescriptor(A,W).enumerable})),K.push.apply(K,R)}return K}function t(A){for(var I=1;I<arguments.length;I++){var K=arguments[I]!=null?arguments[I]:{};I%2?e(Object(K),!0).forEach(function(R){r(A,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(A,R,Object.getOwnPropertyDescriptor(K,R))})}return A}function r(A,I,K){return I=h(I),I in A?Object.defineProperty(A,I,{value:K,enumerable:!0,configurable:!0,writable:!0}):A[I]=K,A}function n(A,I){if(!(A instanceof I))throw new TypeError("Cannot call a class as a function")}function s(A,I){for(var K=0;K<I.length;K++){var R=I[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(A,h(R.key),R)}}function l(A,I,K){return I&&s(A.prototype,I),Object.defineProperty(A,"prototype",{writable:!1}),A}function h(A){var I=P(A,"string");return o(I)==="symbol"?I:String(I)}function P(A,I){if(o(A)!=="object"||A===null)return A;var K=A[Symbol.toPrimitive];if(K!==void 0){var R=K.call(A,I||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(I==="string"?String:Number)(A)}function E(A,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(I&&I.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),Object.defineProperty(A,"prototype",{writable:!1}),I&&w(A,I)}function x(A){var I=d();return function(){var R=a(A),W;if(I){var y=a(this).constructor;W=Reflect.construct(R,arguments,y)}else W=R.apply(this,arguments);return b(this,W)}}function b(A,I){if(I&&(o(I)==="object"||typeof I=="function"))return I;if(I!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(A)}function D(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function j(A){var I=typeof Map=="function"?new Map:void 0;return j=function(R){if(R===null||!L(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof I<"u"){if(I.has(R))return I.get(R);I.set(R,W)}function W(){return C(R,arguments,a(this).constructor)}return W.prototype=Object.create(R.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),w(W,R)},j(A)}function C(A,I,K){return d()?C=Reflect.construct.bind():C=function(W,y,p){var v=[null];v.push.apply(v,y);var _=Function.bind.apply(W,v),N=new _;return p&&w(N,p.prototype),N},C.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 L(A){return Function.toString.call(A).indexOf("[native code]")!==-1}function w(A,I){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,W){return R.__proto__=W,R},w(A,I)}function a(A){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(A)}function o(A){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},o(A)}var u=ft,f=u.inspect,g=En(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(A,I,K){return(K===void 0||K>A.length)&&(K=A.length),A.substring(K-I.length,K)===I}function Q(A,I){if(I=Math.floor(I),A.length==0||I==0)return"";var K=A.length*I;for(I=Math.floor(Math.log(I)/Math.log(2));I;)A+=A,I--;return A+=A.substring(0,K-A.length),A}var Z="",H="",G="",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 X(A){var I=Object.keys(A),K=Object.create(Object.getPrototypeOf(A));return I.forEach(function(R){K[R]=A[R]}),Object.defineProperty(K,"message",{value:A.message}),K}function de(A){return f(A,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(A,I,K){var R="",W="",y=0,p="",v=!1,_=de(A),N=_.split(`
|
|
2
2
|
`),q=de(I).split(`
|
|
3
3
|
`),M=0,ne="";if(K==="strictEqual"&&o(A)==="object"&&o(I)==="object"&&A!==null&&I!==null&&(K="strictEqualObject"),N.length===1&&q.length===1&&N[0]!==q[0]){var ue=N[0].length+q[0].length;if(ue<=be){if((o(A)!=="object"||A===null)&&(o(I)!=="object"||I===null)&&(A!==0||I!==0))return"".concat(V[K],`
|
|
4
4
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{j as e,E as f,a9 as Xe,T as B,a2 as F,s as De,a4 as Te,cF as ne,a5 as oe,cG as We,bp as qe,a3 as x,ad as K,cH as we,a1 as ge,ai as H,b1 as V,b2 as G,x as _e,ah as $e,bd as Y}from"./vendor-mui-core-DSM7ZGuY.js";import{l as et,i as Oe,f as pe}from"./vendor-hooks-CYyfK9g3.js";import{r as g,f as tt}from"./vendor-react-DoD83n6N.js";import{C as P,z as J,G as v,h as N,a0 as st,ac as nt,aw as ot}from"./index-C482NgPS.js";import{V as b,u as T,aX as at,p as U,a$ as X,a2 as rt,r as xe,bh as it,B as le,am as ct,C as Ue,aq as lt}from"./vendor-ux-did-connect-Dg7MsmIi.js";import{u as dt}from"./use-mobile-CVbqh2Dx.js";import{y as W,d as Le,L as ut,F as pt,C as Me,x as me}from"./vendor-utils-CbeKtci8.js";import{m as mt,K as ht,t as ft,M as gt,O as xt,P as de,k as St}from"./vendor-arcblock-CCyyB91P.js";import"./api-CvDkueg1.js";import{u as Fe,C as jt,D as yt,a as At}from"./connect-to-D_r9o9e2.js";import{g as Ct,a as Bt,b as bt,i as It,c as he,d as Et,e as vt,h as kt,C as Rt,u as Dt}from"./config-space-BsNunj5H.js";import{f as q}from"./format-error-LAoTjvJe.js";import{I as Tt}from"./index-MSp2Bfol.js";import{E as wt}from"./index-ZhFE0VPc.js";import{d as Ot}from"./MoreHoriz-DvRtrl2X.js";import{c as Ut}from"./dashboard-CcevSjZB.js";import{d as Lt}from"./DeleteOutline-CI9d5QQr.js";import{g as Re}from"./get-safe-url-D5pnveC6.js";import{S as Mt}from"./switch-control-BqINsLim.js";import{L as fe}from"./list-header-s-ciXcTm.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-B4mjl5_Q.js";import"./confirm-SUs_DctB.js";import"./PlayArrow-B_DkcrSm.js";import"./index-BvH3rra0.js";import"./session-D0E4yKh1.js";import"./useAsyncRetry-Dju2R4r6.js";import"./useAsync-D2OhgEkV.js";import"./InfoOutlined-DNOhP8aN.js";import"./useSetState-BL3ktMon.js";async function Ft({blockletDid:t,nodeApi:s,spaceGateways:o}){let n=!1;const r=await Promise.all(o.map(async a=>{let{name:i}=a;const h=await Ct(a.endpoint);return!W(h)&&h!==i&&(i=h,n=!0),{...a,name:i}}));return n&&await Promise.all(r.filter(a=>a.did).map(a=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:a.did},spaceGateway:{...a}}}))),r}function Pt({refresh:t}={}){var r;const{blocklet:s}=P(),o=(r=s==null?void 0:s.meta)==null?void 0:r.did,{api:n}=J();return et(async()=>{if(!o)return[];const{spaceGateways:a}=await n.getBlockletSpaceGateways({input:{did:o}});return await Ft({blockletDid:o,nodeApi:n,spaceGateways:a})??[]},{refreshDeps:[o,t],onError(a){var i;(i=a==null?void 0:a.message)!=null&&i.includes("not logged")?console.warn(a):(console.error(a),b.error(q(a)))}})}function Pe({deps:t,setLoading:s,backupDate:o}={deps:[],setLoading:()=>{},backupDate:new Date}){var j;const{blocklet:n}=P(),[r,a]=g.useState([]),{api:i}=J(),[h,u]=g.useMemo(()=>o?[v(o).startOf("day").toISOString(),v(o).endOf("day").toISOString()]:[v().startOf("month").toISOString(),v().endOf("day").toISOString()],[o]),m=Le(async()=>{try{if(s(!0),!n){a([]);return}const{backups:p}=await i.getBlockletBackups({input:{did:n.meta.did,startTime:h,endTime:u}});a(p??[])}catch(p){console.error(p),b.error(q(p))}finally{s(!1)}},1e3);return Oe(async()=>{m()},[(j=n==null?void 0:n.meta)==null?void 0:j.did].concat(t)),{backups:r}}function zt({appDid:t}){const{backups:s}=Pe(),[o,n]=g.useState({message:"",progress:0,completed:!1}),r=J(),{ws:{useSubscription:a}}=r;return a(N.BlockletEvents.backupProgress,i=>{t===(i==null?void 0:i.appDid)&&n(()=>({...i}))},[t]),g.useEffect(()=>{var i;if(s!=null&&s.length&&ut((i=s[0])==null?void 0:i.status)){const[h]=s;n(()=>({message:h.message,progress:h.progress,completed:h.progress>=100}))}},[s]),o}function Nt({deps:t=[],setLoading:s=()=>{}}={}){var h;const{blocklet:o}=P(),[n,r]=g.useState([]),{api:a}=J(),i=g.useCallback(Le(async()=>{var u;if(!a||!((u=o==null?void 0:o.meta)!=null&&u.did)){r([]);return}try{s(!0);const m=v(),j=m.subtract(1,"year"),{summary:p}=await a.getBlockletBackupSummary({input:{did:o.meta.did,startTime:j.toISOString(),endTime:m.toISOString()}});r(Array.isArray(p)?p:[])}catch(m){console.error("Failed to fetch backup summary:",m),b.error(q(m)),r([])}finally{s(!1)}},1e3),[]);return Oe(async()=>(await i(),()=>{i.cancel()}),[(h=o==null?void 0:o.meta)==null?void 0:h.did].concat(t)),{backupSummary:n}}const ze=g.createContext({}),{Provider:Jt,Consumer:Us}=ze;function Se({children:t}){var ee;const{t:s}=T(),{api:o}=J(),{blocklet:n}=P(),[r,a]=g.useState(),[i,h]=g.useState(!1),{data:u,loading:m,mutate:j}=Pt({refresh:i}),p=pt(u),S=zt({appDid:n==null?void 0:n.appDid}),A=g.useMemo(()=>Bt(n==null?void 0:n.environments),[n==null?void 0:n.environments]),[R,k]=g.useState(!1),{backups:l}=Pe({deps:[S,r],setLoading:k,backupDate:r}),[c,D]=g.useState(!1),{backupSummary:w}=Nt({deps:[c]}),[y,I]=g.useState(u==null?void 0:u.find(d=>d.endpoint===A)),E=(ee=n==null?void 0:n.settings)==null?void 0:ee.autoBackup,C=()=>{h(d=>!d)},O=()=>{D(d=>!d)},M=async d=>{await o.updateAutoBackup({input:{did:n.meta.did,autoBackup:d}})},re=async()=>{await o.abortBlockletBackup({input:{appPid:n.meta.did}})},_=async(d,z)=>{j(L=>{const te=[...L];return te.push({...d,loading:!0}),te}),await Promise.all([o.addBlockletSpaceGateway({input:{did:n.meta.did,spaceGateway:d}}),A!==z&&o.configBlocklet({input:{did:[n.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:z}]}})]),I(d),C()},$=async d=>{d&&(d.endpoint===A&&(await o.configBlocklet({input:{did:[n.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),E!=null&&E.enabled&&await M({enabled:!1})),await o.deleteBlockletSpaceGateway({input:{did:n.meta.did,spaceGatewayDid:d==null?void 0:d.did}}),j(z=>{const L=[...z];return L.splice(L.indexOf(d),1),L}),I(d),C())},ie=async d=>{await Promise.all([o.updateBlockletSpaceGateway({input:{did:n.meta.did,where:{did:d.did},spaceGateway:d}}),A!==d.endpoint&&o.configBlocklet({input:{did:[n.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:d.endpoint}]}})]),b.success(s("storage.spaces.connectedWithName",{name:(d==null?void 0:d.name)??"DID Spaces"})),C()},ce=d=>(d==null?void 0:d.endpoint)===A;return e.jsx(Jt,{value:{spaceGateways:u||[],selectedSpaceGateway:y,addSpaceGateway:_,deleteSpaceGateway:$,updateSpaceGateway:ie,refreshSpaceGateways:C,spaceGatewaysLoading:m,spaceGatewaysFirstLoading:p,spaceGatewayIsSelected:ce,updateAutoBackup:M,abortBlockletBackup:re,backupEndpoint:A,backupProgress:S,backups:l,backupSummary:w,refreshBackupSummary:O,setBackupDate:a,backupsLoading:R,autoBackup:E},children:t})}Se.propTypes={children:f.any.isRequired};Se.defaultProps={};function Q(){return g.useContext(ze)}function ae({...t}){const{blocklet:s}=P(),{info:o}=J(),{t:n}=T(),r=Fe({blocklet:s}),a=st(o),{spaceGateways:i,addSpaceGateway:h}=Q(),u={checkFn:Me.create({baseURL:me(window.location.origin,nt())}).get,webWalletUrl:a,extraParams:{appPid:s.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:o.did}},m=async({endpoint:p,name:S,did:A})=>{const R=await bt(p);if(!await It(R)){b.error(n("storage.spaces.gateway.add.invalidUrl"));return}if(i.some(c=>c.endpoint===p)){b.error(n("storage.spaces.gateway.add.duplicate",{name:S}));return}const l={name:S,did:A,url:R,endpoint:p};await h(l,p),b.success(n("storage.spaces.connectedWithName",{name:(l==null?void 0:l.name)??"DID Spaces"}))},j=async({spaceGateway:p})=>{try{await m(p)}catch(S){console.error(S),b.error(q(S))}};return e.jsx(mt,{...t,options:u,onSuccess:j})}ae.propTypes={};ae.defaultProps={};function Ne({...t}){const{t:s}=g.useContext(at),{blocklet:o,loadingDiskInfo:n,actions:r}=P();if(g.useEffect(()=>{r==null||r.refreshBlocklet({showError:!1,attachDiskInfo:!0})},[]),o.diskInfo){const a=(u,m,j)=>e.jsxs(B,{children:[u," ",e.jsx("strong",{children:m?ot(m):"empty"})]}),i=o.environments.reduce((u,m)=>(u[m.key]=m.value,u),{}),h=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:a(i.BLOCKLET_APP_DIR,o.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:a(i.BLOCKLET_DATA_DIR,o.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:a(i.BLOCKLET_LOG_DIR,o.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:a(i.BLOCKLET_CACHE_DIR,o.diskInfo.cache)}];return e.jsx(Qt,{component:"div",...t,children:h.map(u=>e.jsx(Tt,{valueComponent:"div",nameWidth:120,name:u.name,children:u.value},u.key))})}return n?e.jsx(F,{}):e.jsx(B,{children:s("blocklet.diskInfo.empty")})}const Qt=Xe(B)``,Zt=De(({className:t,...s})=>e.jsx(Te,{...s,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function je({status:t,message:s,createdAt:o}){const{t:n}=T(),r=t===U.BACKUPS.STATUS.PROGRESS&&v().diff(o,"hours")>=U.BACKUPS.TIMEOUT_HOURS,a=r&&n("common.timeoutError"),i=t===U.BACKUPS.STATUS.PROGRESS&&!r,h=t===U.BACKUPS.STATUS.SUCCEEDED&&!r;return i?e.jsxs(B,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(F,{sx:{marginRight:"4px"},size:"12px"}),n("common.progress")]}):h?e.jsx(X,{type:"success",children:n("common.succeeded")}):e.jsxs(x,{display:"inline-flex",alignItems:"center",children:[e.jsx(X,{type:"error",children:n("common.failed")})," ",e.jsx(Te,{style:{display:"flex",alignItems:"center",flexShrink:0},title:s||a,children:e.jsx(we,{children:e.jsx(ft,{style:{width:"24px",height:"24px"},color:"error"})})})]})}je.propTypes={status:f.string.isRequired,message:f.string,createdAt:f.string.isRequired};je.defaultProps={message:""};function ye({metadata:t}){const{t:s}=T();if(W(t))return e.jsx(X,{type:"success",children:s("common.succeeded")});const o=t.count||0,n=t.size||0,r=gt(n,{iec:!0}),a=e.jsxs(x,{p:1,sx:{color:"black",backgroundColor:"white"},borderRadius:1,boxShadow:2,children:[e.jsxs(B,{variant:"body2",children:[s("common.fileCount"),": ",o]}),e.jsxs(B,{variant:"body2",children:[s("common.fileSize"),": ",r]})]});return e.jsxs(x,{display:"inline-flex",alignItems:"center",children:[e.jsx(X,{type:"success",children:s("common.succeeded")})," ",e.jsx(Zt,{title:a,style:{display:"flex",alignItems:"center",flexShrink:0},placement:"left",children:e.jsx(we,{children:e.jsx(xt,{style:{width:"24px",height:"24px"},color:"primary"})})})]})}ye.propTypes={metadata:f.object};ye.defaultProps={metadata:{}};function Ae({...t}){const{t:s,locale:o}=T(),{spaceGateways:n,backups:r,setBackupDate:a,backupsLoading:i,backupSummary:h}=Q(),u=ht({key:"lg"}),m=g.useRef(null),j=g.useCallback(l=>{a(l)},[a]),p=g.useMemo(()=>{const l=v().subtract(1,"year"),c=v().add(1,"day"),D=new Map(h.map(y=>[y.date,{date:y.date,successCount:y.successCount,errorCount:y.errorCount}])),w=[];for(let y=l.clone();v(y).isBefore(c);y=y.add(1,"day")){const I=y.format("YYYY-MM-DD");w.push(D.get(I)||{date:I,successCount:0,errorCount:0})}return w},[h]),S=g.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:10},tooltip:{formatter:y=>{const{date:I,successCount:E,errorCount:C}=p[y.dataIndex]||{date:y.data[0],successCount:0,errorCount:0};return[`<div>${s("common.time")}: ${I}</div>`,`<div>${s("common.succeeded")}: ${E}</div>`,`<div>${s("common.failed")}: ${C}</div>`].join(`
|
|
2
|
+
`)},borderWidth:0,padding:[8,10],textStyle:{fontSize:14},extraCssText:"border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);"},visualMap:{show:!1,min:-12,max:12,pieces:[{min:Number.MIN_SAFE_INTEGER,max:-9,color:ne[600]},{min:-9,max:-6,color:ne[500]},{min:-6,max:-3,color:ne[400]},{min:-3,max:-1,color:ne[300]},{min:0,max:0,color:"#ecedf0"},{min:1,max:3,color:oe[300]},{min:3,max:6,color:oe[400]},{min:6,max:9,color:oe[500]},{min:9,max:Number.MAX_SAFE_INTEGER,color:oe[600]}],orient:"horizontal",left:"center",bottom:10,itemWidth:12,itemHeight:12,textStyle:{color:"#666",fontSize:12}},calendar:{top:30,left:40,right:5,bottom:20,cellSize:[8,8],splitLine:{show:!1},itemStyle:{borderWidth:4,borderColor:"#fff",borderRadius:0,color:"#fff"},dayLabel:{show:!0,firstDay:0,nameMap:["","Mon","","Wed","","Fri",""],position:"start",margin:12,fontSize:14,color:"rgb(31, 35, 40)",fontWeight:"400"},monthLabel:{show:!0,nameMap:"cn",align:"left",color:"rgb(31, 35, 40)",fontWeight:"400",fontSize:16,position:"start"},yearLabel:{show:!1},range:[v().subtract(1,"year").format("YYYY-MM-DD"),v().format("YYYY-MM-DD")],orient:"horizontal"},series:{type:"heatmap",coordinateSystem:"calendar",data:p.map(y=>[y.date,y.errorCount?-y.errorCount:y.successCount]),label:{show:!1},itemStyle:{borderWidth:1.5,borderColor:"#fff",borderRadius:5,color:"#ecedf0"},emphasis:{itemStyle:{borderWidth:2.5,borderColor:We[200],color:"inherit"}}}}),[p,s]);g.useEffect(()=>{m.current&&u&&setTimeout(()=>{m.current.scrollLeft=m.current.scrollWidth},100)},[u,p]);const A=g.useMemo(()=>[{label:"DID Space",name:"target",options:{customBodyRenderLite:l=>{var O;const{targetUrl:c,targetName:D,status:w,createdAt:y}=r[l],I=w===U.BACKUPS.STATUS.PROGRESS&&v().diff(y,"hours")>=U.BACKUPS.TIMEOUT_HOURS,E=w===U.BACKUPS.STATUS.SUCCEEDED&&!I,C=D||((O=n.find(M=>c==null?void 0:c.includes(he(M==null?void 0:M.endpoint))))==null?void 0:O.name)||"Unknown DID Space";return E?e.jsx(qe,{fontSize:"16px",href:c,target:"_blank",children:C}):e.jsx(B,{variant:"body1",fontSize:"16px",children:C})}}},{label:s("common.strategy"),name:"strategy",options:{customBodyRender:l=>{const c=s(l===0?"common.auto":"common.manual");return e.jsx(X,{children:c})}}},{label:s("common.startTime"),name:"createdAt",options:{customBodyRender:l=>v(l).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.endTime"),name:"updatedAt",options:{customBodyRender:l=>W(l)?"":v(l).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.status"),name:"status",options:{customBodyRenderLite:l=>{const c=(r==null?void 0:r[l])??{},{status:D,message:w,createdAt:y,metadata:I}=c,E=D===U.BACKUPS.STATUS.PROGRESS&&v().diff(y,"hours")>=U.BACKUPS.TIMEOUT_HOURS,C=D===U.BACKUPS.STATUS.PROGRESS&&!E,O=D===U.BACKUPS.STATUS.SUCCEEDED&&!E;return C?e.jsxs(B,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(F,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):O?e.jsx(ye,{metadata:I}):e.jsx(je,{status:D,message:w,createdAt:y})}}}],[r,n,s]),R=g.useMemo(()=>p&&p.length>0,[p]),k=g.useMemo(()=>!(r!=null&&r.length),[r]);return e.jsxs(x,{...t,children:[e.jsx(x,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3,children:e.jsx(B,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")})}),R&&e.jsxs(e.Fragment,{children:[e.jsx(x,{ref:m,sx:{overflowX:u?"visible":"hidden",overflowY:"hidden"},children:e.jsx(x,{sx:{minWidth:u?"1600px":"100%",height:"240px"},children:e.jsx(wt,{option:S,style:{height:"100%",width:"100%",padding:"8px"},notMerge:!0,lazyUpdate:!1,opts:{renderer:"canvas"},onEvents:{click:l=>{l.componentType==="series"&&l.data&&j(l.data[0])}}})})}),e.jsx(x,{display:"flex",justifyContent:"flex-end",mr:u?2:5,mb:2,mt:.5,children:e.jsxs(K,{direction:u?"column":"row",spacing:u?2:1,alignItems:"flex-end",width:"100%",justifyContent:u?"flex-start":"flex-end",children:[e.jsxs(K,{direction:"row",alignItems:"center",spacing:1,children:[e.jsxs(B,{variant:"body2",color:"text.secondary",children:[s("storage.spaces.backup.failed"),":"]}),e.jsx(x,{width:12,height:12,bgcolor:"#8B5000",borderRadius:.5}),e.jsx(x,{width:12,height:12,bgcolor:"#A36200",borderRadius:.5}),e.jsx(x,{width:12,height:12,bgcolor:"#C17700",borderRadius:.5}),e.jsx(x,{width:12,height:12,bgcolor:"#E29000",borderRadius:.5})]}),e.jsxs(K,{direction:"row",alignItems:"center",spacing:1,children:[e.jsxs(B,{variant:"body2",color:"text.secondary",children:[s("storage.spaces.backup.without"),":"]}),e.jsx(x,{width:12,height:12,bgcolor:"#ecedf0",borderRadius:.5,border:"1px solid #e0e1e4"})]}),e.jsxs(K,{direction:"row",alignItems:"center",spacing:1,children:[e.jsxs(B,{variant:"body2",color:"text.secondary",children:[s("storage.spaces.backup.succeeded"),":"]}),e.jsx(x,{width:12,height:12,bgcolor:"#9be9a8",borderRadius:.5}),e.jsx(x,{width:12,height:12,bgcolor:"#40c463",borderRadius:.5}),e.jsx(x,{width:12,height:12,bgcolor:"#30a14e",borderRadius:.5}),e.jsx(x,{width:12,height:12,bgcolor:"#216e39",borderRadius:.5})]})]})})]}),k?e.jsx(x,{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:s("storage.spaces.record.emptyData")}):e.jsx(rt,{title:"",loading:i,data:r,columns:A,emptyNode:s("storage.spaces.record.emptyData",o),options:{download:!1,filter:!1,print:!1}})]})}Ae.propTypes={};var Je=function(s){return e.jsxs("svg",{...s,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMsHUisZiXU8k3bVSTrPcHsKEEg8gV/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3MffnLwiHnNH7IoyER5VEI6S4Um++uKyho0BwmD+1rA90yarpO4Z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lwmaTdQtlKJUpbAArh1IONYy6WQkAc9+ZocJMnELtCFNKLySGLwUIuW1fJLBKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};Je.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Qe(){const{t}=T();return e.jsxs(x,{children:[e.jsxs(x,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(Je,{style:{width:250,height:250}}),e.jsx(B,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(ae,{})]}),e.jsx(Ae,{sx:{marginTop:"24px"}}),e.jsx(B,{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2,children:t("common.dataStorage")}),e.jsx(Ne,{})]})}Qe.propTypes={};var Ce={},Kt=ge;Object.defineProperty(Ce,"__esModule",{value:!0});var Ze=Ce.default=void 0,Ht=Kt(xe()),Vt=e;Ze=Ce.default=(0,Ht.default)((0,Vt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var Be={},Gt=ge;Object.defineProperty(Be,"__esModule",{value:!0});var Ke=Be.default=void 0,Yt=Gt(xe()),Xt=e;Ke=Be.default=(0,Yt.default)((0,Xt.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var be={},Wt=ge;Object.defineProperty(be,"__esModule",{value:!0});var He=be.default=void 0,qt=Wt(xe()),_t=e;He=be.default=(0,qt.default)((0,_t.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function Ie({spaceGateway:t,onConfirm:s,onCancel:o}){const{t:n}=T(),[r,a]=g.useState(!1),[i,h]=g.useState(!1),u=(p,S)=>{p==null||p.preventDefault(),p==null||p.stopPropagation(),a(S)},m=async p=>{try{p==null||p.stopPropagation(),h(!0),await(s==null?void 0:s(t)),a(!1)}catch(S){console.error(S),b.error(`${n("storage.space.gateway.delete.failed")}: ${q(S)}`)}finally{a(!1),h(!1)}},j=p=>{u(p,!1),o==null||o(p)};return e.jsxs(e.Fragment,{children:[e.jsxs(H,{color:"red",onClick:p=>u(p,!0),children:[e.jsx(V,{style:{minWidth:24,color:"red"},children:e.jsx(Lt,{fontSize:"small"})}),e.jsx(G,{style:{color:"red"},children:n("common.delete")})]}),e.jsx(it,{title:n("storage.spaces.gateway.delete.title"),open:r,confirmButton:{text:n("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:i}},cancelButton:{text:n("common.cancel"),props:{size:"small",variant:"outlined",disabled:i}},onConfirm:m,onCancel:j,children:e.jsx(B,{sx:{wordWrap:"break-word"},children:n("storage.spaces.gateway.delete.descForBackup",{name:`${t==null?void 0:t.name}`})})})]})}Ie.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool}).isRequired,onConfirm:f.func,onCancel:f.func};Ie.defaultProps={onConfirm:()=>{},onCancel:()=>{}};function Ee({spaceGateway:t,selected:s,onDelete:o,onConnect:n,enableSwitchToSpace:r,backupInProgress:a,...i}){const{abortBlockletBackup:h}=Q(),[u,m]=g.useState(null),{t:j}=T(),[p,S]=g.useState(!1),A=(l,c)=>{l.stopPropagation(),l.preventDefault(),m(c&&l.currentTarget)},R=async l=>{try{S(!0),A(l,!1),await n(t)}catch(c){console.error(c),b.error(c.message)}finally{S(!1)}},k=async l=>{try{S(!0),A(l,!1),await h()}catch(c){console.error(c),b.error(c.message)}finally{S(!1)}};return e.jsxs(e.Fragment,{children:[p||t!=null&&t.loading?e.jsx(F,{sx:{ml:1},size:"24px"}):e.jsx(_e,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:l=>A(l,!0),...i,children:e.jsx(Ot,{})}),e.jsxs($e,{id:"simple-menu",anchorEl:u,keepMounted:!0,open:!!u,onClose:l=>A(l,!1),children:[e.jsxs(H,{onClick:l=>{A(l,!1),window.open(Re(t.endpoint?Et(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx(V,{style:{minWidth:24},children:e.jsx(Ze,{fontSize:"small"})}),e.jsx(G,{children:j("common.open")})]}),e.jsxs(H,{onClick:l=>{A(l,!1),window.open(Re(vt(t.endpoint),{allowDomains:null}))},children:[e.jsx(V,{style:{minWidth:24},children:e.jsx(He,{fontSize:"small"})}),e.jsx(G,{children:j("storage.spaces.strategy.viewBackupFiles")})]}),!s&&r&&e.jsxs(H,{onClick:R,children:[e.jsx(V,{style:{minWidth:24},children:e.jsx(Ke,{fontSize:"small"})}),e.jsx(G,{children:j("storage.spaces.connect.switchToSpace")})]}),a&&e.jsxs(H,{onClick:k,children:[e.jsx(V,{style:{minWidth:24},children:e.jsx(Ut,{fontSize:"small"})}),e.jsx(G,{children:j("storage.spaces.connect.abortBlockletBackup")})]}),!a&&e.jsx(Ie,{spaceGateway:t,onConfirm:async()=>{m(null),await(o==null?void 0:o(t))},onCancel:()=>m(null)})]})]})}Ee.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool,endpoint:f.string.isRequired,loading:f.bool}).isRequired,selected:f.bool.isRequired,enableSwitchToSpace:f.bool,onDelete:f.func,onConnect:f.func,backupInProgress:f.bool};Ee.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};function ve({spaceGateway:t,spaceStatus:s,selected:o,onConnected:n,onDeleted:r,onBackedUp:a}){const{t:i,locale:h}=T(),{blocklet:u}=P(),{api:m,info:{did:j}}=J(),{appDid:p,appName:S,appDescription:A,scopes:R,appUrl:k,referrer:l}=Fe({blocklet:u}),{backupProgress:c,updateSpaceGateway:D,deleteSpaceGateway:w,refreshBackupSummary:y}=Q(),[I,E]=g.useState(!1),[C,O]=g.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:i("storage.spaces.authorize.title",{appName:S},h),scan:i("storage.spaces.authorize.scan",{appName:S},h),confirm:"",success:e.jsx(B,{gutterBottom:!0,children:i("storage.spaces.authorize.success")})},onClose:()=>{O(d=>({...d,open:!1}))}}),M=o&&!I&&s===de.DISCONNECTED,re=o&&!I&&!t.loading&&s===de.CONNECTED,_=o&&I&&s===de.CONNECTED&&(c==null?void 0:c.progress)>=0,$=async()=>{try{if(await kt(t==null?void 0:t.endpoint)){await m.configBlocklet({input:{did:[u.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),b.success(i("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),n==null||n(null,t);return}}catch(d){console.error(d),n==null||n(d,t);return}O(d=>({...d,open:!0,prefix:me(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:Me.create({baseURL:me(t.url,"space")}).get,extraParams:{appDid:p,appName:S,appDescription:A,scopes:R,appUrl:k,referrer:l,nodeDid:j,spaceDid:t.did}}))},ie=async(d,z)=>{const L=z(d.endpoint),te=he(L),Z=d.space?z(d.space):{};if(t.did&&te!==t.did){O(Ye=>({...Ye,open:!1}));const se=i("storage.spaces.gateway.switch.failedForMismatchSpace",{name:Z!=null&&Z.name?Z.name:""});b.error(se),n==null||n(new Error(se),t);return}const ke={...t,name:Z.name??"DID Space",did:Z.did??he(L),endpoint:L};await D(ke),O(se=>({...se,open:!1})),n==null||n(null,ke)},ce=async()=>{try{if(I)return;E(!0),await m.backupBlocklet({input:{appDid:u.appDid,to:"spaces"}})}catch(d){console.error(d),b.error(d.message),a==null||a(d,t)}finally{E(!0)}},ee=async()=>{try{await w(t),b.success(i("storage.spaces.gateway.delete.succeeded",{name:t.name?`(${t.name})`:""})),r==null||r(null,t)}catch(d){console.error(d),r==null||r(d,t)}};return g.useEffect(()=>{c!=null&&c.completed?(o&&((c==null?void 0:c.progress)===100?(b.success(i("storage.spaces.backupSuccessfully")),a==null||a(null,t)):c.message&&(a==null||a(new Error(c==null?void 0:c.message),t)),c.progress=0,c.message=""),E(!1),y()):c.progress&&E(!0)},[c]),e.jsxs(e.Fragment,{children:[e.jsxs(x,{sx:{".action-btn":{borderRadius:1,marginLeft:1}},display:"flex",alignItems:"center",children:[re&&e.jsx(le,{className:"action-btn",variant:"outlined",size:"small",onClick:ce,children:i("storage.spaces.strategy.backupNow")}),M&&e.jsx(le,{className:"action-btn",variant:"outlined",size:"small",onClick:$,children:i("storage.spaces.disconnected.reconnectNow")}),_&&e.jsxs(le,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(F,{variant:"determinate",value:c==null?void 0:c.progress,size:14,sx:{mr:1}}),c==null?void 0:c.progress,"%"]}),e.jsx(ct,{forceConnected:!1,saveConnect:!1,prefix:C.prefix,open:C.open,popup:!0,action:C.action,baseUrl:C.baseUrl,checkFn:C.checkFn,onSuccess:ie,onClose:C.onClose,checkTimeout:C.checkTimeout,extraParams:C.extraParams,messages:C.messages,locale:h},"get-endpoint")]}),e.jsx(Ee,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:o,onDelete:ee,onConnect:$,enableSwitchToSpace:(c==null?void 0:c.completed)||W(c==null?void 0:c.message),backupInProgress:_})]})}ve.propTypes={spaceGateway:f.shape({did:f.string.isRequired,name:f.string.isRequired,url:f.string.isRequired,endpoint:f.string.isRequired,protected:f.bool,loading:f.bool}).isRequired,spaceStatus:f.string.isRequired,selected:f.bool.isRequired,onConnected:f.func,onDeleted:f.func,onBackedUp:f.func};ve.defaultProps={onConnected:()=>{},onDeleted:()=>{},onBackedUp:()=>{}};function Ve({...t}){const{t:s}=T(),{autoBackup:o,updateAutoBackup:n}=Q(),r=async()=>{try{const a=!(o!=null&&o.enabled);await n({enabled:a}),b.success(s(a?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(a){b.error(a.message)}};return e.jsx(Mt,{checked:!!(o!=null&&o.enabled),onChange:r,name:"enableWelcomePage",labelProps:{label:e.jsx(B,{marginRight:"8px",children:e.jsx("span",{children:s("storage.spaces.autoBackup.title")})})},style:{...t.style}})}Ve.propTypes={};function $t(){const{t}=T(),{spaceGateways:s,spaceGatewaysLoading:o,spaceGatewayIsSelected:n}=Q(),r=o&&!(s!=null&&s.length),a=({spaceGateway:i,spaceStatus:h,selected:u,refresh:m})=>e.jsx(ve,{spaceGateway:i,spaceStatus:h,selected:u,onConnected:()=>m(),onBackedUp:j=>j&&m()});return e.jsxs(x,{display:"flex",flexDirection:"column",children:[e.jsx(fe,{sx:{button:{fontSize:"revert",fontWeight:500}},left:e.jsx(B,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:t("storage.spaces.connected.title")}),actions:e.jsxs(e.Fragment,{children:[e.jsx(Ve,{}),e.jsx(ae,{})]})}),e.jsx(x,{mt:2,children:r?e.jsx(x,{display:"flex",justifyContent:"center",children:e.jsx(F,{})}):e.jsx(Y,{container:!0,spacing:2,children:e.jsx(e.Fragment,{children:s.map(i=>e.jsx(Y,{item:!0,xs:12,md:6,children:e.jsx(St,{endpoint:i.endpoint,selected:n(i),action:a},i.endpoint)}))})})}),e.jsx(Ae,{sx:{marginTop:"24px"}}),e.jsx(B,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(Ne,{})]})}function es(){const{spaceGatewaysFirstLoading:t,spaceGateways:s}=Q();return t?e.jsx(Ue,{relative:"parent",children:e.jsx(F,{})}):W(s)?e.jsx(Qe,{}):e.jsx($t,{})}function ts(){return e.jsx(Se,{children:e.jsx(es,{})})}function ss(){const{spaceGateway:t,settingStorageEndpoint:s,updateSpaceGateway:o,hasStorageEndpoint:n,loading:r,storageEndpoint:a}=Dt(),i=pe(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return r?e.jsx(Ue,{relative:"parent",children:e.jsx(F,{})}):e.jsxs(x,{sx:{maxWidth:"md",position:"relative"},children:[n?e.jsx(jt,{spaceGateway:t,settingStorageEndpoint:s}):e.jsx(yt,{}),e.jsx(x,{sx:i,children:e.jsx(At,{onConnect:o,storageEndpoint:a})})]})}function ns(){const{t}=T();return e.jsxs(Rt,{children:[e.jsxs(K,{spacing:1,marginBottom:2,children:[e.jsx(B,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.appLevel.title")}),e.jsx(B,{color:"text.secondary",children:t("storage.appLevel.description")})]}),e.jsx(ss,{})]})}function Ge({navOrientation:t,...s}){const{t:o,locale:n}=T(),{blocklet:r}=P(),a=dt({key:"md"}),[i,h]=tt(),u=i.get("tab")||"backup",m=a?"horizontal":t,j=pe(()=>{var c;const k=[{label:o("common.backup"),value:"backup"}],l=(c=r==null?void 0:r.capabilities)==null?void 0:c.didSpace;return(l===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||l===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&k.push({label:o("common.storage"),value:"storage"}),k},[n,m]),S=pe(()=>({backup:e.jsx(ts,{}),storage:e.jsx(ns,{})}))[u],A=k=>{h(l=>(k==="backup"?l.delete("tab"):l.set("tab",k),l))};if(j.length<=1)return e.jsx(ue,{children:S});const R=e.jsx(lt,{tabs:j,current:u,orientation:m,onChange:A,sx:[{borderRight:1,height:"100%",borderColor:"divider"},m==="horizontal"&&{borderRight:0}]});if(m==="vertical")return e.jsx(x,{...s,children:e.jsxs(Y,{container:!0,columnSpacing:4,columns:24,sx:{mt:-1},children:[e.jsx(Y,{item:!0,md:5,lg:4,children:e.jsx(fe,{left:R})}),e.jsx(Y,{item:!0,md:19,lg:20,children:e.jsx(ue,{sx:{mt:1},children:S})})]})});if(m==="horizontal")return e.jsxs(x,{...s,children:[e.jsx(fe,{left:R}),e.jsx(ue,{sx:{mt:2},children:S})]})}Ge.propTypes={navOrientation:f.oneOf(["vertical","horizontal"])};Ge.defaultProps={navOrientation:"vertical"};const ue=De(x)`
|
|
3
|
+
position: relative;
|
|
4
|
+
min-height: 66vh;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
`;export{Ge as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as He,r as S}from"./vendor-react-DoD83n6N.js";import{j as e,T as H,M as z,bm as we,bZ as Ie,b_ as Y,bK as Pe,bl as Fe,a2 as W,br as We,ac as Me,E as b,a9 as $,bn as Oe,bO as $e,I as _,a3 as C,a1 as qe,ai as De,K as Ue,a4 as ee,t as Ve}from"./vendor-mui-core-
|
|
1
|
+
import{g as He,r as S}from"./vendor-react-DoD83n6N.js";import{j as e,T as H,M as z,bm as we,bZ as Ie,b_ as Y,bK as Pe,bl as Fe,a2 as W,br as We,ac as Me,E as b,a9 as $,bn as Oe,bO as $e,I as _,a3 as C,a1 as qe,ai as De,K as Ue,a4 as ee,t as Ve}from"./vendor-mui-core-DSM7ZGuY.js";import{l as Ge,h as ce,x as Q}from"./vendor-arcblock-CCyyB91P.js";import{u as q,ak as U,B as L,V as B,r as Ke,p as de,X as ue,bk as pe,aj as Ze,a$ as Ye,aX as ke,bD as ve,b8 as Xe}from"./vendor-ux-did-connect-Dg7MsmIi.js";import{E as te}from"./EditIcon-d_J6X2-M.js";import{L as Je}from"./LockIcon-CzTeIv2K.js";import{E as Qe}from"./ExternalIssuerIcon-BLzCUF1d.js";import{K as V,ar as Ce,H as et}from"./vendor-utils-CbeKtci8.js";import{z as N,O as G,at as Ae,C as tt,aa as st,f as rt,h as nt,b as J,au as at}from"./index-C482NgPS.js";import{u as K}from"./dashboard-CcevSjZB.js";import{w as M,P as Se}from"./permission-C4cBxu8K.js";import{L as me}from"./list-header-s-ciXcTm.js";import{C as fe}from"./confirm-SUs_DctB.js";import{f as X}from"./format-error-LAoTjvJe.js";import{C as ot}from"./Google-cBME17GZ.js";import{W as Le}from"./did-address-DnGQ03FF.js";import{_ as it}from"./useSetState-BL3ktMon.js";import"./vendor-hooks-CYyfK9g3.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-B4mjl5_Q.js";import"./PlayArrow-B_DkcrSm.js";import"./get-safe-url-D5pnveC6.js";import"./index-BvH3rra0.js";import"./session-D0E4yKh1.js";import"./useAsyncRetry-Dju2R4r6.js";import"./useAsync-D2OhgEkV.js";import"./InfoOutlined-DNOhP8aN.js";var Z=function(u){return e.jsx("svg",{...u,children:e.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"})})};Z.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};Z.displayName="delete";var Be={exports:{}},Re={exports:{}};(function(){var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h={rotl:function(l,p){return l<<p|l>>>32-p},rotr:function(l,p){return l<<32-p|l>>>p},endian:function(l){if(l.constructor==Number)return h.rotl(l,8)&16711935|h.rotl(l,24)&4278255360;for(var p=0;p<l.length;p++)l[p]=h.endian(l[p]);return l},randomBytes:function(l){for(var p=[];l>0;l--)p.push(Math.floor(Math.random()*256));return p},bytesToWords:function(l){for(var p=[],d=0,i=0;d<l.length;d++,i+=8)p[i>>>5]|=l[d]<<24-i%32;return p},wordsToBytes:function(l){for(var p=[],d=0;d<l.length*32;d+=8)p.push(l[d>>>5]>>>24-d%32&255);return p},bytesToHex:function(l){for(var p=[],d=0;d<l.length;d++)p.push((l[d]>>>4).toString(16)),p.push((l[d]&15).toString(16));return p.join("")},hexToBytes:function(l){for(var p=[],d=0;d<l.length;d+=2)p.push(parseInt(l.substr(d,2),16));return p},bytesToBase64:function(l){for(var p=[],d=0;d<l.length;d+=3)for(var i=l[d]<<16|l[d+1]<<8|l[d+2],f=0;f<4;f++)d*8+f*6<=l.length*8?p.push(u.charAt(i>>>6*(3-f)&63)):p.push("=");return p.join("")},base64ToBytes:function(l){l=l.replace(/[^A-Z0-9+\/]/ig,"");for(var p=[],d=0,i=0;d<l.length;i=++d%4)i!=0&&p.push((u.indexOf(l.charAt(d-1))&Math.pow(2,-2*i+8)-1)<<i*2|u.indexOf(l.charAt(d))>>>6-i*2);return p}};Re.exports=h})();var lt=Re.exports,le={utf8:{stringToBytes:function(u){return le.bin.stringToBytes(unescape(encodeURIComponent(u)))},bytesToString:function(u){return decodeURIComponent(escape(le.bin.bytesToString(u)))}},bin:{stringToBytes:function(u){for(var h=[],l=0;l<u.length;l++)h.push(u.charCodeAt(l)&255);return h},bytesToString:function(u){for(var h=[],l=0;l<u.length;l++)h.push(String.fromCharCode(u[l]));return h.join("")}}},Te=le;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-react-DoD83n6N.js";import{j as L}from"./vendor-mui-core-
|
|
1
|
+
import"./vendor-react-DoD83n6N.js";import{j as L}from"./vendor-mui-core-DSM7ZGuY.js";var t=function(e){return L.jsxs("svg",{...e,children:[L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z",fill:"url(#paint0_linear_615_426)"}),L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z",fill:"url(#paint1_linear_615_426)"}),L.jsxs("defs",{children:[L.jsxs("linearGradient",{id:"paint0_linear_615_426",x1:"31.72",y1:"95.7208",x2:"95.488",y2:"34.3249",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#0FA4B7"}),L.jsx("stop",{offset:"0.494757",stopColor:"#1DC1C7"}),L.jsx("stop",{offset:"1",stopColor:"#2BE0D7"})]}),L.jsxs("linearGradient",{id:"paint1_linear_615_426",x1:"28.4374",y1:"99.2464",x2:"98.7613",y2:"44.9372",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#0FA4B7"}),L.jsx("stop",{offset:"0.494757",stopColor:"#1DC1C7"}),L.jsx("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]})};t.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var s=function(e){return L.jsx("svg",{...e,children:L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.36096 2.3999C7.04725 2.3999 6.76249 2.58326 6.63267 2.86886L0.872671 15.5409C0.825415 15.6448 0.800964 15.7577 0.800964 15.8719V15.9999V27.3919C0.800964 27.8337 1.15914 28.1919 1.60096 28.1919H30.401C30.8428 28.1919 31.201 27.8337 31.201 27.3919V15.8719C31.201 15.7577 31.1765 15.6448 31.1293 15.5409L25.3693 2.86886C25.2394 2.58326 24.9547 2.3999 24.641 2.3999H7.36096ZM2.40096 16.7999V26.5919H29.601V16.7932C29.5669 16.7976 29.5321 16.7999 29.4968 16.7999H22.3993L20.3328 19.8997C20.1845 20.1222 19.9347 20.2559 19.6672 20.2559H11.6032C11.3357 20.2559 11.0859 20.1222 10.9375 19.8997L8.87104 16.7999H2.40096ZM29.2167 15.1999H21.9712C21.7037 15.1999 21.4539 15.3336 21.3056 15.5561L19.239 18.6559H12.0313L9.96483 15.5561C9.81645 15.3336 9.56667 15.1999 9.29919 15.1999H2.78519L7.8761 3.9999H24.1258L29.2167 15.1999Z",fill:"currentColor"})})};s.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};export{s as E,t as S};
|