@abtnode/webapp 1.16.32-beta-93e1a798 → 1.16.32-beta-76103be3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-D_k4pI9W.js → Add-CYL6mWWN.js} +1 -1
- package/dist/assets/{ArrowDropDown-Fj1T5r_G.js → ArrowDropDown-BY9IXE4A.js} +1 -1
- package/dist/assets/{Autocomplete-36UFOW-a.js → Autocomplete-CeATcLXj.js} +1 -1
- package/dist/assets/{Breadcrumbs-kKBUARWg.js → Breadcrumbs-BRm25na5.js} +1 -1
- package/dist/assets/{ButtonGroup-CES_ASkn.js → ButtonGroup-5T51_fHB.js} +1 -1
- package/dist/assets/{CheckCircle-BebjtNY9.js → CheckCircle-COO4TD6s.js} +1 -1
- package/dist/assets/{ChevronLeft-BVPkwsiy.js → ChevronLeft-Fyk5cpNu.js} +1 -1
- package/dist/assets/{ChevronRight-ChF0KBJG.js → ChevronRight-moY-cu3W.js} +1 -1
- package/dist/assets/{Close-DrkkcxlK.js → Close-D8oLRIX_.js} +1 -1
- package/dist/assets/{Delete-DzIkIBeP.js → Delete-DI8ao1el.js} +1 -1
- package/dist/assets/{DeleteOutline-Bby7Ht9O.js → DeleteOutline-2CfKkKNF.js} +1 -1
- package/dist/assets/{Done-LLl5p9CV.js → Done-D8e6wSHv.js} +1 -1
- package/dist/assets/{Edit-CF2dV-p0.js → Edit-B9Ehiwap.js} +1 -1
- package/dist/assets/{EditIcon-CS66rX17.js → EditIcon-BddQaWzk.js} +1 -1
- package/dist/assets/{ExpandMore-BjFpCvCs.js → ExpandMore-CmLPj7zV.js} +1 -1
- package/dist/assets/{Google-CEg0_-Ba.js → Google-DZt8LMoq.js} +1 -1
- package/dist/assets/{Https-6X3V6mo0.js → Https-BR-yj_sa.js} +1 -1
- package/dist/assets/{InputAdornment-ycCoKHr0.js → InputAdornment-CDjVsOnN.js} +1 -1
- package/dist/assets/{InputLabel-CbBV3Frl.js → InputLabel-Bhcrpb73.js} +1 -1
- package/dist/assets/{LastPage-BPNA0QD7.js → LastPage-ku2cuxND.js} +1 -1
- package/dist/assets/{Launch-BQ5k3Pyt.js → Launch-DylqmMLZ.js} +1 -1
- package/dist/assets/{Link-CrgCiVTG.js → Link-DUl9ANJx.js} +1 -1
- package/dist/assets/{LoadingButton-DK2qXs8-.js → LoadingButton-D5TBNdVg.js} +1 -1
- package/dist/assets/{LockIcon-Dsr8612h.js → LockIcon-D7l3BsGu.js} +1 -1
- package/dist/assets/{Loop-DKDVusA2.js → Loop-BtiVZaLC.js} +1 -1
- package/dist/assets/{MoreHoriz-DpkDHId8.js → MoreHoriz-Dy7WjyAm.js} +1 -1
- package/dist/assets/{MoreVert-EDIahDDk.js → MoreVert-DM8orz_D.js} +1 -1
- package/dist/assets/{Pagination-889zSuEV.js → Pagination-C1ZV4H2K.js} +1 -1
- package/dist/assets/{Public-B1TdO-Ph.js → Public-BIpuIkV1.js} +1 -1
- package/dist/assets/{SchemaReference.es-CIGzgiK1.js → SchemaReference.es-B4SP4Ws-.js} +1 -1
- package/dist/assets/{Search-Dol4CnmY.js → Search-C_DlQ668.js} +1 -1
- package/dist/assets/{Select-CYNjgjo3.js → Select-BDOvuGe0.js} +1 -1
- package/dist/assets/{Skeleton-CzjJPNB7.js → Skeleton-D2NCQ1JF.js} +1 -1
- package/dist/assets/{Slider-wwN-tiI7.js → Slider-ybwXGgSv.js} +1 -1
- package/dist/assets/{Stepper-BG1rAugU.js → Stepper-D8fFhRzz.js} +1 -1
- package/dist/assets/{TextField-B8Ndn_Ly.js → TextField-CoJHioJM.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-CgfxUxDK.js → ToggleButtonGroup-CkKogSiH.js} +1 -1
- package/dist/assets/{ViewColumn-DkiM5eqL.js → ViewColumn-BW5NTnEr.js} +1 -1
- package/dist/assets/{ViewList-SsmYyAxZ.js → ViewList-B42K5d3h.js} +1 -1
- package/dist/assets/{actions-C-Plplr7.js → actions-DR2GvD2x.js} +1 -1
- package/dist/assets/{actions-CrXporZt.js → actions-Q5fdP2ee.js} +1 -1
- package/dist/assets/{agreement-WG4qIDoW.js → agreement-DPH-KUpk.js} +1 -1
- package/dist/assets/api-TawhyGnA.js +1 -0
- package/dist/assets/{app-avatar-d8qNeOSe.js → app-avatar-DiMQa9I_.js} +1 -1
- package/dist/assets/ar-5o8kqNk7.js +1 -0
- package/dist/assets/{audit-logs--xCClvIG.js → audit-logs-BQ6jYFn1.js} +1 -1
- package/dist/assets/blocklet-KnROTCKk.js +1 -0
- package/dist/assets/{brace-fold.es-D9Lmc_JQ.js → brace-fold.es-B56dBBOM.js} +1 -1
- package/dist/assets/{bundle-avatar-Csnfb0Gl.js → bundle-avatar-DJRsbL7G.js} +1 -1
- package/dist/assets/{chart-YMtcv4Pw.js → chart-DW88TaGX.js} +1 -1
- package/dist/assets/{click-to-copy-BVC4LJBm.js → click-to-copy-CMUQ9Y1v.js} +1 -1
- package/dist/assets/{closebrackets.es-Bp0tSkEe.js → closebrackets.es-CtfS8FVT.js} +1 -1
- package/dist/assets/{codemirror.es-oZBhhqd0.js → codemirror.es-Clu9uzDr.js} +1 -1
- package/dist/assets/{comment.es-DsmOpPCK.js → comment.es-ftJwTsQk.js} +1 -1
- package/dist/assets/{config-navigation-C22iRX72.js → config-navigation-D5AV9jhh.js} +1 -1
- package/dist/assets/de-Lu3QkkkU.js +1 -0
- package/dist/assets/{delete-confirm-DB1Hsz09.js → delete-confirm-fRUNEY8P.js} +1 -1
- package/dist/assets/{detail-BRhupi6R.js → detail-H1qMK_gB.js} +3 -3
- package/dist/assets/{dialog.es-DUxAmmR0.js → dialog.es-BY-3wAlB.js} +1 -1
- package/dist/assets/{download-CS0Nwqbd.js → download-DrcyEU0O.js} +1 -1
- package/dist/assets/es-CTrW8z60.js +1 -0
- package/dist/assets/{foldgutter.es-BUBeDpkw.js → foldgutter.es-DEs9Y5p_.js} +1 -1
- package/dist/assets/fr-DU73a_6g.js +1 -0
- package/dist/assets/getValidReactChildren-BJfwUzUO.js +1 -0
- package/dist/assets/hi-KeUirlJV.js +1 -0
- package/dist/assets/{hint.es-DYpAHag2.js → hint.es-CuRQw2l5.js} +1 -1
- package/dist/assets/{hint.es2-BGuO_Ryp.js → hint.es2-19_hGMDU.js} +1 -1
- package/dist/assets/id-CtWLWcnp.js +1 -0
- package/dist/assets/{iframe-DP4MxIys.js → iframe-BarZzaPE.js} +1 -1
- package/dist/assets/{index-Dgsigr8r.js → index-0Ft2z6xS.js} +1 -1
- package/dist/assets/{index-DcM9WqBq.js → index-6oERWtWZ.js} +1 -1
- package/dist/assets/{index--bLRFav8.js → index-AWJRYhbz.js} +1 -1
- package/dist/assets/{index-CFm2Y_4c.js → index-B0Etshca.js} +1 -1
- package/dist/assets/{index-JJQ9Omt7.js → index-B4KKsK2w.js} +1 -1
- package/dist/assets/{index-D19VVree.js → index-B4e8OspN.js} +1 -1
- package/dist/assets/{index-C58ue_9I.js → index-B6JZD9dG.js} +1 -1
- package/dist/assets/{index-CLn0Mq8q.js → index-BB-aQ87S.js} +1 -1
- package/dist/assets/{index-XhvmS84N.js → index-BL1qG2uQ.js} +1 -1
- package/dist/assets/{index-BLWpQDG1.js → index-BOa6o-Wi.js} +1 -1
- package/dist/assets/{index-DZeE4hxl.js → index-BrYKZjn8.js} +1 -1
- package/dist/assets/{index-BJrQBQOR.js → index-Bx9liLR9.js} +1 -1
- package/dist/assets/{index-ChSFSE0T.js → index-CFbqwOwT.js} +1 -1
- package/dist/assets/{index-Ud3GHmKK.js → index-CLSy0tUH.js} +1 -1
- package/dist/assets/{index-BZupyUWp.js → index-CMDiWYJX.js} +1 -1
- package/dist/assets/{index-BVMgCTFa.js → index-CPdgmzE9.js} +1 -1
- package/dist/assets/{index-BJ57e_hS.js → index-CSXk_WTA.js} +1 -1
- package/dist/assets/{index-6g5X1kQS.js → index-CTpOly5o.js} +1 -1
- package/dist/assets/{index-DQOcXiyw.js → index-CTqyqrLq.js} +1 -1
- package/dist/assets/{index-X5ZsLA2j.js → index-CXJqFwhm.js} +1 -1
- package/dist/assets/{index-DITPbpVB.js → index-CZIxsK4T.js} +1 -1
- package/dist/assets/{index-CTRjGuKx.js → index-CdiJTzQI.js} +3 -3
- package/dist/assets/{index-f7uSWUvq.js → index-CgylxzQF.js} +1 -1
- package/dist/assets/{index-D4j0UCn_.js → index-CmX-Umqx.js} +1 -1
- package/dist/assets/{index-D_enoZPw.js → index-Cs0TUKTR.js} +1 -1
- package/dist/assets/{index-D_JFrv2N.js → index-D6UsCh2p.js} +1 -1
- package/dist/assets/{index-BdODRvyL.js → index-D8mUoFgo.js} +6 -6
- package/dist/assets/{index-Dz_vS133.js → index-DYK2EQ7V.js} +1 -1
- package/dist/assets/{index-B5kkYZq8.js → index-DZXlKHGG.js} +1 -1
- package/dist/assets/{index-C-rb1x2V.js → index-D_xDVR5H.js} +1 -1
- package/dist/assets/{index-5PA93kSc.js → index-Dg9n-_xK.js} +5 -5
- package/dist/assets/{index-9y4YR_6P.js → index-Do0aq595.js} +1 -1
- package/dist/assets/{index-Cd5kGc_9.js → index-DzYFajF6.js} +1 -1
- package/dist/assets/{index-CiSkmE2u.js → index-SV3zrmMG.js} +3 -3
- package/dist/assets/{index-TrxAhXnV.js → index-WtBXBqKg.js} +1 -1
- package/dist/assets/{index-BsrqDkz-.js → index-Y1bWQyGk.js} +1 -1
- package/dist/assets/{index-D-HUAuYc.js → index-a22Ja2CX.js} +1 -1
- package/dist/assets/{index-DcQHhGHM.js → index-cBd5oDpX.js} +18 -18
- package/dist/assets/{index-DL0tSq_I.js → index-inde7Wn7.js} +1 -1
- package/dist/assets/{index-C9LZUW4N.js → index-kg6lWzbc.js} +1 -1
- package/dist/assets/index-p5Ybg-VG.js +262 -0
- package/dist/assets/{index-B0pJul6M.js → index-wP2OY_7O.js} +1 -1
- package/dist/assets/{index-CpvpLQ3r.js → index-yZv1CPQL.js} +1 -1
- package/dist/assets/{index.es-B4ORsvbs.js → index.es-DcTTNKqB.js} +1 -1
- package/dist/assets/index.esm-CqHrM-Ma.js +1 -0
- package/dist/assets/{info-addon.es-BzRM6G1a.js → info-addon.es-lG3C_98K.js} +1 -1
- package/dist/assets/{info.es-DGgsrgEc.js → info.es-DjgYM5GN.js} +1 -1
- package/dist/assets/{install-from-url-C2gBahK1.js → install-from-url-DcHpop66.js} +1 -1
- package/dist/assets/{invitation-CdX27Uxz.js → invitation-B753aV0q.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-BkEH1NZx.js → is-path-prefix-equal-BFJx7w5Y.js} +1 -1
- package/dist/assets/{isEqual-CNnvQgen.js → isEqual-Su9d0hkn.js} +1 -1
- package/dist/assets/{item-JRZi_aRE.js → item-KCmSHWbY.js} +1 -1
- package/dist/assets/ja-CrqtPWVX.js +1 -0
- package/dist/assets/{javascript.es-By6ZeMFv.js → javascript.es-CNcHgRyw.js} +1 -1
- package/dist/assets/{jump-to-line.es-BBq6_jaH.js → jump-to-line.es-CVC5eDOp.js} +1 -1
- package/dist/assets/{jump.es-CwMJ9osH.js → jump.es-R0qBvtrd.js} +1 -1
- package/dist/assets/ko-Cl75HOeP.js +1 -0
- package/dist/assets/{line-CKpAedts.js → line-eO66oVAn.js} +3 -3
- package/dist/assets/{lint.es-1aZjgiyc.js → lint.es-BQykEASe.js} +1 -1
- package/dist/assets/{lint.es2-Db-t_UEm.js → lint.es2-BUs99akb.js} +1 -1
- package/dist/assets/{lint.es3-D8HsQO7s.js → lint.es3-BJ7sX9xy.js} +1 -1
- package/dist/assets/{list-header-B-qlxkz3.js → list-header-DzoL_tNh.js} +1 -1
- package/dist/assets/{log-Bk7_nQYj.js → log-D8yJrzuY.js} +1 -1
- package/dist/assets/{lottie-BM_265d4.js → lottie-BYm4a7hp.js} +1 -1
- package/dist/assets/{matchbrackets.es-BWKnOHAT.js → matchbrackets.es-DVjnqSH7.js} +1 -1
- package/dist/assets/{memory-nuYLHuFl.js → memory-DBC7Wm-8.js} +1 -1
- package/dist/assets/{mode.es-BDqcWOl_.js → mode.es-CrvL1Yyi.js} +1 -1
- package/dist/assets/{mode.es2-CB0HZW7S.js → mode.es2-Bags-JnQ.js} +1 -1
- package/dist/assets/{mode.es3-DyR4-E4M.js → mode.es3-g-pJHoeC.js} +1 -1
- package/dist/assets/{onlineParser.es-CPCTT-Qa.js → onlineParser.es-BgEIvPMt.js} +1 -1
- package/dist/assets/{overview-B97iWfKs.js → overview-_YfuT2Ov.js} +1 -1
- package/dist/assets/pt-DQT1OGc3.js +1 -0
- package/dist/assets/react-D9eBImHt.js +57 -0
- package/dist/assets/{redux-DYkNRFlr.js → redux-BH3C9XAu.js} +1 -1
- package/dist/assets/{resource-dialog-BhhfM8h1.js → resource-dialog-KAIovjN-.js} +1 -1
- package/dist/assets/ru-BnBjQSIA.js +1 -0
- package/dist/assets/{runtime-9pTI3HeQ.js → runtime-CEdmiAD4.js} +1 -1
- package/dist/assets/{schema-Bj-RxzG3.js → schema-wwWmfYW-.js} +1 -1
- package/dist/assets/sdk-Bv6yg8bl.js +1 -0
- package/dist/assets/{search.es-Djf8-sUv.js → search.es-DxJiXl6Q.js} +1 -1
- package/dist/assets/{searchcursor.es-DZEW11iz.js → searchcursor.es-Bn4f2L4I.js} +1 -1
- package/dist/assets/{service-Oon6YJGj.js → service-oWUtr6Yw.js} +1 -1
- package/dist/assets/{shorten-label-Dc8UKk1Q.js → shorten-label-Lg_99Bnv.js} +1 -1
- package/dist/assets/{show-hint.es-k48vHIcC.js → show-hint.es-BepsEBOL.js} +1 -1
- package/dist/assets/{slicedToArray-rpnwAzRV.js → slicedToArray-EQ7wsjih.js} +1 -1
- package/dist/assets/{spaces-BJikzBFK.js → spaces-C3B1lBZD.js} +1 -1
- package/dist/assets/{status-CBbIVZ8o.js → status-DvJ9autQ.js} +1 -1
- package/dist/assets/{sublime.es-C9MYLBy2.js → sublime.es-CRNTCjLM.js} +1 -1
- package/dist/assets/{switch-control-7-MGIzPK.js → switch-control-DbYUP3Fw.js} +1 -1
- package/dist/assets/{table-icons-BS_ATSp2.js → table-icons-CIkONNSe.js} +1 -1
- package/dist/assets/{team-CpKT_TRB.js → team-Wb8udSjg.js} +1 -1
- package/dist/assets/th-CGHFfwO3.js +1 -0
- package/dist/assets/{toUpper-Cji_NEex.js → toUpper-CcA1E8ED.js} +1 -1
- package/dist/assets/{traffic-D_VS-ogp.js → traffic-C6ffvmzo.js} +1 -1
- package/dist/assets/{url-evaluation-CeM0t6WP.js → url-evaluation-DVwxmsmN.js} +1 -1
- package/dist/assets/{url-join-C4mC0iDe.js → url-join-CCEOvX0C.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-DOU25_RL.js → use-blocklet-info-for-connect-did-spaces-BaobSB6f.js} +1 -1
- package/dist/assets/{useLocalStorage-Djk9mE88.js → useLocalStorage-DRh1c37j.js} +1 -1
- package/dist/assets/{useThemeProps-DZY4Hl_X.js → useThemeProps-B8R_skLY.js} +1 -1
- package/dist/assets/{util-Bg0Sovun.js → util-k9zeVRMZ.js} +1 -1
- package/dist/assets/vi-DmvzB5rE.js +1 -0
- package/dist/assets/{wait-container-BXER-iJR.js → wait-container-DnAuXm1V.js} +1 -1
- package/dist/assets/{withStyles-DeG1LPw1.js → withStyles-C-EdFo1-.js} +1 -1
- package/dist/assets/wrap-locale-U1j-csV9.js +1 -0
- package/dist/assets/zh-DdFcZXz5.js +2 -0
- package/dist/assets/zh-tw-DfkXr6W8.js +1 -0
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/api-B-aFuxhe.js +0 -1
- package/dist/assets/ar-BywPGmOa.js +0 -1
- package/dist/assets/blocklet-fx7ejRT1.js +0 -1
- package/dist/assets/de-qs3PjT55.js +0 -1
- package/dist/assets/es-DXb9xB6c.js +0 -1
- package/dist/assets/fr-CMgZc3LR.js +0 -1
- package/dist/assets/getValidReactChildren-DP5iwnLz.js +0 -1
- package/dist/assets/hi-Ch52Lky6.js +0 -1
- package/dist/assets/id-_x67Rh2B.js +0 -1
- package/dist/assets/index-BarUm_gh.js +0 -262
- package/dist/assets/index.esm-B270ufs-.js +0 -1
- package/dist/assets/ja-BemsOTjE.js +0 -1
- package/dist/assets/ko-CqkhhVdi.js +0 -1
- package/dist/assets/pt-DZmF_qcN.js +0 -1
- package/dist/assets/react-B2TCaRmX.js +0 -57
- package/dist/assets/ru-BFNdjdAO.js +0 -1
- package/dist/assets/sdk-muHS20Ah.js +0 -1
- package/dist/assets/th-B61cOYck.js +0 -1
- package/dist/assets/vi-B884zOLu.js +0 -1
- package/dist/assets/wrap-locale-C0m1LlXs.js +0 -1
- package/dist/assets/zh-kNAPjCk5.js +0 -2
- package/dist/assets/zh-tw-Bn1Pkz9A.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as
|
|
1
|
+
import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as je,P as i,E as A,r as h,f as ve,bo as Ye,b as J,N as O,K as dt,V as Ft,cb as Oe,n as F,M as X,hF as qo,bG as Me,aY as pe,aX as gt,aC as Gt,a2 as $,D as xt,aP as Vo,Z as Je,a0 as Hn,b1 as Wo,fQ as Ho,fR as Ko,C as re,fd as Yo,z as uo,av as pt,q as Ie,y as zt,hG as Jo,hH as Zo,B as ne,ai as mo,J as Ht,hI as Qo,m as te,a3 as Xo,dW as $o,W as fo,$ as ho,ak as es,x as ts,R as He,X as ns,hJ as go,U as xe,az as os,aA as ss,aB as is,i as yt,aN as rs,cx as as,bg as ls,hf as cs,hK as ds,ay as Kn,cv as ps,H as B,ac as Fe,aJ as xo,bI as Kt,cd as us,hL as ms,b7 as fs,A as hs,aZ as _t,T as gs,aQ as Ke,at as Nt,bp as yo,aF as xs,fN as Re,dZ as ys,hM as Cs,gr as Yn,hN as Jn,gt as Zn,a_ as js,G as at,gv as vs,bH as Ss}from"./index-D8mUoFgo.js";import{d as bs}from"./Add-CYL6mWWN.js";import{a as Rs,R as ct,F as Es,L as Ts,d as Yt,b as Jt}from"./line-eO66oVAn.js";import{C as ws,A as Ps,d as Is}from"./agreement-DPH-KUpk.js";import{E as ks}from"./index-DzYFajF6.js";import{b as Us,a as Ds,c as Bs,u as Zt,e as Ns}from"./actions-Q5fdP2ee.js";import{S as As}from"./switch-control-DbYUP3Fw.js";import{u as oe}from"./blocklet-KnROTCKk.js";import{d as Co}from"./Edit-B9Ehiwap.js";import{T as Ls}from"./index-Bx9liLR9.js";import{T as Os,M as Ms,t as Fs}from"./table-icons-CIkONNSe.js";import{C as Qn}from"./click-to-copy-CMUQ9Y1v.js";import{T as Z}from"./TextField-CoJHioJM.js";import{d as Qt}from"./Link-DUl9ANJx.js";import{c as Gs,C as zs,a as _s,s as jo,b as qs,D as Vs,A as Ws,B as Hs,d as Ks,S as Ys}from"./item-KCmSHWbY.js";import{u as Js,a as Zs,P as vo,L as Xn,A as Qs,S as Xs}from"./index-a22Ja2CX.js";import{u as So,t as $s}from"./toUpper-CcA1E8ED.js";import{a as ei,b as ti,c as ni,d as oi,e as si,g as $n,f as ii,i as eo}from"./spaces-C3B1lBZD.js";import{d as ri}from"./EditIcon-BddQaWzk.js";import{d as ai}from"./Done-D8e6wSHv.js";import{C as li}from"./Google-DZt8LMoq.js";import{I as ci,a as di,f as pi,B as ui}from"./install-from-url-DcHpop66.js";import{a as to}from"./api-TawhyGnA.js";import{v as bo,a as ut,b as mi}from"./util-k9zeVRMZ.js";import{P as fi,u as hi}from"./use-blocklet-info-for-connect-did-spaces-BaobSB6f.js";import{d as gi}from"./DeleteOutline-2CfKkKNF.js";import{S as no}from"./index-yZv1CPQL.js";import{d as xi}from"./ArrowDropDown-BY9IXE4A.js";import{_ as yi}from"./useLocalStorage-DRh1c37j.js";import{d as Ci}from"./LockIcon-D7l3BsGu.js";import{d as Ct}from"./Delete-DI8ao1el.js";import{d as Ro}from"./Launch-DylqmMLZ.js";import{C as ji}from"./delete-confirm-fRUNEY8P.js";import{W as Ze}from"./url-evaluation-DVwxmsmN.js";import{d as vi}from"./is-path-prefix-equal-BFJx7w5Y.js";import{R as Si,a as oo,B as Eo}from"./status-DvJ9autQ.js";import{B as bi}from"./bundle-avatar-DJRsbL7G.js";import{A as To}from"./actions-DR2GvD2x.js";import{I as At}from"./index-CTqyqrLq.js";import{a as Ri}from"./index-CSXk_WTA.js";import{u as Ei}from"./team-Wb8udSjg.js";import"./ButtonGroup-5T51_fHB.js";import"./getValidReactChildren-BJfwUzUO.js";import"./index-CgylxzQF.js";import"./index-WtBXBqKg.js";import"./url-join-CCEOvX0C.js";import"./MoreVert-DM8orz_D.js";import"./slicedToArray-EQ7wsjih.js";import"./ChevronLeft-Fyk5cpNu.js";import"./redux-BH3C9XAu.js";import"./memoize-one.esm-BdPwpGay.js";import"./ViewColumn-BW5NTnEr.js";import"./ChevronRight-moY-cu3W.js";import"./Search-C_DlQ668.js";import"./Select-BDOvuGe0.js";import"./InputLabel-Bhcrpb73.js";import"./index-0Ft2z6xS.js";import"./index-ZG7jWpak.js";import"./InputAdornment-CDjVsOnN.js";import"./preact.module-DJUF--8d.js";import"./Skeleton-D2NCQ1JF.js";import"./Close-D8oLRIX_.js";import"./lottie-BYm4a7hp.js";import"./schema-wwWmfYW-.js";import"./index-DZXlKHGG.js";import"./isEqual-Su9d0hkn.js";import"./index-inde7Wn7.js";import"./Stepper-D8fFhRzz.js";import"./ExpandMore-CmLPj7zV.js";import"./shorten-label-Lg_99Bnv.js";import"./MoreHoriz-Dy7WjyAm.js";const Ti=_o(e.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"}),"TextSnippetOutlined");var Xt={},wi=Wt;Object.defineProperty(Xt,"__esModule",{value:!0});var wo=Xt.default=void 0,Pi=wi(Vt()),Ii=e;wo=Xt.default=(0,Pi.default)((0,Ii.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");function $t({children:t,...o}){var g;const{t:s}=z(),{api:a}=K(),{blocklet:n}=oe(),r=(g=n==null?void 0:n.settings)==null?void 0:g.autoCheckUpdate,m=async f=>{await a.updateAutoCheckUpdate({input:{did:n.meta.did,autoCheckUpdate:f}})},l=async()=>{try{const f=!(r!=null&&r.enabled);await m({enabled:f}),A.success(s(f?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(f){A.error(f.message)}},u=!!(r!=null&&r.enabled);return e.jsxs(y,{display:"flex",flexDirection:"row",alignItems:"center",children:[t,e.jsx(je,{title:s("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:e.jsx("div",{children:e.jsx(As,{checked:u,onChange:l,name:"enableWelcomePage",style:{...o.style,zoom:.8}})})})]})}$t.propTypes={children:i.any};$t.defaultProps={children:null};const ki=(t,o)=>{let{description:s}=t;return(Object.values(J.CHAIN_PROP_MAP).includes(t.key)||O.isEnvShareable(t))&&(s?s=`${s} (${o("blocklet.config.sharedToAllComponents")})`:s=o("blocklet.config.sharedToAllComponents")),s&&e.jsx("div",{style:{marginLeft:12},children:s})},Lt=(t,o,s=[])=>!(s!=null&&s.length)&&!t.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(t.key)&&!o.meta.environments.find(a=>a.name===t.key)&&o.children.every(a=>!a.meta.environments.find(n=>n.name===t.key))?!0:t.custom,so=t=>[J.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)?!0:!(t.startsWith("BLOCKLET_")||t.startsWith("COMPONENT_")),Ot=t=>[J.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)===!1;function mt({blocklet:t,ancestors:o}){const s=K(),{inService:a}=s,{t:n}=h.useContext(ve),r=[...o.map(c=>c.meta.did),t.meta.did],m=()=>A.success(n("blocklet.config.changedTip")),l=c=>Lt(c,t,o);if(Ye(t.status)||t.status==="unknown"&&Ye(t.status))return null;const u=async c=>{if(!c.key.trim()||!c.value.trim()){A.error(n("blocklet.config.environment.keyValueRequired"));return}if(so(c.key)===!1){A.error(n("blocklet.config.environment.invalidKey"));return}c.custom=Ot(c.key);try{const S=await s.api.configBlocklet({input:{did:r,configs:[c]}});m(S.blocklet)}catch(S){A.error(X(S))}},g=async(c,S)=>{if(c.required&&(!c.key.trim()||!c.value.trim())){A.error(n("blocklet.config.environment.keyValueRequired"));return}if(so(c.key)===!1){A.error(n("blocklet.config.environment.invalidKey"));return}if(c.key===J.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const w=qo(c);if(w){A.error(w);return}}const j=[{...c,value:c.secure&&c.value==="__encrypted__"?"":c.value}];if(c.key!==S.key){if(!Lt(c,t,o)){A.error("Only key of custom env can be changed");return}j.push({key:S.key,custom:Ot(c.key)})}try{const w=await s.api.configBlocklet({input:{did:r,configs:j}});m(w.blocklet)}catch(w){A.error(X(w))}},f=async c=>{if(c.required){A.error(n("blocklet.config.environment.deleteForbidden"));return}if(!Lt(c,t,o)){A.error("Only key of custom env can be changed");return}try{const S=await s.api.configBlocklet({input:{did:r,configs:[{key:c.key,custom:Ot(c.key)}]}});m(S.blocklet)}catch(S){A.error(X(S))}},p=(t.configs||[]).filter(c=>!J.BLOCKLET_CONFIGURABLE_KEY[c.key]||[J.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(c.key)),v=O.getSharedConfigObj(o[0],t),d=O.getComponentMissingConfigs(t,o[0]),b=p.map(c=>({...c,value:Object.values(J.CHAIN_PROP_MAP).includes(c.key)&&Object.keys(v).includes(c.key)?v[c.key]:v[c.key]||c.value})),C=b.some(c=>c.key&&c.key.startsWith("BWA_")),x={onRowAdd:u,onRowUpdate:g,onRowDelete:f,isDeletable:l},R=()=>[{title:n("common.key"),field:"key",initialEditValue:"Key",width:"30%",render:c=>e.jsx(Qn,{value:c.value,style:{color:c.required&&!c.value?"#ff4436":"#222222",fontWeight:c.required?"bold":"normal"},children:c.key}),editComponent:c=>{const{value:S,rowData:j,onChange:w}=c;return e.jsx(io,{children:e.jsx(Z,{fullWidth:!0,size:"small",disabled:l(j)===!1,value:S,onChange:k=>w(k.target.value),variant:"outlined",label:"Key",placeholder:n("blocklet.config.environment.key"),margin:"dense",autoFocus:!0})})}},{title:n("common.value"),field:"value",initialEditValue:"Value",width:"calc((100% - (96px + 30%)) / 1)",render:c=>c.value?c.secure?"******":e.jsx(Qn,{unstyled:!0,value:c.value,style:{wordBreak:"break-all"},children:c.value}):null,editComponent:c=>{const{value:S,rowData:j,onChange:w}=c;return e.jsxs(io,{children:[e.jsx(Z,{fullWidth:!0,size:"small",value:S==="__encrypted__"?"":S,onChange:k=>w(k.target.value),variant:"outlined",label:n("common.value"),placeholder:n("blocklet.config.environment.value"),margin:"dense",autoFocus:!0}),ki(j,n)]})}}];return e.jsxs(Ui,{children:[!!d.length&&e.jsx(dt,{severity:"error",style:{marginTop:24},children:n("blocklet.config.missingRequired")}),C&&e.jsx(dt,{severity:"info",children:n("blocklet.config.environment.tip")}),e.jsx(Ft,{permission:a?"":"mutate_blocklets",role:a?Oe:[],children:c=>e.jsx(Os,{className:"config-table",children:e.jsx(Ms,{title:e.jsx("h4",{children:n("common.environment")}),columns:R(),icons:{...Us,...Fs},options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1},localization:{header:{actions:n("common.actions")},body:{emptyDataSourceMessage:n("common.noData")}},data:b,editable:c?x:{}})})})]})}mt.propTypes={blocklet:i.object.isRequired,ancestors:i.array};mt.defaultProps={ancestors:[]};const Ui=F.div`
|
|
2
2
|
.config-table {
|
|
3
3
|
margin-bottom: 24px;
|
|
4
4
|
position: relative;
|
|
@@ -52,7 +52,7 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
52
52
|
}
|
|
53
53
|
`,io=F.div`
|
|
54
54
|
height: 60px;
|
|
55
|
-
`;function jt({blocklet:t,ancestors:o,hasPermission:s,...a}){const{t:n}=z(),{api:r}=K(),m=!o.length,l=m?t.meta.did:o.map(C=>C.meta.did)[0],[u,g]=h.useState(""),[f,p]=h.useState(""),
|
|
55
|
+
`;function jt({blocklet:t,ancestors:o,hasPermission:s,...a}){const{t:n}=z(),{api:r}=K(),m=!o.length,l=m?t.meta.did:o.map(C=>C.meta.did)[0],[u,g]=h.useState(""),[f,p]=h.useState(""),v=u||!s;if(!l||t.status==="unknown"&&Ye(t.status))return null;const d=async C=>{g(!0);try{const x={rootDid:l,mountPoint:pe(C)};return m||(x.did=t.meta.did),await r.updateComponentMountPoint({input:x}),g(!1),!0}catch(x){throw g(!1),x.message=X(x),A.error(x.message),x}},b=C=>{p(n("common.slugifyHint",{value:gt(C)}))};return e.jsx(Ai,{component:"div",...a,children:e.jsx(y,{mt:3,children:e.jsx(Rs,{label:n("blocklet.component.mountPoint"),style:{marginTop:-24},disabled:u||v,loading:u,required:!0,initialValue:t.mountPoint,onSubmit:d,onChange:b,helperText:f,formatterBeforeSubmit:C=>pe(C)})})})}const Di=Me(jt,"mutate_blocklets"),Bi=Me(jt,"",Oe);function Ni(t){const{inService:o}=K();return o?e.jsx(Bi,{...t}):e.jsx(Di,{...t})}jt.propTypes={blocklet:i.object.isRequired,ancestors:i.array,hasPermission:i.bool};jt.defaultProps={ancestors:[],hasPermission:!1};const Ai=F.div``;function vt({open:t,onClose:o,hiddenChildren:s,blocklet:a,ancestors:n,children:r}){const[m,l]=h.useState(!1),{t:u}=z(),g=!!n.length,[f,p]=h.useState(Gt.hasMountPoint(a==null?void 0:a.meta)?"settings":"environments"),v=g?O.getDisplayName(a,!0):u("blocklet.component.container");if(Ye(a.status)||a.status==="unknown"&&Ye(a.status))return null;const d=()=>{o==null||o(),l(!1)},b=w=>{w.stopPropagation(),l(!0)},C={settings:Gt.hasMountPoint(a.meta)&&{label:u("blocklet.component.setting"),value:"settings",component:e.jsx(Ni,{blocklet:a,ancestors:n})},environments:{label:u("common.environment"),value:"environments",component:e.jsx(mt,{blocklet:a,ancestors:n})}},x=Object.values(C).filter(Boolean),R=x.map(({label:w,value:k})=>({label:w,value:k})),c=w=>{p(w)},S=C[f]||x[0];let j=null;return s||(j=typeof r=="function"?r({open:b}):e.jsx($,{onClick:b,"data-cy":"action-config-component",children:e.jsx(Co,{})})),e.jsxs(e.Fragment,{children:[j,(t||m)&&e.jsx(Li,{open:!0,fullWidth:!0,maxWidth:"md",title:v,onClose:d,PaperProps:{style:{minHeight:"auto"}},children:g?e.jsxs(y,{mt:1,children:[e.jsx(Ls,{tabs:R,current:f,onChange:c,scrollButtons:"auto"}),S.component]}):e.jsx(mt,{blocklet:a,ancestors:n})})]})}vt.propTypes={blocklet:i.object.isRequired,ancestors:i.array,children:i.any,open:i.bool,onClose:i.func,hiddenChildren:i.bool};vt.defaultProps={ancestors:[],children:null,open:!1,onClose:null,hiddenChildren:!1};const Li=F(xt)`
|
|
56
56
|
.MuiDialogContent-root {
|
|
57
57
|
padding-top: 0;
|
|
58
58
|
margin-top: -32px;
|
|
@@ -63,7 +63,7 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
63
63
|
.ux-dialog_right {
|
|
64
64
|
padding-right: 20px;
|
|
65
65
|
}
|
|
66
|
-
`;function Oi(){const[t,o]=h.useState(null),{blocklet:s}=oe();return h.useEffect(()=>{o(ei(s))},[s]),{storageEndpoint:t}}const Po=h.createContext({}),{Provider:Mi,Consumer:Xa}=Po;function en({children:t}){const[o,s]=h.useState(!1),[a,n]=h.useState(null),{blocklet:r,actions:{refreshBlocklet:m}}=oe(),{storageEndpoint:l}=Oi(),{api:u}=K();Vo(async()=>{try{if(s(!0),Hn.isEmpty(l)){n(null);return}const d=await ti(l);n(d)}catch(d){console.error(d),A.error(d.message)}finally{s(!1)}},[l]);const g=()=>{n(null),m()},f=async d=>{n(d),await p(d.endpoint),m()},p=async d=>{await u.configBlocklet({input:{did:[r.meta.did],configs:[{key:J.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:d}]}}),m()};h.useEffect(()=>{async function d(){if(!a)return;const b=await ni(a.endpoint,a.name),C=Hn.merge(a,{name:b});n(C)}d()},[]);const
|
|
66
|
+
`;function Oi(){const[t,o]=h.useState(null),{blocklet:s}=oe();return h.useEffect(()=>{o(ei(s))},[s]),{storageEndpoint:t}}const Po=h.createContext({}),{Provider:Mi,Consumer:Xa}=Po;function en({children:t}){const[o,s]=h.useState(!1),[a,n]=h.useState(null),{blocklet:r,actions:{refreshBlocklet:m}}=oe(),{storageEndpoint:l}=Oi(),{api:u}=K();Vo(async()=>{try{if(s(!0),Hn.isEmpty(l)){n(null);return}const d=await ti(l);n(d)}catch(d){console.error(d),A.error(d.message)}finally{s(!1)}},[l]);const g=()=>{n(null),m()},f=async d=>{n(d),await p(d.endpoint),m()},p=async d=>{await u.configBlocklet({input:{did:[r.meta.did],configs:[{key:J.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:d}]}}),m()};h.useEffect(()=>{async function d(){if(!a)return;const b=await ni(a.endpoint,a.name),C=Hn.merge(a,{name:b});n(C)}d()},[]);const v=!!(l&&a);return e.jsx(Mi,{value:{loading:o,spaceGateway:a,deleteSpaceGateway:g,updateSpaceGateway:f,storageEndpoint:l,settingStorageEndpoint:p,hasStorageEndpoint:v},children:t})}en.propTypes={children:Je.node.isRequired};en.defaultProps={};function tn(){return h.useContext(Po)}const nn={description:i.string,editing:i.bool,onChange:i.func,required:i.bool,value:i.any,componentProps:i.object,render:i.func,renderFormItem:i.func};function on({editing:t,value:o,onChange:s}){const[a,n]=h.useState(!1),r=h.useRef(),m=h.useRef(o);h.useEffect(()=>{let p=null;return t&&(p=setTimeout(()=>{n(!0)},50)),()=>{clearTimeout(p)}},[t]);const l=p=>{m.current=p,s(p)},u=()=>{n(!1),s(m.current)},g=e.jsx(y,{className:"form-item-input slot",px:1,children:e.jsxs(y,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&e.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),f=e.jsxs(y,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:u,children:[e.jsx(y,{display:"flex",alignItems:"center",onClick:()=>n(!0),children:e.jsx("div",{ref:r,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),e.jsx(Wo,{open:a,anchorEl:r.current,onClose:()=>n(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:e.jsx(li,{color:o,onChange:p=>l(p.hex)})})]});return t?f:g}on.propTypes=nn;function sn({editing:t,description:o,value:s,onChange:a,componentProps:n,...r}){const{placeholder:m}=n,l=h.useRef(s),u=f=>{f.key==="Enter"&&a(l.current,"confirm")},g=f=>{l.current=f,a(f)};return t?e.jsx(Z,{style:{flex:1},fullWidth:!0,value:s,onChange:f=>{f.persist(),g(f.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||m,onKeyDown:u,...r}):e.jsx(y,{px:1,className:"form-item-input slot",children:s})}sn.propTypes=nn;sn.defaultProps={componentProps:{}};function rn({editing:t,value:o,onChange:s,componentProps:a,...n}){const{blocklet:r}=a,m=o==="auto"?Ho.getPassportColorFromDid(r.appDid):o;return e.jsxs(y,{display:"flex",alignItems:"center",children:[e.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:Ko({title:"Owner",issuer:O.getDisplayName(r),issuerDid:r.appDid,ownerName:"Your Name",ownerDid:r.appDid,preferredColor:o||"auto"})}}),e.jsx(on,{...n,editing:t,value:t?m:o,onChange:s,componentProps:a})]})}rn.propTypes={...nn,componentProps:i.shape({blocklet:i.object.isRequired}).isRequired};rn.defaultProps={};const Fi={input:sn,color:on,passport:rn,uploader:t=>e.jsx(Ts,{...t.componentProps})};function Gi(t,{editing:o=!1}){const{componentType:s="input",render:a,renderFormItem:n}=t;return o&&n?n:!o&&a?a:Fi[s==null?void 0:s.toLowerCase()]}function an({schema:t,loading:o,value:s,defaultValue:a,onChange:n,style:r,disabled:m}){const l=Object.prototype.toString.call(s)==="[object Object]",[u,g]=h.useState(null),[f,p]=h.useState(l?s:a),v=h.useRef();function d(x,R,c){const{key:S,secure:j}=x,k=f[S]!==R,U={...f,[S]:R};k&&p(U),n({[S]:R},{allValues:U,action:c,currentItem:x}),c==="confirm"&&j&&p({...f,[S]:"__encrypted__"}),["confirm","cancel"].includes(c)?b(null):b(x)}function b(x){if(x){v.current=f[x.key],g(x);return}v.current=null,g(null)}function C(x,{editing:R=!1}){const{key:c}=x,S=l?s[c]:f[c];return S==="__encrypted__"?R?"":"******":S}return e.jsx(zi,{className:"form",style:r,children:t==null?void 0:t.map(x=>{const{key:R,description:c,required:S,solo:j=!1,hidden:w=!1,componentProps:k={}}=x;if(w)return null;const U=!!(u&&R===u.key),L=C(x,{editing:U}),D=Gi(x,{editing:U}),M={inputProps:{"data-cy":"schema-form-item-component"},key:R,description:c,editing:U,value:L,onChange:(I,q="change")=>d(x,I,q),componentProps:k};return e.jsxs(y,{className:"form-item",children:[!j&&e.jsxs(y,{className:"form-item-label",style:{color:S&&!L?"#ff0000":"#333"},children:[c,S&&e.jsx(ct,{})]}),e.jsxs(y,{className:"form-item-body",children:[e.jsx(y,{className:"form-item-input",sx:{textAlign:j?"center":"left"},children:e.jsx(D,{...M})}),!j&&e.jsx(y,{className:"form-item-action",children:U?e.jsxs(e.Fragment,{children:[e.jsx($,{"data-cy":"schema-form-item-confirm",onClick:()=>{d(x,L,"confirm")},disabled:m||o,size:"large",children:o?e.jsx(re,{size:24}):e.jsx(ai,{})}),e.jsx($,{"data-cy":"schema-form-item-cancel",onClick:()=>{d(x,v.current,"cancel")},disabled:m||o,size:"large",children:e.jsx(Yo,{})})]}):e.jsx($,{"data-cy":"schema-form-item-edit",onClick:()=>{d(x,f[R],"edit")},disabled:m||u,size:"large",children:e.jsx(ri,{})})})]})]},R)})})}an.propTypes={schema:i.array.isRequired,loading:i.bool,onChange:i.func.isRequired,value:i.object,defaultValue:i.object,style:i.object,disabled:i.bool};an.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};const zi=F(Es)``;function ln({meta:t,onCancel:o,mode:s,handlePaySuccess:a}){const{t:n,locale:r}=z(),{info:m}=K(),l=uo(m),[u,g]=h.useState(null),f=new URL(t==null?void 0:t.registryUrl).origin,p=O.getDisplayName({meta:t}),v=async(b,C)=>{const x=({downloadTokenList:S})=>{a({downloadTokenList:S})},R=S=>{A.error(S),o(S)};function c(S){return Zo(()=>to.get(S).then(async({data:j})=>{const w=j==null?void 0:j.downloadTokenList;if(j.status==="succeed"){if(w&&w.length)await x({downloadTokenList:w});else return await R(n("blocklet.component.missDownloadTokenTip")),!0;return!0}return j.status==="error"?(console.error("vc error: ",j),await R(j==null?void 0:j.error),!0):!1}),{interval:1e3})}if(s==="purchase"&&u){const{statusUrl:S}=Jo(u);await c(S)}else await x({downloadTokenList:b.downloadTokenList&&C(b.downloadTokenList)})};if(h.useEffect(()=>{if(s==="purchase"){const b=new URL(f);b.pathname="/api/did/verify-purchase-blocklet/token",b.searchParams.set("serverDid",m.did),b.searchParams.set("blockletDid",t==null?void 0:t.did);try{to.get(b.href).then(({data:C})=>{const x=`${C.url}`;g(x)})}catch(C){console.error("get next workflow url error: ",C)}}return()=>{g(null)}},[s]),s==="purchase"&&!u)return"";const d={verify:{action:"verify-purchase-blocklet",checkFn:pt.create({baseURL:f}).get,extraParams:{serverDid:m.did,blockletDid:t==null?void 0:t.did},messages:{title:n("store.purchase.verify.auth.title",{name:p}),scan:n("store.purchase.verify.auth.scan"),confirm:n("store.purchase.verify.auth.confirm"),success:n("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:pt.create({baseURL:Ie(f,"/store")}).get,extraParams:{factory:t.nftFactory,nw:u},messages:{title:n("store.purchase.auth.title",{name:p}),scan:n("store.purchase.auth.scan"),confirm:n("store.purchase.auth.confirm"),success:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:n("store.purchase.auth.success")}),e.jsx("p",{children:n("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return e.jsx(zt,{open:!0,locale:r,popup:!1,saveConnect:!1,className:"connect",baseUrl:f,onSuccess:v,cancelWhenScanned:o,onClose:o,checkTimeout:60*5e3,webWalletUrl:l,disableClose:!0,showDownload:!1,...d[s]})}ln.propTypes={...Gs,handlePaySuccess:i.func,mode:i.oneOf(["verify","purchase"]).isRequired};ln.defaultProps={handlePaySuccess:()=>{}};const cn=h.forwardRef(({mode:t,...o},s)=>{const[a,n]=h.useState(t!=="both"?t:"verify"),[r,m]=h.useState(t!=="both"?2:1),l=g=>{g!==a&&n(g)},u=()=>{a&&r!==2&&m(2)};return h.useImperativeHandle(s,()=>({onNext:u,getCurrentStep:()=>r})),r===1?e.jsx("div",{style:{maxWidth:520},children:e.jsx(zs,{action:a,onNext:null,onSelect:l})}):e.jsx(ln,{...o,mode:a})});cn.propTypes={mode:i.oneOf(["both","verify","purchase"]).isRequired,ref:i.any};cn.defaultProps={ref:{}};const _i=cn;function qi({...t}){return e.jsx(ne,{className:"bottom-button",variant:"contained",color:"primary",...t})}function dn({key:t}={key:"sm"}){const o=mo();return Ht(o.breakpoints.down(t))}function pn({blocklet:t,onStartNow:o,children:s,disabled:a}){const{t:n}=z(),r=dn();return!t||Qo(t.meta)?e.jsx(Vi,{children:s}):e.jsxs(Wi,{isMobile:r,children:[e.jsx(qi,{className:"start-now",variant:"contained",color:"primary",disabled:a,onClick:()=>o(),children:n("setup.startNow")}),e.jsx(y,{display:"flex",alignItems:"center",children:s})]})}pn.propTypes={blocklet:i.object,onStartNow:i.func,children:i.any,disabled:i.bool};pn.defaultProps={blocklet:null,onStartNow:()=>{},children:null,disabled:!1};const Vi=F(y)`
|
|
67
67
|
width: 100%;
|
|
68
68
|
margin-top: auto;
|
|
69
69
|
padding-top: 24px;
|
|
@@ -108,7 +108,7 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
108
108
|
justify-content: space-between;
|
|
109
109
|
gap: '32px',
|
|
110
110
|
}}
|
|
111
|
-
`;var Io=function(o){return e.jsxs("svg",{...o,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/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3Mffn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SeFUX5a9bl1On+cL5YHUjp/eID+XwV2AwZUXHswFw0IhIUlwmaTdQtlKJUpbAArh1IONYy6WQkAc9+ZocJMnELtCFNKLySGLwUIuW1fJLBKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};Io.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function ko(){const{t}=z();return e.jsx(y,{children:e.jsxs(y,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(Io,{style:{width:200,height:250}}),e.jsx(ee,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.providerForStorage")})]})})}ko.propTypes={};function un({spaceGateway:t,onDeleteSpace:o}){const{t:s}=z(),[a,n]=h.useState(!1),[r,m]=h.useState(!1),l=(g,f)=>{g==null||g.stopPropagation(),n(f)},u=async g=>{try{g==null||g.stopPropagation(),m(!0),await o(t),n(!1)}catch(f){console.error(f),A.error(`${s("storage.spaces.gateway.delete.failed")}: ${X(f)}`)}finally{m(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx($,{size:"small",onClick:g=>l(g,!0),children:e.jsx(gi,{})}),e.jsx(Xo,{title:s("common.delConfirmDescription",{data:`${t==null?void 0:t.name}`}),open:a,confirmButton:{text:s("common.confirm"),props:{variant:"contained",color:"error",loading:r}},cancelButton:{text:s("common.cancel"),props:{variant:"contained",color:"primary"}},onConfirm:u,onCancel:g=>l(g,!1)})]})}un.propTypes={onDeleteSpace:i.func,spaceGateway:i.shape({name:i.string.isRequired,url:i.string.isRequired,protected:i.bool}).isRequired};un.defaultProps={onDeleteSpace:()=>{}};var Uo=function(o){return e.jsx("svg",{...o,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};Uo.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function mn({spaceGateway:t,connected:o,onDisconnect:s,...a}){const n=dn(),{t:r}=z(),m=async()=>{try{await s(),A.success(r("storage.spaces.gateway.delete.succeeded",{name:t.name}))}catch(l){console.error(l),A.error(X(l))}};return e.jsxs(Hi,{style:{position:"relative"},children:[e.jsxs(y,{sx:{backgroundColor:o?"#F0FDFF":"inherit","&:hover":{backgroundColor:o?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px",...a,children:[e.jsx(y,{display:"flex",children:e.jsx(fi,{src:oi(t.endpoint)})}),e.jsxs(y,{className:"spaces-info",display:"flex",flexGrow:1,flexDirection:"column",sx:{marginLeft:"20px",padding:"0px 0px",minWidth:0},children:[e.jsxs(y,{className:"spaces-info",display:"flex",children:[e.jsx(ee,{sx:{color:o?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.name}),e.jsx($o,{label:e.jsxs(e.Fragment,{children:[e.jsx(Uo,{style:{marginRight:"4px"}}),r("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:n?null:"20px",fontWeight:"bold"}})]}),e.jsx(y,{className:"spaces-address",display:"flex",color:"#9397A1",marginTop:"8px",children:e.jsx(ee,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:t.did&&e.jsx(fo,{copyable:!1,size:14,compact:!0,responsive:!1,did:t.did})})})]}),e.jsx(y,{className:"spaces-backup",display:"flex",alignItems:"center",children:e.jsx(y,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:e.jsx(un,{spaceGateway:t,onDeleteSpace:m})})})]}),e.jsx(y,{className:"selected-container selected",children:e.jsx(ho,{className:"selected-icon"})})]})}mn.propTypes={spaceGateway:i.shape({did:i.string.isRequired,name:i.string.isRequired,url:i.string.isRequired,endpoint:i.string.isRequired,protected:i.bool}).isRequired,connected:Je.bool,onDisconnect:Je.func};mn.defaultProps={connected:!1,onDisconnect:()=>{}};const Hi=F(y)`
|
|
111
|
+
`;var Io=function(o){return e.jsxs("svg",{...o,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+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMs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gBhFB6S+89eO6chpzkyM8s0MdCgW7njgiikAKvGH0fRKr9cXmycUjU8xfeY87PIXB3q1TK2GWGjxhtr146ZKTKWPp9sR8MWBNzQTNNrIt4XCVHh+OwfYAo9QybSeFUX5a9bl1On+cL5YHUjp/eID+XwV2AwZUXHswFw0IhIUlwmaTdQtlKJUpbAArh1IONYy6WQkAc9+ZocJMnELtCFNKLySGLwUIuW1fJLBKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};Io.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function ko(){const{t}=z();return e.jsx(y,{children:e.jsxs(y,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(Io,{style:{width:200,height:250}}),e.jsx(te,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.providerForStorage")})]})})}ko.propTypes={};function un({spaceGateway:t,onDeleteSpace:o}){const{t:s}=z(),[a,n]=h.useState(!1),[r,m]=h.useState(!1),l=(g,f)=>{g==null||g.stopPropagation(),n(f)},u=async g=>{try{g==null||g.stopPropagation(),m(!0),await o(t),n(!1)}catch(f){console.error(f),A.error(`${s("storage.spaces.gateway.delete.failed")}: ${X(f)}`)}finally{m(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx($,{size:"small",onClick:g=>l(g,!0),children:e.jsx(gi,{})}),e.jsx(Xo,{title:s("common.delConfirmDescription",{data:`${t==null?void 0:t.name}`}),open:a,confirmButton:{text:s("common.confirm"),props:{variant:"contained",color:"error",loading:r}},cancelButton:{text:s("common.cancel"),props:{variant:"contained",color:"primary"}},onConfirm:u,onCancel:g=>l(g,!1)})]})}un.propTypes={onDeleteSpace:i.func,spaceGateway:i.shape({name:i.string.isRequired,url:i.string.isRequired,protected:i.bool}).isRequired};un.defaultProps={onDeleteSpace:()=>{}};var Uo=function(o){return e.jsx("svg",{...o,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};Uo.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function mn({spaceGateway:t,connected:o,onDisconnect:s,...a}){const n=dn(),{t:r}=z(),m=async()=>{try{await s(),A.success(r("storage.spaces.gateway.delete.succeeded",{name:t.name}))}catch(l){console.error(l),A.error(X(l))}};return e.jsxs(Hi,{style:{position:"relative"},children:[e.jsxs(y,{sx:{backgroundColor:o?"#F0FDFF":"inherit","&:hover":{backgroundColor:o?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px",...a,children:[e.jsx(y,{display:"flex",children:e.jsx(fi,{src:oi(t.endpoint)})}),e.jsxs(y,{className:"spaces-info",display:"flex",flexGrow:1,flexDirection:"column",sx:{marginLeft:"20px",padding:"0px 0px",minWidth:0},children:[e.jsxs(y,{className:"spaces-info",display:"flex",children:[e.jsx(te,{sx:{color:o?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.name}),e.jsx($o,{label:e.jsxs(e.Fragment,{children:[e.jsx(Uo,{style:{marginRight:"4px"}}),r("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:n?null:"20px",fontWeight:"bold"}})]}),e.jsx(y,{className:"spaces-address",display:"flex",color:"#9397A1",marginTop:"8px",children:e.jsx(te,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:t.did&&e.jsx(fo,{copyable:!1,size:14,compact:!0,responsive:!1,did:t.did})})})]}),e.jsx(y,{className:"spaces-backup",display:"flex",alignItems:"center",children:e.jsx(y,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:e.jsx(un,{spaceGateway:t,onDeleteSpace:m})})})]}),e.jsx(y,{className:"selected-container selected",children:e.jsx(ho,{className:"selected-icon"})})]})}mn.propTypes={spaceGateway:i.shape({did:i.string.isRequired,name:i.string.isRequired,url:i.string.isRequired,endpoint:i.string.isRequired,protected:i.bool}).isRequired,connected:Je.bool,onDisconnect:Je.func};mn.defaultProps={connected:!1,onDisconnect:()=>{}};const Hi=F(y)`
|
|
112
112
|
.selected-container {
|
|
113
113
|
position: absolute;
|
|
114
114
|
right: 0px;
|
|
@@ -161,12 +161,12 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
161
161
|
visibility: visible;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
`;function Ki(){const{t}=z(),{spaceGateway:o,settingStorageEndpoint:s}=tn();return e.jsxs(y,{display:"flex",flexDirection:"column",children:[e.jsx(y,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:e.jsx(
|
|
164
|
+
`;function Ki(){const{t}=z(),{spaceGateway:o,settingStorageEndpoint:s}=tn();return e.jsxs(y,{display:"flex",flexDirection:"column",children:[e.jsx(y,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:e.jsx(te,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.spaces.connected.title")})}),e.jsx(y,{children:e.jsx(mn,{style:{marginTop:"12px"},spaceGateway:o,connected:!0,onDisconnect:()=>s(null)},o.endpoint)})]})}function fn({onConnect:t,...o}){const{blocklet:s}=oe(),{info:a}=K(),{t:n,locale:r}=z(),[m,l]=h.useState(""),[u,g]=h.useState(!1),[f,p]=h.useState(!1),[v,d]=h.useState(""),b=hi({blocklet:s}),C=uo(a),{storageEndpoint:x}=tn(),[R,c]=h.useState({open:!1,action:"connect-to-did-spaces",checkTimeout:1e3*300,prefix:"/api/did",checkFn:pt.create({baseURL:Ie(window.location.origin,es())}).get,messages:{title:n("storage.spaces.provideNFT.title",{appName:b.appName},r),scan:n("storage.spaces.provideNFT.scan",{appName:b.appName},r),confirm:"",success:e.jsx(te,{gutterBottom:!0,children:n("storage.spaces.provideNFT.success")})},onClose:()=>{c(D=>({...D,open:!1}))}}),[S,j]=h.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:n("storage.spaces.authorize.title",{appName:b.appName},r),scan:n("storage.spaces.authorize.scan",{appName:b.appName},r),confirm:"",success:e.jsx(te,{gutterBottom:!0,children:n("storage.spaces.authorize.success")})},onClose:()=>{j(D=>({...D,open:!1}))}}),w=async({did:D,name:M,endpoint:I})=>{const q=await $n(I);if(!await eo(q)){A.error(n("storage.spaces.gateway.add.invalidUrl"));return}const ee={name:M,did:D,url:q,endpoint:I};await t(ee),A.success(n("storage.spaces.connectedWithName",{name:ee.name}))},k=(D,M)=>{setTimeout(async()=>{if(j(ee=>({...ee,open:!1})),l(null),c(ee=>({...ee,open:!1})),!He(D.spaceGateway)){await w(M(D.spaceGateway));return}const I=M(D.endpoint),q=D.space?M(D.space):{};await w({endpoint:I,did:si(I),name:"DID Space",...q})},0)},U=()=>{c(D=>({...D,open:!0,extraParams:{appPid:s.appPid,referrer:window.location.href}}))},L=async()=>{try{g(!0);const D=await $n(m),M=ii(D),I=new URL(D).searchParams.get("spaceDid");if(!await eo(M))throw new Error(n("storage.spaces.gateway.add.invalidUrl"));j(q=>({...q,open:!0,prefix:Ie(M,"space/api/did"),baseUrl:new URL(M).origin,checkFn:pt.create({baseURL:Ie(M,"space")}).get,extraParams:{appDid:b.appDid,appName:b.appName,appDescription:b.appDescription,scopes:b.scopes,appUrl:b.appUrl,referrer:b.referrer,nodeDid:a.did,spaceDid:I}})),p(!1)}catch(D){const M=`${n("storage.spaces.gateway.add.failed",r)}: ${X(D)}`;d(M)}finally{g(!1)}};return e.jsxs(y,{children:[e.jsx(no,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:U,variant:"outlined",menu:[e.jsx(no.Item,{sx:{textTransform:"none"},onClick:()=>p(!0),size:"small",...o,children:n(x?"storage.spaces.connect.useSpaceGatewayReconnect":"storage.spaces.connect.useSpaceGateway")},"1")],children:e.jsx(te,{sx:{fontWeight:"bold",textTransform:"none"},children:n(x?"storage.spaces.connect.useWalletReconnect":"storage.spaces.connect.useWallet")})}),e.jsx(zt,{forceConnected:!1,saveConnect:!1,prefix:R.prefix,open:R.open,popup:!0,action:R.action,webWalletUrl:C,baseUrl:R.baseUrl,checkFn:R.checkFn,onSuccess:k,onClose:R.onClose,checkTimeout:R.checkTimeout,extraParams:R.extraParams,messages:R.messages,locale:r}),e.jsx(zt,{forceConnected:!1,saveConnect:!1,prefix:S.prefix,open:S.open,popup:!0,action:S.action,baseUrl:S.baseUrl,checkFn:S.checkFn,onSuccess:k,onClose:S.onClose,checkTimeout:S.checkTimeout,extraParams:S.extraParams,messages:S.messages,locale:r}),e.jsxs(xt,{title:n("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:f,onClose:()=>p(!1),PaperProps:{style:{minHeight:"auto"}},actions:e.jsxs(e.Fragment,{children:[e.jsx(ne,{onClick:D=>{D.stopPropagation(),p(!1)},color:"inherit",children:n("common.cancel")}),e.jsxs(ne,{onClick:L,color:"primary",disabled:u||!m,variant:"contained",autoFocus:!0,children:[u&&e.jsx(re,{size:16}),n("common.confirm")]})]}),children:[e.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:e.jsx(ts,{component:"div",children:e.jsx(te,{component:"div",children:e.jsx(Z,{label:n("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:m,onChange:D=>{d(null),l(D.target.value)},disabled:u,onKeyPress:async D=>{D.key==="Enter"&&await L()},autoFocus:!0})})})}),!!v&&e.jsx(dt,{severity:"error",style:{width:"100%"},children:v})]})]})}fn.propTypes={onConnect:Je.func};fn.defaultProps={onConnect:()=>{}};function hn({blockletMeta:t,onEndpointUpdate:o}){var l;const s=dn(),{blocklet:a}=oe(),{updateSpaceGateway:n,loading:r,hasStorageEndpoint:m}=tn();return h.useEffect(()=>{o==null||o()},[a]),r?e.jsx(ns,{relative:"parent",children:e.jsx(re,{})}):e.jsxs(Yi,{children:[e.jsx(y,{width:s?"360px":"720px",children:m?e.jsx(Ki,{}):e.jsx(ko,{})}),((l=t==null?void 0:t.capabilities)==null?void 0:l.didSpace)==="required"&&e.jsx(pn,{mt:8,children:e.jsx(fn,{onConnect:n})})]})}hn.propTypes={blockletMeta:i.any.isRequired,onEndpointUpdate:Je.func};hn.defaultProps={onEndpointUpdate:()=>{}};const Yi=F(ws)`
|
|
165
165
|
height: 100%;
|
|
166
166
|
overflow-y: auto;
|
|
167
167
|
padding-bottom: 32px;
|
|
168
168
|
overflow-x: hidden;
|
|
169
|
-
`;function gn({onChange:t,loading:o,children:s,extra:a,stores:n,storageKey:r}){const{t:m}=z(),{info:l,inService:u}=K(),{blocklet:g}=oe(),[f,p]=h.useState(!1),
|
|
169
|
+
`;function gn({onChange:t,loading:o,children:s,extra:a,stores:n,storageKey:r}){const{t:m}=z(),{info:l,inService:u}=K(),{blocklet:g}=oe(),[f,p]=h.useState(!1),v=h.useRef(null),[d,b]=h.useState(),[C,x]=yi(r||"tmp"),[R,c]=r?[C,x]:[d,b],{storeList:S,teamDid:j}=go({fromBlocklet:u,blocklet:g,nodeInfo:l}),w=So([...n.map(U=>({...U,protected:!0})),...S],"url"),k=R&&w.find(U=>R===U.url)||w[0];return e.jsxs(e.Fragment,{children:[e.jsxs(Ji,{children:[e.jsx(ne,{ref:v,color:"primary","data-cy":"add-component-select-store",endIcon:e.jsx(xi,{color:"primary"}),onClick:()=>{p(!0)},style:{padding:"0 2px"},children:e.jsx(te,{color:"primary",children:k.name})}),e.jsx(te,{color:"primary",children:a})]}),e.jsxs(Z,{id:"mui-registry-select",select:!0,autoComplete:"off",variant:"outlined",name:"did",helperText:m("blocklet.component.selectRegistryTip"),"data-cy":"component-registry-select",fullWidth:!0,value:k,autoFocus:!0,onChange:U=>{const L=U.target.value;c(L.url),t(L)},SelectProps:{open:f,MenuProps:{anchorEl:v.current},renderValue:U=>U==null?void 0:U.name,onClose:()=>{p(!1)}},style:{display:"none"},margin:"normal",children:[w==null?void 0:w.map(U=>e.jsx(xe,{sx:{width:"400px",maxWidth:"90vw"},value:U,"data-cy":U.url,children:e.jsx(_s,{teamDid:j,store:U,onDelete:()=>{var L;R===U.url&&c((L=w[0])==null?void 0:L.url)}})},U.url)),!jo.isInServerlessMode(l)&&e.jsx(qs,{disabled:o,storeList:w,teamDid:j,onAdd:U=>{c(U)}})]}),s({currentRegistry:k})]})}gn.propTypes={onChange:i.func,loading:i.bool,children:i.any.isRequired,extra:i.node,storageKey:i.string,stores:i.arrayOf(i.shape({name:i.string.isRequired,url:i.string.isRequired}))};gn.defaultProps={onChange:()=>{},loading:!1,extra:"",stores:[],storageKey:""};const Ji=F.div`
|
|
170
170
|
display: flex;
|
|
171
171
|
justify-content: space-between;
|
|
172
172
|
align-items: center;
|
|
@@ -177,7 +177,7 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
177
177
|
color: ${t=>t.theme.palette.common.black};
|
|
178
178
|
// font-weight: bold;
|
|
179
179
|
}
|
|
180
|
-
`;var xn={},Zi=Wt;Object.defineProperty(xn,"__esModule",{value:!0});var
|
|
180
|
+
`;var xn={},Zi=Wt;Object.defineProperty(xn,"__esModule",{value:!0});var Do=xn.default=void 0,Qi=Zi(Vt()),Xi=e;Do=xn.default=(0,Qi.default)((0,Xi.jsx)("path",{d:"M16 18v2H8v-2zM11 7.99V16h2V7.99h3L12 4 8 7.99z"}),"Upgrade");const $i=(t,o)=>Ie(o,`/blocklets/${t.did}`),ro=({blocklet:t,attribute:o,value:s})=>t._formatted?t._formatted[o]:s,er=t=>t.inStore&&O.isFreeBlocklet(t)===!1;function yn({blocklet:t,blocklets:o,handleButtonClick:s,endpoint:a}){const{t:n}=z();let r=Ie(a,is(t.did,t.logo||""));try{const C=new URL(r);C.searchParams.set("v",t.version||+new Date),r=C.href}catch{}const[m,l]=h.useState(!1),u=C=>C.currentTarget.contains(C.target)?!0:(C.preventDefault(),!1),g=async C=>{C.preventDefault(),C.stopPropagation();try{l(!0),await s({meta:t,registryUrl:a,blocklets:o})}catch(x){A.error(x.message)}finally{l(!1)}},{blocklet:f}=oe(),p=()=>((f==null?void 0:f.children)||[]).find(R=>R.meta.bundleDid===t.did).meta.version,d=(()=>{const C=((f==null?void 0:f.children)||[]).find(x=>x.meta.bundleDid===t.did);if(C){try{const x=C.meta.version,R=t.version;if(rs.gt(R,x))return"upgrade"}catch{return"install"}return"disable"}return"install"})();let b=n("blocklet.component.choose");return d==="upgrade"?b=n("blocklet.component.upgrade"):d==="disable"?b=n("blocklet.component.installed"):er(t)&&(b=n("common.purchase")),e.jsx(yt,{href:$i(t,a),style:{color:"initial",textDecoration:"none"},onClick:u,target:"_blank",children:e.jsx(tr,{title:ro({blocklet:t,attribute:"title",value:t.title||t.name}),did:t.did,description:ro({blocklet:t,attribute:"description",value:t.description}),cover:t.logo?r:"",version:t.version,button:e.jsx("div",{style:{display:"flex",alignItems:"center"},children:e.jsx(Ws,{children:e.jsxs(ne,{onClick:g,size:"small",disabled:m||d==="disable",variant:"outlined",color:"primary","data-cy":"install-blocklet",title:d==="upgrade"?`${p()} -> ${t.version}`:"",children:[m?e.jsxs(e.Fragment,{children:[e.jsx(re,{size:16,style:{marginRight:3}}),b]}):b,d==="upgrade"?e.jsx(Do,{style:{fontSize:"1.2rem"}}):null]},t.did)})})})})}yn.propTypes={blocklet:i.object.isRequired,blocklets:i.array,handleButtonClick:i.func,endpoint:i.string};yn.defaultProps={handleButtonClick:null,endpoint:"",blocklets:[]};function Cn({handleButtonClick:t,handleSearchSelect:o,storeUrl:s,handleBlockletRender:a,extraFilter:n,serverVersion:r,resourceType:m,resourceDid:l,showResourcesSwitch:u,showCategory:g,...f}){const{locale:p}=z(),[v,d]=h.useState(!1),[b,C]=h.useState({}),x=c=>{C(c)},R=s;return h.useEffect(()=>{C({showResources:!0,resourceType:m,resourceDid:l})},[R,m,l]),h.useEffect(()=>{d(!0),C({showResources:!0,resourceType:m,resourceDid:l})},[]),e.jsx(os,{FallbackComponent:ss,resetKeys:[R],children:e.jsx("div",{...f,children:v&&e.jsx(Vs,{showCategory:g,showResourcesSwitch:u,blockletRender:c=>{const S={...c,handleButtonClick:t,endpoint:R};return a({...c,defaultRender:e.jsx(yn,{...S})})},baseSearch:!0,endpoint:R,locale:p,onFilterChange:x,onSearchSelect:o,filters:b,extraFilter:n,serverVersion:r,fetchCategoryDelay:500})})})}Cn.propTypes={storeUrl:i.string.isRequired,handleButtonClick:i.func,handleSearchSelect:i.func,handleBlockletRender:i.func,extraFilter:i.func,serverVersion:i.string,resourceType:i.string,resourceDid:i.string,showResourcesSwitch:i.bool,showCategory:i.bool};Cn.defaultProps={handleButtonClick:null,handleSearchSelect:null,handleBlockletRender:null,extraFilter:void 0,serverVersion:"",resourceType:"",resourceDid:"",showResourcesSwitch:!0,showCategory:!0};const tr=F(Hs)`
|
|
181
181
|
.ms-highlight {
|
|
182
182
|
color: ${t=>t.theme.palette.primary.main};
|
|
183
183
|
}
|
|
@@ -317,7 +317,7 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
317
317
|
& .connect {
|
|
318
318
|
background: white;
|
|
319
319
|
}
|
|
320
|
-
`,sr=jn,ir=t=>t.inStore&&O.isFreeBlocklet(t)===!1,rr=t=>{var o;return[J.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED,J.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP].includes((o=t==null?void 0:t.capabilities)==null?void 0:o.didSpace)},Mt=t=>{var o,s;return((s=(o=t==null?void 0:t.configs)==null?void 0:o.find(a=>a.key===J.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT))==null?void 0:s.value)||null},ar=t=>(t.environments||[]).some(o=>o.required),lo=(t,o)=>t==null?void 0:t.some(s=>s.required&&!o[s.key]),lr=({params:t,blocklet:o,t:s})=>{const a=t.title||t.name;return a?((o==null?void 0:o.children)||[]).find(r=>r.meta.bundleDid===t.bundleDid)?s("blocklet.component.upgradeNext",{name:a}):s("blocklet.component.addNext",{name:a}):s("common.next")},co=({componentDid:t,timeout:o=1e3,manual:s=!1}={})=>{setTimeout(()=>{window.parent.postMessage({event:"component.installed",componentDid:t,manual:s},"*")},o)};function vn({onClose:t,mode:o,stores:s,resourceType:a,resourceDid:n,storageKey:r,inDialog:m,selectedMeta:l,storeUrl:u,showResourcesSwitch:g,showFromUrl:f,enableRunBackground:p,showCategory:S}){var On,Mn,Fn,$e,Gn,et,zn;const{t:d,locale:b}=z(),[C,x]=h.useState(!1),[R,c]=h.useState(null),[v,j]=h.useState(""),[T,I]=h.useState(""),{api:U,ws:{useSubscription:L},inService:k,info:M}=K(),{blocklet:D,actions:{refreshBlocklet:_}}=oe(),[Q,Ie]=h.useState(null),[te,de]=h.useState(!1),Se={bundleDid:"",componentDid:"",componentName:"",pathPrefix:"",name:"",title:"",configsList:[],configsValue:{},hasMissRequiredConfigs:!1,hasEnvironmentsStep:!1,hasRequiredEnvironments:!1,requirePurchase:!1,didSpaceIsRequiredSetup:null,installResultProps:{},purchaseResultProps:{},showFromUrlDialog:!1},[P,ke]=h.useState(Se),[me,Qe]=h.useState(0),q=h.useRef({}),w=h.useRef({}),V=h.useRef({}),se=Ht(E=>E.breakpoints.down("md")),xe=ls(),[ie,Ge]=h.useState(!0),{meta:Y}=q.current,H=E=>ke(N=>({...N,...E}));h.useEffect(()=>{if(P.pathPrefix){const{errMsg:E}=Ln({...P,pathPrefix:P.pathPrefix,locale:b});j(E)}},[P.pathPrefix]),h.useEffect(()=>{me===0&&ke(Se)},[me]);const be=()=>{const E=Mt(D)??"";H({didSpaceEndpoint:E})},ze=()=>{var E;return(E=q==null?void 0:q.current)!=null&&E.meta?O.getDisplayName(q.current):""},Ue=E=>{const N=G=>{H({installResultProps:{variant:"error",title:ze(),subTitle:E,footer:e.jsx(ne,{className:"bottom-button",disabled:G,"data-cy":"retry-install-component",onClick:async()=>{N(!0),await An(q.current.installInput)},children:e.jsxs(y,{display:"flex",alignItems:"center",children:[G&&e.jsx(re,{size:16,style:{marginRight:8}}),d("common.retry")]})})}})};N()},Tt=E=>N=>{var G,W;(((G=N==null?void 0:N.meta)==null?void 0:G.did)||(N==null?void 0:N.meta))===((W=D==null?void 0:D.meta)==null?void 0:W.did)&&E(N)};L(J.BlockletEvents.statusChange,Tt(E=>{switch(E.status){case J.BlockletStatus.upgrading:H({installResultProps:{variant:"success",title:ze(),subTitle:d("blocklet.component.installSuccessTip")}}),co({componentDid:xe.componentDid});break}const N=Mt(D);H(G=>({...G,didSpaceEndpoint:N}))}),[(On=D==null?void 0:D.meta)==null?void 0:On.did]),L(J.BlockletEvents.downloadFailed,Tt(()=>{Ue(d("blocklet.component.installComponentError"))}),[(Mn=D==null?void 0:D.meta)==null?void 0:Mn.did]),L(J.BlockletEvents.installFailed,Tt(()=>{Ue(d("blocklet.component.installComponentError"))}),[(Fn=D==null?void 0:D.meta)==null?void 0:Fn.did]);const pe=[],wt=()=>{x(!1),ke({}),q.current={},t()},Xe=E=>((D==null?void 0:D.children)||[]).some(N=>N.meta.did===E),An=async E=>{var De,Ne;const{pathPrefix:N,bundleDid:G,title:W,componentName:Re="",componentDid:Be=""}=P,Ee=((De=q.current)==null?void 0:De.meta)||{},{configs:ye=[],registryUrl:je,inStore:qe,inputUrl:Ve,dist:It}=Ee,We=(Ne=q.current)==null?void 0:Ne.downloadTokenList,le=qe?Kn(je,G,It):Ve;x(!0);const tt={rootDid:D.meta.did,url:le,mountPoint:N?ue(N):`/${ue(Ee.title||Ee.name)}`,title:W,name:Re,did:Be,onlyRequired:!ie,...P.hasEnvironmentsStep&&ye.length>0?{configs:ye.map(he=>({...he,value:P.configsValue[he.key]||""}))}:{},...We?{downloadTokenList:We}:{},...E};try{if(await U.installComponent({input:tt}),je){const{teamDid:he,storeList:Ae}=go({fromBlocklet:k,nodeInfo:M,blocklet:D}),{isNew:kt,decoded:nt}=ps(je,Ae);kt&&await U.addBlockletStore({input:{teamDid:he,url:nt}})}H({installResultProps:{}}),_({showError:!1,attachRuntimeInfo:!1})}catch(he){const Ae=X(he);A.error(Ae),console.error("installComponent error: ",he),Ue(Ae)}finally{x(!1),q.current.installInput=tt}},Ln=E=>({errMsg:bo({params:{...E,did:E.bundleDid},blocklets:[D],blocklet:D,locale:b})}),fe=async E=>{var G,W;const{errMsg:N}=Ln({...P,locale:b});j(N),me===pe.length-2&&await An(E),(W=(G=w.current)==null?void 0:G.setActiveStepByIndex)==null||W.call(G,Re=>Re+1)},_e=()=>{var E,N;(N=(E=w.current)==null?void 0:E.setActiveStepByIndex)==null||N.call(E,G=>G-1)},Oo=()=>{const{pathPrefix:E,bundleDid:N,title:G,componentName:W="",componentDid:Re=""}=P,{meta:Be={}}=q.current||{},{registryUrl:Ee,inStore:ye,inputUrl:je,dist:qe}=Be,Ve=ye?Kn(Ee,N,qe):je;Ie({meta:Be,installOpts:{type:"component",rootDid:D.meta.did,mountPoint:E,url:Ve,title:G,name:W,did:Re}})},Mo=E=>{de(!1),H({purchaseResultProps:{variant:"error",title:ze(),subTitle:E,style:{paddingTop:120},footer:e.jsx(ne,{className:"bottom-button","data-cy":"retry-purchase-component",onClick:()=>{H({purchaseResultProps:{}})},children:d("common.retry")})}})},Fo=({downloadTokenList:E})=>{q.current.downloadTokenList=E,de(!1),fe()},Pt=({chooseParams:E=q.current,componentDid:N,isInit:G=!1})=>{var nt,_n,qn,Vn;const{meta:W,registryUrl:Re,inStore:Be,inputUrl:Ee}=E,{did:ye,title:je,name:qe}=W,Ve=(((nt=D.settings)==null?void 0:nt.children)||[]).filter(ce=>ce.status==="deleted"&&ce.meta.bundleDid===ye),It=N||"",We=(_n=W.environments)==null?void 0:_n.map(ce=>{const{name:Ut,validation:ot,...st}=ce,Bt={validation:cs(ot)?"":ot};return{...st,key:Ut,...Bt}});q.current={...E,meta:{...W,configs:We,registryUrl:Re,inStore:Be,inputUrl:Ee}};let le={};if(G){const ce=[D],Ut=We||[],ot=[],st=So(ds([...Ut,...ot]),"key").filter(Le=>!!Le.key).sort((Le,it)=>Le.required&&!it.required?-1:it.required&&!Le.required?1:0),Bt=O.getSharedConfigObj(ce[0],{configs:st}),Dt={},Wn=st.map(Le=>{const{default:it,key:rt,...zo}=Le;return Dt[rt]=Bt[rt]||it,{...zo,key:rt,hidden:!!J.BLOCKLET_CONFIGURABLE_KEY[rt]}});le={...le,configsList:Wn,configsValue:Dt,hasMissRequiredConfigs:lo(Wn,Dt)}}const tt=D.children.some(ce=>ce.mountPoint==="/"),De=Ve.find(ce=>ce.meta.bundleDid===ye),Ne=D.children.find(ce=>ce.meta.bundleDid===ye);le.title=je||"",De?le={...le,pathPrefix:De.mountPoint||"",componentName:De.meta.name,hasEnvironmentsStep:!1}:Ne?le={...le,pathPrefix:Ne.mountPoint||"",componentName:Ne.meta.name,hasEnvironmentsStep:!1}:le={...le,pathPrefix:tt?`/${ue(je)||ue(qe)}`.toLowerCase():"/",componentName:"",hasEnvironmentsStep:((Vn=(qn=q.current.meta)==null?void 0:qn.environments)==null?void 0:Vn.length)>0};const he=ir(q.current.meta),Ae=rr(q.current.meta),kt=Mt(D);H({bundleDid:ye,componentDid:It,...le,hasRequiredEnvironments:ar(q.current.meta),requirePurchase:he,didSpaceIsRequiredSetup:Ae,didSpaceEndpoint:kt}),G&&he&&Oo()};h.useEffect(()=>{!l||me!==0||!D||(Pt({chooseParams:{blocklets:[l],meta:l,registryUrl:u||l.homepage,inStore:!0},isInit:!0}),H({showFromUrlDialog:!1}),fe())},[l,me,D]),pe.push({key:"selectComponent",name:d("blocklet.component.selectComponent"),body:e.jsxs(Te,{sx:{width:400},component:"div",children:[f&&P.showFromUrlDialog&&e.jsx(ci,{mode:"component",onCancel:()=>{H({showFromUrlDialog:!1})},onSuccess:({meta:E,inputUrl:N,inStore:G,registryUrl:W})=>{Pt({chooseParams:{meta:E,inputUrl:N,inStore:G,registryUrl:W},isInit:!0}),H({showFromUrlDialog:!1}),fe()},handleText:{title:d("blocklet.component.addComponentTip.fromUrl"),confirm:d("blocklet.component.choose")}}),e.jsx(gn,{stores:s,extra:jo.isInServerlessMode(M)?null:f?e.jsxs(ne,{variant:"text",color:"primary","data-cy":"add-component-from-url",onClick:()=>{H({showFromUrlDialog:!0})},style:{padding:"0 2px"},children:[e.jsx(Qt,{style:{fontSize:20,marginRight:4}})," ",d("blocklet.component.addComponentTip.fromUrl")," "]}):null,loading:C,onChange:()=>{ke({}),q.current={}},storageKey:r,children:({currentRegistry:E})=>e.jsx(Cn,{showResourcesSwitch:g,showCategory:S,serverVersion:M==null?void 0:M.version,style:se?{height:"calc(100vh - 56px - 80px - 32px - 40px )"}:{height:"calc(100% - 40px)"},storeUrl:E.url,resourceType:a,resourceDid:n,handleButtonClick:N=>{Pt({chooseParams:{...N,inStore:!0},isInit:!0})},handleBlockletRender:({blocklet:N,defaultRender:G})=>{const W=(P==null?void 0:P.bundleDid)&&(P==null?void 0:P.bundleDid)===(N==null?void 0:N.did);return e.jsxs(dr,{children:[W&&e.jsx("div",{className:"check-container",children:e.jsx(ho,{className:"check-icon"})}),e.jsx("div",{className:W?"choose-blocklet":"",style:{marginLeft:16},children:G})]})}})})]}),cancel:o==="embed"?void 0:d("common.cancel"),confirm:lr({params:P,blocklet:D,t:d}),onCancel:wt,onConfirm:()=>{fe()}}),pe.push({key:"agreement",name:d("launchBlocklet.introduction"),body:e.jsxs(Te,{component:"div",className:"agreement-wrapper",children:[e.jsx(vo,{title:d("launchBlocklet.introduction"),subTitle:d("blocklet.component.addComponentTip.introduction")}),e.jsx(Ps,{meta:Y,onClickNext:fe,installRelated:ie,onChangeInstallRelated:Ge,handleDescEle:e.jsx("p",{children:d("blocklet.component.addComponentTip.belowInformation")})})]}),cancel:l?void 0:d("common.pre"),confirm:d("launchBlocklet.next"),onCancel:l?wt:_e,onConfirm:()=>{de(!1),fe()}}),Y&&P.requirePurchase&&pe.push({key:"purchase",name:e.jsxs(e.Fragment,{children:[d("common.verifyNFT"),e.jsx(ct,{})]}),body:e.jsxs(Te,{component:"div",className:"flex-align-center",style:{flexDirection:"column"},children:[!(((Gn=($e=V.current)==null?void 0:$e.getCurrentStep)==null?void 0:Gn.call($e))===2||te)&&e.jsx(lt,{title:d("common.verifyNFT"),subTitle:d("blocklet.component.addComponentTip.verifyNFT")}),He(P.purchaseResultProps)?Q&&e.jsx(_i,{ref:V,meta:Q.meta,mode:P.componentDid?"verify":"both",onCancel:Mo,installOpts:Q.installOpts,handlePaySuccess:Fo}):e.jsx("div",{className:"flex-align-center flex-justify-center",children:e.jsx(Xn,{...P.purchaseResultProps})})]}),disabled:((zn=(et=V.current)==null?void 0:et.getCurrentStep)==null?void 0:zn.call(et))===2||te,cancel:d("common.pre"),confirm:d("common.next"),onConfirm:()=>{typeof V.current.onNext=="function"&&(V.current.onNext(),de(!0))},onCancel:()=>{_e()}}),O.hasStartEngine(Y)&&!Xe(Y.did)&&pe.push({key:"config",name:d("common.config"),error:v,body:e.jsxs(Te,{component:"div",children:[e.jsx(lt,{title:d("common.config"),subTitle:d("blocklet.component.addComponentTip.config")}),e.jsx(Z,{label:d("blocklet.component.mountPoint"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"mount-point-input"},fullWidth:!0,helperText:T||d("blocklet.component.mountPointTip"),style:{marginBottom:32},margin:"normal",value:P.pathPrefix,onChange:E=>{const N=E.target.value;H({pathPrefix:N}),I(d("common.slugifyHint",{value:gt(N)}))}}),!!v&&e.jsx(dt,{severity:"error",style:{width:"100%",marginTop:8},children:v})]}),cancel:d("common.pre"),confirm:d("common.next"),onCancel:_e,onConfirm:()=>{fe()}}),Y&&!Xe(Y.did)&&(P!=null&&P.hasEnvironmentsStep)&&pe.push({key:"environment",name:e.jsxs(e.Fragment,{children:[d("common.environment")," ",P.hasRequiredEnvironments&&e.jsx(ct,{})]}),disabled:!!R||(P==null?void 0:P.hasMissRequiredConfigs),body:()=>e.jsxs(Te,{component:"div",children:[e.jsx(lt,{title:d("common.environment"),subTitle:d("blocklet.component.addComponentTip.environment")}),e.jsx(an,{style:{marginTop:-12,width:"100%"},schema:P.configsList,defaultValue:P.configsValue,onChange:(E,{action:N,currentItem:G,allValues:W})=>{N==="confirm"&&H({hasMissRequiredConfigs:lo(P.configsList,W),configsValue:W}),N==="edit"?c(G):["cancel","confirm"].includes(N)&&c(null)}})]}),cancel:d("common.pre"),confirm:d("common.next"),onCancel:_e,onConfirm:fe}),Y&&!Xe(Y.did)&&(P!=null&&P.didSpaceIsRequiredSetup)&&pe.push({key:"didSpace",name:e.jsxs(e.Fragment,{children:[d("blocklet.component.didSpaceConfig")," ",P.didSpaceIsRequiredSetup==="required"&&e.jsx(ct,{})]}),disabled:(P==null?void 0:P.didSpaceIsRequiredSetup)&&!P.didSpaceEndpoint,body:()=>e.jsx(en,{children:e.jsxs(Te,{component:"div",children:[e.jsx(lt,{title:d("blocklet.component.didSpaceConfig"),subTitle:d("blocklet.component.didSpaceConfigTip")}),e.jsx(y,{sx:{mt:"36px","& > div":{maxWidth:"unset !important","& .MuiAutocomplete-root":{maxWidth:"unset !important"}}},children:e.jsx(hn,{blockletMeta:q.current.meta,onNext:()=>{fe()},onEndpointUpdate:be})})]})}),cancel:d("common.pre"),confirm:d("common.next"),onCancel:_e,onConfirm:fe}),pe.push({key:"install",name:Xe(Y==null?void 0:Y.did)?d("common.upgrade"):d("common.install"),disabled:p?!1:He(P.installResultProps),loading:p?!1:He(P.installResultProps),body:e.jsx(Te,{component:"div",className:"flex-justify-center flex-align-center",style:{flexDirection:"column"},children:He(P.installResultProps)?e.jsx(Qs,{message:e.jsx(pr,{children:d(p?"blocklet.component.installingCanCloseWindowTip":"blocklet.component.installingTip")}),increaseSpeed:.3,messageLoop:!1}):e.jsx("div",{style:{marginTop:120},children:e.jsx(Xn,{...P.installResultProps})})}),confirm:d("common.complete"),onConfirm:()=>{co({timeout:0,componentDid:xe.componentDid,manual:!0}),wt(),setTimeout(()=>{const E=document.getElementsByClassName("dashboard-main")[0];E&&(E.scrollTop=E.scrollHeight)},200)}});const ae=pe[me]||{},Go=()=>C||ae.error||!P.bundleDid?!0:me>1?!P.pathPrefix:!1;return D?e.jsxs(cr,{sx:{width:"100%",height:se?window.innerHeight:m?"72vh":"100vh"},children:[e.jsx(Xs,{steps:pe,mode:"memory",children:e.jsx(sr,{ref:w,meta:Y,isMobile:se,onStepChange:E=>{Qe(E)}})}),e.jsxs(y,{className:"action-bar",children:[ae.cancel&&e.jsx(ne,{onClick:E=>{E.stopPropagation(),ae.onCancel()},disabled:me===pe.length-2&&C,color:"inherit",children:ae.cancel||d("common.cancel")}),ae.confirm&&e.jsx(ne,{onClick:E=>{E.stopPropagation(),ae.onConfirm()},color:"primary","data-cy":"submit-confirm-next",disabled:C||(typeof ae.disabled=="boolean"?ae.disabled:Go()),variant:"contained",autoFocus:!0,title:ae.confirm,style:{marginLeft:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"140px",maxWidth:"280px",textAlign:"center"},children:e.jsxs(y,{display:"flex",alignItems:"center",children:[(typeof ae.loading=="boolean"?ae.loading:C)&&e.jsx(re,{style:{marginRight:8},size:16}),ae.confirm]})})]})]}):null}vn.propTypes={onClose:i.func,mode:i.oneOf(["normal","embed"]),inDialog:i.bool,stores:i.arrayOf(i.string),storeUrl:i.string,resourceType:i.string,resourceDid:i.string,storageKey:i.string,selectedMeta:i.object,showResourcesSwitch:i.bool,showFromUrl:i.bool,enableRunBackground:i.bool,showCategory:i.bool};vn.defaultProps={onClose:()=>{},mode:"normal",stores:[],storeUrl:"",resourceType:"",resourceDid:"",storageKey:"",inDialog:!0,selectedMeta:null,showResourcesSwitch:!0,showFromUrl:!0,enableRunBackground:!0,showCategory:!0};const cr=F(y)`
|
|
320
|
+
`,sr=jn,ir=t=>t.inStore&&O.isFreeBlocklet(t)===!1,rr=t=>{var o;return[J.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED,J.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP].includes((o=t==null?void 0:t.capabilities)==null?void 0:o.didSpace)},Mt=t=>{var o,s;return((s=(o=t==null?void 0:t.configs)==null?void 0:o.find(a=>a.key===J.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT))==null?void 0:s.value)||null},ar=t=>(t.environments||[]).some(o=>o.required),lo=(t,o)=>t==null?void 0:t.some(s=>s.required&&!o[s.key]),lr=({params:t,blocklet:o,t:s})=>{const a=t.title||t.name;return a?((o==null?void 0:o.children)||[]).find(r=>r.meta.bundleDid===t.bundleDid)?s("blocklet.component.upgradeNext",{name:a}):s("blocklet.component.addNext",{name:a}):s("common.next")},co=({componentDid:t,timeout:o=1e3,manual:s=!1}={})=>{setTimeout(()=>{window.parent.postMessage({event:"component.installed",componentDid:t,manual:s},"*")},o)};function vn({onClose:t,mode:o,stores:s,resourceType:a,resourceDid:n,storageKey:r,inDialog:m,selectedMeta:l,storeUrl:u,showResourcesSwitch:g,showFromUrl:f,enableRunBackground:p,showCategory:v}){var On,Mn,Fn,$e,Gn,et,zn;const{t:d,locale:b}=z(),[C,x]=h.useState(!1),[R,c]=h.useState(null),[S,j]=h.useState(""),[w,k]=h.useState(""),{api:U,ws:{useSubscription:L},inService:D,info:M}=K(),{blocklet:I,actions:{refreshBlocklet:q}}=oe(),[ee,ke]=h.useState(null),[Se,ue]=h.useState(!1),Q={bundleDid:"",componentDid:"",componentName:"",pathPrefix:"",name:"",title:"",configsList:[],configsValue:{},hasMissRequiredConfigs:!1,hasEnvironmentsStep:!1,hasRequiredEnvironments:!1,requirePurchase:!1,didSpaceIsRequiredSetup:null,installResultProps:{},purchaseResultProps:{},showFromUrlDialog:!1},[E,me]=h.useState(Q),[fe,Qe]=h.useState(0),_=h.useRef({}),P=h.useRef({}),V=h.useRef({}),se=Ht(T=>T.breakpoints.down("md")),ye=ls(),[ie,Ge]=h.useState(!0),{meta:Y}=_.current,H=T=>me(N=>({...N,...T}));h.useEffect(()=>{if(E.pathPrefix){const{errMsg:T}=Ln({...E,pathPrefix:E.pathPrefix,locale:b});j(T)}},[E.pathPrefix]),h.useEffect(()=>{fe===0&&me(Q)},[fe]);const Ee=()=>{const T=Mt(I)??"";H({didSpaceEndpoint:T})},ze=()=>{var T;return(T=_==null?void 0:_.current)!=null&&T.meta?O.getDisplayName(_.current):""},Ue=T=>{const N=G=>{H({installResultProps:{variant:"error",title:ze(),subTitle:T,footer:e.jsx(ne,{className:"bottom-button",disabled:G,"data-cy":"retry-install-component",onClick:async()=>{N(!0),await An(_.current.installInput)},children:e.jsxs(y,{display:"flex",alignItems:"center",children:[G&&e.jsx(re,{size:16,style:{marginRight:8}}),d("common.retry")]})})}})};N()},Tt=T=>N=>{var G,W;(((G=N==null?void 0:N.meta)==null?void 0:G.did)||(N==null?void 0:N.meta))===((W=I==null?void 0:I.meta)==null?void 0:W.did)&&T(N)};L(J.BlockletEvents.statusChange,Tt(T=>{switch(T.status){case J.BlockletStatus.upgrading:H({installResultProps:{variant:"success",title:ze(),subTitle:d("blocklet.component.installSuccessTip")}}),co({componentDid:ye.componentDid});break}const N=Mt(I);H(G=>({...G,didSpaceEndpoint:N}))}),[(On=I==null?void 0:I.meta)==null?void 0:On.did]),L(J.BlockletEvents.downloadFailed,Tt(()=>{Ue(d("blocklet.component.installComponentError"))}),[(Mn=I==null?void 0:I.meta)==null?void 0:Mn.did]),L(J.BlockletEvents.installFailed,Tt(()=>{Ue(d("blocklet.component.installComponentError"))}),[(Fn=I==null?void 0:I.meta)==null?void 0:Fn.did]);const de=[],wt=()=>{x(!1),me({}),_.current={},t()},Xe=T=>((I==null?void 0:I.children)||[]).some(N=>N.meta.did===T),An=async T=>{var Be,Ne;const{pathPrefix:N,bundleDid:G,title:W,componentName:Te="",componentDid:De=""}=E,we=((Be=_.current)==null?void 0:Be.meta)||{},{configs:Ce=[],registryUrl:be,inStore:qe,inputUrl:Ve,dist:It}=we,We=(Ne=_.current)==null?void 0:Ne.downloadTokenList,le=qe?Kn(be,G,It):Ve;x(!0);const tt={rootDid:I.meta.did,url:le,mountPoint:N?pe(N):`/${pe(we.title||we.name)}`,title:W,name:Te,did:De,onlyRequired:!ie,...E.hasEnvironmentsStep&&Ce.length>0?{configs:Ce.map(ge=>({...ge,value:E.configsValue[ge.key]||""}))}:{},...We?{downloadTokenList:We}:{},...T};try{if(await U.installComponent({input:tt}),be){const{teamDid:ge,storeList:Ae}=go({fromBlocklet:D,nodeInfo:M,blocklet:I}),{isNew:kt,decoded:nt}=ps(be,Ae);kt&&await U.addBlockletStore({input:{teamDid:ge,url:nt}})}H({installResultProps:{}}),q({showError:!1,attachRuntimeInfo:!1})}catch(ge){const Ae=X(ge);A.error(Ae),console.error("installComponent error: ",ge),Ue(Ae)}finally{x(!1),_.current.installInput=tt}},Ln=T=>({errMsg:bo({params:{...T,did:T.bundleDid},blocklets:[I],blocklet:I,locale:b})}),he=async T=>{var G,W;const{errMsg:N}=Ln({...E,locale:b});j(N),fe===de.length-2&&await An(T),(W=(G=P.current)==null?void 0:G.setActiveStepByIndex)==null||W.call(G,Te=>Te+1)},_e=()=>{var T,N;(N=(T=P.current)==null?void 0:T.setActiveStepByIndex)==null||N.call(T,G=>G-1)},Oo=()=>{const{pathPrefix:T,bundleDid:N,title:G,componentName:W="",componentDid:Te=""}=E,{meta:De={}}=_.current||{},{registryUrl:we,inStore:Ce,inputUrl:be,dist:qe}=De,Ve=Ce?Kn(we,N,qe):be;ke({meta:De,installOpts:{type:"component",rootDid:I.meta.did,mountPoint:T,url:Ve,title:G,name:W,did:Te}})},Mo=T=>{ue(!1),H({purchaseResultProps:{variant:"error",title:ze(),subTitle:T,style:{paddingTop:120},footer:e.jsx(ne,{className:"bottom-button","data-cy":"retry-purchase-component",onClick:()=>{H({purchaseResultProps:{}})},children:d("common.retry")})}})},Fo=({downloadTokenList:T})=>{_.current.downloadTokenList=T,ue(!1),he()},Pt=({chooseParams:T=_.current,componentDid:N,isInit:G=!1})=>{var nt,_n,qn,Vn;const{meta:W,registryUrl:Te,inStore:De,inputUrl:we}=T,{did:Ce,title:be,name:qe}=W,Ve=(((nt=I.settings)==null?void 0:nt.children)||[]).filter(ce=>ce.status==="deleted"&&ce.meta.bundleDid===Ce),It=N||"",We=(_n=W.environments)==null?void 0:_n.map(ce=>{const{name:Ut,validation:ot,...st}=ce,Dt={validation:cs(ot)?"":ot};return{...st,key:Ut,...Dt}});_.current={...T,meta:{...W,configs:We,registryUrl:Te,inStore:De,inputUrl:we}};let le={};if(G){const ce=[I],Ut=We||[],ot=[],st=So(ds([...Ut,...ot]),"key").filter(Le=>!!Le.key).sort((Le,it)=>Le.required&&!it.required?-1:it.required&&!Le.required?1:0),Dt=O.getSharedConfigObj(ce[0],{configs:st}),Bt={},Wn=st.map(Le=>{const{default:it,key:rt,...zo}=Le;return Bt[rt]=Dt[rt]||it,{...zo,key:rt,hidden:!!J.BLOCKLET_CONFIGURABLE_KEY[rt]}});le={...le,configsList:Wn,configsValue:Bt,hasMissRequiredConfigs:lo(Wn,Bt)}}const tt=I.children.some(ce=>ce.mountPoint==="/"),Be=Ve.find(ce=>ce.meta.bundleDid===Ce),Ne=I.children.find(ce=>ce.meta.bundleDid===Ce);le.title=be||"",Be?le={...le,pathPrefix:Be.mountPoint||"",componentName:Be.meta.name,hasEnvironmentsStep:!1}:Ne?le={...le,pathPrefix:Ne.mountPoint||"",componentName:Ne.meta.name,hasEnvironmentsStep:!1}:le={...le,pathPrefix:tt?`/${pe(be)||pe(qe)}`.toLowerCase():"/",componentName:"",hasEnvironmentsStep:((Vn=(qn=_.current.meta)==null?void 0:qn.environments)==null?void 0:Vn.length)>0};const ge=ir(_.current.meta),Ae=rr(_.current.meta),kt=Mt(I);H({bundleDid:Ce,componentDid:It,...le,hasRequiredEnvironments:ar(_.current.meta),requirePurchase:ge,didSpaceIsRequiredSetup:Ae,didSpaceEndpoint:kt}),G&&ge&&Oo()};h.useEffect(()=>{!l||fe!==0||!I||(Pt({chooseParams:{blocklets:[l],meta:l,registryUrl:u||l.homepage,inStore:!0},isInit:!0}),H({showFromUrlDialog:!1}),he())},[l,fe,I]),de.push({key:"selectComponent",name:d("blocklet.component.selectComponent"),body:e.jsxs(Pe,{sx:{width:400},component:"div",children:[f&&E.showFromUrlDialog&&e.jsx(ci,{mode:"component",onCancel:()=>{H({showFromUrlDialog:!1})},onSuccess:({meta:T,inputUrl:N,inStore:G,registryUrl:W})=>{Pt({chooseParams:{meta:T,inputUrl:N,inStore:G,registryUrl:W},isInit:!0}),H({showFromUrlDialog:!1}),he()},handleText:{title:d("blocklet.component.addComponentTip.fromUrl"),confirm:d("blocklet.component.choose")}}),e.jsx(gn,{stores:s,extra:jo.isInServerlessMode(M)?null:f?e.jsxs(ne,{variant:"text",color:"primary","data-cy":"add-component-from-url",onClick:()=>{H({showFromUrlDialog:!0})},style:{padding:"0 2px"},children:[e.jsx(Qt,{style:{fontSize:20,marginRight:4}})," ",d("blocklet.component.addComponentTip.fromUrl")," "]}):null,loading:C,onChange:()=>{me({}),_.current={}},storageKey:r,children:({currentRegistry:T})=>e.jsx(Cn,{showResourcesSwitch:g,showCategory:v,serverVersion:M==null?void 0:M.version,style:se?{height:"calc(100vh - 56px - 80px - 32px - 40px )"}:{height:"calc(100% - 40px)"},storeUrl:T.url,resourceType:a,resourceDid:n,handleButtonClick:N=>{Pt({chooseParams:{...N,inStore:!0},isInit:!0})},handleBlockletRender:({blocklet:N,defaultRender:G})=>{const W=(E==null?void 0:E.bundleDid)&&(E==null?void 0:E.bundleDid)===(N==null?void 0:N.did);return e.jsxs(dr,{children:[W&&e.jsx("div",{className:"check-container",children:e.jsx(ho,{className:"check-icon"})}),e.jsx("div",{className:W?"choose-blocklet":"",style:{marginLeft:16},children:G})]})}})})]}),cancel:o==="embed"?void 0:d("common.cancel"),confirm:lr({params:E,blocklet:I,t:d}),onCancel:wt,onConfirm:()=>{he()}}),de.push({key:"agreement",name:d("launchBlocklet.introduction"),body:e.jsxs(Pe,{component:"div",className:"agreement-wrapper",children:[e.jsx(vo,{title:d("launchBlocklet.introduction"),subTitle:d("blocklet.component.addComponentTip.introduction")}),e.jsx(Ps,{meta:Y,onClickNext:he,installRelated:ie,onChangeInstallRelated:Ge,handleDescEle:e.jsx("p",{children:d("blocklet.component.addComponentTip.belowInformation")})})]}),cancel:l?void 0:d("common.pre"),confirm:d("launchBlocklet.next"),onCancel:l?wt:_e,onConfirm:()=>{ue(!1),he()}}),Y&&E.requirePurchase&&de.push({key:"purchase",name:e.jsxs(e.Fragment,{children:[d("common.verifyNFT"),e.jsx(ct,{})]}),body:e.jsxs(Pe,{component:"div",className:"flex-align-center",style:{flexDirection:"column"},children:[!(((Gn=($e=V.current)==null?void 0:$e.getCurrentStep)==null?void 0:Gn.call($e))===2||Se)&&e.jsx(lt,{title:d("common.verifyNFT"),subTitle:d("blocklet.component.addComponentTip.verifyNFT")}),He(E.purchaseResultProps)?ee&&e.jsx(_i,{ref:V,meta:ee.meta,mode:E.componentDid?"verify":"both",onCancel:Mo,installOpts:ee.installOpts,handlePaySuccess:Fo}):e.jsx("div",{className:"flex-align-center flex-justify-center",children:e.jsx(Xn,{...E.purchaseResultProps})})]}),disabled:((zn=(et=V.current)==null?void 0:et.getCurrentStep)==null?void 0:zn.call(et))===2||Se,cancel:d("common.pre"),confirm:d("common.next"),onConfirm:()=>{typeof V.current.onNext=="function"&&(V.current.onNext(),ue(!0))},onCancel:()=>{_e()}}),O.hasStartEngine(Y)&&!Xe(Y.did)&&de.push({key:"config",name:d("common.config"),error:S,body:e.jsxs(Pe,{component:"div",children:[e.jsx(lt,{title:d("common.config"),subTitle:d("blocklet.component.addComponentTip.config")}),e.jsx(Z,{label:d("blocklet.component.mountPoint"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"mount-point-input"},fullWidth:!0,helperText:w||d("blocklet.component.mountPointTip"),style:{marginBottom:32},margin:"normal",value:E.pathPrefix,onChange:T=>{const N=T.target.value;H({pathPrefix:N}),k(d("common.slugifyHint",{value:gt(N)}))}}),!!S&&e.jsx(dt,{severity:"error",style:{width:"100%",marginTop:8},children:S})]}),cancel:d("common.pre"),confirm:d("common.next"),onCancel:_e,onConfirm:()=>{he()}}),Y&&!Xe(Y.did)&&(E!=null&&E.hasEnvironmentsStep)&&de.push({key:"environment",name:e.jsxs(e.Fragment,{children:[d("common.environment")," ",E.hasRequiredEnvironments&&e.jsx(ct,{})]}),disabled:!!R||(E==null?void 0:E.hasMissRequiredConfigs),body:()=>e.jsxs(Pe,{component:"div",children:[e.jsx(lt,{title:d("common.environment"),subTitle:d("blocklet.component.addComponentTip.environment")}),e.jsx(an,{style:{marginTop:-12,width:"100%"},schema:E.configsList,defaultValue:E.configsValue,onChange:(T,{action:N,currentItem:G,allValues:W})=>{N==="confirm"&&H({hasMissRequiredConfigs:lo(E.configsList,W),configsValue:W}),N==="edit"?c(G):["cancel","confirm"].includes(N)&&c(null)}})]}),cancel:d("common.pre"),confirm:d("common.next"),onCancel:_e,onConfirm:he}),Y&&!Xe(Y.did)&&(E!=null&&E.didSpaceIsRequiredSetup)&&de.push({key:"didSpace",name:e.jsxs(e.Fragment,{children:[d("blocklet.component.didSpaceConfig")," ",E.didSpaceIsRequiredSetup==="required"&&e.jsx(ct,{})]}),disabled:(E==null?void 0:E.didSpaceIsRequiredSetup)&&!E.didSpaceEndpoint,body:()=>e.jsx(en,{children:e.jsxs(Pe,{component:"div",children:[e.jsx(lt,{title:d("blocklet.component.didSpaceConfig"),subTitle:d("blocklet.component.didSpaceConfigTip")}),e.jsx(y,{sx:{mt:"36px","& > div":{maxWidth:"unset !important","& .MuiAutocomplete-root":{maxWidth:"unset !important"}}},children:e.jsx(hn,{blockletMeta:_.current.meta,onNext:()=>{he()},onEndpointUpdate:Ee})})]})}),cancel:d("common.pre"),confirm:d("common.next"),onCancel:_e,onConfirm:he}),de.push({key:"install",name:Xe(Y==null?void 0:Y.did)?d("common.upgrade"):d("common.install"),disabled:p?!1:He(E.installResultProps),loading:p?!1:He(E.installResultProps),body:e.jsx(Pe,{component:"div",className:"flex-justify-center flex-align-center",style:{flexDirection:"column"},children:He(E.installResultProps)?e.jsx(Qs,{message:e.jsx(pr,{children:d(p?"blocklet.component.installingCanCloseWindowTip":"blocklet.component.installingTip")}),increaseSpeed:.3,messageLoop:!1}):e.jsx("div",{style:{marginTop:120},children:e.jsx(Xn,{...E.installResultProps})})}),confirm:d("common.complete"),onConfirm:()=>{co({timeout:0,componentDid:ye.componentDid,manual:!0}),wt(),setTimeout(()=>{const T=document.getElementsByClassName("dashboard-main")[0];T&&(T.scrollTop=T.scrollHeight)},200)}});const ae=de[fe]||{},Go=()=>C||ae.error||!E.bundleDid?!0:fe>1?!E.pathPrefix:!1;return I?e.jsxs(cr,{sx:{width:"100%",height:se?window.innerHeight:m?"72vh":"100vh"},children:[e.jsx(Xs,{steps:de,mode:"memory",children:e.jsx(sr,{ref:P,meta:Y,isMobile:se,onStepChange:T=>{Qe(T)}})}),e.jsxs(y,{className:"action-bar",children:[ae.cancel&&e.jsx(ne,{onClick:T=>{T.stopPropagation(),ae.onCancel()},disabled:fe===de.length-2&&C,color:"inherit",children:ae.cancel||d("common.cancel")}),ae.confirm&&e.jsx(ne,{onClick:T=>{T.stopPropagation(),ae.onConfirm()},color:"primary","data-cy":"submit-confirm-next",disabled:C||(typeof ae.disabled=="boolean"?ae.disabled:Go()),variant:"contained",autoFocus:!0,title:ae.confirm,style:{marginLeft:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"140px",maxWidth:"280px",textAlign:"center"},children:e.jsxs(y,{display:"flex",alignItems:"center",children:[(typeof ae.loading=="boolean"?ae.loading:C)&&e.jsx(re,{style:{marginRight:8},size:16}),ae.confirm]})})]})]}):null}vn.propTypes={onClose:i.func,mode:i.oneOf(["normal","embed"]),inDialog:i.bool,stores:i.arrayOf(i.string),storeUrl:i.string,resourceType:i.string,resourceDid:i.string,storageKey:i.string,selectedMeta:i.object,showResourcesSwitch:i.bool,showFromUrl:i.bool,enableRunBackground:i.bool,showCategory:i.bool};vn.defaultProps={onClose:()=>{},mode:"normal",stores:[],storeUrl:"",resourceType:"",resourceDid:"",storageKey:"",inDialog:!0,selectedMeta:null,showResourcesSwitch:!0,showFromUrl:!0,enableRunBackground:!0,showCategory:!0};const cr=F(y)`
|
|
321
321
|
.action-bar {
|
|
322
322
|
display: flex;
|
|
323
323
|
justify-content: flex-end;
|
|
@@ -329,7 +329,7 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
329
329
|
background: #fff;
|
|
330
330
|
border-top: 1px solid #eee;
|
|
331
331
|
}
|
|
332
|
-
`,
|
|
332
|
+
`,Pe=F(te)`
|
|
333
333
|
width: 100%;
|
|
334
334
|
height: 100%;
|
|
335
335
|
`,lt=F(vo)`
|
|
@@ -389,15 +389,15 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
389
389
|
`;function St({blocklet:t,showDialog:o,setShowDialog:s,selectedMeta:a}){const{t:n}=z(),r=Ht(u=>u.breakpoints.down("md")),{inService:m}=K(),l=()=>{s(!1)};return o?e.jsx(ur,{title:n("blocklet.component.addWithName",{name:O.getDisplayName(t)}),maxWidth:!1,fullWidth:!1,PaperProps:{style:r?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(u,g)=>{g!=="backdropClick"&&l()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:e.jsx(vn,{selectedMeta:a,onClose:l,storageKey:m?Ks:Ys})}):null}St.propTypes={selectedMeta:i.object,showDialog:i.bool.isRequired,setShowDialog:i.func.isRequired,blocklet:i.object.isRequired};St.defaultProps={selectedMeta:null};const ur=F(xt)`
|
|
390
390
|
.MuiDialogContent-root {
|
|
391
391
|
}
|
|
392
|
-
`;function Sn({blocklet:t,children:o}){const{t:s}=z(),[a,n]=h.useState(!1),r=m=>{m.stopPropagation(),n(!0)};return e.jsxs(e.Fragment,{children:[typeof o=="function"?o({open:r}):e.jsxs(ge,{onClick:r,className:"component-action","data-cy":"action-add-component",children:[e.jsx(Qt,{style:{fontSize:18,marginRight:5}}),s("blocklet.component.add")]}),e.jsx(St,{showDialog:a,setShowDialog:n,blocklet:t})]})}Sn.propTypes={children:i.any,blocklet:i.object.isRequired};Sn.defaultProps={children:null};const mr=t=>t.children.filter(o=>o.meta.interfaces.find(s=>s.type===J.BLOCKLET_INTERFACE_TYPE_WEB));function bt({params:t,setParams:o,setError:s,serviceTypes:a}){const{t:n}=z(),{blocklet:r}=oe(),m=r.meta.did,l=mr(r),[u,g]=h.useState([]),f={301:n("common.redirectPermanently"),302:n("common.redirectTemporary"),307:n("common.redirectTemporary"),308:n("common.redirectPermanently")};return h.useEffect(()=>{if(t.type===B.ROUTING_RULE_TYPES.COMPONENT&&t.componentId){const p=l.find(b=>b.meta.did===t.componentId),S=O.findWebInterface(p.meta),d=(Array.isArray(S==null?void 0:S.pageGroups)?S.pageGroups:[]).map(b=>({value:b,label:`${b} pages`}));d.length&&d.unshift({value:"",label:"All pages"}),g(d),t.pageGroup&&d.find(b=>b.value===t.pageGroup)===!1&&o({...t,pageGroups:""})}},[t.componentId,t.type]),e.jsxs(e.Fragment,{children:[e.jsx(Z,{select:!0,label:n("router.domain.add.type"),autoComplete:"off",variant:"outlined",name:"type","data-cy":"domain-add-type",fullWidth:!0,value:t.type,onChange:p=>{s(""),o({...t,type:p.target.value,did:p.target.value===B.ROUTING_RULE_TYPES.BLOCKLET?m:"",__disableConfirm:!1})},style:{marginBottom:32},SelectProps:{},children:a.map(({name:p,value:S})=>e.jsx(ge,{value:S,children:p},S))}),t.type===B.ROUTING_RULE_TYPES.REDIRECT&&[e.jsx(Z,{select:!0,label:n("router.domain.add.redirect"),autoComplete:"off",variant:"outlined",name:"type",fullWidth:!0,value:t.redirectCode,onChange:p=>o({...t,redirectCode:p.target.value}),style:{marginBottom:32},SelectProps:{},children:Object.keys(f).map(p=>e.jsx(ge,{value:p,children:`${f[p]} - ${p}`},p))},"redirectCode"),e.jsx(Z,{label:n("common.redirectUrl"),autoComplete:"off",variant:"outlined",name:"url",inputProps:{"data-cy":"redirect-url-input"},fullWidth:!0,value:t.url,helperText:n("router.urlHelperText"),style:{marginBottom:32},onChange:p=>{o({...t,url:p.target.value,__disableConfirm:!p.target.value.trim()}),p.target.value.trim()?s(""):s(n("router.validation.redirectUrlRequired"))}},"redirectUrl")],t.type===B.ROUTING_RULE_TYPES.COMPONENT&&[e.jsx(Z,{select:!0,label:n("router.domain.add.component"),autoComplete:"off",variant:"outlined","data-cy":"select-component-input",name:"componentId",fullWidth:!0,value:t.componentId,onChange:p=>{o({...t,componentId:p.target.value})},style:{marginBottom:32},SelectProps:{},children:l.map(p=>e.jsx(ge,{value:p.meta.did,selected:p.meta.did===t.componentId,children:O.getDisplayName(p,!0)},p.meta.did))},"componentId"),u.length?e.jsx(Z,{select:!0,label:n("router.domain.add.pageGroup"),autoComplete:"off",variant:"outlined",name:"pageGroup","data-cy":"route-group-input",fullWidth:!0,value:t.pageGroup,helperText:n("router.domain.add.pageGroupTip"),style:{marginBottom:32},onChange:p=>{o({...t,pageGroup:p.target.value})},SelectProps:{},children:u.map(p=>e.jsx(ge,{value:p.value,selected:p.value===t.pageGroup,children:p.label},p.label))},"pageGroup"):null].filter(Boolean),t.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&e.jsx(Z,{label:n("common.rewriteUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"rewrite-url-input",fullWidth:!0,value:t.url,helperText:n("router.urlHelperText"),style:{marginBottom:32},onChange:p=>{const S=p.target.value.trim();o({...t,url:p.target.value,__disableConfirm:!S}),s(S?"":n("router.validation.rewriteUrlRequired"))}},"url"),t.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&[e.jsx(Z,{select:!0,label:n("router.rule.add.responseType"),autoComplete:"off",variant:"outlined",name:"responseType",fullWidth:!0,value:t.responseType,onChange:p=>o({...t,responseType:p.target.value}),style:{marginBottom:32},SelectProps:{},children:B.ROUTING_RESPONSE_TYPES.map(p=>e.jsx(ge,{value:p.value,children:p.text},p.value))},"responseType"),e.jsx(Z,{label:n("router.rule.add.responseBody"),autoComplete:"off",variant:"outlined",name:"responseBody","data-cy":"response-body-input",fullWidth:!0,multiline:!0,minRows:3,value:t.responseBody,helperText:n("router.rule.add.responseBodyTip"),style:{marginBottom:32},onChange:p=>{const S=p.target.value.trim();o({...t,responseBody:p.target.value,__disableConfirm:!S}),s(S?"":n("router.rule.add.responseBodyRequired"))}},"response-body")]]})}bt.propTypes={params:i.object,serviceTypes:i.array,setParams:i.func,setError:i.func};bt.defaultProps={params:{},serviceTypes:[{name:"Redirect",value:B.ROUTING_RULE_TYPES.REDIRECT},{name:"Default - User will see the 404 page",value:B.ROUTING_RULE_TYPES.NONE},{name:"Rewrite - Route traffic without redirect",value:B.ROUTING_RULE_TYPES.GENERAL_REWRITE},{name:"Response - Response with provided content",value:B.ROUTING_RULE_TYPES.DIRECT_RESPONSE},{name:"Component - Pass traffic to blocklet component",value:B.ROUTING_RULE_TYPES.COMPONENT}],setParams:()=>{},setError:()=>{}};function bn({children:t,hiddenChildren:o,open:s,onClose:a}){const{t:n}=z(),{api:r}=K(),{blocklet:m}=oe(),[l,u]=h.useState(!1),[g,f]=h.useState(!1),p=m.meta.did,S=m.site.id,d=()=>{a==null||a(),u(!1),f(!1)},b=async c=>{try{const v=await ut(c,n);if(v)throw v;u(!0);const j={from:{pathPrefix:ue(c.pathPrefix)},to:{type:c.type}};c.type===B.ROUTING_RULE_TYPES.REDIRECT&&(j.to.url=c.url.trim(),j.to.redirectCode=c.redirectCode),c.type===B.ROUTING_RULE_TYPES.COMPONENT&&(j.to.did=p,j.to.componentId=c.componentId,j.to.pageGroup=c.pageGroup),c.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(j.to.url=ue(c.url)),c.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(j.to.response={status:200,contentType:c.responseType,body:c.responseBody}),await r.addRoutingRule({input:{id:S,rule:j,teamDid:p}})}catch(v){A.error(v.message)}finally{u(!1),f(!1)}},C={title:n("router.rule.add.title"),description:(c,v,j)=>{const T=I=>{if(j(null),ut(I,n)){v({...I,__disableConfirm:!0});return}v({...I})};return e.jsxs(ee,{component:"div",children:[e.jsx(Z,{label:n("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"path-prefix-input"},fullWidth:!0,autoFocus:!0,helperText:c.pathPrefixHint||n("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:c.pathPrefix,onChange:I=>{let U=!1;const L=bo({params:{...c,pathPrefix:I.target.value},blocklets:[m]});j(L),c.type===B.ROUTING_RULE_TYPES.BLOCKLET&&L&&(U=!0),c.type===B.ROUTING_RULE_TYPES.REDIRECT&&!c.url&&(U=!0),c.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&!c.url&&(U=!0),c.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(!c.responseType||!c.responseBody)&&(U=!0),I.target.value.trim()||(U=!0,j(n("router.validation.pathPrefixRequired"))),U||j("");const k=n("common.slugifyHint",{value:gt(I.target.value)});v({...c,pathPrefix:I.target.value,pathPrefixHint:k,__disableConfirm:U})}}),e.jsx(bt,{params:c,setParams:T,setError:j})]})},confirm:n("router.rule.add.confirm"),cancel:n("common.cancel"),params:{did:"",pathPrefix:"",type:B.ROUTING_RULE_TYPES.REDIRECT,componentId:"",pageGroup:"",redirectCode:302,responseType:"text/plain",responseBody:"",__disableConfirm:!0},onConfirm:b,onCancel:d},x=c=>{c.stopPropagation(),f(!0)};let R=null;return o||(R=typeof t=="function"?t({open:x}):e.jsxs(ge,{onClick:x,className:"rule-action","data-cy":"action-add-rule",children:[l?e.jsx(re,{size:16}):e.jsx(Qt,{style:{fontSize:18,marginRight:5}}),n("router.rule.add.title")]})),e.jsxs(e.Fragment,{children:[R,(s||g)&&e.jsx(Fe,{title:C.title,description:C.description,confirm:C.confirm,cancel:C.cancel,params:C.params,onConfirm:C.onConfirm,onCancel:C.onCancel,color:"primary"})]})}bn.propTypes={children:i.any,onClose:i.func,hiddenChildren:i.bool,open:i.bool};bn.defaultProps={children:null,open:!1,onClose:null,hiddenChildren:!1};function Rn({id:t,from:o,children:s}){const{t:a}=z(),{api:n}=K(),{blocklet:r}=oe(),[m,l]=h.useState(!1),[u,g]=h.useState(null),f=r.meta.did,p=r.site.id,S=o.pathPrefix,d=()=>{l(!1),g(null)},b=async()=>{l(!0);try{await n.deleteRoutingRule({input:{id:p,ruleId:t,teamDid:f}})}catch(R){A.error(R.message)}finally{g(null),l(!1)}},C={keyName:S,title:a("router.rule.delete.title"),description:a("router.rule.delete.description",{name:`<b>${S}</b>`}),confirmPlaceholder:a("router.rule.delete.confirm_desc",{name:S}),confirm:a("common.delConfirm"),cancel:a("router.rule.delete.cancel"),onConfirm:b,onCancel:d},x=R=>{R.stopPropagation(),g(C)};return e.jsxs(e.Fragment,{children:[typeof s=="function"?s({loading:m,open:x}):e.jsxs(ge,{onClick:x,className:"rule-action","data-cy":"action-delete-rule",children:[m?e.jsx(re,{size:16}):e.jsx(Ct,{style:{fontSize:18,marginRight:5}}),a("router.rule.delete.title")]}),u&&e.jsx(ji,{keyName:u.keyName,title:u.title,description:u.description,confirmPlaceholder:u.confirmPlaceholder,confirm:u.confirm,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}Rn.propTypes={id:i.string.isRequired,from:i.object.isRequired,children:i.any};Rn.defaultProps={children:null};function En({id:t,from:o,to:s,children:a}){var c,v;const{t:n}=z(),{api:r}=K(),{blocklet:m}=oe(),[l,u]=h.useState(!1),[g,f]=h.useState(null),p=m.meta.did,S=m.site.id,d=o.pathPrefix,b=()=>{u(!1),f(null)},C=async j=>{try{const T=await ut(j,n);if(T)throw T;u(!0);const I={id:t,from:{pathPrefix:ue(j.pathPrefix)},to:{type:j.type}};j.type===B.ROUTING_RULE_TYPES.REDIRECT&&(I.to.url=j.url,I.to.redirectCode=j.redirectCode),j.type===B.ROUTING_RULE_TYPES.COMPONENT&&(I.to.did=p,I.to.componentId=j.componentId,I.to.pageGroup=j.pageGroup),j.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(I.to.url=ue(j.url)),j.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(I.to.response={status:200,contentType:j.responseType,body:j.responseBody}),await r.updateRoutingRule({input:{id:S,rule:I,teamDid:p}})}catch(T){A.error(T.message)}finally{u(!1),f(null)}},x={title:n("router.rule.update.title"),description:(j,T,I)=>{const U=L=>{if(ut(L,n)){T({...L,__disableConfirm:!0});return}T({...L})};return e.jsxs(ee,{component:"div",children:[e.jsx(Z,{label:n("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"path-prefix-input"},fullWidth:!0,autoFocus:!0,helperText:j.helperText||n("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:j.pathPrefix,onChange:L=>{let k=!1;j.type===B.ROUTING_RULE_TYPES.REDIRECT&&!j.url&&(k=!0),j.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&!j.url&&(k=!0),j.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(!j.responseType||!j.responseBody)&&(k=!0),L.target.value.trim()||(k=!0,I(n("router.validation.pathPrefixRequired"))),k||I("");const M=n("common.slugifyHint",{value:gt(L.target.value)});T({...j,pathPrefix:L.target.value,helperText:M,__disableConfirm:k})}}),e.jsx(bt,{params:j,setParams:U,setError:I})]})},confirm:n("router.rule.update.confirm"),cancel:n("router.rule.update.cancel"),color:"primary",params:{did:s.did||"",pathPrefix:d==="/"?d:d.replace(/^\/+/,"").replace(/\/+$/,""),type:s.type||B.ROUTING_RULE_TYPES.BLOCKLET,redirectCode:s.redirectCode||302,componentId:s.componentId||"",pageGroup:s.pageGroup||"",url:s.url||"",responseType:((c=s.response)==null?void 0:c.contentType)||"",responseBody:(((v=s.response)==null?void 0:v.body)||"").replace(/\\"/g,'"'),__disableConfirm:!1},onConfirm:C,onCancel:b},R=j=>{j.stopPropagation(),f(x)};return e.jsxs(e.Fragment,{children:[typeof a=="function"?a({loading:l,open:R}):e.jsxs(ge,{onClick:R,className:"rule-action","data-cy":"action-update-rule",children:[l?e.jsx(re,{size:16}):e.jsx(Co,{style:{fontSize:18,marginRight:5}}),n("router.rule.update.title")]}),g&&e.jsx(Fe,{title:g.title,description:g.description,confirm:g.confirm,color:g.color,cancel:g.cancel,params:g.params,onConfirm:g.onConfirm,onCancel:g.onCancel})]})}En.propTypes={id:i.string.isRequired,from:i.object.isRequired,to:i.object.isRequired,children:i.any};En.defaultProps={children:null};function Tn(t){const{locale:o}=z(),{blocklet:s,recommendedDomain:a}=oe(),n=xo(a,t.from.pathPrefix,Kt(s,o));return e.jsxs(y,{display:"flex",alignItems:"center",children:[e.jsx(y,{component:"a",sx:{display:{xs:"flex",md:"none"}},target:"_blank",href:n,rel:"noopener noreferrer",title:n,children:e.jsx($,{size:"small",children:e.jsx(Ro,{})})}),e.jsx(En,{...t,children:({open:r})=>e.jsx($,{size:"small",onClick:r,disabled:t.isProtected,"data-cy":"action-update-rule",children:e.jsx(Yt,{})})}),e.jsx(Rn,{...t,children:({open:r})=>e.jsx($,{size:"small",onClick:r,disabled:t.isProtected,"data-cy":"action-delete-rule",children:e.jsx(Ct,{})})})]})}Tn.propTypes={isProtected:i.bool};Tn.defaultProps={isProtected:!1};function Do({group:t,...o}){return t?e.jsx(Ze,{type:"reverse",...o,children:t}):null}Do.propTypes={group:i.string.isRequired};function ft({domain:t,isHttps:o,toUrl:s}){const a=o?"https":"http";let n=s;return fs(n)||(n=`${a}://${t}${s}`),e.jsx(yt,{href:n,target:"_blank",style:{fontSize:14},underline:"hover",children:s},n)}ft.propTypes={domain:i.string.isRequired,toUrl:i.string.isRequired,isHttps:i.bool};ft.defaultProps={isHttps:!1};function Rt({hasPermission:t}){const{t:o,locale:s}=z(),a=mo(),{blocklet:n,recommendedDomain:r}=oe();return n.site.rules.filter(l=>l.to.type!==B.ROUTING_RULE_TYPES.BLOCKLET).map(l=>{var p;let u=null,g=null;l.to.type===B.ROUTING_RULE_TYPES.NONE?u="404":l.to.type===B.ROUTING_RULE_TYPES.REDIRECT?u=l.to.redirectCode:l.to.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE?u="R":l.to.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE?u=e.jsx(Ti,{sx:{color:"text.secondary",fontSize:"45px"}}):l.to.type===B.ROUTING_RULE_TYPES.COMPONENT&&(g=n.children.find(S=>S.meta.did===l.to.componentId),u="C");const f=l.isProtected?e.jsx(ve,{title:o("blocklet.router.urlLockTooltip"),placement:"top",children:e.jsx("span",{children:e.jsx($,{disabled:!0,size:"small",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0,margin:"12px 0"},children:e.jsx(Ci,{style:{fill:a.palette.text.disabled}})})})}):e.jsx(Tn,{...l});return[e.jsxs(y,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[e.jsxs(y,{width:{xs:300,md:400},display:"flex",alignItems:"center",children:[e.jsx(y,{className:"component-item__indent",width:28}),typeof u=="object"?u:e.jsx(us,{children:u}),e.jsxs(y,{sx:{ml:2,flex:1,wordBreak:"break-word"},children:[e.jsxs(y,{style:{color:"#222",fontSize:16},children:[l.to.type===B.ROUTING_RULE_TYPES.NONE&&o("common.page404"),l.to.type===B.ROUTING_RULE_TYPES.REDIRECT&&o("common.redirect"),l.to.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&o("common.rewrite"),l.to.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&((p=B.ROUTING_RESPONSE_TYPES.find(S=>S.value===l.to.response.contentType))==null?void 0:p.text),l.to.type===B.ROUTING_RULE_TYPES.COMPONENT&&O.getDisplayName(g,!0)]}),e.jsxs(y,{display:"flex",alignItems:"center",children:[l.to.type===B.ROUTING_RULE_TYPES.REDIRECT&&e.jsx(ft,{domain:r,toUrl:l.to.url}),l.to.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&e.jsx(ft,{domain:r,toUrl:l.to.url}),l.to.type===B.ROUTING_RULE_TYPES.COMPONENT&&e.jsx(Do,{group:l.to.pageGroup})]})]})]}),e.jsx(y,{px:2,sx:{display:{xs:"none",md:"flex"}},alignItems:"center",flexGrow:"1",children:e.jsx(yt,{href:xo(r,l.from.pathPrefix,Kt(n,s)),target:"_blank",style:{fontSize:16},underline:"hover",children:ms(l.from.pathPrefix,"/")||"/"})},l.from.pathPrefix),e.jsx(y,{children:t&&e.jsx("div",{style:{textAlign:"right"},children:f})},"actions")]},"rule"),e.jsx(Jt,{},"divider")]})}Rt.propTypes={hasPermission:i.bool};Rt.defaultProps={hasPermission:!1};const fr=Me(Rt,"mutate_blocklets"),hr=Me(Rt,"",Oe);function gr(t){const{inService:o}=K();return o?e.jsx(hr,{...t}):e.jsx(fr,{...t})}function xr({blocklet:t,scrollToComponent:o}={blocklet:null,scrollToComponent:!1}){const s=hs(),{t:a}=z(),n=h.useRef(null),r=h.useMemo(()=>{if(!t||!t.optionalComponents)return null;const m=new URLSearchParams(window.location.search),l=m.get("install-component");if(l){n.current=l,m.delete("install-component"),s(m.toString());const u=t.optionalComponents.find(f=>f.meta.did===l);if(!u)return A.success(a("notification.installComponentError",{did:l})),null;const{meta:g}=u;if(o){const f=document.getElementById(`optional-component-${l}`),p=document.querySelector(".dashboard-main");if(f){const S=f.getBoundingClientRect(),d=p.getBoundingClientRect();p.scrollTo({top:S.top-d.top+p.scrollTop,behavior:"smooth"})}}return g}return null},[t,s,a,o]);return h.useEffect(()=>{var m;n.current&&window.opener&&window.opener.postMessage({blocklet:t,kind:"component-installer"},(m=window.blocklet)==null?void 0:m.appUrl)},[t]),r}function wn({component:t,remove:o,disabled:s,tip:a,showConfirm:n,hideBtn:r,onCancel:m}){const{t:l}=h.useContext(Ce),[u,g]=h.useState(!1),[f,p]=h.useState(null),S=async R=>{g(!0),await o(R.component,R.removeType),g(!1),p(null)},d=s||u,b=()=>{p({title:`${l("common.delete")} ${t.meta.title||t.meta.name}`,description:(R,c)=>e.jsxs(ee,{component:"div",children:[e.jsx(ee,{gutterBottom:!0,children:l("blocklet.action.removeComponentDescription")}),e.jsxs(Si,{name:"removeType",value:R.removeType,onChange:v=>c({...R,removeType:v.target.value}),children:[e.jsx(_t,{value:"keepData",control:e.jsx(oo,{}),label:l("blocklet.action.removeComponentKeepData")}),e.jsx(_t,{value:"complete",control:e.jsx(oo,{}),label:l("blocklet.action.removeComponentComplete")})]})]}),confirm:l("common.confirm"),cancel:l("common.cancel"),params:{component:t,removeType:"keepData"},onConfirm:S,onCancel:()=>{p(null),m()}})};h.useEffect(()=>{n?b():(g(!1),p(null))},[n]);const C=e.jsx(yr,{size:"small",disabled:d,onClick:()=>b,"data-cy":"delete-component-btn",children:e.jsx(Ct,{disabled:d})}),x=e.jsx(ve,{title:a||l("common.delete"),children:e.jsx("span",{children:C})});return e.jsxs(e.Fragment,{children:[!r&&x,f&&e.jsx(Fe,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})]})}wn.propTypes={component:i.object.isRequired,remove:i.func,onCancel:i.func,disabled:i.bool,showConfirm:i.bool,hideBtn:i.bool,tip:i.string};wn.defaultProps={remove:async()=>{},disabled:!1,showConfirm:!1,hideBtn:!1,onCancel:()=>{},tip:""};const yr=F($)`
|
|
392
|
+
`;function Sn({blocklet:t,children:o}){const{t:s}=z(),[a,n]=h.useState(!1),r=m=>{m.stopPropagation(),n(!0)};return e.jsxs(e.Fragment,{children:[typeof o=="function"?o({open:r}):e.jsxs(xe,{onClick:r,className:"component-action","data-cy":"action-add-component",children:[e.jsx(Qt,{style:{fontSize:18,marginRight:5}}),s("blocklet.component.add")]}),e.jsx(St,{showDialog:a,setShowDialog:n,blocklet:t})]})}Sn.propTypes={children:i.any,blocklet:i.object.isRequired};Sn.defaultProps={children:null};const mr=t=>t.children.filter(o=>o.meta.interfaces.find(s=>s.type===J.BLOCKLET_INTERFACE_TYPE_WEB));function bt({params:t,setParams:o,setError:s,serviceTypes:a}){const{t:n}=z(),{blocklet:r}=oe(),m=r.meta.did,l=mr(r),[u,g]=h.useState([]),f={301:n("common.redirectPermanently"),302:n("common.redirectTemporary"),307:n("common.redirectTemporary"),308:n("common.redirectPermanently")};return h.useEffect(()=>{if(t.type===B.ROUTING_RULE_TYPES.COMPONENT&&t.componentId){const p=l.find(b=>b.meta.did===t.componentId),v=O.findWebInterface(p.meta),d=(Array.isArray(v==null?void 0:v.pageGroups)?v.pageGroups:[]).map(b=>({value:b,label:`${b} pages`}));d.length&&d.unshift({value:"",label:"All pages"}),g(d),t.pageGroup&&d.find(b=>b.value===t.pageGroup)===!1&&o({...t,pageGroups:""})}},[t.componentId,t.type]),e.jsxs(e.Fragment,{children:[e.jsx(Z,{select:!0,label:n("router.domain.add.type"),autoComplete:"off",variant:"outlined",name:"type","data-cy":"domain-add-type",fullWidth:!0,value:t.type,onChange:p=>{s(""),o({...t,type:p.target.value,did:p.target.value===B.ROUTING_RULE_TYPES.BLOCKLET?m:"",__disableConfirm:!1})},style:{marginBottom:32},SelectProps:{},children:a.map(({name:p,value:v})=>e.jsx(xe,{value:v,children:p},v))}),t.type===B.ROUTING_RULE_TYPES.REDIRECT&&[e.jsx(Z,{select:!0,label:n("router.domain.add.redirect"),autoComplete:"off",variant:"outlined",name:"type",fullWidth:!0,value:t.redirectCode,onChange:p=>o({...t,redirectCode:p.target.value}),style:{marginBottom:32},SelectProps:{},children:Object.keys(f).map(p=>e.jsx(xe,{value:p,children:`${f[p]} - ${p}`},p))},"redirectCode"),e.jsx(Z,{label:n("common.redirectUrl"),autoComplete:"off",variant:"outlined",name:"url",inputProps:{"data-cy":"redirect-url-input"},fullWidth:!0,value:t.url,helperText:n("router.urlHelperText"),style:{marginBottom:32},onChange:p=>{o({...t,url:p.target.value,__disableConfirm:!p.target.value.trim()}),p.target.value.trim()?s(""):s(n("router.validation.redirectUrlRequired"))}},"redirectUrl")],t.type===B.ROUTING_RULE_TYPES.COMPONENT&&[e.jsx(Z,{select:!0,label:n("router.domain.add.component"),autoComplete:"off",variant:"outlined","data-cy":"select-component-input",name:"componentId",fullWidth:!0,value:t.componentId,onChange:p=>{o({...t,componentId:p.target.value})},style:{marginBottom:32},SelectProps:{},children:l.map(p=>e.jsx(xe,{value:p.meta.did,selected:p.meta.did===t.componentId,children:O.getDisplayName(p,!0)},p.meta.did))},"componentId"),u.length?e.jsx(Z,{select:!0,label:n("router.domain.add.pageGroup"),autoComplete:"off",variant:"outlined",name:"pageGroup","data-cy":"route-group-input",fullWidth:!0,value:t.pageGroup,helperText:n("router.domain.add.pageGroupTip"),style:{marginBottom:32},onChange:p=>{o({...t,pageGroup:p.target.value})},SelectProps:{},children:u.map(p=>e.jsx(xe,{value:p.value,selected:p.value===t.pageGroup,children:p.label},p.label))},"pageGroup"):null].filter(Boolean),t.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&e.jsx(Z,{label:n("common.rewriteUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"rewrite-url-input",fullWidth:!0,value:t.url,helperText:n("router.urlHelperText"),style:{marginBottom:32},onChange:p=>{const v=p.target.value.trim();o({...t,url:p.target.value,__disableConfirm:!v}),s(v?"":n("router.validation.rewriteUrlRequired"))}},"url"),t.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&[e.jsx(Z,{select:!0,label:n("router.rule.add.responseType"),autoComplete:"off",variant:"outlined",name:"responseType",fullWidth:!0,value:t.responseType,onChange:p=>o({...t,responseType:p.target.value}),style:{marginBottom:32},SelectProps:{},children:B.ROUTING_RESPONSE_TYPES.map(p=>e.jsx(xe,{value:p.value,children:p.text},p.value))},"responseType"),e.jsx(Z,{label:n("router.rule.add.responseBody"),autoComplete:"off",variant:"outlined",name:"responseBody","data-cy":"response-body-input",fullWidth:!0,multiline:!0,minRows:3,value:t.responseBody,helperText:n("router.rule.add.responseBodyTip"),style:{marginBottom:32},onChange:p=>{const v=p.target.value.trim();o({...t,responseBody:p.target.value,__disableConfirm:!v}),s(v?"":n("router.rule.add.responseBodyRequired"))}},"response-body")]]})}bt.propTypes={params:i.object,serviceTypes:i.array,setParams:i.func,setError:i.func};bt.defaultProps={params:{},serviceTypes:[{name:"Redirect",value:B.ROUTING_RULE_TYPES.REDIRECT},{name:"Default - User will see the 404 page",value:B.ROUTING_RULE_TYPES.NONE},{name:"Rewrite - Route traffic without redirect",value:B.ROUTING_RULE_TYPES.GENERAL_REWRITE},{name:"Response - Response with provided content",value:B.ROUTING_RULE_TYPES.DIRECT_RESPONSE},{name:"Component - Pass traffic to blocklet component",value:B.ROUTING_RULE_TYPES.COMPONENT}],setParams:()=>{},setError:()=>{}};function bn({children:t,hiddenChildren:o,open:s,onClose:a}){const{t:n}=z(),{api:r}=K(),{blocklet:m}=oe(),[l,u]=h.useState(!1),[g,f]=h.useState(!1),p=m.meta.did,v=m.site.id,d=()=>{a==null||a(),u(!1),f(!1)},b=async c=>{try{const S=await ut(c,n);if(S)throw S;u(!0);const j={from:{pathPrefix:pe(c.pathPrefix)},to:{type:c.type}};c.type===B.ROUTING_RULE_TYPES.REDIRECT&&(j.to.url=c.url.trim(),j.to.redirectCode=c.redirectCode),c.type===B.ROUTING_RULE_TYPES.COMPONENT&&(j.to.did=p,j.to.componentId=c.componentId,j.to.pageGroup=c.pageGroup),c.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(j.to.url=pe(c.url)),c.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(j.to.response={status:200,contentType:c.responseType,body:c.responseBody}),await r.addRoutingRule({input:{id:v,rule:j,teamDid:p}})}catch(S){A.error(S.message)}finally{u(!1),f(!1)}},C={title:n("router.rule.add.title"),description:(c,S,j)=>{const w=k=>{if(j(null),ut(k,n)){S({...k,__disableConfirm:!0});return}S({...k})};return e.jsxs(te,{component:"div",children:[e.jsx(Z,{label:n("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"path-prefix-input"},fullWidth:!0,autoFocus:!0,helperText:c.pathPrefixHint||n("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:c.pathPrefix,onChange:k=>{let U=!1;const L=bo({params:{...c,pathPrefix:k.target.value},blocklets:[m]});j(L),c.type===B.ROUTING_RULE_TYPES.BLOCKLET&&L&&(U=!0),c.type===B.ROUTING_RULE_TYPES.REDIRECT&&!c.url&&(U=!0),c.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&!c.url&&(U=!0),c.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(!c.responseType||!c.responseBody)&&(U=!0),k.target.value.trim()||(U=!0,j(n("router.validation.pathPrefixRequired"))),U||j("");const D=n("common.slugifyHint",{value:gt(k.target.value)});S({...c,pathPrefix:k.target.value,pathPrefixHint:D,__disableConfirm:U})}}),e.jsx(bt,{params:c,setParams:w,setError:j})]})},confirm:n("router.rule.add.confirm"),cancel:n("common.cancel"),params:{did:"",pathPrefix:"",type:B.ROUTING_RULE_TYPES.REDIRECT,componentId:"",pageGroup:"",redirectCode:302,responseType:"text/plain",responseBody:"",__disableConfirm:!0},onConfirm:b,onCancel:d},x=c=>{c.stopPropagation(),f(!0)};let R=null;return o||(R=typeof t=="function"?t({open:x}):e.jsxs(xe,{onClick:x,className:"rule-action","data-cy":"action-add-rule",children:[l?e.jsx(re,{size:16}):e.jsx(Qt,{style:{fontSize:18,marginRight:5}}),n("router.rule.add.title")]})),e.jsxs(e.Fragment,{children:[R,(s||g)&&e.jsx(Fe,{title:C.title,description:C.description,confirm:C.confirm,cancel:C.cancel,params:C.params,onConfirm:C.onConfirm,onCancel:C.onCancel,color:"primary"})]})}bn.propTypes={children:i.any,onClose:i.func,hiddenChildren:i.bool,open:i.bool};bn.defaultProps={children:null,open:!1,onClose:null,hiddenChildren:!1};function Rn({id:t,from:o,children:s}){const{t:a}=z(),{api:n}=K(),{blocklet:r}=oe(),[m,l]=h.useState(!1),[u,g]=h.useState(null),f=r.meta.did,p=r.site.id,v=o.pathPrefix,d=()=>{l(!1),g(null)},b=async()=>{l(!0);try{await n.deleteRoutingRule({input:{id:p,ruleId:t,teamDid:f}})}catch(R){A.error(R.message)}finally{g(null),l(!1)}},C={keyName:v,title:a("router.rule.delete.title"),description:a("router.rule.delete.description",{name:`<b>${v}</b>`}),confirmPlaceholder:a("router.rule.delete.confirm_desc",{name:v}),confirm:a("common.delConfirm"),cancel:a("router.rule.delete.cancel"),onConfirm:b,onCancel:d},x=R=>{R.stopPropagation(),g(C)};return e.jsxs(e.Fragment,{children:[typeof s=="function"?s({loading:m,open:x}):e.jsxs(xe,{onClick:x,className:"rule-action","data-cy":"action-delete-rule",children:[m?e.jsx(re,{size:16}):e.jsx(Ct,{style:{fontSize:18,marginRight:5}}),a("router.rule.delete.title")]}),u&&e.jsx(ji,{keyName:u.keyName,title:u.title,description:u.description,confirmPlaceholder:u.confirmPlaceholder,confirm:u.confirm,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}Rn.propTypes={id:i.string.isRequired,from:i.object.isRequired,children:i.any};Rn.defaultProps={children:null};function En({id:t,from:o,to:s,children:a}){var c,S;const{t:n}=z(),{api:r}=K(),{blocklet:m}=oe(),[l,u]=h.useState(!1),[g,f]=h.useState(null),p=m.meta.did,v=m.site.id,d=o.pathPrefix,b=()=>{u(!1),f(null)},C=async j=>{try{const w=await ut(j,n);if(w)throw w;u(!0);const k={id:t,from:{pathPrefix:pe(j.pathPrefix)},to:{type:j.type}};j.type===B.ROUTING_RULE_TYPES.REDIRECT&&(k.to.url=j.url,k.to.redirectCode=j.redirectCode),j.type===B.ROUTING_RULE_TYPES.COMPONENT&&(k.to.did=p,k.to.componentId=j.componentId,k.to.pageGroup=j.pageGroup),j.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(k.to.url=pe(j.url)),j.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(k.to.response={status:200,contentType:j.responseType,body:j.responseBody}),await r.updateRoutingRule({input:{id:v,rule:k,teamDid:p}})}catch(w){A.error(w.message)}finally{u(!1),f(null)}},x={title:n("router.rule.update.title"),description:(j,w,k)=>{const U=L=>{if(ut(L,n)){w({...L,__disableConfirm:!0});return}w({...L})};return e.jsxs(te,{component:"div",children:[e.jsx(Z,{label:n("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"path-prefix-input"},fullWidth:!0,autoFocus:!0,helperText:j.helperText||n("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:j.pathPrefix,onChange:L=>{let D=!1;j.type===B.ROUTING_RULE_TYPES.REDIRECT&&!j.url&&(D=!0),j.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&!j.url&&(D=!0),j.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(!j.responseType||!j.responseBody)&&(D=!0),L.target.value.trim()||(D=!0,k(n("router.validation.pathPrefixRequired"))),D||k("");const M=n("common.slugifyHint",{value:gt(L.target.value)});w({...j,pathPrefix:L.target.value,helperText:M,__disableConfirm:D})}}),e.jsx(bt,{params:j,setParams:U,setError:k})]})},confirm:n("router.rule.update.confirm"),cancel:n("router.rule.update.cancel"),color:"primary",params:{did:s.did||"",pathPrefix:d==="/"?d:d.replace(/^\/+/,"").replace(/\/+$/,""),type:s.type||B.ROUTING_RULE_TYPES.BLOCKLET,redirectCode:s.redirectCode||302,componentId:s.componentId||"",pageGroup:s.pageGroup||"",url:s.url||"",responseType:((c=s.response)==null?void 0:c.contentType)||"",responseBody:(((S=s.response)==null?void 0:S.body)||"").replace(/\\"/g,'"'),__disableConfirm:!1},onConfirm:C,onCancel:b},R=j=>{j.stopPropagation(),f(x)};return e.jsxs(e.Fragment,{children:[typeof a=="function"?a({loading:l,open:R}):e.jsxs(xe,{onClick:R,className:"rule-action","data-cy":"action-update-rule",children:[l?e.jsx(re,{size:16}):e.jsx(Co,{style:{fontSize:18,marginRight:5}}),n("router.rule.update.title")]}),g&&e.jsx(Fe,{title:g.title,description:g.description,confirm:g.confirm,color:g.color,cancel:g.cancel,params:g.params,onConfirm:g.onConfirm,onCancel:g.onCancel})]})}En.propTypes={id:i.string.isRequired,from:i.object.isRequired,to:i.object.isRequired,children:i.any};En.defaultProps={children:null};function Tn(t){const{locale:o}=z(),{blocklet:s,recommendedDomain:a}=oe(),n=xo(a,t.from.pathPrefix,Kt(s,o));return e.jsxs(y,{display:"flex",alignItems:"center",children:[e.jsx(y,{component:"a",sx:{display:{xs:"flex",md:"none"}},target:"_blank",href:n,rel:"noopener noreferrer",title:n,children:e.jsx($,{size:"small",children:e.jsx(Ro,{})})}),e.jsx(En,{...t,children:({open:r})=>e.jsx($,{size:"small",onClick:r,disabled:t.isProtected,"data-cy":"action-update-rule",children:e.jsx(Yt,{})})}),e.jsx(Rn,{...t,children:({open:r})=>e.jsx($,{size:"small",onClick:r,disabled:t.isProtected,"data-cy":"action-delete-rule",children:e.jsx(Ct,{})})})]})}Tn.propTypes={isProtected:i.bool};Tn.defaultProps={isProtected:!1};function Bo({group:t,...o}){return t?e.jsx(Ze,{type:"reverse",...o,children:t}):null}Bo.propTypes={group:i.string.isRequired};function ft({domain:t,isHttps:o,toUrl:s}){const a=o?"https":"http";let n=s;return fs(n)||(n=`${a}://${t}${s}`),e.jsx(yt,{href:n,target:"_blank",style:{fontSize:14},underline:"hover",children:s},n)}ft.propTypes={domain:i.string.isRequired,toUrl:i.string.isRequired,isHttps:i.bool};ft.defaultProps={isHttps:!1};function Rt({hasPermission:t}){const{t:o,locale:s}=z(),a=mo(),{blocklet:n,recommendedDomain:r}=oe();return n.site.rules.filter(l=>l.to.type!==B.ROUTING_RULE_TYPES.BLOCKLET).map(l=>{var p;let u=null,g=null;l.to.type===B.ROUTING_RULE_TYPES.NONE?u="404":l.to.type===B.ROUTING_RULE_TYPES.REDIRECT?u=l.to.redirectCode:l.to.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE?u="R":l.to.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE?u=e.jsx(Ti,{sx:{color:"text.secondary",fontSize:"45px"}}):l.to.type===B.ROUTING_RULE_TYPES.COMPONENT&&(g=n.children.find(v=>v.meta.did===l.to.componentId),u="C");const f=l.isProtected?e.jsx(je,{title:o("blocklet.router.urlLockTooltip"),placement:"top",children:e.jsx("span",{children:e.jsx($,{disabled:!0,size:"small",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0,margin:"12px 0"},children:e.jsx(Ci,{style:{fill:a.palette.text.disabled}})})})}):e.jsx(Tn,{...l});return[e.jsxs(y,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[e.jsxs(y,{width:{xs:300,md:400},display:"flex",alignItems:"center",children:[e.jsx(y,{className:"component-item__indent",width:28}),typeof u=="object"?u:e.jsx(us,{children:u}),e.jsxs(y,{sx:{ml:2,flex:1,wordBreak:"break-word"},children:[e.jsxs(y,{style:{color:"#222",fontSize:16},children:[l.to.type===B.ROUTING_RULE_TYPES.NONE&&o("common.page404"),l.to.type===B.ROUTING_RULE_TYPES.REDIRECT&&o("common.redirect"),l.to.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&o("common.rewrite"),l.to.type===B.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&((p=B.ROUTING_RESPONSE_TYPES.find(v=>v.value===l.to.response.contentType))==null?void 0:p.text),l.to.type===B.ROUTING_RULE_TYPES.COMPONENT&&O.getDisplayName(g,!0)]}),e.jsxs(y,{display:"flex",alignItems:"center",children:[l.to.type===B.ROUTING_RULE_TYPES.REDIRECT&&e.jsx(ft,{domain:r,toUrl:l.to.url}),l.to.type===B.ROUTING_RULE_TYPES.GENERAL_REWRITE&&e.jsx(ft,{domain:r,toUrl:l.to.url}),l.to.type===B.ROUTING_RULE_TYPES.COMPONENT&&e.jsx(Bo,{group:l.to.pageGroup})]})]})]}),e.jsx(y,{px:2,sx:{display:{xs:"none",md:"flex"}},alignItems:"center",flexGrow:"1",children:e.jsx(yt,{href:xo(r,l.from.pathPrefix,Kt(n,s)),target:"_blank",style:{fontSize:16},underline:"hover",children:ms(l.from.pathPrefix,"/")||"/"})},l.from.pathPrefix),e.jsx(y,{children:t&&e.jsx("div",{style:{textAlign:"right"},children:f})},"actions")]},"rule"),e.jsx(Jt,{},"divider")]})}Rt.propTypes={hasPermission:i.bool};Rt.defaultProps={hasPermission:!1};const fr=Me(Rt,"mutate_blocklets"),hr=Me(Rt,"",Oe);function gr(t){const{inService:o}=K();return o?e.jsx(hr,{...t}):e.jsx(fr,{...t})}function xr({blocklet:t,scrollToComponent:o}={blocklet:null,scrollToComponent:!1}){const s=hs(),{t:a}=z(),n=h.useRef(null),r=h.useMemo(()=>{if(!t||!t.optionalComponents)return null;const m=new URLSearchParams(window.location.search),l=m.get("install-component");if(l){n.current=l,m.delete("install-component"),s(m.toString());const u=t.optionalComponents.find(f=>f.meta.did===l);if(!u)return A.success(a("notification.installComponentError",{did:l})),null;const{meta:g}=u;if(o){const f=document.getElementById(`optional-component-${l}`),p=document.querySelector(".dashboard-main");if(f){const v=f.getBoundingClientRect(),d=p.getBoundingClientRect();p.scrollTo({top:v.top-d.top+p.scrollTop,behavior:"smooth"})}}return g}return null},[t,s,a,o]);return h.useEffect(()=>{var m;n.current&&window.opener&&window.opener.postMessage({blocklet:t,kind:"component-installer"},(m=window.blocklet)==null?void 0:m.appUrl)},[t]),r}function wn({component:t,remove:o,disabled:s,tip:a,showConfirm:n,hideBtn:r,onCancel:m}){const{t:l}=h.useContext(ve),[u,g]=h.useState(!1),[f,p]=h.useState(null),v=async R=>{g(!0),await o(R.component,R.removeType),g(!1),p(null)},d=s||u,b=()=>{p({title:`${l("common.delete")} ${t.meta.title||t.meta.name}`,description:(R,c)=>e.jsxs(te,{component:"div",children:[e.jsx(te,{gutterBottom:!0,children:l("blocklet.action.removeComponentDescription")}),e.jsxs(Si,{name:"removeType",value:R.removeType,onChange:S=>c({...R,removeType:S.target.value}),children:[e.jsx(_t,{value:"keepData",control:e.jsx(oo,{}),label:l("blocklet.action.removeComponentKeepData")}),e.jsx(_t,{value:"complete",control:e.jsx(oo,{}),label:l("blocklet.action.removeComponentComplete")})]})]}),confirm:l("common.confirm"),cancel:l("common.cancel"),params:{component:t,removeType:"keepData"},onConfirm:v,onCancel:()=>{p(null),m()}})};h.useEffect(()=>{n?b():(g(!1),p(null))},[n]);const C=e.jsx(yr,{size:"small",disabled:d,onClick:()=>b,"data-cy":"delete-component-btn",children:e.jsx(Ct,{disabled:d})}),x=e.jsx(je,{title:a||l("common.delete"),children:e.jsx("span",{children:C})});return e.jsxs(e.Fragment,{children:[!r&&x,f&&e.jsx(Fe,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})]})}wn.propTypes={component:i.object.isRequired,remove:i.func,onCancel:i.func,disabled:i.bool,showConfirm:i.bool,hideBtn:i.bool,tip:i.string};wn.defaultProps={remove:async()=>{},disabled:!1,showConfirm:!1,hideBtn:!1,onCancel:()=>{},tip:""};const yr=F($)`
|
|
393
393
|
&.Mui-disabled {
|
|
394
394
|
opacity: 0.5;
|
|
395
395
|
}
|
|
396
|
-
`;function Pn({component:t,onStart:o,onStop:s,disabled:a,tip:n}){const{t:r}=h.useContext(
|
|
396
|
+
`;function Pn({component:t,onStart:o,onStop:s,disabled:a,tip:n}){const{t:r}=h.useContext(ve),[m,l]=h.useState(!1),[u,g]=h.useState(),f=async()=>{l(!0);try{await o(t)}catch(x){A.error(x.message)}l(!1)},p=async()=>{l(!0);try{await s(t)}catch(x){A.error(x.message)}l(!1)},v=a||m,d=["starting","running","stopping"].includes(t.status),b=d?Ds:Bs,C=e.jsx(Cr,{disabled:v,onClick:()=>{var x;d?g({title:`${r("common.stop")} ${(x=t==null?void 0:t.meta)==null?void 0:x.title}`,description:r("blocklet.action.stopComponentDescription"),confirm:r("blocklet.action.confirmStop"),cancel:r("common.cancel"),onConfirm:()=>(g(null),p()),onCancel:()=>g(null)}):f()},"data-cy":`${d?"stop":"start"}-component-btn`,children:e.jsx(b,{disabled:v})});return[e.jsx(je,{title:n||r(`common.${d?"stop":"start"}`),children:e.jsx("span",{children:C})},"btn"),u&&e.jsx(Fe,{title:u.title,description:u.description,confirm:u.confirm,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel},"connect")]}Pn.propTypes={component:i.object.isRequired,onStart:i.func,onStop:i.func,disabled:i.bool,tip:i.string};Pn.defaultProps={onStart:async()=>{},onStop:async()=>{},disabled:!1,tip:""};const Cr=F($)`
|
|
397
397
|
&.Mui-disabled {
|
|
398
398
|
opacity: 0.5;
|
|
399
399
|
}
|
|
400
|
-
`;function In({sourceInfo:t,blocklet:o}){var a;const{t:s}=h.useContext(
|
|
400
|
+
`;function In({sourceInfo:t,blocklet:o}){var a;const{t:s}=h.useContext(ve);return e.jsxs(y,{display:"flex",alignItems:"center",children:[e.jsx(gs,{type:"success",children:$s(t.source)},"source"),t.source==="registry"&&e.jsx(yt,{href:Ie(t.deployedFrom,"blocklets",((a=o==null?void 0:o.meta)==null?void 0:a.bundleDid)||""),target:"_blank",className:"page-link",underline:"hover",style:{display:"flex",alignItems:"center",marginLeft:8},children:s("blocklet.overview.viewInStore")})]})}In.propTypes={sourceInfo:i.shape({source:i.string,deployedFrom:i.string}),blocklet:i.object};In.defaultProps={sourceInfo:{},blocklet:{}};var kn={},jr=Wt;Object.defineProperty(kn,"__esModule",{value:!0});var No=kn.default=void 0,vr=jr(Vt()),Sr=e;No=kn.default=(0,vr.default)((0,Sr.jsx)("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward");function Et({blocklet:t,checkUpgrade:o,hasPermission:s,...a}){const{api:n}=K(),{t:r}=h.useContext(ve),[m,l]=h.useState(!1),[u,g]=h.useState(""),[f,p]=h.useState(null),[v,d]=h.useState(null);h.useEffect(()=>{p(null),o&&(t.mode,J.BLOCKLET_MODES.DEVELOPMENT)},[t,o]);const b=()=>{l(!1),d(null)},C=async()=>{l(!0);try{const R={did:t.meta.did,version:f.version,storeUrl:f.registryUrl||""};await Ke(2e3),await n.upgradeBlocklet({input:R})}catch(R){A.error(`Blocklet upgrade failed: ${X(R)}`)}finally{l(!1),d(null)}},x={title:`${r("common.upgrade")} ${r("common.blocklet")} ${O.getDisplayName(t)}`,description:r("blocklet.action.upgradeDescription"),confirm:r("blocklet.action.confirmUpgrade"),cancel:r("common.cancel"),onConfirm:C,onCancel:b};return s&&f&&!O.isInProgress(t.status)?e.jsxs(e.Fragment,{children:[e.jsx(Ze,{...a,children:t.meta.version}),e.jsx(je,{title:r("common.updateAvailable",{version:f.version}),children:e.jsx($,{size:"small",style:{marginLeft:8},disabled:m,onClick:()=>d(x),children:m?e.jsx(re,{size:16}):e.jsx(No,{style:{fontSize:16,color:"red"}})})}),!!u&&e.jsx(A,{variant:"error",message:u,onClose:()=>g("")}),v&&e.jsx(Fe,{title:v.title,description:v.description,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]}):e.jsx(Ze,{...a,children:t.meta.version})}Et.propTypes={blocklet:i.object.isRequired,checkUpgrade:i.bool,hasPermission:i.bool};Et.defaultProps={checkUpgrade:!1,hasPermission:!1};const br=Me(Et,"mutate_blocklets"),Rr=Me(Et,"",Oe);function Er(t){const{inService:o}=K();return o?e.jsx(Rr,{...t}):e.jsx(br,{...t})}const Tr=t=>{var o;return!((o=t==null?void 0:t.meta)!=null&&o.group)},wr=(t,o)=>t?[{name:o("common.name"),value:t.displayName},{name:o("common.description"),value:t.description},{name:o("common.version"),value:e.jsx(Ze,{children:t.version})}]:[],Pr=t=>{const{source:o,deployedFrom:s,bundleSource:a}=t;return o?{source:o,deployedFrom:s}:a?a.url?{source:"url",deployedFrom:s||Array.isArray(a.url)?a.url[0]:a.url}:a.store?{source:"registry",deployedFrom:s||Array.isArray(a.store)?a.store[0]:a.store}:{}:{source:"upload",deployedFrom:s}},Ir=(t,o)=>{const s=t.split("/").slice(1);let a=o,n=0;const r=[];for(;a&&n<s.length;){const m=a.children.find(l=>l.meta.did===s[n]);a=m,n++,m&&r.push(m.meta.title)}return r.join(" / ")};function Un({blocklet:t,depth:o,componentInfo:s,app:a,onClose:n}){var d,b;const{t:r,locale:m}=h.useContext(ve),{deletingBlocklets:l}=Zt();let{status:u}=t;o===1&&l.includes(t.meta.did)&&(u="deleting");const g=`/${t.mountPoint||"/"}`.replace(/\/+/g,"/"),f=C=>C.map(x=>x.name===r("common.did")||x.name===r("blocklet.appId")?e.jsx(At,{valueComponent:"div",nameWidth:120,name:x.name,nameFormatter:()=>x.name,children:x.value},x.name):e.jsx(At,{valueComponent:"div",nameWidth:120,name:x.name,children:x.value},x.name)),p=s?Pr(s):{},v=s?[{name:r("common.name"),value:O.getDisplayName(s,!0)},{name:r("common.version"),value:e.jsx(Er,{blocklet:s,checkUpgrade:!1})},{name:r("common.status"),value:e.jsx(Eo,{isResource:Tr(t),status:u,source:s.source,progress:t.progress})},t.status==="running"?{name:r("blocklet.startedAt"),value:Nt(t.startedAt,m)}:null,t.status!=="running"?{name:r("blocklet.stoppedAt"),value:Nt(t.stoppedAt,m)}:null,t.installedAt?{name:r("blocklet.installedAt"),value:Nt(t.installedAt,m)}:null,O.hasStartEngine(t.meta)?{name:r("common.mountPoint"),value:g}:null,s.meta.group?{name:r("common.group"),value:e.jsx(Ze,{type:"success",children:s.meta.group})}:null,{name:r("blocklet.overview.source"),value:e.jsx(In,{sourceInfo:p,blocklet:t})},{name:r("blocklet.overview.deployedFrom"),value:p.deployedFrom||"-"},{name:r("common.did"),value:e.jsx(fo,{did:s.meta.did,showQrcode:!0})},{name:r("common.author"),value:s.meta.owner?e.jsx(di,{owner:s.meta.owner,locale:m}):pi.formatPerson(s.meta.author)},{name:r("common.engine"),value:wr(s.engine,r).map(({name:C,value:x})=>e.jsx(At,{style:{marginBottom:4},nameWidth:120,name:C,children:x},C))},(d=t.dependents)!=null&&d.length?{name:r("common.dependents"),value:e.jsx(y,{children:t.dependents.map(C=>e.jsx(y,{children:`${Ir(C.id,a)} ${C.required?`(${r("common.required")})`:""}`},C.id))})}:null,(b=t.meta.resources)!=null&&b.length?{name:r("common.resource"),value:t.meta.resources.join(", ")}:null].filter(Boolean):[];return s?e.jsx(xt,{open:!0,title:r("common.componentBasicInfo"),showCloseButton:!0,fullWidth:!0,maxWidth:"md",onClose:()=>{n(null)},children:e.jsx(y,{paddingBottom:1.5,children:f(v)},"dialog-wrapper")},"base-info-dialog"):null}Un.propTypes={blocklet:i.object.isRequired,depth:i.number,app:i.object,componentInfo:i.object,onClose:i.func.isRequired};Un.defaultProps={depth:0,app:null,componentInfo:null};F(yo)`
|
|
401
401
|
.BaseBadge-badge {
|
|
402
402
|
top: ${t=>t.top*8||6}px;
|
|
403
403
|
right: ${t=>t.right*8||6}px;
|
|
@@ -419,12 +419,12 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
419
419
|
margin-left: 4px;
|
|
420
420
|
transform: translateY(-1px);
|
|
421
421
|
}
|
|
422
|
-
`;function Ao({blocklet:t,ancestors:o,mountPoint:s,href:a}){const[n,r]=h.useState(!1),[m,l]=h.useState(!1),[u,g]=h.useState(!1),[f,p]=h.useState(s),{api:
|
|
422
|
+
`;function Ao({blocklet:t,ancestors:o,mountPoint:s,href:a}){const[n,r]=h.useState(!1),[m,l]=h.useState(!1),[u,g]=h.useState(!1),[f,p]=h.useState(s),{api:v}=K(),d=!o.length,b=d?t.meta.did:o.map(c=>c.meta.did)[0];h.useEffect(()=>{l(!1),r(!1),g(!1)},[s]);const C=()=>{r(!1),l(!1),p(s)},x=async c=>{c.preventDefault(),g(!0),r(!1);try{const S={rootDid:b,mountPoint:pe(f)};d||(S.did=t.meta.did),await v.updateComponentMountPoint({input:S})}catch(S){throw g(!1),S.message=X(S),A.error(S.message),S}},R=m?e.jsxs(y,{sx:{ml:1},children:[e.jsx($,{size:"medium",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),"data-cy":"edit-mount-point-submit",onClick:x,children:e.jsx(y,{component:Re,icon:"material-symbols:done",sx:{color:"primary.main",transition:"0.3s opacity"}})}),e.jsx($,{size:"medium",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onClick:C,children:e.jsx(y,{component:Re,icon:"iconoir:cancel",sx:{color:"primary.main",transition:"0.3s opacity"}})})]}):e.jsx($,{size:"medium",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onClick:()=>l(!0),children:e.jsx(y,{component:Re,"data-cy":"edit-mount-point",icon:"lets-icons:edit-light",sx:{opacity:n?1:0,color:"primary.main",transition:"0.3s opacity"}})});return e.jsxs(y,{sx:{display:{xs:"none",md:"flex"}},alignItems:"center",flexGrow:"1",children:[m?e.jsx("form",{onSubmit:x,children:e.jsx(Z,{style:{flex:1},fullWidth:!0,"data-cy":"edit-mount-point-input",value:f,onChange:c=>p(c.target.value),autoFocus:!0,size:"small",variant:"outlined",placeholder:s})}):e.jsx(y,{component:"a",target:"_blank",href:a,rel:"noopener noreferrer",title:a,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:e.jsx(y,{maxWidth:400,sx:{color:"secondary.main",fontSize:16,px:2},overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",children:xs(s)})}),u?e.jsx(re,{size:20,sx:{ml:1}}):R]},s)}Ao.propTypes={mountPoint:i.string.isRequired,href:i.string.isRequired,blocklet:i.object.isRequired,ancestors:i.array.isRequired};const kr=t=>{var o;return!((o=t==null?void 0:t.meta)!=null&&o.group)},po=(t,o)=>{const s=t.split("/").slice(1);let a=o,n=0;const r=[];for(;a&&n<s.length;){const m=a.children.find(l=>l.meta.did===s[n]);a=m,n++,m&&r.push(m.meta.title)}return r.join(" / ")};function ht({blocklet:t,ancestors:o,depth:s,onRemove:a,onStart:n,onStop:r,onRestart:m,getComponentUrl:l,app:u}){var ke,Se,ue;const{t:g}=h.useContext(ve),[f,p]=h.useState(),[v,d]=h.useState(!1),[b,C]=h.useState(!1),[x,R]=h.useState(null),{info:c}=K(),[S,j]=h.useState(!1),{deletingBlocklets:w}=Zt();let{status:k}=t;s===1&&w.includes(t.meta.did)&&(k="deleting");const U=`/${t.mountPoint||"/"}`.replace(/\/+/g,"/"),L=l(U),D=O.isInProgress(u.status),M=O.isInProgress(t.status);let I="";if(D||M||s===1&&w.includes(t.meta.did))I=g("blocklet.component.tip.stopBlocklet");else if((ke=t.dependents)!=null&&ke.length){const Q=t.dependents.filter(E=>E.required);if(Q.length){const E=Q.map(me=>po(me.id,u));I=g("blocklet.component.tip.requiredBy",{name:E.join(", ")})}}const q=async(...Q)=>{C(!0);try{await a(...Q)}catch{}C(!1),d(!1)},ee=h.useMemo(()=>{const Q=!!c.enableDocker,E=new Set((t.configs||[]).map(me=>me.key));return Q?!E.has("SKIP_DOCKER"):E.has("USE_DOCKER")},[t.configs,c.enableDocker]);return e.jsxs(e.Fragment,{children:[e.jsxs(Dn,{display:"flex",py:2,className:"component-item",justifyContent:"flex-start",alignItems:"center",children:[e.jsxs(y,{pl:2,width:{xs:250,sm:400},display:"flex",alignItems:"center",children:[e.jsx(bi,{blocklet:t,ancestors:o}),e.jsxs(y,{ml:"16px",sx:{minWidth:0},children:[e.jsxs(y,{className:"component-header",onClick:()=>p(t),children:[e.jsx(y,{className:"component-name",children:O.getDisplayName(t,!0)}),e.jsx(y,{className:"component-version",children:(Se=t==null?void 0:t.meta)==null?void 0:Se.version})]}),e.jsxs(y,{display:"flex",alignItems:"center",sx:{mt:"2px",ml:-.5},children:[k!=="unknown"&&e.jsx(Eo,{style:{marginLeft:4},status:k,source:t.source,progress:t.progress}),e.jsx(ui,{style:{marginLeft:4},mode:t.mode||""}),!!((ue=t.dependents)!=null&&ue.length)&&e.jsx(je,{title:[`${g("common.dependents")}: `,t.dependents.map(Q=>e.jsx(y,{pl:1,children:`${po(Q.id,u)} ${Q.required?`(${g("common.required")})`:""}`},Q.id))],children:e.jsx(y,{display:"flex",color:"primary.main",ml:1,children:e.jsx(Re,{icon:"octicon:package-dependents-16"})})}),ee&&e.jsx(je,{title:g("blocklet.usingDocker"),children:e.jsx(y,{display:"flex",color:"primary.main",ml:1,children:e.jsx(Re,{icon:"catppuccin:docker-ignore"})})})]})]})]},t),Gt.hasMountPoint(t.meta)&&e.jsx(Ao,{blocklet:t,ancestors:o,mountPoint:U,href:L},U),e.jsx("div",{style:{flex:1}}),e.jsxs(y,{display:"flex",alignItems:"center",children:[O.hasStartEngine(t.meta)&&e.jsx(je,{title:g("common.visit"),children:e.jsx(y,{component:"a",sx:{display:{xs:"flex",md:"none"}},target:"_blank",href:L,rel:"noopener noreferrer",children:e.jsx($,{size:"small",children:e.jsx(Ro,{})})})}),e.jsx(Pn,{blocklet:u,component:t,onStart:n,onStop:r,disabled:!["starting","stopping"].includes(u.status)&&O.isInProgress(u.status)}),e.jsx(qt,{color:"error",badgeContent:"",variant:"dot",invisible:!O.getComponentMissingConfigs(t,o[0]).length,children:e.jsx(To,{"data-cy":"component-actions",actions:[O.hasStartEngine(t.meta)||kr(t)?{icon:e.jsx(vi,{}),text:g("common.detail"),onClick:()=>{p(t)}}:null,{icon:e.jsx(Ns,{}),text:g("common.restart"),onClick:()=>{R({title:`${g("common.restart")} ${t.meta.title}`,description:g("blocklet.action.restartDescription"),confirm:g("blocklet.action.confirmRestart"),cancel:g("common.cancel"),onConfirm:async()=>{C(!0),await m(t),C(!1)},onCancel:()=>R(null)})},disabled:b||D||M||t.status!=="running"},{icon:e.jsx(Ct,{}),text:g("common.delete"),onClick:()=>{d(!0)},disabled:D||M||!!I,tip:I},{separator:!0},{icon:e.jsx(Yt,{}),onClick:()=>{j(!0)},text:e.jsx(qt,{color:"error",badgeContent:"",variant:"dot",invisible:!O.getComponentMissingConfigs(t,o[0]).length,children:e.jsx(y,{sx:{width:"100%"},children:g("common.config")})}),disabled:D||M}].filter(Boolean)})})]},"actions")]},"group-not-gateway-box"),e.jsx(Jt,{},"line"),e.jsx(Un,{componentInfo:f,onClose:p,blocklet:t,app:u,depth:s}),e.jsx(wn,{blocklet:u,component:t,remove:q,onCancel:()=>d(!1),hideBtn:!0,showConfirm:v},"delete-component"),x&&e.jsx(Fe,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel},"confirm-setting"),S&&e.jsx(vt,{open:!0,hiddenChildren:!0,onClose:()=>j(!1),blocklet:t,ancestors:o})]})}ht.propTypes={blocklet:i.object.isRequired,ancestors:i.array,depth:i.number,onRemove:i.func,onStart:i.func,onStop:i.func,onRestart:i.func,getComponentUrl:i.func,app:i.object};ht.defaultProps={ancestors:[],depth:0,onRemove:()=>{},onStart:()=>{},onStop:()=>{},onRestart:()=>{},getComponentUrl:()=>window.location.origin,app:null};const qt=F(yo)`
|
|
423
423
|
.BaseBadge-badge {
|
|
424
424
|
top: ${t=>t.top*8||6}px;
|
|
425
425
|
right: ${t=>t.right*8||6}px;
|
|
426
426
|
}
|
|
427
|
-
`,
|
|
427
|
+
`,Dn=F(y)`
|
|
428
428
|
&:hover {
|
|
429
429
|
background-color: rgba(0, 0, 0, 0.05);
|
|
430
430
|
}
|
|
@@ -448,7 +448,7 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
448
448
|
margin-left: 4px;
|
|
449
449
|
transform: translateY(-1px);
|
|
450
450
|
}
|
|
451
|
-
`;function
|
|
451
|
+
`;function Bn({meta:t,dependencies:o,logoUrl:s,setInstallComponentMeta:a}){const n=K(),{t:r}=z(),m=()=>{a(t)},l=40;return e.jsxs(Ur,{id:`optional-component-${t.did}`,children:[e.jsxs("div",{className:"cell",children:[e.jsxs("div",{className:"component-left",children:[e.jsx("img",{className:"component-logo",src:s,onError:()=>`${n.imgPrefix}/blocklet.png`,alt:t.title,style:{width:l,height:l}}),e.jsxs("div",{className:"component-header",children:[e.jsx("div",{className:"component-name",children:t.title}),e.jsx("div",{className:"component-version",children:t.version})]}),e.jsx(je,{title:[`${r("common.dependents")}: `,o.map(u=>e.jsx(y,{pl:1,children:`${u.parentTitle} ${u.required?`(${r("common.required")})`:""}`},u.parentName+u.mount_point))],children:e.jsx(y,{display:"flex",color:"primary.main",ml:1,children:e.jsx(Re,{icon:"octicon:package-dependents-16"})})})]}),e.jsx("div",{style:{flex:1}}),e.jsx(y,{sx:{minWidth:100,display:"flex",justifyContent:"flex-end"},children:e.jsx(ys,{onClick:m,startIcon:e.jsx(Re,{icon:"ph:download-simple-bold"}),children:r("common.install")})})]}),e.jsx(Jt,{class:"line"},"line")]})}Bn.propTypes={meta:i.object.isRequired,logoUrl:i.string,setInstallComponentMeta:i.func.isRequired,dependencies:i.arrayOf(i.shape({parentDid:i.string,parentName:i.string,parentPoint:i.string,required:i.bool}))};Bn.defaultProps={logoUrl:"",dependencies:[]};const Ur=F(Dn)`
|
|
452
452
|
.line {
|
|
453
453
|
opacity: 0.5;
|
|
454
454
|
}
|
|
@@ -498,7 +498,7 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
498
498
|
margin-left: 4px;
|
|
499
499
|
transform: translateY(-1px);
|
|
500
500
|
}
|
|
501
|
-
`;function Nn({blocklet:t,onUpdate:o,getComponentUrl:s,...a}){var
|
|
501
|
+
`;function Nn({blocklet:t,onUpdate:o,getComponentUrl:s,...a}){var _;const{t:n}=h.useContext(ve),{api:r,inService:m,info:l}=K(),{addDeletingDid:u,removeDeletingDid:g,matchDeletingDid:f}=Zt(),[p,v]=h.useState(!1),[d,b]=h.useState(null),[C,x]=h.useState(null),[R,c]=h.useState(!1),[S,j]=h.useState(!1),[w,k]=h.useState(!1),[U,L]=h.useState(null),D=t&&t.structVersion!==B.APP_STRUCT_VERSION,[M,I]=h.useState(!1),q=[...t.children];t.meta.group!=="gateway"&&q.unshift(t),f(q.map(P=>P.meta.did));const ee=async()=>{if(!p){v(!0);try{const{updateId:P,updateList:V}=(await r.checkComponentsForUpdates({input:{did:t.meta.did}})).preUpdateInfo||{};if(v(!1),!P){A.info(n("blocklet.component.noUpdate"));return}const se=[];O.forEachChildSync(t,(ie,{id:Ge,ancestors:Y})=>{const H=V.find(Ee=>Ee.id===Ge);if(H){const Ee=Y.slice(1).concat(ie).map(Ue=>Ue.meta.title||Ue.meta.name).join(" / "),ze=(Y[1]||ie).meta.did;se.push({groupId:ze,name:Ee,version:ie.meta.version,newVersion:H.meta.version})}});const ye={};se.forEach(ie=>{ye[ie.groupId]?ie.disabled=!0:ye[ie.groupId]=!0}),b({params:{updateId:P},list:se,checks:ye,hasChecks:!0})}catch(P){v(!1),A.error(X(P))}}},ke=async()=>{if(!p)try{v(!0);const P=Object.keys(d.checks).filter(se=>d.checks[se]),V={updateId:d.params.updateId,rootDid:t.meta.did,selectedComponents:P};await r.upgradeComponents({input:V}),v(!1),b(null),I(null)}catch(P){v(!1),A.error(X(P))}},Se=async(P,V)=>{u(P.meta.did);try{await r.deleteComponent({input:{did:P.meta.did,keepData:V==="keepData",rootDid:t.meta.did}}),await Ke(800)}catch(se){A.error(X(se)),g(P.meta.did)}},ue=async P=>{try{await r.startBlocklet({input:{did:t.meta.did,componentDids:[P.meta.did]}}),await Ke(800)}catch(V){A.error(X(V))}},Q=async P=>{try{await r.stopBlocklet({input:{did:t.meta.did,componentDids:[P.meta.did]}}),await Ke(800)}catch(V){A.error(X(V))}},E=async P=>{try{await r.restartBlocklet({input:{did:t.meta.did,componentDids:[P.meta.did]}}),await Ke(800)}catch(V){A.error(X(V))}},me=(P,V)=>{const{checked:se}=P.target;b(ye=>{const ie=Object.entries(ye.checks).reduce((Y,[H,Ee])=>(Y[H]=V===H?se:Ee,Y),{}),Ge=Object.values(ie).includes(!0);return{...ye,checks:ie,hasChecks:Ge}})};Cs(ee);const fe=xr({blocklet:t,scrollToComponent:!0}),Qe=U||fe;return e.jsxs(Dr,{component:"div",...a,children:[e.jsxs(Br,{display:"flex",children:[e.jsxs(Nr,{flexDirection:"row",className:"title",display:"flex",alignItems:"center",children:[q!=null&&q.length?`${n("common.components")} (${q.length})`:`${n("common.components")}`,!D&&e.jsx(Ft,{permission:m?"":"mutate_blocklets",role:m?Oe:[],children:e.jsx($t,{children:e.jsx(qt,{top:1.2,right:.4,color:"error",badgeContent:"",variant:"dot",invisible:!M,children:e.jsxs(ne,{disabled:p||O.isInProgress(t.status),color:"secondary",onClick:()=>{ee()},"data-cy":"check-for-updates",children:[e.jsx(y,{ml:.5,mr:.5,display:"flex",children:p?e.jsx(re,{size:16}):e.jsx(wo,{style:{fontSize:"1em"}})}),n("blocklet.component.checkUpdateTitle")]})})})})]}),e.jsx(Ft,{permission:m?"":"mutate_blocklets",role:m?Oe:[],children:e.jsxs(y,{display:"flex",alignItems:"center",children:[!D&&e.jsx(Sn,{blocklet:t,serverVersion:l.version,children:({open:P})=>e.jsxs(ne,{disabled:p||O.isInProgress(t.status),variant:"text",color:"primary","data-cy":"add-component",className:"sm-hide-icon",onClick:P,children:[e.jsx(bs,{style:{fontSize:"1.3em",marginRight:4}}),n("blocklet.component.add")]})}),e.jsx(To,{"data-cy":"component-actions",actions:[{icon:e.jsx(Re,{icon:"fluent:link-20-filled"}),onClick:()=>j(!0),text:n("router.rule.add.title"),disabled:p||O.isInProgress(t.status)},!D&&{icon:e.jsx(Yt,{}),text:`${n("blocklet.component.container")}`,onClick:()=>k(!0)}].filter(Boolean)})]})})]}),q!=null&&q.length?e.jsxs(e.Fragment,{children:[e.jsxs(y,{mt:2,children:[t.meta.group!=="gateway"&&e.jsx(ht,{blocklet:t,app:t,onRemove:Se,onStart:ue,onStop:Q,onRestart:E,getComponentUrl:s},`0-${t.meta.did}`),t.children.map(P=>e.jsx(ht,{depth:1,blocklet:P,ancestors:[t],app:t,onRemove:Se,onStart:ue,onStop:Q,onRestart:E,getComponentUrl:s},`1-${P.meta.did}`))]},`top-blocklet-${t.meta.did}`),(_=t.optionalComponents)==null?void 0:_.map(P=>e.jsx(Dn,{children:e.jsx(Bn,{setInstallComponentMeta:L,...P})},P.meta.did))]}):e.jsx(y,{mt:8,children:e.jsx(ks,{children:n("blocklet.component.noComponent")})}),!!t.site.rules.length&&e.jsx(y,{sx:{mt:0,".component-item__indent":{pl:2,width:0}},children:e.jsx(gr,{})}),!!d&&e.jsx(Yn,{open:!0,fullWidth:!0,children:e.jsxs(y,{paddingY:1.5,children:[e.jsx(Jn,{children:n("blocklet.component.updateTitle")}),e.jsx(y,{component:Zn,py:4,children:d.list.map(P=>e.jsxs(y,{display:"flex",alignItems:"center",children:[e.jsx(js,{checked:d.checks[P.groupId],onChange:V=>me(V,P.groupId),style:{marginLeft:P.disabled?16:0},defaultChecked:!0,disabled:P.disabled}),e.jsxs(y,{flexGrow:1,mt:3,children:[e.jsx(y,{item:!0,xs:8,children:P.name}),P.version&&e.jsxs(at,{fontSize:"h6.fontSize",container:!0,spacing:2,alignItems:"center",children:[e.jsx(at,{item:!0,xs:3,children:P.version}),e.jsx(at,{item:!0,xs:1,children:e.jsx(Is,{style:{fontSize:"0.9em"}})}),e.jsx(at,{item:!0,xs:3,children:e.jsx(y,{color:"secondary.main",children:P.newVersion})})]})]},`${P.name}-${P.newVersion}`)]},P.name))}),e.jsxs(vs,{style:{padding:"8px 24px 24px"},children:[e.jsx(ne,{onClick:()=>{b(null)},children:n("common.cancel")}),e.jsxs(ne,{onClick:P=>{P.stopPropagation(),ke()},color:"primary",disabled:p||!d.hasChecks,variant:"contained",autoFocus:!0,children:[p&&e.jsx(re,{size:16}),n("common.update")]})]})]})}),!!C&&e.jsx(Yn,{open:!0,fullWidth:!0,onClose:()=>x(!1),children:e.jsxs(y,{paddingY:1.5,children:[e.jsx(Jn,{children:n("common.configuration")}),e.jsx(Zn,{children:e.jsx(y,{py:2,children:e.jsx(_t,{control:e.jsx(Ri,{checked:R,onChange:P=>c(!!P.target.checked)}),label:n("blocklet.component.showContainer")})})})]})}),e.jsx(St,{selectedMeta:Qe,blocklet:t,showDialog:!!Qe,setShowDialog:()=>L(null)}),S&&e.jsx(bn,{hiddenChildren:!0,open:!0,onClose:()=>j(!1)}),w&&e.jsx(vt,{open:!0,onClose:()=>k(!1),hiddenChildren:!0,blocklet:t,ancestors:[]})]})}Nn.propTypes={blocklet:i.object.isRequired,onUpdate:i.func,getComponentUrl:i.func};Nn.defaultProps={onUpdate:()=>{},getComponentUrl:()=>window.location.origin};const Dr=F.div`
|
|
502
502
|
.title {
|
|
503
503
|
font-size: 1.2rem;
|
|
504
504
|
font-weight: bold;
|
|
@@ -517,7 +517,7 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
517
517
|
.component-item {
|
|
518
518
|
animation: showDelay 0.75s ease 1;
|
|
519
519
|
}
|
|
520
|
-
`,
|
|
520
|
+
`,Br=F(y)`
|
|
521
521
|
${t=>t.theme.breakpoints.up("sm")} {
|
|
522
522
|
flex-direction: row;
|
|
523
523
|
justify-content: space-between;
|
|
@@ -536,4 +536,4 @@ import{bJ as _o,j as e,aK as Vt,aL as Wt,t as z,bl as K,Q as y,ax as ve,P as i,E
|
|
|
536
536
|
width: 100%;
|
|
537
537
|
justify-content: space-between;
|
|
538
538
|
}
|
|
539
|
-
`;function Lo(t){const{locale:o}=h.useContext(
|
|
539
|
+
`;function Lo(t){const{locale:o}=h.useContext(ve),{blocklet:s,recommendedDomain:a}=Ei(),n=r=>Ss({blocklet:s,domain:{value:a||`${mi.encode(s.appPid)}.${B.DEFAULT_DID_DOMAIN}`},mountPoint:r,params:Kt(s,o)});return e.jsx(Nn,{blocklet:s,getComponentUrl:n,...t})}Lo.propTypes={};Lo.defaultProps={};export{Lo as default};
|