@abtnode/webapp 1.17.8-beta-20260205-074433-9d1114cf → 1.17.8

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 (188) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-IaUSFlm4.js → AdapterDayjs-CXgBZcQU.js} +1 -1
  4. package/dist/assets/{Add-D1qtasGt.js → Add-B-lIYZBc.js} +1 -1
  5. package/dist/assets/ArrowDropDown-C1ynmK1V.js +1 -0
  6. package/dist/assets/{Autocomplete-DTKIP70z.js → Autocomplete-BHqH72uG.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-DYu6Ih3W.js → Breadcrumbs-CpZ2DeBG.js} +1 -1
  8. package/dist/assets/{ButtonGroup-BmKH0AR_.js → ButtonGroup-CXwzM552.js} +1 -1
  9. package/dist/assets/{CSSTransition-By0IzEZz.js → CSSTransition-hTlKGu0l.js} +1 -1
  10. package/dist/assets/{CallMerge-CBsd3n82.js → CallMerge-V8M4tzIM.js} +1 -1
  11. package/dist/assets/{CardContent-uQht8_nO.js → CardContent-MdG6Fo_s.js} +1 -1
  12. package/dist/assets/{ChevronLeft-YHLhmhXY.js → ChevronLeft-BPs9Erbv.js} +1 -1
  13. package/dist/assets/{ChevronRight-Bry_Rp2n.js → ChevronRight-C_yvQN06.js} +1 -1
  14. package/dist/assets/{Clear-C9b1QEIp.js → Clear-XkW6YpHE.js} +1 -1
  15. package/dist/assets/{Delete-BR43GocU.js → Delete-CCasVLgy.js} +1 -1
  16. package/dist/assets/{DeleteOutline-BknUUIOQ.js → DeleteOutline-CocEa6gq.js} +1 -1
  17. package/dist/assets/{Done-D38mSa7e.js → Done-DfHgd6VN.js} +1 -1
  18. package/dist/assets/{Edit-Cezv9GPx.js → Edit-CGdW8_LW.js} +1 -1
  19. package/dist/assets/{ErrorOutline-DSSui5bs.js → ErrorOutline-D3nJBXYA.js} +1 -1
  20. package/dist/assets/{FilterList-ByiwX7w6.js → FilterList-BiaeVs0C.js} +1 -1
  21. package/dist/assets/{Google-DW20cCdB.js → Google-D9HgkG4U.js} +1 -1
  22. package/dist/assets/{HelpOutline-C8Ii5pdp.js → HelpOutline-s5mQqTw1.js} +1 -1
  23. package/dist/assets/{Launch-BjUxWdZ_.js → Launch-DHnB5pzO.js} +1 -1
  24. package/dist/assets/{Link-rwof5_jN.js → Link-DUSQD8mc.js} +1 -1
  25. package/dist/assets/{ListItemButton-CLYRGxS5.js → ListItemButton-BIo7wBNv.js} +1 -1
  26. package/dist/assets/{ListSubheader-BrZqDYTB.js → ListSubheader-rZisNvzB.js} +1 -1
  27. package/dist/assets/{LoadingButton-CEhniQ1z.js → LoadingButton-egcGN7yK.js} +1 -1
  28. package/dist/assets/{LottiePlayer.modern-BOVXfijb.js → LottiePlayer.modern-DuQJ5g1j.js} +1 -1
  29. package/dist/assets/{MoreVert-YQMFdAci.js → MoreVert-Cw1fjU9L.js} +1 -1
  30. package/dist/assets/{OpenInNew-D__db3UD.js → OpenInNew-2i4mGCRx.js} +1 -1
  31. package/dist/assets/{Refresh-CEyibS7R.js → Refresh-BIkqgW7p.js} +1 -1
  32. package/dist/assets/{Replay-DJEt53W0.js → Replay-3PaYn2br.js} +1 -1
  33. package/dist/assets/{Search-B-Kpov_x.js → Search-mc0LftDb.js} +1 -1
  34. package/dist/assets/{Stepper-BkvTFi6y.js → Stepper-CnqNXODv.js} +1 -1
  35. package/dist/assets/{TableSearch-QTEwGVjE.js → TableSearch-ZIwL7jK3.js} +1 -1
  36. package/dist/assets/{ToggleButtonGroup-leiBEwd_.js → ToggleButtonGroup-DeGfqT0G.js} +1 -1
  37. package/dist/assets/{UnfoldMore-BtGzVWNn.js → UnfoldMore-DFA58tLQ.js} +1 -1
  38. package/dist/assets/{Verified-GvGnFXRL.js → Verified-se8hbTqT.js} +1 -1
  39. package/dist/assets/{VerifiedUser-D8u3Hj9z.js → VerifiedUser-8QA2XNlm.js} +1 -1
  40. package/dist/assets/{ViewList-CI4jp_14.js → ViewList-DgyKMmIc.js} +1 -1
  41. package/dist/assets/{Visibility-Bmnp5dVh.js → Visibility-BqBwXDHr.js} +1 -1
  42. package/dist/assets/{_createAggregator-DcJLZ0MZ.js → _createAggregator-BS_ZCLsv.js} +1 -1
  43. package/dist/assets/{actions-CCjvPhEB.js → actions-BuX7-i-0.js} +1 -1
  44. package/dist/assets/{actions-DaRBxjah.js → actions-DR8B4Taf.js} +2 -2
  45. package/dist/assets/{actions-CAvjo_Ow.js → actions-Zy-oEKVg.js} +1 -1
  46. package/dist/assets/{agreement-B5uBdrUm.js → agreement-3SHQ4MuR.js} +1 -1
  47. package/dist/assets/api-DBq1KtcA.js +1 -0
  48. package/dist/assets/{appearance-BWTNqmDR.js → appearance-CRQaeOoe.js} +1 -1
  49. package/dist/assets/{audit-logs-BAppUNme.js → audit-logs-BGRhRsNS.js} +2 -2
  50. package/dist/assets/{babel-BttEwFDF.js → babel-BILHfcMU.js} +1 -1
  51. package/dist/assets/{base-chart-nzAgs-vq.js → base-chart-Cp-etWR-.js} +1 -1
  52. package/dist/assets/{blocklet-mQW2VRE3.js → blocklet-D7q_eJsm.js} +1 -1
  53. package/dist/assets/{chain-Bajmovwi.js → chain-DDmwEbOF.js} +1 -1
  54. package/dist/assets/{click-to-copy-BJwHXTAU.js → click-to-copy-wk3E32eY.js} +1 -1
  55. package/dist/assets/cloneDeep-BEJXcFgb.js +1 -0
  56. package/dist/assets/{config-navigation-DhuiKMvJ.js → config-navigation-iUuwjLA_.js} +17 -17
  57. package/dist/assets/{connect-lnVGHfaY.js → connect-DGRM2e01.js} +1 -1
  58. package/dist/assets/{connect-to-HWRwV1Zb.js → connect-to-BdinmIba.js} +3 -3
  59. package/dist/assets/{delete-confirm-D-pHWenk.js → delete-confirm-C8X53PNk.js} +1 -1
  60. package/dist/assets/{depsEqual-BTB47kAG.js → depsEqual-FU6HOfMn.js} +1 -1
  61. package/dist/assets/{detail-DPUG43Cf.js → detail-BX_klHKR.js} +2 -2
  62. package/dist/assets/domains-DlW2t7QG.js +28 -0
  63. package/dist/assets/{download-B_GCffOL.js → download-CHMW-VV9.js} +1 -1
  64. package/dist/assets/{edit.svg-DgkWXClh.js → edit.svg-CBqxioRV.js} +1 -1
  65. package/dist/assets/emotion-cache.browser.esm-D6kXFXIA.js +1 -0
  66. package/dist/assets/engine-hQAyActy.js +1 -0
  67. package/dist/assets/{federated-detail-dialog-BAAYkStt.js → federated-detail-dialog-C93dA_OW.js} +1 -1
  68. package/dist/assets/{get-safe-url-BmWKThk5.js → get-safe-url-n4nPkbEQ.js} +1 -1
  69. package/dist/assets/getValidReactChildren-dJeDeNuf.js +1 -0
  70. package/dist/assets/{graphql-DRZgDRnJ.js → graphql-BOG1t7Ob.js} +1 -1
  71. package/dist/assets/{graphqlMode-D6Ry3UyA.js → graphqlMode-BuOU6E0N.js} +2 -2
  72. package/dist/assets/{html-title-BO3r7YSd.js → html-title-DwrWBQUt.js} +1 -1
  73. package/dist/assets/{iframe-DaoKgbiQ.js → iframe-B0inMXzK.js} +1 -1
  74. package/dist/assets/{index-BsfgDen6.js → index-0lc-age1.js} +1 -1
  75. package/dist/assets/index-1nsTMIEw.js +1 -0
  76. package/dist/assets/{index-xie30Dh0.js → index-2jRJYLHP.js} +1 -1
  77. package/dist/assets/{index-DwPMkrzc.js → index-2tPqycMJ.js} +2 -2
  78. package/dist/assets/{index-Ohp5zy8G.js → index-4OvGI3tM.js} +1 -1
  79. package/dist/assets/{index-BA_zqSiS.js → index-7TgPZijh.js} +1 -1
  80. package/dist/assets/{index-IQ8RBJFB.js → index-8K8V7S7h.js} +1 -1
  81. package/dist/assets/{index-DgAeLiKC.js → index-B01of1n7.js} +1 -1
  82. package/dist/assets/{index-PZ2fx_h4.js → index-B8jKymjp.js} +3 -3
  83. package/dist/assets/{index-DUa2rZxk.js → index-B9oDQ5jy.js} +20 -20
  84. package/dist/assets/{index-CcXfL7E7.js → index-BDQexjSt.js} +1 -1
  85. package/dist/assets/{index-CAbi4Q6i.js → index-BFpYSXLl.js} +3 -3
  86. package/dist/assets/{index-CcPy8sB_.js → index-BIOcSTv1.js} +1 -1
  87. package/dist/assets/{index-BdqGdcv2.js → index-BJsW1I-W.js} +1 -1
  88. package/dist/assets/{index-DrKVMSE5.js → index-BPu5OFdR.js} +1 -1
  89. package/dist/assets/{index-DscVI0IV.js → index-BQ0GXRUy.js} +1 -1
  90. package/dist/assets/{index-C7RFlKtP.js → index-BbnbDlTc.js} +2 -2
  91. package/dist/assets/{index-I3asAR5r.js → index-Bg6xcyjD.js} +6 -6
  92. package/dist/assets/{index-N0aqGit9.js → index-BsmvyFtw.js} +1 -1
  93. package/dist/assets/{index-BfWiTV5L.js → index-C5xvmzdD.js} +1 -1
  94. package/dist/assets/{index-D7zthsmK.js → index-CGJGuomb.js} +3 -3
  95. package/dist/assets/{index-DEflHlyo.js → index-CP8e2zcP.js} +3 -3
  96. package/dist/assets/{index-CENTGsHb.js → index-CRRnOuLM.js} +3 -3
  97. package/dist/assets/{index-AGlbL6jT.js → index-Cm_CX9Km.js} +1 -1
  98. package/dist/assets/{index-C07Ljz-P.js → index-CqXuTw4d.js} +1 -1
  99. package/dist/assets/{index-Cj38JD_6.js → index-Cske9PWb.js} +3 -3
  100. package/dist/assets/{index-BWxIl7Zm.js → index-CyXVLDQI.js} +1 -1
  101. package/dist/assets/{index-DZ_f5Dfi.js → index-D3qtx7de.js} +1 -1
  102. package/dist/assets/{index-BcRKEX-z.js → index-DK8BRrRb.js} +2 -2
  103. package/dist/assets/{index-CWEDY4A2.js → index-DNGIFQtW.js} +4 -4
  104. package/dist/assets/{index-Bl5zzd5F.js → index-DX_ig3IR.js} +1 -1
  105. package/dist/assets/{index-CJe-L0_W.js → index-De_3fKYA.js} +1 -1
  106. package/dist/assets/{index-CXj3-Qmy.js → index-G4GuFOuO.js} +1 -1
  107. package/dist/assets/{index-DA3gthJ9.js → index-MLCJ7HJV.js} +2 -2
  108. package/dist/assets/{index-BlU32mL_.js → index-OZjARxbD.js} +1 -1
  109. package/dist/assets/{index-BbxLly-V.js → index-Oah-jRyx.js} +1 -1
  110. package/dist/assets/{index-22B4OxZa.js → index-PzC6rkTH.js} +1 -1
  111. package/dist/assets/{index-ll7_pfKU.js → index-StdVm_EG.js} +1 -1
  112. package/dist/assets/{index--_MX4Y7D.js → index-_qKxdWY4.js} +10 -10
  113. package/dist/assets/{index-C2XQ9Wkq.js → index-dKtf23Ej.js} +1 -1
  114. package/dist/assets/{index-C4zhyFnN.js → index-erCgIvu7.js} +1 -1
  115. package/dist/assets/{index-DzQavNm8.js → index-hxHDV4zb.js} +2 -2
  116. package/dist/assets/{index-PupLKSg6.js → index-mGRBDoXw.js} +1 -1
  117. package/dist/assets/{index-B9lrrb_O.js → index-p8ewFFuc.js} +5 -5
  118. package/dist/assets/{index-BI2ulEux.js → index-pMmL--Md.js} +1 -1
  119. package/dist/assets/{index.esm-uIPkYqTP.js → index.esm-DjcC6_YD.js} +1 -1
  120. package/dist/assets/{install-from-url-6nN6p8KI.js → install-from-url-DfM4lxPD.js} +1 -1
  121. package/dist/assets/{invitation-BwJczXLd.js → invitation-CyjIyIIY.js} +1 -1
  122. package/dist/assets/{is-path-prefix-equal-B5QaVi7p.js → is-path-prefix-equal-sWdIB_FI.js} +1 -1
  123. package/dist/assets/{isEmail-DYZ2ooZR.js → isEmail-CpvKmXxu.js} +1 -1
  124. package/dist/assets/{item-9r2fa-dg.js → item-NX8BCXwV.js} +6 -6
  125. package/dist/assets/{jsonMode--ELrQNuw.js → jsonMode-wNz3PCor.js} +1 -1
  126. package/dist/assets/{list-header-W2Zqfuhf.js → list-header-DXqt77-Y.js} +1 -1
  127. package/dist/assets/{lite-eb-MtGjP.js → lite-D7_0Kk8P.js} +2 -2
  128. package/dist/assets/{lock.svg-BAPv5bGI.js → lock.svg-D22_UbmU.js} +1 -1
  129. package/dist/assets/{log-DfRitFTN.js → log-BtG4l72D.js} +1 -1
  130. package/dist/assets/{login-method-item-duWmEQ4c.js → login-method-item-CGUaonon.js} +1 -1
  131. package/dist/assets/{lottie-react.esm-Dg4E2zZC.js → lottie-react.esm-Cj9O6Lld.js} +1 -1
  132. package/dist/assets/{memory-CVCAiVAD.js → memory-MEOErB2y.js} +1 -1
  133. package/dist/assets/{metric-DGyzAosW.js → metric-DzrjUE5P.js} +1 -1
  134. package/dist/assets/{monaco-editor-CIyTCq3w.js → monaco-editor-i4E7Erh-.js} +3 -3
  135. package/dist/assets/{mouseTarget-yzhGv1sN.js → mouseTarget-DHjy6bBl.js} +1 -1
  136. package/dist/assets/omit-C1X-CRrb.js +1 -0
  137. package/dist/assets/{overview-CjC2_6TA.js → overview-BPSzB7yi.js} +1 -1
  138. package/dist/assets/{permission-Dgeoh_gC.js → permission-D6xGjoP4.js} +1 -1
  139. package/dist/assets/{preference-DPXvsW07.js → preference-CWfaETuk.js} +9 -9
  140. package/dist/assets/{provider-icon-H03n2Hjs.js → provider-icon-D-a204Ay.js} +1 -1
  141. package/dist/assets/{raf-schd.esm-Dgds4zE-.js → raf-schd.esm-vaS856Rv.js} +1 -1
  142. package/dist/assets/{rotate-session-key-Cg34J7dQ.js → rotate-session-key-Cn3NVWRi.js} +1 -1
  143. package/dist/assets/runtime-BJVsSRvX.js +1 -0
  144. package/dist/assets/schema-DeNYz3hJ.js +1 -0
  145. package/dist/assets/sdk-CyaYnqk4.js +1 -0
  146. package/dist/assets/{service-DoInkZVF.js → service-COrrqY-3.js} +1 -1
  147. package/dist/assets/{shorten-label-Ct9vHiPy.js → shorten-label-j-itDv6J.js} +1 -1
  148. package/dist/assets/{simple-select-DUBD32-K.js → simple-select-DApzKMrW.js} +1 -1
  149. package/dist/assets/{spaces-Ca-nLDun.js → spaces-BqdEt5Dg.js} +1 -1
  150. package/dist/assets/{status-DJJQr33v.js → status-CFw68CfZ.js} +2 -2
  151. package/dist/assets/{status-B8aMCivY.js → status-vwaEURfH.js} +1 -1
  152. package/dist/assets/{switch-control-DN6AO5e-.js → switch-control-BEw34mlq.js} +1 -1
  153. package/dist/assets/{table-icons-DPN-ujpU.js → table-icons-V0nzUvpC.js} +1 -1
  154. package/dist/assets/team-Bp-ehLS6.js +1 -0
  155. package/dist/assets/toLower-C4OoJYWk.js +1 -0
  156. package/dist/assets/toUpper-P-IpqDCE.js +1 -0
  157. package/dist/assets/{traffic-Coyo0eln.js → traffic-BuuDuC5C.js} +1 -1
  158. package/dist/assets/trim-BrqZEf0Q.js +1 -0
  159. package/dist/assets/{url-evaluation-DF8LRV6u.js → url-evaluation-BotqjpOW.js} +1 -1
  160. package/dist/assets/{url-join-BAOkJVTN.js → url-join-BYRfgTzL.js} +1 -1
  161. package/dist/assets/{use-mobile-D8q1By2e.js → use-mobile-BIorytbM.js} +1 -1
  162. package/dist/assets/{use-mobile-DjOKbbdW.js → use-mobile-BxCxZMSF.js} +1 -1
  163. package/dist/assets/{useAsync-CpuSmv4M.js → useAsync-CbHsXkPS.js} +1 -1
  164. package/dist/assets/{useAsyncRetry-DQ-1kK3Z.js → useAsyncRetry-6ULbruV9.js} +1 -1
  165. package/dist/assets/{useLocalStorage-B1cIHaab.js → useLocalStorage-CBx2eW_l.js} +1 -1
  166. package/dist/assets/{useThemeProps-CaL-a5Z3.js → useThemeProps-BWD3Vp6O.js} +1 -1
  167. package/dist/assets/{util-Dk5V-b84.js → util-BF2dKFyL.js} +1 -1
  168. package/dist/assets/{wait-container-BxmUT_e8.js → wait-container-Cc0h_2b3.js} +1 -1
  169. package/dist/assets/{without-wallet-DdcteX-E.js → without-wallet-lUjEmpWw.js} +1 -1
  170. package/dist/assets/wrap-locale-CF87ubG3.js +1 -0
  171. package/dist/index.html +1 -1
  172. package/package.json +1 -1
  173. package/dist/assets/ArrowDropDown-CLtIK8Ds.js +0 -1
  174. package/dist/assets/api-CtY709C1.js +0 -1
  175. package/dist/assets/cloneDeep-DcL7wHTZ.js +0 -1
  176. package/dist/assets/domains-DgOFqkxv.js +0 -28
  177. package/dist/assets/emotion-cache.browser.esm-C9pXLaus.js +0 -1
  178. package/dist/assets/engine-CsOVDEBF.js +0 -1
  179. package/dist/assets/getValidReactChildren-CaUdxsqb.js +0 -1
  180. package/dist/assets/index-DTHqSol2.js +0 -1
  181. package/dist/assets/omit-C9i7Uayy.js +0 -1
  182. package/dist/assets/runtime-3p5sMXNX.js +0 -1
  183. package/dist/assets/schema-DtiemgGr.js +0 -1
  184. package/dist/assets/sdk-CChXw_FN.js +0 -1
  185. package/dist/assets/team-pgmvSiLk.js +0 -1
  186. package/dist/assets/toUpper-DWIvDS3T.js +0 -1
  187. package/dist/assets/trim-CGi2LMwA.js +0 -1
  188. package/dist/assets/wrap-locale-BD1k5sx5.js +0 -1
@@ -1 +1 @@
1
- import{j,o as L,ff as Pt,eF as Ot,fg as Lt,B as dt,fh as Tt,r as I,U as Dt,cZ as Nt,au as qt,az as Mt,aF as Bt,aR as Wt,d as Ft,V as Gt,z as Ht,d8 as Kt,bA as Vt,x as et,aT as zt,c8 as Jt,k as Yt,H as $t,bB as rt,J as Xt,at as Qt,cu as Zt,cv as kt,as as te,bz as it,C as nt,A as ee,an as re}from"./index-DEflHlyo.js";import{W as ie}from"./status-DJJQr33v.js";import{r as gt,a as ne,W as se}from"./without-wallet-DdcteX-E.js";import{r as oe}from"./cloneDeep-DcL7wHTZ.js";import{u as vt}from"./useLocalStorage-B1cIHaab.js";import{v as st}from"./index-IQ8RBJFB.js";import{D as ae}from"./Delete-BR43GocU.js";import{A as le}from"./Autocomplete-DTKIP70z.js";import{L as ce}from"./ListItemButton-CLYRGxS5.js";import{S as ue,a as he,b as fe}from"./Stepper-BkvTFi6y.js";function pe({mode:o,...p}){return o==="development"?j.jsx(ie,{type:"primary",...p,children:"DEV"}):null}pe.propTypes={mode:L.string.isRequired};var T={},G={exports:{}},z={exports:{}},ot;function yt(){if(ot)return z.exports;ot=1;var o=z.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(u){return"file-"+m(u)}}},p={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:m};Object.keys(o).forEach(function(u){Object.keys(p).forEach(function(h){o[u][h]||(o[u][h]=p[h])}),o[u].protocols_re=RegExp("^("+o[u].protocols.map(function(h){return h.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function m(u){return u.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}return z.exports}var J,at;function me(){if(at)return J;at=1;var o=yt(),p=Object.assign||function(h,t){if(t===null||typeof t!="object")return h;const r=Object.keys(t);let i=r.length;for(;i--;)h[r[i]]=t[r[i]];return h};J=m;function m(u,h,t,r,i,n,a){var x=this;x.type=u,Object.keys(o[u]).forEach(function(C){x[C]=o[u][C]}),x.user=h,x.auth=t,x.project=r,x.committish=i,x.default=n,x.opts=a||{}}return m.prototype.hash=function(){return this.committish?"#"+this.committish:""},m.prototype._fill=function(u,h){if(u){var t=p({},h);t.path=t.path?t.path.replace(/^[/]+/g,""):"",h=p(p({},this.opts),h);var r=this;Object.keys(this).forEach(function(c){r[c]!=null&&t[c]==null&&(t[c]=r[c])});var i=t.auth,n=t.committish,a=t.fragment,x=t.path,C=t.project;Object.keys(t).forEach(function(c){var _=t[c];(c==="path"||c==="project")&&typeof _=="string"?t[c]=_.split("/").map(function(S){return encodeURIComponent(S)}).join("/"):c!=="domain"&&(t[c]=encodeURIComponent(_))}),t["auth@"]=i?i+"@":"",t["#fragment"]=a?"#"+this.hashformat(a):"",t.fragment=t.fragment?t.fragment:"",t["#path"]=x?"#"+this.hashformat(x):"",t["/path"]=t.path?"/"+t.path:"",t.projectPath=C.split("/").map(encodeURIComponent).join("/"),h.noCommittish?(t["#committish"]="",t["/tree/committish"]="",t["/committish"]="",t.committish=""):(t["#committish"]=n?"#"+n:"",t["/tree/committish"]=t.committish?"/"+t.treepath+"/"+t.committish:"",t["/committish"]=t.committish?"/"+t.committish:"",t.committish=t.committish||"master");var g=u;return Object.keys(t).forEach(function(c){g=g.replace(new RegExp("[{]"+c+"[}]","g"),t[c])}),h.noGitPlus?g.replace(/^git[+]/,""):g}},m.prototype.ssh=function(u){return this._fill(this.sshtemplate,u)},m.prototype.sshurl=function(u){return this._fill(this.sshurltemplate,u)},m.prototype.browse=function(u,h,t){return typeof u=="string"?(typeof h!="string"&&(t=h,h=null),this._fill(this.browsefiletemplate,p({fragment:h,path:u},t))):this._fill(this.browsetemplate,u)},m.prototype.docs=function(u){return this._fill(this.docstemplate,u)},m.prototype.bugs=function(u){return this._fill(this.bugstemplate,u)},m.prototype.https=function(u){return this._fill(this.httpstemplate,u)},m.prototype.git=function(u){return this._fill(this.gittemplate,u)},m.prototype.shortcut=function(u){return this._fill(this.shortcuttemplate,u)},m.prototype.path=function(u){return this._fill(this.pathtemplate,u)},m.prototype.tarball=function(u){var h=p({},u,{noCommittish:!1});return this._fill(this.tarballtemplate,h)},m.prototype.file=function(u,h){return this._fill(this.filetemplate,p({path:u},h))},m.prototype.getDefaultRepresentation=function(){return this.default},m.prototype.toString=function(u){return this.default&&typeof this[this.default]=="function"?this[this.default](u):this.sshurl(u)},J}var Y,lt;function de(){return lt||(lt=1,Y=function(o){o.prototype[Symbol.iterator]=function*(){for(let p=this.head;p;p=p.next)yield p.value}}),Y}var $,ct;function ge(){if(ct)return $;ct=1,$=o,o.Node=h,o.create=o;function o(t){var r=this;if(r instanceof o||(r=new o),r.tail=null,r.head=null,r.length=0,t&&typeof t.forEach=="function")t.forEach(function(a){r.push(a)});else if(arguments.length>0)for(var i=0,n=arguments.length;i<n;i++)r.push(arguments[i]);return r}o.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var r=t.next,i=t.prev;return r&&(r.prev=i),i&&(i.next=r),t===this.head&&(this.head=r),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,r},o.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var r=this.head;t.list=this,t.next=r,r&&(r.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},o.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var r=this.tail;t.list=this,t.prev=r,r&&(r.next=t),this.tail=t,this.head||(this.head=t),this.length++}},o.prototype.push=function(){for(var t=0,r=arguments.length;t<r;t++)m(this,arguments[t]);return this.length},o.prototype.unshift=function(){for(var t=0,r=arguments.length;t<r;t++)u(this,arguments[t]);return this.length},o.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},o.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},o.prototype.forEach=function(t,r){r=r||this;for(var i=this.head,n=0;i!==null;n++)t.call(r,i.value,n,this),i=i.next},o.prototype.forEachReverse=function(t,r){r=r||this;for(var i=this.tail,n=this.length-1;i!==null;n--)t.call(r,i.value,n,this),i=i.prev},o.prototype.get=function(t){for(var r=0,i=this.head;i!==null&&r<t;r++)i=i.next;if(r===t&&i!==null)return i.value},o.prototype.getReverse=function(t){for(var r=0,i=this.tail;i!==null&&r<t;r++)i=i.prev;if(r===t&&i!==null)return i.value},o.prototype.map=function(t,r){r=r||this;for(var i=new o,n=this.head;n!==null;)i.push(t.call(r,n.value,this)),n=n.next;return i},o.prototype.mapReverse=function(t,r){r=r||this;for(var i=new o,n=this.tail;n!==null;)i.push(t.call(r,n.value,this)),n=n.prev;return i},o.prototype.reduce=function(t,r){var i,n=this.head;if(arguments.length>1)i=r;else if(this.head)n=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=0;n!==null;a++)i=t(i,n.value,a),n=n.next;return i},o.prototype.reduceReverse=function(t,r){var i,n=this.tail;if(arguments.length>1)i=r;else if(this.tail)n=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=this.length-1;n!==null;a--)i=t(i,n.value,a),n=n.prev;return i},o.prototype.toArray=function(){for(var t=new Array(this.length),r=0,i=this.head;i!==null;r++)t[r]=i.value,i=i.next;return t},o.prototype.toArrayReverse=function(){for(var t=new Array(this.length),r=0,i=this.tail;i!==null;r++)t[r]=i.value,i=i.prev;return t},o.prototype.slice=function(t,r){r=r||this.length,r<0&&(r+=this.length),t=t||0,t<0&&(t+=this.length);var i=new o;if(r<t||r<0)return i;t<0&&(t=0),r>this.length&&(r=this.length);for(var n=0,a=this.head;a!==null&&n<t;n++)a=a.next;for(;a!==null&&n<r;n++,a=a.next)i.push(a.value);return i},o.prototype.sliceReverse=function(t,r){r=r||this.length,r<0&&(r+=this.length),t=t||0,t<0&&(t+=this.length);var i=new o;if(r<t||r<0)return i;t<0&&(t=0),r>this.length&&(r=this.length);for(var n=this.length,a=this.tail;a!==null&&n>r;n--)a=a.prev;for(;a!==null&&n>t;n--,a=a.prev)i.push(a.value);return i},o.prototype.splice=function(t,r,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,a=this.head;a!==null&&n<t;n++)a=a.next;for(var x=[],n=0;a&&n<r;n++)x.push(a.value),a=this.removeNode(a);a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(var n=0;n<i.length;n++)a=p(this,a,i[n]);return x},o.prototype.reverse=function(){for(var t=this.head,r=this.tail,i=t;i!==null;i=i.prev){var n=i.prev;i.prev=i.next,i.next=n}return this.head=r,this.tail=t,this};function p(t,r,i){var n=r===t.head?new h(i,null,r,t):new h(i,r,r.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function m(t,r){t.tail=new h(r,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function u(t,r){t.head=new h(r,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function h(t,r,i,n){if(!(this instanceof h))return new h(t,r,i,n);this.list=n,this.value=t,r?(r.next=this,this.prev=r):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}try{de()(o)}catch{}return $}var X,ut;function ve(){if(ut)return X;ut=1;const o=ge(),p=Symbol("max"),m=Symbol("length"),u=Symbol("lengthCalculator"),h=Symbol("allowStale"),t=Symbol("maxAge"),r=Symbol("dispose"),i=Symbol("noDisposeOnSet"),n=Symbol("lruList"),a=Symbol("cache"),x=Symbol("updateAgeOnGet"),C=()=>1;class g{constructor(s){if(typeof s=="number"&&(s={max:s}),s||(s={}),s.max&&(typeof s.max!="number"||s.max<0))throw new TypeError("max must be a non-negative number");this[p]=s.max||1/0;const e=s.length||C;if(this[u]=typeof e!="function"?C:e,this[h]=s.stale||!1,s.maxAge&&typeof s.maxAge!="number")throw new TypeError("maxAge must be a number");this[t]=s.maxAge||0,this[r]=s.dispose,this[i]=s.noDisposeOnSet||!1,this[x]=s.updateAgeOnGet||!1,this.reset()}set max(s){if(typeof s!="number"||s<0)throw new TypeError("max must be a non-negative number");this[p]=s||1/0,S(this)}get max(){return this[p]}set allowStale(s){this[h]=!!s}get allowStale(){return this[h]}set maxAge(s){if(typeof s!="number")throw new TypeError("maxAge must be a non-negative number");this[t]=s,S(this)}get maxAge(){return this[t]}set lengthCalculator(s){typeof s!="function"&&(s=C),s!==this[u]&&(this[u]=s,this[m]=0,this[n].forEach(e=>{e.length=this[u](e.value,e.key),this[m]+=e.length})),S(this)}get lengthCalculator(){return this[u]}get length(){return this[m]}get itemCount(){return this[n].length}rforEach(s,e){e=e||this;for(let l=this[n].tail;l!==null;){const f=l.prev;U(this,s,l,e),l=f}}forEach(s,e){e=e||this;for(let l=this[n].head;l!==null;){const f=l.next;U(this,s,l,e),l=f}}keys(){return this[n].toArray().map(s=>s.key)}values(){return this[n].toArray().map(s=>s.value)}reset(){this[r]&&this[n]&&this[n].length&&this[n].forEach(s=>this[r](s.key,s.value)),this[a]=new Map,this[n]=new o,this[m]=0}dump(){return this[n].map(s=>_(this,s)?!1:{k:s.key,v:s.value,e:s.now+(s.maxAge||0)}).toArray().filter(s=>s)}dumpLru(){return this[n]}set(s,e,l){if(l=l||this[t],l&&typeof l!="number")throw new TypeError("maxAge must be a number");const f=l?Date.now():0,y=this[u](e,s);if(this[a].has(s)){if(y>this[p])return w(this,this[a].get(s)),!1;const A=this[a].get(s).value;return this[r]&&(this[i]||this[r](s,A.value)),A.now=f,A.maxAge=l,A.value=e,this[m]+=y-A.length,A.length=y,this.get(s),S(this),!0}const b=new R(s,e,y,f,l);return b.length>this[p]?(this[r]&&this[r](s,e),!1):(this[m]+=b.length,this[n].unshift(b),this[a].set(s,this[n].head),S(this),!0)}has(s){if(!this[a].has(s))return!1;const e=this[a].get(s).value;return!_(this,e)}get(s){return c(this,s,!0)}peek(s){return c(this,s,!1)}pop(){const s=this[n].tail;return s?(w(this,s),s.value):null}del(s){w(this,this[a].get(s))}load(s){this.reset();const e=Date.now();for(let l=s.length-1;l>=0;l--){const f=s[l],y=f.e||0;if(y===0)this.set(f.k,f.v);else{const b=y-e;b>0&&this.set(f.k,f.v,b)}}}prune(){this[a].forEach((s,e)=>c(this,e,!1))}}const c=(v,s,e)=>{const l=v[a].get(s);if(l){const f=l.value;if(_(v,f)){if(w(v,l),!v[h])return}else e&&(v[x]&&(l.value.now=Date.now()),v[n].unshiftNode(l));return f.value}},_=(v,s)=>{if(!s||!s.maxAge&&!v[t])return!1;const e=Date.now()-s.now;return s.maxAge?e>s.maxAge:v[t]&&e>v[t]},S=v=>{if(v[m]>v[p])for(let s=v[n].tail;v[m]>v[p]&&s!==null;){const e=s.prev;w(v,s),s=e}},w=(v,s)=>{if(s){const e=s.value;v[r]&&v[r](e.key,e.value),v[m]-=e.length,v[a].delete(e.key),v[n].removeNode(s)}};class R{constructor(s,e,l,f,y){this.key=s,this.value=e,this.length=l,this.now=f,this.maxAge=y||0}}const U=(v,s,e,l)=>{let f=e.value;_(v,f)&&(w(v,e),v[h]||(f=void 0)),f&&s.call(l,f.value,f.key,v)};return X=g,X}var ht;function ye(){if(ht)return G.exports;ht=1;var o=Pt,p=yt(),m=G.exports=me(),u=ve(),h=new u({max:1e3}),t={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function r(g){return t[g]||g.slice(0,-1)}var i={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};G.exports.fromUrl=function(g,c){if(typeof g=="string"){var _=g+JSON.stringify(c||{});return h.has(_)||h.set(_,n(g,c)),h.get(_)}};function n(g,c){if(!(g==null||g==="")){var _=x(a(g)?"github:"+g:g),S=C(_),w=_.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),R=Object.keys(p).map(function(U){try{var v=p[U],s=null;S.auth&&i[S.protocol]&&(s=S.auth);var e=S.hash?decodeURIComponent(S.hash.substr(1)):null,l=null,f=null,y=null;if(w&&w[1]===U)l=w[2]&&decodeURIComponent(w[2]),f=decodeURIComponent(w[3].replace(/\.git$/,"")),y="shortcut";else{if(S.host&&S.host!==v.domain&&S.host.replace(/^www[.]/,"")!==v.domain||!v.protocols_re.test(S.protocol)||!S.path)return;var b=v.pathmatch,E=S.path.match(b);if(!E)return;E[1]!==null&&E[1]!==void 0&&(l=decodeURIComponent(E[1].replace(/^:/,""))),f=decodeURIComponent(E[2]),y=r(S.protocol)}return new m(U,l,s,f,e,y,c)}catch(A){if(!(A instanceof URIError))throw A}}).filter(function(U){return U});if(R.length===1)return R[0]}}function a(g){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(g)}function x(g){var c=o.parse(g);return c.protocol==="gist:"&&c.host&&!c.path?c.protocol+"/"+c.host:g}function C(g){var c=g.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!c){var _=o.parse(g);if(_.auth){const w=g.match(/[^@]+@[^:/]+/);if(w){var S=new o.URL(w[0]);_.auth=S.username||"",S.password&&(_.auth+=":"+S.password)}}return _}return{protocol:"git+ssh:",slashes:!0,auth:c[1],host:c[2],port:null,hostname:c[2],hash:c[4],search:null,query:null,pathname:"/"+c[3],path:"/"+c[3],href:"git+ssh://"+c[1]+"@"+c[2]+"/"+c[3]+(c[4]||"")}}return G.exports}var N={},O={},ft;function xe(){if(ft)return O;ft=1;var o=O&&O.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(O,"__esModule",{value:!0}),O.setService=O.findService=O.getDefaultServiceConfig=O.getServiceConfig=void 0;const p=o(oe),m=gt(),u={},h=a=>{u[a.name]={validate:a.schema.validate.bind(a.schema),defaultConfig:a.default}};O.setService=h,h({name:"auth",schema:m.authConfigSchema,default:{}});const t=a=>{if(!a)throw new Error("service name should not be empty");const x=u[a];if(!x)throw new Error(`service ${a} does not exist`);return x},r=(a,x,{validate:C}={})=>{const g=t(a),c=(0,p.default)(x||{}),{value:_,error:S}=g.validate(c);if(C&&S)throw new Error(`Invalid blocklet service config: ${S.details.map(w=>w.message).join(", ")}`);return _};O.getServiceConfig=r;const i=a=>{const{defaultConfig:x}=t(a);return x};O.getDefaultServiceConfig=i;const n=(a,x)=>{const C=[x];return(a||[]).find(g=>C.includes(g.name))};return O.findService=n,O.default={getServiceConfig:r,getDefaultServiceConfig:i,findService:n,setService:h},O}var pt;function be(){if(pt)return N;pt=1,Object.defineProperty(N,"__esModule",{value:!0}),N.fixAndValidateService=N.validateMeta=void 0;const o=gt(),p=xe(),m=h=>(!h.interfaces||!h.interfaces.length||h.interfaces.forEach(t=>{t.services&&t.services.length&&t.services.forEach(r=>{r.config=(0,p.getServiceConfig)(r.name,r.config,{validate:!0})})}),h);N.fixAndValidateService=m;const u=(h,{ensureFiles:t=!1,ensureDist:r=!1,ensureComponentStore:i=!0,ensureName:n=!1,skipValidateDidName:a=!1,schemaOptions:x={}}={})=>{const C=(0,o.createBlockletSchema)(null,{ensureFiles:t,ensureDist:r,ensureComponentStore:i,ensureName:n,skipValidateDidName:a,...x}),{value:g,error:c}=C.validate(h);if(c)throw new Error(`Invalid blocklet meta: ${c.details.map(_=>_.message).join(", ")}`);return g};return N.validateMeta=u,N.default=u,N}var mt;function je(){return mt||(mt=1,(function(o){var p=T&&T.__createBinding||(Object.create?(function(e,l,f,y){y===void 0&&(y=f);var b=Object.getOwnPropertyDescriptor(l,f);(!b||("get"in b?!l.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return l[f]}}),Object.defineProperty(e,y,b)}):(function(e,l,f,y){y===void 0&&(y=f),e[y]=l[f]})),m=T&&T.__setModuleDefault||(Object.create?(function(e,l){Object.defineProperty(e,"default",{enumerable:!0,value:l})}):function(e,l){e.default=l}),u=T&&T.__importStar||(function(){var e=function(l){return e=Object.getOwnPropertyNames||function(f){var y=[];for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&(y[y.length]=b);return y},e(l)};return function(l){if(l&&l.__esModule)return l;var f={};if(l!=null)for(var y=e(l),b=0;b<y.length;b++)y[b]!=="default"&&p(f,l,y[b]);return m(f,l),f}})(),h=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.fixService=o.fixInterfaces=o.parsePerson=o.formatPerson=o.fixName=o.fixTags=o.fixPerson=o.fixKeywords=o.fixFiles=o.fixRepository=o.fixRequired=void 0;const t=h(Ot),r=u(ye()),i=Lt(),n=be();Object.defineProperty(o,"fixService",{enumerable:!0,get:function(){return n.fixAndValidateService}});const a=ne(),x=(e,l)=>{e.description||(e.description=`Blocklet from ${l}`),e.version||(e.version=i.BLOCKLET_DEFAULT_VERSION)};o.fixRequired=x;const C=e=>{if(e.repository&&(typeof e.repository=="string"&&(e.repository={type:"git",url:e.repository}),e.repository.url)){const l=r.fromUrl(e.repository.url);l&&(e.repository.url=l.getDefaultRepresentation()==="shortcut"?l.https():l.toString())}};o.fixRepository=C;const g=e=>{Array.isArray(e.files)?e.files&&(e.files=e.files.filter(l=>!(!l||typeof l!="string"))):delete e.files};o.fixFiles=g;const c=e=>{typeof e.keywords=="string"&&(e.keywords=e.keywords.split(/,\s+/)),e.keywords&&!Array.isArray(e.keywords)?delete e.keywords:e.keywords&&(e.keywords=e.keywords.filter(l=>!(typeof l!="string"||!l)))};o.fixKeywords=c;const _=e=>{typeof e.tags=="string"&&(e.tags=e.tags.split(/,\s+/)),e.tags&&!Array.isArray(e.tags)?delete e.tags:e.tags&&(e.tags=e.tags.filter(l=>!(typeof l!="string"||!l)))};o.fixTags=_;const S=(e,l)=>(e.author&&(e.author=l(e.author)),["maintainers","contributors"].forEach(f=>{Array.isArray(e[f])&&(e[f]=e[f].map(l))}),e),w=e=>{if(!e)return"";if(typeof e=="string")return e;const l=e.name||"",f=e.url||e.web,y=f?` (${f})`:"",b=e.email||e.mail,E=b?` <${b}>`:"";return l+E+y};o.formatPerson=w;const R=e=>{if(typeof e!="string")return e;const l=e.match(/^([^(<]+)/),f=e.match(/\(([^)]+)\)/),y=e.match(/<([^>]+)>/),b={};return l&&l[0].trim()&&(b.name=l[0].trim()),y&&([,b.email]=y),f&&([,b.url]=f),b};o.parsePerson=R;const U=e=>(S(e,w),S(e,R),e);o.fixPerson=U;const v=(e,l=!0)=>{if(Array.isArray(e.interfaces)||(e.interfaces=[]),e.interfaces.length)return e.interfaces.forEach(E=>{E.type===i.BLOCKLET_INTERFACE_TYPE_WEB&&(E.protocol="http")}),e;const y=(0,t.default)(e,"capabilities.dynamicPathPrefix",!0)?i.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",b=({type:E="web",name:A,path:B="/",protocol:H="http",port:F=i.BLOCKLET_DEFAULT_PORT_NAME})=>{e.interfaces.push({type:E,name:A,path:B,prefix:y,port:F,protocol:H})};return[i.BLOCKLET_INTERFACE_PUBLIC].forEach(E=>{e[E]&&b({name:E,path:e[E]})}),Array.isArray(e.exposeServices)&&e.exposeServices.forEach(E=>{b({type:"service",name:E.protocol,protocol:E.protocol,port:{internal:`BLOCKLET_${E.protocol}_PORT`.toUpperCase(),external:E.port}})}),l&&(delete e.publicUrl,delete e.adminUrl,delete e.configUrl,delete e.docUrl,delete e.exposeServices,e.capabilities&&delete e.capabilities.dynamicPathPrefix),e};o.fixInterfaces=v;const s=e=>{const{did:l}=e;try{(0,a.validateNewDid)(l),e.name=l}catch{}return e};o.fixName=s,o.default={fixRequired:x,fixRepository:C,fixFiles:g,fixKeywords:c,fixPerson:U,fixTags:_,fixName:s,formatPerson:w,parsePerson:R,fixInterfaces:v,fixService:n.fixAndValidateService}})(T)),T}var Se=je();function xt({owner:o,locale:p}){return j.jsxs(dt,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.fullName,o.did?j.jsx(Tt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:o.did,compact:!0,size:14,locale:p}):null]})}xt.propTypes={owner:L.object.isRequired,locale:L.string.isRequired};const _e="install-blocklet-from-URL",bt=()=>{const[o,p]=vt(_e,"[]",{raw:!0}),m=h=>{const t=h.trim(),r=JSON.parse(o),i=r.findIndex(n=>n===t);i!==0&&(i>0&&r.splice(i,1),r.length>=10&&r.splice(9),r.unshift(t),p(JSON.stringify(r)))},u=h=>{if(!h)return;const t=JSON.parse(o),r=h.trim(),i=t.findIndex(n=>n===r);i>-1&&(t.splice(i,1),p(JSON.stringify(t)))};return{urls:o?JSON.parse(o):[],addUrlRecord:m,removeUrlRecord:u}};function jt({value:o="",onValueChange:p=()=>{},children:m=null,helperText:u=""}){const{urls:h,removeUrlRecord:t}=bt(),r=(i,n)=>{i.preventDefault(),i.stopPropagation(),t(n)};return j.jsxs(dt,{children:[j.jsx(le,{freeSolo:!0,options:h,inputValue:o,onInputChange:(i,n)=>{p(n)},disableClearable:!0,popupIcon:null,renderInput:i=>Dt.cloneElement(m,{...i}),renderOption:(i,n)=>I.createElement(Nt,{...i,key:n,secondaryAction:j.jsx(qt,{edge:"end","aria-label":"delete",onClick:a=>r(a,n),children:j.jsx(ae,{})})},j.jsx(ce,{role:void 0,dense:!0,sx:{paddingLeft:0,paddingRight:30,"&:hover":{backgroundColor:"transparent"}},children:j.jsx(Mt,{primary:n,sx:{"& span":{display:"block",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})})),slotProps:{listbox:{sx:{maxHeight:300,overflow:"auto"}}}}),j.jsx(Bt,{style:{margin:0},children:u})]})}jt.propTypes={onValueChange:L.func,children:L.node,value:L.string,helperText:L.string};function Ee({defaultUrl:o="",onCancel:p,onSuccess:m,onError:u=()=>{},mode:h="install",handleText:t={}}){const{api:r}=Wt(),{api:i,session:n}=Ft(),[a,x]=I.useState(!1),[C,g]=I.useState(""),{t:c,locale:_}=Gt(),S={dist:{}},{encryptKey:w}=Ht(),[R,U]=I.useState(o),[v,s]=I.useState(o?1:0),[e,l]=I.useState(S),[f,y]=I.useState(!1),[b,E]=I.useState(""),[A]=vt("instant-blocklet-install",!1),[B,H]=I.useState({}),F=h==="component",K=F?!0:!o,{addUrlRecord:St}=bt(),W=I.useMemo(()=>(n.user?.connectedAccounts||[]).some(D=>D.provider===Kt.WALLET),[n.user]),Q=I.useMemo(()=>{let d=R.trim();return!d.startsWith("https://")&&!d.startsWith("http://")&&!d.startsWith("file://")&&(d=`file://${d}`),d},[R]),V=async()=>{l(S),g(null),x(!0);const d=Q;try{const P=decodeURIComponent(d);try{new URL(P)}catch{throw new Error("Invalid URL")}const{meta:D,inStore:It,registryUrl:Ut}=await r.getBlockletMetaFromUrl({input:{url:P}});l(D),H({inStore:It,registryUrl:Ut,inputUrl:d}),St(d)}catch(P){console.error(P);const D=`Blocklet Install failed: ${rt(P)}`;g(D),u(P)}finally{x(!1)}},_t=()=>{if(F){m({meta:e,...B}),p();return}if(A){x(!0),y(!0);return}const d=et(window?.env?.apiPrefix??"/","/launch-blocklet/install");window.location.href=re(d,{blocklet_meta_url:decodeURIComponent(Q.trim()),from:"url"})},Z=()=>{x(!1),y(!1),m({meta:e,...B}),p()},Et=()=>{x(!1),y(!1)};I.useEffect(()=>{o&&V()},[o]);const M=I.useMemo(()=>({title:e.title,wt:Vt(e),blockletMetaUrl:decodeURIComponent(R.trim())}),[e,R]),k=I.useCallback(async()=>{if(W||A){E("");return}const d=new URL(window.location.href);d.pathname=et(window?.env?.apiPrefix??"/","/api/did/launch-free-blocklet-by-session/token"),d.searchParams.set("_ek_",w),Object.keys(M).forEach(D=>{d.searchParams.set(D,M[D])});const{data:P}=await i.get(d.href);P.url?E(P.url):E("")},[W,M,i,w,A]);I.useEffect(()=>{k()},[k]);const wt=I.useMemo(()=>W&&b?{...M,nw:b,skipMigrateAccount:!0}:M,[M,b,W]),Ct=[{name:c("common.name"),value:zt.getDisplayName({meta:e},!0)},{name:c("common.version"),value:e.version},{name:c("common.did"),value:e.did?j.jsx(Jt,{did:e.did}):null},{name:c("common.author"),value:e.owner?j.jsx(xt,{owner:e.owner,locale:_}):Se.formatPerson(e.author)},{name:c("blocklet.dist.downloadLink"),value:e.dist.tarball}],Rt=()=>a?j.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:j.jsx(nt,{})}):e.did?j.jsx("div",{style:{paddingLeft:"10%"},children:Ct.map(d=>d.name===c("common.did")?j.jsx(st,{valueComponent:"div",nameWidth:120,name:d.name,nameFormatter:()=>c("common.did"),children:d.value},d.name):j.jsx(st,{valueComponent:"div",nameWidth:120,name:d.name,children:d.value},d.name))}):null,At=Yt(async()=>{let d=e.title;n.user&&(d=`${n.user.fullName}'s ${e.title}`);try{Z(),await r.launchBlockletWithoutWallet({input:{title:d,blockletMetaUrl:decodeURIComponent(R.trim()),type:"store",storeUrl:B.registryUrl,onlyRequired:!0}})}catch(P){console.error("launchBlockletWithoutWallet error:",P),$t.error(rt(P),{autoHideDuration:3e3})}}),tt=[{label:c("blocklet.fromUrl.step0"),body:j.jsx(Xt,{component:"div",children:j.jsx(jt,{style:{marginBottom:32},value:R,helperText:c("blocklet.fromUrl.description"),onValueChange:d=>{g(null),U(d)},children:j.jsx(Qt,{label:c("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,margin:"dense",value:R,onChange:d=>{g(null),U(d.target.value)},disabled:a,onKeyPress:d=>{d.key==="Enter"&&(d.preventDefault(),V(),s(1))}})})}),cancel:c("common.cancel"),confirm:c("common.next"),onCancel:p,onConfirm:()=>{V(),s(1)}},{label:c("blocklet.fromUrl.step1"),body:Rt(),cancel:c(K?"common.pre":"common.cancel"),confirm:t?.confirm||c("blocklet.fromUrl.confirm"),onCancel:()=>{K?s(d=>d-1):p()},onConfirm:()=>{_t()}}],q=tt[v];return j.jsxs(j.Fragment,{children:[j.jsxs(Zt,{title:t?.title||c("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>q.onCancel(),showCloseButton:v===0,disableEscapeKeyDown:!0,open:!0,actions:j.jsxs(j.Fragment,{children:[q.cancel&&j.jsx(it,{onClick:d=>{d.stopPropagation(),g(null),q.onCancel()},color:"inherit",children:q.cancel||c("common.cancel")}),j.jsxs(it,{onClick:d=>{d.stopPropagation(),q.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:a||!R||C,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[a&&v===0&&j.jsx(nt,{size:16}),q.confirm]})]}),children:[K&&j.jsx(ue,{alternativeLabel:!0,activeStep:v,children:tt.map(({label:d})=>j.jsx(he,{children:j.jsx(fe,{children:d})},d))}),j.jsx(kt,{component:"div",style:{marginTop:24},children:q.body}),!!C&&j.jsx(te,{severity:"error",style:{width:"100%",marginTop:8},children:C})]}),e&&f&&j.jsx(ee,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:!W&&!A?"bind-wallet":"launch-free-blocklet-by-session",checkFn:i.get,checkTimeout:300*1e3,onSuccess:Z,extraParams:wt,messages:{title:c("setup.keyPair.title"),scan:c("setup.keyPair.scan"),confirm:c("setup.keyPair.confirm"),success:c("setup.keyPair.success")},onClose:Et,customItems:A?[]:[j.jsx(se,{onClick:At})]})]})}Ee.propTypes={defaultUrl:L.string,onCancel:L.func.isRequired,onSuccess:L.func.isRequired,onError:L.func,mode:L.oneOf(["install","component"]),handleText:L.object};export{pe as B,Ee as I,xt as a,Se as f};
1
+ import{j,o as L,ff as Pt,eF as Ot,fg as Lt,B as dt,fh as Tt,r as I,U as Dt,cZ as Nt,av as qt,aA as Mt,aG as Bt,aS as Wt,d as Ft,V as Gt,z as Ht,d8 as Kt,bA as Vt,x as et,aU as zt,c8 as Jt,k as Yt,H as $t,bB as rt,J as Xt,au as Qt,cu as Zt,cv as kt,at as te,bz as it,C as nt,A as ee,ao as re}from"./index-CP8e2zcP.js";import{W as ie}from"./status-CFw68CfZ.js";import{r as gt,a as ne,W as se}from"./without-wallet-lUjEmpWw.js";import{r as oe}from"./cloneDeep-BEJXcFgb.js";import{u as vt}from"./useLocalStorage-CBx2eW_l.js";import{v as st}from"./index-8K8V7S7h.js";import{D as ae}from"./Delete-CCasVLgy.js";import{A as le}from"./Autocomplete-BHqH72uG.js";import{L as ce}from"./ListItemButton-BIo7wBNv.js";import{S as ue,a as he,b as fe}from"./Stepper-CnqNXODv.js";function pe({mode:o,...p}){return o==="development"?j.jsx(ie,{type:"primary",...p,children:"DEV"}):null}pe.propTypes={mode:L.string.isRequired};var T={},G={exports:{}},z={exports:{}},ot;function yt(){if(ot)return z.exports;ot=1;var o=z.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(u){return"file-"+m(u)}}},p={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:m};Object.keys(o).forEach(function(u){Object.keys(p).forEach(function(h){o[u][h]||(o[u][h]=p[h])}),o[u].protocols_re=RegExp("^("+o[u].protocols.map(function(h){return h.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function m(u){return u.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}return z.exports}var J,at;function me(){if(at)return J;at=1;var o=yt(),p=Object.assign||function(h,t){if(t===null||typeof t!="object")return h;const r=Object.keys(t);let i=r.length;for(;i--;)h[r[i]]=t[r[i]];return h};J=m;function m(u,h,t,r,i,n,a){var x=this;x.type=u,Object.keys(o[u]).forEach(function(C){x[C]=o[u][C]}),x.user=h,x.auth=t,x.project=r,x.committish=i,x.default=n,x.opts=a||{}}return m.prototype.hash=function(){return this.committish?"#"+this.committish:""},m.prototype._fill=function(u,h){if(u){var t=p({},h);t.path=t.path?t.path.replace(/^[/]+/g,""):"",h=p(p({},this.opts),h);var r=this;Object.keys(this).forEach(function(c){r[c]!=null&&t[c]==null&&(t[c]=r[c])});var i=t.auth,n=t.committish,a=t.fragment,x=t.path,C=t.project;Object.keys(t).forEach(function(c){var _=t[c];(c==="path"||c==="project")&&typeof _=="string"?t[c]=_.split("/").map(function(S){return encodeURIComponent(S)}).join("/"):c!=="domain"&&(t[c]=encodeURIComponent(_))}),t["auth@"]=i?i+"@":"",t["#fragment"]=a?"#"+this.hashformat(a):"",t.fragment=t.fragment?t.fragment:"",t["#path"]=x?"#"+this.hashformat(x):"",t["/path"]=t.path?"/"+t.path:"",t.projectPath=C.split("/").map(encodeURIComponent).join("/"),h.noCommittish?(t["#committish"]="",t["/tree/committish"]="",t["/committish"]="",t.committish=""):(t["#committish"]=n?"#"+n:"",t["/tree/committish"]=t.committish?"/"+t.treepath+"/"+t.committish:"",t["/committish"]=t.committish?"/"+t.committish:"",t.committish=t.committish||"master");var g=u;return Object.keys(t).forEach(function(c){g=g.replace(new RegExp("[{]"+c+"[}]","g"),t[c])}),h.noGitPlus?g.replace(/^git[+]/,""):g}},m.prototype.ssh=function(u){return this._fill(this.sshtemplate,u)},m.prototype.sshurl=function(u){return this._fill(this.sshurltemplate,u)},m.prototype.browse=function(u,h,t){return typeof u=="string"?(typeof h!="string"&&(t=h,h=null),this._fill(this.browsefiletemplate,p({fragment:h,path:u},t))):this._fill(this.browsetemplate,u)},m.prototype.docs=function(u){return this._fill(this.docstemplate,u)},m.prototype.bugs=function(u){return this._fill(this.bugstemplate,u)},m.prototype.https=function(u){return this._fill(this.httpstemplate,u)},m.prototype.git=function(u){return this._fill(this.gittemplate,u)},m.prototype.shortcut=function(u){return this._fill(this.shortcuttemplate,u)},m.prototype.path=function(u){return this._fill(this.pathtemplate,u)},m.prototype.tarball=function(u){var h=p({},u,{noCommittish:!1});return this._fill(this.tarballtemplate,h)},m.prototype.file=function(u,h){return this._fill(this.filetemplate,p({path:u},h))},m.prototype.getDefaultRepresentation=function(){return this.default},m.prototype.toString=function(u){return this.default&&typeof this[this.default]=="function"?this[this.default](u):this.sshurl(u)},J}var Y,lt;function de(){return lt||(lt=1,Y=function(o){o.prototype[Symbol.iterator]=function*(){for(let p=this.head;p;p=p.next)yield p.value}}),Y}var $,ct;function ge(){if(ct)return $;ct=1,$=o,o.Node=h,o.create=o;function o(t){var r=this;if(r instanceof o||(r=new o),r.tail=null,r.head=null,r.length=0,t&&typeof t.forEach=="function")t.forEach(function(a){r.push(a)});else if(arguments.length>0)for(var i=0,n=arguments.length;i<n;i++)r.push(arguments[i]);return r}o.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var r=t.next,i=t.prev;return r&&(r.prev=i),i&&(i.next=r),t===this.head&&(this.head=r),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,r},o.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var r=this.head;t.list=this,t.next=r,r&&(r.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},o.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var r=this.tail;t.list=this,t.prev=r,r&&(r.next=t),this.tail=t,this.head||(this.head=t),this.length++}},o.prototype.push=function(){for(var t=0,r=arguments.length;t<r;t++)m(this,arguments[t]);return this.length},o.prototype.unshift=function(){for(var t=0,r=arguments.length;t<r;t++)u(this,arguments[t]);return this.length},o.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},o.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},o.prototype.forEach=function(t,r){r=r||this;for(var i=this.head,n=0;i!==null;n++)t.call(r,i.value,n,this),i=i.next},o.prototype.forEachReverse=function(t,r){r=r||this;for(var i=this.tail,n=this.length-1;i!==null;n--)t.call(r,i.value,n,this),i=i.prev},o.prototype.get=function(t){for(var r=0,i=this.head;i!==null&&r<t;r++)i=i.next;if(r===t&&i!==null)return i.value},o.prototype.getReverse=function(t){for(var r=0,i=this.tail;i!==null&&r<t;r++)i=i.prev;if(r===t&&i!==null)return i.value},o.prototype.map=function(t,r){r=r||this;for(var i=new o,n=this.head;n!==null;)i.push(t.call(r,n.value,this)),n=n.next;return i},o.prototype.mapReverse=function(t,r){r=r||this;for(var i=new o,n=this.tail;n!==null;)i.push(t.call(r,n.value,this)),n=n.prev;return i},o.prototype.reduce=function(t,r){var i,n=this.head;if(arguments.length>1)i=r;else if(this.head)n=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=0;n!==null;a++)i=t(i,n.value,a),n=n.next;return i},o.prototype.reduceReverse=function(t,r){var i,n=this.tail;if(arguments.length>1)i=r;else if(this.tail)n=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=this.length-1;n!==null;a--)i=t(i,n.value,a),n=n.prev;return i},o.prototype.toArray=function(){for(var t=new Array(this.length),r=0,i=this.head;i!==null;r++)t[r]=i.value,i=i.next;return t},o.prototype.toArrayReverse=function(){for(var t=new Array(this.length),r=0,i=this.tail;i!==null;r++)t[r]=i.value,i=i.prev;return t},o.prototype.slice=function(t,r){r=r||this.length,r<0&&(r+=this.length),t=t||0,t<0&&(t+=this.length);var i=new o;if(r<t||r<0)return i;t<0&&(t=0),r>this.length&&(r=this.length);for(var n=0,a=this.head;a!==null&&n<t;n++)a=a.next;for(;a!==null&&n<r;n++,a=a.next)i.push(a.value);return i},o.prototype.sliceReverse=function(t,r){r=r||this.length,r<0&&(r+=this.length),t=t||0,t<0&&(t+=this.length);var i=new o;if(r<t||r<0)return i;t<0&&(t=0),r>this.length&&(r=this.length);for(var n=this.length,a=this.tail;a!==null&&n>r;n--)a=a.prev;for(;a!==null&&n>t;n--,a=a.prev)i.push(a.value);return i},o.prototype.splice=function(t,r,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,a=this.head;a!==null&&n<t;n++)a=a.next;for(var x=[],n=0;a&&n<r;n++)x.push(a.value),a=this.removeNode(a);a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(var n=0;n<i.length;n++)a=p(this,a,i[n]);return x},o.prototype.reverse=function(){for(var t=this.head,r=this.tail,i=t;i!==null;i=i.prev){var n=i.prev;i.prev=i.next,i.next=n}return this.head=r,this.tail=t,this};function p(t,r,i){var n=r===t.head?new h(i,null,r,t):new h(i,r,r.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function m(t,r){t.tail=new h(r,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function u(t,r){t.head=new h(r,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function h(t,r,i,n){if(!(this instanceof h))return new h(t,r,i,n);this.list=n,this.value=t,r?(r.next=this,this.prev=r):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}try{de()(o)}catch{}return $}var X,ut;function ve(){if(ut)return X;ut=1;const o=ge(),p=Symbol("max"),m=Symbol("length"),u=Symbol("lengthCalculator"),h=Symbol("allowStale"),t=Symbol("maxAge"),r=Symbol("dispose"),i=Symbol("noDisposeOnSet"),n=Symbol("lruList"),a=Symbol("cache"),x=Symbol("updateAgeOnGet"),C=()=>1;class g{constructor(s){if(typeof s=="number"&&(s={max:s}),s||(s={}),s.max&&(typeof s.max!="number"||s.max<0))throw new TypeError("max must be a non-negative number");this[p]=s.max||1/0;const e=s.length||C;if(this[u]=typeof e!="function"?C:e,this[h]=s.stale||!1,s.maxAge&&typeof s.maxAge!="number")throw new TypeError("maxAge must be a number");this[t]=s.maxAge||0,this[r]=s.dispose,this[i]=s.noDisposeOnSet||!1,this[x]=s.updateAgeOnGet||!1,this.reset()}set max(s){if(typeof s!="number"||s<0)throw new TypeError("max must be a non-negative number");this[p]=s||1/0,S(this)}get max(){return this[p]}set allowStale(s){this[h]=!!s}get allowStale(){return this[h]}set maxAge(s){if(typeof s!="number")throw new TypeError("maxAge must be a non-negative number");this[t]=s,S(this)}get maxAge(){return this[t]}set lengthCalculator(s){typeof s!="function"&&(s=C),s!==this[u]&&(this[u]=s,this[m]=0,this[n].forEach(e=>{e.length=this[u](e.value,e.key),this[m]+=e.length})),S(this)}get lengthCalculator(){return this[u]}get length(){return this[m]}get itemCount(){return this[n].length}rforEach(s,e){e=e||this;for(let l=this[n].tail;l!==null;){const f=l.prev;U(this,s,l,e),l=f}}forEach(s,e){e=e||this;for(let l=this[n].head;l!==null;){const f=l.next;U(this,s,l,e),l=f}}keys(){return this[n].toArray().map(s=>s.key)}values(){return this[n].toArray().map(s=>s.value)}reset(){this[r]&&this[n]&&this[n].length&&this[n].forEach(s=>this[r](s.key,s.value)),this[a]=new Map,this[n]=new o,this[m]=0}dump(){return this[n].map(s=>_(this,s)?!1:{k:s.key,v:s.value,e:s.now+(s.maxAge||0)}).toArray().filter(s=>s)}dumpLru(){return this[n]}set(s,e,l){if(l=l||this[t],l&&typeof l!="number")throw new TypeError("maxAge must be a number");const f=l?Date.now():0,y=this[u](e,s);if(this[a].has(s)){if(y>this[p])return w(this,this[a].get(s)),!1;const A=this[a].get(s).value;return this[r]&&(this[i]||this[r](s,A.value)),A.now=f,A.maxAge=l,A.value=e,this[m]+=y-A.length,A.length=y,this.get(s),S(this),!0}const b=new R(s,e,y,f,l);return b.length>this[p]?(this[r]&&this[r](s,e),!1):(this[m]+=b.length,this[n].unshift(b),this[a].set(s,this[n].head),S(this),!0)}has(s){if(!this[a].has(s))return!1;const e=this[a].get(s).value;return!_(this,e)}get(s){return c(this,s,!0)}peek(s){return c(this,s,!1)}pop(){const s=this[n].tail;return s?(w(this,s),s.value):null}del(s){w(this,this[a].get(s))}load(s){this.reset();const e=Date.now();for(let l=s.length-1;l>=0;l--){const f=s[l],y=f.e||0;if(y===0)this.set(f.k,f.v);else{const b=y-e;b>0&&this.set(f.k,f.v,b)}}}prune(){this[a].forEach((s,e)=>c(this,e,!1))}}const c=(v,s,e)=>{const l=v[a].get(s);if(l){const f=l.value;if(_(v,f)){if(w(v,l),!v[h])return}else e&&(v[x]&&(l.value.now=Date.now()),v[n].unshiftNode(l));return f.value}},_=(v,s)=>{if(!s||!s.maxAge&&!v[t])return!1;const e=Date.now()-s.now;return s.maxAge?e>s.maxAge:v[t]&&e>v[t]},S=v=>{if(v[m]>v[p])for(let s=v[n].tail;v[m]>v[p]&&s!==null;){const e=s.prev;w(v,s),s=e}},w=(v,s)=>{if(s){const e=s.value;v[r]&&v[r](e.key,e.value),v[m]-=e.length,v[a].delete(e.key),v[n].removeNode(s)}};class R{constructor(s,e,l,f,y){this.key=s,this.value=e,this.length=l,this.now=f,this.maxAge=y||0}}const U=(v,s,e,l)=>{let f=e.value;_(v,f)&&(w(v,e),v[h]||(f=void 0)),f&&s.call(l,f.value,f.key,v)};return X=g,X}var ht;function ye(){if(ht)return G.exports;ht=1;var o=Pt,p=yt(),m=G.exports=me(),u=ve(),h=new u({max:1e3}),t={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function r(g){return t[g]||g.slice(0,-1)}var i={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};G.exports.fromUrl=function(g,c){if(typeof g=="string"){var _=g+JSON.stringify(c||{});return h.has(_)||h.set(_,n(g,c)),h.get(_)}};function n(g,c){if(!(g==null||g==="")){var _=x(a(g)?"github:"+g:g),S=C(_),w=_.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),R=Object.keys(p).map(function(U){try{var v=p[U],s=null;S.auth&&i[S.protocol]&&(s=S.auth);var e=S.hash?decodeURIComponent(S.hash.substr(1)):null,l=null,f=null,y=null;if(w&&w[1]===U)l=w[2]&&decodeURIComponent(w[2]),f=decodeURIComponent(w[3].replace(/\.git$/,"")),y="shortcut";else{if(S.host&&S.host!==v.domain&&S.host.replace(/^www[.]/,"")!==v.domain||!v.protocols_re.test(S.protocol)||!S.path)return;var b=v.pathmatch,E=S.path.match(b);if(!E)return;E[1]!==null&&E[1]!==void 0&&(l=decodeURIComponent(E[1].replace(/^:/,""))),f=decodeURIComponent(E[2]),y=r(S.protocol)}return new m(U,l,s,f,e,y,c)}catch(A){if(!(A instanceof URIError))throw A}}).filter(function(U){return U});if(R.length===1)return R[0]}}function a(g){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(g)}function x(g){var c=o.parse(g);return c.protocol==="gist:"&&c.host&&!c.path?c.protocol+"/"+c.host:g}function C(g){var c=g.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!c){var _=o.parse(g);if(_.auth){const w=g.match(/[^@]+@[^:/]+/);if(w){var S=new o.URL(w[0]);_.auth=S.username||"",S.password&&(_.auth+=":"+S.password)}}return _}return{protocol:"git+ssh:",slashes:!0,auth:c[1],host:c[2],port:null,hostname:c[2],hash:c[4],search:null,query:null,pathname:"/"+c[3],path:"/"+c[3],href:"git+ssh://"+c[1]+"@"+c[2]+"/"+c[3]+(c[4]||"")}}return G.exports}var N={},O={},ft;function xe(){if(ft)return O;ft=1;var o=O&&O.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(O,"__esModule",{value:!0}),O.setService=O.findService=O.getDefaultServiceConfig=O.getServiceConfig=void 0;const p=o(oe),m=gt(),u={},h=a=>{u[a.name]={validate:a.schema.validate.bind(a.schema),defaultConfig:a.default}};O.setService=h,h({name:"auth",schema:m.authConfigSchema,default:{}});const t=a=>{if(!a)throw new Error("service name should not be empty");const x=u[a];if(!x)throw new Error(`service ${a} does not exist`);return x},r=(a,x,{validate:C}={})=>{const g=t(a),c=(0,p.default)(x||{}),{value:_,error:S}=g.validate(c);if(C&&S)throw new Error(`Invalid blocklet service config: ${S.details.map(w=>w.message).join(", ")}`);return _};O.getServiceConfig=r;const i=a=>{const{defaultConfig:x}=t(a);return x};O.getDefaultServiceConfig=i;const n=(a,x)=>{const C=[x];return(a||[]).find(g=>C.includes(g.name))};return O.findService=n,O.default={getServiceConfig:r,getDefaultServiceConfig:i,findService:n,setService:h},O}var pt;function be(){if(pt)return N;pt=1,Object.defineProperty(N,"__esModule",{value:!0}),N.fixAndValidateService=N.validateMeta=void 0;const o=gt(),p=xe(),m=h=>(!h.interfaces||!h.interfaces.length||h.interfaces.forEach(t=>{t.services&&t.services.length&&t.services.forEach(r=>{r.config=(0,p.getServiceConfig)(r.name,r.config,{validate:!0})})}),h);N.fixAndValidateService=m;const u=(h,{ensureFiles:t=!1,ensureDist:r=!1,ensureComponentStore:i=!0,ensureName:n=!1,skipValidateDidName:a=!1,schemaOptions:x={}}={})=>{const C=(0,o.createBlockletSchema)(null,{ensureFiles:t,ensureDist:r,ensureComponentStore:i,ensureName:n,skipValidateDidName:a,...x}),{value:g,error:c}=C.validate(h);if(c)throw new Error(`Invalid blocklet meta: ${c.details.map(_=>_.message).join(", ")}`);return g};return N.validateMeta=u,N.default=u,N}var mt;function je(){return mt||(mt=1,(function(o){var p=T&&T.__createBinding||(Object.create?(function(e,l,f,y){y===void 0&&(y=f);var b=Object.getOwnPropertyDescriptor(l,f);(!b||("get"in b?!l.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return l[f]}}),Object.defineProperty(e,y,b)}):(function(e,l,f,y){y===void 0&&(y=f),e[y]=l[f]})),m=T&&T.__setModuleDefault||(Object.create?(function(e,l){Object.defineProperty(e,"default",{enumerable:!0,value:l})}):function(e,l){e.default=l}),u=T&&T.__importStar||(function(){var e=function(l){return e=Object.getOwnPropertyNames||function(f){var y=[];for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&(y[y.length]=b);return y},e(l)};return function(l){if(l&&l.__esModule)return l;var f={};if(l!=null)for(var y=e(l),b=0;b<y.length;b++)y[b]!=="default"&&p(f,l,y[b]);return m(f,l),f}})(),h=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.fixService=o.fixInterfaces=o.parsePerson=o.formatPerson=o.fixName=o.fixTags=o.fixPerson=o.fixKeywords=o.fixFiles=o.fixRepository=o.fixRequired=void 0;const t=h(Ot),r=u(ye()),i=Lt(),n=be();Object.defineProperty(o,"fixService",{enumerable:!0,get:function(){return n.fixAndValidateService}});const a=ne(),x=(e,l)=>{e.description||(e.description=`Blocklet from ${l}`),e.version||(e.version=i.BLOCKLET_DEFAULT_VERSION)};o.fixRequired=x;const C=e=>{if(e.repository&&(typeof e.repository=="string"&&(e.repository={type:"git",url:e.repository}),e.repository.url)){const l=r.fromUrl(e.repository.url);l&&(e.repository.url=l.getDefaultRepresentation()==="shortcut"?l.https():l.toString())}};o.fixRepository=C;const g=e=>{Array.isArray(e.files)?e.files&&(e.files=e.files.filter(l=>!(!l||typeof l!="string"))):delete e.files};o.fixFiles=g;const c=e=>{typeof e.keywords=="string"&&(e.keywords=e.keywords.split(/,\s+/)),e.keywords&&!Array.isArray(e.keywords)?delete e.keywords:e.keywords&&(e.keywords=e.keywords.filter(l=>!(typeof l!="string"||!l)))};o.fixKeywords=c;const _=e=>{typeof e.tags=="string"&&(e.tags=e.tags.split(/,\s+/)),e.tags&&!Array.isArray(e.tags)?delete e.tags:e.tags&&(e.tags=e.tags.filter(l=>!(typeof l!="string"||!l)))};o.fixTags=_;const S=(e,l)=>(e.author&&(e.author=l(e.author)),["maintainers","contributors"].forEach(f=>{Array.isArray(e[f])&&(e[f]=e[f].map(l))}),e),w=e=>{if(!e)return"";if(typeof e=="string")return e;const l=e.name||"",f=e.url||e.web,y=f?` (${f})`:"",b=e.email||e.mail,E=b?` <${b}>`:"";return l+E+y};o.formatPerson=w;const R=e=>{if(typeof e!="string")return e;const l=e.match(/^([^(<]+)/),f=e.match(/\(([^)]+)\)/),y=e.match(/<([^>]+)>/),b={};return l&&l[0].trim()&&(b.name=l[0].trim()),y&&([,b.email]=y),f&&([,b.url]=f),b};o.parsePerson=R;const U=e=>(S(e,w),S(e,R),e);o.fixPerson=U;const v=(e,l=!0)=>{if(Array.isArray(e.interfaces)||(e.interfaces=[]),e.interfaces.length)return e.interfaces.forEach(E=>{E.type===i.BLOCKLET_INTERFACE_TYPE_WEB&&(E.protocol="http")}),e;const y=(0,t.default)(e,"capabilities.dynamicPathPrefix",!0)?i.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",b=({type:E="web",name:A,path:B="/",protocol:H="http",port:F=i.BLOCKLET_DEFAULT_PORT_NAME})=>{e.interfaces.push({type:E,name:A,path:B,prefix:y,port:F,protocol:H})};return[i.BLOCKLET_INTERFACE_PUBLIC].forEach(E=>{e[E]&&b({name:E,path:e[E]})}),Array.isArray(e.exposeServices)&&e.exposeServices.forEach(E=>{b({type:"service",name:E.protocol,protocol:E.protocol,port:{internal:`BLOCKLET_${E.protocol}_PORT`.toUpperCase(),external:E.port}})}),l&&(delete e.publicUrl,delete e.adminUrl,delete e.configUrl,delete e.docUrl,delete e.exposeServices,e.capabilities&&delete e.capabilities.dynamicPathPrefix),e};o.fixInterfaces=v;const s=e=>{const{did:l}=e;try{(0,a.validateNewDid)(l),e.name=l}catch{}return e};o.fixName=s,o.default={fixRequired:x,fixRepository:C,fixFiles:g,fixKeywords:c,fixPerson:U,fixTags:_,fixName:s,formatPerson:w,parsePerson:R,fixInterfaces:v,fixService:n.fixAndValidateService}})(T)),T}var Se=je();function xt({owner:o,locale:p}){return j.jsxs(dt,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.fullName,o.did?j.jsx(Tt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:o.did,compact:!0,size:14,locale:p}):null]})}xt.propTypes={owner:L.object.isRequired,locale:L.string.isRequired};const _e="install-blocklet-from-URL",bt=()=>{const[o,p]=vt(_e,"[]",{raw:!0}),m=h=>{const t=h.trim(),r=JSON.parse(o),i=r.findIndex(n=>n===t);i!==0&&(i>0&&r.splice(i,1),r.length>=10&&r.splice(9),r.unshift(t),p(JSON.stringify(r)))},u=h=>{if(!h)return;const t=JSON.parse(o),r=h.trim(),i=t.findIndex(n=>n===r);i>-1&&(t.splice(i,1),p(JSON.stringify(t)))};return{urls:o?JSON.parse(o):[],addUrlRecord:m,removeUrlRecord:u}};function jt({value:o="",onValueChange:p=()=>{},children:m=null,helperText:u=""}){const{urls:h,removeUrlRecord:t}=bt(),r=(i,n)=>{i.preventDefault(),i.stopPropagation(),t(n)};return j.jsxs(dt,{children:[j.jsx(le,{freeSolo:!0,options:h,inputValue:o,onInputChange:(i,n)=>{p(n)},disableClearable:!0,popupIcon:null,renderInput:i=>Dt.cloneElement(m,{...i}),renderOption:(i,n)=>I.createElement(Nt,{...i,key:n,secondaryAction:j.jsx(qt,{edge:"end","aria-label":"delete",onClick:a=>r(a,n),children:j.jsx(ae,{})})},j.jsx(ce,{role:void 0,dense:!0,sx:{paddingLeft:0,paddingRight:30,"&:hover":{backgroundColor:"transparent"}},children:j.jsx(Mt,{primary:n,sx:{"& span":{display:"block",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})})),slotProps:{listbox:{sx:{maxHeight:300,overflow:"auto"}}}}),j.jsx(Bt,{style:{margin:0},children:u})]})}jt.propTypes={onValueChange:L.func,children:L.node,value:L.string,helperText:L.string};function Ee({defaultUrl:o="",onCancel:p,onSuccess:m,onError:u=()=>{},mode:h="install",handleText:t={}}){const{api:r}=Wt(),{api:i,session:n}=Ft(),[a,x]=I.useState(!1),[C,g]=I.useState(""),{t:c,locale:_}=Gt(),S={dist:{}},{encryptKey:w}=Ht(),[R,U]=I.useState(o),[v,s]=I.useState(o?1:0),[e,l]=I.useState(S),[f,y]=I.useState(!1),[b,E]=I.useState(""),[A]=vt("instant-blocklet-install",!1),[B,H]=I.useState({}),F=h==="component",K=F?!0:!o,{addUrlRecord:St}=bt(),W=I.useMemo(()=>(n.user?.connectedAccounts||[]).some(D=>D.provider===Kt.WALLET),[n.user]),Q=I.useMemo(()=>{let d=R.trim();return!d.startsWith("https://")&&!d.startsWith("http://")&&!d.startsWith("file://")&&(d=`file://${d}`),d},[R]),V=async()=>{l(S),g(null),x(!0);const d=Q;try{const P=decodeURIComponent(d);try{new URL(P)}catch{throw new Error("Invalid URL")}const{meta:D,inStore:It,registryUrl:Ut}=await r.getBlockletMetaFromUrl({input:{url:P}});l(D),H({inStore:It,registryUrl:Ut,inputUrl:d}),St(d)}catch(P){console.error(P);const D=`Blocklet Install failed: ${rt(P)}`;g(D),u(P)}finally{x(!1)}},_t=()=>{if(F){m({meta:e,...B}),p();return}if(A){x(!0),y(!0);return}const d=et(window?.env?.apiPrefix??"/","/launch-blocklet/install");window.location.href=re(d,{blocklet_meta_url:decodeURIComponent(Q.trim()),from:"url"})},Z=()=>{x(!1),y(!1),m({meta:e,...B}),p()},Et=()=>{x(!1),y(!1)};I.useEffect(()=>{o&&V()},[o]);const M=I.useMemo(()=>({title:e.title,wt:Vt(e),blockletMetaUrl:decodeURIComponent(R.trim())}),[e,R]),k=I.useCallback(async()=>{if(W||A){E("");return}const d=new URL(window.location.href);d.pathname=et(window?.env?.apiPrefix??"/","/api/did/launch-free-blocklet-by-session/token"),d.searchParams.set("_ek_",w),Object.keys(M).forEach(D=>{d.searchParams.set(D,M[D])});const{data:P}=await i.get(d.href);P.url?E(P.url):E("")},[W,M,i,w,A]);I.useEffect(()=>{k()},[k]);const wt=I.useMemo(()=>W&&b?{...M,nw:b,skipMigrateAccount:!0}:M,[M,b,W]),Ct=[{name:c("common.name"),value:zt.getDisplayName({meta:e},!0)},{name:c("common.version"),value:e.version},{name:c("common.did"),value:e.did?j.jsx(Jt,{did:e.did}):null},{name:c("common.author"),value:e.owner?j.jsx(xt,{owner:e.owner,locale:_}):Se.formatPerson(e.author)},{name:c("blocklet.dist.downloadLink"),value:e.dist.tarball}],Rt=()=>a?j.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:j.jsx(nt,{})}):e.did?j.jsx("div",{style:{paddingLeft:"10%"},children:Ct.map(d=>d.name===c("common.did")?j.jsx(st,{valueComponent:"div",nameWidth:120,name:d.name,nameFormatter:()=>c("common.did"),children:d.value},d.name):j.jsx(st,{valueComponent:"div",nameWidth:120,name:d.name,children:d.value},d.name))}):null,At=Yt(async()=>{let d=e.title;n.user&&(d=`${n.user.fullName}'s ${e.title}`);try{Z(),await r.launchBlockletWithoutWallet({input:{title:d,blockletMetaUrl:decodeURIComponent(R.trim()),type:"store",storeUrl:B.registryUrl,onlyRequired:!0}})}catch(P){console.error("launchBlockletWithoutWallet error:",P),$t.error(rt(P),{autoHideDuration:3e3})}}),tt=[{label:c("blocklet.fromUrl.step0"),body:j.jsx(Xt,{component:"div",children:j.jsx(jt,{style:{marginBottom:32},value:R,helperText:c("blocklet.fromUrl.description"),onValueChange:d=>{g(null),U(d)},children:j.jsx(Qt,{label:c("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,margin:"dense",value:R,onChange:d=>{g(null),U(d.target.value)},disabled:a,onKeyPress:d=>{d.key==="Enter"&&(d.preventDefault(),V(),s(1))}})})}),cancel:c("common.cancel"),confirm:c("common.next"),onCancel:p,onConfirm:()=>{V(),s(1)}},{label:c("blocklet.fromUrl.step1"),body:Rt(),cancel:c(K?"common.pre":"common.cancel"),confirm:t?.confirm||c("blocklet.fromUrl.confirm"),onCancel:()=>{K?s(d=>d-1):p()},onConfirm:()=>{_t()}}],q=tt[v];return j.jsxs(j.Fragment,{children:[j.jsxs(Zt,{title:t?.title||c("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>q.onCancel(),showCloseButton:v===0,disableEscapeKeyDown:!0,open:!0,actions:j.jsxs(j.Fragment,{children:[q.cancel&&j.jsx(it,{onClick:d=>{d.stopPropagation(),g(null),q.onCancel()},color:"inherit",children:q.cancel||c("common.cancel")}),j.jsxs(it,{onClick:d=>{d.stopPropagation(),q.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:a||!R||C,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[a&&v===0&&j.jsx(nt,{size:16}),q.confirm]})]}),children:[K&&j.jsx(ue,{alternativeLabel:!0,activeStep:v,children:tt.map(({label:d})=>j.jsx(he,{children:j.jsx(fe,{children:d})},d))}),j.jsx(kt,{component:"div",style:{marginTop:24},children:q.body}),!!C&&j.jsx(te,{severity:"error",style:{width:"100%",marginTop:8},children:C})]}),e&&f&&j.jsx(ee,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:!W&&!A?"bind-wallet":"launch-free-blocklet-by-session",checkFn:i.get,checkTimeout:300*1e3,onSuccess:Z,extraParams:wt,messages:{title:c("setup.keyPair.title"),scan:c("setup.keyPair.scan"),confirm:c("setup.keyPair.confirm"),success:c("setup.keyPair.success")},onClose:Et,customItems:A?[]:[j.jsx(se,{onClick:At})]})]})}Ee.propTypes={defaultUrl:L.string,onCancel:L.func.isRequired,onSuccess:L.func.isRequired,onError:L.func,mode:L.oneOf(["install","component"]),handleText:L.object};export{pe as B,Ee as I,xt as a,Se as f};
@@ -1,4 +1,4 @@
1
- import{c as $,j as i,r as u,p as T,dg as H,cu as M,q as v,o as s,bz as E,B as y,dh as q,V as w,d as A,b6 as D,di as U,cE as F,k as j,x as O,dj as W,W as B,dk as V,dl as k,dm as I,dn as Y,b8 as J,i as K,C as X,a3 as G}from"./index-DEflHlyo.js";import{p as Q}from"./index-xie30Dh0.js";import{N as Z}from"./index-CXj3-Qmy.js";import{b as ee}from"./sdk-CChXw_FN.js";import{w as ie}from"./wrap-locale-BD1k5sx5.js";const se=$(i.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}));function P({invitation:e,createPassportSvg:n,passportColor:l="auto"}){const[p,r]=u.useState(!1),{t:c}=u.useContext(T),t=u.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),d=u.useMemo(()=>n({title:t,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||l,extra:e.passportExpireTime?{key:"Exp",value:H(e.passportExpireTime).format("YYYY-MM-DD HH:mm:ss")}:void 0}),[e,t]),m=u.useCallback(()=>{r(!0)},[]),o=u.useCallback(()=>{r(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx(te,{children:i.jsxs("div",{className:"invite-passport__card",onClick:m,children:[!!e.display&&i.jsx(Z,{data:e.display,style:{width:"100%",height:"100%"}}),!e.display&&i.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:d}})]})}),i.jsx(M,{open:p,title:c("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:o,children:e.role.permissions&&e.role.permissions.length>0?i.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(x=>i.jsx("li",{style:{listStyle:"circle"},children:x.description},x.name))}):i.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[i.jsx(se,{style:{width:"30px",height:"30px"}}),i.jsx("div",{children:c("invite.emptyPermission")})]})})]})}P.propTypes={invitation:s.object.isRequired,createPassportSvg:s.func.isRequired,passportColor:s.string};const te=v.div`
1
+ import{c as $,j as i,r as u,p as T,dg as H,cu as M,q as v,o as s,bz as E,B as y,dh as q,V as w,d as A,b6 as D,di as U,cE as F,k as j,x as O,dj as W,W as B,dk as V,dl as k,dm as I,dn as Y,b8 as J,i as K,C as X,a3 as G}from"./index-CP8e2zcP.js";import{p as Q}from"./index-2jRJYLHP.js";import{N as Z}from"./index-G4GuFOuO.js";import{b as ee}from"./sdk-CyaYnqk4.js";import{w as ie}from"./wrap-locale-CF87ubG3.js";const se=$(i.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}));function P({invitation:e,createPassportSvg:n,passportColor:l="auto"}){const[p,r]=u.useState(!1),{t:c}=u.useContext(T),t=u.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),d=u.useMemo(()=>n({title:t,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||l,extra:e.passportExpireTime?{key:"Exp",value:H(e.passportExpireTime).format("YYYY-MM-DD HH:mm:ss")}:void 0}),[e,t]),m=u.useCallback(()=>{r(!0)},[]),o=u.useCallback(()=>{r(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx(te,{children:i.jsxs("div",{className:"invite-passport__card",onClick:m,children:[!!e.display&&i.jsx(Z,{data:e.display,style:{width:"100%",height:"100%"}}),!e.display&&i.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:d}})]})}),i.jsx(M,{open:p,title:c("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:o,children:e.role.permissions&&e.role.permissions.length>0?i.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(x=>i.jsx("li",{style:{listStyle:"circle"},children:x.description},x.name))}):i.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[i.jsx(se,{style:{width:"30px",height:"30px"}}),i.jsx("div",{children:c("invite.emptyPermission")})]})})]})}P.propTypes={invitation:s.object.isRequired,createPassportSvg:s.func.isRequired,passportColor:s.string};const te=v.div`
2
2
  display: flex;
3
3
  max-width: 350px;
4
4
  margin: 30px auto;
@@ -1 +1 @@
1
- import{bi as P,bj as s}from"./index-DEflHlyo.js";var r,e;function u(){if(e)return r;e=1;const a=P();return r=(i,t)=>a(i)===a(t),r}var f=u();const x=s(f);export{x as i};
1
+ import{bi as P,bj as s}from"./index-CP8e2zcP.js";var r,e;function u(){if(e)return r;e=1;const a=P();return r=(i,t)=>a(i)===a(t),r}var f=u();const x=s(f);export{x as i};
@@ -1 +1 @@
1
- import{cJ as S,cK as $,cL as B,cM as z,cN as W,bj as H}from"./index-DEflHlyo.js";var h={exports:{}},g={exports:{}},I;function O(){return I||(I=1,(function(c,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=F;var v=o(S());function o(a){return a&&a.__esModule?a:{default:a}}function f(a){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},f(a)}function F(a,l){(0,v.default)(a);var u,_;f(l)==="object"?(u=l.min||0,_=l.max):(u=arguments[1],_=arguments[2]);var x=encodeURI(a).split(/%..|./).length-1;return x>=u&&(typeof _>"u"||x<=_)}c.exports=i.default,c.exports.default=i.default})(g,g.exports)),g.exports}var L;function Q(){return L||(L=1,(function(c,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=A;var v=u(S()),o=u(B()),f=u(O()),F=u(z()),a=u(W()),l=u($());function u(r){return r&&r.__esModule?r:{default:r}}var _={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},x=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,U=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,k=/^[a-z\d]+$/,C=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,M=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,P=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,j=254;function R(r){var e=r.replace(/^"(.+)"$/,"$1");if(!e.trim())return!1;var d=/[\.";<>]/.test(e);if(d){if(e===r)return!1;var s=e.split('"').length===e.split('\\"').length;if(!s)return!1}return!0}function A(r,e){if((0,v.default)(r),e=(0,l.default)(e,_),e.require_display_name||e.allow_display_name){var d=r.match(x);if(d){var s=d[1];if(r=r.replace(s,"").replace(/(^<|>$)/g,""),s.endsWith(" ")&&(s=s.slice(0,-1)),!R(s))return!1}else if(e.require_display_name)return!1}if(!e.ignore_max_length&&r.length>j)return!1;var y=r.split("@"),n=y.pop(),m=n.toLowerCase();if(e.host_blacklist.length>0&&(0,o.default)(m,e.host_blacklist)||e.host_whitelist.length>0&&!(0,o.default)(m,e.host_whitelist))return!1;var t=y.join("@");if(e.domain_specific_validation&&(m==="gmail.com"||m==="googlemail.com")){t=t.toLowerCase();var q=t.split("+")[0];if(!(0,f.default)(q.replace(/\./g,""),{min:6,max:30}))return!1;for(var w=q.split("."),p=0;p<w.length;p++)if(!k.test(w[p]))return!1}if(e.ignore_max_length===!1&&(!(0,f.default)(t,{max:64})||!(0,f.default)(n,{max:254})))return!1;if(!(0,F.default)(n,{require_tld:e.require_tld,ignore_max_length:e.ignore_max_length,allow_underscores:e.allow_underscores})){if(!e.allow_ip_domain)return!1;if(!(0,a.default)(n)){if(!n.startsWith("[")||!n.endsWith("]"))return!1;var D=n.slice(1,-1);if(D.length===0||!(0,a.default)(D))return!1}}if(e.blacklisted_chars&&t.search(new RegExp("[".concat(e.blacklisted_chars,"]+"),"g"))!==-1)return!1;if(t[0]==='"'&&t[t.length-1]==='"')return t=t.slice(1,t.length-1),e.allow_utf8_local_part?P.test(t):C.test(t);for(var N=e.allow_utf8_local_part?M:U,E=t.split("."),b=0;b<E.length;b++)if(!N.test(E[b]))return!1;return!0}c.exports=i.default,c.exports.default=i.default})(h,h.exports)),h.exports}var J=Q();const X=H(J);export{X as i};
1
+ import{cJ as S,cK as $,cL as B,cM as z,cN as W,bj as H}from"./index-CP8e2zcP.js";var h={exports:{}},g={exports:{}},I;function O(){return I||(I=1,(function(c,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=F;var v=o(S());function o(a){return a&&a.__esModule?a:{default:a}}function f(a){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},f(a)}function F(a,l){(0,v.default)(a);var u,_;f(l)==="object"?(u=l.min||0,_=l.max):(u=arguments[1],_=arguments[2]);var x=encodeURI(a).split(/%..|./).length-1;return x>=u&&(typeof _>"u"||x<=_)}c.exports=i.default,c.exports.default=i.default})(g,g.exports)),g.exports}var L;function Q(){return L||(L=1,(function(c,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=A;var v=u(S()),o=u(B()),f=u(O()),F=u(z()),a=u(W()),l=u($());function u(r){return r&&r.__esModule?r:{default:r}}var _={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},x=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,U=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,k=/^[a-z\d]+$/,C=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,M=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,P=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,j=254;function R(r){var e=r.replace(/^"(.+)"$/,"$1");if(!e.trim())return!1;var d=/[\.";<>]/.test(e);if(d){if(e===r)return!1;var s=e.split('"').length===e.split('\\"').length;if(!s)return!1}return!0}function A(r,e){if((0,v.default)(r),e=(0,l.default)(e,_),e.require_display_name||e.allow_display_name){var d=r.match(x);if(d){var s=d[1];if(r=r.replace(s,"").replace(/(^<|>$)/g,""),s.endsWith(" ")&&(s=s.slice(0,-1)),!R(s))return!1}else if(e.require_display_name)return!1}if(!e.ignore_max_length&&r.length>j)return!1;var y=r.split("@"),n=y.pop(),m=n.toLowerCase();if(e.host_blacklist.length>0&&(0,o.default)(m,e.host_blacklist)||e.host_whitelist.length>0&&!(0,o.default)(m,e.host_whitelist))return!1;var t=y.join("@");if(e.domain_specific_validation&&(m==="gmail.com"||m==="googlemail.com")){t=t.toLowerCase();var q=t.split("+")[0];if(!(0,f.default)(q.replace(/\./g,""),{min:6,max:30}))return!1;for(var w=q.split("."),p=0;p<w.length;p++)if(!k.test(w[p]))return!1}if(e.ignore_max_length===!1&&(!(0,f.default)(t,{max:64})||!(0,f.default)(n,{max:254})))return!1;if(!(0,F.default)(n,{require_tld:e.require_tld,ignore_max_length:e.ignore_max_length,allow_underscores:e.allow_underscores})){if(!e.allow_ip_domain)return!1;if(!(0,a.default)(n)){if(!n.startsWith("[")||!n.endsWith("]"))return!1;var D=n.slice(1,-1);if(D.length===0||!(0,a.default)(D))return!1}}if(e.blacklisted_chars&&t.search(new RegExp("[".concat(e.blacklisted_chars,"]+"),"g"))!==-1)return!1;if(t[0]==='"'&&t[t.length-1]==='"')return t=t.slice(1,t.length-1),e.allow_utf8_local_part?P.test(t):C.test(t);for(var N=e.allow_utf8_local_part?M:U,E=t.split("."),b=0;b<E.length;b++)if(!N.test(E[b]))return!1;return!0}c.exports=i.default,c.exports.default=i.default})(h,h.exports)),h.exports}var J=Q();const X=H(J);export{X as i};