@abtnode/blocklet-services 1.16.22-beta-079a9053 → 1.16.22-beta-5bf86cd3
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/api/index.js +8 -1
- package/api/libs/open-graph/index.js +5 -1
- package/api/routes/blocklet.js +6 -0
- package/dist/assets/Add-HY80r9Xl.js +1 -0
- package/dist/assets/{Alert-q0LztC5S.js → Alert-cCkZfPX9.js} +1 -1
- package/dist/assets/ArrowDropDown-Oh-T-P-J.js +1 -0
- package/dist/assets/{Autocomplete-KMUZJ2iZ.js → Autocomplete-kezcFnoc.js} +1 -1
- package/dist/assets/{Avatar-7AoIiLl0.js → Avatar-jwVmwAdK.js} +1 -1
- package/dist/assets/{ButtonGroup-3ZXLSrUY.js → ButtonGroup-VMcij_v9.js} +1 -1
- package/dist/assets/{CardContent-Ne-zC7Jh.js → CardContent-56wHk5L-.js} +1 -1
- package/dist/assets/CheckCircle-_9dSYOvH.js +1 -0
- package/dist/assets/{Checkbox-pfFoKuJv.js → Checkbox-1a8RFsS4.js} +1 -1
- package/dist/assets/{ChevronRight-RwAcj313.js → ChevronRight-DuewvW-I.js} +1 -1
- package/dist/assets/DeleteOutline-8lAl_yeQ.js +1 -0
- package/dist/assets/{DialogContentText-sTkogqzq.js → DialogContentText-4V6Sm4oF.js} +1 -1
- package/dist/assets/Done-FhqUT9hq.js +1 -0
- package/dist/assets/Download-tyWSwX6I.js +1 -0
- package/dist/assets/Edit-5S1lkpDv.js +1 -0
- package/dist/assets/{EditIcon-xHBtFRw5.js → EditIcon-np_ORzEB.js} +1 -1
- package/dist/assets/ExpandMore-dUKN4QRy.js +1 -0
- package/dist/assets/{FilterList-41yZeIDY.js → FilterList--9H9DyuC.js} +3 -3
- package/dist/assets/{FormControl-v0eTeB2e.js → FormControl-21-o3Ons.js} +1 -1
- package/dist/assets/{FormControlLabel-GwWyZxgC.js → FormControlLabel-1hNnMean.js} +1 -1
- package/dist/assets/{FormGroup-SgkfjzE8.js → FormGroup-7d3FZFIj.js} +1 -1
- package/dist/assets/{Google-HPUKLxqx.js → Google-VkSesQr-.js} +1 -1
- package/dist/assets/{Grid-YkM__IXg.js → Grid-EWzEHkzI.js} +1 -1
- package/dist/assets/{Hidden-gw53iTuK.js → Hidden-V9GBUhSY.js} +1 -1
- package/dist/assets/{Icon-qZwOVGf4.js → Icon-4r9LeAsN.js} +1 -1
- package/dist/assets/InfoOutlined-pdQhXF08.js +1 -0
- package/dist/assets/{InputAdornment-fcMSBEY_.js → InputAdornment--qKRyOTU.js} +1 -1
- package/dist/assets/{InputLabel-wButS0La.js → InputLabel-5mwp9YPR.js} +1 -1
- package/dist/assets/{LastPage-3BnXJmTJ.js → LastPage-pSqTT0C0.js} +1 -1
- package/dist/assets/Launch-NG3M5y72.js +1 -0
- package/dist/assets/LaunchOutlined-XOhr4FLd.js +1 -0
- package/dist/assets/{ListItem-bKX4gR_9.js → ListItem-wpvL3uzC.js} +1 -1
- package/dist/assets/{LockIcon-JbTTMIYd.js → LockIcon-agQ4kFqe.js} +1 -1
- package/dist/assets/Loop-IzHJ-Vey.js +1 -0
- package/dist/assets/MoreHoriz-KVrwkgt7.js +1 -0
- package/dist/assets/{MoreVert-EZ2iGgaH.js → MoreVert-glDwWv1Q.js} +2 -2
- package/dist/assets/OpenInNew-gFVniujG.js +1 -0
- package/dist/assets/{Pagination-rRHeKBOF.js → Pagination-R_vvTBsr.js} +1 -1
- package/dist/assets/PlayArrow-ZBpW76Bk.js +1 -0
- package/dist/assets/{RadioGroup-_OsSax7E.js → RadioGroup-auvSkCcq.js} +1 -1
- package/dist/assets/Search-b15PzLFw.js +1 -0
- package/dist/assets/{Select-Ij2Jun8i.js → Select-wrtQaiA7.js} +1 -1
- package/dist/assets/{ServerLogo-gWq5OUO_.js → ServerLogo-vGEnqfsW.js} +1 -1
- package/dist/assets/{Skeleton-UiZMiSHu.js → Skeleton-JafD3Ykz.js} +1 -1
- package/dist/assets/{Slider-VWwvJ3Q0.js → Slider-7ZGPyLpu.js} +1 -1
- package/dist/assets/{Stepper-eS4dzjYb.js → Stepper-5Hb9COkE.js} +1 -1
- package/dist/assets/{TableRow-fzOFh_oI.js → TableRow-iLylb6bH.js} +1 -1
- package/dist/assets/{TextField-eXgwmwxj.js → TextField-F6GRkv0f.js} +1 -1
- package/dist/assets/{Toolbar-x7RFKGc3.js → Toolbar-PzPFhxha.js} +1 -1
- package/dist/assets/{access-control-hMevH1aL.js → access-control-ivdVi3Zl.js} +1 -1
- package/dist/assets/{actions-TU96BKon.js → actions-RmsyI4AF.js} +1 -1
- package/dist/assets/{add-component-core-ylX_8APK.js → add-component-core-pThuc3SC.js} +47 -47
- package/dist/assets/add-resource-6vlgGZkJ.js +1 -0
- package/dist/assets/{addon-L1nYGsLr.js → addon-1k5Qtdur.js} +1 -1
- package/dist/assets/{analytics-t4svdtmF.js → analytics-uuu9J4YR.js} +8 -8
- package/dist/assets/api-JcbF2ZX8.js +1 -0
- package/dist/assets/{audit-logs-Gg162kq3.js → audit-logs-lr4aoBwP.js} +1 -1
- package/dist/assets/{button-9m3oRVHq.js → button-49q1l_Jk.js} +1 -1
- package/dist/assets/{click-to-copy-6Ejqlbl5.js → click-to-copy-7zmc8KM7.js} +1 -1
- package/dist/assets/{complete-AaYT5QAB.js → complete-ksaTDs1d.js} +1 -1
- package/dist/assets/{component-jEes4wn7.js → component-cmCcdsTc.js} +29 -29
- package/dist/assets/{config-Kkt3UOJI.js → config-LAgF_LFO.js} +1 -1
- package/dist/assets/{config-navigation-TV0yaruy.js → config-navigation-kgGhXvRG.js} +1 -1
- package/dist/assets/config-zfsyTfJt.js +1 -0
- package/dist/assets/{confirm-FKxAX-vD.js → confirm-IbJOM7N5.js} +1 -1
- package/dist/assets/{confirm-NVMDg5RI.js → confirm-K5PhyaSE.js} +1 -1
- package/dist/assets/{connect-haACPhoK.js → connect-BZeJn_ku.js} +1 -1
- package/dist/assets/{connect-67idO3Ph.js → connect-iXFYp-0V.js} +1 -1
- package/dist/assets/{content-layout-luB2OoJR.js → content-layout-tLfWld_B.js} +1 -1
- package/dist/assets/dashboard-5KQ5Ur-Q.js +136 -0
- package/dist/assets/{did-address-mUc4Y20-.js → did-address-5kO4ybvH.js} +1 -1
- package/dist/assets/{did-utils-QS98CTPO.js → did-utils-N2ScOA2Z.js} +1 -1
- package/dist/assets/{domain-29BRKI9h.js → domain-1ugSZkUL.js} +1 -1
- package/dist/assets/domain-list-UlkqWCsm.js +12 -0
- package/dist/assets/{exchange-passport-f1SZNd4x.js → exchange-passport-1R-azVMk.js} +1 -1
- package/dist/assets/{fallback-PaGR08XT.js → fallback-ZY6DEOHk.js} +1 -1
- package/dist/assets/{format-error-4NwK9J29.js → format-error-fstt_Fgi.js} +1 -1
- package/dist/assets/{fuel-b0KAENfJ.js → fuel-tuPlyXKK.js} +1 -1
- package/dist/assets/{fullpage-_WJYf83J.js → fullpage-NJyn5uuM.js} +1 -1
- package/dist/assets/{home-Ivx_WPc0.js → home-0It-dY_Q.js} +1 -1
- package/dist/assets/{iframe-I_DQavu3.js → iframe-s-BtzLfM.js} +1 -1
- package/dist/assets/{index-PwuPRwMn.js → index-0Rghu4i-.js} +3 -3
- package/dist/assets/{index-5BDrgay-.js → index-5ZG2oxzS.js} +13 -13
- package/dist/assets/{index-Thfx8kQD.js → index-6Ubs0JHb.js} +1 -1
- package/dist/assets/{index-OyU9kT0G.js → index-7WXVYQMt.js} +1 -1
- package/dist/assets/{index-TFqh61lk.js → index-BptLF0Yu.js} +1 -1
- package/dist/assets/{index-iWsloYR-.js → index-CVik65v1.js} +1 -1
- package/dist/assets/{index-4G03rV80.js → index-DUU1rMX-.js} +1 -1
- package/dist/assets/{index-vQP4YCHN.js → index-FKI4Ry1a.js} +1 -1
- package/dist/assets/{index-fvWW0IUt.js → index-FjIp0UlP.js} +1 -1
- package/dist/assets/{index-p8rdvwoO.js → index-MReLu9-n.js} +1 -1
- package/dist/assets/{index-C8EjEFJN.js → index-Q3a71wh1.js} +23 -23
- package/dist/assets/{index-EdxXcbvd.js → index-QDdzoXvu.js} +1 -1
- package/dist/assets/{index-gIcq7LYr.js → index-Y2RH7k2W.js} +2 -2
- package/dist/assets/{index-Q2KraLoY.js → index-YQvahN6T.js} +1 -1
- package/dist/assets/{index-B2Jib_qi.js → index-YqUiAZGc.js} +1 -1
- package/dist/assets/{index-yofATYEc.js → index-akHKEyYq.js} +1 -1
- package/dist/assets/{index-Vwo7aMdQ.js → index-bZ3vw6Xd.js} +1 -1
- package/dist/assets/{index-17kMPOCc.js → index-d8x_hsVZ.js} +1 -1
- package/dist/assets/index-feKj5cCa.js +1442 -0
- package/dist/assets/{index-i7Ow7N5Z.js → index-gKtAtARS.js} +14 -14
- package/dist/assets/{index-cA3X58uQ.js → index-ibSCib5c.js} +3 -3
- package/dist/assets/index-jlbXeg5y.js +1 -0
- package/dist/assets/{index-BSh8wzUh.js → index-lDqI9_-C.js} +1 -1
- package/dist/assets/{index-DdkstYFC.js → index-oY9Vc1OW.js} +1 -1
- package/dist/assets/{index-87AfN2F8.js → index-qpETE7Qh.js} +1 -1
- package/dist/assets/{index-JqwgTYS6.js → index-vU8oFfNB.js} +1 -1
- package/dist/assets/index-w1QUchsj.js +126 -0
- package/dist/assets/{index.es-LLMjvPIy.js → index.es-KNfd6PLa.js} +1 -1
- package/dist/assets/{index.esm-eI_inmiY.js → index.esm-MvqHB13x.js} +1 -1
- package/dist/assets/{invite-BW0mYX8I.js → invite-U7HV2bOf.js} +1 -1
- package/dist/assets/{issue-passport-3pCwsS3r.js → issue-passport--ANeRPcP.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-MNya_k5W.js → jss-plugin-props-sort.esm-HmYxbLE7.js} +1 -1
- package/dist/assets/{launch-result-message-Hk1fQy57.js → launch-result-message-TcQH4jpT.js} +1 -1
- package/dist/assets/{layout-elAFJ4FF.js → layout-zmTL5DYX.js} +1 -1
- package/dist/assets/{list-header-Us8_bjV8.js → list-header--Vhbpfw2.js} +1 -1
- package/dist/assets/localization-vCyo8i6n.js +1 -0
- package/dist/assets/{log-szZDv5cA.js → log-kNDVvJse.js} +1 -1
- package/dist/assets/{login-j6Vv1NHJ.js → login-05AF3rUX.js} +1 -1
- package/dist/assets/{logo-uploader-SgB8kCkW.js → logo-uploader-e3Of5exH.js} +3 -3
- package/dist/assets/{lost-passport-jXsQBHJw.js → lost-passport-0uO9Guj6.js} +4 -4
- package/dist/assets/{lottie-FjNcYuDz.js → lottie-GIsmz4wu.js} +1 -1
- package/dist/assets/{memoize-one.esm-GXj7vDIE.js → memoize-one.esm-pefuu-zN.js} +1 -1
- package/dist/assets/{nav-menu-faDWYwo_.js → nav-menu-_j09OYoV.js} +7 -7
- package/dist/assets/notifications-Ldr7opjk.js +62 -0
- package/dist/assets/{overview-ilZiw5C7.js → overview-1XL_Qiy2.js} +1 -1
- package/dist/assets/page-header-LWFGDoxM.js +31 -0
- package/dist/assets/{permission-sB8VSoo2.js → permission-sTjN-J07.js} +1 -1
- package/dist/assets/preferences-VK9P9jKD.js +1 -0
- package/dist/assets/publish-resource-sQE_SSQq.js +1 -0
- package/dist/assets/{react-oxDWAOtJ.js → react-Z9fqICoT.js} +4 -4
- package/dist/assets/{selector-h5yloHKI.js → selector-r-EEnzvL.js} +1 -1
- package/dist/assets/session-otHGC7d2.js +1 -0
- package/dist/assets/{setup-1vHHMq6H.js → setup-yyKjCHgl.js} +3 -3
- package/dist/assets/{slicedToArray-7xRqglx6.js → slicedToArray-VCxJChO9.js} +2 -2
- package/dist/assets/{spaces-UOGj7Ssb.js → spaces-3IB4aUW-.js} +1 -1
- package/dist/assets/start-_dD57MgC.js +186 -0
- package/dist/assets/{step-actions-u4sEwj8l.js → step-actions-u5wVgCmC.js} +1 -1
- package/dist/assets/studio-HE-dnqpB.js +6 -0
- package/dist/assets/{switch-control-Wc5MlIpH.js → switch-control-QtA6jhKG.js} +1 -1
- package/dist/assets/{transfer-VUO9ygX_.js → transfer-jfS_LJKL.js} +1 -1
- package/dist/assets/{uniqBy-iEgks-vJ.js → uniqBy-VUHiGwLF.js} +1 -1
- package/dist/assets/{unsubscribe--bugVAVK.js → unsubscribe-dTRW-kgU.js} +1 -1
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-0kF4SQU7.js +1 -0
- package/dist/assets/{useAsync-jPfHNdGA.js → useAsync-Dmz5YLn0.js} +1 -1
- package/dist/assets/{useFormControl-KNSyfEVt.js → useFormControl-mI0MPYsh.js} +1 -1
- package/dist/assets/{useLocalStorage--76v1ZXm.js → useLocalStorage-aRRflkTR.js} +1 -1
- package/dist/assets/useSetState-a6nBCmZL.js +1 -0
- package/dist/assets/user-7RZ8cZci.js +22 -0
- package/dist/assets/{util-d7UDajXU.js → util-rU2tRtqs.js} +1 -1
- package/dist/assets/{wallet-hidden-topbar-A40myZlO.js → wallet-hidden-topbar-fLm2f0hp.js} +3 -3
- package/dist/assets/{wrap-locale-2MDYkyf1.js → wrap-locale-A7IdT91x.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +22 -22
- package/dist/assets/Add-7NNakwc_.js +0 -1
- package/dist/assets/ArrowDropDown-rOXH0UGm.js +0 -1
- package/dist/assets/CheckCircle-MudY10Kb.js +0 -1
- package/dist/assets/DeleteOutline-6up2qq9R.js +0 -1
- package/dist/assets/Done-MCWAlwFR.js +0 -1
- package/dist/assets/Download-m1-pOr7w.js +0 -1
- package/dist/assets/Edit-HypIX1_Y.js +0 -1
- package/dist/assets/ExpandMore-NVX5jNVq.js +0 -1
- package/dist/assets/InfoOutlined-XrC7_SL1.js +0 -1
- package/dist/assets/Launch-Hu_2a2vM.js +0 -1
- package/dist/assets/LaunchOutlined-koluPofV.js +0 -1
- package/dist/assets/Loop-1L7Vjeun.js +0 -1
- package/dist/assets/MoreHoriz-OdM1acmI.js +0 -1
- package/dist/assets/OpenInNew-b3rnf1l3.js +0 -1
- package/dist/assets/PlayArrow-jAJdJxEN.js +0 -1
- package/dist/assets/Search-Qa9ylVm2.js +0 -1
- package/dist/assets/add-resource-gBFROo59.js +0 -1
- package/dist/assets/api-gliNzA2D.js +0 -1
- package/dist/assets/config-zsZ_wFCW.js +0 -1
- package/dist/assets/dashboard-v_1ImHC1.js +0 -136
- package/dist/assets/domain-list-zhzJcV_A.js +0 -12
- package/dist/assets/index-CHDTx3qG.js +0 -126
- package/dist/assets/index-fmx4paNk.js +0 -1442
- package/dist/assets/index-qFOKnKtb.js +0 -1
- package/dist/assets/localization-wFo0GiUc.js +0 -1
- package/dist/assets/notifications-N19XW-R1.js +0 -62
- package/dist/assets/page-header-ddmwDxwc.js +0 -31
- package/dist/assets/preferences-oBVU4PhG.js +0 -1
- package/dist/assets/publish-resource-Q4defibE.js +0 -1
- package/dist/assets/session-jiGGNvRF.js +0 -1
- package/dist/assets/start-UtnkpzYf.js +0 -186
- package/dist/assets/studio-UEIzHvvr.js +0 -6
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-w6ZQzAFj.js +0 -1
- package/dist/assets/useSetState-Hs0SeJpE.js +0 -1
- package/dist/assets/user-B_olEtqq.js +0 -22
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{bw as X,r as W,bx as Y,by as _,al as C,j as e,d as L,aq as J,S as Q,u as S,bz as Z,av as ee,e as H,h as te,T as u,F as f,bA as q,b1 as F,aw as U,bB as $,n as w,bv as ne,N as se,$ as oe,B as D,bf as ae,bC as V,bk as N,w as O,R as re,G as ie,O as le}from"./index-feKj5cCa.js";import{H as ce}from"./index-FjIp0UlP.js";import{I as P}from"./index-BptLF0Yu.js";import{T as me}from"./index-bZ3vw6Xd.js";import{W as de}from"./did-address-5kO4ybvH.js";import{g as pe,U as ue,P as he}from"./did-utils-N2ScOA2Z.js";import{i as xe}from"./index-FKI4Ry1a.js";import{u as ge,a as fe,C as v}from"./index.esm-MvqHB13x.js";import{u as be}from"./confirm-K5PhyaSE.js";import{A as je}from"./Alert-cCkZfPX9.js";import{S as c,F as T}from"./FormControlLabel-1hNnMean.js";import{C as I}from"./Checkbox-1a8RFsS4.js";import{S as ve}from"./Select-wrtQaiA7.js";import{T as ye}from"./TextField-F6GRkv0f.js";import{M as we}from"./InputAdornment--qKRyOTU.js";import{f as B}from"./format-error-fstt_Fgi.js";import{A as Ce}from"./Avatar-jwVmwAdK.js";import"./fallback-ZY6DEOHk.js";import"./nav-menu-_j09OYoV.js";import"./MoreHoriz-KVrwkgt7.js";import"./ExpandMore-dUKN4QRy.js";import"./wallet-hidden-topbar-fLm2f0hp.js";import"./ListItem-wpvL3uzC.js";import"./selector-r-EEnzvL.js";import"./useFormControl-mI0MPYsh.js";import"./FormControl-21-o3Ons.js";import"./InputLabel-5mwp9YPR.js";var Se=function(n){var o=X(W.useState(n),2),i=o[0],t=o[1],a=W.useCallback(function(s){t(function(m){var d=Y(s)?s(m):s;return d?_(_({},m),d):m})},[]);return[i,a]};const ke=C(e.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"AddOutlined"),ze=C(e.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutlineOutlined"),Ae=C(e.jsx("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83V6.31l6-2.12 6 2.12zm-9.18-.5L7.4 12l3.54 3.54 5.66-5.66-1.41-1.41-4.24 4.24z"}),"GppGoodOutlined"),Te=C(e.jsx("path",{d:"m4.01 6.03 7.51 3.22-7.52-1zm7.5 8.72L4 17.97v-2.22zM2.01 3 2 10l15 2-15 2 .01 7L23 12z"}),"SendOutlined");function Ie({data:n,user:o,onChange:i}){const{t}=S(),{api:a}=L(),[s,m]=Se({editing:!1,dirty:!1}),{control:d,getValues:g,setValue:p,formState:x,handleSubmit:k}=ge({defaultValues:Z({notifications:{email:!0,wallet:!0,phone:!1},webhooks:[]},n)}),{confirmApi:z,confirmHolder:y}=be(),E=ee(),M=new URLSearchParams(E.search),G=H(),b=fe({control:d,name:"webhooks"}),A=async r=>{try{await a.post("/api/user/extra",r),w.success(t("common.saveSuccess")),m({editing:!1}),await i()}catch(l){w.error(B(l))}};te(()=>{if(M.get("action")==="unsubscribe"){const r=M.get("channel");["email","wallet","phone"].includes(r)&&(G(E.pathname,{replace:!0}),z.open({title:t("notification.email.disable"),content:t("notification.email.disableDescription"),async onConfirm(l){await A({notifications:{[r]:!1}}),l()}}))}});const K=async r=>{try{const l=g();await a.put("/api/user/extra",l.webhooks[r]),w.success(t("team.member.settings.tested"))}catch(l){w.error(B(l))}};return e.jsxs(c,{spacing:3,children:[e.jsxs(c,{sx:{width:"100%"},children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(u,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.notification")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:k(A),disabled:x.isSubmitting,children:t("common.save")})]}),e.jsx(v,{name:"notifications.wallet",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.wallet,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.wallet"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:pe(o)})]})})}),e.jsx(v,{name:"notifications.email",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.email,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.email"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:o.email||""})]})})}),e.jsx(v,{name:"notifications.phone",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.phone,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,disabled:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.phone"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:o.phone||""})]})})})]}),e.jsxs(c,{children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(u,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.webhook")}),e.jsxs(c,{direction:"row",children:[s.editing&&e.jsx(f,{variant:"text",size:"small",color:"primary",style:{height:"32px"},onClick:()=>m({editing:!1}),children:t("common.cancel")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:s.editing?k(A):()=>m({editing:!0}),disabled:x.isSubmitting,children:s.editing?t("common.save"):t("common.edit")})]})]}),b.fields.map((r,l)=>{var R;const h=(R=q(x.errors,`webhooks.${l}.url`))==null?void 0:R.message;return s.editing?e.jsxs(c,{mt:2,spacing:2,sx:{width:"100%"},direction:"row",alignItems:"center",children:[e.jsxs(c,{direction:"row",spacing:2,sx:{width:"80%"},children:[e.jsx(v,{name:`webhooks.${l}.type`,control:d,rules:{required:t("common.required")},render:({field:j})=>e.jsxs(ve,{...j,sx:{flex:1},fullWidth:!0,size:"small",children:[e.jsx(F,{value:"api",children:t("team.member.settings.url")}),e.jsx(F,{value:"slack",children:t("team.member.settings.slack")})]})}),e.jsx(v,{name:`webhooks.${l}.url`,control:d,rules:{required:t("common.required"),validate:j=>xe(j)||t("common.invalid")},render:({field:j})=>e.jsx(ye,{sx:{flex:4},fullWidth:!0,size:"small",required:!0,...j,error:!!h,InputProps:{endAdornment:h?e.jsx(we,{position:"end",children:e.jsx(u,{component:"span",color:"error",children:h})}):null}})})]}),e.jsxs(c,{direction:"row",spacing:1,children:[e.jsx(U,{size:"small",onClick:()=>K(l),children:e.jsx(Te,{color:"primary",sx:{opacity:.75}})}),e.jsx(U,{size:"small",onClick:()=>b.remove(l),children:e.jsx(ze,{color:"error",sx:{opacity:.75}})})]})]},r.id):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:r.type,children:r.url},r.id)}),!s.editing&&!b.fields.length&&e.jsx($,{children:t("common.empty")}),s.editing&&e.jsx(c,{mt:b.fields.length?2:1,direction:"row",justifyContent:"space-between",children:e.jsxs(f,{size:"small",variant:"outlined",color:"primary",onClick:()=>b.append({type:"slack",url:""}),children:[e.jsx(ke,{fontSize:"small"})," ",t("team.member.settings.add")]})})]}),y]})}function Pe({user:n}){const{api:o}=L(),{loading:i,error:t,runAsync:a,data:s}=J(()=>o.get("/api/user/extra").then(m=>m.data));return t?e.jsx(je,{severity:"error",children:t.message}):i||!s?e.jsx(Q,{}):e.jsx(Ie,{data:s,user:n,onChange:a})}function Le({user:n}){const{t:o,locale:i}=S(),t={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"};return[{name:o("team.member.name"),value:n.fullName},{name:o("common.email"),value:n.email},{name:o("common.phone"),value:n.phone},{name:o("team.member.lastLogin"),value:N(n.lastLoginAt,i)},{name:o("team.member.lastLoginIp"),value:n.lastLoginIp||""},{name:o("common.createdAt"),value:N(n.createdAt,i)},{name:o("team.member.source"),value:t[(n==null?void 0:n.sourceProvider)||O.USER_TYPE.WALLET]||(n==null?void 0:n.sourceProvider)}].filter(Boolean).map(s=>s.name===o("common.did")?e.jsx(P,{valueComponent:"div",nameWidth:120,name:s.name,nameFormatter:()=>o("common.did"),children:s.value},s.name):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:s.name,children:s.value},s.name))}function Oe({user:n}){const{t:o}=S(),i=(q(n,"passports")||[]).map(t=>({...t,revoked:t.status===O.PASSPORT_STATUS.REVOKED}));return i.length===0?e.jsx($,{children:o("common.empty")}):e.jsx(c,{direction:"row",spacing:3,children:i.map(t=>e.jsx(he,{passport:t,user:n,width:200,color:window.blocklet.passportColor,createPassportSvg:re,sx:{flexDirection:"column",alignItems:"center"}},t.id))})}function it(){const n=H(),o=ne(),{t:i}=S(),{session:t}=L(),a=se({user:t.user,tab:o.tab||"profile"}),s=p=>{a.tab=p,n(`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/user/${p}`)},m={info:{label:i("common.profile"),value:"profile",component:Le},oauth:{label:i("team.member.connections"),value:"connections",component:ue},passports:{label:i("team.member.passports"),value:"passports",component:Oe},settings:{label:i("common.setting"),value:"settings",component:Pe}},d=Object.values(m).map(({label:p,value:x})=>({label:p,value:x})).filter(p=>{var x;return p.value==="connections"?(((x=a.user)==null?void 0:x.connectedAccounts)||[]).find(z=>{var y;return z.provider!==(((y=a.user)==null?void 0:y.sourceProvider)||oe.LOGIN_PROVIDER.WALLET)}):!0}),g=m[a.tab]||m.info;return e.jsxs(e.Fragment,{children:[e.jsx(ce,{}),e.jsxs(Ee,{sx:{mt:4},children:[e.jsxs(c,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(c,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(Ce,{src:a.user.avatar,variant:"rounded",style:{width:80,height:80,backgroundColor:"transparent",marginRight:8}}),e.jsxs(c,{direction:"column",spacing:.5,children:[e.jsx(u,{variant:"h4",fontWeight:"bold",children:a.user.fullName}),e.jsx(D,{children:e.jsx(ae,{label:a.user.role.toUpperCase(),size:"small",variant:"outlined",color:"success",sx:{height:"auto",fontWeight:"bold",fontSize:"12px"},icon:e.jsx(Ae,{sx:{fontSize:"0.8em"}})})}),e.jsx(de,{did:a.user.did})]})]}),e.jsxs(c,{children:[a.tab==="profile"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchProfile(V,{}),children:i("team.member.switch.profile")}),a.tab==="passports"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchPassport(V,{}),children:i("team.member.switch.passport")})]})]}),e.jsx(D,{className:"tabs",sx:{my:3},children:e.jsx(me,{tabs:d,current:a.tab,onChange:s})}),e.jsx("div",{className:"body",children:e.jsx(g.component,{user:a.user})})]})]})}const Ee=ie(le)`
|
|
2
|
+
.MuiTab-root {
|
|
3
|
+
padding: 0;
|
|
4
|
+
margin-right: 24px;
|
|
5
|
+
min-height: 32px;
|
|
6
|
+
min-width: auto;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.MuiTabs-root {
|
|
10
|
+
min-height: 32px;
|
|
11
|
+
margin-bottom: 8px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.MuiTabs-scroller {
|
|
15
|
+
border-bottom: 1px solid #eee;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.MuiCheckbox-root {
|
|
19
|
+
padding-top: 2px;
|
|
20
|
+
padding-bottom: 2px;
|
|
21
|
+
}
|
|
22
|
+
`;export{Oe as UserPassports,Le as UserProfile,it as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aS as l,dA as s,dB as h,$ as P,w as d}from"./index-
|
|
1
|
+
import{aS as l,dA as s,dB as h,$ as P,w as d}from"./index-feKj5cCa.js";const u=s;var c=(e,r)=>u(e)===u(r);const E=l(c),x=(e,r)=>{if(e.type===d.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error(`${r("router.validation.redirectUrlRequired")}`);if(!e.redirectCode)return new Error(`redirect ${r("router.validation.redirectCodeRequired")}`)}else if(e.type===d.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(r("router.validation.didRequired"));return null},R=(e,r)=>{const t=x(e,r);return t||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(r("router.validation.pathPrefixTooLong",{length:150})):null:new Error(r("router.validation.pathPrefixCannotBeEmpty")))},v=({params:e,blocklets:r,blocklet:t,locale:o="en"})=>{if(t){let i=(t.children||[]).find(f=>h(f.meta)&&E(f.mountPoint,e.pathPrefix));if(t.meta.group!=="gateway"&&e.pathPrefix==="/"&&(i="/"),i)return{zh:`挂载点 ${e.pathPrefix} 已存在,请使用其他挂载点`,en:`The mount point ${e.pathPrefix} already exist, please use another mount point`}[o]}const a=r.find(i=>i.meta.did===e.did);if(!a)return"";const n=a.meta.interfaces.find(i=>i.type==="web");return n&&n.prefix!==P.BLOCKLET_DYNAMIC_PATH_PREFIX&&e.pathPrefix!==n.prefix?{zh:`该 blocklet 只能挂载在 ${n.prefix}`,en:`This blocklet can only be mounted on ${n.prefix}`}[o]:""},T=e=>{if(!e||typeof e!="string")return e;let r=e.trim();try{return r=r.toLowerCase(),r.startsWith("http://")||r.startsWith("https://")?new URL(r).hostname:r}catch(t){return console.error("format domain failed",t),r}};export{R as a,T as p,v};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ue=Object.defineProperty;var fe=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var B=(t,e,n)=>(fe(t,typeof e!="symbol"?e+"":e,n),n);import{aA as de,bD as pe,bE as he,aE as Z,bF as H,r as T,aC as ge,aD as me,aI as xt,bG as be,bH as ye,j as b,aG as wt,aH as xe,P as f,N as we,f as ve,aw as Ie,bI as vt,bo as Ce,bp as Se,bJ as Te,a7 as Ae,J as S,bm as Pe,B as je,bK as ke,T as Le,bL as Me,F as Oe,bM as Re,bd as _e,u as Ee,ax as qe,_ as Ne,Q as Fe}from"./index-
|
|
1
|
+
var ue=Object.defineProperty;var fe=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var B=(t,e,n)=>(fe(t,typeof e!="symbol"?e+"":e,n),n);import{aA as de,bD as pe,bE as he,aE as Z,bF as H,r as T,aC as ge,aD as me,aI as xt,bG as be,bH as ye,j as b,aG as wt,aH as xe,P as f,N as we,f as ve,aw as Ie,bI as vt,bo as Ce,bp as Se,bJ as Te,a7 as Ae,J as S,bm as Pe,B as je,bK as ke,T as Le,bL as Me,F as Oe,bM as Re,bd as _e,u as Ee,ax as qe,_ as Ne,Q as Fe}from"./index-feKj5cCa.js";import{l as L,g as $e,L as Be}from"./ListItem-wpvL3uzC.js";import{L as He}from"./selector-r-EEnzvL.js";const ze=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Ve=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},De=t=>{const{alignItems:e,classes:n,dense:r,disabled:o,disableGutters:s,divider:i,selected:a}=t,l=xe({root:["root",r&&"dense",!s&&"gutters",i&&"divider",o&&"disabled",e==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},$e,n);return Z({},n,l)},Ze=de(pe,{shouldForwardProp:t=>he(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Ve})(({theme:t,ownerState:e})=>Z({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${L.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:H(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${L.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:H(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${L.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:H(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:H(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${L.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${L.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),Ue=T.forwardRef(function(e,n){const r=ge({props:e,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:s=!1,component:i="div",children:a,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:x}=r,g=me(r,ze),y=T.useContext(xt),v=T.useMemo(()=>({dense:c||y.dense||!1,alignItems:o,disableGutters:l}),[o,y.dense,c,l]),C=T.useRef(null);be(()=>{s&&C.current&&C.current.focus()},[s]);const w=Z({},r,{alignItems:o,dense:v.dense,disableGutters:l,divider:u,selected:p}),m=De(w),Y=ye(C,n);return b.jsx(xt.Provider,{value:v,children:b.jsx(Ze,Z({ref:Y,href:g.href||g.to,component:(g.href||g.to)&&i==="div"?"button":i,focusVisibleClassName:wt(m.focusVisible,d),ownerState:w,className:wt(m.root,x)},g,{classes:m,children:a}))})}),Qe=Ue;/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -8,10 +8,10 @@ var ue=Object.defineProperty;var fe=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,config
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
* @version 1.0.8
|
|
11
|
-
*/const Ht=Object.freeze({left:0,top:0,width:16,height:16}),U=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),N=Object.freeze({...Ht,...U}),rt=Object.freeze({...N,body:"",hidden:!1}),Ge=Object.freeze({width:null,height:null}),zt=Object.freeze({...Ge,...U});function We(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:r(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return e}const Je=/[\s,]+/;function Xe(t,e){e.split(Je).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const Vt={...zt,preserveAspectRatio:""};function It(t){const e={...Vt},n=(r,o)=>t.getAttribute(r)||o;return e.width=n("width",null),e.height=n("height",null),e.rotate=We(n("rotate","")),Xe(e,n("flip","")),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}function Ye(t,e){for(const n in Vt)if(t[n]!==e[n])return!0;return!1}const O=/^[a-z0-9]+(-[a-z0-9]+)*$/,F=(t,e,n,r="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return e&&!V(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return e&&!V(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return e&&!V(a,n)?null:a}return null},V=(t,e)=>t?!!((t.provider===""||t.provider.match(O))&&(e&&t.prefix===""||t.prefix.match(O))&&t.name.match(O)):!1;function Ke(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function Ct(t,e){const n=Ke(t,e);for(const r in rt)r in U?r in t&&!(r in n)&&(n[r]=U[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function tn(t,e){const n=t.icons,r=t.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(e||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function en(t,e,n){const r=t.icons,o=t.aliases||Object.create(null);let s={};function i(a){s=Ct(r[a]||o[a],s)}return i(e),n.forEach(i),Ct(t,s)}function Dt(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const r=tn(t);for(const o in r){const s=r[o];s&&(e(o,en(t,o,s)),n.push(o))}return n}const nn={provider:"",aliases:{},not_found:{},...Ht};function tt(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Zt(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!tt(t,nn))return null;const n=e.icons;for(const o in n){const s=n[o];if(!o.match(O)||typeof s.body!="string"||!tt(s,rt))return null}const r=e.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(O)||typeof i!="string"||!n[i]&&!r[i]||!tt(s,rt))return null}return e}const Q=Object.create(null);function on(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function A(t,e){const n=Q[t]||(Q[t]=Object.create(null));return n[e]||(n[e]=on(t,e))}function dt(t,e){return Zt(e)?Dt(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function rn(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}function sn(t,e){let n=[];return(typeof t=="string"?[t]:Object.keys(Q)).forEach(o=>{(typeof o=="string"&&typeof e=="string"?[e]:Object.keys(Q[o]||{})).forEach(i=>{const a=A(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let _=!1;function Ut(t){return typeof t=="boolean"&&(_=t),_}function E(t){const e=typeof t=="string"?F(t,!0,_):t;if(e){const n=A(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Qt(t,e){const n=F(t,!0,_);if(!n)return!1;const r=A(n.provider,n.prefix);return rn(r,n.name,e)}function St(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),_&&!e&&!t.prefix){let o=!1;return Zt(t)&&(t.prefix="",Dt(t,(s,i)=>{i&&Qt(s,i)&&(o=!0)})),o}const n=t.prefix;if(!V({provider:e,prefix:n,name:"a"}))return!1;const r=A(e,n);return!!dt(r,t)}function cn(t){return!!E(t)}function an(t){const e=E(t);return e?{...N,...e}:null}function ln(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return t.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=A(s,i));let u;a in l.icons?u=e.loaded:i===""||l.missing.has(a)?u=e.missing:u=e.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),e}function Gt(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==e))})}function un(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,o=t.prefix;e.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(t.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(t.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Gt([t],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let fn=0;function dn(t,e,n){const r=fn++,o=Gt.bind(null,n,r);if(!e.pending.length)return o;const s={id:r,icons:e,callback:t,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const st=Object.create(null);function Tt(t,e){st[t]=e}function it(t){return st[t]||st[""]}function pn(t,e=!0,n=!1){const r=[];return t.forEach(o=>{const s=typeof o=="string"?F(o,e,n):o;s&&r.push(s)}),r}var hn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function gn(t,e,n,r){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let h=t.resources.slice(0);for(i=[];h.length>1;){const I=Math.floor(Math.random()*h.length);i.push(h[I]),h=h.slice(0,I).concat(h.slice(I+1))}i=i.concat(h)}else i=t.resources.slice(s).concat(t.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],x=[];typeof r=="function"&&x.push(r);function g(){d&&(clearTimeout(d),d=null)}function y(){c==="pending"&&(c="aborted"),g(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function v(h,I){I&&(x=[]),typeof h=="function"&&x.push(h)}function C(){return{startTime:a,payload:e,status:c,queriesSent:l,queriesPending:p.length,subscribe:v,abort:y}}function w(){c="failed",x.forEach(h=>{h(void 0,u)})}function m(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function Y(h,I,k){const $=I!=="success";switch(p=p.filter(P=>P!==h),c){case"pending":break;case"failed":if($||!t.dataAfterTimeout)return;break;default:return}if(I==="abort"){u=k,w();return}if($){u=k,p.length||(i.length?K():w());return}if(g(),m(),!t.random){const P=t.resources.indexOf(h.resource);P!==-1&&P!==t.index&&(t.index=P)}c="completed",x.forEach(P=>{P(k)})}function K(){if(c!=="pending")return;g();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{g(),c==="pending"&&(m(),w())},t.timeout);return}w();return}const I={status:"pending",resource:h,callback:(k,$)=>{Y(I,k,$)}};p.push(I),l++,d=setTimeout(K,t.rotate),n(h,e,I.callback)}return setTimeout(K),C}function Wt(t){const e={...hn,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=gn(e,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function pt(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const W=Object.create(null),M=["https://api.simplesvg.com","https://api.unisvg.com"],D=[];for(;M.length>0;)M.length===1||Math.random()>.5?D.push(M.shift()):D.push(M.pop());W[""]=pt({resources:["https://api.iconify.design"].concat(D)});function At(t,e){const n=pt(e);return n===null?!1:(W[t]=n,!0)}function J(t){return W[t]}function mn(){return Object.keys(W)}function Pt(){}const et=Object.create(null);function bn(t){if(!et[t]){const e=J(t);if(!e)return;const n=Wt(e),r={config:e,redundancy:n};et[t]=r}return et[t]}function Jt(t,e,n){let r,o;if(typeof t=="string"){const s=it(t);if(!s)return n(void 0,424),Pt;o=s.send;const i=bn(t);i&&(r=i.redundancy)}else{const s=pt(t);if(s){r=Wt(s);const i=t.resources?t.resources[0]:"",a=it(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Pt):r.query(e,o,n)().abort}const jt="iconify2",q="iconify",Xt=q+"-count",kt=q+"-version",Yt=36e5,yn=168;function ct(t,e){try{return t.getItem(e)}catch{}}function ht(t,e,n){try{return t.setItem(e,n),!0}catch{}}function Lt(t,e){try{t.removeItem(e)}catch{}}function at(t,e){return ht(t,Xt,e.toString())}function lt(t){return parseInt(ct(t,Xt))||0}const j={local:!0,session:!0},Kt={local:new Set,session:new Set};let gt=!1;function xn(t){gt=t}let z=typeof window>"u"?{}:window;function te(t){const e=t+"Storage";try{if(z&&z[e]&&typeof z[e].length=="number")return z[e]}catch{}j[t]=!1}function ee(t,e){const n=te(t);if(!n)return;const r=ct(n,kt);if(r!==jt){if(r){const a=lt(n);for(let c=0;c<a;c++)Lt(n,q+c.toString())}ht(n,kt,jt),at(n,0);return}const o=Math.floor(Date.now()/Yt)-yn,s=a=>{const c=q+a.toString(),l=ct(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&e(u,a))return!0}catch{}Lt(n,c)}};let i=lt(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,at(n,i)):Kt[t].add(a))}function ne(){if(!gt){xn(!0);for(const t in j)ee(t,e=>{const n=e.data,r=e.provider,o=n.prefix,s=A(r,o);if(!dt(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function wn(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in j)ee(r,o=>{const s=o.data;return o.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===e});return!0}function vn(t,e){gt||ne();function n(r){let o;if(!j[r]||!(o=te(r)))return;const s=Kt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=lt(o),!at(o,i+1))return;const a={cached:Math.floor(Date.now()/Yt),provider:t.provider,data:e};return ht(o,q+i.toString(),JSON.stringify(a))}e.lastModified&&!wn(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function Mt(){}function In(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,un(t)}))}function Cn(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,o=t.iconsToLoad;delete t.iconsToLoad;let s;if(!o||!(s=it(n)))return;s.prepare(n,r,o).forEach(a=>{Jt(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{t.missing.add(l)});else try{const l=dt(t,c);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),vn(t,c)}catch(l){console.error(l)}In(t)})})}))}const mt=(t,e)=>{const n=pn(t,!0,Ut()),r=ln(n);if(!r.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(r.loaded,r.missing,r.pending,Mt)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(A(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=A(l,u),x=p.pendingIcons||(p.pendingIcons=new Set);x.has(d)||(x.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&Cn(c,o[l][u])}),e?dn(e,r,s):Mt},Sn=t=>new Promise((e,n)=>{const r=typeof t=="string"?F(t,!0):t;if(!r){n(t);return}mt([r||t],o=>{if(o.length&&r){const s=E(r);if(s){e({...N,...s});return}}n(t)})});function Tn(t){try{const e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function An(t,e){const n=typeof t=="string"?F(t,!0,!0):null;if(!n){const s=Tn(t);return{value:t,data:s}}const r=E(n);if(r!==void 0||!n.prefix)return{value:t,name:n,data:r};const o=mt([n],()=>e(t,n,E(n)));return{value:t,name:n,loading:o}}function nt(t){return t.hasAttribute("inline")}let oe=!1;try{oe=navigator.vendor.indexOf("Apple")===0}catch{}function Pn(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(oe||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const jn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,kn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ut(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(jn);if(r===null||!r.length)return t;const o=[];let s=r.shift(),i=kn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*e*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const Ln=t=>t==="unset"||t==="undefined"||t==="none";function re(t,e){const n={...N,...t},r={...zt,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],v=g.hFlip,C=g.vFlip;let w=g.rotate;v?C?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):C&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let m;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:m=o.height/2+o.top,y.unshift("rotate(90 "+m.toString()+" "+m.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:m=o.width/2+o.left,y.unshift("rotate(-90 "+m.toString()+" "+m.toString()+")");break}w%2===1&&(o.left!==o.top&&(m=o.left,o.left=o.top,o.top=m),o.width!==o.height&&(m=o.width,o.width=o.height,o.height=m)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ut(d,c/l)):(u=i==="auto"?c:i,d=a===null?ut(u,l/c):a==="auto"?l:a);const p={},x=(g,y)=>{Ln(y)||(p[g]=y.toString())};return x("width",u),x("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const Mn=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let G=Mn();function On(t){G=t}function Rn(){return G}function _n(t,e){const n=J(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=e+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function En(t){return t===404}const qn=(t,e,n)=>{const r=[],o=_n(t,e),s="icons";let i={type:s,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:t,prefix:e,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Nn(t){if(typeof t=="string"){const e=J(t);if(e)return e.path}return"/"}const Fn=(t,e,n)=>{if(!G){n("abort",424);return}let r=Nn(e.provider);switch(e.type){case"icons":{const s=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=e.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;G(t+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(En(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},$n={prepare:qn,send:Fn};function Ot(t,e){switch(t){case"local":case"session":j[t]=e;break;case"all":for(const n in j)j[n]=e;break}}const ot="data-style";let se="";function Bn(t){se=t}function Rt(t,e){let n=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(ot));n||(n=document.createElement("style"),n.setAttribute(ot,ot),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+se}function ie(){Tt("",$n),Ut(!0);let t;try{t=window}catch{}if(t){if(ne(),t.IconifyPreload!==void 0){const n=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!St(o))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const n=t.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;At(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Ot(n,!0),disableCache:n=>Ot(n,!1),iconExists:cn,getIcon:an,listIcons:sn,addIcon:Qt,addCollection:St,calculateSize:ut,buildIcon:re,loadIcons:mt,loadIcon:Sn,addAPIProvider:At,appendCustomStyle:Bn,_api:{getAPIConfig:J,setAPIModule:Tt,sendAPIQuery:Jt,setFetch:On,getFetch:Rn,listAPIProviders:mn}}}function ce(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Hn(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function zn(t){return"data:image/svg+xml,"+Hn(t)}function Vn(t){return'url("'+zn(t)+'")'}const ft={"background-color":"currentColor"},ae={"background-color":"transparent"},_t={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Et={"-webkit-mask":ft,mask:ft,background:ae};for(const t in Et){const e=Et[t];for(const n in _t)e[t+"-"+n]=_t[n]}function qt(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Dn(t,e,n){const r=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=t.attributes,i=ce(o,{...s,width:e.width+"",height:e.height+""}),a=Vn(i),c=r.style,l={"--svg":a,width:qt(s.width),height:qt(s.height),...n?ft:ae};for(const u in l)c.setProperty(u,l[u]);return r}let R;function Zn(){try{R=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{R=null}}function Un(t){return R===void 0&&Zn(),R?R.createHTML(t):t}function Qn(t){const e=document.createElement("span"),n=t.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ce(t.body,n);return e.innerHTML=Un(o),e.firstChild}function Nt(t,e){const n=e.icon.data,r=e.customisations,o=re(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=e.renderedMode;let i;switch(s){case"svg":i=Qn(o);break;default:i=Dn(o,{...N,...n},s==="mask")}const a=Array.from(t.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):t.replaceChild(i,a):t.appendChild(i)}function Ft(t,e,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:r}}function Gn(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch{return}if(!e||!n)return;const r=e.get(t);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();B(this,"_shadowRoot");B(this,"_state");B(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=nt(this);Rt(c,l),this._state=Ft({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=nt(this),u=this._state;l!==u.inline&&(u.inline=l,Rt(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return nt(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Nt(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=It(this);(c.attrMode!==u||Ye(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=An(c,(u,d,p)=>{const x=this._state;if(x.rendered||this.getAttribute("icon")!==u)return;const g={value:u,name:d,data:p};g.data?this._gotIconData(g):x.icon=g});l.data?this._gotIconData(l):this._state=Ft(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,It(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=Pn(c.data.body,u),p=this._state.inline;Nt(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ie();for(const a in i)s[a]=s.prototype[a]=i[a];return e.define(t,s),s}Gn()||ie();const uo=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),Wn=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),X=(t,e,n="children")=>t.map(r=>Array.isArray(r[n])?e({...r,[n]:X(r[n],e,n)}):e(r)),fo=(t,e="children")=>{const n=[];return X(t,r=>n.push(r),e),n},bt=(t,e,n="children")=>t.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=bt(o,e,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return e(r,s)}),Jn=t=>/^https?:\/\//.test(t),po=t=>/^[\w-]+:[\w-]+$/.test(t),Xn=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const e=o=>o.endsWith("/")?o:`${o}/`,n=e(window.location.pathname),r=e(new URL(t,window.location.origin).pathname);return n.startsWith(r)},ho=(t=[])=>{const e=t.map((r,o)=>({path:r,index:o})).filter(r=>Xn(r.path));return e!=null&&e.length?e.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,e[0]).index:-1};var $t,Bt;const go=(($t=window==null?void 0:window.blocklet)==null?void 0:$t.groupPrefix)||((Bt=window==null?void 0:window.blocklet)==null?void 0:Bt.prefix)||"/",Yn=t=>{const e={...t},n=t==null?void 0:t.background;return typeof n=="string"?e.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(e.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),e},Kn=(t,e="en")=>{if(!(t!=null&&t.length))return t;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(Jn(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return X(t,o=>{var s;return{...o,title:n(o.title,e),link:(s=o.items)!=null&&s.length?o.link:r(o.link,e)}},"items")},to=t=>X(t,e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e,"items"),eo=t=>{if(!(t!=null&&t.length))return null;const e=to(t),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[]};return e.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},mo=t=>{if(!t)return null;const e={...t};return e.theme=Yn(e.theme),e.navigation=eo(no(e.navigation)),e},no=(t=[])=>bt(t,(e,n)=>{var r;return!!e.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),oo=(t,e)=>bt(t,(n,r)=>{var s;const o=!n.role||e&&n.role.includes(e);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),ro={width:24,height:24,body:'<path fill="currentColor" d="M13 8V4q0-.425.288-.713T14 3h6q.425 0 .713.288T21 4v4q0 .425-.288.713T20 9h-6q-.425 0-.713-.288T13 8ZM3 12V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v8q0 .425-.288.713T10 13H4q-.425 0-.713-.288T3 12Zm10 8v-8q0-.425.288-.713T14 11h6q.425 0 .713.288T21 12v8q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-4q0-.425.288-.713T4 15h6q.425 0 .713.288T11 16v4q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20Zm2-9h4V5H5v6Zm10 8h4v-6h-4v6Zm0-12h4V5h-4v2ZM5 19h4v-2H5v2Zm4-8Zm6-4Zm0 6Zm-6 4Z"/>'},so={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function yt({session:t,locale:e,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=t==null?void 0:t.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=T.useRef(null),i=we({open:!1}),a=ve((c=!i.open)=>{i.open=c});return o.length===0?null:b.jsxs(b.Fragment,{children:[b.jsx(Ie,{size:"medium",ref:s,onClick:()=>a(),children:b.jsx(vt,{icon:ro,fontSize:n,style:{transform:"scale(1.10)"}})}),b.jsx(Ce,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>b.jsx(Se,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:b.jsx(Te,{...c,timeout:350,children:b.jsxs(Ae,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:S.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${S.gray6}, 0px 0px 0px 1px ${S.gray6}`},children:[b.jsx(Pe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u,d;return b.jsx(Be,{disablePadding:!0,children:b.jsxs(Qe,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:S.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?b.jsx(je,{component:"img",src:`${ke}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):b.jsx(vt,{fontSize:50,icon:l.icon||so,color:S.textSubtitle}),b.jsx(Le,{sx:{fontSize:"12px",color:S.textBase,textAlign:"center",lineHeight:"normal"},children:((d=l.title)==null?void 0:d.zh)||l.title})]})},l.id)})}),b.jsx(Me,{session:t,children:b.jsx(Oe,{variant:"outlined",fullWidth:!0,href:Re,sx:{mt:1,borderRadius:2,color:S.textBase,borderColor:S.lineBorderStrong,"&:hover":{color:S.primaryBase,borderColor:S.primaryBase}},children:e==="zh"?"管理":"Manage"})})]})})})})]})}yt.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};yt.defaultProps={locale:"en",size:24};function le({formattedBlocklet:t,addons:e,sessionManagerProps:n}){var p,x,g,y;const r=T.useContext(_e),{locale:o}=Ee()||{},{enableConnect:s=!0,enableLocale:i=!0}=t,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=Kn((x=t==null?void 0:t.navigation)==null?void 0:x.sessionManager,o)||[];c=oo(c,(y=(g=r==null?void 0:r.session)==null?void 0:g.user)==null?void 0:y.role);const u=(()=>{if(e&&typeof e!="function")return Array.isArray(e)?e:[e];let v=[];if(i&&o&&v.push(b.jsx(He,{showText:!1},"locale-selector")),s&&r){const C=[];a&&(c?c.slice(0,5):[]).forEach(m=>{C.push({label:m.title,icon:m.icon?b.jsx("iconify-icon",{icon:m.icon,height:24,style:{marginRight:8}}):null,component:"a",href:m.link,key:m.link})}),v.push(b.jsx(yt,{session:r.session,locale:o},"session-blocklet")),v.push(b.jsx(qe,{session:r.session,locale:o,menu:C,showRole:!0,...n},"session-user"))}return typeof e=="function"&&(v=e(v)||[]),v})();return T.createElement(b.Fragment,null,...Array.isArray(u)?u:[u])}le.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:Wn};le.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const bo=()=>{const t=Ne();T.useEffect(()=>{t.wallet&&Fe(()=>import("./index-OyU9kT0G.js").then(e=>e.i),__vite__mapDeps([0,1,2])).then(e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")}).catch(e=>{console.error("load dsbridge error",e)})},[t])};export{le as H,Qe as L,oo as a,uo as b,fo as c,ho as d,po as e,mo as f,Kn as g,Jn as i,X as m,go as p,Wn as s,bo as u};
|
|
11
|
+
*/const Ht=Object.freeze({left:0,top:0,width:16,height:16}),U=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),N=Object.freeze({...Ht,...U}),rt=Object.freeze({...N,body:"",hidden:!1}),Ge=Object.freeze({width:null,height:null}),zt=Object.freeze({...Ge,...U});function We(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:r(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return e}const Je=/[\s,]+/;function Xe(t,e){e.split(Je).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const Vt={...zt,preserveAspectRatio:""};function It(t){const e={...Vt},n=(r,o)=>t.getAttribute(r)||o;return e.width=n("width",null),e.height=n("height",null),e.rotate=We(n("rotate","")),Xe(e,n("flip","")),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}function Ye(t,e){for(const n in Vt)if(t[n]!==e[n])return!0;return!1}const O=/^[a-z0-9]+(-[a-z0-9]+)*$/,F=(t,e,n,r="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return e&&!V(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return e&&!V(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return e&&!V(a,n)?null:a}return null},V=(t,e)=>t?!!((t.provider===""||t.provider.match(O))&&(e&&t.prefix===""||t.prefix.match(O))&&t.name.match(O)):!1;function Ke(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function Ct(t,e){const n=Ke(t,e);for(const r in rt)r in U?r in t&&!(r in n)&&(n[r]=U[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function tn(t,e){const n=t.icons,r=t.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(e||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function en(t,e,n){const r=t.icons,o=t.aliases||Object.create(null);let s={};function i(a){s=Ct(r[a]||o[a],s)}return i(e),n.forEach(i),Ct(t,s)}function Dt(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const r=tn(t);for(const o in r){const s=r[o];s&&(e(o,en(t,o,s)),n.push(o))}return n}const nn={provider:"",aliases:{},not_found:{},...Ht};function tt(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Zt(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!tt(t,nn))return null;const n=e.icons;for(const o in n){const s=n[o];if(!o.match(O)||typeof s.body!="string"||!tt(s,rt))return null}const r=e.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(O)||typeof i!="string"||!n[i]&&!r[i]||!tt(s,rt))return null}return e}const Q=Object.create(null);function on(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function A(t,e){const n=Q[t]||(Q[t]=Object.create(null));return n[e]||(n[e]=on(t,e))}function dt(t,e){return Zt(e)?Dt(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function rn(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}function sn(t,e){let n=[];return(typeof t=="string"?[t]:Object.keys(Q)).forEach(o=>{(typeof o=="string"&&typeof e=="string"?[e]:Object.keys(Q[o]||{})).forEach(i=>{const a=A(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let _=!1;function Ut(t){return typeof t=="boolean"&&(_=t),_}function E(t){const e=typeof t=="string"?F(t,!0,_):t;if(e){const n=A(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Qt(t,e){const n=F(t,!0,_);if(!n)return!1;const r=A(n.provider,n.prefix);return rn(r,n.name,e)}function St(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),_&&!e&&!t.prefix){let o=!1;return Zt(t)&&(t.prefix="",Dt(t,(s,i)=>{i&&Qt(s,i)&&(o=!0)})),o}const n=t.prefix;if(!V({provider:e,prefix:n,name:"a"}))return!1;const r=A(e,n);return!!dt(r,t)}function cn(t){return!!E(t)}function an(t){const e=E(t);return e?{...N,...e}:null}function ln(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return t.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=A(s,i));let u;a in l.icons?u=e.loaded:i===""||l.missing.has(a)?u=e.missing:u=e.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),e}function Gt(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==e))})}function un(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,o=t.prefix;e.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(t.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(t.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Gt([t],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let fn=0;function dn(t,e,n){const r=fn++,o=Gt.bind(null,n,r);if(!e.pending.length)return o;const s={id:r,icons:e,callback:t,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const st=Object.create(null);function Tt(t,e){st[t]=e}function it(t){return st[t]||st[""]}function pn(t,e=!0,n=!1){const r=[];return t.forEach(o=>{const s=typeof o=="string"?F(o,e,n):o;s&&r.push(s)}),r}var hn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function gn(t,e,n,r){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let h=t.resources.slice(0);for(i=[];h.length>1;){const I=Math.floor(Math.random()*h.length);i.push(h[I]),h=h.slice(0,I).concat(h.slice(I+1))}i=i.concat(h)}else i=t.resources.slice(s).concat(t.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],x=[];typeof r=="function"&&x.push(r);function g(){d&&(clearTimeout(d),d=null)}function y(){c==="pending"&&(c="aborted"),g(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function v(h,I){I&&(x=[]),typeof h=="function"&&x.push(h)}function C(){return{startTime:a,payload:e,status:c,queriesSent:l,queriesPending:p.length,subscribe:v,abort:y}}function w(){c="failed",x.forEach(h=>{h(void 0,u)})}function m(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function Y(h,I,k){const $=I!=="success";switch(p=p.filter(P=>P!==h),c){case"pending":break;case"failed":if($||!t.dataAfterTimeout)return;break;default:return}if(I==="abort"){u=k,w();return}if($){u=k,p.length||(i.length?K():w());return}if(g(),m(),!t.random){const P=t.resources.indexOf(h.resource);P!==-1&&P!==t.index&&(t.index=P)}c="completed",x.forEach(P=>{P(k)})}function K(){if(c!=="pending")return;g();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{g(),c==="pending"&&(m(),w())},t.timeout);return}w();return}const I={status:"pending",resource:h,callback:(k,$)=>{Y(I,k,$)}};p.push(I),l++,d=setTimeout(K,t.rotate),n(h,e,I.callback)}return setTimeout(K),C}function Wt(t){const e={...hn,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=gn(e,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function pt(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const W=Object.create(null),M=["https://api.simplesvg.com","https://api.unisvg.com"],D=[];for(;M.length>0;)M.length===1||Math.random()>.5?D.push(M.shift()):D.push(M.pop());W[""]=pt({resources:["https://api.iconify.design"].concat(D)});function At(t,e){const n=pt(e);return n===null?!1:(W[t]=n,!0)}function J(t){return W[t]}function mn(){return Object.keys(W)}function Pt(){}const et=Object.create(null);function bn(t){if(!et[t]){const e=J(t);if(!e)return;const n=Wt(e),r={config:e,redundancy:n};et[t]=r}return et[t]}function Jt(t,e,n){let r,o;if(typeof t=="string"){const s=it(t);if(!s)return n(void 0,424),Pt;o=s.send;const i=bn(t);i&&(r=i.redundancy)}else{const s=pt(t);if(s){r=Wt(s);const i=t.resources?t.resources[0]:"",a=it(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Pt):r.query(e,o,n)().abort}const jt="iconify2",q="iconify",Xt=q+"-count",kt=q+"-version",Yt=36e5,yn=168;function ct(t,e){try{return t.getItem(e)}catch{}}function ht(t,e,n){try{return t.setItem(e,n),!0}catch{}}function Lt(t,e){try{t.removeItem(e)}catch{}}function at(t,e){return ht(t,Xt,e.toString())}function lt(t){return parseInt(ct(t,Xt))||0}const j={local:!0,session:!0},Kt={local:new Set,session:new Set};let gt=!1;function xn(t){gt=t}let z=typeof window>"u"?{}:window;function te(t){const e=t+"Storage";try{if(z&&z[e]&&typeof z[e].length=="number")return z[e]}catch{}j[t]=!1}function ee(t,e){const n=te(t);if(!n)return;const r=ct(n,kt);if(r!==jt){if(r){const a=lt(n);for(let c=0;c<a;c++)Lt(n,q+c.toString())}ht(n,kt,jt),at(n,0);return}const o=Math.floor(Date.now()/Yt)-yn,s=a=>{const c=q+a.toString(),l=ct(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&e(u,a))return!0}catch{}Lt(n,c)}};let i=lt(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,at(n,i)):Kt[t].add(a))}function ne(){if(!gt){xn(!0);for(const t in j)ee(t,e=>{const n=e.data,r=e.provider,o=n.prefix,s=A(r,o);if(!dt(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function wn(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in j)ee(r,o=>{const s=o.data;return o.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===e});return!0}function vn(t,e){gt||ne();function n(r){let o;if(!j[r]||!(o=te(r)))return;const s=Kt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=lt(o),!at(o,i+1))return;const a={cached:Math.floor(Date.now()/Yt),provider:t.provider,data:e};return ht(o,q+i.toString(),JSON.stringify(a))}e.lastModified&&!wn(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function Mt(){}function In(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,un(t)}))}function Cn(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,o=t.iconsToLoad;delete t.iconsToLoad;let s;if(!o||!(s=it(n)))return;s.prepare(n,r,o).forEach(a=>{Jt(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{t.missing.add(l)});else try{const l=dt(t,c);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),vn(t,c)}catch(l){console.error(l)}In(t)})})}))}const mt=(t,e)=>{const n=pn(t,!0,Ut()),r=ln(n);if(!r.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(r.loaded,r.missing,r.pending,Mt)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(A(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=A(l,u),x=p.pendingIcons||(p.pendingIcons=new Set);x.has(d)||(x.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&Cn(c,o[l][u])}),e?dn(e,r,s):Mt},Sn=t=>new Promise((e,n)=>{const r=typeof t=="string"?F(t,!0):t;if(!r){n(t);return}mt([r||t],o=>{if(o.length&&r){const s=E(r);if(s){e({...N,...s});return}}n(t)})});function Tn(t){try{const e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function An(t,e){const n=typeof t=="string"?F(t,!0,!0):null;if(!n){const s=Tn(t);return{value:t,data:s}}const r=E(n);if(r!==void 0||!n.prefix)return{value:t,name:n,data:r};const o=mt([n],()=>e(t,n,E(n)));return{value:t,name:n,loading:o}}function nt(t){return t.hasAttribute("inline")}let oe=!1;try{oe=navigator.vendor.indexOf("Apple")===0}catch{}function Pn(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(oe||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const jn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,kn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ut(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(jn);if(r===null||!r.length)return t;const o=[];let s=r.shift(),i=kn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*e*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const Ln=t=>t==="unset"||t==="undefined"||t==="none";function re(t,e){const n={...N,...t},r={...zt,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],v=g.hFlip,C=g.vFlip;let w=g.rotate;v?C?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):C&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let m;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:m=o.height/2+o.top,y.unshift("rotate(90 "+m.toString()+" "+m.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:m=o.width/2+o.left,y.unshift("rotate(-90 "+m.toString()+" "+m.toString()+")");break}w%2===1&&(o.left!==o.top&&(m=o.left,o.left=o.top,o.top=m),o.width!==o.height&&(m=o.width,o.width=o.height,o.height=m)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ut(d,c/l)):(u=i==="auto"?c:i,d=a===null?ut(u,l/c):a==="auto"?l:a);const p={},x=(g,y)=>{Ln(y)||(p[g]=y.toString())};return x("width",u),x("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const Mn=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let G=Mn();function On(t){G=t}function Rn(){return G}function _n(t,e){const n=J(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=e+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function En(t){return t===404}const qn=(t,e,n)=>{const r=[],o=_n(t,e),s="icons";let i={type:s,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:t,prefix:e,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Nn(t){if(typeof t=="string"){const e=J(t);if(e)return e.path}return"/"}const Fn=(t,e,n)=>{if(!G){n("abort",424);return}let r=Nn(e.provider);switch(e.type){case"icons":{const s=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=e.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;G(t+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(En(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},$n={prepare:qn,send:Fn};function Ot(t,e){switch(t){case"local":case"session":j[t]=e;break;case"all":for(const n in j)j[n]=e;break}}const ot="data-style";let se="";function Bn(t){se=t}function Rt(t,e){let n=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(ot));n||(n=document.createElement("style"),n.setAttribute(ot,ot),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+se}function ie(){Tt("",$n),Ut(!0);let t;try{t=window}catch{}if(t){if(ne(),t.IconifyPreload!==void 0){const n=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!St(o))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const n=t.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;At(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Ot(n,!0),disableCache:n=>Ot(n,!1),iconExists:cn,getIcon:an,listIcons:sn,addIcon:Qt,addCollection:St,calculateSize:ut,buildIcon:re,loadIcons:mt,loadIcon:Sn,addAPIProvider:At,appendCustomStyle:Bn,_api:{getAPIConfig:J,setAPIModule:Tt,sendAPIQuery:Jt,setFetch:On,getFetch:Rn,listAPIProviders:mn}}}function ce(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Hn(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function zn(t){return"data:image/svg+xml,"+Hn(t)}function Vn(t){return'url("'+zn(t)+'")'}const ft={"background-color":"currentColor"},ae={"background-color":"transparent"},_t={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Et={"-webkit-mask":ft,mask:ft,background:ae};for(const t in Et){const e=Et[t];for(const n in _t)e[t+"-"+n]=_t[n]}function qt(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Dn(t,e,n){const r=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=t.attributes,i=ce(o,{...s,width:e.width+"",height:e.height+""}),a=Vn(i),c=r.style,l={"--svg":a,width:qt(s.width),height:qt(s.height),...n?ft:ae};for(const u in l)c.setProperty(u,l[u]);return r}let R;function Zn(){try{R=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{R=null}}function Un(t){return R===void 0&&Zn(),R?R.createHTML(t):t}function Qn(t){const e=document.createElement("span"),n=t.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ce(t.body,n);return e.innerHTML=Un(o),e.firstChild}function Nt(t,e){const n=e.icon.data,r=e.customisations,o=re(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=e.renderedMode;let i;switch(s){case"svg":i=Qn(o);break;default:i=Dn(o,{...N,...n},s==="mask")}const a=Array.from(t.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):t.replaceChild(i,a):t.appendChild(i)}function Ft(t,e,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:r}}function Gn(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch{return}if(!e||!n)return;const r=e.get(t);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();B(this,"_shadowRoot");B(this,"_state");B(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=nt(this);Rt(c,l),this._state=Ft({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=nt(this),u=this._state;l!==u.inline&&(u.inline=l,Rt(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return nt(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Nt(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=It(this);(c.attrMode!==u||Ye(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=An(c,(u,d,p)=>{const x=this._state;if(x.rendered||this.getAttribute("icon")!==u)return;const g={value:u,name:d,data:p};g.data?this._gotIconData(g):x.icon=g});l.data?this._gotIconData(l):this._state=Ft(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,It(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=Pn(c.data.body,u),p=this._state.inline;Nt(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ie();for(const a in i)s[a]=s.prototype[a]=i[a];return e.define(t,s),s}Gn()||ie();const uo=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),Wn=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),X=(t,e,n="children")=>t.map(r=>Array.isArray(r[n])?e({...r,[n]:X(r[n],e,n)}):e(r)),fo=(t,e="children")=>{const n=[];return X(t,r=>n.push(r),e),n},bt=(t,e,n="children")=>t.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=bt(o,e,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return e(r,s)}),Jn=t=>/^https?:\/\//.test(t),po=t=>/^[\w-]+:[\w-]+$/.test(t),Xn=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const e=o=>o.endsWith("/")?o:`${o}/`,n=e(window.location.pathname),r=e(new URL(t,window.location.origin).pathname);return n.startsWith(r)},ho=(t=[])=>{const e=t.map((r,o)=>({path:r,index:o})).filter(r=>Xn(r.path));return e!=null&&e.length?e.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,e[0]).index:-1};var $t,Bt;const go=(($t=window==null?void 0:window.blocklet)==null?void 0:$t.groupPrefix)||((Bt=window==null?void 0:window.blocklet)==null?void 0:Bt.prefix)||"/",Yn=t=>{const e={...t},n=t==null?void 0:t.background;return typeof n=="string"?e.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(e.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),e},Kn=(t,e="en")=>{if(!(t!=null&&t.length))return t;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(Jn(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return X(t,o=>{var s;return{...o,title:n(o.title,e),link:(s=o.items)!=null&&s.length?o.link:r(o.link,e)}},"items")},to=t=>X(t,e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e,"items"),eo=t=>{if(!(t!=null&&t.length))return null;const e=to(t),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[]};return e.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},mo=t=>{if(!t)return null;const e={...t};return e.theme=Yn(e.theme),e.navigation=eo(no(e.navigation)),e},no=(t=[])=>bt(t,(e,n)=>{var r;return!!e.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),oo=(t,e)=>bt(t,(n,r)=>{var s;const o=!n.role||e&&n.role.includes(e);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),ro={width:24,height:24,body:'<path fill="currentColor" d="M13 8V4q0-.425.288-.713T14 3h6q.425 0 .713.288T21 4v4q0 .425-.288.713T20 9h-6q-.425 0-.713-.288T13 8ZM3 12V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v8q0 .425-.288.713T10 13H4q-.425 0-.713-.288T3 12Zm10 8v-8q0-.425.288-.713T14 11h6q.425 0 .713.288T21 12v8q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-4q0-.425.288-.713T4 15h6q.425 0 .713.288T11 16v4q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20Zm2-9h4V5H5v6Zm10 8h4v-6h-4v6Zm0-12h4V5h-4v2ZM5 19h4v-2H5v2Zm4-8Zm6-4Zm0 6Zm-6 4Z"/>'},so={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function yt({session:t,locale:e,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=t==null?void 0:t.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=T.useRef(null),i=we({open:!1}),a=ve((c=!i.open)=>{i.open=c});return o.length===0||!(t!=null&&t.user)?null:b.jsxs(b.Fragment,{children:[b.jsx(Ie,{size:"medium",ref:s,onClick:()=>a(),children:b.jsx(vt,{icon:ro,fontSize:n,style:{transform:"scale(1.10)"}})}),b.jsx(Ce,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>b.jsx(Se,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:b.jsx(Te,{...c,timeout:350,children:b.jsxs(Ae,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:S.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${S.gray6}, 0px 0px 0px 1px ${S.gray6}`},children:[b.jsx(Pe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u,d;return b.jsx(Be,{disablePadding:!0,children:b.jsxs(Qe,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:S.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?b.jsx(je,{component:"img",src:`${ke}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):b.jsx(vt,{fontSize:50,icon:l.icon||so,color:S.textSubtitle}),b.jsx(Le,{sx:{fontSize:"12px",color:S.textBase,textAlign:"center",lineHeight:"normal"},children:((d=l.title)==null?void 0:d.zh)||l.title})]})},l.id)})}),b.jsx(Me,{session:t,children:b.jsx(Oe,{variant:"outlined",fullWidth:!0,href:Re,sx:{mt:1,borderRadius:2,color:S.textBase,borderColor:S.lineBorderStrong,"&:hover":{color:S.primaryBase,borderColor:S.primaryBase}},children:e==="zh"?"管理":"Manage"})})]})})})})]})}yt.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};yt.defaultProps={locale:"en",size:24};function le({formattedBlocklet:t,addons:e,sessionManagerProps:n}){var p,x,g,y;const r=T.useContext(_e),{locale:o}=Ee()||{},{enableConnect:s=!0,enableLocale:i=!0}=t,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=Kn((x=t==null?void 0:t.navigation)==null?void 0:x.sessionManager,o)||[];c=oo(c,(y=(g=r==null?void 0:r.session)==null?void 0:g.user)==null?void 0:y.role);const u=(()=>{if(e&&typeof e!="function")return Array.isArray(e)?e:[e];let v=[];if(i&&o&&v.push(b.jsx(He,{showText:!1},"locale-selector")),s&&r){const C=[];a&&(c?c.slice(0,5):[]).forEach(m=>{C.push({label:m.title,icon:m.icon?b.jsx("iconify-icon",{icon:m.icon,height:24,style:{marginRight:8}}):null,component:"a",href:m.link,key:m.link})}),v.push(b.jsx(yt,{session:r.session,locale:o},"session-blocklet")),v.push(b.jsx(qe,{session:r.session,locale:o,menu:C,showRole:!0,...n},"session-user"))}return typeof e=="function"&&(v=e(v)||[]),v})();return T.createElement(b.Fragment,null,...Array.isArray(u)?u:[u])}le.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:Wn};le.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const bo=()=>{const t=Ne();T.useEffect(()=>{t.wallet&&Fe(()=>import("./index-7WXVYQMt.js").then(e=>e.i),__vite__mapDeps([0,1,2])).then(e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")}).catch(e=>{console.error("load dsbridge error",e)})},[t])};export{le as H,Qe as L,oo as a,uo as b,fo as c,ho as d,po as e,mo as f,Kn as g,Jn as i,X as m,go as p,Wn as s,bo as u};
|
|
12
12
|
function __vite__mapDeps(indexes) {
|
|
13
13
|
if (!__vite__mapDeps.viteFileDeps) {
|
|
14
|
-
__vite__mapDeps.viteFileDeps = ["assets/index-
|
|
14
|
+
__vite__mapDeps.viteFileDeps = ["assets/index-7WXVYQMt.js","assets/index-feKj5cCa.js","assets/index-Fay2ci-b.css"]
|
|
15
15
|
}
|
|
16
16
|
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{as as _,at as i,Q as e,j as r,au as a}from"./index-
|
|
1
|
+
import{as as _,at as i,Q as e,j as r,au as a}from"./index-feKj5cCa.js";const u={en:_(i),ar:()=>e(()=>import("./ar-C1ROamst.js"),__vite__mapDeps([])).then(t=>_(t.default)),de:()=>e(()=>import("./de-2MVeQOlM.js"),__vite__mapDeps([])).then(t=>_(t.default)),es:()=>e(()=>import("./es-dFy5LtVb.js"),__vite__mapDeps([])).then(t=>_(t.default)),fr:()=>e(()=>import("./fr--wWLDtTC.js"),__vite__mapDeps([])).then(t=>_(t.default)),hi:()=>e(()=>import("./hi-aZlJuWA-.js"),__vite__mapDeps([])).then(t=>_(t.default)),id:()=>e(()=>import("./id-KXUvb409.js"),__vite__mapDeps([])).then(t=>_(t.default)),ja:()=>e(()=>import("./ja-ZGIiHIn1.js"),__vite__mapDeps([])).then(t=>_(t.default)),ko:()=>e(()=>import("./ko-0RnOtONi.js"),__vite__mapDeps([])).then(t=>_(t.default)),pt:()=>e(()=>import("./pt-XurhsjDO.js"),__vite__mapDeps([])).then(t=>_(t.default)),ru:()=>e(()=>import("./ru-nfVA5klv.js"),__vite__mapDeps([])).then(t=>_(t.default)),th:()=>e(()=>import("./th-yrRWgiu0.js"),__vite__mapDeps([])).then(t=>_(t.default)),vi:()=>e(()=>import("./vi-gO_78VMj.js"),__vite__mapDeps([])).then(t=>_(t.default)),"zh-TW":()=>e(()=>import("./zh-tw-uRjhv66n.js"),__vite__mapDeps([])).then(t=>_(t.default)),zh:()=>e(()=>import("./zh-ZEZ2eHqG.js"),__vite__mapDeps([])).then(t=>_(t.default))};function E(t){return function(o){return r.jsx(a,{translations:u,children:r.jsx(t,{...o})})}}export{E as w};
|
|
2
2
|
function __vite__mapDeps(indexes) {
|
|
3
3
|
if (!__vite__mapDeps.viteFileDeps) {
|
|
4
4
|
__vite__mapDeps.viteFileDeps = []
|
package/dist/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
padding: 0;
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
|
-
<script type="module" crossorigin src="/.well-known/service/static/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/.well-known/service/static/assets/index-feKj5cCa.js"></script>
|
|
18
18
|
<link rel="stylesheet" crossorigin href="/.well-known/service/static/assets/index-Fay2ci-b.css">
|
|
19
19
|
</head>
|
|
20
20
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.22-beta-
|
|
6
|
+
"version": "1.16.22-beta-5bf86cd3",
|
|
7
7
|
"description": "Provide unified services for every blocklet",
|
|
8
8
|
"main": "api/index.js",
|
|
9
9
|
"files": [
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
33
33
|
"license": "Apache-2.0",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@abtnode/analytics": "1.16.22-beta-
|
|
36
|
-
"@abtnode/auth": "1.16.22-beta-
|
|
37
|
-
"@abtnode/client": "1.16.22-beta-
|
|
38
|
-
"@abtnode/connect-storage": "1.16.22-beta-
|
|
39
|
-
"@abtnode/constant": "1.16.22-beta-
|
|
40
|
-
"@abtnode/core": "1.16.22-beta-
|
|
41
|
-
"@abtnode/cron": "1.16.22-beta-
|
|
42
|
-
"@abtnode/logger": "1.16.22-beta-
|
|
43
|
-
"@abtnode/models": "1.16.22-beta-
|
|
44
|
-
"@abtnode/router-templates": "1.16.22-beta-
|
|
45
|
-
"@abtnode/util": "1.16.22-beta-
|
|
35
|
+
"@abtnode/analytics": "1.16.22-beta-5bf86cd3",
|
|
36
|
+
"@abtnode/auth": "1.16.22-beta-5bf86cd3",
|
|
37
|
+
"@abtnode/client": "1.16.22-beta-5bf86cd3",
|
|
38
|
+
"@abtnode/connect-storage": "1.16.22-beta-5bf86cd3",
|
|
39
|
+
"@abtnode/constant": "1.16.22-beta-5bf86cd3",
|
|
40
|
+
"@abtnode/core": "1.16.22-beta-5bf86cd3",
|
|
41
|
+
"@abtnode/cron": "1.16.22-beta-5bf86cd3",
|
|
42
|
+
"@abtnode/logger": "1.16.22-beta-5bf86cd3",
|
|
43
|
+
"@abtnode/models": "1.16.22-beta-5bf86cd3",
|
|
44
|
+
"@abtnode/router-templates": "1.16.22-beta-5bf86cd3",
|
|
45
|
+
"@abtnode/util": "1.16.22-beta-5bf86cd3",
|
|
46
46
|
"@arcblock/did": "^1.18.108",
|
|
47
47
|
"@arcblock/did-auth": "1.18.108",
|
|
48
48
|
"@arcblock/did-ext": "^1.18.108",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"@arcblock/jwt": "1.18.108",
|
|
52
52
|
"@arcblock/validator": "^1.18.108",
|
|
53
53
|
"@arcblock/ws": "1.18.108",
|
|
54
|
-
"@blocklet/constant": "1.16.22-beta-
|
|
54
|
+
"@blocklet/constant": "1.16.22-beta-5bf86cd3",
|
|
55
55
|
"@blocklet/form-builder": "^0.1.11",
|
|
56
56
|
"@blocklet/form-collector": "^0.1.6",
|
|
57
|
-
"@blocklet/meta": "1.16.22-beta-
|
|
58
|
-
"@blocklet/sdk": "1.16.22-beta-
|
|
57
|
+
"@blocklet/meta": "1.16.22-beta-5bf86cd3",
|
|
58
|
+
"@blocklet/sdk": "1.16.22-beta-5bf86cd3",
|
|
59
59
|
"@did-connect/authenticator": "^2.2.1",
|
|
60
60
|
"@did-connect/relay-adapter-express": "^2.2.1",
|
|
61
61
|
"@ocap/client": "1.18.108",
|
|
@@ -94,13 +94,13 @@
|
|
|
94
94
|
},
|
|
95
95
|
"resolutions": {},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@abtnode/ux": "1.16.22-beta-
|
|
98
|
-
"@arcblock/did-connect": "^2.9.
|
|
99
|
-
"@arcblock/icons": "^2.9.
|
|
100
|
-
"@arcblock/ux": "^2.9.
|
|
97
|
+
"@abtnode/ux": "1.16.22-beta-5bf86cd3",
|
|
98
|
+
"@arcblock/did-connect": "^2.9.13",
|
|
99
|
+
"@arcblock/icons": "^2.9.13",
|
|
100
|
+
"@arcblock/ux": "^2.9.13",
|
|
101
101
|
"@blocklet/launcher-layout": "2.2.51",
|
|
102
|
-
"@blocklet/tracker": "1.16.22-beta-
|
|
103
|
-
"@blocklet/ui-react": "^2.9.
|
|
102
|
+
"@blocklet/tracker": "1.16.22-beta-5bf86cd3",
|
|
103
|
+
"@blocklet/ui-react": "^2.9.13",
|
|
104
104
|
"@emotion/react": "^11.10.4",
|
|
105
105
|
"@emotion/styled": "^11.10.4",
|
|
106
106
|
"@iconify/iconify": "^2.2.1",
|
|
@@ -171,5 +171,5 @@
|
|
|
171
171
|
"url": "https://github.com/ArcBlock/blocklet-server/issues",
|
|
172
172
|
"email": "shijun@arcblock.io"
|
|
173
173
|
},
|
|
174
|
-
"gitHead": "
|
|
174
|
+
"gitHead": "5cac513901c247011be421fb8428d7875f475b0f"
|
|
175
175
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as r,M as a,j as t}from"./index-fmx4paNk.js";var e={},u=a;Object.defineProperty(e,"__esModule",{value:!0});var v=e.default=void 0,d=u(r()),o=t,i=(0,d.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");v=e.default=i;export{v as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as r,M as a,j as t}from"./index-fmx4paNk.js";var e={},o=a;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,d=o(r()),i=t,p=(0,d.default)((0,i.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");u=e.default=p;export{u as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as r,M as a,j as t}from"./index-fmx4paNk.js";var e={},u=a;Object.defineProperty(e,"__esModule",{value:!0});var l=e.default=void 0,i=u(r()),o=t,s=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");l=e.default=s;export{l as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as t,M as a,j as r}from"./index-fmx4paNk.js";var e={},u=a;Object.defineProperty(e,"__esModule",{value:!0});var l=e.default=void 0,v=u(t()),i=r,o=(0,v.default)((0,i.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");l=e.default=o;export{e as D,l as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as r,M as a,j as t}from"./index-fmx4paNk.js";var e={},u=a;Object.defineProperty(e,"__esModule",{value:!0});var o=e.default=void 0,l=u(r()),d=t,i=(0,l.default)((0,d.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");o=e.default=i;export{o as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as a,M as r,j as t}from"./index-fmx4paNk.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,v=o(a()),d=t,l=(0,v.default)((0,d.jsx)("path",{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"}),"Download");u=e.default=l;export{u as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as T,M as $,j as e,P as t,bU as M,aw as v,b as E,bo as D,a7 as V,bp as K,bO as U,b1 as A,r as h,B as i,S as W,b$ as G}from"./index-fmx4paNk.js";import{d as H}from"./Done-MCWAlwFR.js";import{F as J,R as Q}from"./logo-uploader-SgB8kCkW.js";import{d as I}from"./EditIcon-xHBtFRw5.js";import{d as X}from"./ArrowDropDown-rOXH0UGm.js";import{B as Y}from"./ButtonGroup-3ZXLSrUY.js";import{T as Z}from"./TextField-eXgwmwxj.js";var _={},ee=$;Object.defineProperty(_,"__esModule",{value:!0});var te=_.default=void 0,ae=ee(T()),re=e,se=(0,ae.default)((0,re.jsx)("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"SettingsOutlined");te=_.default=se;function C({triggers:r,onEnterEdit:s,disabled:o}){const l=M.useRef(null),[c,u]=M.useState(!1),x=a=>{u(!1),a()},g=()=>{u(a=>!a)},d=a=>{l.current&&l.current.contains(a.target)||u(!1)};return r.length===0?e.jsx(v,{"data-cy":"schema-form-item-edit",onClick:s,disabled:o,size:"large",children:e.jsx(I,{})}):e.jsxs(e.Fragment,{children:[e.jsxs(Y,{variant:"outlined",ref:l,"aria-label":"split button",children:[e.jsx(E,{"data-cy":"schema-form-item-edit",onClick:s,disabled:o,size:"large",children:e.jsx(I,{})}),e.jsx(E,{size:"small","aria-controls":c?"split-button-menu":void 0,"aria-expanded":c?"true":void 0,onClick:g,children:e.jsx(X,{})})]}),e.jsx(D,{sx:{zIndex:9999},open:c,anchorEl:l.current,role:void 0,placement:"bottom-end",children:e.jsx(V,{children:e.jsx(K,{onClickAway:d,children:e.jsx(U,{id:"split-button-menu",autoFocusItem:!0,children:r.map(a=>e.jsx(A,{onClick:()=>x(a.handler),children:a.title},a.key))})})})})]})}C.propTypes={triggers:t.arrayOf(t.shape({key:t.string.isRequired,title:t.string.isRequired,handler:t.func.isRequired})),onEnterEdit:t.func.isRequired,disabled:t.bool.isRequired};C.defaultProps={triggers:[]};const le=(r,s,o)=>r===null&&s&&o?"******":r?s?"******":r:"";function w({label:r,disabled:s,required:o,initialValue:l,onChange:c,placeholder:u,style:x,onSubmit:g,secure:d,triggers:a,formatterBeforeSubmit:R,...P}){const[z,j]=h.useState(!1),[b,k]=h.useState(!1),[p,B]=h.useState(d&&l==="__encrypted__"?null:l),[f,m]=h.useState(p),q=async()=>{k(!0);try{if(await g(f)===!1)m(p);else{let y=f;typeof R=="function"&&(y=R(f)),m(y),B(y)}}catch{m(p)}finally{k(!1),j(!1)}},L=n=>{m(n),c(n)},N=n=>{n.key==="Enter"&&q()},O=z?e.jsx(Z,{style:{flex:1},fullWidth:!0,value:f,onChange:n=>{L(n.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:u,onKeyDown:N,disabled:s,type:d?"password":"text",...P}):e.jsx(i,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:le(f,d,l)});return e.jsx(J,{className:"form",style:x,children:e.jsxs(i,{className:"form-item",children:[e.jsxs(i,{className:"form-item-label",children:[r,o&&e.jsx(Q,{})]}),e.jsxs(i,{className:"form-item-body",children:[e.jsx(i,{className:"form-item-input",children:O}),e.jsx(i,{className:"form-item-action",children:z?e.jsxs(e.Fragment,{children:[e.jsx(v,{"data-cy":"schema-form-item-confirm",onClick:q,disabled:s||b,size:"large",children:b?e.jsx(W,{size:24}):e.jsx(H,{})}),e.jsx(v,{"data-cy":"schema-form-item-cancel",onClick:()=>{m(p),j(!1)},disabled:s||b,size:"large",children:e.jsx(G,{})})]}):e.jsx(C,{triggers:a,onEnterEdit:()=>j(!0),disabled:s})})]})]})})}w.propTypes={style:t.object,onSubmit:t.func,onChange:t.func,label:t.string,initialValue:t.string,placeholder:t.string,required:t.bool,disabled:t.bool,secure:t.bool,triggers:t.array,formatterBeforeSubmit:t.func};w.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",placeholder:"",required:!1,disabled:!1,secure:!1,triggers:[],formatterBeforeSubmit:null};function F({depth:r}){return e.jsx(i,{ml:Math.max((r-1)*2,0),sx:{borderBottom:1,borderColor:"rgba(0,0,0,0.12)"}},"group-collapse-box")}F.propTypes={depth:t.number};F.defaultProps={depth:1};var S={},ne=$;Object.defineProperty(S,"__esModule",{value:!0});var ie=S.default=void 0,oe=ne(T()),ce=e,ue=(0,oe.default)((0,ce.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");ie=S.default=ue;export{S as E,w as F,C as I,F as L,te as a,ie as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as r,M as a,j as t}from"./index-fmx4paNk.js";var e={},u=a;Object.defineProperty(e,"__esModule",{value:!0});var o=e.default=void 0,d=u(r()),i=t,l=(0,d.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");o=e.default=l;export{o as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as t,M as r,j as a}from"./index-fmx4paNk.js";var e={},u=r;Object.defineProperty(e,"__esModule",{value:!0});var o=e.default=void 0,d=u(t()),i=a,s=(0,d.default)((0,i.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");o=e.default=s;export{o as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as a,M as r,j as t}from"./index-fmx4paNk.js";var e={},u=r;Object.defineProperty(e,"__esModule",{value:!0});var v=e.default=void 0,o=u(a()),d=t,i=(0,o.default)((0,d.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"Launch");v=e.default=i;export{v as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as a,M as t,j as r}from"./index-fmx4paNk.js";var e={},u=t;Object.defineProperty(e,"__esModule",{value:!0});var v=e.default=void 0,d=u(a()),i=r,l=(0,d.default)((0,i.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"LaunchOutlined");v=e.default=l;export{v as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as r,M as a,j as t}from"./index-fmx4paNk.js";var e={},o=a;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,l=o(r()),v=t,d=(0,l.default)((0,v.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Loop");u=e.default=d;export{u as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as r,M as a,j as t}from"./index-fmx4paNk.js";var e={},o=a;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,s=o(r()),i=t,d=(0,s.default)((0,i.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz");u=e.default=d;export{u as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as r,M as a,j as t}from"./index-fmx4paNk.js";var e={},u=a;Object.defineProperty(e,"__esModule",{value:!0});var v=e.default=void 0,o=u(r()),n=t,d=(0,o.default)((0,n.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNew");v=e.default=d;export{v as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as r,M as a,j as t}from"./index-fmx4paNk.js";var e={},u=a;Object.defineProperty(e,"__esModule",{value:!0});var o=e.default=void 0,l=u(r()),v=t,d=(0,l.default)((0,v.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");o=e.default=d;export{o as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as a,M as r,j as t}from"./index-fmx4paNk.js";var e={},u=r;Object.defineProperty(e,"__esModule",{value:!0});var l=e.default=void 0,o=u(a()),s=t,v=(0,o.default)((0,s.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");l=e.default=v;export{e as S,l as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as x,a8 as P,q as R,bv as j,U as D,r as a,c as S,c0 as W,bu as O,j as u,am as U}from"./index-fmx4paNk.js";import{A as k,S as A}from"./add-component-core-ylX_8APK.js";import"./uniqBy-iEgks-vJ.js";import"./page-header-ddmwDxwc.js";import"./index-JqwgTYS6.js";import"./Skeleton-UiZMiSHu.js";import"./Hidden-gw53iTuK.js";import"./index-BSh8wzUh.js";import"./lottie-FjNcYuDz.js";import"./launch-result-message-Hk1fQy57.js";import"./index-p8rdvwoO.js";import"./EditIcon-xHBtFRw5.js";import"./Done-MCWAlwFR.js";import"./Google-HPUKLxqx.js";import"./TextField-eXgwmwxj.js";import"./FormControl-v0eTeB2e.js";import"./useFormControl-KNSyfEVt.js";import"./InputLabel-wButS0La.js";import"./Select-Ij2Jun8i.js";import"./logo-uploader-SgB8kCkW.js";import"./index-87AfN2F8.js";import"./api-gliNzA2D.js";import"./jss-plugin-props-sort.esm-MNya_k5W.js";import"./toPropertyKey-NzAT2yhV.js";import"./confirm-FKxAX-vD.js";import"./DialogContentText-sTkogqzq.js";import"./Alert-q0LztC5S.js";import"./format-error-4NwK9J29.js";import"./ListItem-bKX4gR_9.js";import"./util-d7UDajXU.js";import"./index-iWsloYR-.js";import"./TableRow-fzOFh_oI.js";import"./index-TFqh61lk.js";import"./session-jiGGNvRF.js";import"./did-address-mUc4Y20-.js";import"./Stepper-eS4dzjYb.js";import"./ArrowDropDown-rOXH0UGm.js";import"./useLocalStorage--76v1ZXm.js";import"./Add-7NNakwc_.js";import"./Launch-Hu_2a2vM.js";import"./DeleteOutline-6up2qq9R.js";import"./click-to-copy-6Ejqlbl5.js";import"./fallback-PaGR08XT.js";import"./Search-Qa9ylVm2.js";import"./Grid-YkM__IXg.js";import"./InputAdornment-fcMSBEY_.js";import"./preact.module-yJdvQMHZ.js";import"./content-layout-luB2OoJR.js";import"./use-blocklet-info-for-connect-did-spaces-w6ZQzAFj.js";import"./spaces-UOGj7Ssb.js";import"./index-vQP4YCHN.js";import"./index-EdxXcbvd.js";import"./ExpandMore-NVX5jNVq.js";import"./ButtonGroup-3ZXLSrUY.js";function Bt(){var l;const{t:d}=x(),{blocklet:r}=P(),[h]=R(),{componentDid:m}=j(),f=D(t=>t.breakpoints.down("md")),g=h.get("mode")==="dialog",e=(l=r==null?void 0:r.meta)==null?void 0:l.did,i=new URL(window.location.href),s=(i.searchParams.get("store")||"").split(",").filter(Boolean).map(t=>{try{return new URL(t.startsWith("http")?t:`https://${t}`).origin}catch(o){return console.error(o),null}}).filter(Boolean),[w,C]=a.useState(s.map(t=>({url:t,name:t.replace("https://","")}))),p=i.searchParams.get("resourceType")||"",n=i.searchParams.get("resourceDid")||m;a.useEffect(()=>{(async()=>{try{const t=await Promise.all(s.map(async o=>{const E=S(o,"/api/store.json"),{data:b}=await W.get(E);return{url:o,name:b.name}}));C(t||[])}catch(t){console.error(t)}})()},[s.join(",")]);const y=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:m},"*")};a.useEffect(()=>{const t=O();return e&&t.connect(),()=>{e&&t.isConnected()&&t.disconnect()}},[e]);const c=({inDialog:t=!0}={})=>u.jsx(k,{stores:w,resourceType:p,resourceDid:n,mode:"embed",inDialog:t,storageKey:A(`${p}+${n}`)});return g?u.jsx(U,{className:"resource-dialog",title:d("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:f?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(t,o)=>{o!=="backdropClick"&&y()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:c()}):c({inDialog:!1})}export{Bt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c0 as a}from"./index-fmx4paNk.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as t,M as a,j as c,w as e}from"./index-fmx4paNk.js";var r={},u=a;Object.defineProperty(r,"__esModule",{value:!0});var n=r.default=void 0,s=u(t()),d=c,p=(0,s.default)((0,d.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"}),"Lock");n=r.default=p;var o={},_=a;Object.defineProperty(o,"__esModule",{value:!0});var l=o.default=void 0,f=_(t()),h=c,m=(0,f.default)((0,h.jsx)("path",{d:"M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"}),"ContactMail");l=o.default=m;var i={},z=a;Object.defineProperty(i,"__esModule",{value:!0});var v=i.default=void 0,C=z(t()),S=c,j=(0,C.default)((0,S.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"}),"Public");v=i.default=j;const x=[{value:e.WHO_CAN_ACCESS.ALL,icon:v,title:{zh:"所有人可访问",en:"Accessible to all"},description:{zh:"向所有人开放,无需通行证即可访问应用",en:"Open to the world anyone can access without passport"}},{value:e.WHO_CAN_ACCESS.INVITED,icon:l,title:{zh:"只有被邀请的人可以访问",en:"Only invited people can access"},description:{zh:"稍后您可以在管理页面中邀请成员",en:"You can invite members later in the admin page"}},{value:e.WHO_CAN_ACCESS.OWNER,icon:n,title:{zh:"只有应用所有者可以访问",en:"Only Owner of the blocklet can access"},description:{zh:"必须提供所有者通行证才能访问应用",en:"You must provide owner passport to access this application"}}];export{x as A};
|