@abtnode/webapp 1.16.28-beta-cec13afc → 1.16.28-beta-7ddc3b2d
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-B8Ae2MjM.js → Add-i_eGmIkF.js} +1 -1
- package/dist/assets/{ArrowDropDown-BNt-WuI3.js → ArrowDropDown-CRJiMsxl.js} +1 -1
- package/dist/assets/{Autocomplete-Bo6UH2XL.js → Autocomplete-BkNAtuyq.js} +1 -1
- package/dist/assets/{Breadcrumbs-CkmMkQDW.js → Breadcrumbs-D8UxFHZC.js} +1 -1
- package/dist/assets/{ButtonGroup-OcQcEz6r.js → ButtonGroup-G7oFneKA.js} +1 -1
- package/dist/assets/{CheckCircle-BnRenrK4.js → CheckCircle-CpgwIoc6.js} +1 -1
- package/dist/assets/{ChevronLeft-Dp9aa91c.js → ChevronLeft-BqOWO5Oh.js} +1 -1
- package/dist/assets/{ChevronRight-C3NPaw6o.js → ChevronRight-DDJkuJhV.js} +1 -1
- package/dist/assets/{Close-Cbaq-RRq.js → Close-BltjIlg7.js} +1 -1
- package/dist/assets/{Delete-CnrKsAGC.js → Delete-KztH8pOq.js} +1 -1
- package/dist/assets/DeleteOutline-Cwej9e35.js +1 -0
- package/dist/assets/DeleteOutline-DvFRqyWQ.js +1 -0
- package/dist/assets/{Done-BCLH1e-Y.js → Done-CEgWviUN.js} +1 -1
- package/dist/assets/{Edit-i_Bman7K.js → Edit-jbcm5AKt.js} +1 -1
- package/dist/assets/{EditIcon-DmNEjmIQ.js → EditIcon-DAtBHTkl.js} +1 -1
- package/dist/assets/{FilterList-fpG1-3KQ.js → FilterList-D84A-7C6.js} +1 -1
- package/dist/assets/{Google-DLkd6TAZ.js → Google-CCNGxrji.js} +1 -1
- package/dist/assets/{Https-amCzjB1a.js → Https-DsiZfUtZ.js} +1 -1
- package/dist/assets/{InputAdornment-C6LFxcti.js → InputAdornment-CfEcRXzS.js} +1 -1
- package/dist/assets/{InputLabel-avYwCvJM.js → InputLabel-ERXbfftZ.js} +1 -1
- package/dist/assets/{LastPage-DnBOlrut.js → LastPage-Cad46J9e.js} +1 -1
- package/dist/assets/{Launch-DPclIZbd.js → Launch-fB5PS8PY.js} +1 -1
- package/dist/assets/{Link-DfSEdivF.js → Link-Dzd80klt.js} +1 -1
- package/dist/assets/{LoadingButton-xveWP_M5.js → LoadingButton-hHC9D6Jh.js} +1 -1
- package/dist/assets/{LockIcon-9c7sG23a.js → LockIcon-BgCC_gMD.js} +1 -1
- package/dist/assets/{Loop-DwAWKPvc.js → Loop-BTQochTH.js} +1 -1
- package/dist/assets/{MoreVert-Nc1QBj2D.js → MoreVert-CWypNP8g.js} +1 -1
- package/dist/assets/{Pagination-D5t0OCBH.js → Pagination-Btpup9Q2.js} +1 -1
- package/dist/assets/{Public-BLh26Bb9.js → Public-YuAmoyPx.js} +1 -1
- package/dist/assets/{SchemaReference.es--oFfd0mm.js → SchemaReference.es-DbpM2rcO.js} +1 -1
- package/dist/assets/{Search-DnnCUnjB.js → Search-uFerpv5L.js} +1 -1
- package/dist/assets/{Select-CBA-xyOJ.js → Select-b09v8FPX.js} +1 -1
- package/dist/assets/{Skeleton-CQPjJHp3.js → Skeleton-zb5bXzJn.js} +1 -1
- package/dist/assets/{Slider-Bdpm9oO4.js → Slider-Ct9swbug.js} +1 -1
- package/dist/assets/{Stepper-UEQaZPW7.js → Stepper-WgjnG7-H.js} +1 -1
- package/dist/assets/{TextField-DjRhIjo4.js → TextField-BPO9Hci-.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-Drarswgi.js → ToggleButtonGroup-PBOhq3jx.js} +1 -1
- package/dist/assets/{ViewList-CoYI2XgO.js → ViewList-DiAWVo-f.js} +1 -1
- package/dist/assets/{actions-BAUfPsQv.js → actions-CS2Trs8B.js} +1 -1
- package/dist/assets/{actions-C1t0ka-G.js → actions-CYOQRhpw.js} +1 -1
- package/dist/assets/{agreement-_qYynElX.js → agreement-Br53N-6_.js} +1 -1
- package/dist/assets/api-UFWd_s1k.js +1 -0
- package/dist/assets/{app-avatar-DcgC0kB0.js → app-avatar-BhPctNAT.js} +1 -1
- package/dist/assets/{audit-logs-BqT_1MLt.js → audit-logs-DTUtFnAK.js} +1 -1
- package/dist/assets/{brace-fold.es-CkrKXotH.js → brace-fold.es-BSNAOfKd.js} +1 -1
- package/dist/assets/{bundle-avatar-RiFaz1Hb.js → bundle-avatar-CbU_wbB2.js} +1 -1
- package/dist/assets/{chart-Cinf5zq_.js → chart-BUxn7CWp.js} +1 -1
- package/dist/assets/{click-to-copy-Bj13kdln.js → click-to-copy-BLqu2SLV.js} +1 -1
- package/dist/assets/{closebrackets.es-C32XuxI5.js → closebrackets.es-DynJAn1e.js} +1 -1
- package/dist/assets/{codemirror.es-oms3GpFv.js → codemirror.es-cljF5Vfg.js} +1 -1
- package/dist/assets/{comment.es-AVZXTIDr.js → comment.es-CoFz2Oy_.js} +1 -1
- package/dist/assets/{config-navigation-LFUjTzgk.js → config-navigation-DZx1cn4-.js} +1 -1
- package/dist/assets/{delete-confirm-BoeDYrYX.js → delete-confirm-CcpxufKB.js} +1 -1
- package/dist/assets/{detail-CHKmnQLc.js → detail-CIhc9jZt.js} +3 -3
- package/dist/assets/{dialog.es-DHZdXjGS.js → dialog.es-C6n3qH0v.js} +1 -1
- package/dist/assets/{download-DFPnF7mz.js → download-xUEvruKh.js} +1 -1
- package/dist/assets/{foldgutter.es-CSicbQSJ.js → foldgutter.es-C2zr_tXR.js} +1 -1
- package/dist/assets/getValidReactChildren-7IUHA6fR.js +1 -0
- package/dist/assets/{hint.es-DAEQ9N76.js → hint.es-D0wd5c9g.js} +1 -1
- package/dist/assets/{hint.es2-DYXluLKu.js → hint.es2-DMsolbMA.js} +1 -1
- package/dist/assets/{iframe-DwuYX0Xq.js → iframe-n_w2gI30.js} +1 -1
- package/dist/assets/{index-DSByvARI.js → index-B2PJyxbf.js} +1 -1
- package/dist/assets/{index-9R6mPPbN.js → index-BBEuxxjq.js} +1 -1
- package/dist/assets/{index-BbW2IRRR.js → index-BEQyLEKb.js} +1 -1
- package/dist/assets/{index-Cl2QG8J6.js → index-BLEzKgrJ.js} +1 -1
- package/dist/assets/{index-BVznp3M0.js → index-BOADFDIv.js} +1 -1
- package/dist/assets/{index-v2cqn0eS.js → index-BR3eM8Lx.js} +1 -1
- package/dist/assets/{index-CtzAe2AR.js → index-BSqmsUTI.js} +1 -1
- package/dist/assets/{index-cmiUur_8.js → index-B_u7mT5U.js} +1 -1
- package/dist/assets/{index-BKi0XLcv.js → index-BgG0evtj.js} +1 -1
- package/dist/assets/{index-DV2quTIn.js → index-BoHcyWvQ.js} +1 -1
- package/dist/assets/{index-DrWhB0MJ.js → index-BtKnBn2o.js} +1 -1
- package/dist/assets/{index-DHYJxTcV.js → index-BwD5fAbE.js} +5 -5
- package/dist/assets/{index-BbS1Wq4p.js → index-C2Cgygdk.js} +1 -1
- package/dist/assets/{index-7J6TijHC.js → index-C8pFKy9H.js} +1 -1
- package/dist/assets/{index-rPqHtLu4.js → index-CCIbtRAj.js} +1 -1
- package/dist/assets/{index-DKkTRBZn.js → index-CHBNQD8C.js} +3 -3
- package/dist/assets/{index-DPx9NPlp.js → index-CLIK5uaQ.js} +1 -1
- package/dist/assets/{index-BBnT5XB9.js → index-Chps_oCL.js} +1 -1
- package/dist/assets/{index-B60jROHj.js → index-Cr1Psinm.js} +2 -2
- package/dist/assets/{index-ByF3apMm.js → index-CxaGo2hZ.js} +10 -10
- package/dist/assets/{index-zFXZLqso.js → index-CzXBr0fB.js} +1 -1
- package/dist/assets/{index-CiZAReVP.js → index-D3ulER0U.js} +1 -1
- package/dist/assets/index-D9E6SEa0.js +21 -0
- package/dist/assets/{index-CyYUysSv.js → index-DCQd0BKE.js} +1 -1
- package/dist/assets/{index-CZKHzmkC.js → index-DIuisRmH.js} +1 -1
- package/dist/assets/{index-DU7hJgoO.js → index-DNSbmp0u.js} +1 -1
- package/dist/assets/index-DPGMTLlW.js +54 -0
- package/dist/assets/{index-CqcpZ8C3.js → index-DS1JU_-_.js} +2 -2
- package/dist/assets/{index-ECk6dODK.js → index-DZdSy-Ha.js} +1 -1
- package/dist/assets/{index-DfNh08gP.js → index-Db0xkYaW.js} +3 -3
- package/dist/assets/{index-baq8DMtQ.js → index-DitmQRsw.js} +1 -1
- package/dist/assets/{index-CucnV9EX.js → index-Dl2hud6k.js} +1 -1
- package/dist/assets/{index-DcU_Cijj.js → index-DqdZ9FKF.js} +1 -1
- package/dist/assets/{index-CHjwpGia.js → index-Dvf0fvGe.js} +1 -1
- package/dist/assets/{index-DmPgcoiv.js → index-DvtCtx64.js} +1 -1
- package/dist/assets/{index-D5MDxbqt.js → index-DxGSDzwI.js} +1 -1
- package/dist/assets/{index-CIbzY-F7.js → index-DxX4hb7b.js} +1 -1
- package/dist/assets/{index-BKck0oIO.js → index-H43aSOyt.js} +1 -1
- package/dist/assets/{index-DOsg2sHH.js → index-JffoMuKt.js} +1 -1
- package/dist/assets/{index-DsUZ7uiP.js → index-RAfI5Ovd.js} +1 -1
- package/dist/assets/{index-0RUAEm49.js → index-xRBNy1in.js} +1 -1
- package/dist/assets/{index-BnFWpIPQ.js → index-yF_Q2_O-.js} +1 -1
- package/dist/assets/{index-CKOyruf_.js → index-zZFI1GlJ.js} +1 -1
- package/dist/assets/{index.es-Dkh9ejMp.js → index.es-Bq5abo39.js} +1 -1
- package/dist/assets/{index.esm-Hqw0Nfnx.js → index.esm-DvG22D3z.js} +1 -1
- package/dist/assets/{info-addon.es-5NmROke-.js → info-addon.es-C24VfKdY.js} +1 -1
- package/dist/assets/{info.es-CsELEfUv.js → info.es-Bqu2hgxq.js} +1 -1
- package/dist/assets/{install-from-url-DXGlT7R8.js → install-from-url-BsrxhAMw.js} +1 -1
- package/dist/assets/{invitation-CSNEw5oM.js → invitation-BMg6rGzW.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-CoJozASB.js → is-path-prefix-equal-PjyGugoV.js} +1 -1
- package/dist/assets/{isEqual-BLnnfE4T.js → isEqual-3iEl-twA.js} +1 -1
- package/dist/assets/{item-tD3jAfba.js → item-Yv551hqX.js} +1 -1
- package/dist/assets/{javascript.es-BIUhEWTj.js → javascript.es-DqZLq1Ic.js} +1 -1
- package/dist/assets/{jump-to-line.es-BQjWkUgo.js → jump-to-line.es-CUkkqFSr.js} +1 -1
- package/dist/assets/{jump.es-D8ZxFsmc.js → jump.es-dT0NLpeH.js} +1 -1
- package/dist/assets/{line-DW0juCGB.js → line-CG9AJRHJ.js} +3 -3
- package/dist/assets/{lint.es-Dv2pWRyz.js → lint.es-BQv8s92u.js} +1 -1
- package/dist/assets/{lint.es2-CqGQ_rnk.js → lint.es2-Bw5fcxch.js} +1 -1
- package/dist/assets/{lint.es3-g58ofVJA.js → lint.es3-CX_qCTWo.js} +1 -1
- package/dist/assets/{list-header-tjKXNgOR.js → list-header-3UZEZSQm.js} +1 -1
- package/dist/assets/{log-BFiA_Tyh.js → log-C6NBJs93.js} +1 -1
- package/dist/assets/{lottie-yeTV0Y2m.js → lottie-GpNsBU3J.js} +1 -1
- package/dist/assets/{matchbrackets.es-B-Xj5H9Q.js → matchbrackets.es-Kf3wI0kD.js} +1 -1
- package/dist/assets/{memory-C7a59RsU.js → memory-CnY03W9t.js} +1 -1
- package/dist/assets/{mode.es-BSNxo6gK.js → mode.es-DGRXJ00j.js} +1 -1
- package/dist/assets/{mode.es2-C1LDwVOl.js → mode.es2-DtvaqXOt.js} +1 -1
- package/dist/assets/{mode.es3-C6-ZTyOk.js → mode.es3-B8JtCbCV.js} +1 -1
- package/dist/assets/{onlineParser.es-BzK7GlZv.js → onlineParser.es-ZkK82Jda.js} +1 -1
- package/dist/assets/{overview-BlWFlRx2.js → overview-BUJYpj1Q.js} +1 -1
- package/dist/assets/{react-1fE0Sobf.js → react-BjVyu04q.js} +3 -3
- package/dist/assets/{redux-hfExDDyr.js → redux-gonzvYQ4.js} +1 -1
- package/dist/assets/{resource-dialog-DinbvH2C.js → resource-dialog-DO7gkp11.js} +1 -1
- package/dist/assets/{runtime-tAjj0dmb.js → runtime-BtNyIENm.js} +1 -1
- package/dist/assets/{search.es-DxfjuUNu.js → search.es-B_DIO3P6.js} +1 -1
- package/dist/assets/{searchcursor.es-C0Z2DY1c.js → searchcursor.es-DSbkhPIa.js} +1 -1
- package/dist/assets/service-B4g9jUew.js +1 -0
- package/dist/assets/{show-hint.es-q24U0q_A.js → show-hint.es-DNIrnFs-.js} +1 -1
- package/dist/assets/{slicedToArray-CYGiqzmA.js → slicedToArray-CjyU228M.js} +1 -1
- package/dist/assets/{spaces-C58gy1rM.js → spaces-BSCd0GtL.js} +1 -1
- package/dist/assets/{sublime.es-BffqyCoy.js → sublime.es-PWDR4BS_.js} +1 -1
- package/dist/assets/{switch-control-CuPWIx6T.js → switch-control-C8El4PwO.js} +1 -1
- package/dist/assets/{table-icons-DOOoyljy.js → table-icons-DwX90JdI.js} +2 -2
- package/dist/assets/{tag-Cxx1sXPF.js → tag-Cvwm2gDk.js} +1 -1
- package/dist/assets/{team-BynFP1rM.js → team-N6DYcIw9.js} +1 -1
- package/dist/assets/{toUpper-mYvRPeiI.js → toUpper-psJiJObX.js} +1 -1
- package/dist/assets/{traffic-D03HdfGL.js → traffic-CQiojOw9.js} +1 -1
- package/dist/assets/{url-evaluation-dheoi_Nj.js → url-evaluation-DjVe9I2g.js} +1 -1
- package/dist/assets/{url-join-DMIMYkEk.js → url-join-D1xrWbhs.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-DWywlTbc.js → use-blocklet-info-for-connect-did-spaces-IAC6QCQz.js} +1 -1
- package/dist/assets/{useLocalStorage-C3GQNaV2.js → useLocalStorage-CcTbqaWM.js} +1 -1
- package/dist/assets/{util-cf4pvQDW.js → util-_4tqOqNO.js} +1 -1
- package/dist/assets/{wait-container-BwlRhWl0.js → wait-container-4d4Uc1iI.js} +1 -1
- package/dist/assets/{withStyles-BkcRLEgx.js → withStyles-BiL7OyyA.js} +1 -1
- package/dist/assets/{wrap-locale-BqGpRCMA.js → wrap-locale-b15Mq8e0.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/DeleteOutline-B4LqoCK2.js +0 -1
- package/dist/assets/api-xvCGCwMn.js +0 -1
- package/dist/assets/getValidReactChildren-GMOIXwRG.js +0 -1
- package/dist/assets/index-HOVCi07-.js +0 -54
- package/dist/assets/index-ZQu91rXz.js +0 -21
- package/dist/assets/service-1GhnQw9a.js +0 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import{bl as ce,q as E,r as v,y as Ze,av as ie,a1 as Z,ak as Pe,j as e,m as x,O as u,x as re,D as Qe,B as W,C as Y,w as He,J as Ve,$ as de,A as I,K as le,P as p,n as ve,f as Ke,i as Ie,l as Xe,aK as q,aL as _,S as V,aD as K,a9 as X,a3 as We,a2 as Ge,aZ as Ye,H as qe,ci as _e,ez as je,W as $e,L as et,Z as tt,b as st,F as L,bc as H,T as ae,ax as ot,hh as nt}from"./index-DS1JU_-_.js";import{u as $}from"./team-N6DYcIw9.js";import{S as ye}from"./index-zZFI1GlJ.js";import"./api-UFWd_s1k.js";import{u as Be,P as at}from"./use-blocklet-info-for-connect-did-spaces-IAC6QCQz.js";import{f as G,g as Ae,h as it,i as Se,j as rt,k as lt,l as Ce,e as ct}from"./spaces-BSCd0GtL.js";import{u as J}from"./detail-CIhc9jZt.js";import{T as dt}from"./TextField-BPO9Hci-.js";import{I as pt}from"./index-BgG0evtj.js";import{S as De}from"./switch-control-C8El4PwO.js";import{d as ht}from"./MoreVert-CWypNP8g.js";import{D as mt}from"./DeleteOutline-DvFRqyWQ.js";import{e as ut}from"./mode-B2dWMeTO.js";import{D as ft}from"./index-DIuisRmH.js";import"./ButtonGroup-G7oFneKA.js";import"./getValidReactChildren-7IUHA6fR.js";import"./index-B2PJyxbf.js";import"./index-DxX4hb7b.js";import"./Delete-KztH8pOq.js";import"./url-evaluation-DjVe9I2g.js";import"./tag-Cvwm2gDk.js";import"./actions-CYOQRhpw.js";import"./useLocalStorage-CcTbqaWM.js";import"./app-avatar-BhPctNAT.js";import"./Breadcrumbs-D8UxFHZC.js";import"./Select-b09v8FPX.js";import"./InputLabel-ERXbfftZ.js";import"./index-DqdZ9FKF.js";import"./DeleteOutline-Cwej9e35.js";import"./FilterList-D84A-7C6.js";import"./LastPage-Cad46J9e.js";import"./index-DitmQRsw.js";import"./redux-gonzvYQ4.js";import"./Search-uFerpv5L.js";import"./index-BSqmsUTI.js";function ee({...t}){const{blocklet:s}=$(),{info:d}=ce(),{t:a,locale:i}=E(),[m,o]=v.useState(""),[r,j]=v.useState(!1),[c,h]=v.useState(!1),[D,y]=v.useState(""),f=Be({blocklet:s}),g=Ze(d),{spaceGateways:B,addSpaceGateway:se}=J(),[k,M]=v.useState({open:!1,action:"connect-to-did-spaces",checkTimeout:1e3*300,checkFn:ie.create({baseURL:Z(window.location.origin,Pe())}).get,messages:{title:a("storage.spaces.provideNFT.title",{appName:f.appName},i),scan:a("storage.spaces.provideNFT.scan",{appName:f.appName},i),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:a("storage.spaces.provideNFT.success")})},onClose:()=>{M(l=>({...l,open:!1}))}}),[n,z]=v.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:a("storage.spaces.authorize.title",{appName:f.appName},i),scan:a("storage.spaces.authorize.scan",{appName:f.appName},i),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:a("storage.spaces.authorize.success")})},onClose:()=>{z(l=>({...l,open:!1}))}}),b=async({endpoint:l,name:A,did:S})=>{const R=await Ae(l);if(!await Se(R)){I.error(a("storage.spaces.gateway.add.invalidUrl"));return}if(B.some(P=>P.endpoint===l)){I.error(a("storage.spaces.gateway.add.duplicate",{name:A}));return}const O={name:A,did:S,url:R,endpoint:l};await se(O,l),I.success(a("storage.spaces.connectedWithName",{name:(O==null?void 0:O.name)??"DID Spaces"}))},T=async(l,A)=>{try{if(!de.isEmpty(l.spaceGateway))await b(A(l.spaceGateway));else{const S=A(l.endpoint),R=l.space?A(l.space):{};await b({endpoint:S,did:G(S),name:"DID Space",...R})}z(S=>({...S,open:!1})),o(null),M(S=>({...S,open:!1}))}catch(S){console.error(S),I.error(le(S))}},C=()=>{M(l=>({...l,open:!0,extraParams:{appPid:s.appPid,appName:f.appName,appDescription:f.appDescription,scopes:f.scopes,appUrl:f.appUrl,referrer:f.referrer,nodeDid:d.did}}))},w=async()=>{try{j(!0);const l=await Ae(m),A=it(l),S=new URL(l).searchParams.get("spaceDid");if(!await Se(A))throw new Error(a("storage.spaces.gateway.add.invalidUrl"));z(R=>({...R,open:!0,prefix:Z(A,"space/api/did"),baseUrl:new URL(A).origin,checkFn:ie.create({baseURL:Z(A,"space")}).get,extraParams:{appDid:f.appDid,appName:f.appName,appDescription:f.appDescription,scopes:f.scopes,appUrl:f.appUrl,referrer:f.referrer,nodeDid:d.did,spaceDid:S}})),h(!1)}catch(l){const A=`${a("storage.spaces.gateway.add.failed",i)}: ${le(l)}`;y(A)}finally{j(!1)}};return e.jsxs(u,{children:[e.jsx(ye,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:C,menu:[e.jsx(ye.Item,{sx:{textTransform:"none"},onClick:()=>h(!0),size:"small",...t,children:a("storage.spaces.connect.useSpaceGateway")},"1")],children:e.jsx(x,{sx:{fontWeight:"bold",textTransform:"none"},children:a("storage.spaces.connect.useWallet")})}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:k.prefix,open:k.open,popup:!0,action:k.action,webWalletUrl:g,baseUrl:k.baseUrl,checkFn:k.checkFn,onSuccess:T,onClose:k.onClose,checkTimeout:k.checkTimeout,extraParams:k.extraParams,messages:k.messages,locale:i}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:n.prefix,open:n.open,popup:!0,action:n.action,baseUrl:n.baseUrl,checkFn:n.checkFn,onSuccess:T,onClose:n.onClose,checkTimeout:n.checkTimeout,extraParams:n.extraParams,messages:n.messages,locale:i}),e.jsxs(Qe,{title:a("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:c,onClose:()=>h(!1),PaperProps:{style:{minHeight:"auto"}},actions:e.jsxs(e.Fragment,{children:[e.jsx(W,{onClick:l=>{l.stopPropagation(),h(!1)},color:"inherit",children:a("common.cancel")}),e.jsxs(W,{onClick:w,color:"primary",disabled:r||!m,variant:"contained",autoFocus:!0,children:[r&&e.jsx(Y,{size:16}),a("common.confirm")]})]}),children:[e.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:e.jsx(He,{component:"div",children:e.jsx(x,{component:"div",children:e.jsx(dt,{label:a("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:m,onChange:l=>{y(null),o(l.target.value)},disabled:r,onKeyPress:async l=>{l.key==="Enter"&&await w()},autoFocus:!0})})})}),!!D&&e.jsx(Ve,{type:"error",style:{width:"100%"},children:D})]})]})}ee.propTypes={};ee.defaultProps={};function te({blocklet:t,...s}){const{t:d}=v.useContext(Ke);if(!t.diskInfo)return e.jsx(x,{children:d("blocklet.diskInfo.empty")});const a=(o,r,j)=>e.jsxs(x,{children:[j?e.jsx(Ie,{style:{cursor:"pointer"},onClick:j,underline:"hover",children:o}):o," ",e.jsx("strong",{children:r?Xe(r):"empty"})]}),i=t.environments.reduce((o,r)=>(o[r.key]=r.value,o),{}),m=[{key:"appDir",name:d("blocklet.diskInfo.appDir"),value:a(i.BLOCKLET_APP_DIR,t.diskInfo.app)},{key:"dataDir",name:d("blocklet.diskInfo.dataDir"),value:a(i.BLOCKLET_DATA_DIR,t.diskInfo.data)},{key:"logDir",name:d("blocklet.diskInfo.logDir"),value:a(i.BLOCKLET_LOG_DIR,t.diskInfo.log)},{key:"cacheDir",name:d("blocklet.diskInfo.cacheDir"),value:a(i.BLOCKLET_CACHE_DIR,t.diskInfo.cache)}];return e.jsx(xt,{component:"div",...s,children:m.map(o=>e.jsx(pt,{valueComponent:"div",nameWidth:120,name:o.name,children:o.value},o.key))})}te.propTypes={blocklet:p.object.isRequired};te.defaultProps={};const xt=ve(x)``;var ke=function(s){return e.jsxs("svg",{...s,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAA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tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};ke.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Ue(){const{t}=E(),{blocklet:s}=$();return e.jsxs(u,{children:[e.jsxs(u,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(ke,{style:{width:200,height:250}}),e.jsx(x,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(ee,{})]}),e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(te,{blocklet:s})]})}Ue.propTypes={};var pe={},gt=_;Object.defineProperty(pe,"__esModule",{value:!0});var be=pe.default=void 0,jt=gt(q()),yt=e;be=pe.default=(0,jt.default)((0,yt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var he={},At=_;Object.defineProperty(he,"__esModule",{value:!0});var Re=he.default=void 0,St=At(q()),Ct=e;Re=he.default=(0,St.default)((0,Ct.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var me={},vt=_;Object.defineProperty(me,"__esModule",{value:!0});var Ee=me.default=void 0,It=vt(q()),Bt=e;Ee=me.default=(0,It.default)((0,Bt.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function ue({spaceGateway:t,onDelete:s}){const{t:d}=E(),[a,i]=v.useState(!1),[m,o]=v.useState(!1),r=(c,h)=>{c==null||c.preventDefault(),c==null||c.stopPropagation(),i(h)},j=async c=>{try{c==null||c.stopPropagation(),o(!0),await s(t),i(!1)}catch(h){console.error(h),I.error(`${d("storage.space.gateway.delete.failed")}: ${le(h)}`)}finally{o(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(V,{color:"red",onClick:c=>r(c,!0),children:[e.jsx(K,{style:{minWidth:24,color:"red"},children:e.jsx(mt,{fontSize:"small"})}),e.jsx(X,{style:{color:"red"},children:d("common.delete")})]}),e.jsx(We,{title:d("common.delConfirmDescription",{data:`${t==null?void 0:t.name}`}),open:a,confirmButton:{text:d("common.confirm"),props:{variant:"contained",color:"error",loading:m}},cancelButton:{text:d("common.cancel"),props:{variant:"contained",color:"primary"},loading:m},onConfirm:j,onCancel:c=>r(c,!1)})]})}ue.propTypes={onDelete:p.func,spaceGateway:p.shape({name:p.string.isRequired,url:p.string.isRequired,protected:p.bool}).isRequired};ue.defaultProps={onDelete:()=>{}};function fe({spaceGateway:t,connected:s,onDelete:d,onConnect:a,enableSwitchToSpace:i,backupInProgress:m,...o}){const[r,j]=v.useState(null),{t:c}=E(),[h,D]=v.useState(!1),y=(g,B)=>{g.stopPropagation(),g.preventDefault(),j(B&&g.currentTarget)},f=async g=>{try{D(!0),y(g,!1),await a(t)}catch(B){console.error(B),I.error(B.message)}finally{D(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Ge,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:g=>y(g,!0),size:"small",...o,children:h||t!=null&&t.loading?e.jsx(Y,{size:"24px"}):e.jsx(ht,{})}),e.jsxs(Ye,{id:"simple-menu",anchorEl:r,keepMounted:!0,open:!!r,onClose:g=>y(g,!1),children:[e.jsxs(V,{onClick:g=>{y(g,!1),window.open(t.endpoint?rt(t.endpoint):t.url)},children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(be,{fontSize:"small"})}),e.jsx(X,{children:c("common.open")})]}),e.jsxs(V,{onClick:g=>{y(g,!1),window.open(lt(t.endpoint))},children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(Ee,{fontSize:"small"})}),e.jsx(X,{children:c("storage.spaces.strategy.viewBackupFiles")})]}),!s&&i&&e.jsxs(V,{onClick:f,children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(Re,{fontSize:"small"})}),e.jsx(X,{children:c("storage.spaces.connect.switchToSpace")})]}),!m&&e.jsx(ue,{spaceGateway:t,onDelete:d})]})]})}fe.propTypes={spaceGateway:p.shape({name:p.string.isRequired,url:p.string.isRequired,protected:p.bool,endpoint:p.string.isRequired,loading:p.bool}).isRequired,connected:p.bool.isRequired,enableSwitchToSpace:p.bool,onDelete:p.func,onConnect:p.func,backupInProgress:p.bool};fe.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};var Te=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};Te.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var we=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})})};we.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xe({spaceGateway:t,connected:s,onDelete:d,onBackupNow:a,...i}){const m=qe(U=>U.breakpoints.down("md")),{t:o,locale:r}=E(),{blocklet:j}=$(),{api:c,info:{did:h}}=ce(),{appDid:D,appName:y,appDescription:f,scopes:g,appUrl:B,referrer:se}=Be({blocklet:j}),{updateSpaceGateway:k,backupEndpoint:M,backupProgress:n,refreshBackupEndpoint:z}=J(),[b,T]=v.useState(!1),[C,w]=v.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:o("storage.spaces.authorize.title",{appName:y},r),scan:o("storage.spaces.authorize.scan",{appName:y},r),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:o("storage.spaces.authorize.success")})},onClose:()=>{w(U=>({...U,open:!1}))}}),{data:l,loading:A}=_e(async()=>s?Ce(M):!0,{refreshDeps:[s,M,C==null?void 0:C.open,b]}),S=s&&l,R=s&&!b&&l&&!(t!=null&&t.loading),F=s&&b&&l,O=s&&!l&&!A&&!b,P=async()=>{if(await Ce(t==null?void 0:t.endpoint)){await c.configBlocklet({input:{did:[j.meta.did],configs:[{key:st.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),z(),I.success(o("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""}));return}w(Q=>({...Q,open:!0,prefix:Z(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:ie.create({baseURL:Z(t.url,"space")}).get,extraParams:{appDid:D,appName:y,appDescription:f,scopes:g,appUrl:B,referrer:se,nodeDid:h,spaceDid:t.did}}))},Me=async(U,Q)=>{const oe=Q(U.endpoint),Je=G(oe),N=U.space?Q(U.space):{};if(t.did&&Je!==t.did){w(ne=>({...ne,open:!1})),I.error(o("storage.spaces.gateway.switch.failedForMismatchSpace",{name:N!=null&&N.name?N.name:""}));return}const ze={...t,name:N.name??"DID Space",did:N.did??G(oe),endpoint:oe};await k(ze),w(ne=>({...ne,open:!1}))},Ne=async()=>{try{if(b)return;T(!0),await a()}catch(U){console.error(U),I.error(U.message)}finally{T(!0)}};return v.useEffect(()=>{n!=null&&n.completed?((n==null?void 0:n.progress)===100?I.success(o("storage.spaces.backupSuccessfully")):(n==null?void 0:n.progress)===-1&&I.error(n==null?void 0:n.message),T(!1),n.progress=0,n.message=""):n.progress&&T(!0)},[n]),e.jsxs(Dt,{style:{position:"relative"},children:[e.jsxs(u,{sx:{backgroundColor:s?"#F0FDFF":"inherit","&:hover":{backgroundColor:s?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px",...i,children:[e.jsx(u,{display:"flex",children:e.jsx(at,{alt:t.did,src:ct(t.endpoint)})}),e.jsxs(u,{className:"spaces-info",display:"flex",flexGrow:(!m||!F)&&1,minWidth:"180px",flexDirection:F?"row":"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[e.jsxs(u,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[e.jsx(x,{color:s?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:t.name}),S&&e.jsx(je,{label:e.jsxs(e.Fragment,{children:[e.jsx(Te,{style:{marginRight:"4px"}}),o("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}}),O&&e.jsx(je,{label:e.jsxs(e.Fragment,{children:[e.jsx(we,{style:{marginRight:"4px"}}),o("storage.spaces.disconnected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}})]}),e.jsx(u,{className:"spaces-address",display:F?"none":"flex",color:"#9397A1",marginTop:"8px",children:e.jsx(x,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:t.did&&e.jsx($e,{copyable:!1,size:14,compact:!0,responsive:!1,did:t.did})})})]}),e.jsxs(u,{className:"spaces-backup",display:"flex",alignItems:"center",flex:m&&F&&1,children:[R&&e.jsxs(u,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:[e.jsx(W,{variant:"contained",size:"small",onClick:Ne,children:o("storage.spaces.strategy.backupNow")}),ut&&e.jsx(De,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:e.jsx(x,{sx:{marginRight:"8px",fontSize:"16px"},children:e.jsx("span",{children:o("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),F&&e.jsxs(u,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",minWidth:!m&&"640px",marginLeft:m&&"16px",width:m&&"360px",marginRight:"auto",alignSelf:"flex-end",children:[e.jsx(x,{color:"primary",children:n==null?void 0:n.message}),e.jsxs(u,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[e.jsx(u,{sx:{width:"100%",mr:1},children:e.jsx(et,{color:"primary",variant:"determinate",value:n==null?void 0:n.progress})}),e.jsx(u,{sx:{maxWidth:"100%"},children:e.jsxs(x,{variant:"body2",color:"text.secondary",children:[n==null?void 0:n.progress,"%"]})})]})]}),O&&e.jsx(u,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:e.jsx(W,{color:"error",variant:"contained",size:"small",onClick:P,children:o("storage.spaces.disconnected.reconnectNow")})}),e.jsx(fe,{sx:{marginLeft:"16px",marginRight:"16px",alignItems:"flex-end",justifyItems:"flex-end"},spaceGateway:t,connected:s,onDelete:d,onConnect:P,enableSwitchToSpace:(n==null?void 0:n.completed)||de.isEmpty(n==null?void 0:n.message),backupInProgress:F})]})]}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:C.prefix,open:C.open,popup:!0,action:C.action,baseUrl:C.baseUrl,checkFn:C.checkFn,onSuccess:Me,onClose:C.onClose,checkTimeout:C.checkTimeout,extraParams:C.extraParams,messages:C.messages,locale:r},"get-endpoint"),e.jsx(u,{className:`selected-container ${s?"selected":""}`,children:e.jsx(tt,{className:"selected-icon"})})]})}xe.propTypes={spaceGateway:p.shape({did:p.string.isRequired,name:p.string.isRequired,url:p.string.isRequired,endpoint:p.string.isRequired,protected:p.bool,loading:p.bool}).isRequired,connected:p.bool.isRequired,progress:p.any.isRequired,onDelete:p.func,onBackupNow:p.func};xe.defaultProps={onDelete:()=>{},onBackupNow:()=>{}};const Dt=ve(u)`
|
|
2
|
+
.selected-container {
|
|
3
|
+
position: absolute;
|
|
4
|
+
right: 0px;
|
|
5
|
+
bottom: 0px;
|
|
6
|
+
display: flex;
|
|
7
|
+
-webkit-box-pack: end;
|
|
8
|
+
justify-content: flex-end;
|
|
9
|
+
align-items: flex-end;
|
|
10
|
+
width: 32px;
|
|
11
|
+
height: 32px;
|
|
12
|
+
border-radius: 0px 0px 8px;
|
|
13
|
+
color: rgb(255, 255, 255);
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
transition: all 0.4s ease 0s;
|
|
16
|
+
|
|
17
|
+
&::after {
|
|
18
|
+
position: absolute;
|
|
19
|
+
z-index: 0;
|
|
20
|
+
left: 60px;
|
|
21
|
+
top: 60px;
|
|
22
|
+
display: block;
|
|
23
|
+
width: 0px;
|
|
24
|
+
height: 0px;
|
|
25
|
+
border-width: 16px;
|
|
26
|
+
border-style: solid;
|
|
27
|
+
border-color: transparent #1dc1c7 #1dc1c7 transparent;
|
|
28
|
+
transition: all 0.1s ease 0s;
|
|
29
|
+
content: '';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.selected-icon {
|
|
33
|
+
visibility: hidden;
|
|
34
|
+
width: 60%;
|
|
35
|
+
height: 60%;
|
|
36
|
+
position: relative;
|
|
37
|
+
z-index: 2;
|
|
38
|
+
margin: 0px 1px 1px 0px;
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
transition: all 0.2s ease 0s;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.selected-container.selected {
|
|
45
|
+
&::after {
|
|
46
|
+
left: 0px;
|
|
47
|
+
top: 0px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.selected-icon {
|
|
51
|
+
visibility: visible;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;var ge={},kt=_;Object.defineProperty(ge,"__esModule",{value:!0});var Fe=ge.default=void 0,Ut=kt(q()),bt=e;Fe=ge.default=(0,Ut.default)((0,bt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline");function Oe({...t}){const{t:s,locale:d}=E(),{spaceGateways:a,backups:i}=J(),m=[{label:"DID Spaces",name:"target",options:{customBodyRenderLite:o=>{var g;const{targetUrl:r,targetName:j,status:c,createdAt:h}=i[o],D=c===L.BACKUPS.STATUS.PROGRESS&&H().diff(h,"hours")>=L.BACKUPS.TIMEOUT_HOURS,y=c===L.BACKUPS.STATUS.SUCCEEDED&&!D,f=j||((g=a.find(B=>r==null?void 0:r.includes(G(B==null?void 0:B.endpoint))))==null?void 0:g.name)||"Unknown DID Space";return y?e.jsx(Ie,{fontSize:"16px",href:r,target:"_blank",children:f}):e.jsx(x,{variant:"body1",fontSize:"16px",children:f})}}},{label:s("common.strategy"),name:"strategy",options:{customBodyRender:o=>{const r=s(o===0?"common.auto":"common.manual");return e.jsx(ae,{children:r})}}},{label:s("common.startTime"),name:"createdAt",options:{customBodyRender:o=>H(o).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.endTime"),name:"updatedAt",options:{customBodyRender:o=>de.isEmpty(o)?"":H(o).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.status"),name:"status",options:{customBodyRenderLite:o=>{const{status:r,message:j,createdAt:c}=(i==null?void 0:i[o])??{},h=r===L.BACKUPS.STATUS.PROGRESS&&H().diff(c,"hours")>=L.BACKUPS.TIMEOUT_HOURS,D=h&&s("common.timeoutError"),y=r===L.BACKUPS.STATUS.PROGRESS&&!h,f=r===L.BACKUPS.STATUS.SUCCEEDED&&!h;return y?e.jsxs(x,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(Y,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):f?e.jsx(ae,{type:"success",children:s("common.succeeded")}):e.jsxs(u,{display:"inline-flex",alignItems:"center",children:[e.jsx(ae,{type:"error",children:s("common.failed")})," ",e.jsx(ot,{style:{display:"flex",alignItems:"center",flexShrink:0},title:j||D,children:e.jsx(nt,{children:e.jsx(Fe,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return e.jsx(u,{...t,children:i!=null&&i.length?e.jsx(ft,{title:e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")}),data:i,columns:m,emptyNode:s("storage.spaces.record.emptyData",d),options:{download:!1,filter:!1,print:!1}}):e.jsxs(e.Fragment,{children:[e.jsx(u,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")})}),e.jsx(u,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:s("storage.spaces.record.emptyData")})]})})}Oe.propTypes={};function Le({...t}){const{t:s}=E(),{autoBackup:d,updateAutoBackup:a}=J(),i=async()=>{try{const m=!d.enabled;await a({enabled:m}),I.success(s(m?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(m){I.error(m.message)}};return e.jsx(De,{checked:!!(d!=null&&d.enabled),onChange:i,name:"enableWelcomePage",labelProps:{label:e.jsx(x,{marginRight:"8px",children:e.jsx("span",{children:s("storage.spaces.autoBackup.title")})})},style:{...t.style}})}Le.propTypes={};function Rt(){const{t}=E(),{blocklet:s}=$(),{api:d}=ce(),{spaceGateways:a,spaceGatewaysLoading:i,deleteSpaceGateway:m,spaceGatewayIsSelected:o}=J(),r=i&&!(a!=null&&a.length),j=async h=>{await m(h),I.success(t("storage.spaces.gateway.delete.succeeded",{name:`(${h.name})`}))},c=async()=>{await d.backupBlocklet({input:{appDid:s.appDid,to:"spaces"}})};return e.jsxs(u,{display:"flex",flexDirection:"column",children:[e.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:[e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:t("storage.spaces.connected.title")}),e.jsx(Le,{style:{marginRight:"32px"}}),e.jsx(ee,{})]}),e.jsx(u,{children:r?e.jsx(u,{display:"flex",justifyContent:"center",children:e.jsx(Y,{})}):a.map(h=>e.jsx(xe,{style:{marginTop:"12px"},spaceGateway:h,connected:o(h),onDelete:j,onBackupNow:c},h.endpoint))}),e.jsx(Oe,{sx:{marginTop:"24px"}}),e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(te,{blocklet:s})]})}function Et(){const{backupEndpoint:t}=J();return t?e.jsx(Rt,{}):e.jsx(Ue,{})}Et.propTypes={};export{Et as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__fileDeps=["./index-
|
|
1
|
+
const __vite__fileDeps=["./index-BBEuxxjq.js","./index-D9k2I5J1.js","./index-BgG0evtj.js","./click-to-copy-BLqu2SLV.js","./withStyles-BiL7OyyA.js","./index-xRBNy1in.js","./useLocalStorage-CcTbqaWM.js","./index-DIuisRmH.js","./FilterList-D84A-7C6.js","./Select-b09v8FPX.js","./Delete-KztH8pOq.js","./InputLabel-ERXbfftZ.js","./TextField-BPO9Hci-.js","./LastPage-Cad46J9e.js","./index-DitmQRsw.js","./redux-gonzvYQ4.js","./Search-uFerpv5L.js","./index-BSqmsUTI.js","./MoreVert-CWypNP8g.js","./url-evaluation-DjVe9I2g.js","./tag-Cvwm2gDk.js","./actions-CYOQRhpw.js","./ButtonGroup-G7oFneKA.js","./getValidReactChildren-7IUHA6fR.js","./index-BOADFDIv.js","./isEqual-3iEl-twA.js","./install-from-url-BsrxhAMw.js","./Stepper-WgjnG7-H.js","./app-avatar-BhPctNAT.js","./Add-i_eGmIkF.js","./index-zZFI1GlJ.js","./index-CxaGo2hZ.js","./index-DxGSDzwI.js","./url-join-D1xrWbhs.js","./Skeleton-zb5bXzJn.js","./Close-BltjIlg7.js","./lottie-GpNsBU3J.js","./wait-container-4d4Uc1iI.js","./Launch-fB5PS8PY.js","./DeleteOutline-DvFRqyWQ.js","./DeleteOutline-Cwej9e35.js","./spaces-BSCd0GtL.js","./api-UFWd_s1k.js","./index-D9E6SEa0.js","./item-Yv551hqX.js","./index-DCQd0BKE.js","./index-DqdZ9FKF.js","./InputAdornment-CfEcRXzS.js","./preact.module-B1z5cdvs.js","./Done-CEgWviUN.js","./delete-confirm-CcpxufKB.js","./item-CxkJY_14.css","./ArrowDropDown-CRJiMsxl.js","./Breadcrumbs-D8UxFHZC.js","./index-Dl2hud6k.js","./index-DxX4hb7b.js","./index.esm-DvG22D3z.js","./switch-control-C8El4PwO.js","./is-path-prefix-equal-PjyGugoV.js","./Link-Dzd80klt.js","./logo-BKA11TRi.js","./LoadingButton-hHC9D6Jh.js","./Public-YuAmoyPx.js","./CheckCircle-CpgwIoc6.js","./ChevronRight-DDJkuJhV.js","./Edit-jbcm5AKt.js","./Https-DsiZfUtZ.js","./Slider-Ct9swbug.js","./index-CLIK5uaQ.js","./download-xUEvruKh.js","./download-D33dFtt_.css","./index-BEQyLEKb.js","./audit-logs-DTUtFnAK.js","./index-C2Cgygdk.js","./index-D4PP6P2d.css","./Pagination-Btpup9Q2.js","./index-H43aSOyt.js","./index-BR3eM8Lx.js","./Loop-BTQochTH.js","./ViewList-DiAWVo-f.js","./list-header-3UZEZSQm.js","./index-DZdSy-Ha.js","./resource-dialog-DO7gkp11.js","./index-B2PJyxbf.js","./team-N6DYcIw9.js","./actions-CS2Trs8B.js","./index-Dvf0fvGe.js","./EditIcon-DAtBHTkl.js","./LockIcon-BgCC_gMD.js","./Google-CCNGxrji.js","./ToggleButtonGroup-PBOhq3jx.js","./detail-CIhc9jZt.js","./index-RAfI5Ovd.js","./index-JffoMuKt.js","./invitation-BMg6rGzW.js","./index-C8pFKy9H.js","./index-B_u7mT5U.js","./wrap-locale-b15Mq8e0.js","./index-Db0xkYaW.js","./index-BtKnBn2o.js","./index-DvtCtx64.js","./agreement-Br53N-6_.js","./index-BoHcyWvQ.js","./index-CzXBr0fB.js","./index-BwD5fAbE.js","./index-C7igR7se.css","./index-yF_Q2_O-.js","./traffic-CQiojOw9.js","./iframe-n_w2gI30.js","./ChevronLeft-BqOWO5Oh.js","./chart-BUxn7CWp.js","./bundle-avatar-CbU_wbB2.js","./memory-CnY03W9t.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
2
|
function OW(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gi(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var IW={exports:{}},i4={},PW={exports:{}},zn={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -2518,4 +2518,4 @@ ${r}
|
|
|
2518
2518
|
${e=>e.scrollable?"":"overflow: hidden"};
|
|
2519
2519
|
}
|
|
2520
2520
|
`;function nCt(){const{t:e}=fo(),{session:t}=y0(),{info:n,refresh:r}=Sl();return Ki(ti.TeamEvents.userUpdated,({teamDid:i,user:o})=>{i===n.did&&o&&!o.approved&&t&&t.user&&t.user.did===o.did&&(ci.warning(e("session.forbidLogin"),{autoHideDuration:10*1e3}),t.logout())}),Ki(rn.EVENTS.NOTIFICATION_CREATE,i=>{i.entityType==="node"&&r({silent:!0})}),Ki(rn.EVENTS.NODE_UPDATED,()=>{r({silent:!0})}),null}var Ss={},rCt=sie;function iCt(e){return e&&e.length?rCt(e):[]}var Vle=iCt;const P_t=Kt(Vle),oCt=gi(Lze);class aCt{constructor(t){this.value=t,this.next=void 0}}let sCt=class{constructor(){this.clear()}enqueue(t){const n=new aCt(t);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const t=this._head;if(t)return this._head=this._head.next,this._size--,t.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let t=this._head;for(;t;)yield t.value,t=t.next}};var lCt=sCt;const uCt=lCt,cCt=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new uCt;let n=0;const r=()=>{n--,t.size>0&&t.dequeue()()},i=async(s,l,...c)=>{n++;const u=(async()=>s(...c))();l(u);try{await u}catch{}r()},o=(s,l,...c)=>{t.enqueue(i.bind(null,s,l,...c)),(async()=>(await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()))()},a=(s,...l)=>new Promise(c=>{o(s,c,...l)});return Object.defineProperties(a,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),a};var fCt=cCt,zle={},Ri={};Ri.endianness=function(){return"LE"};Ri.hostname=function(){return typeof location<"u"?location.hostname:""};Ri.loadavg=function(){return[]};Ri.uptime=function(){return 0};Ri.freemem=function(){return Number.MAX_VALUE};Ri.totalmem=function(){return Number.MAX_VALUE};Ri.cpus=function(){return[]};Ri.type=function(){return"Browser"};Ri.release=function(){return typeof navigator<"u"?navigator.appVersion:""};Ri.networkInterfaces=Ri.getNetworkInterfaces=function(){return{}};Ri.arch=function(){return"javascript"};Ri.platform=function(){return"browser"};Ri.tmpdir=Ri.tmpDir=function(){return"/tmp"};Ri.EOL=`
|
|
2521
|
-
`;Ri.homedir=function(){return"/"};(function(e){var t=mt&&mt.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.hasMountPoint=e.hasStartEngine=e.isPackBlocklet=e.isGatewayBlocklet=e.getBlockletEngine=void 0;const n=t(Ri),r=ti,i=c=>{if(c===void 0)throw new Error("blocklet meta param is required");const{engine:u}=c;if(!u)return{interpreter:"node",source:""};if(!Array.isArray(u))return u;const d=n.default.platform(),p=u.find(g=>g.platform===d);if(!p)throw new Error(`can not find a proper engine interpreter on ${d}`);return p};e.getBlockletEngine=i;const o=c=>(c==null?void 0:c.group)===r.BlockletGroup.gateway;e.isGatewayBlocklet=o;const a=c=>(c==null?void 0:c.group)===r.BlockletGroup.pack;e.isPackBlocklet=a;const s=c=>!!(c!=null&&c.main)||(0,e.getBlockletEngine)(c||{}).interpreter==="blocklet";e.hasStartEngine=s;const l=c=>((0,e.hasStartEngine)(c)||((c==null?void 0:c.interfaces)||[]).find(u=>u.type===r.BLOCKLET_INTERFACE_TYPE_WEB))&&(0,e.isGatewayBlocklet)(c)===!1;e.hasMountPoint=l})(zle);(function(e){var t=mt&&mt.__importDefault||function(te){return te&&te.__esModule?te:{default:te}};Object.defineProperty(e,"__esModule",{value:!0}),e.isPackBlocklet=e.isGatewayBlocklet=e.isAccessible=e.isRunning=e.isBeforeInstalled=e.isInProgress=e.getBlockletServices=e.getBlockletAppIdList=e.getRolesFromAuthConfig=e.isPreferenceKey=e.isExternalBlocklet=e.getBlockletChainInfo=e.getChainInfo=e.getConnectAppUrl=e.getParentComponentName=e.filterComponentsV2=e.findComponentByIdV2=e.findComponentV2=e.findComponentById=e.findComponent=e.getComponentBundleId=e.getComponentName=e.getComponentId=e.replaceSlotToIp=e.getComponentWhoCanAccess=e.getWhoCanAccess=e.findServiceFromMeta=e.findWebInterfacePort=e.findWebInterface=e.fixBlockletStatus=e.getAppDescription=e.getDisplayName=e.getAppName=e.hasRunnableComponent=e.wipeSensitiveData=e.isEnvShareable=e.isEnvShareableToClient=e.getComponentMissingConfigs=e.getAppMissingConfigs=e.getSharedConfigObj=e.isDeletableBlocklet=e.forEachComponentV2Sync=e.forEachComponentV2=e.forEachChildSync=e.forEachChild=e.forEachBlockletSync=e.forEachBlocklet=e.isFreeComponent=e.isFreeBlocklet=e.getAppUrl=void 0,e.hasResourceType=e.hasStartEngine=void 0;const n=t(vw),r=t(Vle),i=oCt,o=t(fCt),a=t(rn),s=ti,l=zle;Object.defineProperty(e,"hasStartEngine",{enumerable:!0,get:function(){return l.hasStartEngine}}),Object.defineProperty(e,"isGatewayBlocklet",{enumerable:!0,get:function(){return l.isGatewayBlocklet}}),Object.defineProperty(e,"isPackBlocklet",{enumerable:!0,get:function(){return l.isPackBlocklet}});const{NODE_SERVICES:c,SLOT_FOR_IP_DNS_SITE:u,WHO_CAN_ACCESS:d,WHO_CAN_ACCESS_PREFIX_ROLES:p}=a.default,g=(te,we=[])=>`${we.map($e=>$e&&$e.meta?$e.meta.did:"").join("/")}${we.length?"/":""}${te&&te.meta?te.meta.did:""}`;e.getComponentId=g;const y=(te,we=[])=>`${we.map($e=>$e&&$e.meta?$e.meta.name:"").join("/")}${we.length?"/":""}${te&&te.meta?te.meta.name:""}`;e.getComponentName=y;const b=te=>`${te.meta.bundleName}@${te.meta.version}`;e.getComponentBundleId=b;const A=te=>{if(!te)return"";const we=te.split("/");return we.pop(),!we.length||(we[we.length-1].startsWith("@")&&we.pop(),!we.length)?"":we.join("/")};e.getParentComponentName=A;const x=(te,we,{parallel:$e=!1,concurrencyLimit:De=5,sync:re,params:q,_parent:W,_root:ce,_level:ke=0,_tasks:Ee,_ancestors:xe=[],_limit:Ue}={})=>{const je=ce||W||te,He=g(te,xe),lt=xe.concat(te);if(re){const Oe=we(te,{parent:W,root:je,level:ke,params:q,ancestors:xe,id:He});if(te.children)for(const Le of te.children)x(Le,we,{sync:re,params:Oe,_parent:te,_root:je,_level:ke+1,_ancestors:lt});return null}if(!$e)return new Promise(async(Oe,Le)=>{try{const Pe=await we(te,{parent:W,root:je,level:ke,ancestors:xe,params:q,id:He});if(te.children)for(const nt of te.children)await x(nt,we,{params:Pe,_parent:te,_root:je,_level:ke+1,_ancestors:lt});Oe(null)}catch(Pe){Le(Pe)}});const Ze=Ue||(0,o.default)(De),Ye=Ee||[];if(Ye.push(Ze(()=>we(te,{parent:W,root:je,level:ke,ancestors:xe,id:He}))),te.children)for(const Oe of te.children)x(Oe,we,{parallel:$e,_parent:te,_root:je,_level:ke+1,_tasks:Ye,_ancestors:lt,_limit:Ze});return Ee?null:Promise.all(Ye)};e.forEachBlocklet=x;const D=(te,we)=>x(te,we,{sync:!0});e.forEachBlockletSync=D;const O=(te,we,{parallel:$e=!1,concurrencyLimit:De=5,sync:re}={})=>{if(re){if(te.children)for(const ce of te.children)we(ce);return null}if(!$e)return new Promise(async(ce,ke)=>{try{if(te.children)for(const Ee of te.children)await we(Ee);ce(null)}catch(Ee){ke(Ee)}});const q=(0,o.default)(De),W=[];if(te.children)for(const ce of te.children)W.push(q(()=>we(ce)));return Promise.all(W)};e.forEachComponentV2=O;const P=(te,we)=>O(te,we,{sync:!0});e.forEachComponentV2Sync=P;const V=(te,we,$e)=>x(te,(De,re)=>re.level===0?{}:we(De,re),$e);e.forEachChild=V;const M=(te,we)=>V(te,we,{sync:!0});e.forEachChildSync=M;const j=(te,we,{_ancestors:$e=[],returnAncestors:De=!1}={})=>{if(!we)return null;if(we(te,{ancestors:$e}))return De?{component:te,ancestors:$e}:te;for(const re of te.children||[]){const q=$e.concat(te),W=j(re,we,{_ancestors:q,returnAncestors:De});if(W)return W}return null};e.findComponent=j;const G=(te,we,{returnAncestors:$e=!1}={})=>(Array.isArray(we)&&(we=we.join("/")),j(te,(De,{ancestors:re})=>{const q=g(De,re);return we===q},{returnAncestors:$e}));e.findComponentById=G;const ie=(te,we)=>{if(!we)return null;for(const $e of te.children||[])if(we($e,te))return $e;return null};e.findComponentV2=ie;const ue=(te,we)=>we?(Array.isArray(we)&&(we=we.join("/")),ie(te,($e,De)=>{if(we.includes("/")){const re=g($e,[De]);return we===re}return we===$e.meta.did})):null;e.findComponentByIdV2=ue;const K=(te,we)=>{if(!we)return[];const $e=[];for(const De of te.children||[])we(De,te)&&$e.push(De);return $e};e.filterComponentsV2=K;const N=te=>!!te&&!!(te.key||te.name)&&!te.secure&&te.shared!==!1&&!s.BLOCKLET_CONFIGURABLE_KEY[te.key||te.name];e.isEnvShareableToClient=N;const T=te=>!!te&&!!(te.key||te.name)&&!te.secure&&!!te.shared&&!s.BLOCKLET_CONFIGURABLE_KEY[te.key||te.name];e.isEnvShareable=T;const f=(te,we)=>{const $e={};return!te||!we||(Array.isArray(te.configs)&&te.configs.forEach(({key:De,value:re,secure:q})=>{if(!T({key:De,secure:q,shared:!0}))return;const W=(te.configObj||{})[De]||re,ce=(we.configs||[]).find(ke=>ke.key===De);(!ce||T(ce)||!ce.value&&!(we.configObj||{})[ce.key])&&($e[De]=W)}),(te.configs||[]).forEach(({key:De,value:re})=>{[s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(De)&&($e[s.CHAIN_PROP_MAP[De]]=re)})),$e};e.getSharedConfigObj=f;const h=te=>te.key.startsWith(s.BLOCKLET_PREFERENCE_PREFIX)===!0;e.isPreferenceKey=h;const w=(te,we)=>!!(te.required&&(!te.value&&!we[te.key]||Object.values(s.CHAIN_PROP_MAP).includes(te.key)&&Object.keys(we).includes(te.key)&&!we[te.key])),_=(te={})=>{const we=[];return P(te,$e=>{var q;if(((q=$e.meta)==null?void 0:q.group)===s.BlockletGroup.gateway)return;const De=$e.configs||[],re=f(te,$e);De.forEach(W=>{w(W,re)&&we.push({did:$e.meta.did,key:W.key,description:W.description})})}),we.filter($e=>!h($e))};e.getAppMissingConfigs=_;const R=(te={},we={})=>{const $e=[],De=te.configs||[],re=f(we,te);return De.forEach(q=>{w(q,re)&&$e.push({did:te.meta.did,key:q.key,description:q.description})}),$e};e.getComponentMissingConfigs=R;const k=te=>te.payment?(te.payment.price||[]).map($e=>$e.value||0).every($e=>$e===0):!0;e.isFreeBlocklet=k;const C=te=>!te.payment||!te.payment.componentPrice?!0:!te.payment.componentPrice.length;e.isFreeComponent=C;const E=te=>te&&(x(te,we=>{we.configs&&(we.configs=we.configs.filter($e=>!h($e)),we.configs.forEach($e=>{$e.secure&&($e.value=$e.value?"__encrypted__":"")})),(we.environments||[]).forEach($e=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes($e.key)&&($e.value="__encrypted__")}),(we.migratedFrom||[]).forEach($e=>{$e.appSk="__encrypted__"}),delete te.configObj,delete te.environmentObj},{sync:!0}),te);e.wipeSensitiveData=E;const v=te=>{if(!te)return!1;const we=te.environments.find($e=>$e.key==="BLOCKLET_DELETABLE");return we?we.value==="yes":!0};e.isDeletableBlocklet=v;const L=te=>{let we=!1;return D(te,$e=>{$e.meta.group!==s.BlockletGroup.gateway&&(we=!0)}),we};e.hasRunnableComponent=L;const ne=(te,we=!1)=>{if(!te)return"";const{meta:$e}=te;let De;if(!we&&te.environments){const re=te.environments.find(q=>q.key==="BLOCKLET_APP_NAME");re&&re.value&&(De=re.value)}return De||$e.title||$e.name};e.getAppName=ne,e.getDisplayName=ne;const F=(te,we=!1)=>{if(!te)return"";const{meta:$e}=te;let De;if(!we&&te.environments){const re=te.environments.find(q=>q.key==="BLOCKLET_APP_DESCRIPTION");re&&re.value&&(De=re.value)}return De||$e.description||$e.name};e.getAppDescription=F;function J(te){var De,re,q;const we=(q=(re=(De=te==null?void 0:te.site)==null?void 0:De.domainAliases)==null?void 0:re.sort((W,ce)=>{var ke,Ee,xe,Ue;return(ke=W.accessibility)!=null&&ke.accessible&&((Ee=ce.accessibility)!=null&&Ee.accessible)?+W.isProtected-+ce.isProtected:+((xe=ce.accessibility)==null?void 0:xe.accessible)-+((Ue=W.accessibility)==null?void 0:Ue.accessible)}))==null?void 0:q.map(W=>{var Ee;const ce=(Ee=W==null?void 0:W.domainStatus)!=null&&Ee.isHttps?"https://":"http://",ke=W==null?void 0:W.value;return`${ce}${ke}`}).filter(Boolean);return we==null?void 0:we[0]}e.getAppUrl=J;const se=te=>{te&&(D(te,we=>{we.status=(0,s.fromBlockletStatus)(we.status),we.source!==void 0&&(we.source=(0,s.fromBlockletSource)(we.source))}),te.settings&&(te.settings.children||[]).forEach(we=>{D(we,$e=>{$e.status=(0,s.fromBlockletStatus)($e.status),$e.source!==void 0&&($e.source=(0,s.fromBlockletSource)($e.source))})}))};e.fixBlockletStatus=se;const pe=te=>{if(!te)return null;const we=te.meta||te||{},{interfaces:$e=[]}=we;return Array.isArray($e)?$e.find(De=>De.type===s.BLOCKLET_INTERFACE_TYPE_WEB):null};e.findWebInterface=pe;const be=te=>{if(!te)return null;const we=pe(te),{ports:$e}=te;return!we||!$e?null:$e[we.port]};e.findWebInterfacePort=be;const Re=(te,we)=>{const $e=[we];we===c.AUTH&&$e.push(c.AUTH_SERVICE);const De=pe(te);return De?(De.services||[]).find(re=>$e.includes(re.name)):null};e.findServiceFromMeta=Re;const H=te=>{if(!te)return d.ALL;if((0,n.default)(te,"settings.whoCanAccess"))return te.settings.whoCanAccess;const we=Re(te.meta,c.AUTH);return(0,n.default)(we,"config.whoCanAccess")?we.config.whoCanAccess:d.ALL};e.getWhoCanAccess=H;const $=(te,we)=>{const $e=(te.configs||[]).find(re=>re.key===s.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if($e)return $e.value;if(we&&(0,n.default)(we,"settings.whoCanAccess")&&(0,n.default)(we,"settings.whoCanAccess")!==d.ALL)return(0,n.default)(we,"settings.whoCanAccess");const De=Re(te.meta,c.AUTH);return(0,n.default)(De,"config.whoCanAccess")?De.config.whoCanAccess:d.ALL};e.getComponentWhoCanAccess=$;const X=({request:te,baseUrl:we})=>{const $e=te.headers["x-blocklet-did"]||"",De=te.headers["x-blocklet-real-did"]||"",re=te.headers["x-path-prefix"]||"/",q=te.headers["x-group-path-prefix"]||"/";let W=we;return $e!==De&&re!==q&&(W=(0,i.joinURL)(W,"/").replace(re,q)),W};e.getConnectAppUrl=X;const Y=(te,we)=>{const $e=(we||"").includes(":")?":":/\./;return(te||"").replace(u,(we||"").replace(new RegExp($e,"g"),"-"))};e.replaceSlotToIp=Y;const oe=te=>{const we=Object.entries(s.CHAIN_INFO_CONFIG).reduce(($e,De)=>{const[re,[q,W]]=De;return $e[q]=(0,n.default)(te,re)||W,$e},{});return we.type==="ethereum"&&we.id==="none"&&(we.id="1"),we};e.getChainInfo=oe;const Te=te=>{const we=oe({});if(!te)return we;const $e=oe(te.configObj);if($e.host!=="none")return $e;let De;return M(te,re=>{if(De&&De.host!=="none")return;const q=oe(re.configObj);q.host!=="none"&&(De=q)}),De||we};e.getBlockletChainInfo=Te;const me=te=>!!(te!=null&&te.controller);e.isExternalBlocklet=me;const le=te=>te.whoCanAccess.startsWith(p)?te.whoCanAccess.substring(p.length).split(","):[];e.getRolesFromAuthConfig=le;const ve=te=>{const we=Array.isArray(te.migratedFrom)?te.migratedFrom.map($e=>$e.appDid):[];return(0,r.default)([te.appDid,te.appPid,...we].filter(Boolean))};e.getBlockletAppIdList=ve;const _e=te=>{const we=[];return te&&D(te,$e=>{var re;(((re=$e.meta)==null?void 0:re.interfaces)||[]).filter(q=>q.type===s.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(q=>{const W=q.port||{};we.push({name:q.name,protocol:q.protocol,port:Number(W.external),upstreamPort:Number(($e.ports||{})[W.internal])})})}),we};e.getBlockletServices=_e;const Se=te=>[s.BlockletStatus.downloading,s.BlockletStatus.waiting,s.BlockletStatus.starting,s.BlockletStatus.installing,s.BlockletStatus.stopping,s.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(te);e.isInProgress=Se;const ze=te=>[s.BlockletStatus.added,s.BlockletStatus.waiting,s.BlockletStatus.downloading,s.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(te);e.isBeforeInstalled=ze;const Je=te=>[s.BlockletStatus.running,"running"].includes(te);e.isRunning=Je;const ge=te=>[s.BlockletStatus.running,s.BlockletStatus.waiting,s.BlockletStatus.downloading,"running","waiting","downloading"].includes(te);e.isAccessible=ge;const Ie=(te,{type:we,did:$e}={type:"",did:""})=>{var De,re,q;return te?!(0,l.hasStartEngine)(te.meta)&&((q=(re=(De=te.meta)==null?void 0:De.resource)==null?void 0:re.bundles)==null?void 0:q.length)>0&&(te.meta.resource.bundles||[]).some(W=>W.type===we&&W.did===$e):!1};e.hasResourceType=Ie,e.default={isFreeBlocklet:k,isFreeComponent:C,forEachBlocklet:x,forEachBlockletSync:D,forEachChild:V,forEachChildSync:M,forEachComponentV2:O,forEachComponentV2Sync:P,isDeletableBlocklet:v,getSharedConfigObj:f,getAppMissingConfigs:_,getComponentMissingConfigs:R,isEnvShareableToClient:N,isEnvShareable:T,wipeSensitiveData:E,hasRunnableComponent:L,getAppName:ne,getAppDescription:F,getAppUrl:J,getDisplayName:ne,fixBlockletStatus:se,findWebInterface:pe,findWebInterfacePort:be,findServiceFromMeta:Re,getWhoCanAccess:H,getComponentWhoCanAccess:$,replaceSlotToIp:Y,getComponentId:g,getComponentName:y,getComponentBundleId:b,findComponent:j,findComponentById:G,findComponentV2:ie,findComponentByIdV2:ue,filterComponentsV2:K,getParentComponentName:A,getConnectAppUrl:X,getChainInfo:oe,getBlockletChainInfo:Te,isExternalBlocklet:me,isPreferenceKey:h,getRolesFromAuthConfig:le,getBlockletServices:_e,isInProgress:Se,isBeforeInstalled:ze,isRunning:Je,isAccessible:ge,isGatewayBlocklet:l.isGatewayBlocklet,isPackBlocklet:l.isPackBlocklet,hasStartEngine:l.hasStartEngine,hasResourceType:Ie}})(Ss);const Hle=(e,t=!1)=>{const n=e.routing.adminPath;return t?encodeURIComponent(Ln(window.location.origin,n)):Ln(window.location.origin,n)},B_t=(e,t,n)=>{const r=Hle(t),i=Ln(n,`/api/blocklets/${e.did}/blocklet.json`),o=new URL(Ln(r,"/launch-blocklet/agreement"));return o.searchParams.set("blocklet_meta_url",i),o.searchParams.set("from",window.location.href),o.href},dCt=async(e,{getIP:t}={})=>{if(!e||!e.length)return[];if(!t||!e.some(r=>r.value.includes(rn.SLOT_FOR_IP_DNS_SITE)))return e;const n=await t();return n?e.map(r=>{try{return r.value=Ss.replaceSlotToIp(r.value,n),r}catch{return r}}).filter(Boolean):e},pCt=e=>{const t={didSpace:null};return Ss.forEachBlockletSync(e,n=>{var r,i;t.didSpace===ti.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||t.didSpace===ti.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(i=(r=n==null?void 0:n.meta)==null?void 0:r.capabilities)!=null&&i.didSpace&&(t.didSpace=n.meta.capabilities.didSpace)}),t},_W=async(e,{fixRuntime:t=!0,oldBlocklet:n,getIP:r}={})=>{if(e.site||(e.site={domainAliases:[],rules:[]}),e.site.rules.forEach(i=>{i.from.pathPrefix=G9(i.from.pathPrefix||"/")}),e.site.rules=cie(e.site.rules,i=>i.from.pathPrefix),t===!0)e.site.domainAliases=await dCt(e.site.domainAliases,{getIP:r}),e.appRuntimeInfo&&(e.appRuntimeInfo.startAt=new Date-e.appRuntimeInfo.uptime),Ss.forEachBlockletSync(e,i=>{i.runtimeInfo&&(i.runtimeInfo.startAt=new Date-i.runtimeInfo.uptime)});else if(t==="merge-old"&&n){e.site.domainAliases=n.site.domainAliases,e.appRuntimeInfo=n.appRuntimeInfo;const i={};Ss.forEachBlockletSync(n,(o,{id:a})=>{i[a]=o}),Ss.forEachBlockletSync(e,(o,{id:a})=>{const s=i[a];s&&(o.runtimeInfo=s.runtimeInfo,o.diskInfo=s.diskInfo,o.engine=s.engine)})}else e.site.domainAliases=[];e.capabilities=pCt(e)},EW="arcblock",N_t=(e,t=!1)=>{let n;return t?(n=(e.configs||[]).find(r=>r.key==="BLOCKLET_APP_CHAIN_TYPE"),n&&n.value||(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.key)),n&&n.value)?n.value:EW):(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.name)),n&&n.default?n.default:EW)},$_t=e=>!Ok(e==null?void 0:e.controller);let PC=null;const hCt=async()=>{const e=window.env.apiPrefix||"/",t=Ln(e,"/api/dns-resolve?accessible=1");try{return(await Ir.get(t)).data.address}catch{return null}},RW=()=>(PC||(PC=hCt()),PC),Wle=U.createContext({}),{Provider:mCt,Consumer:F_t}=Wle,kW=(e,t,n)=>n?e.map(r=>{const i={...r},o=t.find(a=>a.meta.did===r.meta.did);return o&&n.forEach(a=>{i[a]=o[a]}),i}):t;function gCt({children:e}){const t=Sl(),n=i5(),[r,i]=U.useState(null),[o,a]=U.useState(!1),[s,l]=U.useState([]),[c,u]=U.useState([]),[d,p]=U.useState(!1),g=(P,V)=>{Ss.isExternalBlocklet(P)?u(V):l(V)},y=4,b=async({silent:P=!0,retries:V=y,updates:M,useCache:j=!0}={})=>{P||a(!0);try{i(null);const{blocklets:G}=await n.getBlocklets({input:{useCache:j}});for(const K of G)await _W(K,{getIP:RW});const ie=G.filter(K=>!Ss.isExternalBlocklet(K)),ue=G.filter(Ss.isExternalBlocklet);l(K=>kW(K,ie,M)),u(K=>kW(K,ue,M)),a(!1),p(!0)}catch(G){V>0?setTimeout(()=>b({silent:P,retries:V-1,useCache:j}),1e3):(a(!1),i(G))}},A=async P=>{try{const{blocklet:V}=await t.api.getBlocklet({input:{did:P.meta.did,attachRuntimeInfo:!0}});await _W(V,{getIP:RW}),g(V,M=>M.some(j=>j.meta.did===V.meta.did)?M.map(j=>j.meta.did===V.meta.did?V:j):[...M,V])}catch(V){i(V)}},x=P=>{t.refresh(),A(P)};U.useEffect(()=>{b({silent:!1})},[]);const D=P=>{const V={};Ss.forEachBlockletSync(P,(M,{id:j})=>{V[j]=ti.fromBlockletStatus(M.status)}),g(P,M=>M.map(j=>(j.meta.did===P.meta.did&&Ss.forEachBlockletSync(j,(G,{id:ie})=>{V[ie]&&(G.status=V[ie])}),j)))};Ki(ti.BlockletEvents.added,P=>{P.status=ti.fromBlockletStatus(P.status),g(P,V=>[...V,P])}),Ki(ti.BlockletEvents.removed,P=>{t.refresh(),g(P,V=>V.filter(M=>M.meta.did!==P.meta.did))}),Ki(ti.BlockletEvents.statusChange,D),Ki(ti.BlockletEvents.installed,x),Ki(ti.BlockletEvents.upgraded,x),Ki(ti.BlockletEvents.updated,A),Ki(ti.BlockletEvents.startFailed,A),Ki(ti.BlockletEvents.reloaded,A);const O={loading:o,error:r,data:s,externalData:c,refresh:b,initialized:d,api:n};return I.jsx(mCt,{value:{blocklets:O},children:e})}function U_t(){const{blocklets:e}=U.useContext(Wle);return e}const yCt=({user:e,launchType:t,nftId:n})=>{var r;if(!e)return!1;if(t==="serverless"){if(!n)throw new Error("nftId is required");return((r=e==null?void 0:e.controller)==null?void 0:r.nftId)===n}return(e.permissions||[]).includes("mutate_blocklets")},j_t=e=>{var t,n;return e.isGetBlocklet&&((n=(t=e.runtimeBlocklet)==null?void 0:t.controller)==null?void 0:n.consumedAt)},q_t=async e=>{const t=bdt({blocklet:e});let n="";return n=t.find(r=>{try{const{hostname:i}=new URL(r);return koe.isSlpDomain(i)}catch(i){return console.error(i),!1}}),n||(n=await Sdt(t)),n},Gle=U.createContext({}),{Provider:vCt,Consumer:V_t}=Gle;function bCt({children:e}){const{session:t}=y0(),{t:n}=fo(),{api:r,info:i}=Sl(),[o]=BJ(),a=i5(),s=o.get("launchType"),l=o.get("fromLauncher"),c=o.get("blocklet_meta_url")||"",u=o.get("nftId")||"",d=o.get("launcherSessionId")||"",p=o.get("launcherUrl")||"",g=new URL(c).origin,[y,b]=U.useState({meta:null,appDid:o.get("appDid")||null,sessionId:o.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null}),A=(ue,K)=>b(N=>({...N,appDid:ue,sessionId:K})),x=yCt({user:t.user,launchType:s,nftId:u}),[D,O]=U.useState(null),[P,V]=U.useState(!0),M=U.useMemo(()=>i?Hle(i):"",[i]),j=async ue=>{if(!ue)throw new Error("appDid should not be empty");const{blocklet:K}=await r.getBlocklet({input:{did:ue,attachConfig:!1}});if(!K)return null;const N=ti.BlockletStatus[K.status],T=!!u,f=N<ti.BlockletStatus.installed,h=N===ti.BlockletStatus.installed,w=N===ti.BlockletStatus.running;return b(_=>({..._,isInstalled:h,isRunning:w,isExternal:T,isInstalling:f})),{isInstalled:h,isRunning:w,isExternal:T,isInstalling:f}},G=async()=>{V(!0);try{if(!c)throw new Error(n("common.invalidParam"));const[{meta:ue,isFree:K},{launcherSession:N,error:T}]=await Promise.all([r.getBlockletMetaFromUrl({input:{url:c,checkPrice:!0}}),d?r.getLauncherSession({input:{launcherSessionId:d,launcherUrl:p}}):Promise.resolve({})]);if(d&&!N)throw new Error(`Launch session invalid: ${T}`);if(!ue)throw new Error(n("LaunchBlockletBlocklet.error.loadMetaFailed"));let f={};x&&y.appDid&&(f=await j(y.appDid)),b(h=>({...h,...f,meta:ue,isFree:K,launcherSession:N}))}catch(ue){console.error(ue),O(ue.message)}finally{V(!1)}};U.useEffect(()=>{var ue,K,N;((ue=t==null?void 0:t.user)==null?void 0:ue.role)===rn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((N=(K=t==null?void 0:t.user)==null?void 0:K.controller)==null?void 0:N.nftId)!==u&&t.logout(),G()},[]),U.useEffect(()=>{P||!y.meta||(x?y.appDid&&j(y.appDid).catch(ue=>{ci.error(ue.message)}):(b(ue=>({...ue,isInstalled:!1,isRunning:!1,isExternal:!1})),O(null)))},[x]);const ie={meta:y.meta,isFree:y.isFree,appDid:y.appDid,sessionId:y.sessionId,isInstalling:y.isInstalling,isInstalled:y.isInstalled,isExternal:y.isExternal,isRunning:y.isRunning,serverUrl:M,storeUrl:g,blockletMetaUrl:c,fromLauncher:l,loading:P,error:D,api:a,getBlocklet:j,setAppDid:A,launcherUrl:p,launcherSession:y.launcherSession,launcherSessionId:d};return I.jsx(vCt,{value:ie,children:e})}function z_t(){return U.useContext(Gle)}function Kle(){return new URLSearchParams(yi().search)}const Jle=U.createContext(),{Provider:wCt,Consumer:H_t}=Jle;function Yle({children:e}){const n=Kle().get("blocklet_meta_url"),r=S8t(async()=>{const{data:o}=await W9.get(n);return o});if(r.loading)return I.jsx(Qo,{children:I.jsx(ra,{})});const i={meta:r.value,error:r.error};return I.jsx(wCt,{value:i,children:e})}Yle.propTypes={children:Z.any.isRequired};function W_t(){return U.useContext(Jle)}const TCt=U.lazy(()=>gn(()=>import("./index-9R6mPPbN.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),xCt=U.lazy(()=>gn(()=>import("./index-0RUAEm49.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2,27,28,29,30]),import.meta.url)),SCt=U.lazy(()=>gn(()=>import("./index-ByF3apMm.js"),__vite__mapDeps([31,32,33,34,35,36,37,6,38,39,40,41,12,9,11,25,18,17]),import.meta.url)),CCt=U.lazy(()=>gn(()=>import("./index-ZQu91rXz.js"),__vite__mapDeps([42,6,43,44,17,16,45,9,46,47,29,12,11,38,48,39,49,3,18,22,23,50,51,52]),import.meta.url)),ACt=U.lazy(()=>gn(()=>import("./index-CucnV9EX.js"),__vite__mapDeps([53,54,10,51,55,56,45,57,12,9,11,7,8,13,14,15,16,17,18,58,49,3,2,59,6,60,61,29,19,20,62,63,64,65,4,66]),import.meta.url)),_Ct=U.lazy(()=>gn(()=>import("./index-DPx9NPlp.js"),__vite__mapDeps([67,68,22,23,9,69]),import.meta.url)),ECt=U.lazy(()=>gn(()=>import("./index-BbW2IRRR.js"),__vite__mapDeps([70,54,10,71,72,73,17,6,9,11,74,13,75,76,29,77,78,79,16,12,7,8,14,15,18,80,81,82,45,20,83,3,2,84,85,30,22,23,86,87,88,24,25,44,46,89,1,49,64]),import.meta.url)),RCt=U.lazy(()=>gn(()=>import("./detail-CHKmnQLc.js").then(e=>e.d),__vite__mapDeps([90,54,10,19,20,21,6,18,22,23,28,83,40,41,52]),import.meta.url)),kCt=U.lazy(()=>gn(()=>import("./index-BBnT5XB9.js"),[],import.meta.url)),DCt=U.lazy(()=>gn(()=>import("./index-DsUZ7uiP.js"),__vite__mapDeps([91,1,74,13]),import.meta.url)),LCt=U.lazy(()=>gn(()=>import("./index-DOsg2sHH.js"),__vite__mapDeps([92,93,94,95,62,96]),import.meta.url)),OCt=U.lazy(()=>gn(()=>import("./index-DfNh08gP.js"),__vite__mapDeps([97,62,78,48,96,27]),import.meta.url)),ICt=U.lazy(()=>gn(()=>import("./index-DrWhB0MJ.js"),__vite__mapDeps([98,96]),import.meta.url)),PCt=U.lazy(()=>gn(()=>import("./index-DmPgcoiv.js"),__vite__mapDeps([99,32,33,34,35,36,37,100,72,73,41,25,6,59]),import.meta.url)),MCt=U.lazy(()=>gn(()=>import("./index-DV2quTIn.js"),__vite__mapDeps([101,94]),import.meta.url)),BCt=U.lazy(()=>gn(()=>import("./index-zFXZLqso.js"),__vite__mapDeps([102,93,94,95,62,96]),import.meta.url)),NCt=U.lazy(()=>gn(()=>import("./index-DHYJxTcV.js").then(e=>e.a2),__vite__mapDeps([103,104]),import.meta.url)),$Ct=U.lazy(()=>gn(()=>import("./index-BnFWpIPQ.js"),__vite__mapDeps([105,54,10,106,107,108,63,9,109,12,11,46,7,8,13,14,15,16,17,18,28,110,111,4,6,89,23]),import.meta.url));function Zle(){const e=Sl(),{session:t}=y0(),{wallet:n}=Vh(),r=t.user&&t.user.did;return U.useEffect(()=>{const i=f5();return r?i.connect():i.isConnected()&&i.disconnect(),()=>{i.isConnected()&&i.disconnect()}},[r]),U.useEffect(()=>{if(n)return()=>{};const i=()=>{document.visibilityState==="visible"&&t.refresh()};return document.addEventListener("visibilitychange",i),()=>{document.removeEventListener("visibilitychange",i)}},[]),{node:e,session:t}}function FCt(){var a;const{t:e}=fo(),{node:t,session:n}=Zle(),r=yi();U.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${r.pathname}${r.search}`)},[r]),U.useEffect(()=>{var s;((s=n==null?void 0:n.user)==null?void 0:s.role)===rn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&n.logout()},[(a=n==null?void 0:n.user)==null?void 0:a.role]);const i=I.jsx(ra,{});if(t.loading||n.loading)return I.jsx(Qo,{children:i});if(!t.info.initialized)return b8e.getServerAuthMethod(t.info)==="nft"?I.jsx(YL,{action:"verify-owner"}):I.jsx(Qo,{children:I.jsx(m6t,{})});if(t.info.upgradeSessionId)return I.jsx(Qo,{children:I.jsx(Nse,{})});if(!n.user)return I.jsx(XL,{loadingEle:i});const o=I.jsx(Qo,{children:I.jsx(ra,{})});return I.jsx(Q8t,{children:I.jsxs(gCt,{children:[I.jsx(C6t,{}),I.jsx(OTt,{}),I.jsx(nCt,{}),I.jsx(U.Suspense,{fallback:o,children:I.jsxs(A4,{children:[I.jsx(or,{path:"/dashboard",element:I.jsx(Ko,{fullWidth:!0,title:"Dashboard",children:I.jsx(TCt,{})})}),I.jsx(or,{path:"/blocklets",element:I.jsx(Ko,{fullWidth:!0,title:e("common.blocklets"),children:I.jsx(xCt,{})})}),I.jsx(or,{path:"/blocklets/:did/:tab",element:I.jsx(Ko,{fullWidth:!0,title:"Blocklets",children:I.jsx(RCt,{})})}),I.jsx(or,{path:"/settings/:tab",element:I.jsx(Ko,{fullWidth:!0,title:e("common.setting"),children:I.jsx(ACt,{})})}),I.jsx(or,{path:"/eula",element:I.jsx(Ko,{fullWidth:!0,title:e("setup.steps.eula"),children:I.jsx(kCt,{})})}),I.jsx(or,{path:"/store",element:I.jsx(Ko,{fullWidth:!0,title:e("common.store"),children:I.jsx(CCt,{})})}),I.jsx(or,{path:"/console",element:I.jsx(Ko,{title:`GraphQL ${e("common.console")}`,scrollable:!1,fullWidth:!0,children:I.jsx(NCt,{})})}),I.jsx(or,{path:"/notifications",element:I.jsx(Ko,{children:I.jsx(DCt,{})})}),I.jsx(or,{path:"/team/:tab",element:I.jsx(Ko,{fullWidth:!0,title:e("common.team"),children:I.jsx(ECt,{})})}),I.jsx(or,{path:"/logs/:name",element:I.jsx(Ko,{scrollable:!1,fullWidth:!0,title:e("common.logs"),children:I.jsx(_Ct,{})})}),I.jsx(or,{path:"/analytics/:tab",element:I.jsx(Ko,{fullWidth:!0,title:e("common.analytics"),children:I.jsx($Ct,{})})}),I.jsx(or,{path:"/",element:I.jsx(Gs,{to:"/dashboard",replace:!0})}),I.jsx(or,{path:"/team",element:I.jsx(Gs,{to:"/team/members",replace:!0})}),I.jsx(or,{path:"/analytics",element:I.jsx(Gs,{to:"/analytics/traffic",replace:!0})}),I.jsx(or,{path:"/logs",element:I.jsx(Gs,{to:"/logs/abtnode",replace:!0})}),I.jsx(or,{path:"/router",element:I.jsx(Gs,{to:"/router/rules",replace:!0})}),I.jsx(or,{path:"/settings",element:I.jsx(Gs,{to:"/settings/basic",replace:!0})}),I.jsx(or,{path:"/marketplace",element:I.jsx(Gs,{to:"/store",replace:!0})}),I.jsx(or,{path:"/marketplace/:did",element:I.jsx(Gs,{to:"/store/:did",replace:!0})}),I.jsx(or,{path:"*",element:I.jsx(MCt,{})})]})})]})})}function Jc({children:e}){const{node:t,session:n}=Zle();return t.loading||!n.initialized&&n.loading?I.jsx(Qo,{children:I.jsx(ra,{})}):t.info.upgradeSessionId?I.jsx(Qo,{children:I.jsx(Nse,{})}):e}function UCt(){const{changeLocale:e}=fo(),t=Kle();U.useEffect(()=>{const r=t.get("locale");r&&["zh","en"].includes(r)&&e(r)},[]);const n=I.jsx(Qo,{children:I.jsx(ra,{})});return I.jsx(U.Suspense,{fallback:n,children:I.jsxs(A4,{children:[I.jsx(or,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:I.jsx(Jc,{children:I.jsx(LCt,{})})}),I.jsx(or,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:I.jsx(Jc,{children:I.jsx(OCt,{})})}),I.jsx(or,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:I.jsx(Jc,{children:I.jsx(ICt,{})})}),I.jsx(or,{path:"/accept-server",element:I.jsx(Jc,{children:I.jsx(YL,{action:"accept-server"})})}),I.jsx(or,{path:"/launch-blocklet/*",element:I.jsx(Jc,{children:I.jsx(bCt,{children:I.jsx(PCt,{})})})}),I.jsx(or,{path:"/blocklets/restore/*",element:I.jsx(Jc,{children:I.jsx(Yle,{children:I.jsx(SCt,{})})})}),I.jsx(or,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:I.jsx(Jc,{children:I.jsx(BCt,{})})}),I.jsx(or,{path:"/*",element:I.jsx(FCt,{})})]})})}function jCt(){const e=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return I.jsxs(I.Fragment,{children:[I.jsx($7,{}),I.jsx(OJ,{history:X8e,basename:e,children:I.jsx(VTt,{children:I.jsx(UCt,{})})})]})}const qCt=WK(document.getElementById("root"));qCt.render(I.jsx(jCt,{}));const DW=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";wge(`${DW}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:DW},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});export{Hp as $,ci as A,ks as B,ra as C,QD as D,BJ as E,rn as F,gx as G,Ps as H,SO as I,Tat as J,Yct as K,DX as L,Ss as M,cl as N,ft as O,Z as P,Ok as Q,ND as R,B1 as S,Lle as T,y5 as U,Qo as V,oO as W,Ac as X,Ave as Y,OD as Z,Qst as _,Ki as a,wk as a$,rL as a0,Ln as a1,to as a2,_6 as a3,kTt as a4,S_t as a5,s9e as a6,bk as a7,m9e as a8,IX as a9,dle as aA,Tdt as aB,zle as aC,R9e as aD,dCt as aE,G9 as aF,cie as aG,RW as aH,XAt as aI,joe as aJ,fa as aK,co as aL,X8e as aM,vdt as aN,sk as aO,KAt as aP,Lke as aQ,l_t as aR,S8t as aS,W9 as aT,YAt as aU,g_t as aV,ydt as aW,AX as aX,yX as aY,tLe as aZ,ZAt as a_,Hle as aa,W_t as ab,b8e as ac,iO as ad,nL as ae,q_t as af,DAt as ag,j_t as ah,f5 as ai,Kle as aj,o_t as ak,GO as al,KL as am,x7 as an,A4 as ao,or as ap,Gs as aq,cu as ar,yl as as,$V as at,B_t as au,Ir as av,y0 as aw,Io as ax,c_t as ay,T6 as az,ti as b,NA as b$,NRe as b0,JRe as b1,wdt as b2,m_t as b3,xle as b4,xCe as b5,hct as b6,Iw as b7,Pw as b8,jX as b9,sie as bA,zg as bB,PXe as bC,Wre as bD,JD as bE,sle as bF,HAt as bG,L_t as bH,FAt as bI,s_t as bJ,Zte as bK,ua as bL,kt as bM,mc as bN,ye as bO,Ybe as bP,Bt as bQ,un as bR,an as bS,hn as bT,fl as bU,Pt as bV,sn as bW,fu as bX,d7e as bY,ht as bZ,Gn as b_,en as ba,Hr as bb,Wu as bc,uh as bd,a_t as be,B6 as bf,bJ as bg,Yo as bh,qX as bi,G1 as bj,T_t as bk,Cie as bl,N_t as bm,iQ as bn,gn as bo,zAt as bp,mRe as bq,IJ as br,x_t as bs,GD as bt,Uh as bu,Og as bv,pre as bw,hre as bx,KD as by,r9 as bz,i5 as c,fw as c$,B7 as c0,$r as c1,M7 as c2,sAt as c3,MAt as c4,bdt as c5,koe as c6,ile as c7,p_t as c8,D6 as c9,_f as cA,yi as cB,CD as cC,pi as cD,VAt as cE,UAt as cF,jAt as cG,rle as cH,FTt as cI,tk as cJ,gi as cK,oAt as cL,wm as cM,Np as cN,Zut as cO,mt as cP,Jne as cQ,zCt as cR,cAt as cS,_ct as cT,V6 as cU,I8t as cV,pbe as cW,b_t as cX,Ya as cY,P7 as cZ,dc as c_,_W as ca,SRe as cb,ARe as cc,Adt as cd,T9e as ce,XEe as cf,Ule as cg,eCt as ch,NOe as ci,Ct as cj,GLe as ck,Or as cl,dh as cm,nu as cn,mi as co,Vh as cp,_g as cq,Ku as cr,S6t as cs,d5 as ct,z_t as cu,hGe as cv,yCt as cw,f_t as cx,Sdt as cy,i_t as cz,U_t as d,YCt as d$,$a as d0,Ai as d1,Rt as d2,hX as d3,FEe as d4,Ba as d5,OAt as d6,IAt as d7,PD as d8,Uke as d9,yu as dA,L9 as dB,SZe as dC,Vie as dD,JAt as dE,jEe as dF,s3 as dG,K4e as dH,cc as dI,_o as dJ,zY as dK,bwe as dL,Rw as dM,rs as dN,zh as dO,Lw as dP,Hh as dQ,N7 as dR,AY as dS,L4e as dT,I4e as dU,jve as dV,tY as dW,mg as dX,ZCt as dY,QCt as dZ,XCt as d_,M1 as da,c3 as db,MX as dc,q9e as dd,J$ as de,K$ as df,N9e as dg,yAt as dh,dn as di,GCt as dj,WCt as dk,HCt as dl,KCt as dm,Rh as dn,kD as dp,L6 as dq,ad as dr,Hg as ds,cJe as dt,CZ as du,Jn as dv,aAt as dw,Wp as dx,AZ as dy,Qt as dz,_8t as e,Y4 as e$,Xbe as e0,ug as e1,Dh as e2,RN as e3,JCt as e4,$f as e5,E3e as e6,S7 as e7,XY as e8,rAt as e9,OEe as eA,wv as eB,wRe as eC,hx as eD,g7e as eE,xm as eF,Oke as eG,k9e as eH,f3 as eI,nLe as eJ,em as eK,SLe as eL,Wl as eM,Xb as eN,Zb as eO,NLe as eP,LLe as eQ,bAt as eR,Yre as eS,Ls as eT,T_ as eU,F7 as eV,xY as eW,RX as eX,LGe as eY,Lh as eZ,qY as e_,eAt as ea,l4e as eb,fc as ec,BY as ed,I3e as ee,c4e as ef,nAt as eg,BA as eh,o4e as ei,s4e as ej,vl as ek,u4e as el,Wbe as em,lw as en,Mwe as eo,tAt as ep,Dwe as eq,jc as er,SCe as es,pAt as et,eAe as eu,tAe as ev,vAe as ew,hAt as ex,tr as ey,Tp as ez,Ec as f,ay as f$,hg as f0,_7 as f1,p3 as f2,tF as f3,jf as f4,fi as f5,Bot as f6,$o as f7,a0 as f8,tn as f9,t_t as fA,PAt as fB,r_t as fC,Aie as fD,hoe as fE,t6t as fF,p9 as fG,tse as fH,Uoe as fI,vw as fJ,T2t as fK,iie as fL,Q4e as fM,QY as fN,U7 as fO,Kn as fP,Ew as fQ,n9e as fR,Y7 as fS,d8e as fT,$O as fU,uAt as fV,qO as fW,jO as fX,I6 as fY,EAt as fZ,RO as f_,Eg as fa,Hf as fb,UOe as fc,WK as fd,Kh as fe,Xn as ff,bee as fg,gee as fh,Sw as fi,Xct as fj,kY as fk,cw as fl,l3 as fm,i7 as fn,tQ as fo,VQ as fp,v6t as fq,qAt as fr,nI as fs,rQ as ft,VCt as fu,pc as fv,CYe as fw,_c as fx,QAt as fy,ud as fz,Kt as g,Sh as g$,IO as g0,UWe as g1,Gh as g2,Tle as g3,A6 as g4,lot as g5,bot as g6,qte as g7,Sk as g8,Zrt as g9,Hct as gA,ID as gB,$_t as gC,v_t as gD,GAt as gE,e_t as gF,n_t as gG,R6 as gH,Tre as gI,xre as gJ,wre as gK,Pre as gL,WY as gM,e3 as gN,cAe as gO,dbe as gP,f5t as gQ,y5t as gR,w5t as gS,C5t as gT,E5t as gU,lTt as gV,uTt as gW,Vse as gX,zse as gY,MVe as gZ,Ktt as g_,wie as ga,Kf as gb,E6 as gc,L1 as gd,kw as ge,mx as gf,Dw as gg,YAe as gh,bX as gi,hCe as gj,ZZ as gk,cve as gl,WAt as gm,d_t as gn,Lxt as go,Sg as gp,lCe as gq,Cw as gr,dre as gs,H7 as gt,mSe as gu,W7 as gv,yct as gw,K7 as gx,$At as gy,oCt as gz,rO as h,q1 as h0,jVe as h1,BAt as h2,TAt as h3,y_t as h4,sV as h5,Zm as h6,GOe as h7,aQ as h8,d3 as h9,RAt as hA,Act as hB,O_t as hC,wX as hD,mot as hE,e9 as hF,LOe as hG,E_t as hH,__t as hI,nQ as hJ,Ite as hK,P_t as hL,mX as hM,wAt as ha,N1 as hb,iAt as hc,wwe as hd,dAt as he,mCe as hf,yRe as hg,bDe as hh,hDe as hi,mAt as hj,wDe as hk,gAt as hl,z9e as hm,vAt as hn,D5t as ho,KA as hp,YA as hq,$se as hr,X4e as hs,LD as ht,hN as hu,u_t as hv,Ibt as hw,w_t as hx,h_t as hy,mH as hz,ch as i,I as j,Tf as k,NAt as l,Xt as m,Ka as n,q6 as o,jE as p,fo as q,U as r,er as s,F8t as t,Sl as u,R8t as v,ake as w,C9 as x,tL as y,xc as z};
|
|
2521
|
+
`;Ri.homedir=function(){return"/"};(function(e){var t=mt&&mt.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.hasMountPoint=e.hasStartEngine=e.isPackBlocklet=e.isGatewayBlocklet=e.getBlockletEngine=void 0;const n=t(Ri),r=ti,i=c=>{if(c===void 0)throw new Error("blocklet meta param is required");const{engine:u}=c;if(!u)return{interpreter:"node",source:""};if(!Array.isArray(u))return u;const d=n.default.platform(),p=u.find(g=>g.platform===d);if(!p)throw new Error(`can not find a proper engine interpreter on ${d}`);return p};e.getBlockletEngine=i;const o=c=>(c==null?void 0:c.group)===r.BlockletGroup.gateway;e.isGatewayBlocklet=o;const a=c=>(c==null?void 0:c.group)===r.BlockletGroup.pack;e.isPackBlocklet=a;const s=c=>!!(c!=null&&c.main)||(0,e.getBlockletEngine)(c||{}).interpreter==="blocklet";e.hasStartEngine=s;const l=c=>((0,e.hasStartEngine)(c)||((c==null?void 0:c.interfaces)||[]).find(u=>u.type===r.BLOCKLET_INTERFACE_TYPE_WEB))&&(0,e.isGatewayBlocklet)(c)===!1;e.hasMountPoint=l})(zle);(function(e){var t=mt&&mt.__importDefault||function(te){return te&&te.__esModule?te:{default:te}};Object.defineProperty(e,"__esModule",{value:!0}),e.isPackBlocklet=e.isGatewayBlocklet=e.isAccessible=e.isRunning=e.isBeforeInstalled=e.isInProgress=e.getBlockletServices=e.getBlockletAppIdList=e.getRolesFromAuthConfig=e.isPreferenceKey=e.isExternalBlocklet=e.getBlockletChainInfo=e.getChainInfo=e.getConnectAppUrl=e.getParentComponentName=e.filterComponentsV2=e.findComponentByIdV2=e.findComponentV2=e.findComponentById=e.findComponent=e.getComponentBundleId=e.getComponentName=e.getComponentId=e.replaceSlotToIp=e.getComponentWhoCanAccess=e.getWhoCanAccess=e.findServiceFromMeta=e.findWebInterfacePort=e.findWebInterface=e.fixBlockletStatus=e.getAppDescription=e.getDisplayName=e.getAppName=e.hasRunnableComponent=e.wipeSensitiveData=e.isEnvShareable=e.isEnvShareableToClient=e.getComponentMissingConfigs=e.getAppMissingConfigs=e.getSharedConfigObj=e.isDeletableBlocklet=e.forEachComponentV2Sync=e.forEachComponentV2=e.forEachChildSync=e.forEachChild=e.forEachBlockletSync=e.forEachBlocklet=e.isFreeComponent=e.isFreeBlocklet=e.getAppUrl=void 0,e.hasResourceType=e.hasStartEngine=void 0;const n=t(vw),r=t(Vle),i=oCt,o=t(fCt),a=t(rn),s=ti,l=zle;Object.defineProperty(e,"hasStartEngine",{enumerable:!0,get:function(){return l.hasStartEngine}}),Object.defineProperty(e,"isGatewayBlocklet",{enumerable:!0,get:function(){return l.isGatewayBlocklet}}),Object.defineProperty(e,"isPackBlocklet",{enumerable:!0,get:function(){return l.isPackBlocklet}});const{NODE_SERVICES:c,SLOT_FOR_IP_DNS_SITE:u,WHO_CAN_ACCESS:d,WHO_CAN_ACCESS_PREFIX_ROLES:p}=a.default,g=(te,we=[])=>`${we.map($e=>$e&&$e.meta?$e.meta.did:"").join("/")}${we.length?"/":""}${te&&te.meta?te.meta.did:""}`;e.getComponentId=g;const y=(te,we=[])=>`${we.map($e=>$e&&$e.meta?$e.meta.name:"").join("/")}${we.length?"/":""}${te&&te.meta?te.meta.name:""}`;e.getComponentName=y;const b=te=>`${te.meta.bundleName}@${te.meta.version}`;e.getComponentBundleId=b;const A=te=>{if(!te)return"";const we=te.split("/");return we.pop(),!we.length||(we[we.length-1].startsWith("@")&&we.pop(),!we.length)?"":we.join("/")};e.getParentComponentName=A;const x=(te,we,{parallel:$e=!1,concurrencyLimit:De=5,sync:re,params:q,_parent:W,_root:ce,_level:ke=0,_tasks:Ee,_ancestors:xe=[],_limit:Ue}={})=>{const je=ce||W||te,He=g(te,xe),lt=xe.concat(te);if(re){const Oe=we(te,{parent:W,root:je,level:ke,params:q,ancestors:xe,id:He});if(te.children)for(const Le of te.children)x(Le,we,{sync:re,params:Oe,_parent:te,_root:je,_level:ke+1,_ancestors:lt});return null}if(!$e)return new Promise(async(Oe,Le)=>{try{const Pe=await we(te,{parent:W,root:je,level:ke,ancestors:xe,params:q,id:He});if(te.children)for(const nt of te.children)await x(nt,we,{params:Pe,_parent:te,_root:je,_level:ke+1,_ancestors:lt});Oe(null)}catch(Pe){Le(Pe)}});const Ze=Ue||(0,o.default)(De),Ye=Ee||[];if(Ye.push(Ze(()=>we(te,{parent:W,root:je,level:ke,ancestors:xe,id:He}))),te.children)for(const Oe of te.children)x(Oe,we,{parallel:$e,_parent:te,_root:je,_level:ke+1,_tasks:Ye,_ancestors:lt,_limit:Ze});return Ee?null:Promise.all(Ye)};e.forEachBlocklet=x;const D=(te,we)=>x(te,we,{sync:!0});e.forEachBlockletSync=D;const O=(te,we,{parallel:$e=!1,concurrencyLimit:De=5,sync:re}={})=>{if(re){if(te.children)for(const ce of te.children)we(ce);return null}if(!$e)return new Promise(async(ce,ke)=>{try{if(te.children)for(const Ee of te.children)await we(Ee);ce(null)}catch(Ee){ke(Ee)}});const q=(0,o.default)(De),W=[];if(te.children)for(const ce of te.children)W.push(q(()=>we(ce)));return Promise.all(W)};e.forEachComponentV2=O;const P=(te,we)=>O(te,we,{sync:!0});e.forEachComponentV2Sync=P;const V=(te,we,$e)=>x(te,(De,re)=>re.level===0?{}:we(De,re),$e);e.forEachChild=V;const M=(te,we)=>V(te,we,{sync:!0});e.forEachChildSync=M;const j=(te,we,{_ancestors:$e=[],returnAncestors:De=!1}={})=>{if(!we)return null;if(we(te,{ancestors:$e}))return De?{component:te,ancestors:$e}:te;for(const re of te.children||[]){const q=$e.concat(te),W=j(re,we,{_ancestors:q,returnAncestors:De});if(W)return W}return null};e.findComponent=j;const G=(te,we,{returnAncestors:$e=!1}={})=>(Array.isArray(we)&&(we=we.join("/")),j(te,(De,{ancestors:re})=>{const q=g(De,re);return we===q},{returnAncestors:$e}));e.findComponentById=G;const ie=(te,we)=>{if(!we)return null;for(const $e of te.children||[])if(we($e,te))return $e;return null};e.findComponentV2=ie;const ue=(te,we)=>we?(Array.isArray(we)&&(we=we.join("/")),ie(te,($e,De)=>{if(we.includes("/")){const re=g($e,[De]);return we===re}return we===$e.meta.did})):null;e.findComponentByIdV2=ue;const K=(te,we)=>{if(!we)return[];const $e=[];for(const De of te.children||[])we(De,te)&&$e.push(De);return $e};e.filterComponentsV2=K;const N=te=>!!te&&!!(te.key||te.name)&&!te.secure&&te.shared!==!1&&!s.BLOCKLET_CONFIGURABLE_KEY[te.key||te.name];e.isEnvShareableToClient=N;const T=te=>!!te&&!!(te.key||te.name)&&!te.secure&&!!te.shared&&!s.BLOCKLET_CONFIGURABLE_KEY[te.key||te.name];e.isEnvShareable=T;const f=(te,we)=>{const $e={};return!te||!we||(Array.isArray(te.configs)&&te.configs.forEach(({key:De,value:re,secure:q})=>{if(!T({key:De,secure:q,shared:!0}))return;const W=(te.configObj||{})[De]||re,ce=(we.configs||[]).find(ke=>ke.key===De);(!ce||T(ce)||!ce.value&&!(we.configObj||{})[ce.key])&&($e[De]=W)}),(te.configs||[]).forEach(({key:De,value:re})=>{[s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(De)&&($e[s.CHAIN_PROP_MAP[De]]=re)})),$e};e.getSharedConfigObj=f;const h=te=>te.key.startsWith(s.BLOCKLET_PREFERENCE_PREFIX)===!0;e.isPreferenceKey=h;const w=(te,we)=>!!(te.required&&(!te.value&&!we[te.key]||Object.values(s.CHAIN_PROP_MAP).includes(te.key)&&Object.keys(we).includes(te.key)&&!we[te.key])),_=(te={})=>{const we=[];return P(te,$e=>{var q;if(((q=$e.meta)==null?void 0:q.group)===s.BlockletGroup.gateway)return;const De=$e.configs||[],re=f(te,$e);De.forEach(W=>{w(W,re)&&we.push({did:$e.meta.did,key:W.key,description:W.description})})}),we.filter($e=>!h($e))};e.getAppMissingConfigs=_;const R=(te={},we={})=>{const $e=[],De=te.configs||[],re=f(we,te);return De.forEach(q=>{w(q,re)&&$e.push({did:te.meta.did,key:q.key,description:q.description})}),$e};e.getComponentMissingConfigs=R;const k=te=>te.payment?(te.payment.price||[]).map($e=>$e.value||0).every($e=>$e===0):!0;e.isFreeBlocklet=k;const C=te=>!te.payment||!te.payment.componentPrice?!0:!te.payment.componentPrice.length;e.isFreeComponent=C;const E=te=>te&&(x(te,we=>{we.configs&&(we.configs=we.configs.filter($e=>!h($e)),we.configs.forEach($e=>{$e.secure&&($e.value=$e.value?"__encrypted__":"")})),(we.environments||[]).forEach($e=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes($e.key)&&($e.value="__encrypted__")}),(we.migratedFrom||[]).forEach($e=>{$e.appSk="__encrypted__"}),delete te.configObj,delete te.environmentObj},{sync:!0}),te);e.wipeSensitiveData=E;const v=te=>{if(!te)return!1;const we=te.environments.find($e=>$e.key==="BLOCKLET_DELETABLE");return we?we.value==="yes":!0};e.isDeletableBlocklet=v;const L=te=>{let we=!1;return D(te,$e=>{$e.meta.group!==s.BlockletGroup.gateway&&(we=!0)}),we};e.hasRunnableComponent=L;const ne=(te,we=!1)=>{if(!te)return"";const{meta:$e}=te;let De;if(!we&&te.environments){const re=te.environments.find(q=>q.key==="BLOCKLET_APP_NAME");re&&re.value&&(De=re.value)}return De||$e.title||$e.name};e.getAppName=ne,e.getDisplayName=ne;const F=(te,we=!1)=>{if(!te)return"";const{meta:$e}=te;let De;if(!we&&te.environments){const re=te.environments.find(q=>q.key==="BLOCKLET_APP_DESCRIPTION");re&&re.value&&(De=re.value)}return De||$e.description||$e.name};e.getAppDescription=F;function J(te){var De,re,q;const we=(q=(re=(De=te==null?void 0:te.site)==null?void 0:De.domainAliases)==null?void 0:re.sort((W,ce)=>{var ke,Ee,xe,Ue;return(ke=W.accessibility)!=null&&ke.accessible&&((Ee=ce.accessibility)!=null&&Ee.accessible)?+W.isProtected-+ce.isProtected:+((xe=ce.accessibility)==null?void 0:xe.accessible)-+((Ue=W.accessibility)==null?void 0:Ue.accessible)}))==null?void 0:q.map(W=>{var Ee;const ce=(Ee=W==null?void 0:W.domainStatus)!=null&&Ee.isHttps?"https://":"http://",ke=W==null?void 0:W.value;return`${ce}${ke}`}).filter(Boolean);return we==null?void 0:we[0]}e.getAppUrl=J;const se=te=>{te&&(D(te,we=>{we.status=(0,s.fromBlockletStatus)(we.status),we.source!==void 0&&(we.source=(0,s.fromBlockletSource)(we.source))}),te.settings&&(te.settings.children||[]).forEach(we=>{D(we,$e=>{$e.status=(0,s.fromBlockletStatus)($e.status),$e.source!==void 0&&($e.source=(0,s.fromBlockletSource)($e.source))})}))};e.fixBlockletStatus=se;const pe=te=>{if(!te)return null;const we=te.meta||te||{},{interfaces:$e=[]}=we;return Array.isArray($e)?$e.find(De=>De.type===s.BLOCKLET_INTERFACE_TYPE_WEB):null};e.findWebInterface=pe;const be=te=>{if(!te)return null;const we=pe(te),{ports:$e}=te;return!we||!$e?null:$e[we.port]};e.findWebInterfacePort=be;const Re=(te,we)=>{const $e=[we];we===c.AUTH&&$e.push(c.AUTH_SERVICE);const De=pe(te);return De?(De.services||[]).find(re=>$e.includes(re.name)):null};e.findServiceFromMeta=Re;const H=te=>{if(!te)return d.ALL;if((0,n.default)(te,"settings.whoCanAccess"))return te.settings.whoCanAccess;const we=Re(te.meta,c.AUTH);return(0,n.default)(we,"config.whoCanAccess")?we.config.whoCanAccess:d.ALL};e.getWhoCanAccess=H;const $=(te,we)=>{const $e=(te.configs||[]).find(re=>re.key===s.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if($e)return $e.value;if(we&&(0,n.default)(we,"settings.whoCanAccess")&&(0,n.default)(we,"settings.whoCanAccess")!==d.ALL)return(0,n.default)(we,"settings.whoCanAccess");const De=Re(te.meta,c.AUTH);return(0,n.default)(De,"config.whoCanAccess")?De.config.whoCanAccess:d.ALL};e.getComponentWhoCanAccess=$;const X=({request:te,baseUrl:we})=>{const $e=te.headers["x-blocklet-did"]||"",De=te.headers["x-blocklet-real-did"]||"",re=te.headers["x-path-prefix"]||"/",q=te.headers["x-group-path-prefix"]||"/";let W=we;return $e!==De&&re!==q&&(W=(0,i.joinURL)(W,"/").replace(re,q)),W};e.getConnectAppUrl=X;const Y=(te,we)=>{const $e=(we||"").includes(":")?":":/\./;return(te||"").replace(u,(we||"").replace(new RegExp($e,"g"),"-"))};e.replaceSlotToIp=Y;const oe=te=>{const we=Object.entries(s.CHAIN_INFO_CONFIG).reduce(($e,De)=>{const[re,[q,W]]=De;return $e[q]=(0,n.default)(te,re)||W,$e},{});return we.type==="ethereum"&&we.id==="none"&&(we.id="1"),we};e.getChainInfo=oe;const Te=te=>{const we=oe({});if(!te)return we;const $e=oe(te.configObj);if($e.host!=="none")return $e;let De;return M(te,re=>{if(De&&De.host!=="none")return;const q=oe(re.configObj);q.host!=="none"&&(De=q)}),De||we};e.getBlockletChainInfo=Te;const me=te=>!!(te!=null&&te.controller);e.isExternalBlocklet=me;const le=te=>te.whoCanAccess.startsWith(p)?te.whoCanAccess.substring(p.length).split(","):[];e.getRolesFromAuthConfig=le;const ve=te=>{const we=Array.isArray(te.migratedFrom)?te.migratedFrom.map($e=>$e.appDid):[];return(0,r.default)([te.appDid,te.appPid,...we].filter(Boolean))};e.getBlockletAppIdList=ve;const _e=te=>{const we=[];return te&&D(te,$e=>{var re;(((re=$e.meta)==null?void 0:re.interfaces)||[]).filter(q=>q.type===s.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(q=>{const W=q.port||{};we.push({name:q.name,protocol:q.protocol,port:Number(W.external),upstreamPort:Number(($e.ports||{})[W.internal])})})}),we};e.getBlockletServices=_e;const Se=te=>[s.BlockletStatus.downloading,s.BlockletStatus.waiting,s.BlockletStatus.starting,s.BlockletStatus.installing,s.BlockletStatus.stopping,s.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(te);e.isInProgress=Se;const ze=te=>[s.BlockletStatus.added,s.BlockletStatus.waiting,s.BlockletStatus.downloading,s.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(te);e.isBeforeInstalled=ze;const Je=te=>[s.BlockletStatus.running,"running"].includes(te);e.isRunning=Je;const ge=te=>[s.BlockletStatus.running,s.BlockletStatus.waiting,s.BlockletStatus.downloading,"running","waiting","downloading"].includes(te);e.isAccessible=ge;const Ie=(te,{type:we,did:$e}={type:"",did:""})=>{var De,re,q;return te?!(0,l.hasStartEngine)(te.meta)&&((q=(re=(De=te.meta)==null?void 0:De.resource)==null?void 0:re.bundles)==null?void 0:q.length)>0&&(te.meta.resource.bundles||[]).some(W=>W.type===we&&W.did===$e):!1};e.hasResourceType=Ie,e.default={isFreeBlocklet:k,isFreeComponent:C,forEachBlocklet:x,forEachBlockletSync:D,forEachChild:V,forEachChildSync:M,forEachComponentV2:O,forEachComponentV2Sync:P,isDeletableBlocklet:v,getSharedConfigObj:f,getAppMissingConfigs:_,getComponentMissingConfigs:R,isEnvShareableToClient:N,isEnvShareable:T,wipeSensitiveData:E,hasRunnableComponent:L,getAppName:ne,getAppDescription:F,getAppUrl:J,getDisplayName:ne,fixBlockletStatus:se,findWebInterface:pe,findWebInterfacePort:be,findServiceFromMeta:Re,getWhoCanAccess:H,getComponentWhoCanAccess:$,replaceSlotToIp:Y,getComponentId:g,getComponentName:y,getComponentBundleId:b,findComponent:j,findComponentById:G,findComponentV2:ie,findComponentByIdV2:ue,filterComponentsV2:K,getParentComponentName:A,getConnectAppUrl:X,getChainInfo:oe,getBlockletChainInfo:Te,isExternalBlocklet:me,isPreferenceKey:h,getRolesFromAuthConfig:le,getBlockletServices:_e,isInProgress:Se,isBeforeInstalled:ze,isRunning:Je,isAccessible:ge,isGatewayBlocklet:l.isGatewayBlocklet,isPackBlocklet:l.isPackBlocklet,hasStartEngine:l.hasStartEngine,hasResourceType:Ie}})(Ss);const Hle=(e,t=!1)=>{const n=e.routing.adminPath;return t?encodeURIComponent(Ln(window.location.origin,n)):Ln(window.location.origin,n)},B_t=(e,t,n)=>{const r=Hle(t),i=Ln(n,`/api/blocklets/${e.did}/blocklet.json`),o=new URL(Ln(r,"/launch-blocklet/agreement"));return o.searchParams.set("blocklet_meta_url",i),o.searchParams.set("from",window.location.href),o.href},dCt=async(e,{getIP:t}={})=>{if(!e||!e.length)return[];if(!t||!e.some(r=>r.value.includes(rn.SLOT_FOR_IP_DNS_SITE)))return e;const n=await t();return n?e.map(r=>{try{return r.value=Ss.replaceSlotToIp(r.value,n),r}catch{return r}}).filter(Boolean):e},pCt=e=>{const t={didSpace:null};return Ss.forEachBlockletSync(e,n=>{var r,i;t.didSpace===ti.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||t.didSpace===ti.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(i=(r=n==null?void 0:n.meta)==null?void 0:r.capabilities)!=null&&i.didSpace&&(t.didSpace=n.meta.capabilities.didSpace)}),t},_W=async(e,{fixRuntime:t=!0,oldBlocklet:n,getIP:r}={})=>{if(e.site||(e.site={domainAliases:[],rules:[]}),e.site.rules.forEach(i=>{i.from.pathPrefix=G9(i.from.pathPrefix||"/")}),e.site.rules=cie(e.site.rules,i=>i.from.pathPrefix),t===!0)e.site.domainAliases=await dCt(e.site.domainAliases,{getIP:r}),e.appRuntimeInfo&&(e.appRuntimeInfo.startAt=new Date-e.appRuntimeInfo.uptime),Ss.forEachBlockletSync(e,i=>{i.runtimeInfo&&(i.runtimeInfo.startAt=new Date-i.runtimeInfo.uptime)});else if(t==="merge-old"&&n){e.site.domainAliases=n.site.domainAliases,e.appRuntimeInfo=n.appRuntimeInfo;const i={};Ss.forEachBlockletSync(n,(o,{id:a})=>{i[a]=o}),Ss.forEachBlockletSync(e,(o,{id:a})=>{const s=i[a];s&&(o.runtimeInfo=s.runtimeInfo,o.diskInfo=s.diskInfo,o.engine=s.engine)})}else e.site.domainAliases=[];e.capabilities=pCt(e)},EW="arcblock",N_t=(e,t=!1)=>{let n;return t?(n=(e.configs||[]).find(r=>r.key==="BLOCKLET_APP_CHAIN_TYPE"),n&&n.value||(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.key)),n&&n.value)?n.value:EW):(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.name)),n&&n.default?n.default:EW)},$_t=e=>!Ok(e==null?void 0:e.controller);let PC=null;const hCt=async()=>{const e=window.env.apiPrefix||"/",t=Ln(e,"/api/dns-resolve?accessible=1");try{return(await Ir.get(t)).data.address}catch{return null}},RW=()=>(PC||(PC=hCt()),PC),Wle=U.createContext({}),{Provider:mCt,Consumer:F_t}=Wle,kW=(e,t,n)=>n?e.map(r=>{const i={...r},o=t.find(a=>a.meta.did===r.meta.did);return o&&n.forEach(a=>{i[a]=o[a]}),i}):t;function gCt({children:e}){const t=Sl(),n=i5(),[r,i]=U.useState(null),[o,a]=U.useState(!1),[s,l]=U.useState([]),[c,u]=U.useState([]),[d,p]=U.useState(!1),g=(P,V)=>{Ss.isExternalBlocklet(P)?u(V):l(V)},y=4,b=async({silent:P=!0,retries:V=y,updates:M,useCache:j=!0}={})=>{P||a(!0);try{i(null);const{blocklets:G}=await n.getBlocklets({input:{useCache:j}});for(const K of G)await _W(K,{getIP:RW});const ie=G.filter(K=>!Ss.isExternalBlocklet(K)),ue=G.filter(Ss.isExternalBlocklet);l(K=>kW(K,ie,M)),u(K=>kW(K,ue,M)),a(!1),p(!0)}catch(G){V>0?setTimeout(()=>b({silent:P,retries:V-1,useCache:j}),1e3):(a(!1),i(G))}},A=async P=>{try{const{blocklet:V}=await t.api.getBlocklet({input:{did:P.meta.did,attachRuntimeInfo:!0}});await _W(V,{getIP:RW}),g(V,M=>M.some(j=>j.meta.did===V.meta.did)?M.map(j=>j.meta.did===V.meta.did?V:j):[...M,V])}catch(V){i(V)}},x=P=>{t.refresh(),A(P)};U.useEffect(()=>{b({silent:!1})},[]);const D=P=>{const V={};Ss.forEachBlockletSync(P,(M,{id:j})=>{V[j]=ti.fromBlockletStatus(M.status)}),g(P,M=>M.map(j=>(j.meta.did===P.meta.did&&Ss.forEachBlockletSync(j,(G,{id:ie})=>{V[ie]&&(G.status=V[ie])}),j)))};Ki(ti.BlockletEvents.added,P=>{P.status=ti.fromBlockletStatus(P.status),g(P,V=>[...V,P])}),Ki(ti.BlockletEvents.removed,P=>{t.refresh(),g(P,V=>V.filter(M=>M.meta.did!==P.meta.did))}),Ki(ti.BlockletEvents.statusChange,D),Ki(ti.BlockletEvents.installed,x),Ki(ti.BlockletEvents.upgraded,x),Ki(ti.BlockletEvents.updated,A),Ki(ti.BlockletEvents.startFailed,A),Ki(ti.BlockletEvents.reloaded,A);const O={loading:o,error:r,data:s,externalData:c,refresh:b,initialized:d,api:n};return I.jsx(mCt,{value:{blocklets:O},children:e})}function U_t(){const{blocklets:e}=U.useContext(Wle);return e}const yCt=({user:e,launchType:t,nftId:n})=>{var r;if(!e)return!1;if(t==="serverless"){if(!n)throw new Error("nftId is required");return((r=e==null?void 0:e.controller)==null?void 0:r.nftId)===n}return(e.permissions||[]).includes("mutate_blocklets")},j_t=e=>{var t,n;return e.isGetBlocklet&&((n=(t=e.runtimeBlocklet)==null?void 0:t.controller)==null?void 0:n.consumedAt)},q_t=async e=>{const t=bdt({blocklet:e});let n="";return n=t.find(r=>{try{const{hostname:i}=new URL(r);return koe.isSlpDomain(i)}catch(i){return console.error(i),!1}}),n||(n=await Sdt(t)),n},Gle=U.createContext({}),{Provider:vCt,Consumer:V_t}=Gle;function bCt({children:e}){const{session:t}=y0(),{t:n}=fo(),{api:r,info:i}=Sl(),[o]=BJ(),a=i5(),s=o.get("launchType"),l=o.get("fromLauncher"),c=o.get("blocklet_meta_url")||"",u=o.get("nftId")||"",d=o.get("launcherSessionId")||"",p=o.get("launcherUrl")||"",g=new URL(c).origin,[y,b]=U.useState({meta:null,appDid:o.get("appDid")||null,sessionId:o.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null}),A=(ue,K)=>b(N=>({...N,appDid:ue,sessionId:K})),x=yCt({user:t.user,launchType:s,nftId:u}),[D,O]=U.useState(null),[P,V]=U.useState(!0),M=U.useMemo(()=>i?Hle(i):"",[i]),j=async ue=>{if(!ue)throw new Error("appDid should not be empty");const{blocklet:K}=await r.getBlocklet({input:{did:ue,attachConfig:!1}});if(!K)return null;const N=ti.BlockletStatus[K.status],T=!!u,f=N<ti.BlockletStatus.installed,h=N===ti.BlockletStatus.installed,w=N===ti.BlockletStatus.running;return b(_=>({..._,isInstalled:h,isRunning:w,isExternal:T,isInstalling:f})),{isInstalled:h,isRunning:w,isExternal:T,isInstalling:f}},G=async()=>{V(!0);try{if(!c)throw new Error(n("common.invalidParam"));const[{meta:ue,isFree:K},{launcherSession:N,error:T}]=await Promise.all([r.getBlockletMetaFromUrl({input:{url:c,checkPrice:!0}}),d?r.getLauncherSession({input:{launcherSessionId:d,launcherUrl:p}}):Promise.resolve({})]);if(d&&!N)throw new Error(`Launch session invalid: ${T}`);if(!ue)throw new Error(n("LaunchBlockletBlocklet.error.loadMetaFailed"));let f={};x&&y.appDid&&(f=await j(y.appDid)),b(h=>({...h,...f,meta:ue,isFree:K,launcherSession:N}))}catch(ue){console.error(ue),O(ue.message)}finally{V(!1)}};U.useEffect(()=>{var ue,K,N;((ue=t==null?void 0:t.user)==null?void 0:ue.role)===rn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((N=(K=t==null?void 0:t.user)==null?void 0:K.controller)==null?void 0:N.nftId)!==u&&t.logout(),G()},[]),U.useEffect(()=>{P||!y.meta||(x?y.appDid&&j(y.appDid).catch(ue=>{ci.error(ue.message)}):(b(ue=>({...ue,isInstalled:!1,isRunning:!1,isExternal:!1})),O(null)))},[x]);const ie={meta:y.meta,isFree:y.isFree,appDid:y.appDid,sessionId:y.sessionId,isInstalling:y.isInstalling,isInstalled:y.isInstalled,isExternal:y.isExternal,isRunning:y.isRunning,serverUrl:M,storeUrl:g,blockletMetaUrl:c,fromLauncher:l,loading:P,error:D,api:a,getBlocklet:j,setAppDid:A,launcherUrl:p,launcherSession:y.launcherSession,launcherSessionId:d};return I.jsx(vCt,{value:ie,children:e})}function z_t(){return U.useContext(Gle)}function Kle(){return new URLSearchParams(yi().search)}const Jle=U.createContext(),{Provider:wCt,Consumer:H_t}=Jle;function Yle({children:e}){const n=Kle().get("blocklet_meta_url"),r=S8t(async()=>{const{data:o}=await W9.get(n);return o});if(r.loading)return I.jsx(Qo,{children:I.jsx(ra,{})});const i={meta:r.value,error:r.error};return I.jsx(wCt,{value:i,children:e})}Yle.propTypes={children:Z.any.isRequired};function W_t(){return U.useContext(Jle)}const TCt=U.lazy(()=>gn(()=>import("./index-BBEuxxjq.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),xCt=U.lazy(()=>gn(()=>import("./index-xRBNy1in.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2,27,28,29,30]),import.meta.url)),SCt=U.lazy(()=>gn(()=>import("./index-CxaGo2hZ.js"),__vite__mapDeps([31,32,33,34,35,36,37,6,38,39,40,41,42,12,9,11,25,18,17]),import.meta.url)),CCt=U.lazy(()=>gn(()=>import("./index-D9E6SEa0.js"),__vite__mapDeps([43,6,44,45,17,16,46,9,47,48,29,12,11,38,49,39,40,50,3,18,22,23,51,52,53]),import.meta.url)),ACt=U.lazy(()=>gn(()=>import("./index-Dl2hud6k.js"),__vite__mapDeps([54,55,10,52,56,57,46,58,12,9,11,7,8,13,14,15,16,17,18,59,50,3,2,60,6,61,62,29,19,20,63,64,65,66,4,67]),import.meta.url)),_Ct=U.lazy(()=>gn(()=>import("./index-CLIK5uaQ.js"),__vite__mapDeps([68,69,22,23,9,70]),import.meta.url)),ECt=U.lazy(()=>gn(()=>import("./index-BEQyLEKb.js"),__vite__mapDeps([71,55,10,72,73,74,17,6,9,11,75,13,76,77,29,78,79,80,16,12,7,8,14,15,18,81,82,83,46,20,84,3,2,85,86,30,22,23,87,88,89,24,25,45,47,90,1,50,65]),import.meta.url)),RCt=U.lazy(()=>gn(()=>import("./detail-CIhc9jZt.js").then(e=>e.d),__vite__mapDeps([91,55,10,19,20,21,6,18,22,23,28,84,41,42,53]),import.meta.url)),kCt=U.lazy(()=>gn(()=>import("./index-Chps_oCL.js"),[],import.meta.url)),DCt=U.lazy(()=>gn(()=>import("./index-RAfI5Ovd.js"),__vite__mapDeps([92,1,75,13]),import.meta.url)),LCt=U.lazy(()=>gn(()=>import("./index-JffoMuKt.js"),__vite__mapDeps([93,94,95,96,63,97]),import.meta.url)),OCt=U.lazy(()=>gn(()=>import("./index-Db0xkYaW.js"),__vite__mapDeps([98,63,79,49,97,27]),import.meta.url)),ICt=U.lazy(()=>gn(()=>import("./index-BtKnBn2o.js"),__vite__mapDeps([99,97]),import.meta.url)),PCt=U.lazy(()=>gn(()=>import("./index-DvtCtx64.js"),__vite__mapDeps([100,32,33,34,35,36,37,101,73,74,42,25,6,60]),import.meta.url)),MCt=U.lazy(()=>gn(()=>import("./index-BoHcyWvQ.js"),__vite__mapDeps([102,95]),import.meta.url)),BCt=U.lazy(()=>gn(()=>import("./index-CzXBr0fB.js"),__vite__mapDeps([103,94,95,96,63,97]),import.meta.url)),NCt=U.lazy(()=>gn(()=>import("./index-BwD5fAbE.js").then(e=>e.a2),__vite__mapDeps([104,105]),import.meta.url)),$Ct=U.lazy(()=>gn(()=>import("./index-yF_Q2_O-.js"),__vite__mapDeps([106,55,10,107,108,109,64,9,110,12,11,47,7,8,13,14,15,16,17,18,28,111,112,4,6,90,23]),import.meta.url));function Zle(){const e=Sl(),{session:t}=y0(),{wallet:n}=Vh(),r=t.user&&t.user.did;return U.useEffect(()=>{const i=f5();return r?i.connect():i.isConnected()&&i.disconnect(),()=>{i.isConnected()&&i.disconnect()}},[r]),U.useEffect(()=>{if(n)return()=>{};const i=()=>{document.visibilityState==="visible"&&t.refresh()};return document.addEventListener("visibilitychange",i),()=>{document.removeEventListener("visibilitychange",i)}},[]),{node:e,session:t}}function FCt(){var a;const{t:e}=fo(),{node:t,session:n}=Zle(),r=yi();U.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${r.pathname}${r.search}`)},[r]),U.useEffect(()=>{var s;((s=n==null?void 0:n.user)==null?void 0:s.role)===rn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&n.logout()},[(a=n==null?void 0:n.user)==null?void 0:a.role]);const i=I.jsx(ra,{});if(t.loading||n.loading)return I.jsx(Qo,{children:i});if(!t.info.initialized)return b8e.getServerAuthMethod(t.info)==="nft"?I.jsx(YL,{action:"verify-owner"}):I.jsx(Qo,{children:I.jsx(m6t,{})});if(t.info.upgradeSessionId)return I.jsx(Qo,{children:I.jsx(Nse,{})});if(!n.user)return I.jsx(XL,{loadingEle:i});const o=I.jsx(Qo,{children:I.jsx(ra,{})});return I.jsx(Q8t,{children:I.jsxs(gCt,{children:[I.jsx(C6t,{}),I.jsx(OTt,{}),I.jsx(nCt,{}),I.jsx(U.Suspense,{fallback:o,children:I.jsxs(A4,{children:[I.jsx(or,{path:"/dashboard",element:I.jsx(Ko,{fullWidth:!0,title:"Dashboard",children:I.jsx(TCt,{})})}),I.jsx(or,{path:"/blocklets",element:I.jsx(Ko,{fullWidth:!0,title:e("common.blocklets"),children:I.jsx(xCt,{})})}),I.jsx(or,{path:"/blocklets/:did/:tab",element:I.jsx(Ko,{fullWidth:!0,title:"Blocklets",children:I.jsx(RCt,{})})}),I.jsx(or,{path:"/settings/:tab",element:I.jsx(Ko,{fullWidth:!0,title:e("common.setting"),children:I.jsx(ACt,{})})}),I.jsx(or,{path:"/eula",element:I.jsx(Ko,{fullWidth:!0,title:e("setup.steps.eula"),children:I.jsx(kCt,{})})}),I.jsx(or,{path:"/store",element:I.jsx(Ko,{fullWidth:!0,title:e("common.store"),children:I.jsx(CCt,{})})}),I.jsx(or,{path:"/console",element:I.jsx(Ko,{title:`GraphQL ${e("common.console")}`,scrollable:!1,fullWidth:!0,children:I.jsx(NCt,{})})}),I.jsx(or,{path:"/notifications",element:I.jsx(Ko,{children:I.jsx(DCt,{})})}),I.jsx(or,{path:"/team/:tab",element:I.jsx(Ko,{fullWidth:!0,title:e("common.team"),children:I.jsx(ECt,{})})}),I.jsx(or,{path:"/logs/:name",element:I.jsx(Ko,{scrollable:!1,fullWidth:!0,title:e("common.logs"),children:I.jsx(_Ct,{})})}),I.jsx(or,{path:"/analytics/:tab",element:I.jsx(Ko,{fullWidth:!0,title:e("common.analytics"),children:I.jsx($Ct,{})})}),I.jsx(or,{path:"/",element:I.jsx(Gs,{to:"/dashboard",replace:!0})}),I.jsx(or,{path:"/team",element:I.jsx(Gs,{to:"/team/members",replace:!0})}),I.jsx(or,{path:"/analytics",element:I.jsx(Gs,{to:"/analytics/traffic",replace:!0})}),I.jsx(or,{path:"/logs",element:I.jsx(Gs,{to:"/logs/abtnode",replace:!0})}),I.jsx(or,{path:"/router",element:I.jsx(Gs,{to:"/router/rules",replace:!0})}),I.jsx(or,{path:"/settings",element:I.jsx(Gs,{to:"/settings/basic",replace:!0})}),I.jsx(or,{path:"/marketplace",element:I.jsx(Gs,{to:"/store",replace:!0})}),I.jsx(or,{path:"/marketplace/:did",element:I.jsx(Gs,{to:"/store/:did",replace:!0})}),I.jsx(or,{path:"*",element:I.jsx(MCt,{})})]})})]})})}function Jc({children:e}){const{node:t,session:n}=Zle();return t.loading||!n.initialized&&n.loading?I.jsx(Qo,{children:I.jsx(ra,{})}):t.info.upgradeSessionId?I.jsx(Qo,{children:I.jsx(Nse,{})}):e}function UCt(){const{changeLocale:e}=fo(),t=Kle();U.useEffect(()=>{const r=t.get("locale");r&&["zh","en"].includes(r)&&e(r)},[]);const n=I.jsx(Qo,{children:I.jsx(ra,{})});return I.jsx(U.Suspense,{fallback:n,children:I.jsxs(A4,{children:[I.jsx(or,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:I.jsx(Jc,{children:I.jsx(LCt,{})})}),I.jsx(or,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:I.jsx(Jc,{children:I.jsx(OCt,{})})}),I.jsx(or,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:I.jsx(Jc,{children:I.jsx(ICt,{})})}),I.jsx(or,{path:"/accept-server",element:I.jsx(Jc,{children:I.jsx(YL,{action:"accept-server"})})}),I.jsx(or,{path:"/launch-blocklet/*",element:I.jsx(Jc,{children:I.jsx(bCt,{children:I.jsx(PCt,{})})})}),I.jsx(or,{path:"/blocklets/restore/*",element:I.jsx(Jc,{children:I.jsx(Yle,{children:I.jsx(SCt,{})})})}),I.jsx(or,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:I.jsx(Jc,{children:I.jsx(BCt,{})})}),I.jsx(or,{path:"/*",element:I.jsx(FCt,{})})]})})}function jCt(){const e=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return I.jsxs(I.Fragment,{children:[I.jsx($7,{}),I.jsx(OJ,{history:X8e,basename:e,children:I.jsx(VTt,{children:I.jsx(UCt,{})})})]})}const qCt=WK(document.getElementById("root"));qCt.render(I.jsx(jCt,{}));const DW=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";wge(`${DW}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:DW},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});export{Hp as $,ci as A,ks as B,ra as C,QD as D,BJ as E,rn as F,gx as G,Ps as H,SO as I,Tat as J,Yct as K,DX as L,Ss as M,cl as N,ft as O,Z as P,Ok as Q,ND as R,B1 as S,Lle as T,y5 as U,Qo as V,oO as W,Ac as X,Ave as Y,OD as Z,Qst as _,Ki as a,wk as a$,rL as a0,Ln as a1,to as a2,_6 as a3,kTt as a4,S_t as a5,s9e as a6,bk as a7,m9e as a8,IX as a9,dle as aA,Tdt as aB,zle as aC,R9e as aD,dCt as aE,G9 as aF,cie as aG,RW as aH,XAt as aI,joe as aJ,fa as aK,co as aL,X8e as aM,vdt as aN,sk as aO,KAt as aP,Lke as aQ,l_t as aR,S8t as aS,W9 as aT,YAt as aU,g_t as aV,ydt as aW,AX as aX,yX as aY,tLe as aZ,ZAt as a_,Hle as aa,W_t as ab,b8e as ac,iO as ad,nL as ae,q_t as af,DAt as ag,j_t as ah,f5 as ai,Kle as aj,o_t as ak,GO as al,KL as am,x7 as an,A4 as ao,or as ap,Gs as aq,cu as ar,yl as as,$V as at,B_t as au,Ir as av,y0 as aw,Io as ax,c_t as ay,T6 as az,ti as b,NA as b$,NRe as b0,JRe as b1,wdt as b2,m_t as b3,xle as b4,xCe as b5,hct as b6,Iw as b7,Pw as b8,jX as b9,sie as bA,zg as bB,PXe as bC,Wre as bD,JD as bE,sle as bF,HAt as bG,L_t as bH,FAt as bI,s_t as bJ,Zte as bK,ua as bL,kt as bM,mc as bN,ye as bO,Ybe as bP,Bt as bQ,un as bR,an as bS,hn as bT,fl as bU,Pt as bV,sn as bW,fu as bX,d7e as bY,ht as bZ,Gn as b_,en as ba,Hr as bb,Wu as bc,uh as bd,a_t as be,B6 as bf,bJ as bg,Yo as bh,qX as bi,G1 as bj,T_t as bk,Cie as bl,N_t as bm,iQ as bn,gn as bo,zAt as bp,mRe as bq,IJ as br,x_t as bs,GD as bt,Uh as bu,Og as bv,pre as bw,hre as bx,KD as by,r9 as bz,i5 as c,fw as c$,B7 as c0,$r as c1,M7 as c2,sAt as c3,MAt as c4,bdt as c5,koe as c6,ile as c7,p_t as c8,D6 as c9,_f as cA,yi as cB,CD as cC,pi as cD,VAt as cE,UAt as cF,jAt as cG,rle as cH,FTt as cI,tk as cJ,gi as cK,oAt as cL,wm as cM,Np as cN,Zut as cO,mt as cP,Jne as cQ,zCt as cR,cAt as cS,_ct as cT,V6 as cU,I8t as cV,pbe as cW,b_t as cX,Ya as cY,P7 as cZ,dc as c_,_W as ca,SRe as cb,ARe as cc,Adt as cd,T9e as ce,XEe as cf,Ule as cg,eCt as ch,NOe as ci,Ct as cj,GLe as ck,Or as cl,dh as cm,nu as cn,mi as co,Vh as cp,_g as cq,Ku as cr,S6t as cs,d5 as ct,z_t as cu,hGe as cv,yCt as cw,f_t as cx,Sdt as cy,i_t as cz,U_t as d,YCt as d$,$a as d0,Ai as d1,Rt as d2,hX as d3,FEe as d4,Ba as d5,OAt as d6,IAt as d7,PD as d8,Uke as d9,yu as dA,L9 as dB,SZe as dC,Vie as dD,JAt as dE,jEe as dF,s3 as dG,K4e as dH,cc as dI,_o as dJ,zY as dK,bwe as dL,Rw as dM,rs as dN,zh as dO,Lw as dP,Hh as dQ,N7 as dR,AY as dS,L4e as dT,I4e as dU,jve as dV,tY as dW,mg as dX,ZCt as dY,QCt as dZ,XCt as d_,M1 as da,c3 as db,MX as dc,q9e as dd,J$ as de,K$ as df,N9e as dg,yAt as dh,dn as di,GCt as dj,WCt as dk,HCt as dl,KCt as dm,Rh as dn,kD as dp,L6 as dq,ad as dr,Hg as ds,cJe as dt,CZ as du,Jn as dv,aAt as dw,Wp as dx,AZ as dy,Qt as dz,_8t as e,Y4 as e$,Xbe as e0,ug as e1,Dh as e2,RN as e3,JCt as e4,$f as e5,E3e as e6,S7 as e7,XY as e8,rAt as e9,OEe as eA,wv as eB,wRe as eC,hx as eD,g7e as eE,xm as eF,Oke as eG,k9e as eH,f3 as eI,nLe as eJ,em as eK,SLe as eL,Wl as eM,Xb as eN,Zb as eO,NLe as eP,LLe as eQ,bAt as eR,Yre as eS,Ls as eT,T_ as eU,F7 as eV,xY as eW,RX as eX,LGe as eY,Lh as eZ,qY as e_,eAt as ea,l4e as eb,fc as ec,BY as ed,I3e as ee,c4e as ef,nAt as eg,BA as eh,o4e as ei,s4e as ej,vl as ek,u4e as el,Wbe as em,lw as en,Mwe as eo,tAt as ep,Dwe as eq,jc as er,SCe as es,pAt as et,eAe as eu,tAe as ev,vAe as ew,hAt as ex,tr as ey,Tp as ez,Ec as f,ay as f$,hg as f0,_7 as f1,p3 as f2,tF as f3,jf as f4,fi as f5,Bot as f6,$o as f7,a0 as f8,tn as f9,t_t as fA,PAt as fB,r_t as fC,Aie as fD,hoe as fE,t6t as fF,p9 as fG,tse as fH,Uoe as fI,vw as fJ,T2t as fK,iie as fL,Q4e as fM,QY as fN,U7 as fO,Kn as fP,Ew as fQ,n9e as fR,Y7 as fS,d8e as fT,$O as fU,uAt as fV,qO as fW,jO as fX,I6 as fY,EAt as fZ,RO as f_,Eg as fa,Hf as fb,UOe as fc,WK as fd,Kh as fe,Xn as ff,bee as fg,gee as fh,Sw as fi,Xct as fj,kY as fk,cw as fl,l3 as fm,i7 as fn,tQ as fo,VQ as fp,v6t as fq,qAt as fr,nI as fs,rQ as ft,VCt as fu,pc as fv,CYe as fw,_c as fx,QAt as fy,ud as fz,Kt as g,Sh as g$,IO as g0,UWe as g1,Gh as g2,Tle as g3,A6 as g4,lot as g5,bot as g6,qte as g7,Sk as g8,Zrt as g9,Hct as gA,ID as gB,$_t as gC,v_t as gD,GAt as gE,e_t as gF,n_t as gG,R6 as gH,Tre as gI,xre as gJ,wre as gK,Pre as gL,WY as gM,e3 as gN,cAe as gO,dbe as gP,f5t as gQ,y5t as gR,w5t as gS,C5t as gT,E5t as gU,lTt as gV,uTt as gW,Vse as gX,zse as gY,MVe as gZ,Ktt as g_,wie as ga,Kf as gb,E6 as gc,L1 as gd,kw as ge,mx as gf,Dw as gg,YAe as gh,bX as gi,hCe as gj,ZZ as gk,cve as gl,WAt as gm,d_t as gn,Lxt as go,Sg as gp,lCe as gq,Cw as gr,dre as gs,H7 as gt,mSe as gu,W7 as gv,yct as gw,K7 as gx,$At as gy,oCt as gz,rO as h,q1 as h0,jVe as h1,BAt as h2,TAt as h3,y_t as h4,sV as h5,Zm as h6,GOe as h7,aQ as h8,d3 as h9,RAt as hA,Act as hB,O_t as hC,wX as hD,mot as hE,e9 as hF,LOe as hG,E_t as hH,__t as hI,nQ as hJ,Ite as hK,P_t as hL,mX as hM,wAt as ha,N1 as hb,iAt as hc,wwe as hd,dAt as he,mCe as hf,yRe as hg,bDe as hh,hDe as hi,mAt as hj,wDe as hk,gAt as hl,z9e as hm,vAt as hn,D5t as ho,KA as hp,YA as hq,$se as hr,X4e as hs,LD as ht,hN as hu,u_t as hv,Ibt as hw,w_t as hx,h_t as hy,mH as hz,ch as i,I as j,Tf as k,NAt as l,Xt as m,Ka as n,q6 as o,jE as p,fo as q,U as r,er as s,F8t as t,Sl as u,R8t as v,ake as w,C9 as x,tL as y,xc as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var zt=Object.defineProperty;var Ht=(e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Q=(e,t,n)=>(Ht(e,typeof t!="symbol"?t+"":t,n),n);import{P as l,j as d,cf as ce,fN as ot,fO as Dt,r as T,co as Ut,cj as Bt,a2 as Vt,fP as qe,dQ as Qt,dO as Wt,fQ as Zt,dN as Gt,d2 as A,a7 as Jt,a8 as Yt,fR as Xt,O as P,fS as Kt,m as en,fT as tn,fU as nn,B as on,fV as rn,fz as rt,q as te,fW as sn,fX as cn,cp as an,fY as ln,s as M,fZ as st,f_ as un,c9 as it,f$ as fn,aA as ct,bV as de,b4 as dn,bb as pn,cq as at,g0 as hn}from"./index-
|
|
1
|
+
var zt=Object.defineProperty;var Ht=(e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Q=(e,t,n)=>(Ht(e,typeof t!="symbol"?t+"":t,n),n);import{P as l,j as d,cf as ce,fN as ot,fO as Dt,r as T,co as Ut,cj as Bt,a2 as Vt,fP as qe,dQ as Qt,dO as Wt,fQ as Zt,dN as Gt,d2 as A,a7 as Jt,a8 as Yt,fR as Xt,O as P,fS as Kt,m as en,fT as tn,fU as nn,B as on,fV as rn,fz as rt,q as te,fW as sn,fX as cn,cp as an,fY as ln,s as M,fZ as st,f_ as un,c9 as it,f$ as fn,aA as ct,bV as de,b4 as dn,bb as pn,cq as at,g0 as hn}from"./index-DS1JU_-_.js";/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__fileDeps=["./index-
|
|
2
|
-
import{r as p,ck as B,cl as F,cm as H,cn as q,aK as O,aL as G,j as s,n as R,P as y,H as V,co as J,f as K,cp as Q,x as I,O as x,cf as Y,W as Z,B as M,m as D,N as ee,cq as te,bo as se,cr as ae,cs as ne,u as oe,y as re,am as ie,bk as ce,ae as le}from"./index-
|
|
1
|
+
const __vite__fileDeps=["./index-D3ulER0U.js","./index-DS1JU_-_.js","./index-D7K8de1w.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{r as p,ck as B,cl as F,cm as H,cn as q,aK as O,aL as G,j as s,n as R,P as y,H as V,co as J,f as K,cp as Q,x as I,O as x,cf as Y,W as Z,B as M,m as D,N as ee,cq as te,bo as se,cr as ae,cs as ne,u as oe,y as re,am as ie,bk as ce,ae as le}from"./index-DS1JU_-_.js";import{d as pe}from"./CheckCircle-CpgwIoc6.js";import{d as de}from"./ViewList-DiAWVo-f.js";import{d as ue}from"./Done-CEgWviUN.js";import{w as me}from"./wrap-locale-b15Mq8e0.js";import{S as fe,a as he,b as xe}from"./Stepper-WgjnG7-H.js";var S=function(e){if(!e)return 0;var r=q(e).valueOf()-Date.now();return r<0?0:r},ge=function(e){return{days:Math.floor(e/864e5),hours:Math.floor(e/36e5)%24,minutes:Math.floor(e/6e4)%60,seconds:Math.floor(e/1e3)%60,milliseconds:Math.floor(e)%1e3}},ve=function(e){e===void 0&&(e={});var r=e||{},l=r.leftTime,i=r.targetDate,d=r.interval,v=d===void 0?1e3:d,b=r.onEnd,g=p.useMemo(function(){return B(l)&&l>0?Date.now()+l:void 0},[l]),a="leftTime"in e?g:i,f=F(p.useState(function(){return S(a)}),2),h=f[0],u=f[1],n=H(b);p.useEffect(function(){if(!a){u(0);return}u(S(a));var w=setInterval(function(){var o,c=S(a);u(c),c===0&&(clearInterval(w),(o=n.current)===null||o===void 0||o.call(n))},v);return function(){return clearInterval(w)}},[a,v]);var j=p.useMemo(function(){return ge(h)},[h]);return[h,j]},k={},be=G;Object.defineProperty(k,"__esModule",{value:!0});var E=k.default=void 0,we=be(O()),je=s;E=k.default=(0,we.default)((0,je.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp");function T({list:e,width:r,height:l,cardSpace:i,onSelect:d,defaultIndex:v}){const[b,g]=p.useState(0),[a,f]=p.useState(0),h=p.useRef(null),u=o=>{if(o<0||o>e.length-1)return;g(o);const c=h.current.clientWidth;f(o*(r+i)-(c-r)/2+i*.5),d(o)};p.useEffect(()=>{u(v);const o=c=>c.preventDefault();h.current.addEventListener("touchmove",o,{passive:!1})},[]);let n;const j=o=>{n=o.touches[0].clientX},w=o=>{const c=o.changedTouches[0],P=n-c.clientX;Math.abs(P)>60&&(P>0?u(b+1):u(b-1))};return s.jsx(ye,{ref:h,onTouchStart:j,onTouchEnd:w,children:s.jsx("div",{className:"card-container",style:{transform:`translate(${-a}px, 0)`},children:e.map((o,c)=>s.jsx("div",{className:`card-item ${c===b?"selected":""}`,style:{width:r,height:l,margin:i/2},onClick:()=>u(c),children:s.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:o.src}})},o.id))})})}const ye=R.div`
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
|
|
5
5
|
overflow: hidden;
|
|
@@ -33,7 +33,7 @@ import{r as p,ck as B,cl as F,cm as H,cn as q,aK as O,aL as G,j as s,n as R,P as
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`;T.propTypes={list:y.array,width:y.number,height:y.number,cardSpace:y.number,onSelect:y.func,defaultIndex:y.number};T.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};const $=()=>{const{searchParams:e}=new URL(window.location.href);return e.get("fromWallet")==="1"};function Pe({icon:e,active:r,completed:l}){const i={1:s.jsx(de,{className:"step-icon"}),2:s.jsx(E,{className:"step-icon"}),3:s.jsx(ue,{className:"step-icon"})},d=["step-icon-w"];return r&&d.push("step-icon-w--active"),l&&d.push("step-icon-w--completed"),s.jsx("div",{className:d.join(" "),children:i[String(e)]})}function Se({SessionContext:e,webWalletUrl:r,createPassportSvg:l,passportColor:i,onLogin:d}){const{api:v,session:b}=p.useContext(e),g=V(t=>t.breakpoints.down("sm")),a=J({user:null,passport:null,success:!1,activeStep:0}),f=p.useRef({sessionToken:"",refreshToken:""}),{setPassportId:h,clearPassportId:u}=ne(),{t:n,locale:j}=p.useContext(K),{wallet:w}=Q(),[o,c]=p.useState(0),{searchParams:P}=new URL(window.location.href),C=()=>{a.activeStep++},W=t=>{a.user=t.user},A=()=>{C()},z=(t,m)=>{t!=null&&t.passportId&&h(t.passportId),t!=null&&t.sessionToken&&(f.current.sessionToken=m(t.sessionToken)),t!=null&&t.refreshToken&&(f.current.refreshToken=m(t.refreshToken)),a.success=!0,C()},U=()=>new Promise(t=>{try{b.logout(()=>{t()})}catch{t()}}),L=async()=>{if(w&&$()){se(()=>import("./index-
|
|
36
|
+
`;T.propTypes={list:y.array,width:y.number,height:y.number,cardSpace:y.number,onSelect:y.func,defaultIndex:y.number};T.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};const $=()=>{const{searchParams:e}=new URL(window.location.href);return e.get("fromWallet")==="1"};function Pe({icon:e,active:r,completed:l}){const i={1:s.jsx(de,{className:"step-icon"}),2:s.jsx(E,{className:"step-icon"}),3:s.jsx(ue,{className:"step-icon"})},d=["step-icon-w"];return r&&d.push("step-icon-w--active"),l&&d.push("step-icon-w--completed"),s.jsx("div",{className:d.join(" "),children:i[String(e)]})}function Se({SessionContext:e,webWalletUrl:r,createPassportSvg:l,passportColor:i,onLogin:d}){const{api:v,session:b}=p.useContext(e),g=V(t=>t.breakpoints.down("sm")),a=J({user:null,passport:null,success:!1,activeStep:0}),f=p.useRef({sessionToken:"",refreshToken:""}),{setPassportId:h,clearPassportId:u}=ne(),{t:n,locale:j}=p.useContext(K),{wallet:w}=Q(),[o,c]=p.useState(0),{searchParams:P}=new URL(window.location.href),C=()=>{a.activeStep++},W=t=>{a.user=t.user},A=()=>{C()},z=(t,m)=>{t!=null&&t.passportId&&h(t.passportId),t!=null&&t.sessionToken&&(f.current.sessionToken=m(t.sessionToken)),t!=null&&t.refreshToken&&(f.current.refreshToken=m(t.refreshToken)),a.success=!0,C()},U=()=>new Promise(t=>{try{b.logout(()=>{t()})}catch{t()}}),L=async()=>{if(w&&$()){se(()=>import("./index-D3ulER0U.js").then(m=>m.i),__vite__mapDeps([0,1,2]),import.meta.url).then(m=>{m.call("arcClosePage")});return}await U(),ae(d)&&d({sessionToken:f.current.sessionToken,refreshToken:f.current.refreshToken});const t=P.get("redirect");if(t){window.location.replace(t);return}u(),window.location.replace("/")},X=t=>{a.passport=t.target.value},[N]=ve({leftTime:o,onEnd:()=>{L()}}),_=[{label:n("lostPassport.selectPassport"),content:()=>a.user?s.jsxs(x,{className:"select-passport",children:[s.jsxs(x,{my:1,display:"flex",alignItems:"center",className:"user-info",children:[s.jsx(Y,{src:a.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),s.jsxs(x,{children:[s.jsx(x,{className:"name",children:a.user.fullName}),s.jsx(x,{className:"did",mt:1,children:s.jsx(Z,{responsive:!g,compact:g,did:a.user.did})})]})]}),s.jsx("div",{children:s.jsx(T,{width:g?180:230,height:g?240:306,cardSpace:24,list:a.user.passportTypes.map(t=>({src:l({title:t.title,issuer:t.issuer.name,issuerDid:t.issuer.id,ownerDid:a.user.did,ownerName:a.user.fullName,ownerAvatarUrl:a.user.avatar,preferredColor:i||"auto"}),name:t.title,id:t.id})),onSelect:t=>X({target:{value:a.user.passportTypes[t].name}}),defaultIndex:0})}),s.jsx(x,{textAlign:"center",children:s.jsx(M,{variant:"contained",color:"primary",onClick:()=>A(),disabled:!a.passport,children:n("common.next")})})]}):s.jsx(I,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:v.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:W,locale:j,messages:{title:n("lostPassport.dialog.title"),scan:n("lostPassport.dialog.scan"),confirm:n("lostPassport.dialog.confirm"),success:n("lostPassport.dialog.success")}})},{label:n("lostPassport.receivePassport"),content:()=>{var m;const t={receiverDid:a.user.did,passportName:a.passport,teamDid:((m=window==null?void 0:window.blocklet)==null?void 0:m.did)||""};return s.jsx(I,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:v.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:z,locale:j,messages:{title:`${n("lostPassport.dialog.title")}`,scan:n("lostPassport.dialog.scan"),confirm:n("lostPassport.dialog.confirm"),success:n("lostPassport.dialog.success")},extraParams:t})}},{label:n("common.complete"),content:()=>(o===0&&c(3e3),s.jsxs(x,{textAlign:"center",children:[s.jsx(x,{mb:3,color:"success.main",children:s.jsx(pe,{style:{fontSize:60}})}),s.jsx(D,{component:"p",variant:"body1",className:"subheader",children:n("issuePassport.dialog.success")}),s.jsx(D,{component:"p",variant:"body2",color:"gray",children:w&&$()?n("issuePassport.dialog.autoClose",{seconds:Math.round(N/1e3)}):n("issuePassport.dialog.autoJump",{seconds:Math.round(N/1e3)})}),s.jsx(M,{style:{marginTop:40},variant:"contained",color:"primary",onClick:L,children:n("issuePassport.dialog.loginWithPassport")})]}))}];return s.jsx(ke,{children:s.jsxs("div",{className:"stepper",children:[s.jsx(fe,{className:"stepper-progress",alternativeLabel:!0,activeStep:a.activeStep,children:_.map(({label:t})=>s.jsx(he,{children:s.jsx(xe,{StepIconComponent:Pe,children:t})},t))}),s.jsx("div",{className:"stepper-content",children:_[a.activeStep].content()}),!a.success&&s.jsx(x,{textAlign:"center",fontSize:12,children:s.jsx(ee,{to:"/",style:{color:"#4598FA"},children:n("lostPassport.return")})})]})})}const ke=R(te)`
|
|
37
37
|
padding-top: 46px;
|
|
38
38
|
padding-bottom: 46px;
|
|
39
39
|
height: 100%;
|