@abtnode/webapp 1.16.28-beta-23b06b63 → 1.16.28-beta-bfbab430

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.
Files changed (162) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{Add-BxRt9WAM.js → Add-DEou6OQu.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-BDCD7rfw.js → ArrowDropDown-B8q6yJii.js} +1 -1
  5. package/dist/assets/{Autocomplete-mKcnfw_W.js → Autocomplete-CxHBaO5x.js} +1 -1
  6. package/dist/assets/{Breadcrumbs-BTPbI2mY.js → Breadcrumbs--9MrOMZw.js} +1 -1
  7. package/dist/assets/{ButtonGroup-B4i-HvgZ.js → ButtonGroup-BbRXyWVe.js} +1 -1
  8. package/dist/assets/{CheckCircle-DO-RcLP9.js → CheckCircle-D6vwJd9K.js} +1 -1
  9. package/dist/assets/{ChevronLeft-DF7lcjk8.js → ChevronLeft-Bc2acyen.js} +1 -1
  10. package/dist/assets/{ChevronRight-CFOkpNut.js → ChevronRight-Bcko4z80.js} +1 -1
  11. package/dist/assets/{Close-TuMd444H.js → Close-DGnER_ve.js} +1 -1
  12. package/dist/assets/{Delete-DDy4lv2l.js → Delete-BGOcGa_D.js} +1 -1
  13. package/dist/assets/{DeleteOutline-5zk5MLVr.js → DeleteOutline-C7JmRduW.js} +1 -1
  14. package/dist/assets/{Done-DZAunZvS.js → Done-CydSjSOx.js} +1 -1
  15. package/dist/assets/{Edit-CGEHojUC.js → Edit-B0yxTPMe.js} +1 -1
  16. package/dist/assets/{EditIcon-BylMjCE4.js → EditIcon-CF5y6ttj.js} +1 -1
  17. package/dist/assets/{FilterList-dxewgEr3.js → FilterList-RGEuYf_e.js} +1 -1
  18. package/dist/assets/{Google-C7F2Ljnc.js → Google-CuSS9iHp.js} +1 -1
  19. package/dist/assets/{Https-Bv4vNlzR.js → Https-B3P9JJiw.js} +1 -1
  20. package/dist/assets/{InfoOutlined-BcGJkJJl.js → InfoOutlined-B4lqtuRU.js} +1 -1
  21. package/dist/assets/{InputAdornment-CELCg_HF.js → InputAdornment-BzCm_2kz.js} +1 -1
  22. package/dist/assets/{InputLabel-Cag35T0N.js → InputLabel-CdW9MyDY.js} +1 -1
  23. package/dist/assets/{LastPage-CHLGEMPh.js → LastPage-dDlMsztV.js} +1 -1
  24. package/dist/assets/{Launch-COxUNu4j.js → Launch-Dhs9Q_70.js} +1 -1
  25. package/dist/assets/{Link-BkQX3hDp.js → Link-DSNZ4PNo.js} +1 -1
  26. package/dist/assets/{LoadingButton-BeuL1wF-.js → LoadingButton-DrVP9tt_.js} +1 -1
  27. package/dist/assets/{LockIcon-D_Uy157g.js → LockIcon-BMilDbx1.js} +1 -1
  28. package/dist/assets/{Loop-Be9bzVMj.js → Loop-CAxjNyCL.js} +1 -1
  29. package/dist/assets/{MoreVert-DCY4R0I6.js → MoreVert-BL42DjcZ.js} +1 -1
  30. package/dist/assets/{Pagination-B8Go1A0z.js → Pagination-DWKt9t_F.js} +1 -1
  31. package/dist/assets/{Public-XvGsN53V.js → Public-BobH8eAT.js} +1 -1
  32. package/dist/assets/{SchemaReference.es-CnykePQs.js → SchemaReference.es-MUfmufV5.js} +1 -1
  33. package/dist/assets/{Search-DbENMUmJ.js → Search-J7ilvWof.js} +1 -1
  34. package/dist/assets/{Select-BDtCsGy7.js → Select-DJl6HmRs.js} +1 -1
  35. package/dist/assets/{Skeleton-D9CMhdYr.js → Skeleton-CSyuj2cV.js} +1 -1
  36. package/dist/assets/{Slider-zMdqR1_D.js → Slider-DRCfqhU1.js} +1 -1
  37. package/dist/assets/{Stepper-Df_RHJ43.js → Stepper-C2a4PQ3_.js} +1 -1
  38. package/dist/assets/{TextField-PSikz4cm.js → TextField-BD0it3d0.js} +1 -1
  39. package/dist/assets/{ToggleButtonGroup-Bnx6aryv.js → ToggleButtonGroup-CR3zvwUX.js} +1 -1
  40. package/dist/assets/{ViewList-B9miFzh4.js → ViewList-D3pEO1Ca.js} +1 -1
  41. package/dist/assets/{actions-BRgdN5cj.js → actions-CL-Y8Eer.js} +1 -1
  42. package/dist/assets/{actions-D5ZCmrTM.js → actions-Dx15LaaC.js} +1 -1
  43. package/dist/assets/{agreement-hUkyT-rU.js → agreement-Dd1yuqFa.js} +1 -1
  44. package/dist/assets/api-Ce74sKYG.js +1 -0
  45. package/dist/assets/{app-avatar-CxghIswG.js → app-avatar-rgMNqIXw.js} +1 -1
  46. package/dist/assets/{audit-logs-Cj79FN7v.js → audit-logs-CmuAN_qn.js} +1 -1
  47. package/dist/assets/{brace-fold.es-D8DT3AwS.js → brace-fold.es-psNZdrWu.js} +1 -1
  48. package/dist/assets/{bundle-avatar-DsCsmlpx.js → bundle-avatar-C_2wXttj.js} +1 -1
  49. package/dist/assets/{chart-CD97eKtM.js → chart-sF6tbndw.js} +1 -1
  50. package/dist/assets/{click-to-copy-BUpbo6bk.js → click-to-copy-KBQWqGOq.js} +1 -1
  51. package/dist/assets/{closebrackets.es-6cHaiFAL.js → closebrackets.es-ZHCmqLUg.js} +1 -1
  52. package/dist/assets/{codemirror.es-fM7kqYGL.js → codemirror.es-DmoQbR9T.js} +1 -1
  53. package/dist/assets/{comment.es-ug3wJMDP.js → comment.es-B7zL23d5.js} +1 -1
  54. package/dist/assets/{config-navigation-BCwYgsZE.js → config-navigation-BN7PO-cf.js} +1 -1
  55. package/dist/assets/{delete-confirm-D2bWY0RH.js → delete-confirm-ztUwg2kj.js} +1 -1
  56. package/dist/assets/{detail-C1AiJgJr.js → detail-CXbwmlpg.js} +3 -3
  57. package/dist/assets/{dialog.es-COYIW3n4.js → dialog.es-CFWHh6H2.js} +1 -1
  58. package/dist/assets/{download-Dr-5p0Eo.js → download-bWTPRaod.js} +1 -1
  59. package/dist/assets/{foldgutter.es-C-4TReDS.js → foldgutter.es-CqRhTHya.js} +1 -1
  60. package/dist/assets/getValidReactChildren-DKO9kPop.js +1 -0
  61. package/dist/assets/{hint.es-D-HPm2KF.js → hint.es-DK_6KY-o.js} +1 -1
  62. package/dist/assets/{hint.es2-RMq3iMHV.js → hint.es2-CgWo28Uj.js} +1 -1
  63. package/dist/assets/{iframe-CZCbAGTG.js → iframe-C32DbqVc.js} +1 -1
  64. package/dist/assets/{index-BWDq0v0v.js → index-84DtgjQO.js} +1 -1
  65. package/dist/assets/{index-Boh9o_k5.js → index-B0WN-XH2.js} +1 -1
  66. package/dist/assets/{index-Cqjpq5LF.js → index-B4ZjZNN8.js} +1 -1
  67. package/dist/assets/{index-CqReN4T9.js → index-BA_TAXpL.js} +1 -1
  68. package/dist/assets/{index-SNuwf_Y1.js → index-BD7uC7gm.js} +3 -3
  69. package/dist/assets/{index-By0wVBLr.js → index-BET56ssY.js} +1 -1
  70. package/dist/assets/{index-BViEd1Qy.js → index-BNulkcXj.js} +1 -1
  71. package/dist/assets/{index-B-DkREsH.js → index-BoZhSN8h.js} +1 -1
  72. package/dist/assets/{index-huf_vvxX.js → index-Bzs05ai8.js} +1 -1
  73. package/dist/assets/{index-Cl-qWd1J.js → index-C4aM6rsI.js} +1 -1
  74. package/dist/assets/index-C6fuJWed.js +262 -0
  75. package/dist/assets/{index-DFgkZLyi.js → index-CE4mBIM_.js} +1 -1
  76. package/dist/assets/{index-G8t_K0Nh.js → index-CEBXL16c.js} +1 -1
  77. package/dist/assets/{index-CfEdAej2.js → index-CYGLUEkg.js} +3 -3
  78. package/dist/assets/{index-BeUBkDTf.js → index-CYZ-ZpV5.js} +1 -1
  79. package/dist/assets/{index-B_hJh8p2.js → index-Ca7UJIsi.js} +1 -1
  80. package/dist/assets/{index-BIi9UAUe.js → index-CfOOBUnf.js} +1 -1
  81. package/dist/assets/{index-ANhJ54Qu.js → index-CiaQ1OoK.js} +1 -1
  82. package/dist/assets/{index-neNekbhs.js → index-Cj3s4CtX.js} +1 -1
  83. package/dist/assets/{index-B6qhr4Vv.js → index-CkI554oc.js} +3 -3
  84. package/dist/assets/{index-Mhb4iWrQ.js → index-Clbjq5Ay.js} +1 -1
  85. package/dist/assets/{index-D5672HTm.js → index-CsNkkebn.js} +1 -1
  86. package/dist/assets/{index-D7ku2TbR.js → index-CwOFD6vt.js} +1 -1
  87. package/dist/assets/{index-hV9d7GzX.js → index-CzZF4DJ9.js} +1 -1
  88. package/dist/assets/{index-CIFB0zK6.js → index-D2cgpNGA.js} +5 -5
  89. package/dist/assets/{index-Cs9Skmx2.js → index-D5A34D-v.js} +1 -1
  90. package/dist/assets/{index-CLjGBj9p.js → index-D9RqTndg.js} +1 -1
  91. package/dist/assets/{index-DtPnnuqa.js → index-DA4GWzzk.js} +1 -1
  92. package/dist/assets/{index-C-KUrp7f.js → index-DG50udXf.js} +1 -1
  93. package/dist/assets/{index-CqR2D9OX.js → index-DHDAQRQS.js} +1 -1
  94. package/dist/assets/{index-BLP6cSf-.js → index-DbaRhcjK.js} +1 -1
  95. package/dist/assets/{index-DWB-NUab.js → index-Dc48oA1e.js} +1 -1
  96. package/dist/assets/{index-Bq_hHWAs.js → index-DeSsBKwN.js} +1 -1
  97. package/dist/assets/{index-Y-bwPY_P.js → index-Dlmo3B4P.js} +1 -1
  98. package/dist/assets/{index-CzRGlzNy.js → index-DoYPOJLK.js} +31 -31
  99. package/dist/assets/{index-Bgy25Yn1.js → index-DuHl-QWf.js} +1 -1
  100. package/dist/assets/{index-C9crSSRz.js → index-HMFhZkjG.js} +1 -1
  101. package/dist/assets/{index-BIT8HWlC.js → index-aVpXIXlo.js} +1 -1
  102. package/dist/assets/{index-3VaCz9mt.js → index-dQw_Q0Sx.js} +1 -1
  103. package/dist/assets/{index-DiW4LiJk.js → index-lXzOGnDm.js} +1 -1
  104. package/dist/assets/{index-oNZ-9nMm.js → index-lfuZxoX8.js} +1 -1
  105. package/dist/assets/{index-BR6wAIPR.js → index-owRl0jyR.js} +1 -1
  106. package/dist/assets/{index-BdfhWOrS.js → index-sNR67yJ2.js} +1 -1
  107. package/dist/assets/{index.es-CCaw5_ry.js → index.es-r9xAwx7Q.js} +1 -1
  108. package/dist/assets/{index.esm-Dh5y71gJ.js → index.esm-BCQ0BZMT.js} +1 -1
  109. package/dist/assets/{info-addon.es-C41XU5oD.js → info-addon.es-BDFdJmkW.js} +1 -1
  110. package/dist/assets/{info.es-DH9xH_89.js → info.es-CBadJSwW.js} +1 -1
  111. package/dist/assets/{install-from-url-C-r4nFEl.js → install-from-url-DuxahkOW.js} +1 -1
  112. package/dist/assets/{invitation-DAmBegDM.js → invitation-CSvGVnhZ.js} +1 -1
  113. package/dist/assets/{isEqual-DyC_2mMM.js → isEqual-DLk5wI5o.js} +1 -1
  114. package/dist/assets/{item-DTFWXAzg.js → item-Bv034Zcl.js} +1 -1
  115. package/dist/assets/{javascript.es-BNAO-PTr.js → javascript.es-Bq6krn1L.js} +1 -1
  116. package/dist/assets/{jump-to-line.es-BgSBJjpn.js → jump-to-line.es-Cm-kakdo.js} +1 -1
  117. package/dist/assets/{jump.es-C8STSrV8.js → jump.es-VEZCju5l.js} +1 -1
  118. package/dist/assets/{line-3blIv37C.js → line-VNmgswg2.js} +3 -3
  119. package/dist/assets/{lint.es-C9oc6jbS.js → lint.es-DhrBN362.js} +1 -1
  120. package/dist/assets/{lint.es2-B3G36s6A.js → lint.es2-CWQYXYDN.js} +1 -1
  121. package/dist/assets/{lint.es3-Bjrk4lMs.js → lint.es3-HsrZT9m1.js} +1 -1
  122. package/dist/assets/{list-header-Ft6n4kyL.js → list-header-DsWkp7IV.js} +1 -1
  123. package/dist/assets/{log-CA5Bfm_H.js → log-DgVRxyob.js} +1 -1
  124. package/dist/assets/{lottie-Djo2tbD7.js → lottie-CYf1PmCL.js} +1 -1
  125. package/dist/assets/{matchbrackets.es-yNyePD2j.js → matchbrackets.es-BthTk6Jn.js} +1 -1
  126. package/dist/assets/{memory-COJcMqTu.js → memory-dGmMptAO.js} +1 -1
  127. package/dist/assets/{mode.es-ul4Y9zvq.js → mode.es-_GdTPtpx.js} +1 -1
  128. package/dist/assets/{mode.es2-4D-VJI99.js → mode.es2-brmgogqJ.js} +1 -1
  129. package/dist/assets/{mode.es3-DnIPUjSA.js → mode.es3-DPGB-Rg-.js} +1 -1
  130. package/dist/assets/{onlineParser.es-DI_N_VZ6.js → onlineParser.es-BUsBjG_x.js} +1 -1
  131. package/dist/assets/{overview-CpWhs8pb.js → overview-BjqHXIvR.js} +1 -1
  132. package/dist/assets/{react-B-cs_65i.js → react-B-xa5K3p.js} +3 -3
  133. package/dist/assets/{redux-DJbvHHJc.js → redux-BBckwmBz.js} +1 -1
  134. package/dist/assets/{resource-dialog-Dwu2vad3.js → resource-dialog-CIpxrG7w.js} +1 -1
  135. package/dist/assets/{runtime-DlE-mVl3.js → runtime-mnz4kggA.js} +1 -1
  136. package/dist/assets/{search.es-DEvV0pC4.js → search.es-CV0d4AUV.js} +1 -1
  137. package/dist/assets/{searchcursor.es-CbJjnyZ6.js → searchcursor.es-CxYOh1mB.js} +1 -1
  138. package/dist/assets/service-DbM6n6e-.js +1 -0
  139. package/dist/assets/{show-hint.es-BAvfzA33.js → show-hint.es-GDHMVUwy.js} +1 -1
  140. package/dist/assets/{slicedToArray-DXz7P6Jc.js → slicedToArray-Pwxti1pp.js} +1 -1
  141. package/dist/assets/{spaces-C_MVXqkk.js → spaces-3s9pbV-M.js} +1 -1
  142. package/dist/assets/{sublime.es-DEVL-EBh.js → sublime.es-BiX2tLa_.js} +1 -1
  143. package/dist/assets/{switch-control-CoAFfWfN.js → switch-control-1CHbJzd5.js} +1 -1
  144. package/dist/assets/{table-icons-D2RHWn5N.js → table-icons-DjAM1A7C.js} +1 -1
  145. package/dist/assets/{tag-CibAXXt2.js → tag-CdoBHuxB.js} +1 -1
  146. package/dist/assets/{team-hCJdZoCR.js → team-CrNp0IgF.js} +1 -1
  147. package/dist/assets/{toUpper-DN83jaGL.js → toUpper-C7enqaxL.js} +1 -1
  148. package/dist/assets/{traffic-CpCVERHX.js → traffic-Bw_e_wEP.js} +1 -1
  149. package/dist/assets/{url-evaluation-CpLQCS2C.js → url-evaluation-asC5XTLH.js} +1 -1
  150. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-ADtRY_BA.js → use-blocklet-info-for-connect-did-spaces-R82fq7SC.js} +1 -1
  151. package/dist/assets/{useLocalStorage-Dhldbzlz.js → useLocalStorage-DRS65jti.js} +1 -1
  152. package/dist/assets/{util-BSjBcY1Q.js → util-BC42zb0j.js} +1 -1
  153. package/dist/assets/{wait-container-CrBtw_vv.js → wait-container-DzvlQJkQ.js} +1 -1
  154. package/dist/assets/{withStyles-BhZN297l.js → withStyles-CPWhmxGn.js} +1 -1
  155. package/dist/assets/{wrap-locale-CA8TyTj3.js → wrap-locale-p7nrsckq.js} +1 -1
  156. package/dist/index.html +1 -1
  157. package/dist/service-worker.js +1 -1
  158. package/package.json +1 -1
  159. package/dist/assets/api-D8MiIqQL.js +0 -1
  160. package/dist/assets/getValidReactChildren-8XnhSvA9.js +0 -1
  161. package/dist/assets/index-B5LCLWLI.js +0 -262
  162. package/dist/assets/service-CmT6d4X_.js +0 -1
@@ -1,4 +1,4 @@
1
- import{aj as J,z as A,r as p,a as X,b as Z,P as x,q as j,u as P,y as ee,au as $,M as N,j as t,x as _,av as te,a1 as S,m as R,D as q,aw as se,U as M,ax as oe,B as O,C as W,ay as re,A as z,K,az as ne,aA as ae,aB as le,F as ie,i as ce,n as V,aa as ue,a4 as de,a7 as pe,a8 as he,aC as fe,a9 as me,O as ge}from"./index-B6qhr4Vv.js";import{_ as D}from"./useLocalStorage-Dhldbzlz.js";import{c as xe,C as be,A as ye,D as ke,B as Se,S as H,a as je,b as Pe}from"./item-DTFWXAzg.js";import{d as we}from"./ArrowDropDown-BDCD7rfw.js";import{B as ve}from"./Breadcrumbs-BTPbI2mY.js";import"./index-Mhb4iWrQ.js";import"./index-BIi9UAUe.js";import"./Search-DbENMUmJ.js";import"./index-BdfhWOrS.js";import"./Select-BDtCsGy7.js";import"./InputAdornment-CELCg_HF.js";import"./preact.module-B1z5cdvs.js";import"./Add-BxRt9WAM.js";import"./TextField-PSikz4cm.js";import"./InputLabel-Cag35T0N.js";import"./Launch-COxUNu4j.js";import"./Done-DZAunZvS.js";import"./DeleteOutline-5zk5MLVr.js";import"./delete-confirm-D2bWY0RH.js";import"./click-to-copy-BUpbo6bk.js";import"./MoreVert-DCY4R0I6.js";import"./ButtonGroup-B4i-HvgZ.js";import"./getValidReactChildren-8XnhSvA9.js";function Re(e){const n=J(),c=A(),[s,o]=D(`sid:blocklet:purchase:${e}`),[i,u]=p.useState(!1),[h,a]=p.useState(null),d=()=>{const{pathname:r,searchParams:m}=new URL(window.location.href),b=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";m.get("sid")&&(o(""),c(r.replace(b,"/"),{replace:!0}))},l=!!(n.get("assetDid")&&s&&n.get("sid")===s);return X(Z.BlockletEvents.purchaseChange,r=>{r.did===e&&(a(r.session),["declined","confirmed","error"].includes(r.session.status)&&(u(!0),setTimeout(d,2e3)))}),p.useEffect(()=>{h&&h.id!==s&&o(h.id)},[h]),{hasCompleted:i,hasPurchased:l,session:h,setSession:a,doRedirect:d}}function B({meta:e,onCancel:n,handlePaySuccess:c,storeUrl:s}){const{t:o}=j(),{info:i}=P(),[u,h]=p.useState("both"),[a,d]=p.useState(1),l=ee(i),r=$(e,i,s),m=v=>{v!==u&&h(v)},b=()=>{u&&(d(2),u==="verify"&&(window.location.href=r))},y=(v,L)=>{L!=="backdropClick"&&n()},w=()=>{c(r)},f=N.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(_,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:te.create({baseURL:S(s,"/store")}).get,onSuccess:w,onClose:n,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:l,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:f}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(R,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(R,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:f})]})]})}});const g=q;return t.jsx(g,{title:o("store.purchase.title",{name:f}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:y,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(be,{action:u,onNext:b,onSelect:m})})})}B.propTypes={...xe,storeUrl:x.string.isRequired,handlePaySuccess:x.func};B.defaultProps={handlePaySuccess:e=>{setTimeout(()=>{window.location.href=e},1e3)}};function E({meta:e,buttonText:n,storeUrl:c,isResource:s}){const{t:o}=j(),i=A(),{info:u}=P(),{api:h}=se(),a=N.isFreeBlocklet(e)===!1,[d,l]=p.useState(!1),{hasPurchased:r}=Re(e.did),[m,b]=p.useState(!1),[y]=D("instant-blocklet-install",!1),[w,f]=p.useState(!1),g=p.useMemo(()=>d?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[d,o,a]),v=p.useMemo(()=>s?o("blocklet.status.resource"):a?n.purchase:n.launch,[a,n,s]),L=k=>{k.preventDefault(),k.stopPropagation();try{if(l(!0),a){b(!0);return}if(y){f(!0);return}if(!a){const C=$(e,u,c);window.location.href=C;return}}catch(C){z.error(K(C),{autoHideDuration:5e3}),console.error("Blocklet installed failed",C)}finally{l(!1)}},G=()=>{l(!1),b(!1)},Q=k=>{l(!1),f(!1),i(`/blocklets/${k.appDid}/components`)},Y=()=>{l(!1),f(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(M,{permission:"mutate_blocklets",children:k=>t.jsx(oe,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(O,{onClick:L,size:"small",sx:{cursor:s?"not-allowed":"pointer"},disabled:!!(g||!k),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:g?t.jsxs(t.Fragment,{children:[t.jsx(W,{size:16,style:{marginRight:3}}),g]}):v},e.did)})})}),(r||m)&&t.jsx(B,{method:"launch",meta:e,mode:"both",onCancel:G,storeUrl:c}),w&&t.jsx(_,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:h.get,checkTimeout:5*60*1e3,onSuccess:Q,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(re(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:Y})]})}E.propTypes={isResource:x.bool,meta:x.object.isRequired,buttonText:x.shape({purchase:x.string.isRequired,launch:x.string.isRequired}).isRequired,storeUrl:x.string.isRequired};E.defaultProps={isResource:!1};const Ce=(e,n,c)=>{const s=ue(n);return S(c,`/blocklets/${e.did}/?server-url=${s}`)},F=({meta:e,attribute:n,value:c})=>e._formatted?e._formatted[n]:c;function U({blocklet:e,endpoint:n}){const{t:c}=j(),s=P();let o=S(s.imgPrefix,"blocklet.png");const i=n;if(i.startsWith("http")&&e.logo)o=S(i,le(e.did,e.logo,e.version));else{let r=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");r&&(r=`/${r}`),o=S(r,`/blocklet/logo/${e.did}`)}try{const l=new URL(o);l.searchParams.set("v",e.version||+new Date),o=l.href}catch{}const u=(s==null?void 0:s.info.mode)!==ie.NODE_MODES.SERVERLESS,h=l=>l.currentTarget.contains(l.target)?!0:(l.preventDefault(),!1),a={meta:e,buttonText:{purchase:c("common.purchase"),launch:c("common.launch")},storeUrl:i};let d=null;return u&&(d=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(E,{isResource:!e.group,...a})})),t.jsx(ce,{href:Ce(e,s.info,n),style:{color:"initial",textDecoration:"none"},onClick:h,target:"_blank",children:t.jsx(De,{title:F({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:F({meta:e,attribute:"description",value:e.description}),cover:e.logo?o:"",version:e.version,button:d})})}U.propTypes={blocklet:x.object.isRequired,endpoint:x.string};U.defaultProps={endpoint:""};function T({storeUrl:e,handleSearchSelect:n,extraFilter:c,...s}){var r;const{locale:o}=j(),i=P(),[u,h]=p.useState({}),a=m=>{h(m)},d=e,l=(r=i==null?void 0:i.info)==null?void 0:r.version;return p.useEffect(()=>{h({})},[d]),t.jsx(ne,{FallbackComponent:ae,resetKeys:[d],children:t.jsx("div",{...s,children:t.jsx(ke,{blockletRender:m=>{const b={...m,endpoint:d};return t.jsx(U,{...b})},baseSearch:!0,endpoint:d,locale:o,onFilterChange:a,onSearchSelect:n,filters:u,extraFilter:c,serverVersion:l})})})}T.propTypes={storeUrl:x.string.isRequired,handleSearchSelect:x.func,extraFilter:x.func};T.defaultProps={handleSearchSelect:null,extraFilter:void 0};const De=V(Se)`
1
+ import{aj as J,z as A,r as p,a as X,b as Z,P as x,q as j,u as P,y as ee,au as $,M as N,j as t,x as _,av as te,a1 as S,m as R,D as q,aw as se,U as M,ax as oe,B as O,C as W,ay as re,A as z,K,az as ne,aA as ae,aB as le,F as ie,i as ce,n as V,aa as ue,a4 as de,a7 as pe,a8 as he,aC as fe,a9 as me,O as ge}from"./index-CkI554oc.js";import{_ as D}from"./useLocalStorage-DRS65jti.js";import{c as xe,C as be,A as ye,D as ke,B as Se,S as H,a as je,b as Pe}from"./item-Bv034Zcl.js";import{d as we}from"./ArrowDropDown-B8q6yJii.js";import{B as ve}from"./Breadcrumbs--9MrOMZw.js";import"./index-Clbjq5Ay.js";import"./index-CfOOBUnf.js";import"./Search-J7ilvWof.js";import"./index-sNR67yJ2.js";import"./Select-DJl6HmRs.js";import"./InputAdornment-BzCm_2kz.js";import"./preact.module-B1z5cdvs.js";import"./Add-DEou6OQu.js";import"./TextField-BD0it3d0.js";import"./InputLabel-CdW9MyDY.js";import"./Launch-Dhs9Q_70.js";import"./Done-CydSjSOx.js";import"./DeleteOutline-C7JmRduW.js";import"./delete-confirm-ztUwg2kj.js";import"./click-to-copy-KBQWqGOq.js";import"./MoreVert-BL42DjcZ.js";import"./ButtonGroup-BbRXyWVe.js";import"./getValidReactChildren-DKO9kPop.js";function Re(e){const n=J(),c=A(),[s,o]=D(`sid:blocklet:purchase:${e}`),[i,u]=p.useState(!1),[h,a]=p.useState(null),d=()=>{const{pathname:r,searchParams:m}=new URL(window.location.href),b=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";m.get("sid")&&(o(""),c(r.replace(b,"/"),{replace:!0}))},l=!!(n.get("assetDid")&&s&&n.get("sid")===s);return X(Z.BlockletEvents.purchaseChange,r=>{r.did===e&&(a(r.session),["declined","confirmed","error"].includes(r.session.status)&&(u(!0),setTimeout(d,2e3)))}),p.useEffect(()=>{h&&h.id!==s&&o(h.id)},[h]),{hasCompleted:i,hasPurchased:l,session:h,setSession:a,doRedirect:d}}function B({meta:e,onCancel:n,handlePaySuccess:c,storeUrl:s}){const{t:o}=j(),{info:i}=P(),[u,h]=p.useState("both"),[a,d]=p.useState(1),l=ee(i),r=$(e,i,s),m=v=>{v!==u&&h(v)},b=()=>{u&&(d(2),u==="verify"&&(window.location.href=r))},y=(v,L)=>{L!=="backdropClick"&&n()},w=()=>{c(r)},f=N.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(_,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:te.create({baseURL:S(s,"/store")}).get,onSuccess:w,onClose:n,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:l,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:f}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(R,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(R,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:f})]})]})}});const g=q;return t.jsx(g,{title:o("store.purchase.title",{name:f}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:y,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(be,{action:u,onNext:b,onSelect:m})})})}B.propTypes={...xe,storeUrl:x.string.isRequired,handlePaySuccess:x.func};B.defaultProps={handlePaySuccess:e=>{setTimeout(()=>{window.location.href=e},1e3)}};function E({meta:e,buttonText:n,storeUrl:c,isResource:s}){const{t:o}=j(),i=A(),{info:u}=P(),{api:h}=se(),a=N.isFreeBlocklet(e)===!1,[d,l]=p.useState(!1),{hasPurchased:r}=Re(e.did),[m,b]=p.useState(!1),[y]=D("instant-blocklet-install",!1),[w,f]=p.useState(!1),g=p.useMemo(()=>d?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[d,o,a]),v=p.useMemo(()=>s?o("blocklet.status.resource"):a?n.purchase:n.launch,[a,n,s]),L=k=>{k.preventDefault(),k.stopPropagation();try{if(l(!0),a){b(!0);return}if(y){f(!0);return}if(!a){const C=$(e,u,c);window.location.href=C;return}}catch(C){z.error(K(C),{autoHideDuration:5e3}),console.error("Blocklet installed failed",C)}finally{l(!1)}},G=()=>{l(!1),b(!1)},Q=k=>{l(!1),f(!1),i(`/blocklets/${k.appDid}/components`)},Y=()=>{l(!1),f(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(M,{permission:"mutate_blocklets",children:k=>t.jsx(oe,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(O,{onClick:L,size:"small",sx:{cursor:s?"not-allowed":"pointer"},disabled:!!(g||!k),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:g?t.jsxs(t.Fragment,{children:[t.jsx(W,{size:16,style:{marginRight:3}}),g]}):v},e.did)})})}),(r||m)&&t.jsx(B,{method:"launch",meta:e,mode:"both",onCancel:G,storeUrl:c}),w&&t.jsx(_,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:h.get,checkTimeout:5*60*1e3,onSuccess:Q,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(re(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:Y})]})}E.propTypes={isResource:x.bool,meta:x.object.isRequired,buttonText:x.shape({purchase:x.string.isRequired,launch:x.string.isRequired}).isRequired,storeUrl:x.string.isRequired};E.defaultProps={isResource:!1};const Ce=(e,n,c)=>{const s=ue(n);return S(c,`/blocklets/${e.did}/?server-url=${s}`)},F=({meta:e,attribute:n,value:c})=>e._formatted?e._formatted[n]:c;function U({blocklet:e,endpoint:n}){const{t:c}=j(),s=P();let o=S(s.imgPrefix,"blocklet.png");const i=n;if(i.startsWith("http")&&e.logo)o=S(i,le(e.did,e.logo,e.version));else{let r=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");r&&(r=`/${r}`),o=S(r,`/blocklet/logo/${e.did}`)}try{const l=new URL(o);l.searchParams.set("v",e.version||+new Date),o=l.href}catch{}const u=(s==null?void 0:s.info.mode)!==ie.NODE_MODES.SERVERLESS,h=l=>l.currentTarget.contains(l.target)?!0:(l.preventDefault(),!1),a={meta:e,buttonText:{purchase:c("common.purchase"),launch:c("common.launch")},storeUrl:i};let d=null;return u&&(d=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(E,{isResource:!e.group,...a})})),t.jsx(ce,{href:Ce(e,s.info,n),style:{color:"initial",textDecoration:"none"},onClick:h,target:"_blank",children:t.jsx(De,{title:F({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:F({meta:e,attribute:"description",value:e.description}),cover:e.logo?o:"",version:e.version,button:d})})}U.propTypes={blocklet:x.object.isRequired,endpoint:x.string};U.defaultProps={endpoint:""};function T({storeUrl:e,handleSearchSelect:n,extraFilter:c,...s}){var r;const{locale:o}=j(),i=P(),[u,h]=p.useState({}),a=m=>{h(m)},d=e,l=(r=i==null?void 0:i.info)==null?void 0:r.version;return p.useEffect(()=>{h({})},[d]),t.jsx(ne,{FallbackComponent:ae,resetKeys:[d],children:t.jsx("div",{...s,children:t.jsx(ke,{blockletRender:m=>{const b={...m,endpoint:d};return t.jsx(U,{...b})},baseSearch:!0,endpoint:d,locale:o,onFilterChange:a,onSearchSelect:n,filters:u,extraFilter:c,serverVersion:l})})})}T.propTypes={storeUrl:x.string.isRequired,handleSearchSelect:x.func,extraFilter:x.func};T.defaultProps={handleSearchSelect:null,extraFilter:void 0};const De=V(Se)`
2
2
  .ms-highlight {
3
3
  color: ${e=>e.theme.palette.primary.main};
4
4
  }
@@ -1,4 +1,4 @@
1
- import{r as u,bg as _,bh as B,aJ as Q,aK as Y,j as e,q as A,c as P,F as b,m as R,S as O,O as k,B as K,C as w,ad as U,P as j,f as E,D as Z,aW as ee,aX as te,n as S,at as I,o as se,u as G,aN as ae,K as ne,U as oe,bi as re,z as ce,bf as ie,d as le,bj as me}from"./index-B6qhr4Vv.js";import{T as de}from"./index-BViEd1Qy.js";import pe from"./audit-logs-Cj79FN7v.js";import{P as ue,M as fe}from"./index-DiW4LiJk.js";import ye from"./index-BWDq0v0v.js";import{T as ge}from"./team-hCJdZoCR.js";import{E as xe}from"./index-BIi9UAUe.js";import{d as he}from"./Add-BxRt9WAM.js";import{T as N}from"./TextField-PSikz4cm.js";import{F as H,S as V}from"./Select-BDtCsGy7.js";import{I as J}from"./InputLabel-Cag35T0N.js";import{C as W}from"./click-to-copy-BUpbo6bk.js";import{f as ve}from"./index-D9k2I5J1.js";import{d as je}from"./Delete-DDy4lv2l.js";import{C as Ce}from"./delete-confirm-D2bWY0RH.js";import{d as ke}from"./Edit-CGEHojUC.js";import"./index-Cs9Skmx2.js";import"./useLocalStorage-Dhldbzlz.js";import"./Pagination-B8Go1A0z.js";import"./LastPage-CHLGEMPh.js";import"./index-DFgkZLyi.js";import"./Loop-Be9bzVMj.js";import"./ViewList-B9miFzh4.js";import"./list-header-Ft6n4kyL.js";import"./Search-DbENMUmJ.js";import"./index-neNekbhs.js";import"./FilterList-dxewgEr3.js";import"./index-BIT8HWlC.js";import"./redux-DJbvHHJc.js";import"./MoreVert-DCY4R0I6.js";import"./index-DWB-NUab.js";import"./resource-dialog-Dwu2vad3.js";import"./index-B-DkREsH.js";import"./index-BdfhWOrS.js";import"./tag-CibAXXt2.js";import"./index-B_hJh8p2.js";import"./actions-BRgdN5cj.js";import"./index-Bq_hHWAs.js";import"./ButtonGroup-B4i-HvgZ.js";import"./getValidReactChildren-8XnhSvA9.js";import"./EditIcon-BylMjCE4.js";import"./LockIcon-D_Uy157g.js";import"./Google-C7F2Ljnc.js";import"./index-Bgy25Yn1.js";import"./isEqual-DyC_2mMM.js";import"./index-Mhb4iWrQ.js";import"./InputAdornment-CELCg_HF.js";import"./ToggleButtonGroup-Bnx6aryv.js";function be(){var o=u.useRef(!1),s=u.useCallback(function(){return o.current},[]);return u.useEffect(function(){return o.current=!0,function(){o.current=!1}},[]),s}function Ke(o,s,p){s===void 0&&(s=[]),p===void 0&&(p={loading:!1});var r=u.useRef(0),c=be(),t=u.useState(p),n=t[0],l=t[1],m=u.useCallback(function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var y=++r.current;return n.loading||l(function(g){return _(_({},g),{loading:!0})}),o.apply(void 0,a).then(function(g){return c()&&y===r.current&&l({value:g,loading:!1}),g},function(g){return c()&&y===r.current&&l({error:g,loading:!1}),g})},s);return[n,m]}function Se(o,s){s===void 0&&(s=[]);var p=Ke(o,s,{loading:!0}),r=p[0],c=p[1];return u.useEffect(function(){c()},[c]),r}var _e=function(o,s){s===void 0&&(s=[]);var p=u.useState(0),r=p[0],c=p[1],t=Se(o,B(s,[r])),n=t.loading,l=u.useCallback(function(){n||c(function(m){return m+1})},B(s,[n]));return _(_({},t),{retry:l})},T={},Ae=Y;Object.defineProperty(T,"__esModule",{value:!0});var X=T.default=void 0,we=Ae(Q()),Ie=e;X=T.default=(0,we.default)((0,Ie.jsx)("path",{d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"VpnKey");function L(o){const{remark:s,onCreate:p}=o,{t:r}=A(),[c,t]=u.useState(!1),[n,l]=u.useState(null),m=P(),a=b.RBAC_CONFIG.roles.filter(x=>x.passport&&x.name!==b.ROLES.OWNER),f=()=>{t(!1),l(null)},y=async x=>{const{remark:h,passport:d}=x;t(!0);const i=await m.createAccessKey({input:{remark:h.trim(),passport:d}}),{data:C}=i;p(C),l(null),t(!1)},g={title:`${r("common.create")} ${r("common.accessKey")}`,description:(x,h,d)=>e.jsxs(R,{component:"div",children:[e.jsx(N,{label:r("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",inputProps:{"data-cy":"remark-input"},fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",value:x.remark,onChange:i=>{h({...x,remark:i.target.value,__disableConfirm:!x.passport||!i.target.value.trim()}),i.target.value.trim()?d(""):d(r("setting.accessKey.remarkInvalid"))}}),e.jsxs(H,{style:{width:"100%"},variant:"outlined",children:[e.jsx(J,{children:r("common.passport")}),e.jsx(V,{"data-cy":"create-access-key-select-passport",value:x.passport,onChange:i=>{const C=i.target.value;d(null),h({...x,passport:C,__disableConfirm:!x.remark||!C})},fullWidth:!0,label:r("common.passport"),disabled:c,children:a.map(i=>e.jsx(O,{value:i.name,"data-cy":`create-access-key-passport-option-${i.name}`,children:e.jsxs(k,{children:[e.jsx("span",{children:i.title||i.name}),e.jsx(k,{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify",children:i.description})]})},i.name))})]})]}),confirm:r("common.confirm"),cancel:r("common.cancel"),color:"primary",params:{remark:s,__disableConfirm:!s.trim()},onConfirm:y,onCancel:f};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>l(g),className:"rule-action",children:[c?e.jsx(w,{size:16}):e.jsx(he,{style:{fontSize:16}}),r("common.create")]}),n&&e.jsx(U,{title:n.title,description:n.description,confirm:n.confirm,color:n.color,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}L.propTypes={remark:j.string,onCreate:j.func};L.defaultProps={onCreate:()=>{},remark:""};function $(o){const{onConfirm:s,accessKeyId:p,accessKeySecret:r}=o,{t:c}=u.useContext(E),[t,n]=u.useState(!1),[l,m]=u.useState(!0),a=()=>{m(!l)},f=y=>{n(y.target.checked)};return e.jsxs(Z,{title:c("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:s,showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(K,{disabled:!t,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:c("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(Ne,{children:c("setting.accessKey.saveSecretTip")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Key"}),e.jsx(W,{children:p})]}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Secret"}),l?e.jsx(K,{"data-cy":"show-secret-btn",color:"primary",onClick:a,children:c("setting.accessKey.showSecret")}):e.jsx(W,{children:r})]}),e.jsx("div",{children:e.jsx(ee,{value:"end",disabled:l,control:e.jsx(te,{checked:t,onChange:f}),label:c("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}$.propTypes={accessKeyId:j.string.isRequired,accessKeySecret:j.string.isRequired,onConfirm:j.func};$.defaultProps={onConfirm:()=>{}};const q=S.div`
1
+ import{r as u,bg as _,bh as B,aJ as Q,aK as Y,j as e,q as A,c as P,F as b,m as R,S as O,O as k,B as K,C as w,ad as U,P as j,f as E,D as Z,aW as ee,aX as te,n as S,at as I,o as se,u as G,aN as ae,K as ne,U as oe,bi as re,z as ce,bf as ie,d as le,bj as me}from"./index-CkI554oc.js";import{T as de}from"./index-BNulkcXj.js";import pe from"./audit-logs-CmuAN_qn.js";import{P as ue,M as fe}from"./index-lXzOGnDm.js";import ye from"./index-84DtgjQO.js";import{T as ge}from"./team-CrNp0IgF.js";import{E as xe}from"./index-CfOOBUnf.js";import{d as he}from"./Add-DEou6OQu.js";import{T as N}from"./TextField-BD0it3d0.js";import{F as H,S as V}from"./Select-DJl6HmRs.js";import{I as J}from"./InputLabel-CdW9MyDY.js";import{C as W}from"./click-to-copy-KBQWqGOq.js";import{f as ve}from"./index-D9k2I5J1.js";import{d as je}from"./Delete-BGOcGa_D.js";import{C as Ce}from"./delete-confirm-ztUwg2kj.js";import{d as ke}from"./Edit-B0yxTPMe.js";import"./index-D5A34D-v.js";import"./useLocalStorage-DRS65jti.js";import"./Pagination-DWKt9t_F.js";import"./LastPage-dDlMsztV.js";import"./index-CE4mBIM_.js";import"./Loop-CAxjNyCL.js";import"./ViewList-D3pEO1Ca.js";import"./list-header-DsWkp7IV.js";import"./Search-J7ilvWof.js";import"./index-Cj3s4CtX.js";import"./FilterList-RGEuYf_e.js";import"./index-aVpXIXlo.js";import"./redux-BBckwmBz.js";import"./MoreVert-BL42DjcZ.js";import"./index-Dc48oA1e.js";import"./resource-dialog-CIpxrG7w.js";import"./index-BoZhSN8h.js";import"./index-sNR67yJ2.js";import"./tag-CdoBHuxB.js";import"./index-Ca7UJIsi.js";import"./actions-CL-Y8Eer.js";import"./index-DeSsBKwN.js";import"./ButtonGroup-BbRXyWVe.js";import"./getValidReactChildren-DKO9kPop.js";import"./EditIcon-CF5y6ttj.js";import"./LockIcon-BMilDbx1.js";import"./Google-CuSS9iHp.js";import"./index-DuHl-QWf.js";import"./isEqual-DLk5wI5o.js";import"./index-Clbjq5Ay.js";import"./InputAdornment-BzCm_2kz.js";import"./ToggleButtonGroup-CR3zvwUX.js";function be(){var o=u.useRef(!1),s=u.useCallback(function(){return o.current},[]);return u.useEffect(function(){return o.current=!0,function(){o.current=!1}},[]),s}function Ke(o,s,p){s===void 0&&(s=[]),p===void 0&&(p={loading:!1});var r=u.useRef(0),c=be(),t=u.useState(p),n=t[0],l=t[1],m=u.useCallback(function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var y=++r.current;return n.loading||l(function(g){return _(_({},g),{loading:!0})}),o.apply(void 0,a).then(function(g){return c()&&y===r.current&&l({value:g,loading:!1}),g},function(g){return c()&&y===r.current&&l({error:g,loading:!1}),g})},s);return[n,m]}function Se(o,s){s===void 0&&(s=[]);var p=Ke(o,s,{loading:!0}),r=p[0],c=p[1];return u.useEffect(function(){c()},[c]),r}var _e=function(o,s){s===void 0&&(s=[]);var p=u.useState(0),r=p[0],c=p[1],t=Se(o,B(s,[r])),n=t.loading,l=u.useCallback(function(){n||c(function(m){return m+1})},B(s,[n]));return _(_({},t),{retry:l})},T={},Ae=Y;Object.defineProperty(T,"__esModule",{value:!0});var X=T.default=void 0,we=Ae(Q()),Ie=e;X=T.default=(0,we.default)((0,Ie.jsx)("path",{d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"VpnKey");function L(o){const{remark:s,onCreate:p}=o,{t:r}=A(),[c,t]=u.useState(!1),[n,l]=u.useState(null),m=P(),a=b.RBAC_CONFIG.roles.filter(x=>x.passport&&x.name!==b.ROLES.OWNER),f=()=>{t(!1),l(null)},y=async x=>{const{remark:h,passport:d}=x;t(!0);const i=await m.createAccessKey({input:{remark:h.trim(),passport:d}}),{data:C}=i;p(C),l(null),t(!1)},g={title:`${r("common.create")} ${r("common.accessKey")}`,description:(x,h,d)=>e.jsxs(R,{component:"div",children:[e.jsx(N,{label:r("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",inputProps:{"data-cy":"remark-input"},fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",value:x.remark,onChange:i=>{h({...x,remark:i.target.value,__disableConfirm:!x.passport||!i.target.value.trim()}),i.target.value.trim()?d(""):d(r("setting.accessKey.remarkInvalid"))}}),e.jsxs(H,{style:{width:"100%"},variant:"outlined",children:[e.jsx(J,{children:r("common.passport")}),e.jsx(V,{"data-cy":"create-access-key-select-passport",value:x.passport,onChange:i=>{const C=i.target.value;d(null),h({...x,passport:C,__disableConfirm:!x.remark||!C})},fullWidth:!0,label:r("common.passport"),disabled:c,children:a.map(i=>e.jsx(O,{value:i.name,"data-cy":`create-access-key-passport-option-${i.name}`,children:e.jsxs(k,{children:[e.jsx("span",{children:i.title||i.name}),e.jsx(k,{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify",children:i.description})]})},i.name))})]})]}),confirm:r("common.confirm"),cancel:r("common.cancel"),color:"primary",params:{remark:s,__disableConfirm:!s.trim()},onConfirm:y,onCancel:f};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>l(g),className:"rule-action",children:[c?e.jsx(w,{size:16}):e.jsx(he,{style:{fontSize:16}}),r("common.create")]}),n&&e.jsx(U,{title:n.title,description:n.description,confirm:n.confirm,color:n.color,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}L.propTypes={remark:j.string,onCreate:j.func};L.defaultProps={onCreate:()=>{},remark:""};function $(o){const{onConfirm:s,accessKeyId:p,accessKeySecret:r}=o,{t:c}=u.useContext(E),[t,n]=u.useState(!1),[l,m]=u.useState(!0),a=()=>{m(!l)},f=y=>{n(y.target.checked)};return e.jsxs(Z,{title:c("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:s,showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(K,{disabled:!t,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:c("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(Ne,{children:c("setting.accessKey.saveSecretTip")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Key"}),e.jsx(W,{children:p})]}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Secret"}),l?e.jsx(K,{"data-cy":"show-secret-btn",color:"primary",onClick:a,children:c("setting.accessKey.showSecret")}):e.jsx(W,{children:r})]}),e.jsx("div",{children:e.jsx(ee,{value:"end",disabled:l,control:e.jsx(te,{checked:t,onChange:f}),label:c("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}$.propTypes={accessKeyId:j.string.isRequired,accessKeySecret:j.string.isRequired,onConfirm:j.func};$.defaultProps={onConfirm:()=>{}};const q=S.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{r as C,j as n,q as ee,u as te,aj as Ne,ct as ne,M as X,n as B,B as Xe,P as G,aw as Ye,z as Re,cu as Ze,v as et,cv as tt,ac as nt,av as ve,bl as xe,a1 as Q,b as le,A as ie,K as be,ah as st,Q as J,V as Y,C as T,N as De,i as at,W as rt,x as ot,y as $e,ag as lt,cw as it,ae as ct,c4 as ze,cx as Ee,aa as ut,F as dt,cy as pt,H as ht,ak as mt,al as ft,am as gt,cz as vt,an as xt,J as bt,ao as yt,ap as K,aq as kt,ar as jt}from"./index-B6qhr4Vv.js";import{L as Z,P as Ie,A as wt,S as Pt,a as Ct}from"./index-D5672HTm.js";import{u as Lt,A as _t,W as Ut,P as Bt,D as ye,L as ke,d as je,a as we}from"./wait-container-CrBtw_vv.js";import{C as Te,d as St,A as Ot}from"./agreement-hUkyT-rU.js";import{a as Nt}from"./api-D8MiIqQL.js";import{i as Rt}from"./isEqual-DyC_2mMM.js";import{_ as Dt}from"./useLocalStorage-Dhldbzlz.js";import{s as $t}from"./logo-BKA11TRi.js";import"./Skeleton-D9CMhdYr.js";import"./Close-TuMd444H.js";import"./lottie-Djo2tbD7.js";import"./index-Cs9Skmx2.js";var ce={};Object.defineProperty(ce,"__esModule",{value:!0});var Ae=ce.default=void 0;zt(C);var P=n;function zt(e){return e&&e.__esModule?e:{default:e}}function Pe(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function Ce(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Pe(Object(s),!0).forEach(function(r){Et(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Pe(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Et(e,t,s){return t=It(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function It(e){var t=Tt(e,"string");return typeof t=="symbol"?t:String(t)}function Tt(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ue=function(t){return(0,P.jsxs)("svg",Ce(Ce({},t),{},{children:[(0,P.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,P.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,P.jsxs)("defs",{children:[(0,P.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,P.jsx)("stop",{stopColor:"#0FA4B7"}),(0,P.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,P.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,P.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,P.jsx)("stop",{stopColor:"#0FA4B7"}),(0,P.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,P.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};ue.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};ue.displayName="launcher-logo-notext";Ae=ce.default=ue;var de={};Object.defineProperty(de,"__esModule",{value:!0});var Me=de.default=void 0;At(C);var b=n;function At(e){return e&&e.__esModule?e:{default:e}}function Le(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function _e(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Le(Object(s),!0).forEach(function(r){Mt(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Le(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Mt(e,t,s){return t=Vt(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Vt(e){var t=Ft(e,"string");return typeof t=="symbol"?t:String(t)}function Ft(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pe=function(t){return(0,b.jsxs)("svg",_e(_e({},t),{},{children:[(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,b.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,b.jsxs)("defs",{children:[(0,b.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,b.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};pe.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};pe.displayName="launcher-logo";Me=de.default=pe;function Wt(){const{t:e}=ee(),{info:t}=te(),s=Ne(),r=decodeURIComponent(s.get("accessUrl")||""),{meta:l}=ne();return n.jsx(qt,{children:n.jsx("div",{className:"body",children:n.jsx(Z,{variant:"success",title:X.getDisplayName({meta:l},!0),subTitle:e("launchBlocklet.installSuccess",{serverName:t.name}),footer:n.jsx(Ht,{href:r,rel:"noreferrer","data-cy":"open-blocklet",children:e("common.open")})})})})}const Ht=B.a`
1
+ import{r as C,j as n,q as ee,u as te,aj as Ne,ct as ne,M as X,n as B,B as Xe,P as G,aw as Ye,z as Re,cu as Ze,v as et,cv as tt,ac as nt,av as ve,bl as xe,a1 as Q,b as le,A as ie,K as be,ah as st,Q as J,V as Y,C as T,N as De,i as at,W as rt,x as ot,y as $e,ag as lt,cw as it,ae as ct,c4 as ze,cx as Ee,aa as ut,F as dt,cy as pt,H as ht,ak as mt,al as ft,am as gt,cz as vt,an as xt,J as bt,ao as yt,ap as K,aq as kt,ar as jt}from"./index-CkI554oc.js";import{L as Z,P as Ie,A as wt,S as Pt,a as Ct}from"./index-CsNkkebn.js";import{u as Lt,A as _t,W as Ut,P as Bt,D as ye,L as ke,d as je,a as we}from"./wait-container-DzvlQJkQ.js";import{C as Te,d as St,A as Ot}from"./agreement-Dd1yuqFa.js";import{a as Nt}from"./api-Ce74sKYG.js";import{i as Rt}from"./isEqual-DLk5wI5o.js";import{_ as Dt}from"./useLocalStorage-DRS65jti.js";import{s as $t}from"./logo-BKA11TRi.js";import"./Skeleton-CSyuj2cV.js";import"./Close-DGnER_ve.js";import"./lottie-CYf1PmCL.js";import"./index-D5A34D-v.js";var ce={};Object.defineProperty(ce,"__esModule",{value:!0});var Ae=ce.default=void 0;zt(C);var P=n;function zt(e){return e&&e.__esModule?e:{default:e}}function Pe(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function Ce(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Pe(Object(s),!0).forEach(function(r){Et(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Pe(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Et(e,t,s){return t=It(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function It(e){var t=Tt(e,"string");return typeof t=="symbol"?t:String(t)}function Tt(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ue=function(t){return(0,P.jsxs)("svg",Ce(Ce({},t),{},{children:[(0,P.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,P.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,P.jsxs)("defs",{children:[(0,P.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,P.jsx)("stop",{stopColor:"#0FA4B7"}),(0,P.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,P.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,P.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,P.jsx)("stop",{stopColor:"#0FA4B7"}),(0,P.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,P.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};ue.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};ue.displayName="launcher-logo-notext";Ae=ce.default=ue;var de={};Object.defineProperty(de,"__esModule",{value:!0});var Me=de.default=void 0;At(C);var b=n;function At(e){return e&&e.__esModule?e:{default:e}}function Le(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function _e(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Le(Object(s),!0).forEach(function(r){Mt(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Le(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Mt(e,t,s){return t=Vt(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Vt(e){var t=Ft(e,"string");return typeof t=="symbol"?t:String(t)}function Ft(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pe=function(t){return(0,b.jsxs)("svg",_e(_e({},t),{},{children:[(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,b.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,b.jsxs)("defs",{children:[(0,b.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,b.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};pe.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};pe.displayName="launcher-logo";Me=de.default=pe;function Wt(){const{t:e}=ee(),{info:t}=te(),s=Ne(),r=decodeURIComponent(s.get("accessUrl")||""),{meta:l}=ne();return n.jsx(qt,{children:n.jsx("div",{className:"body",children:n.jsx(Z,{variant:"success",title:X.getDisplayName({meta:l},!0),subTitle:e("launchBlocklet.installSuccess",{serverName:t.name}),footer:n.jsx(Ht,{href:r,rel:"noreferrer","data-cy":"open-blocklet",children:e("common.open")})})})})}const Ht=B.a`
2
2
  display: block;
3
3
  height: 36px;
4
4
  color: ${e=>e.theme.palette.primary.main};
@@ -1,4 +1,4 @@
1
- import{u as R,j as o,C,aw as T,cB as U,z as b,q as W,cu as D,r,aR as _,k as d,a1 as x,ak as k,ae as E,x as O,av as $,y as q,bj as z,n as B}from"./index-B6qhr4Vv.js";import{I as K}from"./invitation-DAmBegDM.js";import"./index-CqReN4T9.js";import"./index-By0wVBLr.js";import"./CheckCircle-DO-RcLP9.js";import"./wrap-locale-CA8TyTj3.js";function M(v){const{api:i,session:f}=T(),{info:s}=R(),c=U(),p=b(),{t:l,locale:m}=W(),{encryptKey:P,decrypt:N}=D(),[S,w]=r.useState(!1),h=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),t=_(async()=>{if(!h)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:h}}),a=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(a){const u=new URL(window.location.href);u.pathname=x(k(),"/api/did/invite/token"),u.searchParams.set("_ek_",P),u.searchParams.set("inviteId",h);const{data:F}=await i.get(u.href);e=F}return{invitation:n,nextWorkflow:e,needReceiveNFT:a}}),j=r.useCallback(()=>{w(!0)},[]),y=r.useCallback(()=>{if(t.error)throw t.error;return t.value.invitation},[t]),g=r.useCallback(async e=>{e&&E(N(e.sessionToken));const n=new URLSearchParams(c.search);n.delete("inviteId");const a=n.toString();await f.refresh(),p(`/${a&&`?${a}`}`,{replace:!0})},[c,p,f]);if(t.loading)return o.jsx(C,{});const I=()=>{const e=new URL(window.location.href);e.pathname=x(k(),"/api/did/invite/status"),e.searchParams.set("_t_",t.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:a}=await i.get(e.href);a.status==="succeed"&&(clearInterval(n),f.updateConnectedInfo(a),g(a))},2e3)},L=()=>{w(!1)};return o.jsxs(A,{className:"page-invite",children:[d(t,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:S,locale:m,baseUrl:s.launcher.url,checkFn:$.create({baseURL:s.launcher.url}).get,onSuccess:I,onClose:L,checkTimeout:5*60*1e3,webWalletUrl:q(s),extraParams:{nw:d(t,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),o.jsx(K,{...v,getDataFn:y,createPassportSvg:e=>z(e,s),checkFn:i.get,onLoginSuccess:g,passportColor:"default",onReceive:d(t,"value.needReceiveNFT")?j:null})]})}const A=B.div`
1
+ import{u as R,j as o,C,aw as T,cB as U,z as b,q as W,cu as D,r,aR as _,k as d,a1 as x,ak as k,ae as E,x as O,av as $,y as q,bj as z,n as B}from"./index-CkI554oc.js";import{I as K}from"./invitation-CSvGVnhZ.js";import"./index-BA_TAXpL.js";import"./index-BET56ssY.js";import"./CheckCircle-D6vwJd9K.js";import"./wrap-locale-p7nrsckq.js";function M(v){const{api:i,session:f}=T(),{info:s}=R(),c=U(),p=b(),{t:l,locale:m}=W(),{encryptKey:P,decrypt:N}=D(),[S,w]=r.useState(!1),h=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),t=_(async()=>{if(!h)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:h}}),a=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(a){const u=new URL(window.location.href);u.pathname=x(k(),"/api/did/invite/token"),u.searchParams.set("_ek_",P),u.searchParams.set("inviteId",h);const{data:F}=await i.get(u.href);e=F}return{invitation:n,nextWorkflow:e,needReceiveNFT:a}}),j=r.useCallback(()=>{w(!0)},[]),y=r.useCallback(()=>{if(t.error)throw t.error;return t.value.invitation},[t]),g=r.useCallback(async e=>{e&&E(N(e.sessionToken));const n=new URLSearchParams(c.search);n.delete("inviteId");const a=n.toString();await f.refresh(),p(`/${a&&`?${a}`}`,{replace:!0})},[c,p,f]);if(t.loading)return o.jsx(C,{});const I=()=>{const e=new URL(window.location.href);e.pathname=x(k(),"/api/did/invite/status"),e.searchParams.set("_t_",t.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:a}=await i.get(e.href);a.status==="succeed"&&(clearInterval(n),f.updateConnectedInfo(a),g(a))},2e3)},L=()=>{w(!1)};return o.jsxs(A,{className:"page-invite",children:[d(t,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:S,locale:m,baseUrl:s.launcher.url,checkFn:$.create({baseURL:s.launcher.url}).get,onSuccess:I,onClose:L,checkTimeout:5*60*1e3,webWalletUrl:q(s),extraParams:{nw:d(t,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),o.jsx(K,{...v,getDataFn:y,createPassportSvg:e=>z(e,s),checkFn:i.get,onLoginSuccess:g,passportColor:"default",onReceive:d(t,"value.needReceiveNFT")?j:null})]})}const A=B.div`
2
2
  width: 100vw;
3
3
  height: 100%;
4
4
  min-height: 100vh;
@@ -1 +1 @@
1
- import{u as d,j as o,C as f,z as h,aw as v,ch as j,ci as u,O as C,bj as I,ae as P,F as R}from"./index-B6qhr4Vv.js";import{I as S}from"./invitation-DAmBegDM.js";import"./index-CqReN4T9.js";import"./index-By0wVBLr.js";import"./CheckCircle-DO-RcLP9.js";import"./wrap-locale-CA8TyTj3.js";function k(n){const{searchParams:i}=new URL(window.location.href),g=h(),{api:a,session:r}=v(),{info:l}=d(),c=i.get("redirect"),p=i.get("id"),s=j(async()=>{if(!p)return null;const{data:e}=await a.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return e}),m=u(()=>{if(s.error)throw s.error;return s==null?void 0:s.data}),w=u(async(e,x=t=>t)=>{e&&(e.sessionToken&&P(x(e.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const t=decodeURIComponent(c);t.startsWith(R.WELLKNOWN_SERVICE_PATH_PREFIX)?g(t,{replace:!0}):window.location=t}else window.location=window.env.pathPrefix||"/"},50)});return s.loading?o.jsx(f,{}):o.jsx(C,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:o.jsx(S,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:e=>I(e,l),checkFn:a.get,onLoginSuccess:w,passportColor:"default",onLogin:r.login})})}function W(){return d().loading?o.jsx(f,{}):o.jsx(k,{})}export{W as default};
1
+ import{u as d,j as o,C as f,z as h,aw as v,ch as j,ci as u,O as C,bj as I,ae as P,F as R}from"./index-CkI554oc.js";import{I as S}from"./invitation-CSvGVnhZ.js";import"./index-BA_TAXpL.js";import"./index-BET56ssY.js";import"./CheckCircle-D6vwJd9K.js";import"./wrap-locale-p7nrsckq.js";function k(n){const{searchParams:i}=new URL(window.location.href),g=h(),{api:a,session:r}=v(),{info:l}=d(),c=i.get("redirect"),p=i.get("id"),s=j(async()=>{if(!p)return null;const{data:e}=await a.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return e}),m=u(()=>{if(s.error)throw s.error;return s==null?void 0:s.data}),w=u(async(e,x=t=>t)=>{e&&(e.sessionToken&&P(x(e.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const t=decodeURIComponent(c);t.startsWith(R.WELLKNOWN_SERVICE_PATH_PREFIX)?g(t,{replace:!0}):window.location=t}else window.location=window.env.pathPrefix||"/"},50)});return s.loading?o.jsx(f,{}):o.jsx(C,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:o.jsx(S,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:e=>I(e,l),checkFn:a.get,onLoginSuccess:w,passportColor:"default",onLogin:r.login})})}function W(){return d().loading?o.jsx(f,{}):o.jsx(k,{})}export{W as default};
@@ -1,4 +1,4 @@
1
- var zt=Object.defineProperty;var Ht=(e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>(Ht(e,typeof t!="symbol"?t+"":t,n),n);import{P as l,j as d,ce,fN as ot,fO as Ut,r as T,cn as Dt,ci as Bt,a2 as Qt,fP as _e,dQ as Vt,dO as Wt,fQ as Zt,dN as Gt,d2 as A,a7 as Jt,a8 as Yt,fR as Xt,O as N,fS as Kt,m as en,fT as tn,fU as nn,B as on,fV as rn,fz as rt,q as te,fW as sn,fX as cn,co as an,fY as ln,s as P,fZ as st,f_ as un,c8 as it,f$ as fn,aA as ct,bU as de,b3 as dn,ba as pn,cp as at,g0 as hn}from"./index-B6qhr4Vv.js";/**
1
+ var zt=Object.defineProperty;var Ht=(e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>(Ht(e,typeof t!="symbol"?t+"":t,n),n);import{P as l,j as d,ce,fN as ot,fO as Ut,r as T,cn as Dt,ci as Bt,a2 as Qt,fP as _e,dQ as Vt,dO as Wt,fQ as Zt,dN as Gt,d2 as A,a7 as Jt,a8 as Yt,fR as Xt,O as N,fS as Kt,m as en,fT as tn,fU as nn,B as on,fV as rn,fz as rt,q as te,fW as sn,fX as cn,co as an,fY as ln,s as P,fZ as st,f_ as un,c8 as it,f$ as fn,aA as ct,bU as de,b3 as dn,ba as pn,cp as at,g0 as hn}from"./index-CkI554oc.js";/**
2
2
  * (c) Iconify
3
3
  *
4
4
  * For the full copyright and license information, please view the license.txt
@@ -1,4 +1,4 @@
1
- import{r,S as u,j as e,dM as p,b3 as I,dN as b,dO as z,dP as O,P as o,dv as S,s as m,dQ as v}from"./index-B6qhr4Vv.js";import{B as E}from"./ButtonGroup-B4i-HvgZ.js";function d(s){const{size:f,color:a,menu:i,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),t=r.useRef(null),P=Array.isArray(i)?i.map((n,M)=>r.isValidElement(n)?n:r.createElement(u,{...n,key:M})):i,k=()=>{c(n=>!n)},B=n=>{t.current&&t.current.contains(n.target)||c(!1)},C=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(A,{variant:h,size:f,color:a,ref:t,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:a,children:l}),e.jsx(p,{onClick:k,color:a,...y,"aria-label":"more functions",children:e.jsx(I,{})})]}),e.jsx(L,{open:j,anchorEl:t.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(b,{children:e.jsx(z,{onClickAway:B,children:e.jsx(O,{onClick:C,children:P})})})})]})}d.propTypes={size:o.oneOf(["small","medium","large"]),color:o.oneOf(["primary","secondary","inherit"]),menu:o.oneOfType([o.node,o.array]),children:o.node,variant:o.oneOf(["outlined","contained"]),onClick:o.func,menuButtonProps:o.object};d.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:S,menuButtonProps:{}};d.Item=u;const A=m(E)`
1
+ import{r,S as u,j as e,dM as p,b3 as I,dN as b,dO as z,dP as O,P as o,dv as S,s as m,dQ as v}from"./index-CkI554oc.js";import{B as E}from"./ButtonGroup-BbRXyWVe.js";function d(s){const{size:f,color:a,menu:i,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),t=r.useRef(null),P=Array.isArray(i)?i.map((n,M)=>r.isValidElement(n)?n:r.createElement(u,{...n,key:M})):i,k=()=>{c(n=>!n)},B=n=>{t.current&&t.current.contains(n.target)||c(!1)},C=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(A,{variant:h,size:f,color:a,ref:t,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:a,children:l}),e.jsx(p,{onClick:k,color:a,...y,"aria-label":"more functions",children:e.jsx(I,{})})]}),e.jsx(L,{open:j,anchorEl:t.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(b,{children:e.jsx(z,{onClickAway:B,children:e.jsx(O,{onClick:C,children:P})})})})]})}d.propTypes={size:o.oneOf(["small","medium","large"]),color:o.oneOf(["primary","secondary","inherit"]),menu:o.oneOfType([o.node,o.array]),children:o.node,variant:o.oneOf(["outlined","contained"]),onClick:o.func,menuButtonProps:o.object};d.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:S,menuButtonProps:{}};d.Item=u;const A=m(E)`
2
2
  > .MuiButtonBase-root:last-of-type {
3
3
  min-width: 2em;
4
4
  padding-left: 0;
@@ -1 +1 @@
1
- import{r as E,q as j,z as I,j as e,V as W,C as k,cs as T,O as v,x as L,A as h,F as N,u as R,y as S,am as U,ae as b}from"./index-B6qhr4Vv.js";import{w as F}from"./wrap-locale-CA8TyTj3.js";function _({SessionContext:t,webWalletUrl:a,onSuccess:c}){var g,u;const{api:o,session:n}=E.useContext(t),{t:s,locale:m}=j(),w=I(),{searchParams:l}=new URL(window.location.href),d=l.get("redirect"),P=async(r,C)=>{c(r,C),await n.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(d){const i=decodeURIComponent(d);i.startsWith(N.WELLKNOWN_SERVICE_PATH_PREFIX)?w(i,{replace:!0}):window.location=i}else window.location=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},f=r=>{h.error(r.message)},x={},p=l.get("componentId");return p&&(x.componentId=p),n.loading?e.jsx(W,{children:e.jsx(k,{})}):e.jsx(T,{did:((g=window==null?void 0:window.blocklet)==null?void 0:g.appPid)||((u=window==null?void 0:window.env)==null?void 0:u.appPid),children:e.jsx(v,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:e.jsx(L,{className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:P,onError:f,locale:m,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:x,extraContent:null})})})}const y=F(_);function O(){const{info:t}=R(),a=S(t),c=(o,n)=>{o.sessionToken&&b(n(o.sessionToken))};return e.jsx(y,{SessionContext:U,webWalletUrl:a,onSuccess:c})}export{O as default};
1
+ import{r as E,q as j,z as I,j as e,V as W,C as k,cs as T,O as v,x as L,A as h,F as N,u as R,y as S,am as U,ae as b}from"./index-CkI554oc.js";import{w as F}from"./wrap-locale-p7nrsckq.js";function _({SessionContext:t,webWalletUrl:a,onSuccess:c}){var g,u;const{api:o,session:n}=E.useContext(t),{t:s,locale:m}=j(),w=I(),{searchParams:l}=new URL(window.location.href),d=l.get("redirect"),P=async(r,C)=>{c(r,C),await n.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(d){const i=decodeURIComponent(d);i.startsWith(N.WELLKNOWN_SERVICE_PATH_PREFIX)?w(i,{replace:!0}):window.location=i}else window.location=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},f=r=>{h.error(r.message)},x={},p=l.get("componentId");return p&&(x.componentId=p),n.loading?e.jsx(W,{children:e.jsx(k,{})}):e.jsx(T,{did:((g=window==null?void 0:window.blocklet)==null?void 0:g.appPid)||((u=window==null?void 0:window.env)==null?void 0:u.appPid),children:e.jsx(v,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:e.jsx(L,{className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:P,onError:f,locale:m,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:x,extraContent:null})})})}const y=F(_);function O(){const{info:t}=R(),a=S(t),c=(o,n)=>{o.sessionToken&&b(n(o.sessionToken))};return e.jsx(y,{SessionContext:U,webWalletUrl:a,onSuccess:c})}export{O as default};