@abtnode/blocklet-services 1.16.29-beta-db5c4ed6 → 1.16.29-beta-a076832b
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-CG-F3Tpq.js → Add-DYUoCOSD.js} +1 -1
- package/dist/assets/{AddBox-CCE1buV8.js → AddBox-CdWySqkf.js} +1 -1
- package/dist/assets/{Alert-cwZghN5o.js → Alert-DjdB6kJi.js} +1 -1
- package/dist/assets/{ArrowDropDown-DpHnrXJX.js → ArrowDropDown-D1r34mKE.js} +1 -1
- package/dist/assets/{Avatar-BVTgZMZu.js → Avatar-B2aqlUr4.js} +1 -1
- package/dist/assets/{ButtonGroup-Cf877fOo.js → ButtonGroup-B2OCm4w2.js} +1 -1
- package/dist/assets/{CheckCircle-CZETHIjv.js → CheckCircle-Z3ZeQuFe.js} +1 -1
- package/dist/assets/{ChevronRight-B1-v0rVj.js → ChevronRight-DLpiW9Xe.js} +1 -1
- package/dist/assets/{Close-DM3JyAUN.js → Close-CDh8sW0t.js} +1 -1
- package/dist/assets/{CloseOutlined-D-nYpxl4.js → CloseOutlined-CyTE8SBm.js} +1 -1
- package/dist/assets/{Delete-DJZzf2v3.js → Delete-BJX_VOZK.js} +1 -1
- package/dist/assets/{DeleteOutline-UAdOMkx7.js → DeleteOutline-CePnDmzu.js} +1 -1
- package/dist/assets/{Done-CIjx7jUD.js → Done-CKMtsSDh.js} +1 -1
- package/dist/assets/{Download-CZGyacWn.js → Download-Cj5rREAv.js} +1 -1
- package/dist/assets/{Edit-DUj2eyUz.js → Edit-B4y9FSb5.js} +1 -1
- package/dist/assets/{EditIcon-jpbTcPi9.js → EditIcon-CjrPa4hu.js} +1 -1
- package/dist/assets/{Error-CzevJZgV.js → Error-DUbGuPJ0.js} +1 -1
- package/dist/assets/{ExpandMore-Vsh2QVwZ.js → ExpandMore-MF6JMWUJ.js} +1 -1
- package/dist/assets/{FilterList-Cy1sL14k.js → FilterList-D2fArxx7.js} +1 -1
- package/dist/assets/{FormControl-B_Do5Nt6.js → FormControl-C7YkaJ_C.js} +1 -1
- package/dist/assets/{FormControlLabel-BDYHQJ8F.js → FormControlLabel-CSgQzD8H.js} +1 -1
- package/dist/assets/{FormGroup-Bk12j31H.js → FormGroup-Dg7paSKn.js} +1 -1
- package/dist/assets/{Google-CPv9gImr.js → Google-CFVK7w2J.js} +1 -1
- package/dist/assets/{Hidden-kVeQMxEt.js → Hidden-DwnJ4iUH.js} +1 -1
- package/dist/assets/{InfoOutlined-DUs9-7mj.js → InfoOutlined-Cxp66Zcn.js} +1 -1
- package/dist/assets/{InputAdornment-C-wpGP7M.js → InputAdornment-DOCN0hKn.js} +1 -1
- package/dist/assets/{InputLabel-4YX1ylv6.js → InputLabel-B3K-wjtt.js} +1 -1
- package/dist/assets/{LastPage-BfloM2Wq.js → LastPage-CxpvA1Xh.js} +1 -1
- package/dist/assets/{Launch-CahVoyyw.js → Launch-DEUdTJHa.js} +1 -1
- package/dist/assets/{LaunchOutlined-CK6AtL0o.js → LaunchOutlined-QUp-utbG.js} +1 -1
- package/dist/assets/{Link-D9C6v4KL.js → Link-29c93vgL.js} +1 -1
- package/dist/assets/{ListItemText-CbVOTWQ3.js → ListItemText-DzuIoJgM.js} +1 -1
- package/dist/assets/{LoadingButton-CIR80MCf.js → LoadingButton-Bzf3J--u.js} +1 -1
- package/dist/assets/{LockIcon-C20NfK7J.js → LockIcon-BOciunxD.js} +1 -1
- package/dist/assets/{Loop-AFtqcSsh.js → Loop-x0x8mTRv.js} +1 -1
- package/dist/assets/{MoreHoriz-kAuD1nY3.js → MoreHoriz-DpzaIBa1.js} +1 -1
- package/dist/assets/{MoreVert-Dd_rZHl1.js → MoreVert-Yxhg1I2d.js} +1 -1
- package/dist/assets/{OpenInNew-DYXjNtnC.js → OpenInNew-CyuaC2rt.js} +1 -1
- package/dist/assets/{Pagination-8KVsI0JZ.js → Pagination-CtrgfNqc.js} +1 -1
- package/dist/assets/{PlayArrow-s9OSCCm9.js → PlayArrow-BnDxNqxv.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-50eq7smQ.js → QuestionMarkCircle-CXgSQEsv.js} +1 -1
- package/dist/assets/{RadioGroup-DImJzaoP.js → RadioGroup-CKSypMzt.js} +1 -1
- package/dist/assets/{Search-CxTEsXhT.js → Search-cf0osNnP.js} +1 -1
- package/dist/assets/{Select-D6CeNImJ.js → Select-Cgn_SK4j.js} +1 -1
- package/dist/assets/{ServerLogo-dvjXsp5I.js → ServerLogo-D-ipF8I0.js} +1 -1
- package/dist/assets/{Skeleton-DL2VL97S.js → Skeleton-IV13LZSZ.js} +1 -1
- package/dist/assets/{Slider-DSplqaCn.js → Slider-CWI7bXOG.js} +1 -1
- package/dist/assets/{Stepper-DJQ-xHUp.js → Stepper-DDJHXofQ.js} +1 -1
- package/dist/assets/{TextField-DVioGsc-.js → TextField-B0tdvs5D.js} +1 -1
- package/dist/assets/{Toolbar-CRxjvb2_.js → Toolbar-DDP1Q2zI.js} +1 -1
- package/dist/assets/{ViewList-2sUBAhN9.js → ViewList-ByImqA3D.js} +1 -1
- package/dist/assets/{access-control-q6rCI632.js → access-control-BzEKRo3D.js} +1 -1
- package/dist/assets/{actions-DLwaHSiX.js → actions-jiSiBiRc.js} +1 -1
- package/dist/assets/{add-component-core-B3gU-T0w.js → add-component-core-CEBg623l.js} +1 -1
- package/dist/assets/{add-resource-b81lLJ0f.js → add-resource-BEBqVsbA.js} +1 -1
- package/dist/assets/{addon-FuoBpuOX.js → addon-BMzKKhYw.js} +1 -1
- package/dist/assets/{analytics-DiVy8Vmf.js → analytics-AjQG-w7g.js} +1 -1
- package/dist/assets/api-BP-akdsb.js +1 -0
- package/dist/assets/{audit-logs-Bv-gENHC.js → audit-logs-DRadMWt4.js} +1 -1
- package/dist/assets/{button-eQ0RcFyP.js → button-DGlAIJRt.js} +1 -1
- package/dist/assets/{click-to-copy-C0t70-Pv.js → click-to-copy-lZXtD2ex.js} +1 -1
- package/dist/assets/{complete-pY8wsJjf.js → complete-KepK0QOU.js} +1 -1
- package/dist/assets/{component-BFX3kRXD.js → component-b5h_gUk8.js} +1 -1
- package/dist/assets/{config-CIbQaP5R.js → config-1---D29i.js} +1 -1
- package/dist/assets/{config-ndQXqG8O.js → config-Cag5rmHW.js} +1 -1
- package/dist/assets/{config-navigation-CC8qHxUp.js → config-navigation-UsIM2r2Z.js} +1 -1
- package/dist/assets/{config-space-DN8oNvsB.js → config-space-WLbYpr3G.js} +1 -1
- package/dist/assets/{confirm-DcZkK6Pc.js → confirm-WbbThheQ.js} +1 -1
- package/dist/assets/{connect-nZhD-SxO.js → connect-6r444iNU.js} +1 -1
- package/dist/assets/{connect-6vivetnz.js → connect-CYSgIu-r.js} +1 -1
- package/dist/assets/{connect-to-BU03yn0n.js → connect-to-epPHerHw.js} +1 -1
- package/dist/assets/{content-layout-DgQ1ivqD.js → content-layout-DUKw872A.js} +1 -1
- package/dist/assets/{dashboard-DJj7YdCJ.js → dashboard-B4ToB_WX.js} +3 -3
- package/dist/assets/{did-address-1pTl5ZJp.js → did-address-Dm6G9Pz0.js} +1 -1
- package/dist/assets/{domain-list-D69n3xq6.js → domain-list-B9HeS_qd.js} +1 -1
- package/dist/assets/{domain-DbHm_W8g.js → domain-peyY2u5r.js} +1 -1
- package/dist/assets/{exchange-passport-C1vO8vf7.js → exchange-passport-DRTAvySc.js} +1 -1
- package/dist/assets/{fallback-Co8Kc2kj.js → fallback-DV2p3NP7.js} +1 -1
- package/dist/assets/{format-error-DSoyPyVx.js → format-error-DZ98jGc_.js} +1 -1
- package/dist/assets/{fuel-C-ZdhzZC.js → fuel-CGMwCUCY.js} +1 -1
- package/dist/assets/{fullpage-BxLSpyM0.js → fullpage-DGQSRj9c.js} +1 -1
- package/dist/assets/{home-6XDnH9s-.js → home-2NVW01O-.js} +1 -1
- package/dist/assets/{iframe-BWL5r6kn.js → iframe-Viwbu4Xm.js} +1 -1
- package/dist/assets/{index-DViM25Vy.js → index-B-KhRlcq.js} +1 -1
- package/dist/assets/{index-CHSnAsQ1.js → index-BHVmBQ8E.js} +219 -219
- package/dist/assets/{index-B8_eoYBV.js → index-BTHSgca3.js} +1 -1
- package/dist/assets/{index-CkaWI_Zl.js → index-BYOFkx6u.js} +1 -1
- package/dist/assets/{index-BtByfVAB.js → index-BmvHTNFm.js} +1 -1
- package/dist/assets/{index-D7CVGBHs.js → index-BsO44bVl.js} +1 -1
- package/dist/assets/{index-BWJ8VQ8o.js → index-BuvljqqC.js} +1 -1
- package/dist/assets/{index-vP3Tn4O7.js → index-BwaeqOzE.js} +1 -1
- package/dist/assets/{index-CsPuSl01.js → index-BxWvRO5-.js} +1 -1
- package/dist/assets/{index-Cnmgkvme.js → index-CEQ26NUj.js} +1 -1
- package/dist/assets/{index-uHERBk1s.js → index-CHXC0QuW.js} +1 -1
- package/dist/assets/{index-NRVaJz9f.js → index-COsZ3LRn.js} +1 -1
- package/dist/assets/{index-DUwoq2dS.js → index-COvK0Knb.js} +1 -1
- package/dist/assets/{index-B36YvF84.js → index-CU9bXzIx.js} +1 -1
- package/dist/assets/{index-CI4IafEw.js → index-CUPDfkTE.js} +1 -1
- package/dist/assets/{index-Bc3Y41oE.js → index-Cb2I5Pnm.js} +1 -1
- package/dist/assets/{index-6uPYP6zK.js → index-D2Sq56Bc.js} +1 -1
- package/dist/assets/{index-BaC0Haea.js → index-D5vdosR6.js} +1 -1
- package/dist/assets/{index-DhQKOamW.js → index-DCmOI5EU.js} +1 -1
- package/dist/assets/{index-DpC9sww1.js → index-DPzyMEVE.js} +1 -1
- package/dist/assets/{index-vwRhQ5RS.js → index-Dbd8X1MQ.js} +1 -1
- package/dist/assets/{index-CnDdm9g9.js → index-Drk5a1Fs.js} +3 -3
- package/dist/assets/{index-C82L-zg9.js → index-DxWLBhYd.js} +1 -1
- package/dist/assets/{index-DCBDib20.js → index-Nu-kRA9C.js} +1 -1
- package/dist/assets/{index-DRjKGjM-.js → index-O15prgg1.js} +1 -1
- package/dist/assets/{index-D_gLZbnC.js → index-Sq8Y5yqF.js} +1 -1
- package/dist/assets/{index-DkWYK9Jo.js → index-UwSihXUn.js} +4 -4
- package/dist/assets/{index-DJWtIeK5.js → index-ev1wxRtJ.js} +1 -1
- package/dist/assets/{index-knmEO6mr.js → index-j0EDKFYS.js} +1 -1
- package/dist/assets/{index-0Kwb6jmK.js → index-txKLyozl.js} +1 -1
- package/dist/assets/{index.es-CAvKNGJJ.js → index.es-Dpe8HW6o.js} +1 -1
- package/dist/assets/{index.esm-OBsOHYQt.js → index.esm-BTLuzvlk.js} +1 -1
- package/dist/assets/{invitation-BgQ2lCo2.js → invitation-Cb8Zo6yL.js} +1 -1
- package/dist/assets/{invite-B8ygHcEw.js → invite-CNndcwxI.js} +1 -1
- package/dist/assets/{issue-passport-CQSIbZov.js → issue-passport-_tYdekkf.js} +1 -1
- package/dist/assets/{item-D_tapEj7.js → item-CI9bZp4P.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-D277VpMG.js → jss-plugin-props-sort.esm-DburuMay.js} +1 -1
- package/dist/assets/{launch-result-message-zvz9QdJ0.js → launch-result-message-DznNd6jz.js} +1 -1
- package/dist/assets/{layout-66Qddc3Z.js → layout-BIrEOAsV.js} +1 -1
- package/dist/assets/{list-header-CVFTxg9p.js → list-header-ek3KY30P.js} +1 -1
- package/dist/assets/localization-CfHrCqyy.js +1 -0
- package/dist/assets/{log-m5_kgR9i.js → log-xbjJ0Mb1.js} +1 -1
- package/dist/assets/{login-BCQZewGI.js → login-BFMXiVxz.js} +1 -1
- package/dist/assets/{login-oauth-callback-DrGlI4fl.js → login-oauth-callback-BL5dyBEj.js} +1 -1
- package/dist/assets/{logo-uploader-BxL2AT1m.js → logo-uploader-BGnN7Ln3.js} +3 -3
- package/dist/assets/{lost-passport-CvgZJmfW.js → lost-passport-JFAwpUof.js} +3 -3
- package/dist/assets/{lottie-C925gYap.js → lottie-FBGv95mr.js} +1 -1
- package/dist/assets/{notifications-Dle2tsHf.js → notifications-D9_beIiL.js} +1 -1
- package/dist/assets/{overview-RpXehI-A.js → overview-D4MjBoAU.js} +1 -1
- package/dist/assets/{page-header-nMH5Nm1-.js → page-header-66y5LGdR.js} +1 -1
- package/dist/assets/{permission-DPowxK7C.js → permission-D5QEfwx7.js} +1 -1
- package/dist/assets/{preferences-C1i7ovMQ.js → preferences-BPN_TcF4.js} +1 -1
- package/dist/assets/publish-resource-Dll719dz.js +1 -0
- package/dist/assets/{react-DR-nB82P.js → react-DiBHU1pk.js} +3 -3
- package/dist/assets/{redux-DfSDCKtt.js → redux-DfMVEh8C.js} +1 -1
- package/dist/assets/{resource-dialog-ifz0m_FZ.js → resource-dialog-Dz_4-Jou.js} +1 -1
- package/dist/assets/{selector-C4Gh2j9t.js → selector-C_Cr9H0Y.js} +1 -1
- package/dist/assets/session-C_q17DqM.js +1 -0
- package/dist/assets/{setup-BKousrMa.js → setup-rD1AIRpk.js} +3 -3
- package/dist/assets/{shorten-label--VZVYLZC.js → shorten-label-C0fy7vw5.js} +1 -1
- package/dist/assets/{slicedToArray-CVLbnzuy.js → slicedToArray-D8reQbRM.js} +1 -1
- package/dist/assets/{spaces-BGhjBX1b.js → spaces-Cp3qdjuQ.js} +1 -1
- package/dist/assets/{start-Be-aPrp4.js → start-BoTKXyGD.js} +1 -1
- package/dist/assets/{step-actions-CEK8mgUw.js → step-actions-BgkbqFQR.js} +1 -1
- package/dist/assets/{studio-DAsrT0p3.js → studio-CKz5NekF.js} +1 -1
- package/dist/assets/{switch-control-CdZ7hT3y.js → switch-control-B8e0yzux.js} +1 -1
- package/dist/assets/{toUpper-B3I7eG1g.js → toUpper-BbUf7PTC.js} +1 -1
- package/dist/assets/{transfer--Bgmivmp.js → transfer-dut38B6y.js} +1 -1
- package/dist/assets/{uniqBy-BA_TMJYf.js → uniqBy-BtS3yjwZ.js} +1 -1
- package/dist/assets/{unsubscribe-fhr9EaAr.js → unsubscribe-BFdMTxxA.js} +1 -1
- package/dist/assets/{url-join-JgKEtdA2.js → url-join-CUdrf5JK.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-rQZBR8_3.js → use-blocklet-info-for-connect-did-spaces-3u6OI24d.js} +1 -1
- package/dist/assets/{use-mobile-DCi1_Enm.js → use-mobile-BJKZGD1I.js} +1 -1
- package/dist/assets/{useAsync-B3RNaSvA.js → useAsync-SsrsgChA.js} +1 -1
- package/dist/assets/{useFormControl-oAKl9UVb.js → useFormControl-CIM987QD.js} +1 -1
- package/dist/assets/{useLocalStorage-BnVJN1iM.js → useLocalStorage-CyHzuw0V.js} +1 -1
- package/dist/assets/{useSetState-Bw-0RwWQ.js → useSetState-BTrtc5bD.js} +1 -1
- package/dist/assets/{useSlot-Cwz6OM5B.js → useSlot-BXs-_Etv.js} +1 -1
- package/dist/assets/{user-center-BsD4RIvy.js → user-center-CEybRz8U.js} +1 -1
- package/dist/assets/{user-sessions-COQO8nIH.js → user-sessions-CzcM49ld.js} +1 -1
- package/dist/assets/{util-CRACQuGi.js → util-CMZTMLfm.js} +1 -1
- package/dist/assets/{wrap-locale-CNoCPP-4.js → wrap-locale-Bbtuw1Wn.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +18 -18
- package/dist/assets/api-CK31hCQN.js +0 -1
- package/dist/assets/localization-BNU71z-g.js +0 -1
- package/dist/assets/publish-resource-Cdc_Imtz.js +0 -1
- package/dist/assets/session-DFjt4_rn.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,a0 as e,j as t,au as n,Z as o}from"./index-
|
|
1
|
+
import{r as a,a0 as e,j as t,au as n,Z as o}from"./index-BHVmBQ8E.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aV as Y,aM as ce,u as E,r as v,eM as Ze,c1 as ie,c as Z,f9 as Pe,j as e,T as x,B as u,I as re,ap as Qe,a1 as W,l as q,b8 as de,q as I,P as p,Z as ve,a0 as He,go as Ve,X as _,Y as $,aQ as V,f8 as Ke,az as Xe,aO as We,$ as Ge,O as Ye,be as je,bX as qe,cr as _e,a9 as $e,E as L,bf as H,a as et,gp as tt}from"./index-CHSnAsQ1.js";import{S as ye}from"./index-BWJ8VQ8o.js";import"./api-CK31hCQN.js";import{u as Ie,P as st}from"./use-blocklet-info-for-connect-did-spaces-rQZBR8_3.js";import{e as G,f as Ae,h as ot,i as Se,j as nt,k as at,l as Ce,d as it}from"./spaces-BGhjBX1b.js";import{g as z}from"./dashboard-DJj7YdCJ.js";import{D as rt,f as le}from"./format-error-DSoyPyVx.js";import{T as lt}from"./TextField-DVioGsc-.js";import{A as ct}from"./Alert-cwZghN5o.js";import{I as dt}from"./index-Bc3Y41oE.js";import{E as Be}from"./Link-D9C6v4KL.js";import{W as pt}from"./did-address-1pTl5ZJp.js";import{S as ke}from"./switch-control-CdZ7hT3y.js";import{d as mt}from"./MoreVert-Dd_rZHl1.js";import{d as ht}from"./DeleteOutline-UAdOMkx7.js";import{L as K,a as X}from"./ListItemText-CbVOTWQ3.js";import{e as ut}from"./mode-B2dWMeTO.js";import{T as ae}from"./index-0Kwb6jmK.js";import{D as ft}from"./index-DpC9sww1.js";import"./ExpandMore-Vsh2QVwZ.js";import"./ButtonGroup-Cf877fOo.js";import"./CloseOutlined-D-nYpxl4.js";import"./index-vwRhQ5RS.js";import"./index-B8_eoYBV.js";import"./useLocalStorage-BnVJN1iM.js";import"./confirm-DcZkK6Pc.js";import"./Delete-DJZzf2v3.js";import"./PlayArrow-s9OSCCm9.js";import"./RadioGroup-DImJzaoP.js";import"./FormControlLabel-BDYHQJ8F.js";import"./useFormControl-oAKl9UVb.js";import"./FormGroup-Bk12j31H.js";import"./Avatar-BVTgZMZu.js";import"./useSlot-Cwz6OM5B.js";import"./session-DFjt4_rn.js";import"./permission-DPowxK7C.js";import"./useAsync-B3RNaSvA.js";import"./useSetState-Bw-0RwWQ.js";import"./fallback-Co8Kc2kj.js";import"./index-B36YvF84.js";import"./Toolbar-CRxjvb2_.js";import"./Hidden-kVeQMxEt.js";import"./MoreHoriz-kAuD1nY3.js";import"./index-DViM25Vy.js";import"./selector-C4Gh2j9t.js";import"./FormControl-B_Do5Nt6.js";import"./InputLabel-4YX1ylv6.js";import"./Select-D6CeNImJ.js";import"./index-Cnmgkvme.js";import"./FilterList-Cy1sL14k.js";import"./toPropertyKey-hKuLU48H.js";import"./LastPage-BfloM2Wq.js";import"./index-BaC0Haea.js";import"./redux-DfSDCKtt.js";import"./Search-CxTEsXhT.js";import"./index-DJWtIeK5.js";function ee({...t}){const{blocklet:s}=Y(),{info:d}=ce(),{t:a,locale:i}=E(),[h,o]=v.useState(""),[r,j]=v.useState(!1),[c,m]=v.useState(!1),[k,y]=v.useState(""),f=Ie({blocklet:s}),g=Ze(d),{spaceGateways:B,addSpaceGateway:se}=z(),[D,M]=v.useState({open:!1,action:"connect-to-did-spaces",checkTimeout:1e3*300,checkFn:ie.create({baseURL:Z(window.location.origin,Pe())}).get,messages:{title:a("storage.spaces.provideNFT.title",{appName:f.appName},i),scan:a("storage.spaces.provideNFT.scan",{appName:f.appName},i),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:a("storage.spaces.provideNFT.success")})},onClose:()=>{M(l=>({...l,open:!1}))}}),[n,J]=v.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:a("storage.spaces.authorize.title",{appName:f.appName},i),scan:a("storage.spaces.authorize.scan",{appName:f.appName},i),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:a("storage.spaces.authorize.success")})},onClose:()=>{J(l=>({...l,open:!1}))}}),b=async({endpoint:l,name:A,did:S})=>{const R=await Ae(l);if(!await Se(R)){I.error(a("storage.spaces.gateway.add.invalidUrl"));return}if(B.some(P=>P.endpoint===l)){I.error(a("storage.spaces.gateway.add.duplicate",{name:A}));return}const O={name:A,did:S,url:R,endpoint:l};await se(O,l),I.success(a("storage.spaces.connectedWithName",{name:(O==null?void 0:O.name)??"DID Spaces"}))},T=async(l,A)=>{try{if(!de.isEmpty(l.spaceGateway))await b(A(l.spaceGateway));else{const S=A(l.endpoint),R=l.space?A(l.space):{};await b({endpoint:S,did:G(S),name:"DID Space",...R})}J(S=>({...S,open:!1})),o(null),M(S=>({...S,open:!1}))}catch(S){console.error(S),I.error(le(S))}},C=()=>{M(l=>({...l,open:!0,extraParams:{appPid:s.appPid,appName:f.appName,appDescription:f.appDescription,scopes:f.scopes,appUrl:f.appUrl,referrer:f.referrer,nodeDid:d.did}}))},w=async()=>{try{j(!0);const l=await Ae(h),A=ot(l),S=new URL(l).searchParams.get("spaceDid");if(!await Se(A))throw new Error(a("storage.spaces.gateway.add.invalidUrl"));J(R=>({...R,open:!0,prefix:Z(A,"space/api/did"),baseUrl:new URL(A).origin,checkFn:ie.create({baseURL:Z(A,"space")}).get,extraParams:{appDid:f.appDid,appName:f.appName,appDescription:f.appDescription,scopes:f.scopes,appUrl:f.appUrl,referrer:f.referrer,nodeDid:d.did,spaceDid:S}})),m(!1)}catch(l){const A=`${a("storage.spaces.gateway.add.failed",i)}: ${le(l)}`;y(A)}finally{j(!1)}};return e.jsxs(u,{children:[e.jsx(ye,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:C,menu:[e.jsx(ye.Item,{sx:{textTransform:"none"},onClick:()=>m(!0),size:"small",...t,children:a("storage.spaces.connect.useSpaceGateway")},"1")],children:e.jsx(x,{sx:{fontWeight:"bold",textTransform:"none"},children:a("storage.spaces.connect.useWallet")})}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:D.prefix,open:D.open,popup:!0,action:D.action,webWalletUrl:g,baseUrl:D.baseUrl,checkFn:D.checkFn,onSuccess:T,onClose:D.onClose,checkTimeout:D.checkTimeout,extraParams:D.extraParams,messages:D.messages,locale:i}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:n.prefix,open:n.open,popup:!0,action:n.action,baseUrl:n.baseUrl,checkFn:n.checkFn,onSuccess:T,onClose:n.onClose,checkTimeout:n.checkTimeout,extraParams:n.extraParams,messages:n.messages,locale:i}),e.jsxs(Qe,{title:a("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:c,onClose:()=>m(!1),PaperProps:{style:{minHeight:"auto"}},actions:e.jsxs(e.Fragment,{children:[e.jsx(W,{onClick:l=>{l.stopPropagation(),m(!1)},color:"inherit",children:a("common.cancel")}),e.jsxs(W,{onClick:w,color:"primary",disabled:r||!h,variant:"contained",autoFocus:!0,children:[r&&e.jsx(q,{size:16}),a("common.confirm")]})]}),children:[e.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:e.jsx(rt,{component:"div",children:e.jsx(x,{component:"div",children:e.jsx(lt,{label:a("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:h,onChange:l=>{y(null),o(l.target.value)},disabled:r,onKeyPress:async l=>{l.key==="Enter"&&await w()},autoFocus:!0})})})}),!!k&&e.jsx(ct,{severity:"error",style:{width:"100%"},children:k})]})]})}ee.propTypes={};ee.defaultProps={};function te({blocklet:t,...s}){const{t:d}=v.useContext(He);if(!t.diskInfo)return e.jsx(x,{children:d("blocklet.diskInfo.empty")});const a=(o,r,j)=>e.jsxs(x,{children:[j?e.jsx(Be,{style:{cursor:"pointer"},onClick:j,underline:"hover",children:o}):o," ",e.jsx("strong",{children:r?Ve(r):"empty"})]}),i=t.environments.reduce((o,r)=>(o[r.key]=r.value,o),{}),h=[{key:"appDir",name:d("blocklet.diskInfo.appDir"),value:a(i.BLOCKLET_APP_DIR,t.diskInfo.app)},{key:"dataDir",name:d("blocklet.diskInfo.dataDir"),value:a(i.BLOCKLET_DATA_DIR,t.diskInfo.data)},{key:"logDir",name:d("blocklet.diskInfo.logDir"),value:a(i.BLOCKLET_LOG_DIR,t.diskInfo.log)},{key:"cacheDir",name:d("blocklet.diskInfo.cacheDir"),value:a(i.BLOCKLET_CACHE_DIR,t.diskInfo.cache)}];return e.jsx(xt,{component:"div",...s,children:h.map(o=>e.jsx(dt,{valueComponent:"div",nameWidth:120,name:o.name,children:o.value},o.key))})}te.propTypes={blocklet:p.object.isRequired};te.defaultProps={};const xt=ve(x)``;var De=function(s){return e.jsxs("svg",{...s,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref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kHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};De.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Ue(){const{t}=E(),{blocklet:s}=Y();return e.jsxs(u,{children:[e.jsxs(u,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(De,{style:{width:200,height:250}}),e.jsx(x,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(ee,{})]}),e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(te,{blocklet:s})]})}Ue.propTypes={};var pe={},gt=$;Object.defineProperty(pe,"__esModule",{value:!0});var be=pe.default=void 0,jt=gt(_()),yt=e;be=pe.default=(0,jt.default)((0,yt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var me={},At=$;Object.defineProperty(me,"__esModule",{value:!0});var Re=me.default=void 0,St=At(_()),Ct=e;Re=me.default=(0,St.default)((0,Ct.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var he={},vt=$;Object.defineProperty(he,"__esModule",{value:!0});var Ee=he.default=void 0,It=vt(_()),Bt=e;Ee=he.default=(0,It.default)((0,Bt.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function ue({spaceGateway:t,onDelete:s}){const{t:d}=E(),[a,i]=v.useState(!1),[h,o]=v.useState(!1),r=(c,m)=>{c==null||c.preventDefault(),c==null||c.stopPropagation(),i(m)},j=async c=>{try{c==null||c.stopPropagation(),o(!0),await s(t),i(!1)}catch(m){console.error(m),I.error(`${d("storage.space.gateway.delete.failed")}: ${le(m)}`)}finally{o(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(V,{color:"red",onClick:c=>r(c,!0),children:[e.jsx(K,{style:{minWidth:24,color:"red"},children:e.jsx(ht,{fontSize:"small"})}),e.jsx(X,{style:{color:"red"},children:d("common.delete")})]}),e.jsx(Ke,{title:d("common.delConfirmDescription",{data:`${t==null?void 0:t.name}`}),open:a,confirmButton:{text:d("common.confirm"),props:{variant:"contained",color:"error",loading:h}},cancelButton:{text:d("common.cancel"),props:{variant:"contained",color:"primary"},loading:h},onConfirm:j,onCancel:c=>r(c,!1)})]})}ue.propTypes={onDelete:p.func,spaceGateway:p.shape({name:p.string.isRequired,url:p.string.isRequired,protected:p.bool}).isRequired};ue.defaultProps={onDelete:()=>{}};function fe({spaceGateway:t,connected:s,onDelete:d,onConnect:a,enableSwitchToSpace:i,backupInProgress:h,...o}){const[r,j]=v.useState(null),{t:c}=E(),[m,k]=v.useState(!1),y=(g,B)=>{g.stopPropagation(),g.preventDefault(),j(B&&g.currentTarget)},f=async g=>{try{k(!0),y(g,!1),await a(t)}catch(B){console.error(B),I.error(B.message)}finally{k(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Xe,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:g=>y(g,!0),size:"small",...o,children:m||t!=null&&t.loading?e.jsx(q,{size:"24px"}):e.jsx(mt,{})}),e.jsxs(We,{id:"simple-menu",anchorEl:r,keepMounted:!0,open:!!r,onClose:g=>y(g,!1),children:[e.jsxs(V,{onClick:g=>{y(g,!1),window.open(t.endpoint?nt(t.endpoint):t.url)},children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(be,{fontSize:"small"})}),e.jsx(X,{children:c("common.open")})]}),e.jsxs(V,{onClick:g=>{y(g,!1),window.open(at(t.endpoint))},children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(Ee,{fontSize:"small"})}),e.jsx(X,{children:c("storage.spaces.strategy.viewBackupFiles")})]}),!s&&i&&e.jsxs(V,{onClick:f,children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(Re,{fontSize:"small"})}),e.jsx(X,{children:c("storage.spaces.connect.switchToSpace")})]}),!h&&e.jsx(ue,{spaceGateway:t,onDelete:d})]})]})}fe.propTypes={spaceGateway:p.shape({name:p.string.isRequired,url:p.string.isRequired,protected:p.bool,endpoint:p.string.isRequired,loading:p.bool}).isRequired,connected:p.bool.isRequired,enableSwitchToSpace:p.bool,onDelete:p.func,onConnect:p.func,backupInProgress:p.bool};fe.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};var Te=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};Te.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var we=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})})};we.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xe({spaceGateway:t,connected:s,onDelete:d,onBackupNow:a,...i}){const h=Ge(U=>U.breakpoints.down("md")),{t:o,locale:r}=E(),{blocklet:j}=Y(),{api:c,info:{did:m}}=ce(),{appDid:k,appName:y,appDescription:f,scopes:g,appUrl:B,referrer:se}=Ie({blocklet:j}),{updateSpaceGateway:D,backupEndpoint:M,backupProgress:n,refreshBackupEndpoint:J}=z(),[b,T]=v.useState(!1),[C,w]=v.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:o("storage.spaces.authorize.title",{appName:y},r),scan:o("storage.spaces.authorize.scan",{appName:y},r),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:o("storage.spaces.authorize.success")})},onClose:()=>{w(U=>({...U,open:!1}))}}),{data:l,loading:A}=Ye(async()=>s?Ce(M):!0,{refreshDeps:[s,M,C==null?void 0:C.open,b]}),S=s&&l,R=s&&!b&&l&&!(t!=null&&t.loading),F=s&&b&&l,O=s&&!l&&!A&&!b,P=async()=>{if(await Ce(t==null?void 0:t.endpoint)){await c.configBlocklet({input:{did:[j.meta.did],configs:[{key:$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),J(),I.success(o("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""}));return}w(Q=>({...Q,open:!0,prefix:Z(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:ie.create({baseURL:Z(t.url,"space")}).get,extraParams:{appDid:k,appName:y,appDescription:f,scopes:g,appUrl:B,referrer:se,nodeDid:m,spaceDid:t.did}}))},Me=async(U,Q)=>{const oe=Q(U.endpoint),ze=G(oe),N=U.space?Q(U.space):{};if(t.did&&ze!==t.did){w(ne=>({...ne,open:!1})),I.error(o("storage.spaces.gateway.switch.failedForMismatchSpace",{name:N!=null&&N.name?N.name:""}));return}const Je={...t,name:N.name??"DID Space",did:N.did??G(oe),endpoint:oe};await D(Je),w(ne=>({...ne,open:!1}))},Ne=async()=>{try{if(b)return;T(!0),await a()}catch(U){console.error(U),I.error(U.message)}finally{T(!0)}};return v.useEffect(()=>{n!=null&&n.completed?((n==null?void 0:n.progress)===100?I.success(o("storage.spaces.backupSuccessfully")):(n==null?void 0:n.progress)===-1&&I.error(n==null?void 0:n.message),T(!1),n.progress=0,n.message=""):n.progress&&T(!0)},[n]),e.jsxs(kt,{style:{position:"relative"},children:[e.jsxs(u,{sx:{backgroundColor:s?"#F0FDFF":"inherit","&:hover":{backgroundColor:s?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px",...i,children:[e.jsx(u,{display:"flex",children:e.jsx(st,{alt:t.did,src:it(t.endpoint)})}),e.jsxs(u,{className:"spaces-info",display:"flex",flexGrow:(!h||!F)&&1,minWidth:"180px",flexDirection:F?"row":"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[e.jsxs(u,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[e.jsx(x,{color:s?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:t.name}),S&&e.jsx(je,{label:e.jsxs(e.Fragment,{children:[e.jsx(Te,{style:{marginRight:"4px"}}),o("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}}),O&&e.jsx(je,{label:e.jsxs(e.Fragment,{children:[e.jsx(we,{style:{marginRight:"4px"}}),o("storage.spaces.disconnected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}})]}),e.jsx(u,{className:"spaces-address",display:F?"none":"flex",color:"#9397A1",marginTop:"8px",children:e.jsx(x,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:t.did&&e.jsx(pt,{copyable:!1,size:14,compact:!0,responsive:!1,did:t.did})})})]}),e.jsxs(u,{className:"spaces-backup",display:"flex",alignItems:"center",flex:h&&F&&1,children:[R&&e.jsxs(u,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:[e.jsx(W,{variant:"contained",size:"small",onClick:Ne,children:o("storage.spaces.strategy.backupNow")}),ut&&e.jsx(ke,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:e.jsx(x,{sx:{marginRight:"8px",fontSize:"16px"},children:e.jsx("span",{children:o("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),F&&e.jsxs(u,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",minWidth:!h&&"640px",marginLeft:h&&"16px",width:h&&"360px",marginRight:"auto",alignSelf:"flex-end",children:[e.jsx(x,{color:"primary",children:n==null?void 0:n.message}),e.jsxs(u,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[e.jsx(u,{sx:{width:"100%",mr:1},children:e.jsx(qe,{color:"primary",variant:"determinate",value:n==null?void 0:n.progress})}),e.jsx(u,{sx:{maxWidth:"100%"},children:e.jsxs(x,{variant:"body2",color:"text.secondary",children:[n==null?void 0:n.progress,"%"]})})]})]}),O&&e.jsx(u,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:e.jsx(W,{color:"error",variant:"contained",size:"small",onClick:P,children:o("storage.spaces.disconnected.reconnectNow")})}),e.jsx(fe,{sx:{marginLeft:"16px",marginRight:"16px",alignItems:"flex-end",justifyItems:"flex-end"},spaceGateway:t,connected:s,onDelete:d,onConnect:P,enableSwitchToSpace:(n==null?void 0:n.completed)||de.isEmpty(n==null?void 0:n.message),backupInProgress:F})]})]}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:C.prefix,open:C.open,popup:!0,action:C.action,baseUrl:C.baseUrl,checkFn:C.checkFn,onSuccess:Me,onClose:C.onClose,checkTimeout:C.checkTimeout,extraParams:C.extraParams,messages:C.messages,locale:r},"get-endpoint"),e.jsx(u,{className:`selected-container ${s?"selected":""}`,children:e.jsx(_e,{className:"selected-icon"})})]})}xe.propTypes={spaceGateway:p.shape({did:p.string.isRequired,name:p.string.isRequired,url:p.string.isRequired,endpoint:p.string.isRequired,protected:p.bool,loading:p.bool}).isRequired,connected:p.bool.isRequired,progress:p.any.isRequired,onDelete:p.func,onBackupNow:p.func};xe.defaultProps={onDelete:()=>{},onBackupNow:()=>{}};const kt=ve(u)`
|
|
1
|
+
import{aV as Y,aM as ce,u as E,r as v,eM as Ze,c1 as ie,c as Z,f9 as Pe,j as e,T as x,B as u,I as re,ap as Qe,a1 as W,l as q,b8 as de,q as I,P as p,Z as ve,a0 as He,go as Ve,X as _,Y as $,aQ as V,f8 as Ke,az as Xe,aO as We,$ as Ge,O as Ye,be as je,bX as qe,cr as _e,a9 as $e,E as L,bf as H,a as et,gp as tt}from"./index-BHVmBQ8E.js";import{S as ye}from"./index-BuvljqqC.js";import"./api-BP-akdsb.js";import{u as Ie,P as st}from"./use-blocklet-info-for-connect-did-spaces-3u6OI24d.js";import{e as G,f as Ae,h as ot,i as Se,j as nt,k as at,l as Ce,d as it}from"./spaces-Cp3qdjuQ.js";import{g as z}from"./dashboard-B4ToB_WX.js";import{D as rt,f as le}from"./format-error-DZ98jGc_.js";import{T as lt}from"./TextField-B0tdvs5D.js";import{A as ct}from"./Alert-DjdB6kJi.js";import{I as dt}from"./index-Cb2I5Pnm.js";import{E as Be}from"./Link-29c93vgL.js";import{W as pt}from"./did-address-Dm6G9Pz0.js";import{S as ke}from"./switch-control-B8e0yzux.js";import{d as mt}from"./MoreVert-Yxhg1I2d.js";import{d as ht}from"./DeleteOutline-CePnDmzu.js";import{L as K,a as X}from"./ListItemText-DzuIoJgM.js";import{e as ut}from"./mode-B2dWMeTO.js";import{T as ae}from"./index-txKLyozl.js";import{D as ft}from"./index-DPzyMEVE.js";import"./ExpandMore-MF6JMWUJ.js";import"./ButtonGroup-B2OCm4w2.js";import"./CloseOutlined-CyTE8SBm.js";import"./index-Dbd8X1MQ.js";import"./index-BTHSgca3.js";import"./useLocalStorage-CyHzuw0V.js";import"./confirm-WbbThheQ.js";import"./Delete-BJX_VOZK.js";import"./PlayArrow-BnDxNqxv.js";import"./RadioGroup-CKSypMzt.js";import"./FormControlLabel-CSgQzD8H.js";import"./useFormControl-CIM987QD.js";import"./FormGroup-Dg7paSKn.js";import"./Avatar-B2aqlUr4.js";import"./useSlot-BXs-_Etv.js";import"./session-C_q17DqM.js";import"./permission-D5QEfwx7.js";import"./useAsync-SsrsgChA.js";import"./useSetState-BTrtc5bD.js";import"./fallback-DV2p3NP7.js";import"./index-CU9bXzIx.js";import"./Toolbar-DDP1Q2zI.js";import"./Hidden-DwnJ4iUH.js";import"./MoreHoriz-DpzaIBa1.js";import"./index-B-KhRlcq.js";import"./selector-C_Cr9H0Y.js";import"./FormControl-C7YkaJ_C.js";import"./InputLabel-B3K-wjtt.js";import"./Select-Cgn_SK4j.js";import"./index-CEQ26NUj.js";import"./FilterList-D2fArxx7.js";import"./toPropertyKey-hKuLU48H.js";import"./LastPage-CxpvA1Xh.js";import"./index-D5vdosR6.js";import"./redux-DfMVEh8C.js";import"./Search-cf0osNnP.js";import"./index-ev1wxRtJ.js";function ee({...t}){const{blocklet:s}=Y(),{info:d}=ce(),{t:a,locale:i}=E(),[h,o]=v.useState(""),[r,j]=v.useState(!1),[c,m]=v.useState(!1),[k,y]=v.useState(""),f=Ie({blocklet:s}),g=Ze(d),{spaceGateways:B,addSpaceGateway:se}=z(),[D,M]=v.useState({open:!1,action:"connect-to-did-spaces",checkTimeout:1e3*300,checkFn:ie.create({baseURL:Z(window.location.origin,Pe())}).get,messages:{title:a("storage.spaces.provideNFT.title",{appName:f.appName},i),scan:a("storage.spaces.provideNFT.scan",{appName:f.appName},i),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:a("storage.spaces.provideNFT.success")})},onClose:()=>{M(l=>({...l,open:!1}))}}),[n,J]=v.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:a("storage.spaces.authorize.title",{appName:f.appName},i),scan:a("storage.spaces.authorize.scan",{appName:f.appName},i),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:a("storage.spaces.authorize.success")})},onClose:()=>{J(l=>({...l,open:!1}))}}),b=async({endpoint:l,name:A,did:S})=>{const R=await Ae(l);if(!await Se(R)){I.error(a("storage.spaces.gateway.add.invalidUrl"));return}if(B.some(P=>P.endpoint===l)){I.error(a("storage.spaces.gateway.add.duplicate",{name:A}));return}const O={name:A,did:S,url:R,endpoint:l};await se(O,l),I.success(a("storage.spaces.connectedWithName",{name:(O==null?void 0:O.name)??"DID Spaces"}))},T=async(l,A)=>{try{if(!de.isEmpty(l.spaceGateway))await b(A(l.spaceGateway));else{const S=A(l.endpoint),R=l.space?A(l.space):{};await b({endpoint:S,did:G(S),name:"DID Space",...R})}J(S=>({...S,open:!1})),o(null),M(S=>({...S,open:!1}))}catch(S){console.error(S),I.error(le(S))}},C=()=>{M(l=>({...l,open:!0,extraParams:{appPid:s.appPid,appName:f.appName,appDescription:f.appDescription,scopes:f.scopes,appUrl:f.appUrl,referrer:f.referrer,nodeDid:d.did}}))},w=async()=>{try{j(!0);const l=await Ae(h),A=ot(l),S=new URL(l).searchParams.get("spaceDid");if(!await Se(A))throw new Error(a("storage.spaces.gateway.add.invalidUrl"));J(R=>({...R,open:!0,prefix:Z(A,"space/api/did"),baseUrl:new URL(A).origin,checkFn:ie.create({baseURL:Z(A,"space")}).get,extraParams:{appDid:f.appDid,appName:f.appName,appDescription:f.appDescription,scopes:f.scopes,appUrl:f.appUrl,referrer:f.referrer,nodeDid:d.did,spaceDid:S}})),m(!1)}catch(l){const A=`${a("storage.spaces.gateway.add.failed",i)}: ${le(l)}`;y(A)}finally{j(!1)}};return e.jsxs(u,{children:[e.jsx(ye,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:C,menu:[e.jsx(ye.Item,{sx:{textTransform:"none"},onClick:()=>m(!0),size:"small",...t,children:a("storage.spaces.connect.useSpaceGateway")},"1")],children:e.jsx(x,{sx:{fontWeight:"bold",textTransform:"none"},children:a("storage.spaces.connect.useWallet")})}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:D.prefix,open:D.open,popup:!0,action:D.action,webWalletUrl:g,baseUrl:D.baseUrl,checkFn:D.checkFn,onSuccess:T,onClose:D.onClose,checkTimeout:D.checkTimeout,extraParams:D.extraParams,messages:D.messages,locale:i}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:n.prefix,open:n.open,popup:!0,action:n.action,baseUrl:n.baseUrl,checkFn:n.checkFn,onSuccess:T,onClose:n.onClose,checkTimeout:n.checkTimeout,extraParams:n.extraParams,messages:n.messages,locale:i}),e.jsxs(Qe,{title:a("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:c,onClose:()=>m(!1),PaperProps:{style:{minHeight:"auto"}},actions:e.jsxs(e.Fragment,{children:[e.jsx(W,{onClick:l=>{l.stopPropagation(),m(!1)},color:"inherit",children:a("common.cancel")}),e.jsxs(W,{onClick:w,color:"primary",disabled:r||!h,variant:"contained",autoFocus:!0,children:[r&&e.jsx(q,{size:16}),a("common.confirm")]})]}),children:[e.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:e.jsx(rt,{component:"div",children:e.jsx(x,{component:"div",children:e.jsx(lt,{label:a("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:h,onChange:l=>{y(null),o(l.target.value)},disabled:r,onKeyPress:async l=>{l.key==="Enter"&&await w()},autoFocus:!0})})})}),!!k&&e.jsx(ct,{severity:"error",style:{width:"100%"},children:k})]})]})}ee.propTypes={};ee.defaultProps={};function te({blocklet:t,...s}){const{t:d}=v.useContext(He);if(!t.diskInfo)return e.jsx(x,{children:d("blocklet.diskInfo.empty")});const a=(o,r,j)=>e.jsxs(x,{children:[j?e.jsx(Be,{style:{cursor:"pointer"},onClick:j,underline:"hover",children:o}):o," ",e.jsx("strong",{children:r?Ve(r):"empty"})]}),i=t.environments.reduce((o,r)=>(o[r.key]=r.value,o),{}),h=[{key:"appDir",name:d("blocklet.diskInfo.appDir"),value:a(i.BLOCKLET_APP_DIR,t.diskInfo.app)},{key:"dataDir",name:d("blocklet.diskInfo.dataDir"),value:a(i.BLOCKLET_DATA_DIR,t.diskInfo.data)},{key:"logDir",name:d("blocklet.diskInfo.logDir"),value:a(i.BLOCKLET_LOG_DIR,t.diskInfo.log)},{key:"cacheDir",name:d("blocklet.diskInfo.cacheDir"),value:a(i.BLOCKLET_CACHE_DIR,t.diskInfo.cache)}];return e.jsx(xt,{component:"div",...s,children:h.map(o=>e.jsx(dt,{valueComponent:"div",nameWidth:120,name:o.name,children:o.value},o.key))})}te.propTypes={blocklet:p.object.isRequired};te.defaultProps={};const xt=ve(x)``;var De=function(s){return e.jsxs("svg",{...s,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMsHUisZiXU8k3bVSTrPcHsKEEg8gV/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3MffnLwiHnNH7IoyER5VEI6S4Um++uKyho0BwmD+1rA90yarpO4ZpjLgs8+BTUfU9w+gkwEi6ftxqyB9Wt6IBstE0E8kxJLeKaVhNA/uEwIslv1JmRwcSzAo+URPCF5M8AGzEF8yG+QVBFl53FqhfYqd7/PM6AmJouW4cVge9pZuMJga2NQH918Sp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vLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};De.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Ue(){const{t}=E(),{blocklet:s}=Y();return e.jsxs(u,{children:[e.jsxs(u,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(De,{style:{width:200,height:250}}),e.jsx(x,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(ee,{})]}),e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(te,{blocklet:s})]})}Ue.propTypes={};var pe={},gt=$;Object.defineProperty(pe,"__esModule",{value:!0});var be=pe.default=void 0,jt=gt(_()),yt=e;be=pe.default=(0,jt.default)((0,yt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var me={},At=$;Object.defineProperty(me,"__esModule",{value:!0});var Re=me.default=void 0,St=At(_()),Ct=e;Re=me.default=(0,St.default)((0,Ct.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var he={},vt=$;Object.defineProperty(he,"__esModule",{value:!0});var Ee=he.default=void 0,It=vt(_()),Bt=e;Ee=he.default=(0,It.default)((0,Bt.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function ue({spaceGateway:t,onDelete:s}){const{t:d}=E(),[a,i]=v.useState(!1),[h,o]=v.useState(!1),r=(c,m)=>{c==null||c.preventDefault(),c==null||c.stopPropagation(),i(m)},j=async c=>{try{c==null||c.stopPropagation(),o(!0),await s(t),i(!1)}catch(m){console.error(m),I.error(`${d("storage.space.gateway.delete.failed")}: ${le(m)}`)}finally{o(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(V,{color:"red",onClick:c=>r(c,!0),children:[e.jsx(K,{style:{minWidth:24,color:"red"},children:e.jsx(ht,{fontSize:"small"})}),e.jsx(X,{style:{color:"red"},children:d("common.delete")})]}),e.jsx(Ke,{title:d("common.delConfirmDescription",{data:`${t==null?void 0:t.name}`}),open:a,confirmButton:{text:d("common.confirm"),props:{variant:"contained",color:"error",loading:h}},cancelButton:{text:d("common.cancel"),props:{variant:"contained",color:"primary"},loading:h},onConfirm:j,onCancel:c=>r(c,!1)})]})}ue.propTypes={onDelete:p.func,spaceGateway:p.shape({name:p.string.isRequired,url:p.string.isRequired,protected:p.bool}).isRequired};ue.defaultProps={onDelete:()=>{}};function fe({spaceGateway:t,connected:s,onDelete:d,onConnect:a,enableSwitchToSpace:i,backupInProgress:h,...o}){const[r,j]=v.useState(null),{t:c}=E(),[m,k]=v.useState(!1),y=(g,B)=>{g.stopPropagation(),g.preventDefault(),j(B&&g.currentTarget)},f=async g=>{try{k(!0),y(g,!1),await a(t)}catch(B){console.error(B),I.error(B.message)}finally{k(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Xe,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:g=>y(g,!0),size:"small",...o,children:m||t!=null&&t.loading?e.jsx(q,{size:"24px"}):e.jsx(mt,{})}),e.jsxs(We,{id:"simple-menu",anchorEl:r,keepMounted:!0,open:!!r,onClose:g=>y(g,!1),children:[e.jsxs(V,{onClick:g=>{y(g,!1),window.open(t.endpoint?nt(t.endpoint):t.url)},children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(be,{fontSize:"small"})}),e.jsx(X,{children:c("common.open")})]}),e.jsxs(V,{onClick:g=>{y(g,!1),window.open(at(t.endpoint))},children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(Ee,{fontSize:"small"})}),e.jsx(X,{children:c("storage.spaces.strategy.viewBackupFiles")})]}),!s&&i&&e.jsxs(V,{onClick:f,children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(Re,{fontSize:"small"})}),e.jsx(X,{children:c("storage.spaces.connect.switchToSpace")})]}),!h&&e.jsx(ue,{spaceGateway:t,onDelete:d})]})]})}fe.propTypes={spaceGateway:p.shape({name:p.string.isRequired,url:p.string.isRequired,protected:p.bool,endpoint:p.string.isRequired,loading:p.bool}).isRequired,connected:p.bool.isRequired,enableSwitchToSpace:p.bool,onDelete:p.func,onConnect:p.func,backupInProgress:p.bool};fe.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};var Te=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};Te.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var we=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})})};we.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xe({spaceGateway:t,connected:s,onDelete:d,onBackupNow:a,...i}){const h=Ge(U=>U.breakpoints.down("md")),{t:o,locale:r}=E(),{blocklet:j}=Y(),{api:c,info:{did:m}}=ce(),{appDid:k,appName:y,appDescription:f,scopes:g,appUrl:B,referrer:se}=Ie({blocklet:j}),{updateSpaceGateway:D,backupEndpoint:M,backupProgress:n,refreshBackupEndpoint:J}=z(),[b,T]=v.useState(!1),[C,w]=v.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:o("storage.spaces.authorize.title",{appName:y},r),scan:o("storage.spaces.authorize.scan",{appName:y},r),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:o("storage.spaces.authorize.success")})},onClose:()=>{w(U=>({...U,open:!1}))}}),{data:l,loading:A}=Ye(async()=>s?Ce(M):!0,{refreshDeps:[s,M,C==null?void 0:C.open,b]}),S=s&&l,R=s&&!b&&l&&!(t!=null&&t.loading),F=s&&b&&l,O=s&&!l&&!A&&!b,P=async()=>{if(await Ce(t==null?void 0:t.endpoint)){await c.configBlocklet({input:{did:[j.meta.did],configs:[{key:$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),J(),I.success(o("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""}));return}w(Q=>({...Q,open:!0,prefix:Z(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:ie.create({baseURL:Z(t.url,"space")}).get,extraParams:{appDid:k,appName:y,appDescription:f,scopes:g,appUrl:B,referrer:se,nodeDid:m,spaceDid:t.did}}))},Me=async(U,Q)=>{const oe=Q(U.endpoint),ze=G(oe),N=U.space?Q(U.space):{};if(t.did&&ze!==t.did){w(ne=>({...ne,open:!1})),I.error(o("storage.spaces.gateway.switch.failedForMismatchSpace",{name:N!=null&&N.name?N.name:""}));return}const Je={...t,name:N.name??"DID Space",did:N.did??G(oe),endpoint:oe};await D(Je),w(ne=>({...ne,open:!1}))},Ne=async()=>{try{if(b)return;T(!0),await a()}catch(U){console.error(U),I.error(U.message)}finally{T(!0)}};return v.useEffect(()=>{n!=null&&n.completed?((n==null?void 0:n.progress)===100?I.success(o("storage.spaces.backupSuccessfully")):(n==null?void 0:n.progress)===-1&&I.error(n==null?void 0:n.message),T(!1),n.progress=0,n.message=""):n.progress&&T(!0)},[n]),e.jsxs(kt,{style:{position:"relative"},children:[e.jsxs(u,{sx:{backgroundColor:s?"#F0FDFF":"inherit","&:hover":{backgroundColor:s?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px",...i,children:[e.jsx(u,{display:"flex",children:e.jsx(st,{alt:t.did,src:it(t.endpoint)})}),e.jsxs(u,{className:"spaces-info",display:"flex",flexGrow:(!h||!F)&&1,minWidth:"180px",flexDirection:F?"row":"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[e.jsxs(u,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[e.jsx(x,{color:s?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:t.name}),S&&e.jsx(je,{label:e.jsxs(e.Fragment,{children:[e.jsx(Te,{style:{marginRight:"4px"}}),o("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}}),O&&e.jsx(je,{label:e.jsxs(e.Fragment,{children:[e.jsx(we,{style:{marginRight:"4px"}}),o("storage.spaces.disconnected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}})]}),e.jsx(u,{className:"spaces-address",display:F?"none":"flex",color:"#9397A1",marginTop:"8px",children:e.jsx(x,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:t.did&&e.jsx(pt,{copyable:!1,size:14,compact:!0,responsive:!1,did:t.did})})})]}),e.jsxs(u,{className:"spaces-backup",display:"flex",alignItems:"center",flex:h&&F&&1,children:[R&&e.jsxs(u,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:[e.jsx(W,{variant:"contained",size:"small",onClick:Ne,children:o("storage.spaces.strategy.backupNow")}),ut&&e.jsx(ke,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:e.jsx(x,{sx:{marginRight:"8px",fontSize:"16px"},children:e.jsx("span",{children:o("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),F&&e.jsxs(u,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",minWidth:!h&&"640px",marginLeft:h&&"16px",width:h&&"360px",marginRight:"auto",alignSelf:"flex-end",children:[e.jsx(x,{color:"primary",children:n==null?void 0:n.message}),e.jsxs(u,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[e.jsx(u,{sx:{width:"100%",mr:1},children:e.jsx(qe,{color:"primary",variant:"determinate",value:n==null?void 0:n.progress})}),e.jsx(u,{sx:{maxWidth:"100%"},children:e.jsxs(x,{variant:"body2",color:"text.secondary",children:[n==null?void 0:n.progress,"%"]})})]})]}),O&&e.jsx(u,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:e.jsx(W,{color:"error",variant:"contained",size:"small",onClick:P,children:o("storage.spaces.disconnected.reconnectNow")})}),e.jsx(fe,{sx:{marginLeft:"16px",marginRight:"16px",alignItems:"flex-end",justifyItems:"flex-end"},spaceGateway:t,connected:s,onDelete:d,onConnect:P,enableSwitchToSpace:(n==null?void 0:n.completed)||de.isEmpty(n==null?void 0:n.message),backupInProgress:F})]})]}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:C.prefix,open:C.open,popup:!0,action:C.action,baseUrl:C.baseUrl,checkFn:C.checkFn,onSuccess:Me,onClose:C.onClose,checkTimeout:C.checkTimeout,extraParams:C.extraParams,messages:C.messages,locale:r},"get-endpoint"),e.jsx(u,{className:`selected-container ${s?"selected":""}`,children:e.jsx(_e,{className:"selected-icon"})})]})}xe.propTypes={spaceGateway:p.shape({did:p.string.isRequired,name:p.string.isRequired,url:p.string.isRequired,endpoint:p.string.isRequired,protected:p.bool,loading:p.bool}).isRequired,connected:p.bool.isRequired,progress:p.any.isRequired,onDelete:p.func,onBackupNow:p.func};xe.defaultProps={onDelete:()=>{},onBackupNow:()=>{}};const kt=ve(u)`
|
|
2
2
|
.selected-container {
|
|
3
3
|
position: absolute;
|
|
4
4
|
right: 0px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{gj as W,r as P,gk as j,V as x,eC as J,gl as S,gm as $,R as B,by as Q,dy as U}from"./index-
|
|
1
|
+
import{gj as W,r as P,gk as j,V as x,eC as J,gl as S,gm as $,R as B,by as Q,dy as U}from"./index-BHVmBQ8E.js";var X=function(i,e){return i===void 0&&(i=[]),e===void 0&&(e=[]),W(i,e)},Y=function(i,e,r){var n=P.useRef(),t=P.useRef(0);X(e,n.current)||(n.current=e,t.current+=1),j(i,[t.current],r)},Z=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator==null?void 0:navigator.platform:""),D={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:Z?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},R={ctrl:function(i){return i.ctrlKey},shift:function(i){return i.shiftKey},alt:function(i){return i.altKey},meta:function(i){return i.type==="keyup"?D.meta.includes(i.keyCode):i.metaKey}};function G(i){return $(i)||B(i)}function p(i){var e=Object.keys(R).reduce(function(r,n){return R[n](i)?r+1:r},0);return[16,17,18,91,92].includes(i.keyCode)?e:e+1}function q(i,e,r){var n,t;if(!i.key)return!1;if(B(e))return i.keyCode===e?e:!1;var l=e.split("."),a=0;try{for(var f=S(l),o=f.next();!o.done;o=f.next()){var c=o.value,s=R[c],u=D[c.toLowerCase()];(s&&s(i)||u&&u===i.keyCode)&&a++}}catch(b){n={error:b}}finally{try{o&&!o.done&&(t=f.return)&&t.call(f)}finally{if(n)throw n.error}}return r?a===l.length&&p(i)===l.length?e:!1:a===l.length?e:!1}function N(i,e){return Q(i)?i:G(i)?function(r){return q(r,i,e)}:Array.isArray(i)?function(r){return i.find(function(n){return q(r,n,e)})}:function(){return!!i}}var O=["keydown"];function _(i,e,r){var n=r||{},t=n.events,l=t===void 0?O:t,a=n.target,f=n.exactMatch,o=f===void 0?!1:f,c=n.useCapture,s=c===void 0?!1:c,u=x(e),b=x(i);Y(function(){var k,m,L,v=J(a,window);if(v){var T=function(g){var C,E=N(b.current,o),y=E(g),h=G(y)?y:g.key;if(y)return(C=u.current)===null||C===void 0?void 0:C.call(u,g,h)};try{for(var K=S(l),A=K.next();!A.done;A=K.next()){var H=A.value;(L=v==null?void 0:v.addEventListener)===null||L===void 0||L.call(v,H,T,s)}}catch(g){k={error:g}}finally{try{A&&!A.done&&(m=K.return)&&m.call(K)}finally{if(k)throw k.error}}return function(){var g,C,E;try{for(var y=S(l),h=y.next();!h.done;h=y.next()){var M=h.value;(E=v==null?void 0:v.removeEventListener)===null||E===void 0||E.call(v,M,T,s)}}catch(V){g={error:V}}finally{try{h&&!h.done&&(C=y.return)&&C.call(y)}finally{if(g)throw g.error}}}}},[l],a)}function d(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}function z(i,e){for(var r="",n=0,t=-1,l=0,a,f=0;f<=i.length;++f){if(f<i.length)a=i.charCodeAt(f);else{if(a===47)break;a=47}if(a===47){if(!(t===f-1||l===1))if(t!==f-1&&l===2){if(r.length<2||n!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var o=r.lastIndexOf("/");if(o!==r.length-1){o===-1?(r="",n=0):(r=r.slice(0,o),n=r.length-1-r.lastIndexOf("/")),t=f,l=0;continue}}else if(r.length===2||r.length===1){r="",n=0,t=f,l=0;continue}}e&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+i.slice(t+1,f):r=i.slice(t+1,f),n=f-t-1;t=f,l=0}else a===46&&l!==-1?++l:l=-1}return r}function I(i,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+i+n:n}var w={resolve:function(){for(var e="",r=!1,n,t=arguments.length-1;t>=-1&&!r;t--){var l;t>=0?l=arguments[t]:(n===void 0&&(n=U.cwd()),l=n),d(l),l.length!==0&&(e=l+"/"+e,r=l.charCodeAt(0)===47)}return e=z(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(d(e),e.length===0)return".";var r=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47;return e=z(e,!r),e.length===0&&!r&&(e="."),e.length>0&&n&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return d(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,r=0;r<arguments.length;++r){var n=arguments[r];d(n),n.length>0&&(e===void 0?e=n:e+="/"+n)}return e===void 0?".":w.normalize(e)},relative:function(e,r){if(d(e),d(r),e===r||(e=w.resolve(e),r=w.resolve(r),e===r))return"";for(var n=1;n<e.length&&e.charCodeAt(n)===47;++n);for(var t=e.length,l=t-n,a=1;a<r.length&&r.charCodeAt(a)===47;++a);for(var f=r.length,o=f-a,c=l<o?l:o,s=-1,u=0;u<=c;++u){if(u===c){if(o>c){if(r.charCodeAt(a+u)===47)return r.slice(a+u+1);if(u===0)return r.slice(a+u)}else l>c&&(e.charCodeAt(n+u)===47?s=u:u===0&&(s=0));break}var b=e.charCodeAt(n+u),k=r.charCodeAt(a+u);if(b!==k)break;b===47&&(s=u)}var m="";for(u=n+s+1;u<=t;++u)(u===t||e.charCodeAt(u)===47)&&(m.length===0?m+="..":m+="/..");return m.length>0?m+r.slice(a+s):(a+=s,r.charCodeAt(a)===47&&++a,r.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(d(e),e.length===0)return".";for(var r=e.charCodeAt(0),n=r===47,t=-1,l=!0,a=e.length-1;a>=1;--a)if(r=e.charCodeAt(a),r===47){if(!l){t=a;break}}else l=!1;return t===-1?n?"/":".":n&&t===1?"//":e.slice(0,t)},basename:function(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');d(e);var n=0,t=-1,l=!0,a;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var f=r.length-1,o=-1;for(a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(c===47){if(!l){n=a+1;break}}else o===-1&&(l=!1,o=a+1),f>=0&&(c===r.charCodeAt(f)?--f===-1&&(t=a):(f=-1,t=o))}return n===t?t=o:t===-1&&(t=e.length),e.slice(n,t)}else{for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===47){if(!l){n=a+1;break}}else t===-1&&(l=!1,t=a+1);return t===-1?"":e.slice(n,t)}},extname:function(e){d(e);for(var r=-1,n=0,t=-1,l=!0,a=0,f=e.length-1;f>=0;--f){var o=e.charCodeAt(f);if(o===47){if(!l){n=f+1;break}continue}t===-1&&(l=!1,t=f+1),o===46?r===-1?r=f:a!==1&&(a=1):r!==-1&&(a=-1)}return r===-1||t===-1||a===0||a===1&&r===t-1&&r===n+1?"":e.slice(r,t)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return I("/",e)},parse:function(e){d(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var n=e.charCodeAt(0),t=n===47,l;t?(r.root="/",l=1):l=0;for(var a=-1,f=0,o=-1,c=!0,s=e.length-1,u=0;s>=l;--s){if(n=e.charCodeAt(s),n===47){if(!c){f=s+1;break}continue}o===-1&&(c=!1,o=s+1),n===46?a===-1?a=s:u!==1&&(u=1):a!==-1&&(u=-1)}return a===-1||o===-1||u===0||u===1&&a===o-1&&a===f+1?o!==-1&&(f===0&&t?r.base=r.name=e.slice(1,o):r.base=r.name=e.slice(f,o)):(f===0&&t?(r.name=e.slice(1,a),r.base=e.slice(1,o)):(r.name=e.slice(f,a),r.base=e.slice(f,o)),r.ext=e.slice(a,o)),f>0?r.dir=e.slice(0,f-1):t&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};w.posix=w;var ee=w;export{ee as p,_ as u};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__fileDeps=["assets/react-
|
|
2
|
-
import{ao as K0,j as o,aD as re,cE as a0,aG as B,fl as O1,aF as me,aB as Ne,aC as De,T as K,r as R,aK as _e,aH as c0,aI as Be,aJ as Ee,cK as X0,fm as We,X as Se,Y as ke,B as z,l as s1,P as f,$ as Ae,E as U,e as i1,u as le,aM as je,aV as Me,bx as Ge,a1 as Fe,L as de,bG as d0,a as fe,az as se,I as J0,q,Z as ie,dn as Q0,a9 as ge,c as ue,F as Y0,bU as a1,ce as u0,cz as Z0,cI as Te,cJ as p0,bj as e2,cZ as t2,cD as $e,bB as qe,c1 as Ze,f6 as o2,b as ne,bm as l2,dr as r2,ae as h0,bn as n2,ck as s2,aQ as $1,aP as i2,a2 as f0,bk as a2,eX as ye,fn as F1,cQ as c2,ap as d2,ay as u2,al as p2,am as Xe}from"./index-CHSnAsQ1.js";import{d as c1}from"./Add-CG-F3Tpq.js";import{d as h2}from"./AddBox-CCE1buV8.js";import{d as x0}from"./Delete-DJZzf2v3.js";import{d as f2}from"./Error-CzevJZgV.js";import{D as d1}from"./index-DpC9sww1.js";import{T as m0,b as x2}from"./index-0Kwb6jmK.js";import{C as u1}from"./confirm-DcZkK6Pc.js";import{u as Ke}from"./session-DFjt4_rn.js";import{W as q1}from"./did-address-1pTl5ZJp.js";import{B as p1,d as m2}from"./ChevronRight-B1-v0rVj.js";import{S as xe}from"./shorten-label--VZVYLZC.js";import{A as v0}from"./Avatar-BVTgZMZu.js";import{d as v2}from"./Download-CZGyacWn.js";import{d as g2}from"./QuestionMarkCircle-50eq7smQ.js";import{b as b2,c as U1,T as j2}from"./index-B8_eoYBV.js";import{_ as Ce}from"./useSetState-Bw-0RwWQ.js";import{c as h1}from"./index-C82L-zg9.js";import{C as e1,F as t1,S as w2}from"./FormControlLabel-BDYHQJ8F.js";import{A as g0}from"./Alert-cwZghN5o.js";import{p as b0}from"./index-HqFqdQ4r.js";import"./api-CK31hCQN.js";import{i as R2}from"./index-vwRhQ5RS.js";import{d as C2}from"./ExpandMore-Vsh2QVwZ.js";import{d as y2}from"./OpenInNew-DYXjNtnC.js";import{d as z2}from"./DeleteOutline-UAdOMkx7.js";import{d as S2}from"./ArrowDropDown-DpHnrXJX.js";import{f as Ve}from"./format-error-DSoyPyVx.js";import{c as k2,A as j0,u as M2,S as I2}from"./item-D_tapEj7.js";import{B as L2}from"./ButtonGroup-Cf877fOo.js";import{T as ze}from"./TextField-DVioGsc-.js";import{M as f1}from"./InputAdornment-C-wpGP7M.js";import{d as P2}from"./Launch-CahVoyyw.js";import{L as T2}from"./MoreVert-Dd_rZHl1.js";import{a as V2}from"./ListItemText-CbVOTWQ3.js";import{C as N2}from"./click-to-copy-C0t70-Pv.js";import{M as D2}from"./index-knmEO6mr.js";import{r as _2}from"./index-NRVaJz9f.js";import{d as B2}from"./Done-CIjx7jUD.js";import{c as w0,d as R0,b as E2,S as A2,a as H2}from"./Stepper-DJQ-xHUp.js";import{R as O2,a as W1}from"./RadioGroup-DImJzaoP.js";import"./FilterList-Cy1sL14k.js";import"./toPropertyKey-hKuLU48H.js";import"./FormControl-B_Do5Nt6.js";import"./useFormControl-oAKl9UVb.js";import"./FormGroup-Bk12j31H.js";import"./InputLabel-4YX1ylv6.js";import"./Select-D6CeNImJ.js";import"./LastPage-BfloM2Wq.js";import"./Toolbar-CRxjvb2_.js";import"./index-BaC0Haea.js";import"./redux-DfSDCKtt.js";import"./Search-CxTEsXhT.js";import"./index-DJWtIeK5.js";import"./Link-D9C6v4KL.js";import"./useSlot-Cwz6OM5B.js";import"./jss-plugin-props-sort.esm-D277VpMG.js";const $2=K0(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"),F2=["slots","slotProps"],q2=re(a0)(({theme:e})=>B({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":B({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":B({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:O1(e.palette.grey[200],.12)}:{backgroundColor:O1(e.palette.grey[600],.12)})})),U2=re($2)({width:24,height:16});function W2(e){const{slots:t={},slotProps:l={}}=e,n=me(e,F2),s=e;return o.jsx("li",{children:o.jsx(q2,B({focusRipple:!0},n,{ownerState:s,children:o.jsx(U2,B({as:t.CollapsedIcon,ownerState:s},l.collapsedIcon))}))})}function G2(e){return De("MuiBreadcrumbs",e)}const K2=Ne("MuiBreadcrumbs",["root","ol","li","separator"]),X2=K2,J2=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],Q2=e=>{const{classes:t}=e;return Ee({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},G2,t)},Y2=re(K,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${X2.li}`]:t.li},t.root]})({}),Z2=re("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),et=re("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function tt(e,t,l,n){return e.reduce((s,a,c)=>(c<e.length-1?s=s.concat(a,o.jsx(et,{"aria-hidden":!0,className:t,ownerState:n,children:l},`separator-${c}`)):s.push(a),s),[])}const ot=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiBreadcrumbs"}),{children:s,className:a,component:c="nav",slots:d={},slotProps:u={},expandText:h="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=n,i=me(n,J2),[m,w]=R.useState(!1),v=B({},n,{component:c,expanded:m,expandText:h,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=Q2(v),S=c0({elementType:d.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),V=R.useRef(null),T=k=>{const O=()=>{w(!0);const D=V.current.querySelector("a[href],button,[tabindex]");D&&D.focus()};return g+x>=k.length?k:[...k.slice(0,g),o.jsx(W2,{"aria-label":h,slots:{CollapsedIcon:d.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:O},"ellipsis"),...k.slice(k.length-x,k.length)]},I=R.Children.toArray(s).filter(k=>R.isValidElement(k)).map((k,O)=>o.jsx("li",{className:C.li,children:k},`child-${O}`));return o.jsx(Y2,B({ref:l,component:c,color:"text.secondary",className:Be(C.root,a),ownerState:v},i,{children:o.jsx(Z2,{className:C.ol,ref:V,ownerState:v,children:tt(m||y&&I.length<=y?I:T(I),C.separator,p,v)})}))}),C0=ot;function lt(e){return De("MuiStepButton",e)}const rt=Ne("MuiStepButton",["root","horizontal","vertical","touchRipple"]),G1=rt,nt=["children","className","icon","optional"],st=e=>{const{classes:t,orientation:l}=e;return Ee({root:["root",l],touchRipple:["touchRipple"]},lt,t)},it=re(a0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${G1.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>B({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${G1.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),at=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiStepButton"}),{children:s,className:a,icon:c,optional:d}=n,u=me(n,nt),{disabled:h,active:x}=R.useContext(w0),{orientation:g}=R.useContext(R0),y=B({},n,{orientation:g}),p=st(y),i={icon:c,optional:d},m=X0(s,["StepLabel"])?R.cloneElement(s,i):o.jsx(E2,B({},i,{children:s}));return o.jsx(it,B({focusRipple:!0,disabled:h,TouchRippleProps:{className:p.touchRipple},className:Be(p.root,a),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))}),ct=at;function dt(e){return De("MuiStepContent",e)}Ne("MuiStepContent",["root","last","transition"]);const ut=["children","className","TransitionComponent","transitionDuration","TransitionProps"],pt=e=>{const{classes:t,last:l}=e;return Ee({root:["root",l&&"last"],transition:["transition"]},dt,t)},ht=re("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>B({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"})),ft=re(We,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),xt=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiStepContent"}),{children:s,className:a,TransitionComponent:c=We,transitionDuration:d="auto",TransitionProps:u}=n,h=me(n,ut);R.useContext(R0);const{active:x,last:g,expanded:y}=R.useContext(w0),p=B({},n,{last:g}),i=pt(p);let m=d;return d==="auto"&&!c.muiSupportAuto&&(m=void 0),o.jsx(ht,B({className:Be(i.root,a),ref:l,ownerState:p},h,{children:o.jsx(ft,B({as:c,in:x||y,className:i.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:s}))}))}),mt=xt;var x1={},vt=ke;Object.defineProperty(x1,"__esModule",{value:!0});var y0=x1.default=void 0,gt=vt(Se()),bt=o;y0=x1.default=(0,gt.default)((0,bt.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 m1={},jt=ke;Object.defineProperty(m1,"__esModule",{value:!0});var z0=m1.default=void 0,wt=jt(Se()),Rt=o;z0=m1.default=(0,wt.default)((0,Rt.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 we({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(s1,{size:e})})}we.propTypes={size:f.number};we.defaultProps={size:24};function v1({did:e,projectId:t,title:l,logo:n,describe:s}){const c=`${`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${n}`,[d,u]=R.useState(!1),h=Ae(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:d?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(v0,{sx:{borderRadius:1},src:c}),o.jsxs(z,{children:[o.jsx(xe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:h?"primary.main":""},children:l||"/"}),o.jsx(xe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:h||d?"primary.main":"grey.700"},children:s||"/"})]})]})}v1.propTypes={projectId:f.string.isRequired,did:f.string.isRequired,title:f.string.isRequired,logo:f.string.isRequired,describe:f.string.isRequired};function g1({initUrl:e}){const t=i1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:n,locale:s}=le(),{api:a}=je(),{api:c}=Ke(),[d,u]=R.useState(!0),{blocklet:h}=Me(),[x,g]=R.useState(null),[y,p]=R.useState(!1),i=Ae(M=>M.breakpoints.down("xl")),{componentDid:m=""}=Ge(),[w,v]=R.useState(null),C=()=>{a.getProjects({input:{did:h.meta.did,componentDid:m,tenantScope:l}}).then(M=>{const L=(M==null?void 0:M.projects)||[];u(!1),v(L)}).catch(M=>{u(!1),q.error(M.message)})},S=()=>{t(`${U.UNOWNED_DID}/create/none`,{replace:!0})},V=M=>{g(M)},T=()=>{u(!1),p(!0)},I=()=>{p(!1),g(null)},k=M=>{q.error(M.message),p(!1),g(null)},O=M=>{if(!(M!=null&&M.deleted)){q.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!w&&d)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(we,{})});if(!w)return null;if(!w.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:n("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:n("blocklet.publish.createBlockletTip")}),o.jsx(Fe,{onClick:S,variant:"contained",children:n("blocklet.publish.createBlocklet")})]});const D=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:M=>{const L=w[M];return o.jsx(de,{to:`${L.id}`,children:o.jsx(v1,{did:h.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:M=>M?o.jsx(m0,{type:"success",children:M}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:M=>M?o.jsx(q1,{size:14,compact:!0,responsive:!1,did:M}):null}},i||m?null:{label:n("common.createdBy"),name:"createdBy",options:{customBodyRender:M=>M?o.jsx(q1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${M}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:M}):null}},i||m?null:{label:n("common.scope"),name:"componentDid",options:{customBodyRender:M=>{const L=(h.children||[]).find(E=>E.meta.did===M);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(p1,{size:14,blocklet:L,ancestors:[h]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},M):""}}},i||l?null:{label:n("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:M=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(xe,{children:M})})}},{label:n("common.updatedAt"),name:"updatedAt",options:{customBodyRender:M=>o.jsx(d0,{value:Number(M),locale:s})}},{label:n("common.actions"),name:"actions",options:{customBodyRenderLite:M=>{const L=w[M];return o.jsxs(z,{display:"flex",children:[o.jsx(de,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(fe,{title:n("blocklet.publish.createRelease"),placement:"top",children:o.jsx(se,{color:"primary","aria-label":"create",children:o.jsx(h2,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(fe,{title:n("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(se,{color:"secondary","aria-label":"create",children:o.jsx(de,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(y0,{sx:{fontSize:18}})})})}),o.jsx(fe,{title:n("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(se,{color:"primary","aria-label":"delete",onClick:()=>V(L),children:o.jsx(x0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),P=y?o.jsx(J0,{open:!0,popup:!0,onClose:I,action:"check-has-project-id",locale:s,checkFn:c.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:O,onError:k,extraParams:{projectId:x.id,did:h.meta.did,name:x.blockletTitle},messages:{title:n("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:n("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:n("blocklet.publish.deleteProject.confirm"),success:n("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Ct,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:n("common.blockletStudio")}),o.jsx(fe,{title:n("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(z0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(Fe,{onClick:S,variant:"contained",children:[o.jsx(c1,{style:{fontSize:"1.3em",marginRight:4}}),n("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(d1,{className:"main-table",locale:s,data:w,columns:D,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(u1,{title:`${n("common.delete")} ${x.blockletTitle}`,description:n("blocklet.publish.deleteProject.description"),confirm:n("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[n("blocklet.publish.deleteProject.tip1"),n("blocklet.publish.deleteProject.tip2"),n("blocklet.publish.deleteProject.tip3")].map(M=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(f2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(K,{component:"span",variant:"inherit",color:"text.secondary",children:M})]}))})}),P]})}g1.propTypes={initUrl:f.object};g1.defaultProps={initUrl:null};const Ct=ie(z)`
|
|
1
|
+
const __vite__fileDeps=["assets/react-DiBHU1pk.js","assets/index-BHVmBQ8E.js","assets/index-CCovGSMB.css","assets/index-Sq8Y5yqF.js","assets/preact.module-B1z5cdvs.js","assets/index-BxWvRO5-.js","assets/index-DxWLBhYd.js","assets/toUpper-BbUf7PTC.js","assets/index-D2Sq56Bc.js","assets/fallback-DV2p3NP7.js","assets/index-CU9bXzIx.js","assets/Toolbar-DDP1Q2zI.js","assets/Hidden-DwnJ4iUH.js","assets/MoreHoriz-DpzaIBa1.js","assets/ExpandMore-MF6JMWUJ.js","assets/index-B-KhRlcq.js","assets/MoreVert-Yxhg1I2d.js","assets/selector-C_Cr9H0Y.js","assets/Avatar-B2aqlUr4.js","assets/useSlot-BXs-_Etv.js","assets/resource-dialog-Dz_4-Jou.js","assets/use-mobile-BJKZGD1I.js","assets/OpenInNew-CyuaC2rt.js","assets/CloseOutlined-CyTE8SBm.js","assets/index-BTHSgca3.js","assets/index-ev1wxRtJ.js","assets/index-CEQ26NUj.js","assets/FormControlLabel-CSgQzD8H.js","assets/useFormControl-CIM987QD.js","assets/index-DPzyMEVE.js","assets/FilterList-D2fArxx7.js","assets/toPropertyKey-hKuLU48H.js","assets/FormControl-C7YkaJ_C.js","assets/FormGroup-Dg7paSKn.js","assets/InputLabel-B3K-wjtt.js","assets/ListItemText-DzuIoJgM.js","assets/Select-Cgn_SK4j.js","assets/TextField-B0tdvs5D.js","assets/LastPage-CxpvA1Xh.js","assets/index-D5vdosR6.js","assets/redux-DfMVEh8C.js","assets/Search-cf0osNnP.js","assets/Delete-BJX_VOZK.js","assets/url-join-CUdrf5JK.js","assets/uniqBy-BtS3yjwZ.js","assets/react-BW7E7-P9.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{ao as K0,j as o,aD as re,cE as a0,aG as B,fl as O1,aF as me,aB as Ne,aC as De,T as K,r as R,aK as _e,aH as c0,aI as Be,aJ as Ee,cK as X0,fm as We,X as Se,Y as ke,B as z,l as s1,P as f,$ as Ae,E as U,e as i1,u as le,aM as je,aV as Me,bx as Ge,a1 as Fe,L as de,bG as d0,a as fe,az as se,I as J0,q,Z as ie,dn as Q0,a9 as ge,c as ue,F as Y0,bU as a1,ce as u0,cz as Z0,cI as Te,cJ as p0,bj as e2,cZ as t2,cD as $e,bB as qe,c1 as Ze,f6 as o2,b as ne,bm as l2,dr as r2,ae as h0,bn as n2,ck as s2,aQ as $1,aP as i2,a2 as f0,bk as a2,eX as ye,fn as F1,cQ as c2,ap as d2,ay as u2,al as p2,am as Xe}from"./index-BHVmBQ8E.js";import{d as c1}from"./Add-DYUoCOSD.js";import{d as h2}from"./AddBox-CdWySqkf.js";import{d as x0}from"./Delete-BJX_VOZK.js";import{d as f2}from"./Error-DUbGuPJ0.js";import{D as d1}from"./index-DPzyMEVE.js";import{T as m0,b as x2}from"./index-txKLyozl.js";import{C as u1}from"./confirm-WbbThheQ.js";import{u as Ke}from"./session-C_q17DqM.js";import{W as q1}from"./did-address-Dm6G9Pz0.js";import{B as p1,d as m2}from"./ChevronRight-DLpiW9Xe.js";import{S as xe}from"./shorten-label-C0fy7vw5.js";import{A as v0}from"./Avatar-B2aqlUr4.js";import{d as v2}from"./Download-Cj5rREAv.js";import{d as g2}from"./QuestionMarkCircle-CXgSQEsv.js";import{b as b2,c as U1,T as j2}from"./index-BTHSgca3.js";import{_ as Ce}from"./useSetState-BTrtc5bD.js";import{c as h1}from"./index-DxWLBhYd.js";import{C as e1,F as t1,S as w2}from"./FormControlLabel-CSgQzD8H.js";import{A as g0}from"./Alert-DjdB6kJi.js";import{p as b0}from"./index-HqFqdQ4r.js";import"./api-BP-akdsb.js";import{i as R2}from"./index-Dbd8X1MQ.js";import{d as C2}from"./ExpandMore-MF6JMWUJ.js";import{d as y2}from"./OpenInNew-CyuaC2rt.js";import{d as z2}from"./DeleteOutline-CePnDmzu.js";import{d as S2}from"./ArrowDropDown-D1r34mKE.js";import{f as Ve}from"./format-error-DZ98jGc_.js";import{c as k2,A as j0,u as M2,S as I2}from"./item-CI9bZp4P.js";import{B as L2}from"./ButtonGroup-B2OCm4w2.js";import{T as ze}from"./TextField-B0tdvs5D.js";import{M as f1}from"./InputAdornment-DOCN0hKn.js";import{d as P2}from"./Launch-DEUdTJHa.js";import{L as T2}from"./MoreVert-Yxhg1I2d.js";import{a as V2}from"./ListItemText-DzuIoJgM.js";import{C as N2}from"./click-to-copy-lZXtD2ex.js";import{M as D2}from"./index-j0EDKFYS.js";import{r as _2}from"./index-COsZ3LRn.js";import{d as B2}from"./Done-CKMtsSDh.js";import{c as w0,d as R0,b as E2,S as A2,a as H2}from"./Stepper-DDJHXofQ.js";import{R as O2,a as W1}from"./RadioGroup-CKSypMzt.js";import"./FilterList-D2fArxx7.js";import"./toPropertyKey-hKuLU48H.js";import"./FormControl-C7YkaJ_C.js";import"./useFormControl-CIM987QD.js";import"./FormGroup-Dg7paSKn.js";import"./InputLabel-B3K-wjtt.js";import"./Select-Cgn_SK4j.js";import"./LastPage-CxpvA1Xh.js";import"./Toolbar-DDP1Q2zI.js";import"./index-D5vdosR6.js";import"./redux-DfMVEh8C.js";import"./Search-cf0osNnP.js";import"./index-ev1wxRtJ.js";import"./Link-29c93vgL.js";import"./useSlot-BXs-_Etv.js";import"./jss-plugin-props-sort.esm-DburuMay.js";const $2=K0(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"),F2=["slots","slotProps"],q2=re(a0)(({theme:e})=>B({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":B({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":B({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:O1(e.palette.grey[200],.12)}:{backgroundColor:O1(e.palette.grey[600],.12)})})),U2=re($2)({width:24,height:16});function W2(e){const{slots:t={},slotProps:l={}}=e,n=me(e,F2),s=e;return o.jsx("li",{children:o.jsx(q2,B({focusRipple:!0},n,{ownerState:s,children:o.jsx(U2,B({as:t.CollapsedIcon,ownerState:s},l.collapsedIcon))}))})}function G2(e){return De("MuiBreadcrumbs",e)}const K2=Ne("MuiBreadcrumbs",["root","ol","li","separator"]),X2=K2,J2=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],Q2=e=>{const{classes:t}=e;return Ee({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},G2,t)},Y2=re(K,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${X2.li}`]:t.li},t.root]})({}),Z2=re("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),et=re("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function tt(e,t,l,n){return e.reduce((s,a,c)=>(c<e.length-1?s=s.concat(a,o.jsx(et,{"aria-hidden":!0,className:t,ownerState:n,children:l},`separator-${c}`)):s.push(a),s),[])}const ot=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiBreadcrumbs"}),{children:s,className:a,component:c="nav",slots:d={},slotProps:u={},expandText:h="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=n,i=me(n,J2),[m,w]=R.useState(!1),v=B({},n,{component:c,expanded:m,expandText:h,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=Q2(v),S=c0({elementType:d.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),V=R.useRef(null),T=k=>{const O=()=>{w(!0);const D=V.current.querySelector("a[href],button,[tabindex]");D&&D.focus()};return g+x>=k.length?k:[...k.slice(0,g),o.jsx(W2,{"aria-label":h,slots:{CollapsedIcon:d.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:O},"ellipsis"),...k.slice(k.length-x,k.length)]},I=R.Children.toArray(s).filter(k=>R.isValidElement(k)).map((k,O)=>o.jsx("li",{className:C.li,children:k},`child-${O}`));return o.jsx(Y2,B({ref:l,component:c,color:"text.secondary",className:Be(C.root,a),ownerState:v},i,{children:o.jsx(Z2,{className:C.ol,ref:V,ownerState:v,children:tt(m||y&&I.length<=y?I:T(I),C.separator,p,v)})}))}),C0=ot;function lt(e){return De("MuiStepButton",e)}const rt=Ne("MuiStepButton",["root","horizontal","vertical","touchRipple"]),G1=rt,nt=["children","className","icon","optional"],st=e=>{const{classes:t,orientation:l}=e;return Ee({root:["root",l],touchRipple:["touchRipple"]},lt,t)},it=re(a0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${G1.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>B({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${G1.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),at=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiStepButton"}),{children:s,className:a,icon:c,optional:d}=n,u=me(n,nt),{disabled:h,active:x}=R.useContext(w0),{orientation:g}=R.useContext(R0),y=B({},n,{orientation:g}),p=st(y),i={icon:c,optional:d},m=X0(s,["StepLabel"])?R.cloneElement(s,i):o.jsx(E2,B({},i,{children:s}));return o.jsx(it,B({focusRipple:!0,disabled:h,TouchRippleProps:{className:p.touchRipple},className:Be(p.root,a),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))}),ct=at;function dt(e){return De("MuiStepContent",e)}Ne("MuiStepContent",["root","last","transition"]);const ut=["children","className","TransitionComponent","transitionDuration","TransitionProps"],pt=e=>{const{classes:t,last:l}=e;return Ee({root:["root",l&&"last"],transition:["transition"]},dt,t)},ht=re("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>B({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"})),ft=re(We,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),xt=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiStepContent"}),{children:s,className:a,TransitionComponent:c=We,transitionDuration:d="auto",TransitionProps:u}=n,h=me(n,ut);R.useContext(R0);const{active:x,last:g,expanded:y}=R.useContext(w0),p=B({},n,{last:g}),i=pt(p);let m=d;return d==="auto"&&!c.muiSupportAuto&&(m=void 0),o.jsx(ht,B({className:Be(i.root,a),ref:l,ownerState:p},h,{children:o.jsx(ft,B({as:c,in:x||y,className:i.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:s}))}))}),mt=xt;var x1={},vt=ke;Object.defineProperty(x1,"__esModule",{value:!0});var y0=x1.default=void 0,gt=vt(Se()),bt=o;y0=x1.default=(0,gt.default)((0,bt.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 m1={},jt=ke;Object.defineProperty(m1,"__esModule",{value:!0});var z0=m1.default=void 0,wt=jt(Se()),Rt=o;z0=m1.default=(0,wt.default)((0,Rt.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 we({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(s1,{size:e})})}we.propTypes={size:f.number};we.defaultProps={size:24};function v1({did:e,projectId:t,title:l,logo:n,describe:s}){const c=`${`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${n}`,[d,u]=R.useState(!1),h=Ae(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:d?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(v0,{sx:{borderRadius:1},src:c}),o.jsxs(z,{children:[o.jsx(xe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:h?"primary.main":""},children:l||"/"}),o.jsx(xe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:h||d?"primary.main":"grey.700"},children:s||"/"})]})]})}v1.propTypes={projectId:f.string.isRequired,did:f.string.isRequired,title:f.string.isRequired,logo:f.string.isRequired,describe:f.string.isRequired};function g1({initUrl:e}){const t=i1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:n,locale:s}=le(),{api:a}=je(),{api:c}=Ke(),[d,u]=R.useState(!0),{blocklet:h}=Me(),[x,g]=R.useState(null),[y,p]=R.useState(!1),i=Ae(M=>M.breakpoints.down("xl")),{componentDid:m=""}=Ge(),[w,v]=R.useState(null),C=()=>{a.getProjects({input:{did:h.meta.did,componentDid:m,tenantScope:l}}).then(M=>{const L=(M==null?void 0:M.projects)||[];u(!1),v(L)}).catch(M=>{u(!1),q.error(M.message)})},S=()=>{t(`${U.UNOWNED_DID}/create/none`,{replace:!0})},V=M=>{g(M)},T=()=>{u(!1),p(!0)},I=()=>{p(!1),g(null)},k=M=>{q.error(M.message),p(!1),g(null)},O=M=>{if(!(M!=null&&M.deleted)){q.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!w&&d)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(we,{})});if(!w)return null;if(!w.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:n("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:n("blocklet.publish.createBlockletTip")}),o.jsx(Fe,{onClick:S,variant:"contained",children:n("blocklet.publish.createBlocklet")})]});const D=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:M=>{const L=w[M];return o.jsx(de,{to:`${L.id}`,children:o.jsx(v1,{did:h.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:M=>M?o.jsx(m0,{type:"success",children:M}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:M=>M?o.jsx(q1,{size:14,compact:!0,responsive:!1,did:M}):null}},i||m?null:{label:n("common.createdBy"),name:"createdBy",options:{customBodyRender:M=>M?o.jsx(q1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${M}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:M}):null}},i||m?null:{label:n("common.scope"),name:"componentDid",options:{customBodyRender:M=>{const L=(h.children||[]).find(E=>E.meta.did===M);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(p1,{size:14,blocklet:L,ancestors:[h]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},M):""}}},i||l?null:{label:n("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:M=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(xe,{children:M})})}},{label:n("common.updatedAt"),name:"updatedAt",options:{customBodyRender:M=>o.jsx(d0,{value:Number(M),locale:s})}},{label:n("common.actions"),name:"actions",options:{customBodyRenderLite:M=>{const L=w[M];return o.jsxs(z,{display:"flex",children:[o.jsx(de,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(fe,{title:n("blocklet.publish.createRelease"),placement:"top",children:o.jsx(se,{color:"primary","aria-label":"create",children:o.jsx(h2,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(fe,{title:n("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(se,{color:"secondary","aria-label":"create",children:o.jsx(de,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(y0,{sx:{fontSize:18}})})})}),o.jsx(fe,{title:n("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(se,{color:"primary","aria-label":"delete",onClick:()=>V(L),children:o.jsx(x0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),P=y?o.jsx(J0,{open:!0,popup:!0,onClose:I,action:"check-has-project-id",locale:s,checkFn:c.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:O,onError:k,extraParams:{projectId:x.id,did:h.meta.did,name:x.blockletTitle},messages:{title:n("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:n("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:n("blocklet.publish.deleteProject.confirm"),success:n("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Ct,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:n("common.blockletStudio")}),o.jsx(fe,{title:n("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(z0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(Fe,{onClick:S,variant:"contained",children:[o.jsx(c1,{style:{fontSize:"1.3em",marginRight:4}}),n("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(d1,{className:"main-table",locale:s,data:w,columns:D,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(u1,{title:`${n("common.delete")} ${x.blockletTitle}`,description:n("blocklet.publish.deleteProject.description"),confirm:n("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[n("blocklet.publish.deleteProject.tip1"),n("blocklet.publish.deleteProject.tip2"),n("blocklet.publish.deleteProject.tip3")].map(M=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(f2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(K,{component:"span",variant:"inherit",color:"text.secondary",children:M})]}))})}),P]})}g1.propTypes={initUrl:f.object};g1.defaultProps={initUrl:null};const Ct=ie(z)`
|
|
3
3
|
.main-table > div:first-child {
|
|
4
4
|
display: none;
|
|
5
5
|
}
|
|
@@ -133,7 +133,7 @@ import{ao as K0,j as o,aD as re,cE as a0,aG as B,fl as O1,aF as me,aB as Ne,aC a
|
|
|
133
133
|
background: #fff;
|
|
134
134
|
z-index: 10;
|
|
135
135
|
}
|
|
136
|
-
`,N0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:n})=>{var c,d;const s=e?(c=l==null?void 0:l.meta)==null?void 0:c.did:t==null?void 0:t.did;let a=e?((d=l==null?void 0:l.settings)==null?void 0:d.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return a=a.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===n),{teamDid:s,storeList:a}};function I1({blocklet:e,store:t,onChangeStore:l,onClick:n,disabled:s,loading:a,componentDid:c}){var L,E,A;const{t:d}=le(),{session:u}=Ke(),{api:h,info:x,inService:g}=je(),y=Me(),[p,i]=R.useState(!1),m=R.useRef(null),[w,v]=R.useState(!1),[C,S]=R.useState(null),V=$=>{l($),i(!1)},T=()=>{i(!0)},I=$=>{m.current&&m.current.contains($.target)||i(!1)},k=()=>{v(!0)},O=()=>{v(!1)},D=async()=>{var $;if(C)try{await h.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await(($=y==null?void 0:y.actions)==null?void 0:$.refreshBlocklet())}catch(X){q.error(`Remove Blocklet Store Error: ${Ve(X)}`)}finally{S(null)}},{storeList:P}=N0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:c,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),M=(E=e==null?void 0:e.meta)==null?void 0:E.did;return o.jsxs(o.Fragment,{children:[o.jsxs(L2,{disabled:s,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:n,children:[a&&o.jsx(s1,{size:14,sx:{mr:.5}}),`${d("common.connect")} ${(t==null?void 0: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:T,children:o.jsx(S2,{})})]}),o.jsx(l2,{sx:{zIndex:1},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:$})=>o.jsx(r2,{...$,style:{transformOrigin:"center top"},children:o.jsx(h0,{children:o.jsx(n2,{onClickAway:I,children:o.jsxs(s2,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto"},children:[P.map(X=>{var J;return o.jsxs($1,{selected:X.id===t.id,sx:{height:56},onClick:()=>V(X),children:[o.jsxs(z,{children:[o.jsx(xe,{sx:{fontSize:"16px"},maxLength:24,children:X.name}),o.jsx(xe,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:X.url})]}),k2({store:X,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(se,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(X)},children:o.jsx(qe,{icon:"ic:outline-delete"})})]},X.url)}),o.jsx(i2,{}),o.jsxs($1,{onClick:k,children:[o.jsx(c1,{font:!0}),o.jsx(K,{variant:"inherit",children:d("store.blockletRegistry.addRegistry")})]})]})})})})}),w&&o.jsx(j0,{hiddenChildren:!0,open:!0,onClose:O,teamDid:M,storeList:P,scope:"studio",onAdd:(A=y==null?void 0:y.actions)==null?void 0:A.refreshBlocklet}),C&&o.jsx(u1,{displayError:!0,title:`${d("common.delete")} ${C.name}`,description:d("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:d("common.confirm"),onConfirm:D,onCancel:()=>S(null)})]})}I1.propTypes={store:f.object,blocklet:f.object,onChangeStore:f.func.isRequired,onClick:f.func.isRequired,loading:f.bool.isRequired,disabled:f.bool.isRequired,componentDid:f.string.isRequired,projectType:f.string.isRequired,getData:f.func.isRequired};I1.defaultProps={store:null,blocklet:null};async function D0(e,t=1500,l=600,n=5e3){let s=0;await new Promise(c=>setTimeout(c,n));const a=async(c,d)=>{try{const u=await e();c(u)}catch(u){s++,s>=l?d(u):setTimeout(()=>a(c,d),t)}};return new Promise(a)}function Dl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function _l(e,{did:t,projectId:l,messageId:n}){return D0(async()=>{var a;const s=await e.getProject({input:{did:t,projectId:l,messageId:n}});if(!((a=s==null?void 0:s.project)!=null&&a.blockletDid))throw new Error("Connected store not found");return s.project.blockletDid})}function Bl(e,{did:t,projectId:l,storeId:n}){return D0(async()=>{var c,d;const s=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((d=(c=s==null?void 0:s.project)==null?void 0:c.connectedStores)!=null&&d.length))throw new Error("Connected store not found");if(!s.project.connectedStores.find(u=>u.storeId===n))throw new Error("Connected store not found")})}const e0="lastWantToConnectStoreId";function El(e){var d,u;const[t,l]=R.useState(null),{session:n}=Ke(),s=R.useCallback(h=>{l(h),localStorage.setItem(e0,h==null?void 0:h.id)},[l]),a=R.useMemo(()=>{var g,y;const h=localStorage.getItem(e0),x=h?(((g=e==null?void 0:e.settings)==null?void 0:g.storeList)||[]).find(p=>p.id===h):null;return x||(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(p=>{var i;return!(p.id!==U.BLOCKLET_STORE.id||p.scope&&p.scope!=="studio"&&p.scope!==((i=n==null?void 0:n.user)==null?void 0:i.did))})},[(d=e==null?void 0:e.settings)==null?void 0:d.storeList,(u=n==null?void 0:n.user)==null?void 0:u.did]);return[t||a,s]}const t0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],o0=1024*1024*10,l0=R.lazy(()=>f0(()=>import("./react-DR-nB82P.js").then(e=>e.r),__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])).then(e=>({default:e.Uploader})));function _0({projectId:e,readOnly:t,loading:l,blocklet:n,params:s,setParams:a,paramsErrTip:c,setParamsErrTip:d,setLoading:u,initUrl:h,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=le(),{api:i}=je(),m=i1(),w=R.useRef(null),v=R.useRef(null),[C,S]=El(n),V=M2({onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const E=setTimeout(()=>{u(!1)},2e4),A=await _l(i,L);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${U.UNOWNED_DID}/create`,`${A}/create`),{replace:!0})},I=()=>{if(!s.blockletTitle){q.error(p("blocklet.publish.errorTip.noTitle"));return}if(!C){q.error("No store found");return}const L=Dl();V(async(E,A)=>{var $,X,J;try{const W=await i.connectByStudio({input:{did:($=n==null?void 0:n.meta)==null?void 0:$.did,blockletTitle:s==null?void 0:s.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((X=s==null?void 0:s.blockletComponents)==null?void 0:X.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(h==null?void 0:h.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){q.error("failed to connect to store");return}A(W.url),T({did:(J=n==null?void 0:n.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const te=Ve(W);q.error(te),E.document.write(te),u(!1)}})},k=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${n.meta.did}/${e}/logo/upload`,O=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${n.meta.did}/${e}/screenshot/upload`,D=s!=null&&s.blockletLogo?`${k}/${s.blockletLogo}`:`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,P=((s==null?void 0:s.blockletScreenshots)||[]).filter(Boolean).map(L=>`${O}/${L}`),M=()=>t?!1:!e||e===U.UNOWNED_DID?(q.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Al,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(ze,{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:s.blockletTitle||"",onChange:L=>{d({blockletTitle:""}),a({blockletTitle:L.target.value})},error:!!c.blockletTitle,helperText:c.blockletTitle||""}),o.jsx(ze,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===U.UNOWNED_DID&&o.jsx(f1,{position:"end",children:o.jsx(I1,{blocklet:n,store:C,componentDid:y,onChangeStore:S,disabled:!s.blockletTitle||t||l,loading:l,onClick:I})})},error:!!c.projectId,helperText:c.projectId||"",value:e===U.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(ze,{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:s.blockletDescription||"",onChange:L=>{d({blockletDescription:""}),a({blockletDescription:L.target.value})},error:!!c.blockletDescription,helperText:c.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(K,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(v0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||D,onClick:()=>{M()&&w.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(K,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[P.map((L,E)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(se,{className:"action",onClick:()=>{const A=[...s.blockletScreenshots];A.splice(E,1),a({blockletScreenshots:A})},children:o.jsx(z2,{})})]})),P.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{M()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(we,{}),children:[o.jsx(l0,{ref:w,popup:!0,onUploadFinish:L=>{a({blockletLogo:L.data.filename}),g(""),w.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:k,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:t0,maxFileSize:o0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(l0,{ref:v,popup:!0,onUploadFinish:L=>{var A;const E=s.blockletScreenshots||[];E.push((A=L.data)==null?void 0:A.filename),a({blockletScreenshots:E}),v.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:O,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:t0,maxFileSize:o0,maxNumberOfFiles:5-P.length}}},"uploader-screenshot")]})]})}_0.propTypes={projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired,blocklet:f.object.isRequired,setLoading:f.func.isRequired,initUrl:f.object.isRequired,componentDid:f.isRequired,initLogoUrl:f.string.isRequired,setInitLogoUrl:f.func.isRequired};const Al=ie.div`
|
|
136
|
+
`,N0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:n})=>{var c,d;const s=e?(c=l==null?void 0:l.meta)==null?void 0:c.did:t==null?void 0:t.did;let a=e?((d=l==null?void 0:l.settings)==null?void 0:d.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return a=a.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===n),{teamDid:s,storeList:a}};function I1({blocklet:e,store:t,onChangeStore:l,onClick:n,disabled:s,loading:a,componentDid:c}){var L,E,A;const{t:d}=le(),{session:u}=Ke(),{api:h,info:x,inService:g}=je(),y=Me(),[p,i]=R.useState(!1),m=R.useRef(null),[w,v]=R.useState(!1),[C,S]=R.useState(null),V=$=>{l($),i(!1)},T=()=>{i(!0)},I=$=>{m.current&&m.current.contains($.target)||i(!1)},k=()=>{v(!0)},O=()=>{v(!1)},D=async()=>{var $;if(C)try{await h.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await(($=y==null?void 0:y.actions)==null?void 0:$.refreshBlocklet())}catch(X){q.error(`Remove Blocklet Store Error: ${Ve(X)}`)}finally{S(null)}},{storeList:P}=N0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:c,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),M=(E=e==null?void 0:e.meta)==null?void 0:E.did;return o.jsxs(o.Fragment,{children:[o.jsxs(L2,{disabled:s,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:n,children:[a&&o.jsx(s1,{size:14,sx:{mr:.5}}),`${d("common.connect")} ${(t==null?void 0: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:T,children:o.jsx(S2,{})})]}),o.jsx(l2,{sx:{zIndex:1},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:$})=>o.jsx(r2,{...$,style:{transformOrigin:"center top"},children:o.jsx(h0,{children:o.jsx(n2,{onClickAway:I,children:o.jsxs(s2,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto"},children:[P.map(X=>{var J;return o.jsxs($1,{selected:X.id===t.id,sx:{height:56},onClick:()=>V(X),children:[o.jsxs(z,{children:[o.jsx(xe,{sx:{fontSize:"16px"},maxLength:24,children:X.name}),o.jsx(xe,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:X.url})]}),k2({store:X,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(se,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(X)},children:o.jsx(qe,{icon:"ic:outline-delete"})})]},X.url)}),o.jsx(i2,{}),o.jsxs($1,{onClick:k,children:[o.jsx(c1,{font:!0}),o.jsx(K,{variant:"inherit",children:d("store.blockletRegistry.addRegistry")})]})]})})})})}),w&&o.jsx(j0,{hiddenChildren:!0,open:!0,onClose:O,teamDid:M,storeList:P,scope:"studio",onAdd:(A=y==null?void 0:y.actions)==null?void 0:A.refreshBlocklet}),C&&o.jsx(u1,{displayError:!0,title:`${d("common.delete")} ${C.name}`,description:d("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:d("common.confirm"),onConfirm:D,onCancel:()=>S(null)})]})}I1.propTypes={store:f.object,blocklet:f.object,onChangeStore:f.func.isRequired,onClick:f.func.isRequired,loading:f.bool.isRequired,disabled:f.bool.isRequired,componentDid:f.string.isRequired,projectType:f.string.isRequired,getData:f.func.isRequired};I1.defaultProps={store:null,blocklet:null};async function D0(e,t=1500,l=600,n=5e3){let s=0;await new Promise(c=>setTimeout(c,n));const a=async(c,d)=>{try{const u=await e();c(u)}catch(u){s++,s>=l?d(u):setTimeout(()=>a(c,d),t)}};return new Promise(a)}function Dl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function _l(e,{did:t,projectId:l,messageId:n}){return D0(async()=>{var a;const s=await e.getProject({input:{did:t,projectId:l,messageId:n}});if(!((a=s==null?void 0:s.project)!=null&&a.blockletDid))throw new Error("Connected store not found");return s.project.blockletDid})}function Bl(e,{did:t,projectId:l,storeId:n}){return D0(async()=>{var c,d;const s=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((d=(c=s==null?void 0:s.project)==null?void 0:c.connectedStores)!=null&&d.length))throw new Error("Connected store not found");if(!s.project.connectedStores.find(u=>u.storeId===n))throw new Error("Connected store not found")})}const e0="lastWantToConnectStoreId";function El(e){var d,u;const[t,l]=R.useState(null),{session:n}=Ke(),s=R.useCallback(h=>{l(h),localStorage.setItem(e0,h==null?void 0:h.id)},[l]),a=R.useMemo(()=>{var g,y;const h=localStorage.getItem(e0),x=h?(((g=e==null?void 0:e.settings)==null?void 0:g.storeList)||[]).find(p=>p.id===h):null;return x||(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(p=>{var i;return!(p.id!==U.BLOCKLET_STORE.id||p.scope&&p.scope!=="studio"&&p.scope!==((i=n==null?void 0:n.user)==null?void 0:i.did))})},[(d=e==null?void 0:e.settings)==null?void 0:d.storeList,(u=n==null?void 0:n.user)==null?void 0:u.did]);return[t||a,s]}const t0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],o0=1024*1024*10,l0=R.lazy(()=>f0(()=>import("./react-DiBHU1pk.js").then(e=>e.r),__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])).then(e=>({default:e.Uploader})));function _0({projectId:e,readOnly:t,loading:l,blocklet:n,params:s,setParams:a,paramsErrTip:c,setParamsErrTip:d,setLoading:u,initUrl:h,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=le(),{api:i}=je(),m=i1(),w=R.useRef(null),v=R.useRef(null),[C,S]=El(n),V=M2({onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const E=setTimeout(()=>{u(!1)},2e4),A=await _l(i,L);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${U.UNOWNED_DID}/create`,`${A}/create`),{replace:!0})},I=()=>{if(!s.blockletTitle){q.error(p("blocklet.publish.errorTip.noTitle"));return}if(!C){q.error("No store found");return}const L=Dl();V(async(E,A)=>{var $,X,J;try{const W=await i.connectByStudio({input:{did:($=n==null?void 0:n.meta)==null?void 0:$.did,blockletTitle:s==null?void 0:s.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((X=s==null?void 0:s.blockletComponents)==null?void 0:X.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(h==null?void 0:h.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){q.error("failed to connect to store");return}A(W.url),T({did:(J=n==null?void 0:n.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const te=Ve(W);q.error(te),E.document.write(te),u(!1)}})},k=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${n.meta.did}/${e}/logo/upload`,O=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${n.meta.did}/${e}/screenshot/upload`,D=s!=null&&s.blockletLogo?`${k}/${s.blockletLogo}`:`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,P=((s==null?void 0:s.blockletScreenshots)||[]).filter(Boolean).map(L=>`${O}/${L}`),M=()=>t?!1:!e||e===U.UNOWNED_DID?(q.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Al,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(ze,{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:s.blockletTitle||"",onChange:L=>{d({blockletTitle:""}),a({blockletTitle:L.target.value})},error:!!c.blockletTitle,helperText:c.blockletTitle||""}),o.jsx(ze,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===U.UNOWNED_DID&&o.jsx(f1,{position:"end",children:o.jsx(I1,{blocklet:n,store:C,componentDid:y,onChangeStore:S,disabled:!s.blockletTitle||t||l,loading:l,onClick:I})})},error:!!c.projectId,helperText:c.projectId||"",value:e===U.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(ze,{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:s.blockletDescription||"",onChange:L=>{d({blockletDescription:""}),a({blockletDescription:L.target.value})},error:!!c.blockletDescription,helperText:c.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(K,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(v0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||D,onClick:()=>{M()&&w.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(K,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[P.map((L,E)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(se,{className:"action",onClick:()=>{const A=[...s.blockletScreenshots];A.splice(E,1),a({blockletScreenshots:A})},children:o.jsx(z2,{})})]})),P.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{M()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(we,{}),children:[o.jsx(l0,{ref:w,popup:!0,onUploadFinish:L=>{a({blockletLogo:L.data.filename}),g(""),w.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:k,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:t0,maxFileSize:o0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(l0,{ref:v,popup:!0,onUploadFinish:L=>{var A;const E=s.blockletScreenshots||[];E.push((A=L.data)==null?void 0:A.filename),a({blockletScreenshots:E}),v.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:O,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:t0,maxFileSize:o0,maxNumberOfFiles:5-P.length}}},"uploader-screenshot")]})]})}_0.propTypes={projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired,blocklet:f.object.isRequired,setLoading:f.func.isRequired,initUrl:f.object.isRequired,componentDid:f.isRequired,initLogoUrl:f.string.isRequired,setInitLogoUrl:f.func.isRequired};const Al=ie.div`
|
|
137
137
|
margin-top: 24px;
|
|
138
138
|
.screenshot {
|
|
139
139
|
margin-bottom: 16px;
|
|
@@ -178,7 +178,7 @@ import{ao as K0,j as o,aD as re,cE as a0,aG as B,fl as O1,aF as me,aB as Ne,aC a
|
|
|
178
178
|
padding-bottom: 12px;
|
|
179
179
|
border-bottom: ${({theme:e})=>`1px solid ${e.palette.divider}`};
|
|
180
180
|
}
|
|
181
|
-
`;function H0({text:e}){return e?o.jsx(D2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[_2,{target:"_blank"}]]}):o.jsx(be,{Icon:He})}H0.propTypes={text:f.string.isRequired};function O0({params:e,setParams:t,paramsErrTip:l,loading:n,setParamsErrTip:s,readOnly:a}){var x;const{t:c}=le(),[d,u]=R.useState(a?"preview":"write"),h=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(K,{variant:"h6",fontWeight:"bold",sx:{},children:c("common.introduction")}),o.jsxs(b2,{value:d,onChange:h,"aria-label":"wrapped label tabs example",children:[o.jsx(U1,{value:"write",label:"Write"}),o.jsx(U1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:d==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(ze,{disabled:n||a,sx:{border:"none"},placeholder:`Blocklet ${c("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:a,endAdornment:o.jsxs(f1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ge.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{s({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ge.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:d==="preview"?"block":"none",mt:3,children:o.jsx(H0,{text:e.blockletIntroduction||""})})]})}O0.propTypes={params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,readOnly:f.bool.isRequired,loading:f.bool.isRequired};var T1={},Kl=ke;Object.defineProperty(T1,"__esModule",{value:!0});var $0=T1.default=void 0,Xl=Kl(Se()),r0=o;$0=T1.default=(0,Xl.default)([(0,r0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,r0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function V1({step:e,ok:t,active:l,error:n}){let s="grey.500",a=e+1;return t&&(a=o.jsx(B2,{sx:{fontSize:18,margin:0},color:"white"})),n||!t&&l>e?(s="error.main",a=o.jsx($0,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(s="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:s,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:a})}V1.propTypes={step:f.number,ok:f.bool,active:f.number,error:f.string};V1.defaultProps={step:0,ok:!1,active:0,error:""};function F0({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:n,params:s,loading:a,paramsErrTip:c,viewMode:d,projectId:u}){const{t:h}=le(),x=()=>{l(i=>i+1)},g=()=>{l(i=>i-1)},y=i=>i===0?(c==null?void 0:c.blockletTitle)||(c==null?void 0:c.projectId)||(c==null?void 0:c.blockletDescription):i===2?c==null?void 0:c.blockletResource:i>=4?(c==null?void 0:c.blockletVersion)||(c==null?void 0:c.note):"",p=d||E0({hasSelectedResources:n,params:s,projectId:u,t:h})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(A2,{activeStep:t,orientation:"vertical",children:e.map((i,m)=>{const w={},v=a||!Fl({hasSelectedResources:n,params:s,projectId:u,step:m,t:h}),C=a?"":y(m);return C&&(w.optional=o.jsx(K,{variant:"caption",color:"error",children:C}),w.error=!0),o.jsxs(H2,{children:[o.jsx(ct,{icon:o.jsx(V1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...w,children:o.jsx(K,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:i.label})}),o.jsxs(mt,{children:[o.jsx(K,{fontSize:12,children:i.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:h("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:h("common.back")})]})})]})]},i.label)})}),t>=e.length-1&&o.jsx(h0,{square:!0,elevation:0,sx:{p:3},children:o.jsx(K,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}F0.propTypes={steps:f.array.isRequired,activeStep:f.number.isRequired,setActiveStep:f.func.isRequired,params:f.object.isRequired,viewMode:f.string.isRequired,loading:f.bool.isRequired,projectId:f.string.isRequired,hasSelectedResources:f.bool.isRequired,paramsErrTip:f.shape({projectId:f.string,blockletVersion:f.string,blockletTitle:f.string,blockletDescription:f.string,note:f.string,blockletResource:f.string}).isRequired};function Ue({readOnly:e,params:t,setParams:l,paramsErrTip:n,setParamsErrTip:s,loading:a}){var d;const{t:c}=le();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(ze,{required:!0,disabled:a||e,label:`Blocklet ${c("common.version")}`,placeholder:`Blocklet ${c("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{s({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!n.blockletVersion,helperText:n.blockletVersion||""}),o.jsx(ze,{label:c("blocklet.publish.releaseNote"),autoComplete:"off",disabled:a||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(f1,{position:"end",children:[((d=t==null?void 0:t.note)==null?void 0:d.length)||0," / ",ge.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{s({note:""}),l({note:u.target.value.slice(0,ge.PROJECT.MAX_NOTE_LENGTH)})},error:!!n.note,helperText:n.note||"",sx:{mt:3}})]})})}Ue.propTypes={readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired};Ue.defaultProps={};const Jl=[".zip",".gz"],Ql=1024*1024*100,Yl=R.lazy(()=>f0(()=>import("./react-DR-nB82P.js").then(e=>e.r),__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])).then(e=>({default:e.Uploader})));function N1({app:e,projectId:t,readOnly:l,params:n,setParams:s,setParamsErrTip:a,error:c}){const{t:d}=le(),u=R.useRef(null),h=()=>l?!1:!t||t===U.UNOWNED_DID?(q.error(d("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(K,{gutterBottom:!0,children:d("blocklet.publish.resourceUpload")}),o.jsxs(w2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!n.uploadedResource&&o.jsx(K,{component:"a",href:`${x}/params.uploadedResource`,children:n.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;h()&&((g=u.current)==null||g.open())},children:n.uploadedResource?d("common.change"):d("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(we,{}),children:o.jsx(Yl,{ref:u,popup:!0,onUploadFinish:g=>{var y;s({uploadedResource:g.data.filename}),a({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:Jl,maxFileSize:Ql,maxNumberOfFiles:1}}},"uploader-resource")}),!!c&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:c})]})}N1.propTypes={app:f.object.isRequired,projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,error:f.string.isRequired,setParamsErrTip:f.func.isRequired};N1.defaultProps={};const Zl=({tabs:e,blocklet:t,ancestors:l=[]})=>{const n=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(p1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},n),value:n})},n0=(e,t)=>{const l=a1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(n=>({...n,included:!0})):l.blockletComponents=(t.children||[]).map(n=>({did:n.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},e3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},s0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function D1({initUrl:e,...t}){var H1;const{projectId:l,mode:n,releaseId:s,componentDid:a=""}=Ge(),{t:c}=le(),{blocklet:d}=Me(),[u,h]=Ce({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Ce({}),[y,p]=R.useState(!1),[i,m]=Ce(null),{api:w}=je(),v=Ae(N=>N.breakpoints.down("md")),[C,S]=R.useState({}),[V,T]=R.useState(!1),I=R.useRef({}),[k,O]=Ce({}),[D,P]=R.useState(""),[M,L]=Ce({}),E=e==null?void 0:e.searchParams.get("dependentComponentsMode"),A=E==="readonly",$=R.useCallback(N=>{A&&h({blockletComponents:[]}),L(N)},[A,L,h]),X=R.useCallback((...N)=>{O(...N),g({blockletResource:""})},[]),J=s==="none"?(u==null?void 0:u.lastReleaseId)||"":s,[W,te]=R.useState(n==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const pe=R.useMemo(()=>{var N;return(N=u==null?void 0:u.blockletComponents)!=null&&N.some(Q=>Q.included)||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource]),G=[],Y=((d==null?void 0:d.children)||[]).filter(N=>{var Q;return(Q=N.meta.resource)==null?void 0:Q.exportApi}).filter(N=>!a||N.meta.did===a);Y.forEach(N=>{Zl({tabs:G,blocklet:N,t:c,ancestors:[d]})});const[F,oe]=R.useState((H1=G[0])==null?void 0:H1.value),ae=!V&&(i==null?void 0:i.status)==="published",Z=ae,ce=R.useMemo(()=>{const N={};return Object.keys(M).forEach(Q=>{const Oe=M[Q];Oe&&Oe.forEach(G0=>{N[G0]=!0})}),N},[M]),_=async()=>{if(J)try{const N=await w.getRelease({input:{did:d.meta.did,projectId:l,releaseId:J}});if(p(!1),!N.release){q.error("Release not found");return}n!=="view"&&(N.release.note=""),h(Q=>n0({...Q,...N.release,blockletVersion:n==="create"||n==="new-release"?ye.inc(N.release.blockletVersion,"patch"):N.release.blockletVersion},d)),m(N.release)}catch(N){p(!1),q.error(Ve(N))}},H=async()=>{if(l===U.UNOWNED_DID){h({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){q.error(c("blocklet.publish.errorTip.noDid"));return}try{const N=await w.getProject({input:{did:d.meta.did,projectId:l}});p(!1);const Q=N.project||{};Q.blockletVersion?(n==="create"||n==="new-release")&&ye.valid(Q.blockletVersion)&&(Q.blockletVersion=ye.inc(Q.blockletVersion,"patch")):Q.blockletVersion="1.0.0";const Oe=n0(Q,d);h(Oe)}catch(N){p(!1),q.error(Ve(N))}},ee=R.useCallback(async()=>{if(n==="view"){if(!J){q.error("Empty release id");return}await H(),await _();return}await H(),J&&(T(!0),await _())},[n,J]),Le=N=>{h({blockletComponents:N})};R.useEffect(()=>{ee()},[ee]),R.useEffect(()=>{if(l===U.UNOWNED_DID&&(n==="create"||n==="new-release")&&e){P(e.searchParams.get("logo")),h({blockletTitle:e.searchParams.get("title"),blockletDescription:e.searchParams.get("description"),blockletIntroduction:e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:e.searchParams.get("note")||"No note"});const N=e.searchParams.get("resources");try{const Q=JSON.parse(N);S(Q)}catch{}}},[h,l,e,n]);const _1=R.useMemo(()=>!!Object.keys(k).find(N=>!!k[N].length),[k]);if(!u&&y)return o.jsx(we,{});if(!u)return null;const B1=Y.find(N=>N.meta.did===F);if(Y.every(N=>N.status!=="running"))return o.jsx(be,{children:c("blocklet.publish.allComponentsNotRunning")});const U0=N=>{oe(N)},E1=e==null?void 0:e.searchParams.get("resourcesTitle"),A1=e==null?void 0:e.searchParams.get("componentsTitle"),Re=[{label:c("blocklet.publish.branding"),description:c("blocklet.publish.steps.branding")},{label:c("common.introduction"),description:c("blocklet.publish.steps.introduction")},{label:E1||c("blocklet.publish.resourceTitle"),description:c("blocklet.publish.steps.resources")},{label:A1||c("common.components"),description:c("blocklet.publish.steps.blocklets")},{label:c("blocklet.publish.versionTitle"),description:c("blocklet.publish.steps.version")}],W0=Re[W]||Re[Re.length-1],ve=e3[W];return o.jsxs(t3,{...t,children:[o.jsx(A0,{blocklet:d,release:i,getData:ee,getRelease:_,mode:n,params:u,setParams:h,setParamsErrTip:g,readOnly:Z,isPublished:ae,loading:y,setLoading:p,initLogoUrl:D,releaseId:J,projectId:l,projectType:pe,resourceComponents:Y,resourceComponentsMap:M,resourceRelateComponents:ce,resourceItem:B1,saveSelectedEventsRef:I,hasSelectedResources:_1,releaseUsedLast:V,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(F0,{steps:Re,viewMode:n==="view",params:u,hasSelectedResources:_1||u.uploadedResource,paramsErrTip:x,activeStep:W,setActiveStep:te,projectId:l,resourcesUrlTitle:E1,componentsUrlTitle:A1}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&ve!=="introduction"&&o.jsxs(K,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[W0.label,ve==="branding"&&o.jsx(fe,{title:c("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{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(g2,{})})})]}),(v||ve==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(_0,{projectId:l,setParams:h,setParamsErrTip:g,params:u,componentDid:a,blocklet:d,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Z,initLogoUrl:D,setInitLogoUrl:P})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(Ue,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:Z})}),(v||ve==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(O0,{loading:y,readOnly:Z,params:u,setParams:h,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Re[s0.resources].label}),o.jsx(z,{display:v||ve==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(O2,{onChange:()=>h({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(t1,{value:"select",disabled:Z,control:o.jsx(W1,{size:"small",checked:u.resourceFromSelect}),label:c("blocklet.publish.resourceSelect")}),o.jsx(t1,{value:"select",disabled:Z,control:o.jsx(W1,{size:"small",checked:!u.resourceFromSelect}),label:c("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!a&&o.jsx(j2,{tabs:G,current:F,onChange:U0,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(M1,{loading:y,initialResources:C,saveSelectedEventsRef:I,selectedResourceIds:k,setSelectedResourceIds:X,setResourceComponentsMap:$,error:x.blockletResource,app:d,readOnly:Z,component:B1,componentDid:a,initUrl:e,params:u,setParams:h,projectId:l===U.UNOWNED_DID?"":l,releaseUsedLast:V,release:{...i,id:J}})]}),!u.resourceFromSelect&&o.jsx(N1,{app:d,readOnly:Z,projectId:l===U.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:h,setParamsErrTip:g})]})})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Re[s0.blocklets].label}),(v||ve==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(w1,{projectType:pe,disabled:y||Z,app:d,value:(u==null?void 0:u.blockletComponents)||[],onChange:Le,resourceRelateComponents:ce,dependentComponentsMode:E})})})}),!v&&ve==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(Ue,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:Z})})]})]})]})]})}D1.propTypes={initUrl:f.object};D1.defaultProps={initUrl:null};const t3=ie.div`
|
|
181
|
+
`;function H0({text:e}){return e?o.jsx(D2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[_2,{target:"_blank"}]]}):o.jsx(be,{Icon:He})}H0.propTypes={text:f.string.isRequired};function O0({params:e,setParams:t,paramsErrTip:l,loading:n,setParamsErrTip:s,readOnly:a}){var x;const{t:c}=le(),[d,u]=R.useState(a?"preview":"write"),h=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(K,{variant:"h6",fontWeight:"bold",sx:{},children:c("common.introduction")}),o.jsxs(b2,{value:d,onChange:h,"aria-label":"wrapped label tabs example",children:[o.jsx(U1,{value:"write",label:"Write"}),o.jsx(U1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:d==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(ze,{disabled:n||a,sx:{border:"none"},placeholder:`Blocklet ${c("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:a,endAdornment:o.jsxs(f1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ge.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{s({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ge.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:d==="preview"?"block":"none",mt:3,children:o.jsx(H0,{text:e.blockletIntroduction||""})})]})}O0.propTypes={params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,readOnly:f.bool.isRequired,loading:f.bool.isRequired};var T1={},Kl=ke;Object.defineProperty(T1,"__esModule",{value:!0});var $0=T1.default=void 0,Xl=Kl(Se()),r0=o;$0=T1.default=(0,Xl.default)([(0,r0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,r0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function V1({step:e,ok:t,active:l,error:n}){let s="grey.500",a=e+1;return t&&(a=o.jsx(B2,{sx:{fontSize:18,margin:0},color:"white"})),n||!t&&l>e?(s="error.main",a=o.jsx($0,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(s="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:s,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:a})}V1.propTypes={step:f.number,ok:f.bool,active:f.number,error:f.string};V1.defaultProps={step:0,ok:!1,active:0,error:""};function F0({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:n,params:s,loading:a,paramsErrTip:c,viewMode:d,projectId:u}){const{t:h}=le(),x=()=>{l(i=>i+1)},g=()=>{l(i=>i-1)},y=i=>i===0?(c==null?void 0:c.blockletTitle)||(c==null?void 0:c.projectId)||(c==null?void 0:c.blockletDescription):i===2?c==null?void 0:c.blockletResource:i>=4?(c==null?void 0:c.blockletVersion)||(c==null?void 0:c.note):"",p=d||E0({hasSelectedResources:n,params:s,projectId:u,t:h})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(A2,{activeStep:t,orientation:"vertical",children:e.map((i,m)=>{const w={},v=a||!Fl({hasSelectedResources:n,params:s,projectId:u,step:m,t:h}),C=a?"":y(m);return C&&(w.optional=o.jsx(K,{variant:"caption",color:"error",children:C}),w.error=!0),o.jsxs(H2,{children:[o.jsx(ct,{icon:o.jsx(V1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...w,children:o.jsx(K,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:i.label})}),o.jsxs(mt,{children:[o.jsx(K,{fontSize:12,children:i.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:h("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:h("common.back")})]})})]})]},i.label)})}),t>=e.length-1&&o.jsx(h0,{square:!0,elevation:0,sx:{p:3},children:o.jsx(K,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}F0.propTypes={steps:f.array.isRequired,activeStep:f.number.isRequired,setActiveStep:f.func.isRequired,params:f.object.isRequired,viewMode:f.string.isRequired,loading:f.bool.isRequired,projectId:f.string.isRequired,hasSelectedResources:f.bool.isRequired,paramsErrTip:f.shape({projectId:f.string,blockletVersion:f.string,blockletTitle:f.string,blockletDescription:f.string,note:f.string,blockletResource:f.string}).isRequired};function Ue({readOnly:e,params:t,setParams:l,paramsErrTip:n,setParamsErrTip:s,loading:a}){var d;const{t:c}=le();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(ze,{required:!0,disabled:a||e,label:`Blocklet ${c("common.version")}`,placeholder:`Blocklet ${c("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{s({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!n.blockletVersion,helperText:n.blockletVersion||""}),o.jsx(ze,{label:c("blocklet.publish.releaseNote"),autoComplete:"off",disabled:a||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(f1,{position:"end",children:[((d=t==null?void 0:t.note)==null?void 0:d.length)||0," / ",ge.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{s({note:""}),l({note:u.target.value.slice(0,ge.PROJECT.MAX_NOTE_LENGTH)})},error:!!n.note,helperText:n.note||"",sx:{mt:3}})]})})}Ue.propTypes={readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired};Ue.defaultProps={};const Jl=[".zip",".gz"],Ql=1024*1024*100,Yl=R.lazy(()=>f0(()=>import("./react-DiBHU1pk.js").then(e=>e.r),__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])).then(e=>({default:e.Uploader})));function N1({app:e,projectId:t,readOnly:l,params:n,setParams:s,setParamsErrTip:a,error:c}){const{t:d}=le(),u=R.useRef(null),h=()=>l?!1:!t||t===U.UNOWNED_DID?(q.error(d("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(K,{gutterBottom:!0,children:d("blocklet.publish.resourceUpload")}),o.jsxs(w2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!n.uploadedResource&&o.jsx(K,{component:"a",href:`${x}/params.uploadedResource`,children:n.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;h()&&((g=u.current)==null||g.open())},children:n.uploadedResource?d("common.change"):d("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(we,{}),children:o.jsx(Yl,{ref:u,popup:!0,onUploadFinish:g=>{var y;s({uploadedResource:g.data.filename}),a({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:Jl,maxFileSize:Ql,maxNumberOfFiles:1}}},"uploader-resource")}),!!c&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:c})]})}N1.propTypes={app:f.object.isRequired,projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,error:f.string.isRequired,setParamsErrTip:f.func.isRequired};N1.defaultProps={};const Zl=({tabs:e,blocklet:t,ancestors:l=[]})=>{const n=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(p1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},n),value:n})},n0=(e,t)=>{const l=a1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(n=>({...n,included:!0})):l.blockletComponents=(t.children||[]).map(n=>({did:n.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},e3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},s0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function D1({initUrl:e,...t}){var H1;const{projectId:l,mode:n,releaseId:s,componentDid:a=""}=Ge(),{t:c}=le(),{blocklet:d}=Me(),[u,h]=Ce({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Ce({}),[y,p]=R.useState(!1),[i,m]=Ce(null),{api:w}=je(),v=Ae(N=>N.breakpoints.down("md")),[C,S]=R.useState({}),[V,T]=R.useState(!1),I=R.useRef({}),[k,O]=Ce({}),[D,P]=R.useState(""),[M,L]=Ce({}),E=e==null?void 0:e.searchParams.get("dependentComponentsMode"),A=E==="readonly",$=R.useCallback(N=>{A&&h({blockletComponents:[]}),L(N)},[A,L,h]),X=R.useCallback((...N)=>{O(...N),g({blockletResource:""})},[]),J=s==="none"?(u==null?void 0:u.lastReleaseId)||"":s,[W,te]=R.useState(n==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const pe=R.useMemo(()=>{var N;return(N=u==null?void 0:u.blockletComponents)!=null&&N.some(Q=>Q.included)||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource]),G=[],Y=((d==null?void 0:d.children)||[]).filter(N=>{var Q;return(Q=N.meta.resource)==null?void 0:Q.exportApi}).filter(N=>!a||N.meta.did===a);Y.forEach(N=>{Zl({tabs:G,blocklet:N,t:c,ancestors:[d]})});const[F,oe]=R.useState((H1=G[0])==null?void 0:H1.value),ae=!V&&(i==null?void 0:i.status)==="published",Z=ae,ce=R.useMemo(()=>{const N={};return Object.keys(M).forEach(Q=>{const Oe=M[Q];Oe&&Oe.forEach(G0=>{N[G0]=!0})}),N},[M]),_=async()=>{if(J)try{const N=await w.getRelease({input:{did:d.meta.did,projectId:l,releaseId:J}});if(p(!1),!N.release){q.error("Release not found");return}n!=="view"&&(N.release.note=""),h(Q=>n0({...Q,...N.release,blockletVersion:n==="create"||n==="new-release"?ye.inc(N.release.blockletVersion,"patch"):N.release.blockletVersion},d)),m(N.release)}catch(N){p(!1),q.error(Ve(N))}},H=async()=>{if(l===U.UNOWNED_DID){h({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){q.error(c("blocklet.publish.errorTip.noDid"));return}try{const N=await w.getProject({input:{did:d.meta.did,projectId:l}});p(!1);const Q=N.project||{};Q.blockletVersion?(n==="create"||n==="new-release")&&ye.valid(Q.blockletVersion)&&(Q.blockletVersion=ye.inc(Q.blockletVersion,"patch")):Q.blockletVersion="1.0.0";const Oe=n0(Q,d);h(Oe)}catch(N){p(!1),q.error(Ve(N))}},ee=R.useCallback(async()=>{if(n==="view"){if(!J){q.error("Empty release id");return}await H(),await _();return}await H(),J&&(T(!0),await _())},[n,J]),Le=N=>{h({blockletComponents:N})};R.useEffect(()=>{ee()},[ee]),R.useEffect(()=>{if(l===U.UNOWNED_DID&&(n==="create"||n==="new-release")&&e){P(e.searchParams.get("logo")),h({blockletTitle:e.searchParams.get("title"),blockletDescription:e.searchParams.get("description"),blockletIntroduction:e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:e.searchParams.get("note")||"No note"});const N=e.searchParams.get("resources");try{const Q=JSON.parse(N);S(Q)}catch{}}},[h,l,e,n]);const _1=R.useMemo(()=>!!Object.keys(k).find(N=>!!k[N].length),[k]);if(!u&&y)return o.jsx(we,{});if(!u)return null;const B1=Y.find(N=>N.meta.did===F);if(Y.every(N=>N.status!=="running"))return o.jsx(be,{children:c("blocklet.publish.allComponentsNotRunning")});const U0=N=>{oe(N)},E1=e==null?void 0:e.searchParams.get("resourcesTitle"),A1=e==null?void 0:e.searchParams.get("componentsTitle"),Re=[{label:c("blocklet.publish.branding"),description:c("blocklet.publish.steps.branding")},{label:c("common.introduction"),description:c("blocklet.publish.steps.introduction")},{label:E1||c("blocklet.publish.resourceTitle"),description:c("blocklet.publish.steps.resources")},{label:A1||c("common.components"),description:c("blocklet.publish.steps.blocklets")},{label:c("blocklet.publish.versionTitle"),description:c("blocklet.publish.steps.version")}],W0=Re[W]||Re[Re.length-1],ve=e3[W];return o.jsxs(t3,{...t,children:[o.jsx(A0,{blocklet:d,release:i,getData:ee,getRelease:_,mode:n,params:u,setParams:h,setParamsErrTip:g,readOnly:Z,isPublished:ae,loading:y,setLoading:p,initLogoUrl:D,releaseId:J,projectId:l,projectType:pe,resourceComponents:Y,resourceComponentsMap:M,resourceRelateComponents:ce,resourceItem:B1,saveSelectedEventsRef:I,hasSelectedResources:_1,releaseUsedLast:V,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(F0,{steps:Re,viewMode:n==="view",params:u,hasSelectedResources:_1||u.uploadedResource,paramsErrTip:x,activeStep:W,setActiveStep:te,projectId:l,resourcesUrlTitle:E1,componentsUrlTitle:A1}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&ve!=="introduction"&&o.jsxs(K,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[W0.label,ve==="branding"&&o.jsx(fe,{title:c("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{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(g2,{})})})]}),(v||ve==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(_0,{projectId:l,setParams:h,setParamsErrTip:g,params:u,componentDid:a,blocklet:d,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Z,initLogoUrl:D,setInitLogoUrl:P})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(Ue,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:Z})}),(v||ve==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(O0,{loading:y,readOnly:Z,params:u,setParams:h,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Re[s0.resources].label}),o.jsx(z,{display:v||ve==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(O2,{onChange:()=>h({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(t1,{value:"select",disabled:Z,control:o.jsx(W1,{size:"small",checked:u.resourceFromSelect}),label:c("blocklet.publish.resourceSelect")}),o.jsx(t1,{value:"select",disabled:Z,control:o.jsx(W1,{size:"small",checked:!u.resourceFromSelect}),label:c("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!a&&o.jsx(j2,{tabs:G,current:F,onChange:U0,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(M1,{loading:y,initialResources:C,saveSelectedEventsRef:I,selectedResourceIds:k,setSelectedResourceIds:X,setResourceComponentsMap:$,error:x.blockletResource,app:d,readOnly:Z,component:B1,componentDid:a,initUrl:e,params:u,setParams:h,projectId:l===U.UNOWNED_DID?"":l,releaseUsedLast:V,release:{...i,id:J}})]}),!u.resourceFromSelect&&o.jsx(N1,{app:d,readOnly:Z,projectId:l===U.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:h,setParamsErrTip:g})]})})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Re[s0.blocklets].label}),(v||ve==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(w1,{projectType:pe,disabled:y||Z,app:d,value:(u==null?void 0:u.blockletComponents)||[],onChange:Le,resourceRelateComponents:ce,dependentComponentsMode:E})})})}),!v&&ve==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(Ue,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:Z})})]})]})]})]})}D1.propTypes={initUrl:f.object};D1.defaultProps={initUrl:null};const t3=ie.div`
|
|
182
182
|
.section {
|
|
183
183
|
&.full-width {
|
|
184
184
|
max-width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,j as i,bt as h,B as p,P as o}from"./index-
|
|
1
|
+
import{r as y,j as i,bt as h,B as p,P as o}from"./index-BHVmBQ8E.js";var a={};Object.defineProperty(a,"__esModule",{value:!0});var f=a.default=void 0;v(y);var u=i;function v(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(n){g(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g(e,t,r){return t=b(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e){var t=j(e,"string");return typeof t=="symbol"?t:String(t)}function j(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 l=function(t){return(0,u.jsx)("svg",s(s({},t),{},{children:(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.361 2.4a.8.8 0 0 0-.728.469L.873 15.54a.8.8 0 0 0-.072.33V27.393a.8.8 0 0 0 .8.8h28.8a.8.8 0 0 0 .8-.8v-11.52a.8.8 0 0 0-.072-.331L25.37 2.869a.8.8 0 0 0-.728-.47H7.361zm-4.96 14.4v9.792h27.2v-9.799a.814.814 0 0 1-.104.007h-7.098l-2.066 3.1a.8.8 0 0 1-.666.356h-8.064a.8.8 0 0 1-.665-.356L8.87 16.8h-6.47zm26.816-1.6H21.97a.8.8 0 0 0-.665.356l-2.067 3.1h-7.208l-2.066-3.1a.8.8 0 0 0-.666-.356H2.785L7.876 4h16.25l5.09 11.2z",fill:"currentColor"})}))};l.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};l.displayName="empty";f=a.default=l;const O=h(p)`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|