@abtnode/webapp 1.16.27 → 1.16.28-beta-bfbab430
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-DOwN6I9N.js → Add-DEou6OQu.js} +1 -1
- package/dist/assets/{ArrowDropDown-CEsdzzcK.js → ArrowDropDown-B8q6yJii.js} +1 -1
- package/dist/assets/{Autocomplete-DcC19-q2.js → Autocomplete-CxHBaO5x.js} +1 -1
- package/dist/assets/Breadcrumbs--9MrOMZw.js +1 -0
- package/dist/assets/{ButtonGroup-CKY0O7tT.js → ButtonGroup-BbRXyWVe.js} +1 -1
- package/dist/assets/{CheckCircle-BA-bGNdF.js → CheckCircle-D6vwJd9K.js} +1 -1
- package/dist/assets/{ChevronLeft-DRzRLgnp.js → ChevronLeft-Bc2acyen.js} +1 -1
- package/dist/assets/{ChevronRight-B2YICLYm.js → ChevronRight-Bcko4z80.js} +1 -1
- package/dist/assets/{Close-D9SKZkJ7.js → Close-DGnER_ve.js} +1 -1
- package/dist/assets/Delete-BGOcGa_D.js +1 -0
- package/dist/assets/DeleteOutline-C7JmRduW.js +1 -0
- package/dist/assets/{Done-DaMxTX7e.js → Done-CydSjSOx.js} +1 -1
- package/dist/assets/{Edit-B1ySEana.js → Edit-B0yxTPMe.js} +1 -1
- package/dist/assets/{EditIcon-BQGlXOR3.js → EditIcon-CF5y6ttj.js} +1 -1
- package/dist/assets/{FilterList-DKFhXHd2.js → FilterList-RGEuYf_e.js} +5 -5
- package/dist/assets/{Google-D2cPndsH.js → Google-CuSS9iHp.js} +4 -4
- package/dist/assets/{Https-CsiKqkaT.js → Https-B3P9JJiw.js} +1 -1
- package/dist/assets/{InfoOutlined-BUn5fKCT.js → InfoOutlined-B4lqtuRU.js} +1 -1
- package/dist/assets/{InputAdornment-DHLm1mFN.js → InputAdornment-BzCm_2kz.js} +1 -1
- package/dist/assets/{InputLabel-BjbeXM2B.js → InputLabel-CdW9MyDY.js} +1 -1
- package/dist/assets/{LastPage-DXu9ZGZF.js → LastPage-dDlMsztV.js} +1 -1
- package/dist/assets/{Launch-BIqLZtET.js → Launch-Dhs9Q_70.js} +1 -1
- package/dist/assets/{Link-DN_Lz3rV.js → Link-DSNZ4PNo.js} +1 -1
- package/dist/assets/{LoadingButton-3UN68oPJ.js → LoadingButton-DrVP9tt_.js} +1 -1
- package/dist/assets/{LockIcon-mC00ojRt.js → LockIcon-BMilDbx1.js} +1 -1
- package/dist/assets/{Loop-2BGd9rzF.js → Loop-CAxjNyCL.js} +1 -1
- package/dist/assets/{MoreVert-BCR8irtL.js → MoreVert-BL42DjcZ.js} +1 -1
- package/dist/assets/{Pagination-0NPBd4bk.js → Pagination-DWKt9t_F.js} +1 -1
- package/dist/assets/{Public-333jCEeA.js → Public-BobH8eAT.js} +1 -1
- package/dist/assets/{SchemaReference.es-oKwgj6eC.js → SchemaReference.es-MUfmufV5.js} +1 -1
- package/dist/assets/{Search-5iZBDNjz.js → Search-J7ilvWof.js} +1 -1
- package/dist/assets/{Select-CPvSg7uW.js → Select-DJl6HmRs.js} +2 -2
- package/dist/assets/{Skeleton-B4-1c0OT.js → Skeleton-CSyuj2cV.js} +4 -4
- package/dist/assets/{Slider-DdynydW3.js → Slider-DRCfqhU1.js} +1 -1
- package/dist/assets/{Stepper-DpooXZzV.js → Stepper-C2a4PQ3_.js} +1 -1
- package/dist/assets/{TextField-sj2mcEXD.js → TextField-BD0it3d0.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BKQ2fKoV.js → ToggleButtonGroup-CR3zvwUX.js} +1 -1
- package/dist/assets/{ViewList-Cul4OAvz.js → ViewList-D3pEO1Ca.js} +1 -1
- package/dist/assets/{actions-xngcxvp5.js → actions-CL-Y8Eer.js} +1 -1
- package/dist/assets/actions-Dx15LaaC.js +11 -0
- package/dist/assets/{agreement-DBRJClMM.js → agreement-Dd1yuqFa.js} +9 -9
- package/dist/assets/api-Ce74sKYG.js +1 -0
- package/dist/assets/app-avatar-rgMNqIXw.js +1 -0
- package/dist/assets/{ar-DqmJV4p8.js → ar-DXpJw3XU.js} +1 -1
- package/dist/assets/{audit-logs-BkgPztEs.js → audit-logs-CmuAN_qn.js} +1 -1
- package/dist/assets/{brace-fold.es-CsornGfx.js → brace-fold.es-psNZdrWu.js} +1 -1
- package/dist/assets/{bundle-avatar-DzcvR6DI.js → bundle-avatar-C_2wXttj.js} +1 -1
- package/dist/assets/chart-sF6tbndw.js +35 -0
- package/dist/assets/{click-to-copy-CBs5PKxt.js → click-to-copy-KBQWqGOq.js} +1 -1
- package/dist/assets/{closebrackets.es-5NAqcDxa.js → closebrackets.es-ZHCmqLUg.js} +1 -1
- package/dist/assets/{codemirror.es-CEoouqN7.js → codemirror.es-DmoQbR9T.js} +1 -1
- package/dist/assets/{comment.es-DX01jrAI.js → comment.es-B7zL23d5.js} +1 -1
- package/dist/assets/{config-navigation-Ngw7D7GZ.js → config-navigation-BN7PO-cf.js} +2 -2
- package/dist/assets/{de-CHOUObJ5.js → de-CWxlIdre.js} +1 -1
- package/dist/assets/{delete-confirm-Da1BomBl.js → delete-confirm-ztUwg2kj.js} +1 -1
- package/dist/assets/detail-CXbwmlpg.js +58 -0
- package/dist/assets/{dialog.es-Oh6qpXQO.js → dialog.es-CFWHh6H2.js} +1 -1
- package/dist/assets/{download-DHPNYF1S.js → download-bWTPRaod.js} +1 -1
- package/dist/assets/{es-aZ4oYeVs.js → es-BmrvDK07.js} +1 -1
- package/dist/assets/{foldgutter.es-DqR5-lAT.js → foldgutter.es-CqRhTHya.js} +1 -1
- package/dist/assets/{fr-Bi9vptGI.js → fr-B7SxgRy3.js} +1 -1
- package/dist/assets/getValidReactChildren-DKO9kPop.js +1 -0
- package/dist/assets/{hi-BXYjfUTP.js → hi-BRRtNIB_.js} +1 -1
- package/dist/assets/{hint.es-D5LvE1_r.js → hint.es-DK_6KY-o.js} +1 -1
- package/dist/assets/{hint.es2-CgI0iRUf.js → hint.es2-CgWo28Uj.js} +1 -1
- package/dist/assets/{id-VVXvzjmO.js → id-D6-Qi7Q1.js} +1 -1
- package/dist/assets/{iframe-BcDoraJg.js → iframe-C32DbqVc.js} +1 -1
- package/dist/assets/{index-CWilKNfl.js → index-84DtgjQO.js} +6 -6
- package/dist/assets/{index-DuwHJNV9.js → index-B0WN-XH2.js} +1 -1
- package/dist/assets/{index-Cl7gQviA.js → index-B4ZjZNN8.js} +1 -1
- package/dist/assets/{index-CsVg93BX.js → index-BA_TAXpL.js} +2 -2
- package/dist/assets/{index-CAH8ukaj.js → index-BD7uC7gm.js} +4 -4
- package/dist/assets/{index-DPGsh5ca.js → index-BET56ssY.js} +1 -1
- package/dist/assets/{index-zUZPbg2I.js → index-BNulkcXj.js} +1 -1
- package/dist/assets/{index--Q6KdM7v.js → index-BoZhSN8h.js} +1 -1
- package/dist/assets/{index-BgqVsUwi.js → index-Bzs05ai8.js} +1 -1
- package/dist/assets/index-C4aM6rsI.js +54 -0
- package/dist/assets/index-C6fuJWed.js +262 -0
- package/dist/assets/{index-DC46OSan.js → index-CE4mBIM_.js} +1 -1
- package/dist/assets/{index-4SJGeyEI.js → index-CEBXL16c.js} +1 -1
- package/dist/assets/{index-DV-pE5RI.js → index-CYGLUEkg.js} +3 -3
- package/dist/assets/index-CYZ-ZpV5.js +80 -0
- package/dist/assets/{index-B6ReOJJN.js → index-Ca7UJIsi.js} +1 -1
- package/dist/assets/{index-BXmzbebA.js → index-CfOOBUnf.js} +2 -2
- package/dist/assets/{index-C7GDLIo-.js → index-CiaQ1OoK.js} +1 -1
- package/dist/assets/{index-CtWm5SK6.js → index-Cj3s4CtX.js} +4 -4
- package/dist/assets/{index-Boqyvc8Q.js → index-CkI554oc.js} +212 -211
- package/dist/assets/{index-eGpwmK92.js → index-Clbjq5Ay.js} +3 -3
- package/dist/assets/{index-Bvs8qR9r.js → index-CsNkkebn.js} +1 -1
- package/dist/assets/{index-BwcFSka9.js → index-CwOFD6vt.js} +1 -1
- package/dist/assets/{index-DoMsU5M2.js → index-CzZF4DJ9.js} +1 -1
- package/dist/assets/{index-B-OHtxJg.js → index-D2cgpNGA.js} +57 -57
- package/dist/assets/{index-DycwPjM3.js → index-D5A34D-v.js} +1 -1
- package/dist/assets/index-D9RqTndg.js +21 -0
- package/dist/assets/index-DA4GWzzk.js +85 -0
- package/dist/assets/{index-CBdVDTUr.js → index-DG50udXf.js} +4 -4
- package/dist/assets/index-DHDAQRQS.js +11 -0
- package/dist/assets/index-DbaRhcjK.js +1 -0
- package/dist/assets/{index-BPEtPX12.js → index-Dc48oA1e.js} +7 -7
- package/dist/assets/index-DeSsBKwN.js +16 -0
- package/dist/assets/{index-Ct_q9GS4.js → index-Dlmo3B4P.js} +1 -1
- package/dist/assets/index-DoYPOJLK.js +530 -0
- package/dist/assets/{index-BCPsngBN.js → index-DuHl-QWf.js} +1 -1
- package/dist/assets/{index-opBznRc5.js → index-HMFhZkjG.js} +11 -11
- package/dist/assets/{index-_NTV4-zc.js → index-aVpXIXlo.js} +5 -5
- package/dist/assets/index-dQw_Q0Sx.js +58 -0
- package/dist/assets/{index-BCQQEHyP.js → index-lXzOGnDm.js} +11 -11
- package/dist/assets/index-lfuZxoX8.js +11 -0
- package/dist/assets/{index-DZnZf-o0.js → index-owRl0jyR.js} +16 -16
- package/dist/assets/{index-D81FDm0a.js → index-sNR67yJ2.js} +1 -1
- package/dist/assets/{index.es-C_vrKJwx.js → index.es-r9xAwx7Q.js} +1 -1
- package/dist/assets/{index.esm-Cnicyd3_.js → index.esm-BCQ0BZMT.js} +1 -1
- package/dist/assets/{info-addon.es-B0sGOwNz.js → info-addon.es-BDFdJmkW.js} +1 -1
- package/dist/assets/{info.es-x51I_2sm.js → info.es-CBadJSwW.js} +1 -1
- package/dist/assets/install-from-url-DuxahkOW.js +1 -0
- package/dist/assets/{invitation-B30vIvMt.js → invitation-CSvGVnhZ.js} +6 -6
- package/dist/assets/{isEqual-DbZp5EUk.js → isEqual-DLk5wI5o.js} +1 -1
- package/dist/assets/{item-BdJl6I8q.js → item-Bv034Zcl.js} +13 -13
- package/dist/assets/{ja-DqJiajLu.js → ja--dtwu5Xy.js} +1 -1
- package/dist/assets/{javascript.es-AOt9muQq.js → javascript.es-Bq6krn1L.js} +1 -1
- package/dist/assets/{jump-to-line.es-p4ynQoBS.js → jump-to-line.es-Cm-kakdo.js} +1 -1
- package/dist/assets/{jump.es-BrSOPKg0.js → jump.es-VEZCju5l.js} +1 -1
- package/dist/assets/{ko-DQKmtlbI.js → ko-DpRJDWhF.js} +1 -1
- package/dist/assets/{line-DdSLBn8H.js → line-VNmgswg2.js} +4 -4
- package/dist/assets/{lint.es-BMdrvXUs.js → lint.es-DhrBN362.js} +1 -1
- package/dist/assets/{lint.es2-DX4OlyGK.js → lint.es2-CWQYXYDN.js} +1 -1
- package/dist/assets/{lint.es3-BYQCiNDn.js → lint.es3-HsrZT9m1.js} +1 -1
- package/dist/assets/{list-header-BnipX_Rp.js → list-header-DsWkp7IV.js} +1 -1
- package/dist/assets/{log-i4SQ4Z0y.js → log-DgVRxyob.js} +2 -2
- package/dist/assets/{lottie-BYxFXW-g.js → lottie-CYf1PmCL.js} +1 -1
- package/dist/assets/{matchbrackets.es-aeJus3PD.js → matchbrackets.es-BthTk6Jn.js} +1 -1
- package/dist/assets/{memory-Cu-5WL0k.js → memory-dGmMptAO.js} +1 -1
- package/dist/assets/{mode.es-CXfOP3-9.js → mode.es-_GdTPtpx.js} +1 -1
- package/dist/assets/{mode.es2-DOeKit6c.js → mode.es2-brmgogqJ.js} +1 -1
- package/dist/assets/{mode.es3-8pUUSOKg.js → mode.es3-DPGB-Rg-.js} +1 -1
- package/dist/assets/{onlineParser.es-Bsw_5f31.js → onlineParser.es-BUsBjG_x.js} +1 -1
- package/dist/assets/overview-BjqHXIvR.js +23 -0
- package/dist/assets/{pt-si0ACe2m.js → pt-BxA88dKG.js} +1 -1
- package/dist/assets/{react-BU7lI6gg.js → react-B-xa5K3p.js} +22 -22
- package/dist/assets/{redux-07bmubSg.js → redux-BBckwmBz.js} +1 -1
- package/dist/assets/{resource-dialog-Co295aU2.js → resource-dialog-CIpxrG7w.js} +2 -2
- package/dist/assets/{ru-B36cpSA6.js → ru-C9WJaQoQ.js} +1 -1
- package/dist/assets/runtime-mnz4kggA.js +1 -0
- package/dist/assets/{search.es-ByHwIa0U.js → search.es-CV0d4AUV.js} +1 -1
- package/dist/assets/{searchcursor.es-CsQOLBoo.js → searchcursor.es-CxYOh1mB.js} +1 -1
- package/dist/assets/service-DbM6n6e-.js +1 -0
- package/dist/assets/{show-hint.es-BY2B9aLR.js → show-hint.es-GDHMVUwy.js} +1 -1
- package/dist/assets/{slicedToArray-BwJA6b7k.js → slicedToArray-Pwxti1pp.js} +3 -3
- package/dist/assets/spaces-3s9pbV-M.js +1 -0
- package/dist/assets/{sublime.es-DZOyVbIC.js → sublime.es-BiX2tLa_.js} +1 -1
- package/dist/assets/{switch-control-D1Iqbf5D.js → switch-control-1CHbJzd5.js} +1 -1
- package/dist/assets/{table-icons-CB9vK-gH.js → table-icons-DjAM1A7C.js} +10 -10
- package/dist/assets/{tag-CANB-Fll.js → tag-CdoBHuxB.js} +1 -1
- package/dist/assets/team-CrNp0IgF.js +1 -0
- package/dist/assets/{th-Dtc8_3Sk.js → th-z7LSYRZi.js} +1 -1
- package/dist/assets/toUpper-C7enqaxL.js +1 -0
- package/dist/assets/{traffic-CmQ-j2sa.js → traffic-Bw_e_wEP.js} +5 -5
- package/dist/assets/url-evaluation-asC5XTLH.js +7 -0
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-R82fq7SC.js +1 -0
- package/dist/assets/{useLocalStorage-BNvbpN9F.js → useLocalStorage-DRS65jti.js} +1 -1
- package/dist/assets/util-BC42zb0j.js +1 -0
- package/dist/assets/{vi-DpH7bkpR.js → vi-CAtyUyNW.js} +1 -1
- package/dist/assets/{wait-container-mYVBI-ZE.js → wait-container-DzvlQJkQ.js} +4 -4
- package/dist/assets/withStyles-CPWhmxGn.js +1 -0
- package/dist/assets/wrap-locale-p7nrsckq.js +1 -0
- package/dist/assets/{zh-Dizc5DZz.js → zh-BVBeddUa.js} +1 -1
- package/dist/assets/{zh-tw-Cb93tcSH.js → zh-tw-CoStw7dd.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/Breadcrumbs-f87TWJgq.js +0 -1
- package/dist/assets/Delete-h8Ye2r4b.js +0 -1
- package/dist/assets/DeleteOutline-C-1A8rVu.js +0 -1
- package/dist/assets/DeleteOutline-ClZ-ABF-.js +0 -1
- package/dist/assets/actions-ByUCXaaH.js +0 -11
- package/dist/assets/api-BdOqJGVs.js +0 -1
- package/dist/assets/app-avatar-DEqDSBYG.js +0 -1
- package/dist/assets/chart-CQeRS3mZ.js +0 -35
- package/dist/assets/detail-CaMUtLL5.js +0 -58
- package/dist/assets/getValidReactChildren-B_HEoXEd.js +0 -1
- package/dist/assets/index-3vcNDYsD.js +0 -530
- package/dist/assets/index-B7-XNbV9.js +0 -85
- package/dist/assets/index-BMkbX5aS.js +0 -11
- package/dist/assets/index-B_M-nPU6.js +0 -58
- package/dist/assets/index-DMKpICI6.js +0 -1
- package/dist/assets/index-DY9g7uAE.js +0 -54
- package/dist/assets/index-DdxWI-QG.js +0 -262
- package/dist/assets/index-DwOVPSU7.js +0 -21
- package/dist/assets/index-Mr6j5sdU.js +0 -11
- package/dist/assets/index-PDofIfka.js +0 -80
- package/dist/assets/index-RlfSCcPa.js +0 -16
- package/dist/assets/install-from-url-Cnfp9xqR.js +0 -1
- package/dist/assets/overview-CnuzNSfm.js +0 -23
- package/dist/assets/runtime-CW-W-Oej.js +0 -1
- package/dist/assets/service-DNZLEaeT.js +0 -1
- package/dist/assets/spaces-CGO2dSgv.js +0 -1
- package/dist/assets/team-rrZYIohT.js +0 -1
- package/dist/assets/toUpper-D0HPBfn5.js +0 -1
- package/dist/assets/url-evaluation-DymLev_N.js +0 -7
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-YWN8QaVT.js +0 -1
- package/dist/assets/util-CRUZQ4-B.js +0 -1
- package/dist/assets/withStyles-CSLQqeaB.js +0 -1
- package/dist/assets/wrap-locale-B076jNc7.js +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{aj as J,z as A,r as p,a as X,b as Z,P as x,q as j,u as P,y as ee,au as $,M as N,j as t,x as _,av as te,a1 as S,m as R,D as q,aw as se,U as M,ax as oe,B as O,C as W,ay as re,A as z,K,az as ne,aA as ae,aB as le,F as ie,i as ce,n as V,aa as ue,a4 as de,a7 as pe,a8 as he,aC as fe,a9 as me,O as ge}from"./index-CkI554oc.js";import{_ as D}from"./useLocalStorage-DRS65jti.js";import{c as xe,C as be,A as ye,D as ke,B as Se,S as H,a as je,b as Pe}from"./item-Bv034Zcl.js";import{d as we}from"./ArrowDropDown-B8q6yJii.js";import{B as ve}from"./Breadcrumbs--9MrOMZw.js";import"./index-Clbjq5Ay.js";import"./index-CfOOBUnf.js";import"./Search-J7ilvWof.js";import"./index-sNR67yJ2.js";import"./Select-DJl6HmRs.js";import"./InputAdornment-BzCm_2kz.js";import"./preact.module-B1z5cdvs.js";import"./Add-DEou6OQu.js";import"./TextField-BD0it3d0.js";import"./InputLabel-CdW9MyDY.js";import"./Launch-Dhs9Q_70.js";import"./Done-CydSjSOx.js";import"./DeleteOutline-C7JmRduW.js";import"./delete-confirm-ztUwg2kj.js";import"./click-to-copy-KBQWqGOq.js";import"./MoreVert-BL42DjcZ.js";import"./ButtonGroup-BbRXyWVe.js";import"./getValidReactChildren-DKO9kPop.js";function Re(e){const n=J(),c=A(),[s,o]=D(`sid:blocklet:purchase:${e}`),[i,u]=p.useState(!1),[h,a]=p.useState(null),d=()=>{const{pathname:r,searchParams:m}=new URL(window.location.href),b=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";m.get("sid")&&(o(""),c(r.replace(b,"/"),{replace:!0}))},l=!!(n.get("assetDid")&&s&&n.get("sid")===s);return X(Z.BlockletEvents.purchaseChange,r=>{r.did===e&&(a(r.session),["declined","confirmed","error"].includes(r.session.status)&&(u(!0),setTimeout(d,2e3)))}),p.useEffect(()=>{h&&h.id!==s&&o(h.id)},[h]),{hasCompleted:i,hasPurchased:l,session:h,setSession:a,doRedirect:d}}function B({meta:e,onCancel:n,handlePaySuccess:c,storeUrl:s}){const{t:o}=j(),{info:i}=P(),[u,h]=p.useState("both"),[a,d]=p.useState(1),l=ee(i),r=$(e,i,s),m=v=>{v!==u&&h(v)},b=()=>{u&&(d(2),u==="verify"&&(window.location.href=r))},y=(v,L)=>{L!=="backdropClick"&&n()},w=()=>{c(r)},f=N.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(_,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:te.create({baseURL:S(s,"/store")}).get,onSuccess:w,onClose:n,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:l,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:f}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(R,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(R,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:f})]})]})}});const g=q;return t.jsx(g,{title:o("store.purchase.title",{name:f}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:y,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(be,{action:u,onNext:b,onSelect:m})})})}B.propTypes={...xe,storeUrl:x.string.isRequired,handlePaySuccess:x.func};B.defaultProps={handlePaySuccess:e=>{setTimeout(()=>{window.location.href=e},1e3)}};function E({meta:e,buttonText:n,storeUrl:c,isResource:s}){const{t:o}=j(),i=A(),{info:u}=P(),{api:h}=se(),a=N.isFreeBlocklet(e)===!1,[d,l]=p.useState(!1),{hasPurchased:r}=Re(e.did),[m,b]=p.useState(!1),[y]=D("instant-blocklet-install",!1),[w,f]=p.useState(!1),g=p.useMemo(()=>d?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[d,o,a]),v=p.useMemo(()=>s?o("blocklet.status.resource"):a?n.purchase:n.launch,[a,n,s]),L=k=>{k.preventDefault(),k.stopPropagation();try{if(l(!0),a){b(!0);return}if(y){f(!0);return}if(!a){const C=$(e,u,c);window.location.href=C;return}}catch(C){z.error(K(C),{autoHideDuration:5e3}),console.error("Blocklet installed failed",C)}finally{l(!1)}},G=()=>{l(!1),b(!1)},Q=k=>{l(!1),f(!1),i(`/blocklets/${k.appDid}/components`)},Y=()=>{l(!1),f(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(M,{permission:"mutate_blocklets",children:k=>t.jsx(oe,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(O,{onClick:L,size:"small",sx:{cursor:s?"not-allowed":"pointer"},disabled:!!(g||!k),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:g?t.jsxs(t.Fragment,{children:[t.jsx(W,{size:16,style:{marginRight:3}}),g]}):v},e.did)})})}),(r||m)&&t.jsx(B,{method:"launch",meta:e,mode:"both",onCancel:G,storeUrl:c}),w&&t.jsx(_,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:h.get,checkTimeout:5*60*1e3,onSuccess:Q,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(re(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:Y})]})}E.propTypes={isResource:x.bool,meta:x.object.isRequired,buttonText:x.shape({purchase:x.string.isRequired,launch:x.string.isRequired}).isRequired,storeUrl:x.string.isRequired};E.defaultProps={isResource:!1};const Ce=(e,n,c)=>{const s=ue(n);return S(c,`/blocklets/${e.did}/?server-url=${s}`)},F=({meta:e,attribute:n,value:c})=>e._formatted?e._formatted[n]:c;function U({blocklet:e,endpoint:n}){const{t:c}=j(),s=P();let o=S(s.imgPrefix,"blocklet.png");const i=n;if(i.startsWith("http")&&e.logo)o=S(i,le(e.did,e.logo,e.version));else{let r=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");r&&(r=`/${r}`),o=S(r,`/blocklet/logo/${e.did}`)}try{const l=new URL(o);l.searchParams.set("v",e.version||+new Date),o=l.href}catch{}const u=(s==null?void 0:s.info.mode)!==ie.NODE_MODES.SERVERLESS,h=l=>l.currentTarget.contains(l.target)?!0:(l.preventDefault(),!1),a={meta:e,buttonText:{purchase:c("common.purchase"),launch:c("common.launch")},storeUrl:i};let d=null;return u&&(d=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(E,{isResource:!e.group,...a})})),t.jsx(ce,{href:Ce(e,s.info,n),style:{color:"initial",textDecoration:"none"},onClick:h,target:"_blank",children:t.jsx(De,{title:F({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:F({meta:e,attribute:"description",value:e.description}),cover:e.logo?o:"",version:e.version,button:d})})}U.propTypes={blocklet:x.object.isRequired,endpoint:x.string};U.defaultProps={endpoint:""};function T({storeUrl:e,handleSearchSelect:n,extraFilter:c,...s}){var r;const{locale:o}=j(),i=P(),[u,h]=p.useState({}),a=m=>{h(m)},d=e,l=(r=i==null?void 0:i.info)==null?void 0:r.version;return p.useEffect(()=>{h({})},[d]),t.jsx(ne,{FallbackComponent:ae,resetKeys:[d],children:t.jsx("div",{...s,children:t.jsx(ke,{blockletRender:m=>{const b={...m,endpoint:d};return t.jsx(U,{...b})},baseSearch:!0,endpoint:d,locale:o,onFilterChange:a,onSearchSelect:n,filters:u,extraFilter:c,serverVersion:l})})})}T.propTypes={storeUrl:x.string.isRequired,handleSearchSelect:x.func,extraFilter:x.func};T.defaultProps={handleSearchSelect:null,extraFilter:void 0};const De=V(Se)`
|
|
2
|
+
.ms-highlight {
|
|
3
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
4
|
+
}
|
|
5
|
+
`,Le=de(()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})),I=p.forwardRef(({onChange:e,onDelete:n},c)=>{const{info:s}=P(),{t:o}=j(),[i,u]=p.useState(!1),[h,a]=p.useState(!1),[d,l]=p.useState(-1),r=Le(),[m,b]=D(H),y=Math.max(s.blockletRegistryList.findIndex(f=>f.url===m),0),w=f=>{try{u(!0),l(f);const g=s.blockletRegistryList[f];b(g.url),e(g.url),a(!1)}catch(g){console.error(g),z.error(`${o("store.blockletRegistry.changeFailed")} ${K(g)}`)}finally{u(!1)}};return p.useImperativeHandle(c,()=>({setOpen:a})),t.jsxs(t.Fragment,{children:[t.jsx(M,{permission:"mutate_node",children:f=>t.jsx(O,{disabled:!f,classes:{text:r.buttonText},color:"secondary","data-cy":"store-toggle",onClick:()=>{a(!0)},endIcon:t.jsx(we,{}),children:t.jsx(R,{color:"secondary",children:s.blockletRegistryList[y].name})})}),t.jsx(q,{title:o("store.blockletRegistry.switchRegistry"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:h,onClose:()=>a(!1),children:t.jsxs(pe,{className:r.tabPanel,children:[s.blockletRegistryList.map((f,g)=>t.jsxs(he,{button:!0,disabled:i,selected:y===g,"data-cy":"store-switch",onClick:()=>{if(!i){if(g===y){a(!1);return}w(g)}},children:[d===g&&i&&t.jsx(fe,{className:r.iconRoot,children:t.jsx(W,{size:16})}),t.jsx(me,{children:t.jsx(je,{teamDid:s.did,store:f,onDelete:()=>n(f.url)})})]},f.url)),t.jsx(Pe,{disabled:i,onAdd:e,teamDid:s.did,blockletRegistryList:s.blockletRegistryList})]})})]})});I.propTypes={onChange:x.func,onDelete:x.func};I.defaultProps={onChange:()=>{},onDelete:()=>{}};const Be=I;function tt(){const{t:e}=j(),{info:n}=P(),[c]=D(H),{blockletRegistryList:s}=n,o=s.find(r=>c===r.url)||s[0],[i,u]=p.useState(o.url),h=n.routing.adminPath,a=S(window.location.origin,h),d=({detailUrl:r})=>{const m=new URL(r);m.searchParams.set("server-url",a);const b=document.createElement("a");b.setAttribute("target","_blank"),b.setAttribute("href",m.href),b.click()},l=p.useRef(null);return t.jsxs(Ee,{children:[t.jsxs(ve,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[t.jsx(R,{color:"textPrimary",children:e("common.store")}),t.jsx(Be,{ref:l,onChange:r=>u(r),onDelete:r=>{var m;i===r&&u((m=n.blockletRegistryList[0])==null?void 0:m.url)}})]}),t.jsx(ge,{className:"store-header",display:"flex",justifyContent:"space-between",p:0,m:0,children:t.jsx(R,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:e("store.headerDescription")})}),t.jsx(T,{className:"blocklet-list",handleSearchSelect:d,storeUrl:i})]})}const Ee=V.main`
|
|
6
|
+
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
7
|
+
.store-header {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
margin-bottom: 32px !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.page-header {
|
|
13
|
+
margin-bottom: 16px !important;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.blocklet-list {
|
|
17
|
+
aside:hover {
|
|
18
|
+
height: calc(100vh - 235px);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`;export{tt as default};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import{r as u,bg as _,bh as B,aJ as Q,aK as Y,j as e,q as A,c as P,F as b,m as R,S as O,O as k,B as K,C as w,ad as U,P as j,f as E,D as Z,aW as ee,aX as te,n as S,at as I,o as se,u as G,aN as ae,K as ne,U as oe,bi as re,z as ce,bf as ie,d as le,bj as me}from"./index-CkI554oc.js";import{T as de}from"./index-BNulkcXj.js";import pe from"./audit-logs-CmuAN_qn.js";import{P as ue,M as fe}from"./index-lXzOGnDm.js";import ye from"./index-84DtgjQO.js";import{T as ge}from"./team-CrNp0IgF.js";import{E as xe}from"./index-CfOOBUnf.js";import{d as he}from"./Add-DEou6OQu.js";import{T as N}from"./TextField-BD0it3d0.js";import{F as H,S as V}from"./Select-DJl6HmRs.js";import{I as J}from"./InputLabel-CdW9MyDY.js";import{C as W}from"./click-to-copy-KBQWqGOq.js";import{f as ve}from"./index-D9k2I5J1.js";import{d as je}from"./Delete-BGOcGa_D.js";import{C as Ce}from"./delete-confirm-ztUwg2kj.js";import{d as ke}from"./Edit-B0yxTPMe.js";import"./index-D5A34D-v.js";import"./useLocalStorage-DRS65jti.js";import"./Pagination-DWKt9t_F.js";import"./LastPage-dDlMsztV.js";import"./index-CE4mBIM_.js";import"./Loop-CAxjNyCL.js";import"./ViewList-D3pEO1Ca.js";import"./list-header-DsWkp7IV.js";import"./Search-J7ilvWof.js";import"./index-Cj3s4CtX.js";import"./FilterList-RGEuYf_e.js";import"./index-aVpXIXlo.js";import"./redux-BBckwmBz.js";import"./MoreVert-BL42DjcZ.js";import"./index-Dc48oA1e.js";import"./resource-dialog-CIpxrG7w.js";import"./index-BoZhSN8h.js";import"./index-sNR67yJ2.js";import"./tag-CdoBHuxB.js";import"./index-Ca7UJIsi.js";import"./actions-CL-Y8Eer.js";import"./index-DeSsBKwN.js";import"./ButtonGroup-BbRXyWVe.js";import"./getValidReactChildren-DKO9kPop.js";import"./EditIcon-CF5y6ttj.js";import"./LockIcon-BMilDbx1.js";import"./Google-CuSS9iHp.js";import"./index-DuHl-QWf.js";import"./isEqual-DLk5wI5o.js";import"./index-Clbjq5Ay.js";import"./InputAdornment-BzCm_2kz.js";import"./ToggleButtonGroup-CR3zvwUX.js";function be(){var o=u.useRef(!1),s=u.useCallback(function(){return o.current},[]);return u.useEffect(function(){return o.current=!0,function(){o.current=!1}},[]),s}function Ke(o,s,p){s===void 0&&(s=[]),p===void 0&&(p={loading:!1});var r=u.useRef(0),c=be(),t=u.useState(p),n=t[0],l=t[1],m=u.useCallback(function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var y=++r.current;return n.loading||l(function(g){return _(_({},g),{loading:!0})}),o.apply(void 0,a).then(function(g){return c()&&y===r.current&&l({value:g,loading:!1}),g},function(g){return c()&&y===r.current&&l({error:g,loading:!1}),g})},s);return[n,m]}function Se(o,s){s===void 0&&(s=[]);var p=Ke(o,s,{loading:!0}),r=p[0],c=p[1];return u.useEffect(function(){c()},[c]),r}var _e=function(o,s){s===void 0&&(s=[]);var p=u.useState(0),r=p[0],c=p[1],t=Se(o,B(s,[r])),n=t.loading,l=u.useCallback(function(){n||c(function(m){return m+1})},B(s,[n]));return _(_({},t),{retry:l})},T={},Ae=Y;Object.defineProperty(T,"__esModule",{value:!0});var X=T.default=void 0,we=Ae(Q()),Ie=e;X=T.default=(0,we.default)((0,Ie.jsx)("path",{d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"VpnKey");function L(o){const{remark:s,onCreate:p}=o,{t:r}=A(),[c,t]=u.useState(!1),[n,l]=u.useState(null),m=P(),a=b.RBAC_CONFIG.roles.filter(x=>x.passport&&x.name!==b.ROLES.OWNER),f=()=>{t(!1),l(null)},y=async x=>{const{remark:h,passport:d}=x;t(!0);const i=await m.createAccessKey({input:{remark:h.trim(),passport:d}}),{data:C}=i;p(C),l(null),t(!1)},g={title:`${r("common.create")} ${r("common.accessKey")}`,description:(x,h,d)=>e.jsxs(R,{component:"div",children:[e.jsx(N,{label:r("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",inputProps:{"data-cy":"remark-input"},fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",value:x.remark,onChange:i=>{h({...x,remark:i.target.value,__disableConfirm:!x.passport||!i.target.value.trim()}),i.target.value.trim()?d(""):d(r("setting.accessKey.remarkInvalid"))}}),e.jsxs(H,{style:{width:"100%"},variant:"outlined",children:[e.jsx(J,{children:r("common.passport")}),e.jsx(V,{"data-cy":"create-access-key-select-passport",value:x.passport,onChange:i=>{const C=i.target.value;d(null),h({...x,passport:C,__disableConfirm:!x.remark||!C})},fullWidth:!0,label:r("common.passport"),disabled:c,children:a.map(i=>e.jsx(O,{value:i.name,"data-cy":`create-access-key-passport-option-${i.name}`,children:e.jsxs(k,{children:[e.jsx("span",{children:i.title||i.name}),e.jsx(k,{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify",children:i.description})]})},i.name))})]})]}),confirm:r("common.confirm"),cancel:r("common.cancel"),color:"primary",params:{remark:s,__disableConfirm:!s.trim()},onConfirm:y,onCancel:f};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>l(g),className:"rule-action",children:[c?e.jsx(w,{size:16}):e.jsx(he,{style:{fontSize:16}}),r("common.create")]}),n&&e.jsx(U,{title:n.title,description:n.description,confirm:n.confirm,color:n.color,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}L.propTypes={remark:j.string,onCreate:j.func};L.defaultProps={onCreate:()=>{},remark:""};function $(o){const{onConfirm:s,accessKeyId:p,accessKeySecret:r}=o,{t:c}=u.useContext(E),[t,n]=u.useState(!1),[l,m]=u.useState(!0),a=()=>{m(!l)},f=y=>{n(y.target.checked)};return e.jsxs(Z,{title:c("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:s,showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(K,{disabled:!t,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:c("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(Ne,{children:c("setting.accessKey.saveSecretTip")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Key"}),e.jsx(W,{children:p})]}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Secret"}),l?e.jsx(K,{"data-cy":"show-secret-btn",color:"primary",onClick:a,children:c("setting.accessKey.showSecret")}):e.jsx(W,{children:r})]}),e.jsx("div",{children:e.jsx(ee,{value:"end",disabled:l,control:e.jsx(te,{checked:t,onChange:f}),label:c("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}$.propTypes={accessKeyId:j.string.isRequired,accessKeySecret:j.string.isRequired,onConfirm:j.func};$.defaultProps={onConfirm:()=>{}};const q=S.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
align-items: center;
|
|
5
|
+
font-size: 16px;
|
|
6
|
+
margin-bottom: 8px;
|
|
7
|
+
`,M=S.div`
|
|
8
|
+
margin-bottom: 24px;
|
|
9
|
+
`,Ne=S.div`
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
`;function D(o){const{t:s,locale:p}=A(),[r,c]=u.useState(!1),[t,n]=u.useState(null),{accessKeyId:l,time:m,remark:a,onDelete:f=()=>{}}=o,y=P(),g=()=>{c(!1),n(null)},x=async()=>{c(!0);try{await y.deleteAccessKey({input:{accessKeyId:l}}),f()}catch(i){console.error(i)}finally{c(!1),n(null)}},h=i=>({key:`<b>${l}</b>`,name:`<b>${a}</b>`,time:I(i,p),timeAge:ve(new Date(i),se(p))}),d={keyName:a,title:s("setting.accessKey.title"),description:m?`${s("setting.accessKey.description",h(m))}`:`${s("setting.accessKey.descriptionNoTime",{key:`<b>${l}</b>`,name:`<b>${a}</b>`})}`,confirmPlaceholder:s("setting.accessKey.confirm_desc",{name:a}),confirm:s("common.delConfirm"),cancel:s("common.cancel"),onConfirm:x,onCancel:g};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",onClick:()=>n(d),size:"small",className:"rule-action",color:"error",children:[r?e.jsx(w,{size:16}):e.jsx(je,{style:{fontSize:16}}),s("common.delete")]}),t&&e.jsx(Ce,{keyName:t.keyName,title:t.title,description:t.description,confirmPlaceholder:t.confirmPlaceholder,confirm:t.confirm,cancel:t.cancel,params:t.params,onConfirm:t.onConfirm,onCancel:t.onCancel})]})}D.propTypes={accessKeyId:j.string.isRequired,time:j.string.isRequired,remark:j.string.isRequired,onDelete:j.func};D.defaultProps={onDelete:()=>{}};function F(o){const{accessKeyId:s,remark:p,onUpdate:r,passport:c}=o,{t}=A(),[n,l]=u.useState(!1),[m,a]=u.useState(null),f=P(),y=b.RBAC_CONFIG.roles.filter(d=>d.passport&&d.name!==b.ROLES.OWNER),g=()=>{l(!1),a(null)},x=async d=>{const{accessKeyId:i,remark:C,passport:v}=d;l(!0),await f.updateAccessKey({input:{accessKeyId:i,remark:C.trim(),passport:v}}),r(),a(null),l(!1)},h={title:`${t("common.update")} ${t("common.accessKey")}`,description:(d,i,C)=>e.jsxs(R,{component:"div",children:[e.jsx(N,{label:t("setting.accessKey.accessKeyId"),autoComplete:"off",variant:"outlined",name:"accessKeyId",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",value:d.accessKeyId,disabled:!0}),e.jsx(N,{label:t("common.remark"),autoComplete:"off",variant:"outlined",name:"remark",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},value:d.remark,onChange:v=>{i({...d,remark:v.target.value,__disableConfirm:!v.target.value.trim()}),v.target.value.trim()?C(""):C(t("setting.accessKey.remarkInvalid"))}}),e.jsxs(H,{style:{width:"100%"},variant:"outlined",children:[e.jsx(J,{children:t("common.passport")}),e.jsx(V,{"data-cy":"update-access-key-select-passport",value:d.passport,onChange:v=>{const z=v.target.value;C(null),i({...d,passport:z,__disableConfirm:!d.remark||!z})},fullWidth:!0,label:t("common.passport"),disabled:n,children:y.map(v=>e.jsx(O,{value:v.name,"data-cy":`update-access-key-passport-option-${v.name}`,children:e.jsx("span",{children:v.title||v.name})},v.name))})]})]}),confirm:t("common.confirm"),cancel:t("common.cancel"),color:"primary",params:{accessKeyId:s,remark:p,passport:c},onConfirm:x,onCancel:g};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",onClick:()=>a(h),size:"small",className:"rule-action",color:"primary",children:[n?e.jsx(w,{size:16}):e.jsx(ke,{style:{fontSize:16}}),t("common.update")]}),m&&e.jsx(U,{title:m.title,description:m.description,confirm:m.confirm,color:m.color,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}F.propTypes={accessKeyId:j.string.isRequired,remark:j.string,passport:j.string,onUpdate:j.func};F.defaultProps={onUpdate:()=>{},remark:"",passport:""};function Pe(){const{t:o,locale:s}=u.useContext(E),{api:p}=G(),[r,c]=u.useState({}),t=_e(async()=>{const a=await p.getAccessKeys(),{list:f}=a;return f}),n=t.value||[],{loading:l,error:m}=t;return!n.length&&l?e.jsx("div",{style:{textAlign:"center",marginTop:"50px"},children:e.jsx(w,{})}):!n.length&&m?e.jsx(ae,{severity:"error",children:ne(m)}):e.jsxs("div",{children:[e.jsxs(k,{mb:1,textAlign:"right",children:[e.jsx(oe,{permission:"mutate_node",children:e.jsx(L,{onCreate:a=>{const{accessKeyId:f,accessKeySecret:y}=a;c({show:!0,accessKeyId:f,accessKeySecret:y})}})}),r.show&&e.jsx($,{onConfirm:()=>{t.retry(),c({show:!1})},...r})]}),!n.length&&e.jsx(k,{mt:8,children:e.jsx(xe,{children:o("common.noData")})}),!!n.length&&e.jsx(Re,{children:n.map(a=>{const f=a.remark||"N/A",y=b.RBAC_CONFIG.roles.find(g=>g.name===a.passport);return e.jsxs("div",{className:"access-key-item",children:[e.jsxs("div",{className:"access-key-item_info-warpper",children:[e.jsx("div",{className:"access-key-item_icon",children:e.jsx(X,{})}),e.jsxs("div",{className:"access-key-item_info",children:[e.jsx(k,{fontWeight:700,children:f}),e.jsx(k,{minWidth:0,children:e.jsx(re,{showDidLogo:!1,children:a.accessKeyId})}),e.jsxs("div",{children:["Created at ",I(a.createdAt,s)]}),e.jsxs("div",{children:["Created by ",a.createdBy]}),a.updatedBy&&e.jsxs("div",{children:["Updated by ",a.updatedBy]}),a.lastUsedAt&&e.jsxs("div",{children:["Last used at ",I(a.lastUsedAt,s)]}),e.jsx("div",{className:"access-key-item_passport",children:e.jsx(ue,{passport:{title:y?y.title:a.passport}})})]})]}),e.jsxs("div",{className:"access-key-item_actions",children:[e.jsx(F,{...a,onUpdate:t.retry}),e.jsx(D,{accessKeyId:a.accessKeyId,time:a.lastUsedAt,remark:a.remark||"N/A",onDelete:t.retry})]})]})})})]})}const Re=S.div`
|
|
13
|
+
border: 1px solid
|
|
14
|
+
${({theme:o})=>o.palette.grey[300]};
|
|
15
|
+
border-radius: 8px;
|
|
16
|
+
|
|
17
|
+
.access-key-item {
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
padding: 16px 32px;
|
|
21
|
+
.access-key-item_info-warpper {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-grow: 1;
|
|
24
|
+
.access-key-item_icon {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
color: ${({theme:o})=>o.palette.grey[400]};
|
|
28
|
+
svg {
|
|
29
|
+
font-size: 44px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
.access-key-item_info {
|
|
33
|
+
flex: 1;
|
|
34
|
+
max-width: 400px;
|
|
35
|
+
padding-left: 44px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.access-key-item_actions {
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: flex-end;
|
|
41
|
+
align-items: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.access-key-item_passport span {
|
|
45
|
+
margin-top: 4px;
|
|
46
|
+
padding: 2px 12px;
|
|
47
|
+
font-size: 12px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.access-key-item + .access-key-item {
|
|
51
|
+
border-top: 1px solid
|
|
52
|
+
${({theme:o})=>o.palette.grey[300]}};
|
|
53
|
+
}
|
|
54
|
+
${({theme:o})=>o.breakpoints.down("md")} {
|
|
55
|
+
.access-key-item {
|
|
56
|
+
padding: 16px;
|
|
57
|
+
.access-key-item_info-warpper {
|
|
58
|
+
min-width: 0;
|
|
59
|
+
.access-key-item_icon {
|
|
60
|
+
svg {
|
|
61
|
+
font-size: 24px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
.access-key-item_info {
|
|
65
|
+
max-width: 100%;
|
|
66
|
+
padding-left: 16px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
.access-key-item_actions {
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
`;function wt(){const o=ce(),{t:s}=A(),{info:p}=G(),{tab:r="members"}=ie(),c=h=>me(h,p),{data:t}=le(),n=u.useCallback(h=>{const d=t.find(i=>[i.meta.did,i.appDid,i.appPid].includes(h));return d?d.meta.title:"Server"},[t]),l=u.useCallback(()=>e.jsx(pe,{showScope:!0,scopeFormatter:n}),[n]),m=u.useCallback(()=>e.jsx(fe,{type:"server",createPassportSvg:c}),[]),a=p.did,f=h=>{o(`/team/${h}`)},y={members:{label:s("common.members"),value:"members",component:m},passports:{label:s("common.passport"),value:"passports",component:ye},"access-keys":{label:s("common.accessKey"),value:"access-keys",component:Pe},"audit-logs":{label:s("common.auditLogs"),value:"audit-logs",component:l}},g=Object.values(y).map(({label:h,value:d})=>({label:h,value:d})),x=y[r]||y.member;return e.jsx(ge,{teamDid:a,children:e.jsxs(Te,{children:[e.jsx(R,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:s("common.team")}),e.jsx(de,{tabs:g,current:r,onChange:f,scrollButtons:"auto"}),e.jsx("div",{className:"page-content",children:e.jsx(x.component,{createPassportSvg:c})})]})})}const Te=S.main`
|
|
76
|
+
.page-header {
|
|
77
|
+
display: flex;
|
|
78
|
+
justify-content: space-between;
|
|
79
|
+
align-items: center;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.page-content {
|
|
83
|
+
margin-top: 24px;
|
|
84
|
+
}
|
|
85
|
+
`;export{wt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as P,j as n,q as ee,u as te,ak as Re,cC as ne,M as J,n as B,B as Je,P as G,ax as Ye,z as Ne,cD as Ze,v as et,cE as tt,ad as nt,aw as ve,bn as xe,a2 as Q,b as le,A as ie,K as be,ai as st,R as X,X as Y,C as T,O as $e,i as at,W as rt,x as ot,y as De,ah as lt,cF as it,af as ct,cc as ze,cG as Ee,ab as dt,F as ut,cH as pt,H as ht,al as mt,am as ft,an as gt,cI as vt,ao as xt,J as bt,ap as yt,aq as K,ar as kt,as as jt}from"./index-Boqyvc8Q.js";import{L as Z,P as Ie,A as wt,S as Ct,a as Pt}from"./index-Bvs8qR9r.js";import{u as Lt,A as _t,W as Ut,P as Bt,D as ye,L as ke,d as je,a as we}from"./wait-container-mYVBI-ZE.js";import{C as Te,d as St,A as Ot}from"./agreement-DBRJClMM.js";import{a as Rt}from"./api-BdOqJGVs.js";import{i as Nt}from"./isEqual-DbZp5EUk.js";import{_ as $t}from"./useLocalStorage-BNvbpN9F.js";import{s as Dt}from"./logo-BKA11TRi.js";import"./Skeleton-B4-1c0OT.js";import"./Close-D9SKZkJ7.js";import"./lottie-BYxFXW-g.js";import"./index-DycwPjM3.js";var ce={};Object.defineProperty(ce,"__esModule",{value:!0});var Ae=ce.default=void 0;zt(P);var C=n;function zt(e){return e&&e.__esModule?e:{default:e}}function Ce(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function Pe(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Ce(Object(s),!0).forEach(function(r){Et(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Ce(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Et(e,t,s){return t=It(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function It(e){var t=Tt(e,"string");return typeof t=="symbol"?t:String(t)}function Tt(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var de=function(t){return(0,C.jsxs)("svg",Pe(Pe({},t),{},{children:[(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,C.jsxs)("defs",{children:[(0,C.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,C.jsx)("stop",{stopColor:"#0FA4B7"}),(0,C.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,C.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,C.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,C.jsx)("stop",{stopColor:"#0FA4B7"}),(0,C.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,C.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};de.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};de.displayName="launcher-logo-notext";Ae=ce.default=de;var ue={};Object.defineProperty(ue,"__esModule",{value:!0});var Me=ue.default=void 0;At(P);var b=n;function At(e){return e&&e.__esModule?e:{default:e}}function Le(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function _e(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Le(Object(s),!0).forEach(function(r){Mt(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Le(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Mt(e,t,s){return t=Vt(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Vt(e){var t=Ft(e,"string");return typeof t=="symbol"?t:String(t)}function Ft(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pe=function(t){return(0,b.jsxs)("svg",_e(_e({},t),{},{children:[(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,b.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,b.jsxs)("defs",{children:[(0,b.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,b.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};pe.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};pe.displayName="launcher-logo";Me=ue.default=pe;function Wt(){const{t:e}=ee(),{info:t}=te(),s=Re(),r=decodeURIComponent(s.get("accessUrl")||""),{meta:l}=ne();return n.jsx(qt,{children:n.jsx("div",{className:"body",children:n.jsx(Z,{variant:"success",title:J({meta:l},!0),subTitle:e("launchBlocklet.installSuccess",{serverName:t.name}),footer:n.jsx(Ht,{href:r,rel:"noreferrer","data-cy":"open-blocklet",children:e("common.open")})})})})}const Ht=B.a`
|
|
1
|
+
import{r as C,j as n,q as ee,u as te,aj as Ne,ct as ne,M as X,n as B,B as Xe,P as G,aw as Ye,z as Re,cu as Ze,v as et,cv as tt,ac as nt,av as ve,bl as xe,a1 as Q,b as le,A as ie,K as be,ah as st,Q as J,V as Y,C as T,N as De,i as at,W as rt,x as ot,y as $e,ag as lt,cw as it,ae as ct,c4 as ze,cx as Ee,aa as ut,F as dt,cy as pt,H as ht,ak as mt,al as ft,am as gt,cz as vt,an as xt,J as bt,ao as yt,ap as K,aq as kt,ar as jt}from"./index-CkI554oc.js";import{L as Z,P as Ie,A as wt,S as Pt,a as Ct}from"./index-CsNkkebn.js";import{u as Lt,A as _t,W as Ut,P as Bt,D as ye,L as ke,d as je,a as we}from"./wait-container-DzvlQJkQ.js";import{C as Te,d as St,A as Ot}from"./agreement-Dd1yuqFa.js";import{a as Nt}from"./api-Ce74sKYG.js";import{i as Rt}from"./isEqual-DLk5wI5o.js";import{_ as Dt}from"./useLocalStorage-DRS65jti.js";import{s as $t}from"./logo-BKA11TRi.js";import"./Skeleton-CSyuj2cV.js";import"./Close-DGnER_ve.js";import"./lottie-CYf1PmCL.js";import"./index-D5A34D-v.js";var ce={};Object.defineProperty(ce,"__esModule",{value:!0});var Ae=ce.default=void 0;zt(C);var P=n;function zt(e){return e&&e.__esModule?e:{default:e}}function Pe(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function Ce(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Pe(Object(s),!0).forEach(function(r){Et(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Pe(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Et(e,t,s){return t=It(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function It(e){var t=Tt(e,"string");return typeof t=="symbol"?t:String(t)}function Tt(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ue=function(t){return(0,P.jsxs)("svg",Ce(Ce({},t),{},{children:[(0,P.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,P.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,P.jsxs)("defs",{children:[(0,P.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,P.jsx)("stop",{stopColor:"#0FA4B7"}),(0,P.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,P.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,P.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,P.jsx)("stop",{stopColor:"#0FA4B7"}),(0,P.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,P.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};ue.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};ue.displayName="launcher-logo-notext";Ae=ce.default=ue;var de={};Object.defineProperty(de,"__esModule",{value:!0});var Me=de.default=void 0;At(C);var b=n;function At(e){return e&&e.__esModule?e:{default:e}}function Le(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function _e(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Le(Object(s),!0).forEach(function(r){Mt(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Le(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Mt(e,t,s){return t=Vt(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Vt(e){var t=Ft(e,"string");return typeof t=="symbol"?t:String(t)}function Ft(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pe=function(t){return(0,b.jsxs)("svg",_e(_e({},t),{},{children:[(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,b.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,b.jsxs)("defs",{children:[(0,b.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,b.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};pe.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};pe.displayName="launcher-logo";Me=de.default=pe;function Wt(){const{t:e}=ee(),{info:t}=te(),s=Ne(),r=decodeURIComponent(s.get("accessUrl")||""),{meta:l}=ne();return n.jsx(qt,{children:n.jsx("div",{className:"body",children:n.jsx(Z,{variant:"success",title:X.getDisplayName({meta:l},!0),subTitle:e("launchBlocklet.installSuccess",{serverName:t.name}),footer:n.jsx(Ht,{href:r,rel:"noreferrer","data-cy":"open-blocklet",children:e("common.open")})})})})}const Ht=B.a`
|
|
2
2
|
display: block;
|
|
3
3
|
height: 36px;
|
|
4
4
|
color: ${e=>e.theme.palette.primary.main};
|
|
@@ -25,7 +25,7 @@ import{r as P,j as n,q as ee,u as te,ak as Re,cC as ne,M as J,n as B,B as Je,P a
|
|
|
25
25
|
font-size: 58px;
|
|
26
26
|
color: ${e=>e.variant==="error"?e.theme.palette.error.main:e.theme.palette.success.main};
|
|
27
27
|
}
|
|
28
|
-
`;function Ve({children:e,...t}){return n.jsx(
|
|
28
|
+
`;function Ve({children:e,...t}){return n.jsx(Xe,{variant:"contained",color:"primary",...t,children:e})}Ve.propTypes={children:G.any.isRequired};const A=C.forwardRef((e,t)=>n.jsx(Ve,{...e,forwardedRef:t})),W=lt("@abtnode/webapp:launch-blocklet:step-install"),Ue=(e,t)=>!t.statusChanged&&(e==="installed"||e==="running")&&!t.launching,Kt=(e,t,s)=>s(t==="nft"?e?"launchBlocklet.dialog.nftFreeDescription":"launchBlocklet.dialog.nftPaidDescription":e?"launchBlocklet.dialog.freeDescription":"launchBlocklet.dialog.paidDescription"),he="setup_token",Gt=e=>{sessionStorage.setItem(he,e)},Qt=()=>{sessionStorage.removeItem(he)},Jt=()=>sessionStorage.getItem(he);function Xt(){const e=Ne(),{t,locale:s}=ee(),{api:r,info:l}=te(),{session:d,api:M}=Ye(),k=Re(),{loading:g,meta:u,isFree:R,appDid:_,sessionId:j,storeUrl:U,blockletMetaUrl:y,isExternal:S,setAppDid:$,launcherUrl:L,launcherSessionId:O,isInstalling:V,isInstalled:D}=ne(),N=u?X.getDisplayName({meta:u},!0):null,p=e.get("launchType"),z=e.get("chainHost"),H=!!e.get("onlyRequired"),h=e.get("nftId"),E=C.useRef(null),{decrypt:F,encryptKey:Fe}=Ze(),[We]=Dt("skip-blocklet-setup",!1),[a,m]=et({launching:!1,visiting:!1,statusChanged:!1,isConnectOpen:!1,nextAccessUrl:"",loaded:!1,installError:null,progressIndex:0,connectData:{action:"",baseUrl:"",checkFn:()=>{},extraParams:{}}}),fe=tt({user:d.user,launchType:p,nftId:h}),se=nt.getServerAuthMethod(l,p,O,fe),w=Lt(fe?_:""),{status:v,eventName:ae}=w,ge=e.get("from");C.useEffect(()=>{g||(!D&&!V&&re(),m({loaded:!0}))},[g]);const He=async()=>{const{isNew:i,decoded:o}=it(U,l.blockletRegistryList);i&&await r.addBlockletStore({input:{teamDid:l.did,url:o}})},re=async()=>{var o,f;const i=d.user?`${d.user.fullName}'s ${N}`:N;if(m({installError:null}),d!=null&&d.user&&!S&&p!=="serverless")try{await He()}catch(c){console.error("addNewRegistryToRegistryList error:",c)}if(R){const c=`launch-free-blocklet-by-${se}`;m({isConnectOpen:!0,connectData:{action:c,baseUrl:"",checkFn:ve.create({baseURL:((o=window==null?void 0:window.env)==null?void 0:o.apiPrefix)??"/"}).get,extraParams:{wt:xe(u),title:i,blockletMetaUrl:y,launchType:p,nftId:h,chainHost:decodeURIComponent(z),launcherUrl:L,launcherSessionId:O,onlyRequired:H}}})}else{const c=`launch-paid-blocklet-by-${se}`,x=new URL(window.location.href);x.pathname=Q(((f=window==null?void 0:window.env)==null?void 0:f.apiPrefix)??"/",`/api/did/${c}/token`),x.searchParams.set("wt",xe(u)),x.searchParams.set("_ek_",Fe),x.searchParams.set("title",i),x.searchParams.set("autoConnect",!1),x.searchParams.set("blockletMetaUrl",y),p&&x.searchParams.set("launchType",p),h&&x.searchParams.set("nftId",h),L&&x.searchParams.set("launcherUrl",L),O&&x.searchParams.set("launcherSessionId",O);const{data:q}=await Nt.get(x.href);m({isConnectOpen:!0,connectData:{action:"verify-purchase-blocklet",baseUrl:new URL(y).origin,checkFn:ve.create({baseURL:new URL(y).origin}).get,extraParams:{serverDid:l.did,blockletDid:u==null?void 0:u.did,nw:q.url}}})}},qe=async i=>{ie.success(t("launchBlocklet.dialog.success"));const o=Array.isArray(i)?i[i.length-1]:i;if(o.sessionToken&&(ct(F(o.sessionToken)),await d.refresh()),o.setupToken&&Gt(o.setupToken),m({launching:!o.isInstalled,isConnectOpen:!1}),o.appDid){$(o.appDid,o.sessionId);const f=new URL(window.location.href);f.searchParams.set("appDid",o.appDid),f.searchParams.set("sessionId",o.sessionId),window.history.replaceState(null,"",f.toString())}},Ke=i=>{const o=`/${l.routing.adminPath}/blocklets/${i.meta.did}/configuration`.replace(/\/+/g,"/");let f=`/launch-blocklet/complete?status=installed&name=${encodeURIComponent(N)}&accessUrl=${encodeURIComponent(o)}&blocklet_meta_url=${y}`;const c=e.get("fromLauncher");c&&(f+=`&fromLauncher=${c}`),p&&(f+=`&launchType=${p}`),z&&(f+=`&chainHost=${z}`),k(f)},Ge=async i=>{if(W("visitBlocklet",{status:v,state:a,appDid:_}),a.visiting)return;m({visiting:!0});const o=ze({blocklet:i}),f=await Ee(o);if(J(f)&&p!=="serverless"||We){m({visiting:!1}),setTimeout(()=>{Ke(i)},1e3);return}if(J(f)){m({visiting:!1});return}if(Ue(v,a)===!1)try{await M.post(`/api/launch/${j}`)}catch(Je){W("end launch failed",{error:be(Je)})}const c=new URL(f);c.searchParams.set("serverUrl",ut(l)),i.status!=="running"&&c.searchParams.set("__start__","1");const x=e.get("fromLauncher");x&&c.searchParams.set("fromLauncher",x),p&&c.searchParams.set("launchType",p),h&&c.searchParams.set("nftId",h),z&&c.searchParams.set("chainHost",z);const q=Jt();q&&c.searchParams.set("setupToken",q),m({nextAccessUrl:c.href,visiting:!1}),setTimeout(()=>{Qt(),window.location.href=c.href},1e3)},Qe=[t("launchBlocklet.waiting.verifying"),t("launchBlocklet.waiting.downloading"),t("launchBlocklet.waiting.extracting"),t(v==="upgrading"?"common.upgrading":"launchBlocklet.waiting.installing"),t("launchBlocklet.waiting.done")],I=()=>{W("handleInstalledProgress",{status:v,state:a}),v&&(m({progressIndex:4}),E.current&&(clearTimeout(E.current),E.current=null),E.current=setTimeout(()=>{r.getBlocklet({input:{did:_,attachRuntimeInfo:!0}}).then(i=>{i.blocklet&&Ge(i.blocklet)})},500))};if(C.useEffect(()=>{V&&m({launching:!0}),D&&I()},[D,V]),C.useEffect(()=>{var i;if(p==="serverless"&&ae===le.BlockletEvents.nftConsumed){I();return}switch(v){case"waiting":m({progressIndex:1,statusChanged:!0});break;case"downloading":m({progressIndex:2,statusChanged:!0});break;case"installing":case"upgrading":m({progressIndex:3,statusChanged:!0});break;case"installed":if(p==="serverless"&&!st(w))break;I();break;case"starting":I();break;case"running":I();break;case"stopped":I();break;case"corrupted":case"error":{const o={message:w.error.message,name:w.eventName};[le.BlockletEvents.downloadFailed,le.BlockletEvents.installFailed].includes(w.eventName)?o.action="retry":(v==="error"||v==="corrupted")&&(o.action="view"),Rt(o,a.installError)||(i=w==null?void 0:w.error)!=null&&i.message&&ie.error(be(w.error))}break}},[v,ae,w]),W("render",{status:v,eventName:ae,launchType:p,runtimeBlockletState:w,state:a}),g||d.user&&v===null||J(u))return n.jsx(Y,{relative:"parent",children:n.jsx(T,{})});if(a.installError){const i={view:!S&&n.jsx(A,{className:"bottom-button",component:De,to:`/blocklets/${_}/overview`,"data-cy":"view-blocklet",color:"primary",variant:"contained",children:t("launchBlocklet.viewApplication")}),retry:n.jsxs(en,{children:[ge&&n.jsx(A,{variant:"text",className:"bottom-button","data-cy":"go-back",disabled:a.isConnectOpen,onClick:()=>{window.location.href=ge},children:t("common.back")}),n.jsxs(A,{className:"bottom-button","data-cy":"retry-install",disabled:a.isConnectOpen,onClick:re,children:[a.isConnectOpen&&n.jsx(T,{size:16}),t("common.retry")]})]})},o=a.installError.name?a.installError.name.replace("blocklet.",""):"installFailed";return n.jsx(Be,{variant:"error",title:N,subTitle:n.jsxs(Zt,{children:[n.jsx("div",{children:t(`launchBlocklet.error.${o}`)}),a.installError.message&&n.jsx("div",{className:"error-desc",children:t("common.errorMessage")+a.installError.message})]}),footer:i[a.installError.action]})}if(Ue(v,a))return W("alreadyExists",{status:v,state:a,runtimeBlockletState:w}),n.jsx(Be,{variant:"info",title:t("common.reminder"),subTitle:t("launchBlocklet.alreadyExists",{name:X.getDisplayName({meta:u},!0)}),footer:n.jsxs("div",{children:[!a.nextAccessUrl&&n.jsx(T,{size:16}),a.nextAccessUrl&&n.jsx(at,{href:a.nextAccessUrl,"data-cy":"open-blocklet",children:t("launchBlocklet.redirect")})]})});const oe=!a.launching&&!v;return n.jsxs(Yt,{children:[n.jsx("div",{className:"header",children:n.jsx(Ie,{title:t(oe?"common.install":"common.installing"),subTitle:oe?t("launchBlocklet.subTitle",{appName:N,serverName:l.name}):""})}),n.jsxs("div",{className:"body",children:[oe&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"illustrations",children:[n.jsx("div",{className:"ills-block ills-block-left",children:n.jsxs("div",{className:"ills-block-inner",children:[n.jsx(_t,{className:"i-icon",blocklet:{meta:u},blockletMetaUrl:y}),n.jsx("div",{className:"i-name",children:N})]})}),n.jsx(St,{className:"arrow-icon"}),n.jsx("div",{className:"ills-block ills-block-right",children:n.jsxs("div",{className:"ills-block-inner",children:[n.jsx("img",{width:"64",height:"64",src:$t,alt:""}),n.jsx("div",{className:"i-name",children:l.name}),n.jsx(rt,{size:12,responsive:!1,compact:!0,did:l.did})]})})]}),a.loaded&&!D&&!a.launching&&n.jsxs(A,{className:"bottom-button","data-cy":"start-launch",disabled:a.isConnectOpen,onClick:re,children:[a.isConnectOpen&&n.jsx(T,{size:16}),t("launchBlocklet.confirmInstall")]})]}),a.launching&&n.jsxs(Ut,{children:[n.jsx(wt,{increaseSpeed:.3,messageLoop:!1,message:n.jsx(Bt,{steps:Qe,stepIndex:a.progressIndex,autoGrowth:a.progressIndex===4?1e3:4e3})}),[1,2].includes(a.progressIndex)&&n.jsx(ye,{appDid:_})]})]}),a.isConnectOpen&&n.jsx(ye,{appDid:_,visible:!1}),n.jsx(ot,{open:a.isConnectOpen,popup:!0,saveConnect:!1,className:"connect",baseUrl:a.connectData.baseUrl,action:a.connectData.action,checkFn:a.connectData.checkFn,extraParams:a.connectData.extraParams,checkTimeout:10*60*1e3,webWalletUrl:$e(l),onSuccess:qe,onClose:()=>m({isConnectOpen:!1}),locale:s,messages:{title:`${t("launchBlocklet.dialog.title")}`,scan:Kt(R,se,t),confirm:t("launchBlocklet.dialog.confirm"),success:t("launchBlocklet.dialog.success")}})]})}const Yt=B(Te)`
|
|
29
29
|
.body {
|
|
30
30
|
align-items: center;
|
|
31
31
|
animation: fadein ease 0.3s;
|
|
@@ -106,7 +106,7 @@ import{r as P,j as n,q as ee,u as te,ak as Re,cC as ne,M as J,n as B,B as Je,P a
|
|
|
106
106
|
.result-footer {
|
|
107
107
|
height: auto;
|
|
108
108
|
}
|
|
109
|
-
`;function me({onClickNext:e,handleDescEle:t,showPageHeader:s}){var H;const r=
|
|
109
|
+
`;function me({onClickNext:e,handleDescEle:t,showPageHeader:s}){var H;const r=Re(),[l,d]=C.useState(null),[M,k]=C.useState(!1),{t:g}=ee(),{info:u,api:R}=te(),{loading:_,meta:j,isRunning:U,isInstalled:y,isInstalling:S,appDid:$,isExternal:L}=ne(),[O,V]=C.useState(!0),D=C.useMemo(()=>L?l?`${new URL(l).origin}${dt.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`:"":`/blocklets/${$}/overview`,[l,L,$]),N=()=>{const h=new URLSearchParams(window.location.search);O||h.set("onlyRequired","1"),r(`/launch-blocklet/install?${h.toString()}`)},p=e||N,z=async()=>{try{k(!0);const{blocklet:h}=await R.getBlocklet({input:{did:j.did,attachRuntimeInfo:!0}}),E=ze({blocklet:h}),F=await Ee(E);if(!F&&J(F)){d(null);return}d(new URL(F).href)}catch(h){ie.error(h.message)}finally{k(!1)}};if(C.useEffect(()=>{if(!_){if(S){N();return}(U||y&&L)&&z()}},[U,L,y,S]),y){const h=U?"alreadyRunning":"alreadyInstalled";return n.jsx(Z,{variant:"info",title:g("common.reminder"),subTitle:g(`launchBlocklet.${h}`,{name:X.getDisplayName({meta:j},!0)}),footer:n.jsxs(tn,{children:[n.jsx(A,{loading:!D,"data-cy":"view-blocklet",component:L?void 0:De,to:D,href:D,variant:U?"outlined":"contained",color:"primary",children:g("launchBlocklet.viewApplication")}),U&&n.jsx(A,{loading:M,className:"last-button",disabled:!l,href:l,"data-cy":"open-blocklet",children:g("common.open")})]})})}return u?!pt.hasStartEngine(j)&&!((H=j==null?void 0:j.components)!=null&&H.length)?n.jsx(Se,{className:"center",children:n.jsx(Z,{variant:"error",subTitle:g("launchBlocklet.error.resourceBlocklet")})}):n.jsxs(Se,{children:[s&&n.jsx(Ie,{title:g("launchBlocklet.introduction"),subTitle:g("launchBlocklet.welcome")}),n.jsx(Ot,{installRelated:O,onChangeInstallRelated:V,meta:j,onClickNext:p,handleDescEle:t})]}):n.jsx(Y,{relative:"parent",children:n.jsx(T,{})})}me.propTypes={onClickNext:G.func,handleDescEle:G.node,showPageHeader:G.bool};me.defaultProps={onClickNext:null,handleDescEle:"",showPageHeader:!0};const Se=B.div`
|
|
110
110
|
display: flex;
|
|
111
111
|
flex-direction: column;
|
|
112
112
|
align-items: center;
|
|
@@ -124,7 +124,7 @@ import{r as P,j as n,q as ee,u as te,ak as Re,cC as ne,M as J,n as B,B as Je,P a
|
|
|
124
124
|
.last-button {
|
|
125
125
|
margin-left: ${e=>e.theme.spacing(2)};
|
|
126
126
|
}
|
|
127
|
-
`;function vn(){const e=ht(O=>O.breakpoints.down("md")),{t,locale:s}=ee(),{info:r}=te(),l
|
|
127
|
+
`;function vn(){const e=ht(O=>O.breakpoints.down("md")),{t,locale:s}=ee(),{info:r}=te(),l=$e(r),{serverUrl:d,fromLauncher:M,meta:k,isFree:g,loading:u,error:R,storeUrl:_}=ne(),j=Q(mt(),"/launch-blocklet"),U=[{key:"install",name:t("launchBlocklet.steps.installApp"),path:Q(j,"install")},{key:"setup",name:t("setup.steps.launchApp")}];let y=[{key:"agreement",name:t("launchBlocklet.introduction"),path:Q(j,"agreement")},...U];const S=()=>{d&&window.open(d)};let $=n.jsx(Oe,{className:`${d?"logo-can-click":""}`,children:n.jsx(ke,{onClick:S,logo:e?n.jsx(we,{width:"32",height:"32"}):n.jsx(je,{width:"128",height:"48"})})});M&&(y=[{key:"purchase-space",name:t("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:t("launchBlocklet.steps.prepareSpace")},...U],$=n.jsx(Oe,{className:`${d?"logo-can-click":""}`,children:n.jsx(ke,{logo:e?n.jsx(we,{onClick:S,width:"32",height:"32"}):n.jsx(je,{onClick:S,width:"128",height:"48"}),previousData:{logo:e?n.jsx(Ae,{width:"32",height:"32"}):n.jsx(Me,{width:"145",height:"48"})}})}));const L={meta:k,isFree:g};return n.jsx(Pt,{steps:y,children:n.jsx(Ct,{locale:s,loading:u,blockletMeta:{...k,isFree:g},useOfSkeleton:!1,navLogo:$,headerEndAddons:n.jsx(ft,{webWalletUrl:l,SessionContext:gt}),pcWidth:"80%",style:{height:"100%"},logoUrl:k&&k.logo?vt({did:k.did,version:k.version,baseUrl:_,logoPath:k.logo}):null,children:n.jsxs(sn,{children:[n.jsx(xt,{styles:nn}),u&&n.jsx(Y,{relative:"parent",children:n.jsx(T,{})}),!u&&R&&n.jsx(Y,{relative:"parent",children:n.jsx(bt,{style:{wordBreak:"break-all"},variant:"icon",type:"error",children:R})}),!u&&!R&&n.jsxs(yt,{children:[n.jsx(K,{path:"agreement",element:n.jsx(me,{})}),n.jsx(K,{path:"install",element:n.jsx(Xt,{})}),n.jsx(K,{path:"complete",element:n.jsx(Wt,{blocklet:L})}),n.jsx(K,{path:"*",element:n.jsx(kt,{to:`agreement${window.location.search}`,replace:!0})})]})]})})})}const nn=jt`
|
|
128
128
|
html,
|
|
129
129
|
body,
|
|
130
130
|
#root,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{u as R,j as o,C,aw as T,cB as U,z as b,q as W,cu as D,r,aR as _,k as d,a1 as x,ak as k,ae as E,x as O,av as $,y as q,bj as z,n as B}from"./index-CkI554oc.js";import{I as K}from"./invitation-CSvGVnhZ.js";import"./index-BA_TAXpL.js";import"./index-BET56ssY.js";import"./CheckCircle-D6vwJd9K.js";import"./wrap-locale-p7nrsckq.js";function M(v){const{api:i,session:f}=T(),{info:s}=R(),c=U(),p=b(),{t:l,locale:m}=W(),{encryptKey:P,decrypt:N}=D(),[S,w]=r.useState(!1),h=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),t=_(async()=>{if(!h)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:h}}),a=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(a){const u=new URL(window.location.href);u.pathname=x(k(),"/api/did/invite/token"),u.searchParams.set("_ek_",P),u.searchParams.set("inviteId",h);const{data:F}=await i.get(u.href);e=F}return{invitation:n,nextWorkflow:e,needReceiveNFT:a}}),j=r.useCallback(()=>{w(!0)},[]),y=r.useCallback(()=>{if(t.error)throw t.error;return t.value.invitation},[t]),g=r.useCallback(async e=>{e&&E(N(e.sessionToken));const n=new URLSearchParams(c.search);n.delete("inviteId");const a=n.toString();await f.refresh(),p(`/${a&&`?${a}`}`,{replace:!0})},[c,p,f]);if(t.loading)return o.jsx(C,{});const I=()=>{const e=new URL(window.location.href);e.pathname=x(k(),"/api/did/invite/status"),e.searchParams.set("_t_",t.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:a}=await i.get(e.href);a.status==="succeed"&&(clearInterval(n),f.updateConnectedInfo(a),g(a))},2e3)},L=()=>{w(!1)};return o.jsxs(A,{className:"page-invite",children:[d(t,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:S,locale:m,baseUrl:s.launcher.url,checkFn:$.create({baseURL:s.launcher.url}).get,onSuccess:I,onClose:L,checkTimeout:5*60*1e3,webWalletUrl:q(s),extraParams:{nw:d(t,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),o.jsx(K,{...v,getDataFn:y,createPassportSvg:e=>z(e,s),checkFn:i.get,onLoginSuccess:g,passportColor:"default",onReceive:d(t,"value.needReceiveNFT")?j:null})]})}const A=B.div`
|
|
2
|
+
width: 100vw;
|
|
3
|
+
height: 100%;
|
|
4
|
+
min-height: 100vh;
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: #f6f8fa;
|
|
9
|
+
overflow: auto;
|
|
10
|
+
padding: 20px;
|
|
11
|
+
`;function Y(){return R().loading?o.jsx(C,{}):o.jsx(M,{})}export{Y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as d,j as o,C as f,z as h,aw as v,ch as j,ci as u,O as C,bj as I,ae as P,F as R}from"./index-CkI554oc.js";import{I as S}from"./invitation-CSvGVnhZ.js";import"./index-BA_TAXpL.js";import"./index-BET56ssY.js";import"./CheckCircle-D6vwJd9K.js";import"./wrap-locale-p7nrsckq.js";function k(n){const{searchParams:i}=new URL(window.location.href),g=h(),{api:a,session:r}=v(),{info:l}=d(),c=i.get("redirect"),p=i.get("id"),s=j(async()=>{if(!p)return null;const{data:e}=await a.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return e}),m=u(()=>{if(s.error)throw s.error;return s==null?void 0:s.data}),w=u(async(e,x=t=>t)=>{e&&(e.sessionToken&&P(x(e.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const t=decodeURIComponent(c);t.startsWith(R.WELLKNOWN_SERVICE_PATH_PREFIX)?g(t,{replace:!0}):window.location=t}else window.location=window.env.pathPrefix||"/"},50)});return s.loading?o.jsx(f,{}):o.jsx(C,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:o.jsx(S,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:e=>I(e,l),checkFn:a.get,onLoginSuccess:w,passportColor:"default",onLogin:r.login})})}function W(){return d().loading?o.jsx(f,{}):o.jsx(k,{})}export{W as default};
|