@abtnode/blocklet-services 1.16.34-beta-20241120-080738-bbbe036c → 1.16.34-beta-20241120-134955-207a86a1
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/dist/assets/{Add-X4z8DHkm.js → Add-DrvqL0hE.js} +1 -1
- package/dist/assets/{Alert-SdIu9Hlz.js → Alert-BejFmWNH.js} +1 -1
- package/dist/assets/{ArrowDropDown-D_j-3Aek.js → ArrowDropDown-CZUn78y5.js} +1 -1
- package/dist/assets/{Autocomplete-B0CdvXaN.js → Autocomplete-BDAQ52_1.js} +1 -1
- package/dist/assets/{Avatar-DdQeYraH.js → Avatar-kkkoJE0g.js} +1 -1
- package/dist/assets/{ButtonGroup-DwUDwu6o.js → ButtonGroup-WlPKzLhC.js} +1 -1
- package/dist/assets/{CSSTransition-bXUOWv9j.js → CSSTransition-C2Gy3zp4.js} +1 -1
- package/dist/assets/{CheckCircle-0O-lYcGp.js → CheckCircle-HvwKrdUR.js} +1 -1
- package/dist/assets/{ChevronLeft-BAqoYyCf.js → ChevronLeft-ChTfIUFT.js} +1 -1
- package/dist/assets/{ChevronRight-CqKzFBJG.js → ChevronRight-DmcZK4DK.js} +1 -1
- package/dist/assets/{Close-DhyF9K4o.js → Close-B_rG_xrc.js} +1 -1
- package/dist/assets/{Delete-DsXQXt5C.js → Delete-CWSox7Pi.js} +1 -1
- package/dist/assets/{DeleteOutline-DU-DZ2Ol.js → DeleteOutline-CCuUMIOD.js} +1 -1
- package/dist/assets/{DialogContentText-Bsce1Ptt.js → DialogContentText-AZa4UZAk.js} +1 -1
- package/dist/assets/{Done-CEijBk0K.js → Done-TRARuAiP.js} +1 -1
- package/dist/assets/{Download-KhEFO1tw.js → Download-DLBLdXgp.js} +1 -1
- package/dist/assets/{EditIcon-66Fm0Qrw.js → EditIcon-B7GE1XOt.js} +1 -1
- package/dist/assets/{Error-D9g7mp8J.js → Error-DFKaWPMg.js} +1 -1
- package/dist/assets/{ExpandMore-DsX-wPbd.js → ExpandMore-Co-_XFGT.js} +1 -1
- package/dist/assets/{FormControl-uyHqpehB.js → FormControl-BXFBXBjg.js} +1 -1
- package/dist/assets/{FormControlLabel-l14pLV4s.js → FormControlLabel-Cj9C6pO9.js} +1 -1
- package/dist/assets/{FormGroup-D3XfyeLR.js → FormGroup-BgZW2j0M.js} +1 -1
- package/dist/assets/{Google-ymTl1lSj.js → Google-Bc3te3Qz.js} +1 -1
- package/dist/assets/{Grid-Cozd141M.js → Grid-Cdg6My8u.js} +1 -1
- package/dist/assets/{HelpOutline-C6jbNZqQ.js → HelpOutline-DHPhK_es.js} +1 -1
- package/dist/assets/{Hidden-CPvi6LIk.js → Hidden-CrDKveON.js} +1 -1
- package/dist/assets/{InfoOutlined-9VuodX8w.js → InfoOutlined-CBAB8Exy.js} +1 -1
- package/dist/assets/{InputAdornment-D3mFMJR5.js → InputAdornment-scbCVxkC.js} +1 -1
- package/dist/assets/{LastPage-CDX1Zcgq.js → LastPage-PwdeYobs.js} +1 -1
- package/dist/assets/{Launch-C-vq9aQf.js → Launch-Esgq-P4W.js} +1 -1
- package/dist/assets/{LaunchOutlined-3OnisLst.js → LaunchOutlined-n2nxc88a.js} +1 -1
- package/dist/assets/{Link-BBclrajR.js → Link-Chjdc6xT.js} +1 -1
- package/dist/assets/{ListItemButton-DxmUeeh5.js → ListItemButton-CdKDiD3I.js} +1 -1
- package/dist/assets/{ListSubheader-CmQXujp0.js → ListSubheader-XBVgmuKv.js} +1 -1
- package/dist/assets/{LoadingButton-XNe7vWUa.js → LoadingButton-DA1yC-kT.js} +1 -1
- package/dist/assets/{LockIcon-mnkb3oX5.js → LockIcon-BirTrSPk.js} +1 -1
- package/dist/assets/{Loop-DUXasQn9.js → Loop-7B6BliWo.js} +1 -1
- package/dist/assets/{MarkEmailRead-fYAbebKs.js → MarkEmailRead-DOV-CcYR.js} +1 -1
- package/dist/assets/{Menu-B-903KAP.js → Menu-DHy4VyDW.js} +1 -1
- package/dist/assets/{MoreHoriz-CKBqccB-.js → MoreHoriz-BsqSBC3_.js} +1 -1
- package/dist/assets/{MoreVert-D_0KIWFk.js → MoreVert-B5eqgNGS.js} +1 -1
- package/dist/assets/{OpenInNew-B33B2IQa.js → OpenInNew-DZ_gvUzN.js} +1 -1
- package/dist/assets/{Pagination-BvVPAsto.js → Pagination-C83UkGSd.js} +1 -1
- package/dist/assets/{PlayArrow-evoOMfsp.js → PlayArrow-lZ_9d9Mv.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-B4nA_yE6.js → QuestionMarkCircle-JNr-NuUt.js} +1 -1
- package/dist/assets/{RadioGroup-dmNyerSz.js → RadioGroup-CMawEABb.js} +1 -1
- package/dist/assets/{Search-XQNU_CT0.js → Search-sbQ5imrV.js} +1 -1
- package/dist/assets/{Select-B1-paS03.js → Select-DUqBNlJT.js} +1 -1
- package/dist/assets/{ServerLogo-Caf4HPFp.js → ServerLogo-BTP7_6r3.js} +1 -1
- package/dist/assets/{Skeleton-BxBQ28EK.js → Skeleton-DF-GsUea.js} +1 -1
- package/dist/assets/{Slider-Ddfmv_yI.js → Slider-BCZ2cCDg.js} +1 -1
- package/dist/assets/{Stack-Cf8RLPm4.js → Stack-FAMhTibv.js} +1 -1
- package/dist/assets/{Stepper-BMCZXJeS.js → Stepper-b62gMXip.js} +1 -1
- package/dist/assets/{TextField-nYO4mCN5.js → TextField-CmfNcPZp.js} +1 -1
- package/dist/assets/{Toolbar-BRd5bS7b.js → Toolbar-CpYKKa3O.js} +1 -1
- package/dist/assets/{ViewColumn-83XwXiON.js → ViewColumn-B0BnNDVH.js} +1 -1
- package/dist/assets/{ViewList-CJ-RbwzW.js → ViewList-BAdS9i6w.js} +1 -1
- package/dist/assets/{_createAggregator-8eYFUECO.js → _createAggregator-C-mfkhIa.js} +1 -1
- package/dist/assets/{access-control-CQUs5OWI.js → access-control-TZ0OUaSN.js} +1 -1
- package/dist/assets/{actions-BM-xEZx2.js → actions-BqmYvcdf.js} +1 -1
- package/dist/assets/{add-component-core-BMlbHeI0.js → add-component-core-DZBoGXUA.js} +15 -15
- package/dist/assets/add-resource-CqkVchdo.js +1 -0
- package/dist/assets/{addon-Bigmp9O7.js → addon-BuKGtRc4.js} +1 -1
- package/dist/assets/{analytics-Bg67n4CY.js → analytics-D56V3Sop.js} +1 -1
- package/dist/assets/api-BvIXgXDN.js +1 -0
- package/dist/assets/{audit-logs-CzGhOwwp.js → audit-logs-b9BOYn27.js} +1 -1
- package/dist/assets/{base32-DGUZQyiL.js → base32-CGlguZYQ.js} +1 -1
- package/dist/assets/branding-SdIrXaeA.js +37 -0
- package/dist/assets/{bundle-avatar-CG-YcfiD.js → bundle-avatar-CEJOCMtg.js} +1 -1
- package/dist/assets/{button-SZ8X_p1g.js → button-CJhVrVoJ.js} +1 -1
- package/dist/assets/{click-to-copy-D-NrDLcT.js → click-to-copy-DpIi-Ham.js} +1 -1
- package/dist/assets/{complete-B4-BGkP7.js → complete-1WLD3Yhs.js} +1 -1
- package/dist/assets/{component-DBRvVUTw.js → component-DdVHNXiX.js} +1 -1
- package/dist/assets/{config-CB3tMJeo.js → config-DBh-abLa.js} +1 -1
- package/dist/assets/{config-COkhmeWZ.js → config-DObZpcn4.js} +1 -1
- package/dist/assets/{config-navigation-CtSC9Cq8.js → config-navigation-hfsPmuuQ.js} +1 -1
- package/dist/assets/{config-space-DQHQRL3E.js → config-space-CKHFApDK.js} +1 -1
- package/dist/assets/{confirm-DlXzE3-N.js → confirm-8d8O8-hN.js} +1 -1
- package/dist/assets/{connect-D6bg9ePx.js → connect-BO8mJZOj.js} +1 -1
- package/dist/assets/{connect-DxhZ0Tvp.js → connect-DTsatDsu.js} +1 -1
- package/dist/assets/{connect-to-B5jiLg6X.js → connect-to-Dgx9BKmm.js} +1 -1
- package/dist/assets/{content-layout-D3VC1ekw.js → content-layout-BDtUAEV0.js} +1 -1
- package/dist/assets/{dashboard-ZMG6gVdw.js → dashboard-zMsgPjUH.js} +10 -10
- package/dist/assets/{deprecate-BX2YtlbE.js → deprecate-DRUEDZmV.js} +1 -1
- package/dist/assets/{did-address-C2pjT4Vo.js → did-address-CFfKa4ZS.js} +1 -1
- package/dist/assets/{domain-BqUMDT-1.js → domain-BRoqwOqZ.js} +1 -1
- package/dist/assets/{domain-list-BHqOp-Ih.js → domain-list-DoZbI3G_.js} +1 -1
- package/dist/assets/{email-DKsPvpuS.js → email-BM1qa0Kc.js} +3 -3
- package/dist/assets/emotion-cache.browser.esm-4zaifxzt.js +1 -0
- package/dist/assets/{exchange-passport-CYNeQsny.js → exchange-passport-B9Lw18ge.js} +1 -1
- package/dist/assets/{fallback-CSFjDMvp.js → fallback-Bog6C-ue.js} +1 -1
- package/dist/assets/{form-text-input-s8lVIw_B.js → form-text-input-D8koWTiU.js} +2 -2
- package/dist/assets/{format-error-CDAFfj8A.js → format-error-CovOYOWJ.js} +1 -1
- package/dist/assets/{fuel-D-f3orJl.js → fuel-5L-T-vll.js} +1 -1
- package/dist/assets/{fullpage-CFqmJ0qL.js → fullpage-Box75beI.js} +1 -1
- package/dist/assets/{home-CLUN61Tw.js → home-CWu-pk3b.js} +1 -1
- package/dist/assets/{iframe-BAyMTu53.js → iframe-BJHPqysN.js} +1 -1
- package/dist/assets/{index-D2SIiIQf.js → index-4nRB-kyL.js} +1 -1
- package/dist/assets/{index-CSD_wMks.js → index-B43BetvD.js} +1 -1
- package/dist/assets/{index-w1h5fjUA.js → index-B6JqnGav.js} +197 -197
- package/dist/assets/{index-B2stpwyi.js → index-B6_C9nGz.js} +1 -1
- package/dist/assets/{index-Cs2E1YL_.js → index-BDRTenWj.js} +1 -1
- package/dist/assets/{index-B4lxRZaJ.js → index-BNJA7fMm.js} +1 -1
- package/dist/assets/{index-B1mg4OYA.js → index-C1CKS8aB.js} +24 -24
- package/dist/assets/{index-Cq51W2RR.js → index-C2Js2VJs.js} +1 -1
- package/dist/assets/{index-B20xJssN.js → index-CAPbxUg5.js} +1 -1
- package/dist/assets/{index-DVPois7s.js → index-CBvRZgBF.js} +1 -1
- package/dist/assets/{index-B18UT_6G.js → index-CVNhVzkq.js} +1 -1
- package/dist/assets/{index-DEPDXC-J.js → index-CVkCg5Aj.js} +1 -1
- package/dist/assets/{index-CqTIWm-d.js → index-CdezW1Kw.js} +1 -1
- package/dist/assets/{index-D5wEQrBd.js → index-CdvA-nst.js} +4 -4
- package/dist/assets/{index-Wcms7bcl.js → index-CyvvlQUB.js} +1 -1
- package/dist/assets/{index-BMiSc2wz.js → index-D-ntO8rE.js} +1 -1
- package/dist/assets/{index-DCT_TYwC.js → index-DCyBcr-q.js} +1 -1
- package/dist/assets/{index-Dk5x0Y-4.js → index-DQ1qH1cl.js} +1 -1
- package/dist/assets/{index-CDqA3u6q.js → index-D_a9PK4V.js} +1 -1
- package/dist/assets/{index-BqRmefsG.js → index-DaQDeVXf.js} +1 -1
- package/dist/assets/{index-7nX7dUfG.js → index-DhmNHIsJ.js} +1 -1
- package/dist/assets/{index-D8QzYVOq.js → index-DigEOLzs.js} +1 -1
- package/dist/assets/{index-DbV8Cm0j.js → index-DlOKstn-.js} +8 -8
- package/dist/assets/{index-DkMn9TUE.js → index-DmCU66xw.js} +1 -1
- package/dist/assets/{index-B0SXb9R9.js → index-FRZkFqzO.js} +13 -13
- package/dist/assets/{index-Cx63crA-.js → index-HtPUMJiU.js} +1 -1
- package/dist/assets/{index-CumCTaTW.js → index-OSlxm1AT.js} +1 -1
- package/dist/assets/{index-v0JEVAIK.js → index-RCN26efj.js} +1 -1
- package/dist/assets/{index-CSxTTw0q.js → index-Sv01KoW8.js} +1 -1
- package/dist/assets/{index-DmnbXzbU.js → index-cidQmAep.js} +1 -1
- package/dist/assets/index-nA-fvgOS.js +16 -0
- package/dist/assets/{index-5kreDgju.js → index-nwhvC7DB.js} +14 -14
- package/dist/assets/{index-4NjjF0-i.js → index-yypbZOfl.js} +1 -1
- package/dist/assets/index-z1j9rzLQ.js +23 -0
- package/dist/assets/{invitation-Yjy6HGG4.js → invitation-B_tDaqpP.js} +1 -1
- package/dist/assets/{invite-C0jfkMWg.js → invite-BxGFltRp.js} +1 -1
- package/dist/assets/{isEmail-DudZSfen.js → isEmail-DETpi_Kb.js} +1 -1
- package/dist/assets/{issue-passport-DudEqprT.js → issue-passport-CSBAlOX8.js} +1 -1
- package/dist/assets/{item-Qi3k0S3X.js → item-BRd0dxiN.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-eHjnd9Xc.js → jss-plugin-props-sort.esm-DVpQ5yti.js} +4 -4
- package/dist/assets/{launch-result-message-BjJsaytr.js → launch-result-message-C1eFaH2g.js} +1 -1
- package/dist/assets/{layout-UtcVR8BI.js → layout-BqxJknpc.js} +1 -1
- package/dist/assets/{list-header-NUhrDD1b.js → list-header-xJwS88e7.js} +1 -1
- package/dist/assets/localization-CmnKrS_Z.js +1 -0
- package/dist/assets/{log-Bg2f-djb.js → log-BeCiBP1M.js} +1 -1
- package/dist/assets/{login-jZ_gbwxx.js → login-5cPOokIA.js} +1 -1
- package/dist/assets/{login-oauth-callback-BsuD8dYE.js → login-oauth-callback-Bs-N26OI.js} +1 -1
- package/dist/assets/logo-uploader-eG5vS5PT.js +133 -0
- package/dist/assets/{lost-passport-DHMTqUy2.js → lost-passport-B6EDBN0v.js} +3 -3
- package/dist/assets/{lottie-react.esm-BRmb5Q_x.js → lottie-react.esm-BJHzlo-r.js} +1 -1
- package/dist/assets/{notifications-BHOBSPJc.js → notifications-D43qhnwk.js} +1 -1
- package/dist/assets/{open-window-D8-74j_m.js → open-window-C5vksiRO.js} +1 -1
- package/dist/assets/{overview-Dvi5x7VF.js → overview-CocE0lv3.js} +1 -1
- package/dist/assets/{page-header-Cuk0VEwE.js → page-header--q6whIwK.js} +1 -1
- package/dist/assets/{permission-CMfgwGXI.js → permission-DUJv7a1-.js} +1 -1
- package/dist/assets/{preferences-CDXLVGEm.js → preferences-AQkIuV2K.js} +1 -1
- package/dist/assets/publish-resource-CxkA39Ir.js +1 -0
- package/dist/assets/{raf-schd.esm-CAcrK34B.js → raf-schd.esm-DsHttn7z.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-BKgqJ7JL.js → react-beautiful-dnd.esm-DcPMGQEg.js} +1 -1
- package/dist/assets/refType-D9byZzl-.js +1 -0
- package/dist/assets/{resource-dialog-BVJhpy1Q.js → resource-dialog-B5zwd0d0.js} +2 -2
- package/dist/assets/sdk-DrdJIJgz.js +1 -0
- package/dist/assets/{selector-BpSDNqsZ.js → selector-BWYpRcfb.js} +1 -1
- package/dist/assets/session-WU4Y95zb.js +1 -0
- package/dist/assets/{setup-8nQMi_fq.js → setup-DVdr-Ufq.js} +3 -3
- package/dist/assets/{shorten-label-WcbI2P0r.js → shorten-label-CEzmS0N5.js} +1 -1
- package/dist/assets/{simple-select-CCxWI6E-.js → simple-select-Dhi7iDYe.js} +1 -1
- package/dist/assets/{slicedToArray-nT2OZGRu.js → slicedToArray-iE8MT9PB.js} +1 -1
- package/dist/assets/{start-D7bgrQnF.js → start-CSsdyyNU.js} +1 -1
- package/dist/assets/{step-actions-DCffr4lG.js → step-actions-DfqIHjeq.js} +1 -1
- package/dist/assets/{studio-rqa1WH-f.js → studio-DRAx93ei.js} +1 -1
- package/dist/assets/{switch-control-y9A4IBOq.js → switch-control-BkQkUgCM.js} +1 -1
- package/dist/assets/{toUpper-DXM7cuGF.js → toUpper-CgUsg4OW.js} +1 -1
- package/dist/assets/{transfer-DEYUxRW5.js → transfer-CoLhRcuo.js} +1 -1
- package/dist/assets/{trim-CVcoUNy4.js → trim-CWNwpiNo.js} +1 -1
- package/dist/assets/{uniqBy-DuMgcCm2.js → uniqBy-C5F74Dtm.js} +1 -1
- package/dist/assets/{unsubscribe-LWU1cavI.js → unsubscribe-6fUWnoTw.js} +1 -1
- package/dist/assets/{url-join-CL_JDvAa.js → url-join-CZtmq1NB.js} +1 -1
- package/dist/assets/use-mobile-CUUBXgJx.js +1 -0
- package/dist/assets/{use-mobile-ZzOK8QiS.js → use-mobile-DwzyaoXc.js} +1 -1
- package/dist/assets/{useAsync-gwjt9FVi.js → useAsync-DD0YPYoS.js} +1 -1
- package/dist/assets/{useFormControl-DNefZzFa.js → useFormControl-BL1v7rl-.js} +1 -1
- package/dist/assets/{useLocalStorage-TwWpr1f9.js → useLocalStorage-D0ViwHPK.js} +1 -1
- package/dist/assets/{useSetState-BEl9w6Ey.js → useSetState-CaW4MG-2.js} +1 -1
- package/dist/assets/{useSlot-gmkdMHt7.js → useSlot-CXDnszbU.js} +1 -1
- package/dist/assets/{useSlotProps-Beat0gxH.js → useSlotProps-_l_btYci.js} +1 -1
- package/dist/assets/{useThemeProps-D9xeggEi.js → useThemeProps-BuPPlocj.js} +1 -1
- package/dist/assets/{user-center-CYPTkfYq.js → user-center-CCplZBFV.js} +1 -1
- package/dist/assets/{user-sessions-CzYDLfF7.js → user-sessions-BcrnRXiG.js} +1 -1
- package/dist/assets/{util-HMZRwDlC.js → util-BeBowuUp.js} +1 -1
- package/dist/assets/{wrap-locale-YCzz3OWo.js → wrap-locale-MPr5fZic.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +37 -37
- package/dist/assets/add-resource-DvFNfjB2.js +0 -1
- package/dist/assets/api-VcJV-X9V.js +0 -1
- package/dist/assets/branding-8gA3ziq_.js +0 -37
- package/dist/assets/emotion-cache.browser.esm-MtkgfpRW.js +0 -1
- package/dist/assets/index-DN-ud71W.js +0 -16
- package/dist/assets/index-DTgMnz8b.js +0 -23
- package/dist/assets/localization-DfM99lg5.js +0 -1
- package/dist/assets/logo-uploader-cazNDY0K.js +0 -133
- package/dist/assets/publish-resource-BvIAjSul.js +0 -1
- package/dist/assets/refType-DiKtS-id.js +0 -1
- package/dist/assets/sdk-D-9ToVwd.js +0 -1
- package/dist/assets/session-F_I9Jrbv.js +0 -1
- package/dist/assets/use-mobile-CFQCpuvA.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{av as d2,j as o,aI as se,cR as g0,aM as H,fJ as Q1,aL as je,aG as $e,aH as Fe,T as K,r as w,aK as g1,aN as u2,aO as Ue,aP as qe,cY as p2,fK as r1,Z as Se,$ as ke,a1 as We,B as g,P as h,G as J,e as b1,u as te,aR as we,a_ as De,bz as i1,a3 as o1,L as ue,bL as b0,a as ve,aE as ge,N as h2,t as U,a0 as ce,dG as f2,ac as ye,c as pe,I as x2,bW as j1,cj as j0,cM as m2,cV as He,cW as w0,al as v2,da as g2,cQ as Qe,bF as ie,c4 as Ye,fw as b2,aa as Y1,fL as j2,b as ne,n as l1,bo as R0,el as C0,ak as w1,bp as y0,cA as z0,aV as Oe,aU as w2,a5 as S0,fM as Z1,fj as Pe,bm as R2,aw as k0,c3 as C2,l as y2,aD as z2,as as S2,at as d1}from"./index-w1h5fjUA.js";import{d as R1}from"./Add-X4z8DHkm.js";import{d as I0,a as k2}from"./Delete-DsXQXt5C.js";import{d as I2}from"./Error-D9g7mp8J.js";import{D as C1}from"./index-4NjjF0-i.js";import{T as M0,b as M2}from"./index-DkMn9TUE.js";import{C as y1}from"./confirm-DlXzE3-N.js";import{u as a1}from"./session-F_I9Jrbv.js";import{W as e0}from"./did-address-C2pjT4Vo.js";import{E as Ge,D as P2,C as L2,P as T2}from"./react-beautiful-dnd.esm-BKgqJ7JL.js";import{B as z1}from"./bundle-avatar-CG-YcfiD.js";import{S as be}from"./shorten-label-WcbI2P0r.js";import{A as P0}from"./Avatar-DdQeYraH.js";import{d as D2}from"./Download-KhEFO1tw.js";import{d as N2}from"./QuestionMarkCircle-B4nA_yE6.js";import{b as V2,c as t0,T as _2}from"./index-DEPDXC-J.js";import{_ as Me}from"./useSetState-BEl9w6Ey.js";import{c as S1}from"./index-CDqA3u6q.js";import{C as Ze,L as B2}from"./MoreVert-D_0KIWFk.js";import{A as L0}from"./Alert-SdIu9Hlz.js";import{p as n1}from"./index-CSD_wMks.js";import"./api-VcJV-X9V.js";import{i as E2}from"./index-v0JEVAIK.js";import{d as A2}from"./ExpandMore-DsX-wPbd.js";import{d as O2}from"./ChevronRight-CqKzFBJG.js";import{d as H2}from"./OpenInNew-B33B2IQa.js";import{u as T0}from"./useThemeProps-D9xeggEi.js";import{F as f1}from"./FormControlLabel-l14pLV4s.js";import{u as $2}from"./useSlotProps-Beat0gxH.js";import{d as F2}from"./DeleteOutline-DU-DZ2Ol.js";import{c as U2,A as D0,u as q2,S as W2,U as G2}from"./item-Qi3k0S3X.js";import{d as K2}from"./ArrowDropDown-D_j-3Aek.js";import{f as Te}from"./format-error-CDAFfj8A.js";import{B as x1}from"./ButtonGroup-DwUDwu6o.js";import{T as Le}from"./TextField-nYO4mCN5.js";import{I as k1}from"./InputAdornment-D3mFMJR5.js";import{S as Ee}from"./Stack-Cf8RLPm4.js";import{C as X2}from"./click-to-copy-D-NrDLcT.js";import{d as J2}from"./Launch-C-vq9aQf.js";import{S as o0}from"./index-B4lxRZaJ.js";import{M as Q2}from"./index-CqTIWm-d.js";import{p as Y2}from"./purify.es-Bq0E5Q3l.js";import{r as Z2}from"./index-Cx63crA-.js";import{d as et}from"./Done-CEijBk0K.js";import{c as N0,d as V0,b as tt,S as ot,a as lt}from"./Stepper-BMCZXJeS.js";import{R as nt,a as l0}from"./RadioGroup-dmNyerSz.js";import"./toPropertyKey-PLuKRk1e.js";import"./emotion-cache.browser.esm-MtkgfpRW.js";import"./index-DVPois7s.js";import"./redux-CluOqhW1.js";import"./ViewColumn-83XwXiON.js";import"./FormControl-uyHqpehB.js";import"./useFormControl-DNefZzFa.js";import"./FormGroup-D3XfyeLR.js";import"./Grid-Cozd141M.js";import"./Select-B1-paS03.js";import"./LastPage-CDX1Zcgq.js";import"./Toolbar-BRd5bS7b.js";import"./Search-XQNU_CT0.js";import"./index-Cq51W2RR.js";import"./DialogContentText-Bsce1Ptt.js";import"./Link-BBclrajR.js";import"./raf-schd.esm-CAcrK34B.js";import"./useSlot-gmkdMHt7.js";import"./jss-plugin-props-sort.esm-eHjnd9Xc.js";const st=d2(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),rt=["slots","slotProps"],it=se(g0)(({theme:e})=>H({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":H({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":H({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:Q1(e.palette.grey[200],.12)}:{backgroundColor:Q1(e.palette.grey[600],.12)})})),at=se(st)({width:24,height:16});function ct(e){const{slots:t={},slotProps:l={}}=e,s=je(e,rt),r=e;return o.jsx("li",{children:o.jsx(it,H({focusRipple:!0},s,{ownerState:r,children:o.jsx(at,H({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function dt(e){return Fe("MuiBreadcrumbs",e)}const ut=$e("MuiBreadcrumbs",["root","ol","li","separator"]),pt=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],ht=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},dt,t)},ft=se(K,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${ut.li}`]:t.li},t.root]})({}),xt=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),mt=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function vt(e,t,l,s){return e.reduce((r,a,i)=>(i<e.length-1?r=r.concat(a,o.jsx(mt,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(a),r),[])}const _0=w.forwardRef(function(t,l){const s=g1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:a,component:i="nav",slots:u={},slotProps:c={},expandText:f="Show path",itemsAfterCollapse:m=1,itemsBeforeCollapse:v=1,maxItems:C=8,separator:p="/"}=s,d=je(s,pt),[x,R]=w.useState(!1),y=H({},s,{component:i,expanded:x,expandText:f,itemsAfterCollapse:m,itemsBeforeCollapse:v,maxItems:C,separator:p}),z=ht(y),S=u2({elementType:u.CollapsedIcon,externalSlotProps:c.collapsedIcon,ownerState:y}),M=w.useRef(null),k=I=>{const $=()=>{R(!0);const V=M.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return v+m>=I.length?I:[...I.slice(0,v),o.jsx(ct,{"aria-label":f,slots:{CollapsedIcon:u.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:$},"ellipsis"),...I.slice(I.length-m,I.length)]},P=w.Children.toArray(r).filter(I=>w.isValidElement(I)).map((I,$)=>o.jsx("li",{className:z.li,children:I},`child-${$}`));return o.jsx(ft,H({ref:l,component:i,color:"text.secondary",className:Ue(z.root,a),ownerState:y},d,{children:o.jsx(xt,{className:z.ol,ref:M,ownerState:y,children:vt(x||C&&P.length<=C?P:k(P),z.separator,p,y)})}))});function gt(e){return Fe("MuiStepButton",e)}const n0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),bt=["children","className","icon","optional"],jt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},gt,t)},wt=se(g0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${n0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>H({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${n0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),Rt=w.forwardRef(function(t,l){const s=g1({props:t,name:"MuiStepButton"}),{children:r,className:a,icon:i,optional:u}=s,c=je(s,bt),{disabled:f,active:m}=w.useContext(N0),{orientation:v}=w.useContext(V0),C=H({},s,{orientation:v}),p=jt(C),d={icon:i,optional:u},x=p2(r,["StepLabel"])?w.cloneElement(r,d):o.jsx(tt,H({},d,{children:r}));return o.jsx(wt,H({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,a),ref:l,ownerState:C,"aria-current":m?"step":void 0},c,{children:x}))});function Ct(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const yt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],zt=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},Ct,t)},St=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>H({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),kt=se(r1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),It=w.forwardRef(function(t,l){const s=g1({props:t,name:"MuiStepContent"}),{children:r,className:a,TransitionComponent:i=r1,transitionDuration:u="auto",TransitionProps:c}=s,f=je(s,yt);w.useContext(V0);const{active:m,last:v,expanded:C}=w.useContext(N0),p=H({},s,{last:v}),d=zt(p);let x=u;return u==="auto"&&!i.muiSupportAuto&&(x=void 0),o.jsx(St,H({className:Ue(d.root,a),ref:l,ownerState:p},f,{children:o.jsx(kt,H({as:i,in:m||C,className:d.transition,ownerState:p,timeout:x,unmountOnExit:!0},c,{children:r}))}))});var I1={},Mt=ke;Object.defineProperty(I1,"__esModule",{value:!0});var B0=I1.default=void 0,Pt=Mt(Se()),Lt=o;B0=I1.default=(0,Pt.default)((0,Lt.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var M1={},Tt=ke;Object.defineProperty(M1,"__esModule",{value:!0});var E0=M1.default=void 0,Dt=Tt(Se()),Nt=o;E0=M1.default=(0,Dt.default)((0,Nt.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var P1={},Vt=ke;Object.defineProperty(P1,"__esModule",{value:!0});var A0=P1.default=void 0,_t=Vt(Se()),Bt=o;A0=P1.default=(0,_t.default)((0,Bt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function L1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[u,c]=w.useState(!1),f=We(m=>m.breakpoints.down("md"));return o.jsxs(g,{sx:{display:"flex",flexDirection:"row",color:u?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[o.jsx(P0,{sx:{borderRadius:1},src:i}),o.jsxs(g,{children:[o.jsx(be,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(be,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||u?"primary.main":"grey.700"},children:r||"/"})]})]})}L1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function T1({initUrl:e}){const t=b1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:a}=we(),{api:i}=a1(),[u,c]=w.useState(!0),{blocklet:f}=De(),[m,v]=w.useState(null),[C,p]=w.useState(!1),d=We(L=>L.breakpoints.down("xl")),{componentDid:x=""}=i1(),[R,y]=w.useState(null),z=()=>{a.getProjects({input:{did:f.meta.did,componentDid:x,tenantScope:l}}).then(L=>{const N=(L==null?void 0:L.projects)||[];c(!1),y(N)}).catch(L=>{c(!1),U.error(L.message)})},S=()=>{t(`${J.UNOWNED_DID}/create/none`,{replace:!0})},M=L=>{v(L)},k=()=>{c(!1),p(!0)},P=()=>{p(!1),v(null)},I=L=>{U.error(L.message),p(!1),v(null)},$=L=>{if(!(L!=null&&L.deleted)){U.error("Delete project failed");return}z(),p(!1),v(null)};if(w.useEffect(()=>{z()},[]),!R&&u)return o.jsx(g,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Ge,{})});if(!R)return null;if(!R.length)return o.jsxs(g,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(g,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(g,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(o1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:L=>{const N=R[L];return o.jsx(ue,{to:`${N.id}`,children:o.jsx(L1,{did:f.meta.did,projectId:N.id,logo:N.blockletLogo,title:N.blockletTitle,describe:N.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:L=>L?o.jsx(M0,{type:"success",children:L}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:L=>L?o.jsx(e0,{size:14,compact:!0,responsive:!1,did:L}):null}},d||x?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:L=>L?o.jsx(e0,{onClick:()=>{t(`/.well-known/service/admin/members?did=${L}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:L}):null}},d||x?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:L=>{const N=(f.children||[]).find(D=>D.meta.did===L);return N?o.jsxs(g,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(z1,{size:14,blocklet:N,ancestors:[f]}),o.jsx(g,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:N.meta.title})]},L):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:L=>o.jsx(g,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(be,{children:L})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:L=>o.jsx(b0,{value:Number(L),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:L=>{const N=R[L];return o.jsxs(g,{display:"flex",children:[o.jsx(ue,{to:`${N.id}/new-release/${N.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"create",children:o.jsx(B0,{style:{fontSize:18}})})})}),!!N.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:N.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"secondary","aria-label":"create",children:o.jsx(ue,{style:{display:"flex"},to:`${N.id}/view/${N.lastReleaseId}`,children:o.jsx(E0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:N.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"delete",onClick:()=>M(N),children:o.jsx(I0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),T=C?o.jsx(h2,{open:!0,popup:!0,onClose:P,action:"check-has-project-id",locale:r,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:$,onError:I,extraParams:{projectId:m.id,did:f.meta.did,name:m.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:m.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:m.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Et,{children:[o.jsxs(g,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(g,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(g,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(A0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(o1,{onClick:S,variant:"contained",children:[o.jsx(R1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(g,{mt:3}),o.jsx(C1,{className:"main-table",locale:r,data:R,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),m&&o.jsx(y1,{title:`${s("common.delete")} ${m.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:k,onCancel:()=>v(null),children:o.jsx(g,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(L=>o.jsxs(g,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(I2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(K,{component:"span",variant:"inherit",color:"text.secondary",children:L})]}))})}),T]})}T1.propTypes={initUrl:h.object};T1.defaultProps={initUrl:null};const Et=ce(g)`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-FRZkFqzO.js","assets/index-B6JqnGav.js","assets/index-D8NuaJ66.css","assets/url-join-CZtmq1NB.js","assets/index-B6_C9nGz.js","assets/_createAggregator-C-mfkhIa.js","assets/index-4nRB-kyL.js","assets/index-D_a9PK4V.js","assets/index-D-ntO8rE.js","assets/fallback-Bog6C-ue.js","assets/index-C1CKS8aB.js","assets/Menu-DHy4VyDW.js","assets/Toolbar-CpYKKa3O.js","assets/Hidden-CrDKveON.js","assets/index-OSlxm1AT.js","assets/MoreVert-B5eqgNGS.js","assets/FormControlLabel-Cj9C6pO9.js","assets/useFormControl-BL1v7rl-.js","assets/Stack-FAMhTibv.js","assets/ListItemButton-CdKDiD3I.js","assets/selector-BWYpRcfb.js","assets/ExpandMore-Co-_XFGT.js","assets/Avatar-kkkoJE0g.js","assets/useSlot-CXDnszbU.js","assets/resource-dialog-B5zwd0d0.js","assets/index-DigEOLzs.js","assets/emotion-cache.browser.esm-4zaifxzt.js","assets/index-z1j9rzLQ.js","assets/OpenInNew-DZ_gvUzN.js","assets/index-RCN26efj.js","assets/Link-Chjdc6xT.js","assets/Skeleton-DF-GsUea.js","assets/HelpOutline-DHPhK_es.js","assets/index-nA-fvgOS.js","assets/ButtonGroup-WlPKzLhC.js","assets/DialogContentText-AZa4UZAk.js","assets/TextField-CmfNcPZp.js","assets/FormControl-BXFBXBjg.js","assets/Select-DUqBNlJT.js","assets/use-mobile-CUUBXgJx.js","assets/index-CVkCg5Aj.js","assets/index-C2Js2VJs.js","assets/index-BNJA7fMm.js","assets/index-yypbZOfl.js","assets/useThemeProps-BuPPlocj.js","assets/toPropertyKey-PLuKRk1e.js","assets/index-CBvRZgBF.js","assets/redux-CluOqhW1.js","assets/ViewColumn-B0BnNDVH.js","assets/FormGroup-BgZW2j0M.js","assets/Grid-Cdg6My8u.js","assets/Delete-CWSox7Pi.js","assets/LastPage-PwdeYobs.js","assets/Search-sbQ5imrV.js","assets/deprecate-DRUEDZmV.js","assets/uniqBy-C5F74Dtm.js","assets/toUpper-CgUsg4OW.js","assets/purify.es-Bq0E5Q3l.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{av as d2,j as o,aI as se,cR as g0,aM as H,fJ as Q1,aL as je,aG as $e,aH as Fe,T as K,r as w,aK as g1,aN as u2,aO as Ue,aP as qe,cY as p2,fK as r1,Z as Se,$ as ke,a1 as We,B as g,P as h,G as J,e as b1,u as te,aR as we,a_ as De,bz as i1,a3 as o1,L as ue,bL as b0,a as ve,aE as ge,N as h2,t as U,a0 as ce,dG as f2,ac as ye,c as pe,I as x2,bW as j1,cj as j0,cM as m2,cV as He,cW as w0,al as v2,da as g2,cQ as Qe,bF as ie,c4 as Ye,fw as b2,aa as Y1,fL as j2,b as ne,n as l1,bo as R0,el as C0,ak as w1,bp as y0,cA as z0,aV as Oe,aU as w2,a5 as S0,fM as Z1,fj as Pe,bm as R2,aw as k0,c3 as C2,l as y2,aD as z2,as as S2,at as d1}from"./index-B6JqnGav.js";import{d as R1}from"./Add-DrvqL0hE.js";import{d as I0,a as k2}from"./Delete-CWSox7Pi.js";import{d as I2}from"./Error-DFKaWPMg.js";import{D as C1}from"./index-yypbZOfl.js";import{T as M0,b as M2}from"./index-DmCU66xw.js";import{C as y1}from"./confirm-8d8O8-hN.js";import{u as a1}from"./session-WU4Y95zb.js";import{W as e0}from"./did-address-CFfKa4ZS.js";import{E as Ge,D as P2,C as L2,P as T2}from"./react-beautiful-dnd.esm-DcPMGQEg.js";import{B as z1}from"./bundle-avatar-CEJOCMtg.js";import{S as be}from"./shorten-label-CEzmS0N5.js";import{A as P0}from"./Avatar-kkkoJE0g.js";import{d as D2}from"./Download-DLBLdXgp.js";import{d as N2}from"./QuestionMarkCircle-JNr-NuUt.js";import{b as V2,c as t0,T as _2}from"./index-CVkCg5Aj.js";import{_ as Me}from"./useSetState-CaW4MG-2.js";import{c as S1}from"./index-D_a9PK4V.js";import{C as Ze,L as B2}from"./MoreVert-B5eqgNGS.js";import{A as L0}from"./Alert-BejFmWNH.js";import{p as n1}from"./index-B43BetvD.js";import"./api-BvIXgXDN.js";import{i as E2}from"./index-RCN26efj.js";import{d as A2}from"./ExpandMore-Co-_XFGT.js";import{d as O2}from"./ChevronRight-DmcZK4DK.js";import{d as H2}from"./OpenInNew-DZ_gvUzN.js";import{u as T0}from"./useThemeProps-BuPPlocj.js";import{F as f1}from"./FormControlLabel-Cj9C6pO9.js";import{u as $2}from"./useSlotProps-_l_btYci.js";import{d as F2}from"./DeleteOutline-CCuUMIOD.js";import{c as U2,A as D0,u as q2,S as W2,U as G2}from"./item-BRd0dxiN.js";import{d as K2}from"./ArrowDropDown-CZUn78y5.js";import{f as Te}from"./format-error-CovOYOWJ.js";import{B as x1}from"./ButtonGroup-WlPKzLhC.js";import{T as Le}from"./TextField-CmfNcPZp.js";import{I as k1}from"./InputAdornment-scbCVxkC.js";import{S as Ee}from"./Stack-FAMhTibv.js";import{C as X2}from"./click-to-copy-DpIi-Ham.js";import{d as J2}from"./Launch-Esgq-P4W.js";import{S as o0}from"./index-BNJA7fMm.js";import{M as Q2}from"./index-CdezW1Kw.js";import{p as Y2}from"./purify.es-Bq0E5Q3l.js";import{r as Z2}from"./index-HtPUMJiU.js";import{d as et}from"./Done-TRARuAiP.js";import{c as N0,d as V0,b as tt,S as ot,a as lt}from"./Stepper-b62gMXip.js";import{R as nt,a as l0}from"./RadioGroup-CMawEABb.js";import"./toPropertyKey-PLuKRk1e.js";import"./emotion-cache.browser.esm-4zaifxzt.js";import"./index-CBvRZgBF.js";import"./redux-CluOqhW1.js";import"./ViewColumn-B0BnNDVH.js";import"./FormControl-BXFBXBjg.js";import"./useFormControl-BL1v7rl-.js";import"./FormGroup-BgZW2j0M.js";import"./Grid-Cdg6My8u.js";import"./Select-DUqBNlJT.js";import"./LastPage-PwdeYobs.js";import"./Toolbar-CpYKKa3O.js";import"./Search-sbQ5imrV.js";import"./index-C2Js2VJs.js";import"./DialogContentText-AZa4UZAk.js";import"./Link-Chjdc6xT.js";import"./raf-schd.esm-DsHttn7z.js";import"./useSlot-CXDnszbU.js";import"./jss-plugin-props-sort.esm-DVpQ5yti.js";const st=d2(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),rt=["slots","slotProps"],it=se(g0)(({theme:e})=>H({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":H({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":H({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:Q1(e.palette.grey[200],.12)}:{backgroundColor:Q1(e.palette.grey[600],.12)})})),at=se(st)({width:24,height:16});function ct(e){const{slots:t={},slotProps:l={}}=e,s=je(e,rt),r=e;return o.jsx("li",{children:o.jsx(it,H({focusRipple:!0},s,{ownerState:r,children:o.jsx(at,H({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function dt(e){return Fe("MuiBreadcrumbs",e)}const ut=$e("MuiBreadcrumbs",["root","ol","li","separator"]),pt=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],ht=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},dt,t)},ft=se(K,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${ut.li}`]:t.li},t.root]})({}),xt=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),mt=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function vt(e,t,l,s){return e.reduce((r,a,i)=>(i<e.length-1?r=r.concat(a,o.jsx(mt,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(a),r),[])}const _0=w.forwardRef(function(t,l){const s=g1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:a,component:i="nav",slots:u={},slotProps:c={},expandText:f="Show path",itemsAfterCollapse:m=1,itemsBeforeCollapse:v=1,maxItems:C=8,separator:p="/"}=s,d=je(s,pt),[x,R]=w.useState(!1),y=H({},s,{component:i,expanded:x,expandText:f,itemsAfterCollapse:m,itemsBeforeCollapse:v,maxItems:C,separator:p}),z=ht(y),S=u2({elementType:u.CollapsedIcon,externalSlotProps:c.collapsedIcon,ownerState:y}),M=w.useRef(null),k=I=>{const $=()=>{R(!0);const V=M.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return v+m>=I.length?I:[...I.slice(0,v),o.jsx(ct,{"aria-label":f,slots:{CollapsedIcon:u.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:$},"ellipsis"),...I.slice(I.length-m,I.length)]},P=w.Children.toArray(r).filter(I=>w.isValidElement(I)).map((I,$)=>o.jsx("li",{className:z.li,children:I},`child-${$}`));return o.jsx(ft,H({ref:l,component:i,color:"text.secondary",className:Ue(z.root,a),ownerState:y},d,{children:o.jsx(xt,{className:z.ol,ref:M,ownerState:y,children:vt(x||C&&P.length<=C?P:k(P),z.separator,p,y)})}))});function gt(e){return Fe("MuiStepButton",e)}const n0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),bt=["children","className","icon","optional"],jt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},gt,t)},wt=se(g0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${n0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>H({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${n0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),Rt=w.forwardRef(function(t,l){const s=g1({props:t,name:"MuiStepButton"}),{children:r,className:a,icon:i,optional:u}=s,c=je(s,bt),{disabled:f,active:m}=w.useContext(N0),{orientation:v}=w.useContext(V0),C=H({},s,{orientation:v}),p=jt(C),d={icon:i,optional:u},x=p2(r,["StepLabel"])?w.cloneElement(r,d):o.jsx(tt,H({},d,{children:r}));return o.jsx(wt,H({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,a),ref:l,ownerState:C,"aria-current":m?"step":void 0},c,{children:x}))});function Ct(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const yt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],zt=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},Ct,t)},St=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>H({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),kt=se(r1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),It=w.forwardRef(function(t,l){const s=g1({props:t,name:"MuiStepContent"}),{children:r,className:a,TransitionComponent:i=r1,transitionDuration:u="auto",TransitionProps:c}=s,f=je(s,yt);w.useContext(V0);const{active:m,last:v,expanded:C}=w.useContext(N0),p=H({},s,{last:v}),d=zt(p);let x=u;return u==="auto"&&!i.muiSupportAuto&&(x=void 0),o.jsx(St,H({className:Ue(d.root,a),ref:l,ownerState:p},f,{children:o.jsx(kt,H({as:i,in:m||C,className:d.transition,ownerState:p,timeout:x,unmountOnExit:!0},c,{children:r}))}))});var I1={},Mt=ke;Object.defineProperty(I1,"__esModule",{value:!0});var B0=I1.default=void 0,Pt=Mt(Se()),Lt=o;B0=I1.default=(0,Pt.default)((0,Lt.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var M1={},Tt=ke;Object.defineProperty(M1,"__esModule",{value:!0});var E0=M1.default=void 0,Dt=Tt(Se()),Nt=o;E0=M1.default=(0,Dt.default)((0,Nt.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var P1={},Vt=ke;Object.defineProperty(P1,"__esModule",{value:!0});var A0=P1.default=void 0,_t=Vt(Se()),Bt=o;A0=P1.default=(0,_t.default)((0,Bt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function L1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[u,c]=w.useState(!1),f=We(m=>m.breakpoints.down("md"));return o.jsxs(g,{sx:{display:"flex",flexDirection:"row",color:u?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[o.jsx(P0,{sx:{borderRadius:1},src:i}),o.jsxs(g,{children:[o.jsx(be,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(be,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||u?"primary.main":"grey.700"},children:r||"/"})]})]})}L1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function T1({initUrl:e}){const t=b1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:a}=we(),{api:i}=a1(),[u,c]=w.useState(!0),{blocklet:f}=De(),[m,v]=w.useState(null),[C,p]=w.useState(!1),d=We(L=>L.breakpoints.down("xl")),{componentDid:x=""}=i1(),[R,y]=w.useState(null),z=()=>{a.getProjects({input:{did:f.meta.did,componentDid:x,tenantScope:l}}).then(L=>{const N=(L==null?void 0:L.projects)||[];c(!1),y(N)}).catch(L=>{c(!1),U.error(L.message)})},S=()=>{t(`${J.UNOWNED_DID}/create/none`,{replace:!0})},M=L=>{v(L)},k=()=>{c(!1),p(!0)},P=()=>{p(!1),v(null)},I=L=>{U.error(L.message),p(!1),v(null)},$=L=>{if(!(L!=null&&L.deleted)){U.error("Delete project failed");return}z(),p(!1),v(null)};if(w.useEffect(()=>{z()},[]),!R&&u)return o.jsx(g,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Ge,{})});if(!R)return null;if(!R.length)return o.jsxs(g,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(g,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(g,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(o1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:L=>{const N=R[L];return o.jsx(ue,{to:`${N.id}`,children:o.jsx(L1,{did:f.meta.did,projectId:N.id,logo:N.blockletLogo,title:N.blockletTitle,describe:N.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:L=>L?o.jsx(M0,{type:"success",children:L}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:L=>L?o.jsx(e0,{size:14,compact:!0,responsive:!1,did:L}):null}},d||x?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:L=>L?o.jsx(e0,{onClick:()=>{t(`/.well-known/service/admin/members?did=${L}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:L}):null}},d||x?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:L=>{const N=(f.children||[]).find(D=>D.meta.did===L);return N?o.jsxs(g,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(z1,{size:14,blocklet:N,ancestors:[f]}),o.jsx(g,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:N.meta.title})]},L):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:L=>o.jsx(g,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(be,{children:L})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:L=>o.jsx(b0,{value:Number(L),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:L=>{const N=R[L];return o.jsxs(g,{display:"flex",children:[o.jsx(ue,{to:`${N.id}/new-release/${N.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"create",children:o.jsx(B0,{style:{fontSize:18}})})})}),!!N.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:N.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"secondary","aria-label":"create",children:o.jsx(ue,{style:{display:"flex"},to:`${N.id}/view/${N.lastReleaseId}`,children:o.jsx(E0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:N.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"delete",onClick:()=>M(N),children:o.jsx(I0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),T=C?o.jsx(h2,{open:!0,popup:!0,onClose:P,action:"check-has-project-id",locale:r,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:$,onError:I,extraParams:{projectId:m.id,did:f.meta.did,name:m.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:m.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:m.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Et,{children:[o.jsxs(g,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(g,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(g,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(A0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(o1,{onClick:S,variant:"contained",children:[o.jsx(R1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(g,{mt:3}),o.jsx(C1,{className:"main-table",locale:r,data:R,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),m&&o.jsx(y1,{title:`${s("common.delete")} ${m.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:k,onCancel:()=>v(null),children:o.jsx(g,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(L=>o.jsxs(g,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(I2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(K,{component:"span",variant:"inherit",color:"text.secondary",children:L})]}))})}),T]})}T1.propTypes={initUrl:h.object};T1.defaultProps={initUrl:null};const Et=ce(g)`
|
|
3
3
|
.main-table > div:first-child {
|
|
4
4
|
display: none;
|
|
5
5
|
}
|
|
@@ -133,7 +133,7 @@ import{av as d2,j as o,aI as se,cR as g0,aM as H,fJ as Q1,aL as je,aG as $e,aH a
|
|
|
133
133
|
background: #fff;
|
|
134
134
|
z-index: 10;
|
|
135
135
|
}
|
|
136
|
-
`,u0="lastWantToConnectStoreId";function Jl(e){var u,c;const[t,l]=w.useState(null),{session:s}=a1(),r=w.useCallback(f=>{l(f),localStorage.setItem(u0,f==null?void 0:f.id)},[l]),a=w.useMemo(()=>{var C,p,d,x;const f=localStorage.getItem(u0),m=f?(((C=e==null?void 0:e.settings)==null?void 0:C.storeList)||[]).find(R=>R.id===f):null;if(m)return m;let v=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(R=>{var y;return!(R.id!==J.BLOCKLET_STORE.id||R.scope&&R.scope!=="studio"&&R.scope!==((y=s==null?void 0:s.user)==null?void 0:y.did))});return v||(v=(x=(d=e==null?void 0:e.settings)==null?void 0:d.storeList)==null?void 0:x[0]),v},[(u=e==null?void 0:e.settings)==null?void 0:u.storeList,(c=s==null?void 0:s.user)==null?void 0:c.did]);return[t||a||{},r]}const h1={};async function K0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){h1[r]&&clearTimeout(h1[r]),await new Promise(u=>setTimeout(u,s));const a=Date.now(),i=async(u,c)=>{try{const f=await e();u(f)}catch(f){Date.now()-a>l?c(f):r?h1[r]=setTimeout(()=>i(u,c),t):setTimeout(()=>i(u,c),t)}};return new Promise(i)}function Ql(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Yl(e,{did:t,projectId:l,messageId:s}){return K0(async()=>{var a;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((a=r==null?void 0:r.project)!=null&&a.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function Zl(e,{did:t,projectId:l,storeId:s}){return K0(async()=>{var i,u;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((u=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&u.length))throw new Error("Connected store not found");if(!r.project.connectedStores.find(c=>c.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const X0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,u;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let a=e?((u=l==null?void 0:l.settings)==null?void 0:u.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(a)||(a=[]),a=a.filter(c=>c.protected||!c.scope||c.scope==="studio"||c.scope===s),{teamDid:r,storeList:a}};function F1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:a,componentDid:i}){var N,D,B;const{t:u}=te(),{session:c}=a1(),{api:f,info:m,inService:v}=we(),C=De(),[p,d]=w.useState(!1),x=w.useRef(null),[R,y]=w.useState(!1),[z,S]=w.useState(null),M=A=>{l(A),d(!1)},k=()=>{d(!p)},P=A=>{x.current&&x.current.contains(A.target)||d(!1)},I=()=>{y(!0)},$=()=>{y(!1)},V=async()=>{var A;if(z)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:z.url,projectId:"",scope:z.scope||"studio"}}),await((A=C==null?void 0:C.actions)==null?void 0:A.refreshBlocklet())}catch(O){U.error(`Remove Blocklet Store Error: ${Te(O)}`)}finally{S(null)}},{storeList:T}=X0({fromBlocklet:v,blocklet:e,nodeInfo:m,componentDid:i,userDid:(N=c==null?void 0:c.user)==null?void 0:N.did}),L=(D=e==null?void 0:e.meta)==null?void 0:D.did;return o.jsxs(o.Fragment,{children:[o.jsxs(x1,{disabled:r,ref:x,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[a&&o.jsx(l1,{size:14,sx:{mr:.5}}),`${u("common.connect")} ${t.name||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:k,children:o.jsx(K2,{})})]}),o.jsx(R0,{sx:{zIndex:10},open:p,anchorEl:x.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:A})=>o.jsx(C0,{...A,style:{transformOrigin:"center top"},children:o.jsx(w1,{children:o.jsx(y0,{onClickAway:P,children:o.jsxs(z0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[T==null?void 0:T.map(O=>{var W;return o.jsxs(Oe,{selected:O.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>M(O),children:[o.jsxs(g,{children:[o.jsx(be,{sx:{fontSize:"16px"},maxLength:24,children:O.name}),o.jsx(be,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:O.url})]}),U2({store:O,userDid:(W=c==null?void 0:c.user)==null?void 0:W.did})&&o.jsx(ge,{sx:{ml:1},onClick:X=>{X.preventDefault(),X.stopPropagation(),S(O)},children:o.jsx(ie,{icon:"ic:outline-delete"})})]},O.url)}),o.jsx(w2,{}),o.jsxs(Oe,{onClick:I,children:[o.jsx(R1,{font:!0}),o.jsx(K,{variant:"inherit",children:u("store.blockletRegistry.addRegistry")})]})]})})})})}),R&&o.jsx(D0,{hiddenChildren:!0,open:!0,onClose:$,teamDid:L,storeList:T,scope:"studio",onAdd:(B=C==null?void 0:C.actions)==null?void 0:B.refreshBlocklet}),z&&o.jsx(y1,{displayError:!0,title:`${u("common.delete")} ${z.name}`,description:u("blocklet.publish.deleteStoreTip",{name:z.name}),confirm:u("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}F1.propTypes={store:h.object,blocklet:h.object,onChangeStore:h.func.isRequired,onClick:h.func.isRequired,loading:h.bool.isRequired,disabled:h.bool.isRequired,componentDid:h.string.isRequired,projectType:h.string.isRequired,getData:h.func.isRequired};F1.defaultProps={store:null,blocklet:null};const p0=w.lazy(()=>S0(()=>import("./index-B0SXb9R9.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57])).then(e=>({default:e.Uploader})));function J0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:a,paramsErrTip:i,setParamsErrTip:u,setLoading:c,initUrl:f,initLogoUrl:m,setInitLogoUrl:v,componentDid:C}){const{t:p}=te(),{api:d}=we(),x=b1(),R=w.useRef(null),y=w.useRef(null),[z,S]=Jl(s),M=q2({messageType:"connect-store-message",onOpen:()=>c(!0),onClose:()=>c(!1)}),k=async D=>{const B=setTimeout(()=>{c(!1)},2e4),A=await Yl(d,D);c(!1),clearTimeout(B),window.parent.postMessage({event:"studioDialog.connected",componentDid:C},"*"),x(window.location.pathname.replace(`${J.UNOWNED_DID}/create`,`${A}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){U.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(z!=null&&z.url)){U.error(p("blocklet.publish.noStoreSelected"));return}const D=Ql();M(async(B,A)=>{var O,W,X;try{const Q=await d.connectByStudio({input:{did:(O=s==null?void 0:s.meta)==null?void 0:O.did,blockletTitle:r==null?void 0:r.blockletTitle,storeUrl:z.url,storeId:z.id,storeName:z.name,type:((W=r==null?void 0:r.blockletComponents)==null?void 0:W.length)>0?"pack":"resource",componentDid:C,messageId:D,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(Q!=null&&Q.url)){U.error("failed to connect to store");return}A(Q.url),k({did:(X=s==null?void 0:s.meta)==null?void 0:X.did,projectId:"",messageId:D})}catch(Q){const re=Te(Q);U.error(re),c(!1)}})},I=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,$=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,T=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(D=>`${$}/${D}`),L=()=>t?!1:!e||e===J.UNOWNED_DID?(U.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0,N=D=>{if(!D.destination)return;const B=Array.from(r.blockletScreenshots),[A]=B.splice(D.source.index,1);B.splice(D.destination.index,0,A),a(O=>({...O,blockletScreenshots:B}))};return o.jsxs(en,{children:[o.jsx(g,{display:"flex",className:"section",children:o.jsxs(g,{sx:{flex:1},children:[o.jsx(Le,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:r.blockletTitle||"",onChange:D=>{u({blockletTitle:""}),a({blockletTitle:D.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Le,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===J.UNOWNED_DID&&o.jsx(k1,{position:"end",children:o.jsx(F1,{blocklet:s,store:z,componentDid:C,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===J.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Le,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:r.blockletDescription||"",onChange:D=>{u({blockletDescription:""}),a({blockletDescription:D.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(g,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(g,{sx:{flex:1},children:[o.jsxs(g,{display:"flex",flexDirection:"row",flexWrap:"wrap",children:[o.jsxs(Ee,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[o.jsx(K,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.logo")}),o.jsxs(Ee,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[o.jsx(g,{children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:"256x256"})]})}),o.jsx(g,{children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:"<500Kb"})]})})]})]}),o.jsx(g,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(P0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:m||V,onClick:()=>{var D;L()&&((D=R.current)==null||D.open())}})})]}),o.jsxs(g,{display:"flex",mt:3,flexDirection:"row",flexWrap:"wrap",children:[o.jsxs(Ee,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[o.jsx(K,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.screenshot")}),o.jsxs(Ee,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[o.jsx(g,{sx:{border:"none"},variant:"outlined",size:"small",children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:"16 / 9"})]})}),o.jsx(g,{children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:"1~5"})]})}),o.jsx(g,{children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:"<5MB"})]})}),o.jsx(g,{children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]})})]})]}),o.jsx(P2,{onDragEnd:t?void 0:N,children:o.jsx(L2,{droppableId:"screenshots",direction:"horizontal",isDropDisabled:t,children:(D,B)=>o.jsxs(g,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:B.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:B.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:D.innerRef,...D.droppableProps,children:[T.map((A,O)=>o.jsx(T2,{draggableId:A,index:O,isDragDisabled:t,children:(W,X)=>o.jsxs(g,{ref:W.innerRef,...W.draggableProps,...W.dragHandleProps,className:"screenshot",sx:{transform:X.isDragging?"scale(1.05)":"none",boxShadow:X.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[o.jsx("img",{alt:"screenshot",src:A}),!t&&o.jsx(ge,{className:"action",onClick:()=>{a(Q=>{const re=[...Q.blockletScreenshots];return re.splice(O,1),{...Q,blockletScreenshots:re}})},children:o.jsx(F2,{})})]})},A)),D.placeholder,T.length<5&&o.jsx(g,{sx:{width:240,height:135,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{var A;L()&&((A=y.current)==null||A.open())},children:"+"})]})})})]})]})}),o.jsxs(w.Suspense,{fallback:o.jsx(Ge,{}),children:[o.jsx(p0,{ref:R,popup:!0,onUploadFinish:D=>{var B;a({blockletLogo:D.data.filename}),v(""),(B=R.current)==null||B.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),o.jsx(p0,{ref:y,popup:!0,onUploadFinish:D=>{var B;a(A=>{var W;const O=A.blockletScreenshots||[];return O.push((W=D.data)==null?void 0:W.filename),{...A,blockletScreenshots:O}}),(B=y.current)==null||B.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:$,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-T.length}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})]})}J0.propTypes={projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired,blocklet:h.object.isRequired,setLoading:h.func.isRequired,initUrl:h.object.isRequired,componentDid:h.isRequired,initLogoUrl:h.string.isRequired,setInitLogoUrl:h.func.isRequired};const en=ce.div`
|
|
136
|
+
`,u0="lastWantToConnectStoreId";function Jl(e){var u,c;const[t,l]=w.useState(null),{session:s}=a1(),r=w.useCallback(f=>{l(f),localStorage.setItem(u0,f==null?void 0:f.id)},[l]),a=w.useMemo(()=>{var C,p,d,x;const f=localStorage.getItem(u0),m=f?(((C=e==null?void 0:e.settings)==null?void 0:C.storeList)||[]).find(R=>R.id===f):null;if(m)return m;let v=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(R=>{var y;return!(R.id!==J.BLOCKLET_STORE.id||R.scope&&R.scope!=="studio"&&R.scope!==((y=s==null?void 0:s.user)==null?void 0:y.did))});return v||(v=(x=(d=e==null?void 0:e.settings)==null?void 0:d.storeList)==null?void 0:x[0]),v},[(u=e==null?void 0:e.settings)==null?void 0:u.storeList,(c=s==null?void 0:s.user)==null?void 0:c.did]);return[t||a||{},r]}const h1={};async function K0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){h1[r]&&clearTimeout(h1[r]),await new Promise(u=>setTimeout(u,s));const a=Date.now(),i=async(u,c)=>{try{const f=await e();u(f)}catch(f){Date.now()-a>l?c(f):r?h1[r]=setTimeout(()=>i(u,c),t):setTimeout(()=>i(u,c),t)}};return new Promise(i)}function Ql(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Yl(e,{did:t,projectId:l,messageId:s}){return K0(async()=>{var a;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((a=r==null?void 0:r.project)!=null&&a.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function Zl(e,{did:t,projectId:l,storeId:s}){return K0(async()=>{var i,u;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((u=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&u.length))throw new Error("Connected store not found");if(!r.project.connectedStores.find(c=>c.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const X0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,u;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let a=e?((u=l==null?void 0:l.settings)==null?void 0:u.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(a)||(a=[]),a=a.filter(c=>c.protected||!c.scope||c.scope==="studio"||c.scope===s),{teamDid:r,storeList:a}};function F1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:a,componentDid:i}){var N,D,B;const{t:u}=te(),{session:c}=a1(),{api:f,info:m,inService:v}=we(),C=De(),[p,d]=w.useState(!1),x=w.useRef(null),[R,y]=w.useState(!1),[z,S]=w.useState(null),M=A=>{l(A),d(!1)},k=()=>{d(!p)},P=A=>{x.current&&x.current.contains(A.target)||d(!1)},I=()=>{y(!0)},$=()=>{y(!1)},V=async()=>{var A;if(z)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:z.url,projectId:"",scope:z.scope||"studio"}}),await((A=C==null?void 0:C.actions)==null?void 0:A.refreshBlocklet())}catch(O){U.error(`Remove Blocklet Store Error: ${Te(O)}`)}finally{S(null)}},{storeList:T}=X0({fromBlocklet:v,blocklet:e,nodeInfo:m,componentDid:i,userDid:(N=c==null?void 0:c.user)==null?void 0:N.did}),L=(D=e==null?void 0:e.meta)==null?void 0:D.did;return o.jsxs(o.Fragment,{children:[o.jsxs(x1,{disabled:r,ref:x,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[a&&o.jsx(l1,{size:14,sx:{mr:.5}}),`${u("common.connect")} ${t.name||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:k,children:o.jsx(K2,{})})]}),o.jsx(R0,{sx:{zIndex:10},open:p,anchorEl:x.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:A})=>o.jsx(C0,{...A,style:{transformOrigin:"center top"},children:o.jsx(w1,{children:o.jsx(y0,{onClickAway:P,children:o.jsxs(z0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[T==null?void 0:T.map(O=>{var W;return o.jsxs(Oe,{selected:O.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>M(O),children:[o.jsxs(g,{children:[o.jsx(be,{sx:{fontSize:"16px"},maxLength:24,children:O.name}),o.jsx(be,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:O.url})]}),U2({store:O,userDid:(W=c==null?void 0:c.user)==null?void 0:W.did})&&o.jsx(ge,{sx:{ml:1},onClick:X=>{X.preventDefault(),X.stopPropagation(),S(O)},children:o.jsx(ie,{icon:"ic:outline-delete"})})]},O.url)}),o.jsx(w2,{}),o.jsxs(Oe,{onClick:I,children:[o.jsx(R1,{font:!0}),o.jsx(K,{variant:"inherit",children:u("store.blockletRegistry.addRegistry")})]})]})})})})}),R&&o.jsx(D0,{hiddenChildren:!0,open:!0,onClose:$,teamDid:L,storeList:T,scope:"studio",onAdd:(B=C==null?void 0:C.actions)==null?void 0:B.refreshBlocklet}),z&&o.jsx(y1,{displayError:!0,title:`${u("common.delete")} ${z.name}`,description:u("blocklet.publish.deleteStoreTip",{name:z.name}),confirm:u("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}F1.propTypes={store:h.object,blocklet:h.object,onChangeStore:h.func.isRequired,onClick:h.func.isRequired,loading:h.bool.isRequired,disabled:h.bool.isRequired,componentDid:h.string.isRequired,projectType:h.string.isRequired,getData:h.func.isRequired};F1.defaultProps={store:null,blocklet:null};const p0=w.lazy(()=>S0(()=>import("./index-FRZkFqzO.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58])).then(e=>({default:e.Uploader})));function J0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:a,paramsErrTip:i,setParamsErrTip:u,setLoading:c,initUrl:f,initLogoUrl:m,setInitLogoUrl:v,componentDid:C}){const{t:p}=te(),{api:d}=we(),x=b1(),R=w.useRef(null),y=w.useRef(null),[z,S]=Jl(s),M=q2({messageType:"connect-store-message",onOpen:()=>c(!0),onClose:()=>c(!1)}),k=async D=>{const B=setTimeout(()=>{c(!1)},2e4),A=await Yl(d,D);c(!1),clearTimeout(B),window.parent.postMessage({event:"studioDialog.connected",componentDid:C},"*"),x(window.location.pathname.replace(`${J.UNOWNED_DID}/create`,`${A}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){U.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(z!=null&&z.url)){U.error(p("blocklet.publish.noStoreSelected"));return}const D=Ql();M(async(B,A)=>{var O,W,X;try{const Q=await d.connectByStudio({input:{did:(O=s==null?void 0:s.meta)==null?void 0:O.did,blockletTitle:r==null?void 0:r.blockletTitle,storeUrl:z.url,storeId:z.id,storeName:z.name,type:((W=r==null?void 0:r.blockletComponents)==null?void 0:W.length)>0?"pack":"resource",componentDid:C,messageId:D,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(Q!=null&&Q.url)){U.error("failed to connect to store");return}A(Q.url),k({did:(X=s==null?void 0:s.meta)==null?void 0:X.did,projectId:"",messageId:D})}catch(Q){const re=Te(Q);U.error(re),c(!1)}})},I=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,$=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,T=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(D=>`${$}/${D}`),L=()=>t?!1:!e||e===J.UNOWNED_DID?(U.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0,N=D=>{if(!D.destination)return;const B=Array.from(r.blockletScreenshots),[A]=B.splice(D.source.index,1);B.splice(D.destination.index,0,A),a(O=>({...O,blockletScreenshots:B}))};return o.jsxs(en,{children:[o.jsx(g,{display:"flex",className:"section",children:o.jsxs(g,{sx:{flex:1},children:[o.jsx(Le,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:r.blockletTitle||"",onChange:D=>{u({blockletTitle:""}),a({blockletTitle:D.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Le,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===J.UNOWNED_DID&&o.jsx(k1,{position:"end",children:o.jsx(F1,{blocklet:s,store:z,componentDid:C,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===J.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Le,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:r.blockletDescription||"",onChange:D=>{u({blockletDescription:""}),a({blockletDescription:D.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(g,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(g,{sx:{flex:1},children:[o.jsxs(g,{display:"flex",flexDirection:"row",flexWrap:"wrap",children:[o.jsxs(Ee,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[o.jsx(K,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.logo")}),o.jsxs(Ee,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[o.jsx(g,{children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:"256x256"})]})}),o.jsx(g,{children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:"<500Kb"})]})})]})]}),o.jsx(g,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(P0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:m||V,onClick:()=>{var D;L()&&((D=R.current)==null||D.open())}})})]}),o.jsxs(g,{display:"flex",mt:3,flexDirection:"row",flexWrap:"wrap",children:[o.jsxs(Ee,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[o.jsx(K,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.screenshot")}),o.jsxs(Ee,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[o.jsx(g,{sx:{border:"none"},variant:"outlined",size:"small",children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:"16 / 9"})]})}),o.jsx(g,{children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:"1~5"})]})}),o.jsx(g,{children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:"<5MB"})]})}),o.jsx(g,{children:o.jsxs(g,{component:"span",children:[o.jsxs(g,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),o.jsx(g,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]})})]})]}),o.jsx(P2,{onDragEnd:t?void 0:N,children:o.jsx(L2,{droppableId:"screenshots",direction:"horizontal",isDropDisabled:t,children:(D,B)=>o.jsxs(g,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:B.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:B.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:D.innerRef,...D.droppableProps,children:[T.map((A,O)=>o.jsx(T2,{draggableId:A,index:O,isDragDisabled:t,children:(W,X)=>o.jsxs(g,{ref:W.innerRef,...W.draggableProps,...W.dragHandleProps,className:"screenshot",sx:{transform:X.isDragging?"scale(1.05)":"none",boxShadow:X.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[o.jsx("img",{alt:"screenshot",src:A}),!t&&o.jsx(ge,{className:"action",onClick:()=>{a(Q=>{const re=[...Q.blockletScreenshots];return re.splice(O,1),{...Q,blockletScreenshots:re}})},children:o.jsx(F2,{})})]})},A)),D.placeholder,T.length<5&&o.jsx(g,{sx:{width:240,height:135,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{var A;L()&&((A=y.current)==null||A.open())},children:"+"})]})})})]})]})}),o.jsxs(w.Suspense,{fallback:o.jsx(Ge,{}),children:[o.jsx(p0,{ref:R,popup:!0,onUploadFinish:D=>{var B;a({blockletLogo:D.data.filename}),v(""),(B=R.current)==null||B.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),o.jsx(p0,{ref:y,popup:!0,onUploadFinish:D=>{var B;a(A=>{var W;const O=A.blockletScreenshots||[];return O.push((W=D.data)==null?void 0:W.filename),{...A,blockletScreenshots:O}}),(B=y.current)==null||B.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:$,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-T.length}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})]})}J0.propTypes={projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired,blocklet:h.object.isRequired,setLoading:h.func.isRequired,initUrl:h.object.isRequired,componentDid:h.isRequired,initLogoUrl:h.string.isRequired,setInitLogoUrl:h.func.isRequired};const en=ce.div`
|
|
137
137
|
margin-top: 24px;
|
|
138
138
|
.screenshot {
|
|
139
139
|
margin-bottom: 16px;
|
|
@@ -178,7 +178,7 @@ import{av as d2,j as o,aI as se,cR as g0,aM as H,fJ as Q1,aL as je,aG as $e,aH a
|
|
|
178
178
|
padding-bottom: 12px;
|
|
179
179
|
border-bottom: ${({theme:e})=>`1px solid ${e.palette.divider}`};
|
|
180
180
|
}
|
|
181
|
-
`;function o2({text:e}){return e?o.jsx(Q2,{wrapperElement:{"data-color-mode":"light"},source:Y2.sanitize(e),rehypePlugins:[[Z2,{target:"_blank"}]]}):o.jsx(ze,{Icon:Ke})}o2.propTypes={text:h.string.isRequired};function l2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:a}){var m;const{t:i}=te(),[u,c]=w.useState(a?"preview":"write"),f=(v,C)=>{c(C)};return o.jsxs(g,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(g,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(K,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(V2,{value:u,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(t0,{value:"write",label:"Write"}),o.jsx(t0,{value:"preview",label:"Preview"})]})]}),o.jsx(g,{display:u==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Le,{disabled:s||a,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:a,endAdornment:o.jsxs(k1,{position:"end",children:[((m=e==null?void 0:e.blockletIntroduction)==null?void 0:m.length)||0," / ",ye.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:v=>{r({blockletIntroduction:""}),t({blockletIntroduction:v.target.value.slice(0,ye.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(g,{display:u==="preview"?"block":"none",mt:3,children:o.jsx(o2,{text:e.blockletIntroduction||""})})]})}l2.propTypes={params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,readOnly:h.bool.isRequired,loading:h.bool.isRequired};var W1={},un=ke;Object.defineProperty(W1,"__esModule",{value:!0});var n2=W1.default=void 0,pn=un(Se()),f0=o;n2=W1.default=(0,pn.default)([(0,f0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,f0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function G1({step:e,ok:t,active:l,error:s}){let r="grey.500",a=e+1;return t&&(a=o.jsx(et,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",a=o.jsx(n2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(g,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:a})}G1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};G1.defaultProps={step:0,ok:!1,active:0,error:""};function s2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:a,paramsErrTip:i,viewMode:u,projectId:c}){const{t:f}=te(),m=()=>{l(d=>d+1)},v=()=>{l(d=>d-1)},C=d=>d===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription):d===2?i==null?void 0:i.blockletResource:d>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=u||Y0({hasSelectedResources:s,params:r,projectId:c,t:f})===null;return o.jsxs(g,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(ot,{activeStep:t,orientation:"vertical",children:e.map((d,x)=>{const R={},y=a||!cn({hasSelectedResources:s,params:r,projectId:c,step:x,t:f}),z=a?"":C(x);return z&&(R.optional=o.jsx(K,{variant:"caption",color:"error",children:z}),R.error=!0),o.jsxs(lt,{children:[o.jsx(Rt,{icon:o.jsx(G1,{error:z,active:p?99:t,step:x,ok:y}),sx:{cursor:"pointer",color:z?"error.main":"inherit"},disabled:!1,onClick:()=>l(x),...R,children:o.jsx(K,{fontSize:"14px",fontWeight:"500",color:z||!y&&t>x?"error.main":"inherit",children:d.label})}),o.jsxs(It,{children:[o.jsx(K,{fontSize:12,children:d.description}),!p&&o.jsx(g,{sx:{mb:2},children:o.jsxs("div",{children:[x<e.length-1&&o.jsx(ne,{variant:"contained",onClick:m,sx:{mt:1,mr:1},disabled:z||!y,children:f("common.continue")}),x>0&&o.jsx(ne,{disabled:x===0,onClick:v,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},d.label)})}),t>=e.length-1&&o.jsx(w1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(K,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}s2.propTypes={steps:h.array.isRequired,activeStep:h.number.isRequired,setActiveStep:h.func.isRequired,params:h.object.isRequired,viewMode:h.string.isRequired,loading:h.bool.isRequired,projectId:h.string.isRequired,hasSelectedResources:h.bool.isRequired,paramsErrTip:h.shape({projectId:h.string,blockletVersion:h.string,blockletTitle:h.string,blockletDescription:h.string,note:h.string,blockletResource:h.string}).isRequired};const hn=[".zip",".gz"],fn=1024*1024*100,xn=w.lazy(()=>S0(()=>import("./index-B0SXb9R9.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57])).then(e=>({default:e.Uploader})));function K1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:a,error:i}){const{t:u}=te(),c=w.useRef(null),f=()=>l?!1:!t||t===J.UNOWNED_DID?(U.error(u("blocklet.publish.errorTip.noFirstDid")),!1):!0,m=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(g,{sx:{mt:3},children:[o.jsx(K,{gutterBottom:!0,children:u("blocklet.publish.resourceUpload")}),o.jsxs(Ee,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(K,{component:"a",href:`${m}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var v;f()&&((v=c.current)==null||v.open())},children:s.uploadedResource?u("common.change"):u("common.upload")})]}),o.jsx(w.Suspense,{fallback:o.jsx(Ge,{}),children:o.jsx(xn,{ref:c,popup:!0,onUploadFinish:v=>{var C;r({uploadedResource:v.data.filename}),a({blockletResource:""}),(C=c.current)==null||C.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:m,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:hn,maxFileSize:fn,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(g,{color:"error.main",mt:1,fontSize:14,children:i})]})}K1.propTypes={app:h.object.isRequired,projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,error:h.string.isRequired,setParamsErrTip:h.func.isRequired};K1.defaultProps={};function s1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:a}){var u;const{t:i}=te();return o.jsx(g,{display:"flex",mt:3,className:"section",children:o.jsxs(g,{sx:{flex:1},children:[o.jsx(Le,{required:!0,disabled:a||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:c=>{r({blockletVersion:""}),l({blockletVersion:c.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Le,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:a||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(k1,{position:"end",children:[((u=t==null?void 0:t.note)==null?void 0:u.length)||0," / ",ye.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:c=>{r({note:""}),l({note:c.target.value.slice(0,ye.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}s1.propTypes={readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired};s1.defaultProps={};function r2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&r2(e[t]);return e}const mn=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(g,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(z1,{size:24,blocklet:t,ancestors:l}),o.jsx(g,{ml:"4px",className:"text",children:o.jsx(g,{children:t.meta.title})})]},s),value:s})},x0=(e,t)=>{const l=j1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","blockletResourceType","connectedStores","blockletComponents","lastReleaseId","uploadedResource","autoUpload","possibleSameStore","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},vn={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},m0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function X1({initUrl:e,...t}){var J1;const{projectId:l,mode:s,releaseId:r,componentDid:a=""}=i1(),{t:i}=te(),{blocklet:u}=De(),[c,f]=Me({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",blockletResourceType:"",resourceFromSelect:!0}),[m,v]=Me({}),[C,p]=w.useState(!1),[d,x]=Me(null),{api:R}=we(),y=We(_=>_.breakpoints.down("md")),[z,S]=w.useState({}),[M,k]=w.useState(!1),P=w.useRef({}),[I,$]=Me({}),[V,T]=w.useState(""),[L,N]=Me({}),D=e==null?void 0:e.searchParams.get("dependentComponentsMode"),B=D==="readonly",A=w.useMemo(()=>{const _={};return Object.keys(L).forEach(E=>{const Ce=L[E];Ce&&Ce.forEach(c2=>{_[c2]=!0})}),_},[L]),O=w.useCallback(_=>{B&&f({blockletComponents:[]}),N(_)},[B,N,f]),W=w.useCallback((..._)=>{$(..._),v({blockletResource:""})},[]),X=r==="none"?(c==null?void 0:c.lastReleaseId)||"":r,[Q,re]=w.useState(s==="new-release"?4:0);w.useEffect(()=>{l&&v({projectId:""})},[l,v]);const he=w.useMemo(()=>{var _;return(c==null?void 0:c.blockletResourceType)==="resource"?"resource":(_=c==null?void 0:c.blockletComponents)!=null&&_.some(E=>E.included)||Object.keys(A).length||c!=null&&c.uploadedResource?"pack":"resource"},[c==null?void 0:c.blockletComponents,c==null?void 0:c.uploadedResource,A,c==null?void 0:c.blockletResourceType]),de=[],oe=((u==null?void 0:u.children)||[]).filter(_=>{var E;return(E=_.meta.resource)==null?void 0:E.exportApi}).filter(_=>!a||_.meta.did===a);oe.forEach(_=>{mn({tabs:de,blocklet:_,t:i,ancestors:[u]})});const[ee,ae]=w.useState((J1=de[0])==null?void 0:J1.value),fe=!M&&(d==null?void 0:d.status)==="published",Y=fe,xe=y2(()=>{if(!e)return;T(e.searchParams.get("logo")),f(E=>{var Ce;return{...E,blockletTitle:(E==null?void 0:E.blockletTitle)||e.searchParams.get("title"),blockletDescription:(E==null?void 0:E.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(E==null?void 0:E.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(Ce=E==null?void 0:E.blockletComponents)!=null&&Ce.length?E==null?void 0:E.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(E==null?void 0:E.note)||e.searchParams.get("note")||"No note"}});const _=e.searchParams.get("resources");try{const E=JSON.parse(_);S(E)}catch{}}),G=async()=>{if(X)try{const _=await R.getRelease({input:{did:u.meta.did,projectId:l,releaseId:X}});if(p(!1),!_.release){U.error("Release not found");return}_.release=r2(_.release),s!=="view"&&(_.release.note=""),f(E=>x0({...E,..._.release,blockletVersion:s==="create"||s==="new-release"?Pe.inc(_.release.blockletVersion,"patch"):_.release.blockletVersion},u)),x(_.release)}catch(_){p(!1),U.error(Te(_))}},le=async()=>{if(l===J.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){U.error(i("blocklet.publish.errorTip.noDid"));return}try{const E=(await R.getProject({input:{did:u.meta.did,projectId:l}})).project||{};E.blockletVersion?(s==="create"||s==="new-release")&&Pe.valid(E.blockletVersion)&&(E.blockletVersion=Pe.inc(E.blockletVersion,"patch")):E.blockletVersion="1.0.0";const Ce=x0(E,u);f(Ce),E.lastReleaseId||xe()}catch(_){U.error(Te(_))}},F=w.useCallback(async()=>{p(!0);try{if(s==="view"){if(!X){U.error("Empty release id");return}await le(),await G();return}await le(),X&&(k(!0),await G())}finally{p(!1)}},[s,X]),Xe=_=>{f({blockletComponents:_})},Je=_=>{f({blockletResourceType:_})};w.useEffect(()=>{F()},[F]),w.useEffect(()=>{l===J.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const Ve=w.useMemo(()=>!!Object.keys(I).find(_=>!!I[_].length),[I]);if(!c&&C)return o.jsx(Ge,{});if(!c)return null;const _e=oe.find(_=>_.meta.did===ee);if(oe.every(_=>_.status!=="running")&&(oe!=null&&oe.length))return o.jsx(ze,{children:i("blocklet.publish.allComponentsNotRunning")});const q=_=>{ae(_)},Z=e==null?void 0:e.searchParams.get("resourcesTitle"),Be=e==null?void 0:e.searchParams.get("componentsTitle"),Ie=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:Z||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Be||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],a2=Ie[Q]||Ie[Ie.length-1],Re=vn[Q];return o.jsxs(gn,{...t,children:[o.jsx(t2,{blocklet:u,release:d,getData:F,getRelease:G,mode:s,params:c,setParams:f,setParamsErrTip:v,readOnly:Y,isPublished:fe,loading:C,setLoading:p,initLogoUrl:V,releaseId:X,projectId:l,projectType:he,resourceComponents:oe,resourceComponentsMap:L,resourceRelateComponents:A,resourceItem:_e,saveSelectedEventsRef:P,hasSelectedResources:Ve,releaseUsedLast:M,setReleaseUsedLast:k,setRelease:x}),o.jsxs(g,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(g,{pt:3}),o.jsxs(g,{sx:{gap:3},display:"flex",flexDirection:y?"column":"row",children:[!y&&o.jsx(s2,{steps:Ie,loading:C,viewMode:s==="view",params:c,hasSelectedResources:Ve||c.uploadedResource,paramsErrTip:m,activeStep:Q,setActiveStep:re,projectId:l,resourcesUrlTitle:Z,componentsUrlTitle:Be}),o.jsxs(g,{flex:"1",maxWidth:"720px",children:[!y&&Re!=="introduction"&&o.jsxs(K,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[a2.label,Re==="branding"&&o.jsx(ve,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(g,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(N2,{})})})]}),(y||Re==="branding")&&o.jsx(g,{flexDirection:"column",children:o.jsx(J0,{projectId:l,setParams:f,setParamsErrTip:v,params:c,componentDid:a,blocklet:u,initUrl:e,loading:C,setLoading:p,paramsErrTip:m,readOnly:Y,initLogoUrl:V,setInitLogoUrl:T})}),y&&o.jsx(g,{flexDirection:"column",children:o.jsx(s1,{loading:C,params:c,paramsErrTip:m,setParams:f,setParamsErrTip:v,readOnly:Y})}),(y||Re==="introduction")&&o.jsx(g,{display:"flex",flexDirection:"column",sx:{mt:y?5:0,width:"100%"},children:o.jsx(l2,{loading:C,readOnly:Y,params:c,setParams:f,paramsErrTip:m,setParamsErrTip:v})}),y&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Ie[m0.resources].label}),o.jsx(g,{display:y||Re==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(g,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(g,{sx:{flex:1},children:[o.jsxs(nt,{onChange:()=>f({resourceFromSelect:!c.resourceFromSelect}),children:[o.jsx(f1,{value:"select",disabled:Y,control:o.jsx(l0,{size:"small",checked:c.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(f1,{value:"select",disabled:Y,control:o.jsx(l0,{size:"small",checked:!c.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),c.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!a&&o.jsx(_2,{tabs:de,current:ee,onChange:q,sx:{ml:-2,mt:2,maxWidth:y?window.innerWidth-24:"100%"}}),o.jsx($1,{loading:C,initialResources:z,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:W,setResourceComponentsMap:O,error:m.blockletResource,app:u,readOnly:Y,component:_e,componentDid:a,initUrl:e,params:c,setParams:f,projectId:l===J.UNOWNED_DID?"":l,releaseUsedLast:M,release:{...d,id:X}})]}),!c.resourceFromSelect&&o.jsx(K1,{app:u,readOnly:Y,projectId:l===J.UNOWNED_DID?"":l,params:c,error:m.blockletResource,setParams:f,setParamsErrTip:v})]})})}),y&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Ie[m0.blocklets].label}),(y||Re==="blocklets")&&o.jsx(g,{flexDirection:"column",children:o.jsx(g,{display:"flex",mt:3,className:"section full-width",children:o.jsx(g,{sx:{flex:1},children:o.jsx(V1,{projectType:he,disabled:C||Y,app:u,value:(c==null?void 0:c.blockletComponents)||[],blockletResourceType:(c==null?void 0:c.blockletResourceType)||"",onChange:Xe,onChangeBlockletResourceType:Je,resourceRelateComponents:A,dependentComponentsMode:D})})})}),!y&&Re==="version"&&o.jsx(g,{flexDirection:"column",children:o.jsx(s1,{loading:C,params:c,paramsErrTip:m,setParams:f,setParamsErrTip:v,readOnly:Y})})]})]})]})]})}X1.propTypes={initUrl:h.object};X1.defaultProps={initUrl:null};const gn=ce.div`
|
|
181
|
+
`;function o2({text:e}){return e?o.jsx(Q2,{wrapperElement:{"data-color-mode":"light"},source:Y2.sanitize(e),rehypePlugins:[[Z2,{target:"_blank"}]]}):o.jsx(ze,{Icon:Ke})}o2.propTypes={text:h.string.isRequired};function l2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:a}){var m;const{t:i}=te(),[u,c]=w.useState(a?"preview":"write"),f=(v,C)=>{c(C)};return o.jsxs(g,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(g,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(K,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(V2,{value:u,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(t0,{value:"write",label:"Write"}),o.jsx(t0,{value:"preview",label:"Preview"})]})]}),o.jsx(g,{display:u==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Le,{disabled:s||a,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:a,endAdornment:o.jsxs(k1,{position:"end",children:[((m=e==null?void 0:e.blockletIntroduction)==null?void 0:m.length)||0," / ",ye.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:v=>{r({blockletIntroduction:""}),t({blockletIntroduction:v.target.value.slice(0,ye.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(g,{display:u==="preview"?"block":"none",mt:3,children:o.jsx(o2,{text:e.blockletIntroduction||""})})]})}l2.propTypes={params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,readOnly:h.bool.isRequired,loading:h.bool.isRequired};var W1={},un=ke;Object.defineProperty(W1,"__esModule",{value:!0});var n2=W1.default=void 0,pn=un(Se()),f0=o;n2=W1.default=(0,pn.default)([(0,f0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,f0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function G1({step:e,ok:t,active:l,error:s}){let r="grey.500",a=e+1;return t&&(a=o.jsx(et,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",a=o.jsx(n2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(g,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:a})}G1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};G1.defaultProps={step:0,ok:!1,active:0,error:""};function s2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:a,paramsErrTip:i,viewMode:u,projectId:c}){const{t:f}=te(),m=()=>{l(d=>d+1)},v=()=>{l(d=>d-1)},C=d=>d===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription):d===2?i==null?void 0:i.blockletResource:d>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=u||Y0({hasSelectedResources:s,params:r,projectId:c,t:f})===null;return o.jsxs(g,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(ot,{activeStep:t,orientation:"vertical",children:e.map((d,x)=>{const R={},y=a||!cn({hasSelectedResources:s,params:r,projectId:c,step:x,t:f}),z=a?"":C(x);return z&&(R.optional=o.jsx(K,{variant:"caption",color:"error",children:z}),R.error=!0),o.jsxs(lt,{children:[o.jsx(Rt,{icon:o.jsx(G1,{error:z,active:p?99:t,step:x,ok:y}),sx:{cursor:"pointer",color:z?"error.main":"inherit"},disabled:!1,onClick:()=>l(x),...R,children:o.jsx(K,{fontSize:"14px",fontWeight:"500",color:z||!y&&t>x?"error.main":"inherit",children:d.label})}),o.jsxs(It,{children:[o.jsx(K,{fontSize:12,children:d.description}),!p&&o.jsx(g,{sx:{mb:2},children:o.jsxs("div",{children:[x<e.length-1&&o.jsx(ne,{variant:"contained",onClick:m,sx:{mt:1,mr:1},disabled:z||!y,children:f("common.continue")}),x>0&&o.jsx(ne,{disabled:x===0,onClick:v,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},d.label)})}),t>=e.length-1&&o.jsx(w1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(K,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}s2.propTypes={steps:h.array.isRequired,activeStep:h.number.isRequired,setActiveStep:h.func.isRequired,params:h.object.isRequired,viewMode:h.string.isRequired,loading:h.bool.isRequired,projectId:h.string.isRequired,hasSelectedResources:h.bool.isRequired,paramsErrTip:h.shape({projectId:h.string,blockletVersion:h.string,blockletTitle:h.string,blockletDescription:h.string,note:h.string,blockletResource:h.string}).isRequired};const hn=[".zip",".gz"],fn=1024*1024*100,xn=w.lazy(()=>S0(()=>import("./index-FRZkFqzO.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58])).then(e=>({default:e.Uploader})));function K1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:a,error:i}){const{t:u}=te(),c=w.useRef(null),f=()=>l?!1:!t||t===J.UNOWNED_DID?(U.error(u("blocklet.publish.errorTip.noFirstDid")),!1):!0,m=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(g,{sx:{mt:3},children:[o.jsx(K,{gutterBottom:!0,children:u("blocklet.publish.resourceUpload")}),o.jsxs(Ee,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(K,{component:"a",href:`${m}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var v;f()&&((v=c.current)==null||v.open())},children:s.uploadedResource?u("common.change"):u("common.upload")})]}),o.jsx(w.Suspense,{fallback:o.jsx(Ge,{}),children:o.jsx(xn,{ref:c,popup:!0,onUploadFinish:v=>{var C;r({uploadedResource:v.data.filename}),a({blockletResource:""}),(C=c.current)==null||C.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:m,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:hn,maxFileSize:fn,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(g,{color:"error.main",mt:1,fontSize:14,children:i})]})}K1.propTypes={app:h.object.isRequired,projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,error:h.string.isRequired,setParamsErrTip:h.func.isRequired};K1.defaultProps={};function s1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:a}){var u;const{t:i}=te();return o.jsx(g,{display:"flex",mt:3,className:"section",children:o.jsxs(g,{sx:{flex:1},children:[o.jsx(Le,{required:!0,disabled:a||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:c=>{r({blockletVersion:""}),l({blockletVersion:c.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Le,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:a||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(k1,{position:"end",children:[((u=t==null?void 0:t.note)==null?void 0:u.length)||0," / ",ye.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:c=>{r({note:""}),l({note:c.target.value.slice(0,ye.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}s1.propTypes={readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired};s1.defaultProps={};function r2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&r2(e[t]);return e}const mn=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(g,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(z1,{size:24,blocklet:t,ancestors:l}),o.jsx(g,{ml:"4px",className:"text",children:o.jsx(g,{children:t.meta.title})})]},s),value:s})},x0=(e,t)=>{const l=j1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","blockletResourceType","connectedStores","blockletComponents","lastReleaseId","uploadedResource","autoUpload","possibleSameStore","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},vn={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},m0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function X1({initUrl:e,...t}){var J1;const{projectId:l,mode:s,releaseId:r,componentDid:a=""}=i1(),{t:i}=te(),{blocklet:u}=De(),[c,f]=Me({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",blockletResourceType:"",resourceFromSelect:!0}),[m,v]=Me({}),[C,p]=w.useState(!1),[d,x]=Me(null),{api:R}=we(),y=We(_=>_.breakpoints.down("md")),[z,S]=w.useState({}),[M,k]=w.useState(!1),P=w.useRef({}),[I,$]=Me({}),[V,T]=w.useState(""),[L,N]=Me({}),D=e==null?void 0:e.searchParams.get("dependentComponentsMode"),B=D==="readonly",A=w.useMemo(()=>{const _={};return Object.keys(L).forEach(E=>{const Ce=L[E];Ce&&Ce.forEach(c2=>{_[c2]=!0})}),_},[L]),O=w.useCallback(_=>{B&&f({blockletComponents:[]}),N(_)},[B,N,f]),W=w.useCallback((..._)=>{$(..._),v({blockletResource:""})},[]),X=r==="none"?(c==null?void 0:c.lastReleaseId)||"":r,[Q,re]=w.useState(s==="new-release"?4:0);w.useEffect(()=>{l&&v({projectId:""})},[l,v]);const he=w.useMemo(()=>{var _;return(c==null?void 0:c.blockletResourceType)==="resource"?"resource":(_=c==null?void 0:c.blockletComponents)!=null&&_.some(E=>E.included)||Object.keys(A).length||c!=null&&c.uploadedResource?"pack":"resource"},[c==null?void 0:c.blockletComponents,c==null?void 0:c.uploadedResource,A,c==null?void 0:c.blockletResourceType]),de=[],oe=((u==null?void 0:u.children)||[]).filter(_=>{var E;return(E=_.meta.resource)==null?void 0:E.exportApi}).filter(_=>!a||_.meta.did===a);oe.forEach(_=>{mn({tabs:de,blocklet:_,t:i,ancestors:[u]})});const[ee,ae]=w.useState((J1=de[0])==null?void 0:J1.value),fe=!M&&(d==null?void 0:d.status)==="published",Y=fe,xe=y2(()=>{if(!e)return;T(e.searchParams.get("logo")),f(E=>{var Ce;return{...E,blockletTitle:(E==null?void 0:E.blockletTitle)||e.searchParams.get("title"),blockletDescription:(E==null?void 0:E.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(E==null?void 0:E.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(Ce=E==null?void 0:E.blockletComponents)!=null&&Ce.length?E==null?void 0:E.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(E==null?void 0:E.note)||e.searchParams.get("note")||"No note"}});const _=e.searchParams.get("resources");try{const E=JSON.parse(_);S(E)}catch{}}),G=async()=>{if(X)try{const _=await R.getRelease({input:{did:u.meta.did,projectId:l,releaseId:X}});if(p(!1),!_.release){U.error("Release not found");return}_.release=r2(_.release),s!=="view"&&(_.release.note=""),f(E=>x0({...E,..._.release,blockletVersion:s==="create"||s==="new-release"?Pe.inc(_.release.blockletVersion,"patch"):_.release.blockletVersion},u)),x(_.release)}catch(_){p(!1),U.error(Te(_))}},le=async()=>{if(l===J.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){U.error(i("blocklet.publish.errorTip.noDid"));return}try{const E=(await R.getProject({input:{did:u.meta.did,projectId:l}})).project||{};E.blockletVersion?(s==="create"||s==="new-release")&&Pe.valid(E.blockletVersion)&&(E.blockletVersion=Pe.inc(E.blockletVersion,"patch")):E.blockletVersion="1.0.0";const Ce=x0(E,u);f(Ce),E.lastReleaseId||xe()}catch(_){U.error(Te(_))}},F=w.useCallback(async()=>{p(!0);try{if(s==="view"){if(!X){U.error("Empty release id");return}await le(),await G();return}await le(),X&&(k(!0),await G())}finally{p(!1)}},[s,X]),Xe=_=>{f({blockletComponents:_})},Je=_=>{f({blockletResourceType:_})};w.useEffect(()=>{F()},[F]),w.useEffect(()=>{l===J.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const Ve=w.useMemo(()=>!!Object.keys(I).find(_=>!!I[_].length),[I]);if(!c&&C)return o.jsx(Ge,{});if(!c)return null;const _e=oe.find(_=>_.meta.did===ee);if(oe.every(_=>_.status!=="running")&&(oe!=null&&oe.length))return o.jsx(ze,{children:i("blocklet.publish.allComponentsNotRunning")});const q=_=>{ae(_)},Z=e==null?void 0:e.searchParams.get("resourcesTitle"),Be=e==null?void 0:e.searchParams.get("componentsTitle"),Ie=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:Z||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Be||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],a2=Ie[Q]||Ie[Ie.length-1],Re=vn[Q];return o.jsxs(gn,{...t,children:[o.jsx(t2,{blocklet:u,release:d,getData:F,getRelease:G,mode:s,params:c,setParams:f,setParamsErrTip:v,readOnly:Y,isPublished:fe,loading:C,setLoading:p,initLogoUrl:V,releaseId:X,projectId:l,projectType:he,resourceComponents:oe,resourceComponentsMap:L,resourceRelateComponents:A,resourceItem:_e,saveSelectedEventsRef:P,hasSelectedResources:Ve,releaseUsedLast:M,setReleaseUsedLast:k,setRelease:x}),o.jsxs(g,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(g,{pt:3}),o.jsxs(g,{sx:{gap:3},display:"flex",flexDirection:y?"column":"row",children:[!y&&o.jsx(s2,{steps:Ie,loading:C,viewMode:s==="view",params:c,hasSelectedResources:Ve||c.uploadedResource,paramsErrTip:m,activeStep:Q,setActiveStep:re,projectId:l,resourcesUrlTitle:Z,componentsUrlTitle:Be}),o.jsxs(g,{flex:"1",maxWidth:"720px",children:[!y&&Re!=="introduction"&&o.jsxs(K,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[a2.label,Re==="branding"&&o.jsx(ve,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(g,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(N2,{})})})]}),(y||Re==="branding")&&o.jsx(g,{flexDirection:"column",children:o.jsx(J0,{projectId:l,setParams:f,setParamsErrTip:v,params:c,componentDid:a,blocklet:u,initUrl:e,loading:C,setLoading:p,paramsErrTip:m,readOnly:Y,initLogoUrl:V,setInitLogoUrl:T})}),y&&o.jsx(g,{flexDirection:"column",children:o.jsx(s1,{loading:C,params:c,paramsErrTip:m,setParams:f,setParamsErrTip:v,readOnly:Y})}),(y||Re==="introduction")&&o.jsx(g,{display:"flex",flexDirection:"column",sx:{mt:y?5:0,width:"100%"},children:o.jsx(l2,{loading:C,readOnly:Y,params:c,setParams:f,paramsErrTip:m,setParamsErrTip:v})}),y&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Ie[m0.resources].label}),o.jsx(g,{display:y||Re==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(g,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(g,{sx:{flex:1},children:[o.jsxs(nt,{onChange:()=>f({resourceFromSelect:!c.resourceFromSelect}),children:[o.jsx(f1,{value:"select",disabled:Y,control:o.jsx(l0,{size:"small",checked:c.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(f1,{value:"select",disabled:Y,control:o.jsx(l0,{size:"small",checked:!c.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),c.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!a&&o.jsx(_2,{tabs:de,current:ee,onChange:q,sx:{ml:-2,mt:2,maxWidth:y?window.innerWidth-24:"100%"}}),o.jsx($1,{loading:C,initialResources:z,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:W,setResourceComponentsMap:O,error:m.blockletResource,app:u,readOnly:Y,component:_e,componentDid:a,initUrl:e,params:c,setParams:f,projectId:l===J.UNOWNED_DID?"":l,releaseUsedLast:M,release:{...d,id:X}})]}),!c.resourceFromSelect&&o.jsx(K1,{app:u,readOnly:Y,projectId:l===J.UNOWNED_DID?"":l,params:c,error:m.blockletResource,setParams:f,setParamsErrTip:v})]})})}),y&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Ie[m0.blocklets].label}),(y||Re==="blocklets")&&o.jsx(g,{flexDirection:"column",children:o.jsx(g,{display:"flex",mt:3,className:"section full-width",children:o.jsx(g,{sx:{flex:1},children:o.jsx(V1,{projectType:he,disabled:C||Y,app:u,value:(c==null?void 0:c.blockletComponents)||[],blockletResourceType:(c==null?void 0:c.blockletResourceType)||"",onChange:Xe,onChangeBlockletResourceType:Je,resourceRelateComponents:A,dependentComponentsMode:D})})})}),!y&&Re==="version"&&o.jsx(g,{flexDirection:"column",children:o.jsx(s1,{loading:C,params:c,paramsErrTip:m,setParams:f,setParamsErrTip:v,readOnly:Y})})]})]})]})]})}X1.propTypes={initUrl:h.object};X1.defaultProps={initUrl:null};const gn=ce.div`
|
|
182
182
|
.section {
|
|
183
183
|
&.full-width {
|
|
184
184
|
max-width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h,j as c,P as f,a3 as d}from"./index-
|
|
1
|
+
import{r as h,j as c,P as f,a3 as d}from"./index-B6JqnGav.js";var o={};Object.defineProperty(o,"__esModule",{value:!0});var p=o.default=void 0;m(h);var n=c;function m(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(v){return Object.getOwnPropertyDescriptor(e,v).enumerable})),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(a){y(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function y(e,t,r){return(t=j(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){var t=b(e,"string");return typeof t=="symbol"?t:t+""}function b(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i=function(t){return(0,n.jsxs)("svg",u(u({},t),{},{children:[(0,n.jsx)("path",{d:"M24.604 2.263L28.524 0H42.79v41.862H28.79a1 1 0 0 1-.5-.134l-15.103-8.72V8.854l1.817-1.05 3.2 1.848-1.817 1.05V31.16l12.993 7.502H39.59V3.2H29.38l-1.576.91-3.2-1.847z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.402 31.16V10.701L13.409 3.2H3.2v35.462h10.21l1.58-.913 3.2 1.847-3.923 2.266H0V0h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047z"}),(0,n.jsx)("path",{d:"M138.44 27.684c.192 0 .357.075.496.224l1.344 1.472a9.584 9.584 0 0 1-3.44 2.576c-1.344.608-2.965.912-4.864.912-1.664 0-3.173-.288-4.528-.864a10.056 10.056 0 0 1-3.456-2.416c-.949-1.035-1.685-2.272-2.208-3.712-.523-1.44-.784-3.024-.784-4.752 0-1.728.272-3.312.816-4.752.555-1.44 1.328-2.677 2.32-3.712a10.444 10.444 0 0 1 3.552-2.416c1.387-.576 2.917-.864 4.592-.864 1.632 0 3.083.267 4.352.8a10.973 10.973 0 0 1 3.312 2.128l-1.12 1.584a.936.936 0 0 1-.288.288.742.742 0 0 1-.432.112c-.203 0-.443-.101-.72-.304a8.802 8.802 0 0 0-1.072-.672c-.437-.256-.981-.485-1.632-.688-.651-.203-1.461-.304-2.432-.304-1.141 0-2.187.203-3.136.608a6.885 6.885 0 0 0-2.464 1.728c-.683.747-1.216 1.67-1.6 2.768-.373 1.088-.56 2.32-.56 3.696 0 1.397.197 2.64.592 3.728.395 1.088.939 2.01 1.632 2.768a6.914 6.914 0 0 0 2.448 1.728 7.764 7.764 0 0 0 3.04.592c.661 0 1.253-.037 1.776-.112a7.843 7.843 0 0 0 1.456-.368c.448-.16.869-.363 1.264-.608a8.89 8.89 0 0 0 1.168-.912c.085-.075.176-.133.272-.176a.616.616 0 0 1 .304-.08zM149.68 16.1c1.195 0 2.272.197 3.232.592a6.54 6.54 0 0 1 2.464 1.68c.683.725 1.205 1.605 1.568 2.64.363 1.024.544 2.176.544 3.456 0 1.28-.181 2.437-.544 3.472-.363 1.035-.885 1.915-1.568 2.64a6.795 6.795 0 0 1-2.464 1.68c-.96.384-2.037.576-3.232.576-1.205 0-2.293-.192-3.264-.576a6.987 6.987 0 0 1-2.464-1.68c-.683-.725-1.211-1.605-1.584-2.64-.363-1.035-.544-2.192-.544-3.472 0-1.28.181-2.432.544-3.456.373-1.035.901-1.915 1.584-2.64a6.717 6.717 0 0 1 2.464-1.68c.971-.395 2.059-.592 3.264-.592zm0 14.304c1.536 0 2.683-.517 3.44-1.552.757-1.035 1.136-2.49 1.136-4.368 0-1.877-.379-3.333-1.136-4.368-.757-1.045-1.904-1.568-3.44-1.568-1.557 0-2.72.523-3.488 1.568-.757 1.035-1.136 2.49-1.136 4.368 0 1.877.379 3.333 1.136 4.368.768 1.035 1.931 1.552 3.488 1.552zM163.899 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.442 6.442 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448.682.299 1.253.72 1.712 1.264.458.533.805 1.179 1.04 1.936.234.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.534-.65-1.35-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.38 7.38 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM181.805 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.448 6.448 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448a4.63 4.63 0 0 1 1.712 1.264c.459.533.805 1.179 1.04 1.936.235.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.533-.65-1.349-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.396 7.396 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM207.551 22.676c0-.619-.09-1.19-.272-1.712a3.77 3.77 0 0 0-.768-1.36 3.521 3.521 0 0 0-1.248-.896c-.49-.213-1.056-.32-1.696-.32-1.312 0-2.346.379-3.104 1.136-.746.757-1.221 1.808-1.424 3.152h8.512zm2.576 7.616a6.311 6.311 0 0 1-1.328 1.168 7.926 7.926 0 0 1-1.6.784 9.664 9.664 0 0 1-1.76.448c-.597.096-1.189.144-1.776.144-1.12 0-2.16-.187-3.12-.56a7.159 7.159 0 0 1-2.48-1.664c-.693-.736-1.237-1.643-1.632-2.72-.384-1.088-.576-2.336-.576-3.744 0-1.13.176-2.181.528-3.152a7.67 7.67 0 0 1 1.504-2.56 7.064 7.064 0 0 1 2.416-1.712c.95-.416 2.016-.624 3.2-.624.992 0 1.904.165 2.736.496.843.32 1.568.79 2.176 1.408.608.619 1.083 1.381 1.424 2.288.352.907.528 1.941.528 3.104 0 .48-.053.805-.16.976-.106.16-.304.24-.592.24h-10.656c.032.97.171 1.819.416 2.544.246.715.582 1.312 1.008 1.792.438.48.955.837 1.552 1.072.598.235 1.264.352 2 .352.694 0 1.291-.08 1.792-.24.512-.16.95-.33 1.312-.512.374-.192.683-.368.928-.528.256-.16.48-.24.672-.24.256 0 .454.096.592.288l.896 1.152zM225.113 19.396a1.836 1.836 0 0 1-.288.288c-.086.064-.214.096-.384.096-.171 0-.352-.064-.544-.192a4.872 4.872 0 0 0-.704-.432 5.21 5.21 0 0 0-1.024-.432c-.395-.139-.886-.208-1.472-.208-.768 0-1.446.139-2.032.416a3.972 3.972 0 0 0-1.472 1.184c-.384.512-.678 1.136-.88 1.872-.203.736-.304 1.563-.304 2.48 0 .95.106 1.797.32 2.544.213.736.517 1.36.912 1.872.394.501.874.885 1.44 1.152a4.522 4.522 0 0 0 1.888.384c.672 0 1.226-.08 1.664-.24.437-.17.8-.352 1.088-.544.288-.192.528-.368.72-.528.192-.17.389-.256.592-.256.256 0 .453.096.592.288l.896 1.152a5.966 5.966 0 0 1-1.264 1.168c-.459.32-.95.581-1.472.784a8.34 8.34 0 0 1-1.648.448c-.566.096-1.142.144-1.728.144a7.25 7.25 0 0 1-2.848-.56 6.52 6.52 0 0 1-2.288-1.632c-.64-.715-1.147-1.59-1.52-2.624-.374-1.045-.56-2.23-.56-3.552 0-1.205.165-2.32.496-3.344.341-1.024.837-1.904 1.488-2.64a6.821 6.821 0 0 1 2.432-1.744c.96-.427 2.058-.64 3.296-.64 1.162 0 2.186.187 3.072.56a7.514 7.514 0 0 1 2.368 1.584l-.832 1.152zM234.121 32.868c-1.312 0-2.325-.368-3.04-1.104-.704-.736-1.056-1.787-1.056-3.152v-9.728h-1.888a.701.701 0 0 1-.464-.16c-.117-.117-.176-.288-.176-.512v-1.264l2.64-.368.704-4.848a.738.738 0 0 1 .24-.416.724.724 0 0 1 .48-.16h1.584v5.456h4.608v2.272h-4.608v9.52c0 .64.155 1.12.464 1.44.32.31.726.464 1.216.464.288 0 .534-.037.736-.112a3.27 3.27 0 0 0 .544-.24c.15-.096.278-.181.384-.256a.521.521 0 0 1 .288-.112c.107 0 .187.027.24.08a.694.694 0 0 1 .192.224l.928 1.504c-.512.47-1.12.832-1.824 1.088a6.362 6.362 0 0 1-2.192.384z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.815 33.284V9H70.66a6.259 6.259 0 0 1 5.823 6.243v11.783a6.258 6.258 0 0 1-6.258 6.258h-12.41zM84.56 9h-3.335v24.321h3.335V9zM61.15 29.95V12.32h9.075a2.923 2.923 0 0 1 2.923 2.923v11.783a2.923 2.923 0 0 1-2.923 2.923H61.15zM89.243 9v24.284h12.409a6.258 6.258 0 0 0 6.259-6.258V15.243A6.259 6.259 0 0 0 102.087 9H89.243zm22.912 5.636h3.728v3.728h-3.728v-3.729zm3.728 9.321h-3.728v3.729h3.728v-3.729zM92.578 12.32v17.63h9.074a2.924 2.924 0 0 0 2.924-2.924V15.243a2.924 2.924 0 0 0-2.924-2.923h-9.074z"})]}))};i.defaultProps={width:"239",height:"42",viewBox:"0 0 239 42",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};i.displayName="connect-logo";p=o.default=i;function s({children:e,...t}){return c.jsxs(d,{color:"did",variant:"contained",...t,children:[c.jsx("span",{style:{fontWeight:400},children:e||"Continue With"}),c.jsx(p,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}s.propTypes={children:f.any};s.defaultProps={children:""};export{s as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,bX as Q,dA as Z,j as o,bF as O,dB as z,P as n,dC as ee,dD as U,
|
|
1
|
+
import{r as $,bX as Q,dA as Z,j as o,bF as O,dB as z,P as n,dC as ee,dD as U,bu as b,bE as B,u as _,dE as q,B as y,aO as C,al as oe,I as D}from"./index-B6JqnGav.js";import{E as W}from"./fallback-Bog6C-ue.js";import{R as ne,N as te}from"./index-C1CKS8aB.js";import{i as re,u as ie,f as G,g as I,p as ae,m as K,a as se,b as le,H as ce,B as de}from"./index-OSlxm1AT.js";import{d as pe}from"./ExpandMore-Co-_XFGT.js";import{A as S}from"./Avatar-kkkoJE0g.js";function T({icon:e,size:t,sx:r,...a}){const i=[...Array.isArray(r)?r:[r]];t&&i.push({width:t,height:t});const[u,s]=$.useState(!1),[c,l]=$.useState(!0);if(Q(async()=>{l(!0);try{await Z(e),s(!0)}catch{s(!1)}l(!1)},[e]),a.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),re(e))return o.jsx(S,{component:"span",...a,src:e,sx:i});const d=t?.6*t+4:0;return c?o.jsx(O,{icon:"codicon:blank",height:d||void 0}):u?o.jsx(S,{component:"span",...a,sx:i,children:o.jsx(O,{icon:e,height:d||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...t&&{fontSize:t-2}}}),o.jsx(S,{component:"span",...a,sx:i,children:Array.from(e)[0]})):null}const ue=z();function A({theme:e,children:t}){const r=e?z(e):ue;return o.jsx(ee,{theme:r,children:t})}A.propTypes={children:n.any.isRequired,theme:n.object};A.defaultProps={theme:null};const fe=e=>{if(!(e!=null&&e.length))return{navItems:[],activeId:null};let t=1;const a=K(e,s=>{var d,p;const c=s.icon?o.jsx(T,{icon:s.icon}):null;if(s.items)return{id:`${t++}`,label:s.title,icon:c,children:s.items};let l={};return((d=s.link)!=null&&d.startsWith("http://")||(p=s.link)!=null&&p.startsWith("https://"))&&(l={target:"_blank",rel:"noreferrer"}),{id:`${t++}`,label:o.jsx("a",{href:s.link,...l,children:s.title}),icon:c,link:s.link}},"items"),i=se(a),u=le(i.map(s=>s.link));return{navItems:a,activeId:u>=0?i[u].id:null}};function he({meta:e={},addons:t,sessionManagerProps:r={showRole:!0},homeLink:a=ae,theme:i,hideNavMenu:u=!1,...s}){var h,N;ie();const{locale:c}=_()||{},l=$.useMemo(()=>{const w=Object.assign({},window.blocklet,e);try{return G(w)}catch(J){return console.error("Failed to format blocklet info",J,w),w}},[e]);if(!l.appName)return null;const{appLogo:d,appLogoRect:p,theme:m}=l,f=I((h=l==null?void 0:l.navigation)==null?void 0:h.header,c),k=fe(f),{navItems:g,activeId:v}=k,j=typeof t=="function"?w=>t(w,{navigation:k}):t,x=o.jsx(ce,{formattedBlocklet:l,addons:j,sessionManagerProps:r});return o.jsx(A,{theme:i,children:o.jsx(me,{homeLink:a,logo:o.jsx("img",{src:p||d,alt:"logo"}),addons:x,...q(s,["bordered"]),$bordered:s==null?void 0:s.bordered,$bgcolor:(N=m==null?void 0:m.background)==null?void 0:N.header,children:u||!(g!=null&&g.length)?null:({isMobile:w})=>o.jsx(te,{mode:w?"inline":"horizontal",activeId:v,items:g,className:"header-nav",bgColor:"transparent",textColor:"#777"})})})}const me=b(ne)`
|
|
2
2
|
${({$bgcolor:e})=>`background-color: ${e||"#fff"};`}
|
|
3
3
|
font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,
|
|
4
4
|
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as H,j as i,g7 as ti,l as pr,g8 as ri,eL as vn,c7 as bn,f2 as Tt,g9 as pt,f1 as Ce,ga as ni,gb as xn,gc as wn,gd as ii,ge as oi,gf as jn,gg as dr,gh as ai,gi as si,gj as ci,gk as li,eW as rr,b9 as ui,co as qr,eY as fi,aa as pi,aR as Re,u as ke,Q as En,B as se,aV as Et,A as Sn,D as di,T as Le,gl as mr,ah as Je,aw as Ze,a3 as Se,n as it,P as B,bC as mi,cs as nr,N as hi,f5 as gi,a0 as De,de as yi,a2 as mt,bn as Qe,t as $e,gm as vi,ac as Xe,dG as bi,a_ as Pn,G as Ee,a as dt,c as ir,b as xi,bF as wi,gn as On,bL as An,aX as ji,Z as Ei,$ as Si,bQ as Rn,m as Pi,aE as Oi,bH as Ai}from"./index-w1h5fjUA.js";import{c as Ri}from"./index-CDqA3u6q.js";import{d as St}from"./Add-X4z8DHkm.js";import{d as Ii}from"./Loop-DUXasQn9.js";import{d as _i}from"./ViewList-CJ-RbwzW.js";import{L as Ci,S as Ti,d as In}from"./list-header-NUhrDD1b.js";import{D as _n,g as Ni}from"./index-4NjjF0-i.js";import"./index-BMiSc2wz.js";import"./index-CumCTaTW.js";import{j as Cn}from"./resource-dialog-BVJhpy1Q.js";import{T as Di}from"./index-DEPDXC-J.js";import{E as Tn}from"./index-Cq51W2RR.js";import"./fallback-CSFjDMvp.js";import"./index-B4lxRZaJ.js";import{d as Ui,U as Li}from"./user-sessions-CzYDLfF7.js";import{u as qe,d as Kr,W as Nn,a as ki}from"./dashboard-ZMG6gVdw.js";import{W as Pt}from"./did-address-C2pjT4Vo.js";import{P as Fe}from"./permission-CMfgwGXI.js";import{C as Nt}from"./click-to-copy-D-NrDLcT.js";import{F as or}from"./FormControl-uyHqpehB.js";import{d as ar,S as sr}from"./Select-B1-paS03.js";import{T as Ot}from"./TextField-nYO4mCN5.js";import{D as hr}from"./DialogContentText-Bsce1Ptt.js";import{A as nt}from"./Alert-SdIu9Hlz.js";import{f as Me}from"./format-error-CDAFfj8A.js";import{_ as qi}from"./useAsync-gwjt9FVi.js";import{I as cr}from"./index-7nX7dUfG.js";import{d as Ki}from"./DeleteOutline-DU-DZ2Ol.js";import{C as ht}from"./confirm-DlXzE3-N.js";import{u as gr}from"./session-F_I9Jrbv.js";import{N as Bi}from"./index-D8QzYVOq.js";import{a as Fi}from"./uniqBy-DuMgcCm2.js";import{b as $i}from"./sdk-D-9ToVwd.js";import{A as Mi}from"./Avatar-DdQeYraH.js";import{d as zi,L as Wi,a as Vi}from"./Delete-DsXQXt5C.js";import{p as Hi}from"./index-CSD_wMks.js";import{A as Gi}from"./actions-BM-xEZx2.js";import{S as Yi}from"./shorten-label-WcbI2P0r.js";import{F as Zi}from"./FormControlLabel-l14pLV4s.js";import{C as Xi}from"./MoreVert-D_0KIWFk.js";import"./Search-XQNU_CT0.js";import"./useThemeProps-D9xeggEi.js";import"./toPropertyKey-PLuKRk1e.js";import"./emotion-cache.browser.esm-MtkgfpRW.js";import"./index-DVPois7s.js";import"./redux-CluOqhW1.js";import"./ViewColumn-83XwXiON.js";import"./useFormControl-DNefZzFa.js";import"./FormGroup-D3XfyeLR.js";import"./Grid-Cozd141M.js";import"./LastPage-CDX1Zcgq.js";import"./Toolbar-BRd5bS7b.js";import"./index-B1mg4OYA.js";import"./Menu-B-903KAP.js";import"./Hidden-CPvi6LIk.js";import"./ExpandMore-DsX-wPbd.js";import"./ListItemButton-DxmUeeh5.js";import"./selector-BpSDNqsZ.js";import"./index-DTgMnz8b.js";import"./OpenInNew-B33B2IQa.js";import"./index-v0JEVAIK.js";import"./Stack-Cf8RLPm4.js";import"./Link-BBclrajR.js";import"./Skeleton-BxBQ28EK.js";import"./HelpOutline-C6jbNZqQ.js";import"./index-DN-ud71W.js";import"./ButtonGroup-DwUDwu6o.js";import"./useLocalStorage-TwWpr1f9.js";import"./PlayArrow-evoOMfsp.js";import"./RadioGroup-dmNyerSz.js";import"./index-DkMn9TUE.js";import"./useSetState-BEl9w6Ey.js";import"./deprecate-BX2YtlbE.js";import"./useSlot-gmkdMHt7.js";import"./MoreHoriz-CKBqccB-.js";var yr={};Object.defineProperty(yr,"__esModule",{value:!0});var Dn=yr.default=void 0;Ji(H);var tt=i;function Ji(e){return e&&e.__esModule?e:{default:e}}function Br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Br(Object(r),!0).forEach(function(n){Qi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Br(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qi(e,t,r){return(t=eo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eo(e){var t=to(e,"string");return typeof t=="symbol"?t:t+""}function to(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vr=function(t){return(0,tt.jsxs)("svg",Fr(Fr({},t),{},{children:[(0,tt.jsx)("g",{clipPath:"url(#clip0)",children:(0,tt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,tt.jsx)("defs",{children:(0,tt.jsx)("clipPath",{id:"clip0",children:(0,tt.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};vr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};vr.displayName="person";Dn=yr.default=vr;var jt={},ro=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Un="%[a-f0-9]{2}",$r=new RegExp("("+Un+")|([^%]+?)","gi"),Mr=new RegExp("("+Un+")+","gi");function lr(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([],lr(r),lr(n))}function no(e){try{return decodeURIComponent(e)}catch{for(var t=e.match($r)||[],r=1;r<t.length;r++)e=lr(t,r).join(""),t=e.match($r)||[];return e}}function io(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Mr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=no(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Mr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),u=0;u<s.length;u++){var d=s[u];e=e.replace(new RegExp(d,"g"),t[d])}return e}var oo=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 io(e)}},ao=(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)]},so=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),u=0;u<n.length;u++){var d=n[u],S=e[d];(s?t.indexOf(d)!==-1:t(d,S,e))&&(r[d]=S)}return r};(function(e){const t=ro,r=oo,n=ao,s=so,u=a=>a==null;function d(a){switch(a.arrayFormat){case"index":return o=>(c,p)=>{const g=c.length;return p===void 0||a.skipNull&&p===null||a.skipEmptyString&&p===""?c:p===null?[...c,[w(o,a),"[",g,"]"].join("")]:[...c,[w(o,a),"[",w(g,a),"]=",w(p,a)].join("")]};case"bracket":return o=>(c,p)=>p===void 0||a.skipNull&&p===null||a.skipEmptyString&&p===""?c:p===null?[...c,[w(o,a),"[]"].join("")]:[...c,[w(o,a),"[]=",w(p,a)].join("")];case"comma":case"separator":return o=>(c,p)=>p==null||p.length===0?c:c.length===0?[[w(o,a),"=",w(p,a)].join("")]:[[c,w(p,a)].join(a.arrayFormatSeparator)];default:return o=>(c,p)=>p===void 0||a.skipNull&&p===null||a.skipEmptyString&&p===""?c:p===null?[...c,w(o,a)]:[...c,[w(o,a),"=",w(p,a)].join("")]}}function S(a){let o;switch(a.arrayFormat){case"index":return(c,p,g)=>{if(o=/\[(\d*)\]$/.exec(c),c=c.replace(/\[\d*\]$/,""),!o){g[c]=p;return}g[c]===void 0&&(g[c]={}),g[c][o[1]]=p};case"bracket":return(c,p,g)=>{if(o=/(\[\])$/.exec(c),c=c.replace(/\[\]$/,""),!o){g[c]=p;return}if(g[c]===void 0){g[c]=[p];return}g[c]=[].concat(g[c],p)};case"comma":case"separator":return(c,p,g)=>{const T=typeof p=="string"&&p.includes(a.arrayFormatSeparator),E=typeof p=="string"&&!T&&f(p,a).includes(a.arrayFormatSeparator);p=E?f(p,a):p;const N=T||E?p.split(a.arrayFormatSeparator).map(V=>f(V,a)):p===null?p:f(p,a);g[c]=N};default:return(c,p,g)=>{if(g[c]===void 0){g[c]=p;return}g[c]=[].concat(g[c],p)}}}function x(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function w(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function f(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,c)=>Number(o)-Number(c)).map(o=>a[o]):a}function b(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function O(a){let o="";const c=a.indexOf("#");return c!==-1&&(o=a.slice(c)),o}function P(a){a=b(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function q(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 j(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),x(o.arrayFormatSeparator);const c=S(o),p=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return p;for(const g of a.split("&")){if(g==="")continue;let[T,E]=n(o.decode?g.replace(/\+/g," "):g,"=");E=E===void 0?null:["comma","separator"].includes(o.arrayFormat)?E:f(E,o),c(f(T,o),E,p)}for(const g of Object.keys(p)){const T=p[g];if(typeof T=="object"&&T!==null)for(const E of Object.keys(T))T[E]=q(T[E],o);else p[g]=q(T,o)}return o.sort===!1?p:(o.sort===!0?Object.keys(p).sort():Object.keys(p).sort(o.sort)).reduce((g,T)=>{const E=p[T];return E&&typeof E=="object"&&!Array.isArray(E)?g[T]=D(E):g[T]=E,g},Object.create(null))}e.extract=P,e.parse=j,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),x(o.arrayFormatSeparator);const c=E=>o.skipNull&&u(a[E])||o.skipEmptyString&&a[E]==="",p=d(o),g={};for(const E of Object.keys(a))c(E)||(g[E]=a[E]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(E=>{const N=a[E];return N===void 0?"":N===null?w(E,o):Array.isArray(N)?N.reduce(p(E),[]).join("&"):w(E,o)+"="+w(N,o)}).filter(E=>E.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[c,p]=n(a,"#");return Object.assign({url:c.split("?")[0]||"",query:j(P(a),o)},o&&o.parseFragmentIdentifier&&p?{fragmentIdentifier:f(p,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const c=b(a.url).split("?")[0]||"",p=e.extract(a.url),g=e.parse(p,{sort:!1}),T=Object.assign(g,a.query);let E=e.stringify(T,o);E&&(E=`?${E}`);let N=O(a.url);return a.fragmentIdentifier&&(N=`#${w(a.fragmentIdentifier,o)}`),`${c}${E}${N}`},e.pick=(a,o,c)=>{c=Object.assign({parseFragmentIdentifier:!0},c);const{url:p,query:g,fragmentIdentifier:T}=e.parseUrl(a,c);return e.stringifyUrl({url:p,query:s(g,o),fragmentIdentifier:T},c)},e.exclude=(a,o,c)=>{const p=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,p,c)}})(jt);const lt=ri,co={parseNumbers:!1,parseBooleans:!1},lo={skipNull:!1,skipEmptyString:!1},uo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:u,stringifyOptions:d}={},S=Object.assign(Object.assign({},co),u),x=Object.assign(Object.assign({},lo),d),w=lt.useLocation(),f=(r=lt.useHistory)===null||r===void 0?void 0:r.call(lt),D=(n=lt.useNavigate)===null||n===void 0?void 0:n.call(lt),b=ti(),O=H.useRef(typeof e=="function"?e():e||{}),P=H.useMemo(()=>jt.parse(w.search,S),[w.search]),q=H.useMemo(()=>Object.assign(Object.assign({},O.current),P),[P]);return[q,pr(a=>{const o=typeof a=="function"?a(q):a;b(),f&&f[s]({hash:w.hash,search:jt.stringify(Object.assign(Object.assign({},P),o),x)||"?"},w.state),D&&D({hash:w.hash,search:jt.stringify(Object.assign(Object.assign({},P),o),x)||"?"},{replace:s==="replace",state:w.state})})]},fo=uo;var he={};Object.defineProperty(he,"__esModule",{value:!0});he.isValid=he.fromJSON=he.fromRandom=he.fromAddress=he.fromPublicKey=he.fromSecretKey=he.Wallet=he.WalletType=void 0;const gt=bn,At=Tt,Ae=vn;he.WalletType=Ae.DidType;function ot(e,t="default"){const r=(0,Ae.DidType)(t),n=(0,At.getSigner)(r.pk),s=(0,At.getHasher)(r.hash);return{type:r,secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,Ae.fromPublicKey)(e.pk,r):e.address,hash(u,d=1,S="hex"){return s(u,d,S)},sign(u,d=!0,S="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(d){const x=s(u,1);return n.sign(x,e.sk,S)}return n.sign(u,e.sk,S)},verify(u,d,S=!0){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const x=S?s(u,1):u;return n.verify(x,d,e.pk)},ethHash(u){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(u)},ethSign(u,d=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function")throw new Error("ethSign is not supported by signer");return d?n.ethSign(n.ethHash(u),(0,gt.toHex)(e.sk)):n.ethSign(u,(0,gt.toHex)(e.sk))},ethVerify(u,d,S=!0){if(typeof n.ethHash!="function")throw new Error("ethVerify is not supported by signer");const x=S?n.ethHash(u):u;return n.ethRecover(x,d)===this.address},toAddress(){return e.pk?(0,Ae.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:Ae.DidType.toJSON(r),sk:(0,gt.toHex)(e.sk),pk:(0,gt.toHex)(e.pk),address:this.address}}}}he.Wallet=ot;function po(e,t="default"){const r=(0,Ae.DidType)(t),n={sk:e,pk:(0,At.getSigner)(r.pk).getPublicKey(e)};return ot(n,r)}he.fromSecretKey=po;function mo(e,t="default"){return ot({pk:e},(0,Ae.DidType)(t))}he.fromPublicKey=mo;function ho(e){return ot({address:(0,Ae.toAddress)(e)},(0,Ae.toTypeInfo)(e))}he.fromAddress=ho;function go(e="default"){const t=(0,Ae.DidType)(e),n=(0,At.getSigner)(t.pk).genKeyPair();return ot({sk:n.secretKey,pk:n.publicKey},t)}he.fromRandom=go;function yo(e){const t=Ae.DidType.fromJSON(e.type);return ot(e,t)}he.fromJSON=yo;function vo(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&(!e.secretKey||typeof e.sign!="function"))}he.isValid=vo;var Kt={exports:{}},Bt={},zr;function Ln(){if(zr)return Bt;zr=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},e(o)}function t(o,c,p){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,c){if(!(o instanceof c))throw new TypeError("Cannot call a class as a function")}function n(o,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(c&&c.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),c&&s(o,c)}function s(o,c){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,c)}function u(o){var c=x();return function(){var g=w(o),T;if(c){var E=w(this).constructor;T=Reflect.construct(g,arguments,E)}else T=g.apply(this,arguments);return d(this,T)}}function d(o,c){if(c&&(e(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S(o)}function S(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function x(){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 w(o){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(p){return p.__proto__||Object.getPrototypeOf(p)},w(o)}var f={},D,b;function O(o,c,p){p||(p=Error);function g(E,N,V){return typeof c=="string"?c:c(E,N,V)}var T=function(E){n(V,E);var N=u(V);function V(ee,X,G){var J;return r(this,V),J=N.call(this,g(ee,X,G)),J.code=o,J}return t(V)}(p);f[o]=T}function P(o,c){if(Array.isArray(o)){var p=o.length;return o=o.map(function(g){return String(g)}),p>2?"one of ".concat(c," ").concat(o.slice(0,p-1).join(", "),", or ")+o[p-1]:p===2?"one of ".concat(c," ").concat(o[0]," or ").concat(o[1]):"of ".concat(c," ").concat(o[0])}else return"of ".concat(c," ").concat(String(o))}function q(o,c,p){return o.substr(0,c.length)===c}function j(o,c,p){return(p===void 0||p>o.length)&&(p=o.length),o.substring(p-c.length,p)===c}function a(o,c,p){return typeof p!="number"&&(p=0),p+c.length>o.length?!1:o.indexOf(c,p)!==-1}return O("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),O("ERR_INVALID_ARG_TYPE",function(o,c,p){D===void 0&&(D=ur()),D(typeof o=="string","'name' must be a string");var g;typeof c=="string"&&q(c,"not ")?(g="must not be",c=c.replace(/^not /,"")):g="must be";var T;if(j(o," argument"))T="The ".concat(o," ").concat(g," ").concat(P(c,"type"));else{var E=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(E," ").concat(g," ").concat(P(c,"type"))}return T+=". Received type ".concat(e(p)),T},TypeError),O("ERR_INVALID_ARG_VALUE",function(o,c){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";b===void 0&&(b=pt);var g=b.inspect(c);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(p,". Received ").concat(g)},TypeError),O("ERR_INVALID_RETURN_VALUE",function(o,c,p){var g;return p&&p.constructor&&p.constructor.name?g="instance of ".concat(p.constructor.name):g="type ".concat(e(p)),"Expected ".concat(o,' to be returned from the "').concat(c,'"')+" function but got ".concat(g,".")},TypeError),O("ERR_MISSING_ARGS",function(){for(var o=arguments.length,c=new Array(o),p=0;p<o;p++)c[p]=arguments[p];D===void 0&&(D=ur()),D(c.length>0,"At least one arg needs to be specified");var g="The ",T=c.length;switch(c=c.map(function(E){return'"'.concat(E,'"')}),T){case 1:g+="".concat(c[0]," argument");break;case 2:g+="".concat(c[0]," and ").concat(c[1]," arguments");break;default:g+=c.slice(0,T-1).join(", "),g+=", and ".concat(c[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),Bt.codes=f,Bt}var Ft,Wr;function bo(){if(Wr)return Ft;Wr=1;function e(A,R){var F=Object.keys(A);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(A);R&&(_=_.filter(function(W){return Object.getOwnPropertyDescriptor(A,W).enumerable})),F.push.apply(F,_)}return F}function t(A){for(var R=1;R<arguments.length;R++){var F=arguments[R]!=null?arguments[R]:{};R%2?e(Object(F),!0).forEach(function(_){r(A,_,F[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(F)):e(Object(F)).forEach(function(_){Object.defineProperty(A,_,Object.getOwnPropertyDescriptor(F,_))})}return A}function r(A,R,F){return R=d(R),R in A?Object.defineProperty(A,R,{value:F,enumerable:!0,configurable:!0,writable:!0}):A[R]=F,A}function n(A,R){if(!(A instanceof R))throw new TypeError("Cannot call a class as a function")}function s(A,R){for(var F=0;F<R.length;F++){var _=R[F];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(A,d(_.key),_)}}function u(A,R,F){return R&&s(A.prototype,R),Object.defineProperty(A,"prototype",{writable:!1}),A}function d(A){var R=S(A,"string");return o(R)==="symbol"?R:String(R)}function S(A,R){if(o(A)!=="object"||A===null)return A;var F=A[Symbol.toPrimitive];if(F!==void 0){var _=F.call(A,R||"default");if(o(_)!=="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(A)}function x(A,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(R&&R.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),Object.defineProperty(A,"prototype",{writable:!1}),R&&j(A,R)}function w(A){var R=P();return function(){var _=a(A),W;if(R){var y=a(this).constructor;W=Reflect.construct(_,arguments,y)}else W=_.apply(this,arguments);return f(this,W)}}function f(A,R){if(R&&(o(R)==="object"||typeof R=="function"))return R;if(R!==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 b(A){var R=typeof Map=="function"?new Map:void 0;return b=function(_){if(_===null||!q(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof R<"u"){if(R.has(_))return R.get(_);R.set(_,W)}function W(){return O(_,arguments,a(this).constructor)}return W.prototype=Object.create(_.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),j(W,_)},b(A)}function O(A,R,F){return P()?O=Reflect.construct.bind():O=function(W,y,m){var v=[null];v.push.apply(v,y);var U=Function.bind.apply(W,v),C=new U;return m&&j(C,m.prototype),C},O.apply(null,arguments)}function P(){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 q(A){return Function.toString.call(A).indexOf("[native code]")!==-1}function j(A,R){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(_,W){return _.__proto__=W,_},j(A,R)}function a(A){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},a(A)}function o(A){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},o(A)}var c=pt,p=c.inspect,g=Ln(),T=g.codes.ERR_INVALID_ARG_TYPE;function E(A,R,F){return(F===void 0||F>A.length)&&(F=A.length),A.substring(F-R.length,F)===R}function N(A,R){if(R=Math.floor(R),A.length==0||R==0)return"";var F=A.length*R;for(R=Math.floor(Math.log(R)/Math.log(2));R;)A+=A,R--;return A+=A.substring(0,F-A.length),A}var V="",ee="",X="",G="",J={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:"},xe=10;function Y(A){var R=Object.keys(A),F=Object.create(Object.getPrototypeOf(A));return R.forEach(function(_){F[_]=A[_]}),Object.defineProperty(F,"message",{value:A.message}),F}function pe(A){return p(A,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function we(A,R,F){var _="",W="",y=0,m="",v=!1,U=pe(A),C=U.split(`
|
|
1
|
+
import{r as H,j as i,g7 as ti,l as pr,g8 as ri,eM as vn,c7 as bn,f3 as Tt,g9 as pt,f2 as Ce,ga as ni,gb as xn,gc as wn,gd as ii,ge as oi,gf as jn,gg as dr,gh as ai,gi as si,gj as ci,gk as li,eX as rr,b9 as ui,co as qr,eZ as fi,aa as pi,aR as Re,u as ke,Q as En,B as se,aV as Et,A as Sn,D as di,T as Le,gl as mr,ah as Je,aw as Ze,a3 as Se,n as it,P as B,bC as mi,cs as nr,N as hi,f6 as gi,a0 as De,de as yi,a2 as mt,bn as Qe,t as $e,gm as vi,ac as Xe,dG as bi,a_ as Pn,G as Ee,a as dt,c as ir,b as xi,bF as wi,gn as On,bL as An,aX as ji,Z as Ei,$ as Si,bQ as Rn,m as Pi,aE as Oi,bH as Ai}from"./index-B6JqnGav.js";import{c as Ri}from"./index-D_a9PK4V.js";import{d as St}from"./Add-DrvqL0hE.js";import{d as Ii}from"./Loop-7B6BliWo.js";import{d as _i}from"./ViewList-BAdS9i6w.js";import{L as Ci,S as Ti,d as In}from"./list-header-xJwS88e7.js";import{D as _n,g as Ni}from"./index-yypbZOfl.js";import"./index-D-ntO8rE.js";import"./index-OSlxm1AT.js";import{j as Cn}from"./resource-dialog-B5zwd0d0.js";import{T as Di}from"./index-CVkCg5Aj.js";import{E as Tn}from"./index-C2Js2VJs.js";import"./fallback-Bog6C-ue.js";import"./index-BNJA7fMm.js";import{d as Ui,U as Li}from"./user-sessions-BcrnRXiG.js";import{u as qe,d as Kr,W as Nn,a as ki}from"./dashboard-zMsgPjUH.js";import{W as Pt}from"./did-address-CFfKa4ZS.js";import{P as Fe}from"./permission-DUJv7a1-.js";import{C as Nt}from"./click-to-copy-DpIi-Ham.js";import{F as or}from"./FormControl-BXFBXBjg.js";import{d as ar,S as sr}from"./Select-DUqBNlJT.js";import{T as Ot}from"./TextField-CmfNcPZp.js";import{D as hr}from"./DialogContentText-AZa4UZAk.js";import{A as nt}from"./Alert-BejFmWNH.js";import{f as Me}from"./format-error-CovOYOWJ.js";import{_ as qi}from"./useAsync-DD0YPYoS.js";import{I as cr}from"./index-DhmNHIsJ.js";import{d as Ki}from"./DeleteOutline-CCuUMIOD.js";import{C as ht}from"./confirm-8d8O8-hN.js";import{u as gr}from"./session-WU4Y95zb.js";import{N as Bi}from"./index-DigEOLzs.js";import{a as Fi}from"./uniqBy-C5F74Dtm.js";import{b as $i}from"./sdk-DrdJIJgz.js";import{A as Mi}from"./Avatar-kkkoJE0g.js";import{d as zi,L as Wi,a as Vi}from"./Delete-CWSox7Pi.js";import{p as Hi}from"./index-B43BetvD.js";import{A as Gi}from"./actions-BqmYvcdf.js";import{S as Yi}from"./shorten-label-CEzmS0N5.js";import{F as Zi}from"./FormControlLabel-Cj9C6pO9.js";import{C as Xi}from"./MoreVert-B5eqgNGS.js";import"./Search-sbQ5imrV.js";import"./useThemeProps-BuPPlocj.js";import"./toPropertyKey-PLuKRk1e.js";import"./emotion-cache.browser.esm-4zaifxzt.js";import"./index-CBvRZgBF.js";import"./redux-CluOqhW1.js";import"./ViewColumn-B0BnNDVH.js";import"./useFormControl-BL1v7rl-.js";import"./FormGroup-BgZW2j0M.js";import"./Grid-Cdg6My8u.js";import"./LastPage-PwdeYobs.js";import"./Toolbar-CpYKKa3O.js";import"./index-C1CKS8aB.js";import"./Menu-DHy4VyDW.js";import"./Hidden-CrDKveON.js";import"./ExpandMore-Co-_XFGT.js";import"./ListItemButton-CdKDiD3I.js";import"./selector-BWYpRcfb.js";import"./index-z1j9rzLQ.js";import"./OpenInNew-DZ_gvUzN.js";import"./index-RCN26efj.js";import"./Stack-FAMhTibv.js";import"./Link-Chjdc6xT.js";import"./Skeleton-DF-GsUea.js";import"./HelpOutline-DHPhK_es.js";import"./index-nA-fvgOS.js";import"./ButtonGroup-WlPKzLhC.js";import"./use-mobile-CUUBXgJx.js";import"./useLocalStorage-D0ViwHPK.js";import"./PlayArrow-lZ_9d9Mv.js";import"./RadioGroup-CMawEABb.js";import"./index-DmCU66xw.js";import"./useSetState-CaW4MG-2.js";import"./deprecate-DRUEDZmV.js";import"./useSlot-CXDnszbU.js";import"./MoreHoriz-BsqSBC3_.js";var yr={};Object.defineProperty(yr,"__esModule",{value:!0});var Dn=yr.default=void 0;Ji(H);var tt=i;function Ji(e){return e&&e.__esModule?e:{default:e}}function Br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Br(Object(r),!0).forEach(function(n){Qi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Br(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qi(e,t,r){return(t=eo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eo(e){var t=to(e,"string");return typeof t=="symbol"?t:t+""}function to(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vr=function(t){return(0,tt.jsxs)("svg",Fr(Fr({},t),{},{children:[(0,tt.jsx)("g",{clipPath:"url(#clip0)",children:(0,tt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,tt.jsx)("defs",{children:(0,tt.jsx)("clipPath",{id:"clip0",children:(0,tt.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};vr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};vr.displayName="person";Dn=yr.default=vr;var jt={},ro=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Un="%[a-f0-9]{2}",$r=new RegExp("("+Un+")|([^%]+?)","gi"),Mr=new RegExp("("+Un+")+","gi");function lr(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([],lr(r),lr(n))}function no(e){try{return decodeURIComponent(e)}catch{for(var t=e.match($r)||[],r=1;r<t.length;r++)e=lr(t,r).join(""),t=e.match($r)||[];return e}}function io(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Mr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=no(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Mr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),u=0;u<s.length;u++){var d=s[u];e=e.replace(new RegExp(d,"g"),t[d])}return e}var oo=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 io(e)}},ao=(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)]},so=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),u=0;u<n.length;u++){var d=n[u],S=e[d];(s?t.indexOf(d)!==-1:t(d,S,e))&&(r[d]=S)}return r};(function(e){const t=ro,r=oo,n=ao,s=so,u=a=>a==null;function d(a){switch(a.arrayFormat){case"index":return o=>(c,p)=>{const g=c.length;return p===void 0||a.skipNull&&p===null||a.skipEmptyString&&p===""?c:p===null?[...c,[w(o,a),"[",g,"]"].join("")]:[...c,[w(o,a),"[",w(g,a),"]=",w(p,a)].join("")]};case"bracket":return o=>(c,p)=>p===void 0||a.skipNull&&p===null||a.skipEmptyString&&p===""?c:p===null?[...c,[w(o,a),"[]"].join("")]:[...c,[w(o,a),"[]=",w(p,a)].join("")];case"comma":case"separator":return o=>(c,p)=>p==null||p.length===0?c:c.length===0?[[w(o,a),"=",w(p,a)].join("")]:[[c,w(p,a)].join(a.arrayFormatSeparator)];default:return o=>(c,p)=>p===void 0||a.skipNull&&p===null||a.skipEmptyString&&p===""?c:p===null?[...c,w(o,a)]:[...c,[w(o,a),"=",w(p,a)].join("")]}}function S(a){let o;switch(a.arrayFormat){case"index":return(c,p,g)=>{if(o=/\[(\d*)\]$/.exec(c),c=c.replace(/\[\d*\]$/,""),!o){g[c]=p;return}g[c]===void 0&&(g[c]={}),g[c][o[1]]=p};case"bracket":return(c,p,g)=>{if(o=/(\[\])$/.exec(c),c=c.replace(/\[\]$/,""),!o){g[c]=p;return}if(g[c]===void 0){g[c]=[p];return}g[c]=[].concat(g[c],p)};case"comma":case"separator":return(c,p,g)=>{const T=typeof p=="string"&&p.includes(a.arrayFormatSeparator),E=typeof p=="string"&&!T&&f(p,a).includes(a.arrayFormatSeparator);p=E?f(p,a):p;const N=T||E?p.split(a.arrayFormatSeparator).map(V=>f(V,a)):p===null?p:f(p,a);g[c]=N};default:return(c,p,g)=>{if(g[c]===void 0){g[c]=p;return}g[c]=[].concat(g[c],p)}}}function x(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function w(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function f(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,c)=>Number(o)-Number(c)).map(o=>a[o]):a}function b(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function O(a){let o="";const c=a.indexOf("#");return c!==-1&&(o=a.slice(c)),o}function P(a){a=b(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function q(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 j(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),x(o.arrayFormatSeparator);const c=S(o),p=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return p;for(const g of a.split("&")){if(g==="")continue;let[T,E]=n(o.decode?g.replace(/\+/g," "):g,"=");E=E===void 0?null:["comma","separator"].includes(o.arrayFormat)?E:f(E,o),c(f(T,o),E,p)}for(const g of Object.keys(p)){const T=p[g];if(typeof T=="object"&&T!==null)for(const E of Object.keys(T))T[E]=q(T[E],o);else p[g]=q(T,o)}return o.sort===!1?p:(o.sort===!0?Object.keys(p).sort():Object.keys(p).sort(o.sort)).reduce((g,T)=>{const E=p[T];return E&&typeof E=="object"&&!Array.isArray(E)?g[T]=D(E):g[T]=E,g},Object.create(null))}e.extract=P,e.parse=j,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),x(o.arrayFormatSeparator);const c=E=>o.skipNull&&u(a[E])||o.skipEmptyString&&a[E]==="",p=d(o),g={};for(const E of Object.keys(a))c(E)||(g[E]=a[E]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(E=>{const N=a[E];return N===void 0?"":N===null?w(E,o):Array.isArray(N)?N.reduce(p(E),[]).join("&"):w(E,o)+"="+w(N,o)}).filter(E=>E.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[c,p]=n(a,"#");return Object.assign({url:c.split("?")[0]||"",query:j(P(a),o)},o&&o.parseFragmentIdentifier&&p?{fragmentIdentifier:f(p,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const c=b(a.url).split("?")[0]||"",p=e.extract(a.url),g=e.parse(p,{sort:!1}),T=Object.assign(g,a.query);let E=e.stringify(T,o);E&&(E=`?${E}`);let N=O(a.url);return a.fragmentIdentifier&&(N=`#${w(a.fragmentIdentifier,o)}`),`${c}${E}${N}`},e.pick=(a,o,c)=>{c=Object.assign({parseFragmentIdentifier:!0},c);const{url:p,query:g,fragmentIdentifier:T}=e.parseUrl(a,c);return e.stringifyUrl({url:p,query:s(g,o),fragmentIdentifier:T},c)},e.exclude=(a,o,c)=>{const p=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,p,c)}})(jt);const lt=ri,co={parseNumbers:!1,parseBooleans:!1},lo={skipNull:!1,skipEmptyString:!1},uo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:u,stringifyOptions:d}={},S=Object.assign(Object.assign({},co),u),x=Object.assign(Object.assign({},lo),d),w=lt.useLocation(),f=(r=lt.useHistory)===null||r===void 0?void 0:r.call(lt),D=(n=lt.useNavigate)===null||n===void 0?void 0:n.call(lt),b=ti(),O=H.useRef(typeof e=="function"?e():e||{}),P=H.useMemo(()=>jt.parse(w.search,S),[w.search]),q=H.useMemo(()=>Object.assign(Object.assign({},O.current),P),[P]);return[q,pr(a=>{const o=typeof a=="function"?a(q):a;b(),f&&f[s]({hash:w.hash,search:jt.stringify(Object.assign(Object.assign({},P),o),x)||"?"},w.state),D&&D({hash:w.hash,search:jt.stringify(Object.assign(Object.assign({},P),o),x)||"?"},{replace:s==="replace",state:w.state})})]},fo=uo;var he={};Object.defineProperty(he,"__esModule",{value:!0});he.isValid=he.fromJSON=he.fromRandom=he.fromAddress=he.fromPublicKey=he.fromSecretKey=he.Wallet=he.WalletType=void 0;const gt=bn,At=Tt,Ae=vn;he.WalletType=Ae.DidType;function ot(e,t="default"){const r=(0,Ae.DidType)(t),n=(0,At.getSigner)(r.pk),s=(0,At.getHasher)(r.hash);return{type:r,secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,Ae.fromPublicKey)(e.pk,r):e.address,hash(u,d=1,S="hex"){return s(u,d,S)},sign(u,d=!0,S="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(d){const x=s(u,1);return n.sign(x,e.sk,S)}return n.sign(u,e.sk,S)},verify(u,d,S=!0){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const x=S?s(u,1):u;return n.verify(x,d,e.pk)},ethHash(u){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(u)},ethSign(u,d=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function")throw new Error("ethSign is not supported by signer");return d?n.ethSign(n.ethHash(u),(0,gt.toHex)(e.sk)):n.ethSign(u,(0,gt.toHex)(e.sk))},ethVerify(u,d,S=!0){if(typeof n.ethHash!="function")throw new Error("ethVerify is not supported by signer");const x=S?n.ethHash(u):u;return n.ethRecover(x,d)===this.address},toAddress(){return e.pk?(0,Ae.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:Ae.DidType.toJSON(r),sk:(0,gt.toHex)(e.sk),pk:(0,gt.toHex)(e.pk),address:this.address}}}}he.Wallet=ot;function po(e,t="default"){const r=(0,Ae.DidType)(t),n={sk:e,pk:(0,At.getSigner)(r.pk).getPublicKey(e)};return ot(n,r)}he.fromSecretKey=po;function mo(e,t="default"){return ot({pk:e},(0,Ae.DidType)(t))}he.fromPublicKey=mo;function ho(e){return ot({address:(0,Ae.toAddress)(e)},(0,Ae.toTypeInfo)(e))}he.fromAddress=ho;function go(e="default"){const t=(0,Ae.DidType)(e),n=(0,At.getSigner)(t.pk).genKeyPair();return ot({sk:n.secretKey,pk:n.publicKey},t)}he.fromRandom=go;function yo(e){const t=Ae.DidType.fromJSON(e.type);return ot(e,t)}he.fromJSON=yo;function vo(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&(!e.secretKey||typeof e.sign!="function"))}he.isValid=vo;var Kt={exports:{}},Bt={},zr;function Ln(){if(zr)return Bt;zr=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},e(o)}function t(o,c,p){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,c){if(!(o instanceof c))throw new TypeError("Cannot call a class as a function")}function n(o,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(c&&c.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),c&&s(o,c)}function s(o,c){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,c)}function u(o){var c=x();return function(){var g=w(o),T;if(c){var E=w(this).constructor;T=Reflect.construct(g,arguments,E)}else T=g.apply(this,arguments);return d(this,T)}}function d(o,c){if(c&&(e(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S(o)}function S(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function x(){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 w(o){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(p){return p.__proto__||Object.getPrototypeOf(p)},w(o)}var f={},D,b;function O(o,c,p){p||(p=Error);function g(E,N,V){return typeof c=="string"?c:c(E,N,V)}var T=function(E){n(V,E);var N=u(V);function V(ee,X,G){var J;return r(this,V),J=N.call(this,g(ee,X,G)),J.code=o,J}return t(V)}(p);f[o]=T}function P(o,c){if(Array.isArray(o)){var p=o.length;return o=o.map(function(g){return String(g)}),p>2?"one of ".concat(c," ").concat(o.slice(0,p-1).join(", "),", or ")+o[p-1]:p===2?"one of ".concat(c," ").concat(o[0]," or ").concat(o[1]):"of ".concat(c," ").concat(o[0])}else return"of ".concat(c," ").concat(String(o))}function q(o,c,p){return o.substr(0,c.length)===c}function j(o,c,p){return(p===void 0||p>o.length)&&(p=o.length),o.substring(p-c.length,p)===c}function a(o,c,p){return typeof p!="number"&&(p=0),p+c.length>o.length?!1:o.indexOf(c,p)!==-1}return O("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),O("ERR_INVALID_ARG_TYPE",function(o,c,p){D===void 0&&(D=ur()),D(typeof o=="string","'name' must be a string");var g;typeof c=="string"&&q(c,"not ")?(g="must not be",c=c.replace(/^not /,"")):g="must be";var T;if(j(o," argument"))T="The ".concat(o," ").concat(g," ").concat(P(c,"type"));else{var E=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(E," ").concat(g," ").concat(P(c,"type"))}return T+=". Received type ".concat(e(p)),T},TypeError),O("ERR_INVALID_ARG_VALUE",function(o,c){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";b===void 0&&(b=pt);var g=b.inspect(c);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(p,". Received ").concat(g)},TypeError),O("ERR_INVALID_RETURN_VALUE",function(o,c,p){var g;return p&&p.constructor&&p.constructor.name?g="instance of ".concat(p.constructor.name):g="type ".concat(e(p)),"Expected ".concat(o,' to be returned from the "').concat(c,'"')+" function but got ".concat(g,".")},TypeError),O("ERR_MISSING_ARGS",function(){for(var o=arguments.length,c=new Array(o),p=0;p<o;p++)c[p]=arguments[p];D===void 0&&(D=ur()),D(c.length>0,"At least one arg needs to be specified");var g="The ",T=c.length;switch(c=c.map(function(E){return'"'.concat(E,'"')}),T){case 1:g+="".concat(c[0]," argument");break;case 2:g+="".concat(c[0]," and ").concat(c[1]," arguments");break;default:g+=c.slice(0,T-1).join(", "),g+=", and ".concat(c[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),Bt.codes=f,Bt}var Ft,Wr;function bo(){if(Wr)return Ft;Wr=1;function e(A,R){var F=Object.keys(A);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(A);R&&(_=_.filter(function(W){return Object.getOwnPropertyDescriptor(A,W).enumerable})),F.push.apply(F,_)}return F}function t(A){for(var R=1;R<arguments.length;R++){var F=arguments[R]!=null?arguments[R]:{};R%2?e(Object(F),!0).forEach(function(_){r(A,_,F[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(F)):e(Object(F)).forEach(function(_){Object.defineProperty(A,_,Object.getOwnPropertyDescriptor(F,_))})}return A}function r(A,R,F){return R=d(R),R in A?Object.defineProperty(A,R,{value:F,enumerable:!0,configurable:!0,writable:!0}):A[R]=F,A}function n(A,R){if(!(A instanceof R))throw new TypeError("Cannot call a class as a function")}function s(A,R){for(var F=0;F<R.length;F++){var _=R[F];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(A,d(_.key),_)}}function u(A,R,F){return R&&s(A.prototype,R),Object.defineProperty(A,"prototype",{writable:!1}),A}function d(A){var R=S(A,"string");return o(R)==="symbol"?R:String(R)}function S(A,R){if(o(A)!=="object"||A===null)return A;var F=A[Symbol.toPrimitive];if(F!==void 0){var _=F.call(A,R||"default");if(o(_)!=="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(A)}function x(A,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(R&&R.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),Object.defineProperty(A,"prototype",{writable:!1}),R&&j(A,R)}function w(A){var R=P();return function(){var _=a(A),W;if(R){var y=a(this).constructor;W=Reflect.construct(_,arguments,y)}else W=_.apply(this,arguments);return f(this,W)}}function f(A,R){if(R&&(o(R)==="object"||typeof R=="function"))return R;if(R!==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 b(A){var R=typeof Map=="function"?new Map:void 0;return b=function(_){if(_===null||!q(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof R<"u"){if(R.has(_))return R.get(_);R.set(_,W)}function W(){return O(_,arguments,a(this).constructor)}return W.prototype=Object.create(_.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),j(W,_)},b(A)}function O(A,R,F){return P()?O=Reflect.construct.bind():O=function(W,y,m){var v=[null];v.push.apply(v,y);var U=Function.bind.apply(W,v),C=new U;return m&&j(C,m.prototype),C},O.apply(null,arguments)}function P(){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 q(A){return Function.toString.call(A).indexOf("[native code]")!==-1}function j(A,R){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(_,W){return _.__proto__=W,_},j(A,R)}function a(A){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},a(A)}function o(A){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},o(A)}var c=pt,p=c.inspect,g=Ln(),T=g.codes.ERR_INVALID_ARG_TYPE;function E(A,R,F){return(F===void 0||F>A.length)&&(F=A.length),A.substring(F-R.length,F)===R}function N(A,R){if(R=Math.floor(R),A.length==0||R==0)return"";var F=A.length*R;for(R=Math.floor(Math.log(R)/Math.log(2));R;)A+=A,R--;return A+=A.substring(0,F-A.length),A}var V="",ee="",X="",G="",J={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:"},xe=10;function Y(A){var R=Object.keys(A),F=Object.create(Object.getPrototypeOf(A));return R.forEach(function(_){F[_]=A[_]}),Object.defineProperty(F,"message",{value:A.message}),F}function pe(A){return p(A,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function we(A,R,F){var _="",W="",y=0,m="",v=!1,U=pe(A),C=U.split(`
|
|
2
2
|
`),k=pe(R).split(`
|
|
3
3
|
`),$=0,ne="";if(F==="strictEqual"&&o(A)==="object"&&o(R)==="object"&&A!==null&&R!==null&&(F="strictEqualObject"),C.length===1&&k.length===1&&C[0]!==k[0]){var ue=C[0].length+k[0].length;if(ue<=xe){if((o(A)!=="object"||A===null)&&(o(R)!=="object"||R===null)&&(A!==0||R!==0))return"".concat(J[F],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,a2 as e,j as t,R as n,a0 as o}from"./index-
|
|
1
|
+
import{r as a,a2 as e,j as t,R as n,a0 as o}from"./index-B6JqnGav.js";function p(){const{t:s}=a.useContext(e);return t.jsx(r,{style:{paddingTop:"25vh"},children:t.jsx(n,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const r=o.main``;export{p as default};
|