@abtnode/blocklet-services 1.16.32-beta-93e1a798 → 1.16.32-beta-820e4cfa

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 (233) hide show
  1. package/api/emails/components/content.js +2 -2
  2. package/api/emails/pages/notification.js +3 -2
  3. package/api/libs/connect/session.js +5 -33
  4. package/api/libs/email.js +6 -1
  5. package/api/libs/kyc.js +76 -2
  6. package/api/routes/oauth.js +3 -3
  7. package/api/routes/openapi.js +4 -4
  8. package/api/routes/opencomponent.js +4 -6
  9. package/api/routes/openembed.js +6 -5
  10. package/api/services/auth/connect/bind-wallet.js +2 -12
  11. package/api/services/auth/connect/update-kyc.js +10 -2
  12. package/api/services/kyc/index.js +25 -5
  13. package/api/util/federated.js +35 -0
  14. package/dist/assets/{Add-D8jHDZuh.js → Add-BnNzBkSM.js} +1 -1
  15. package/dist/assets/{Alert-CRD24aa1.js → Alert-MdMGtLD7.js} +1 -1
  16. package/dist/assets/{ArrowDropDown-CFc0zow6.js → ArrowDropDown-BxN9s0B3.js} +1 -1
  17. package/dist/assets/{Avatar-BIWwirOj.js → Avatar-C8UCl2Ga.js} +1 -1
  18. package/dist/assets/{ButtonGroup-DcU8GHuP.js → ButtonGroup-CZa7-ajY.js} +1 -1
  19. package/dist/assets/{CheckCircle-BrcbSmIK.js → CheckCircle-sCoWELrn.js} +1 -1
  20. package/dist/assets/{ChevronLeft-Cyjchnxw.js → ChevronLeft-DkDFOWTc.js} +1 -1
  21. package/dist/assets/{ChevronRight-j0-gJxyM.js → ChevronRight-B4jca3VR.js} +1 -1
  22. package/dist/assets/{Close-B2vbXcur.js → Close-Dsq723dc.js} +1 -1
  23. package/dist/assets/{CloseOutlined-BWhWoWD_.js → CloseOutlined-SmGyPCCX.js} +1 -1
  24. package/dist/assets/{Delete-B2j1UcE8.js → Delete-Dq713V6u.js} +1 -1
  25. package/dist/assets/{DeleteOutline-C2h-KiXe.js → DeleteOutline-CnT4EQeF.js} +1 -1
  26. package/dist/assets/{DialogContentText-D5Xxal_F.js → DialogContentText-DacbluUW.js} +1 -1
  27. package/dist/assets/{Done-B-JT0RXC.js → Done-qR9kVgrH.js} +1 -1
  28. package/dist/assets/{Download-DP_lDlx2.js → Download-DW26ur5s.js} +1 -1
  29. package/dist/assets/{Edit-B3J8-Twv.js → Edit-Dws2_-ub.js} +1 -1
  30. package/dist/assets/{EditIcon-R508XR9R.js → EditIcon-CY6l5Il6.js} +1 -1
  31. package/dist/assets/{Error-B4vCt6tb.js → Error-C5amiEhI.js} +1 -1
  32. package/dist/assets/{ExpandMore-IE6fvawl.js → ExpandMore-d42Ky8li.js} +1 -1
  33. package/dist/assets/{FormControl-Chtq9AE7.js → FormControl-C07X4iXm.js} +1 -1
  34. package/dist/assets/{FormControlLabel-BmopTtvW.js → FormControlLabel-jY_KMRPD.js} +1 -1
  35. package/dist/assets/{FormGroup-C54kQ9N4.js → FormGroup-CErrZ95I.js} +1 -1
  36. package/dist/assets/{Google-DBXwxuV5.js → Google-CvInay_a.js} +1 -1
  37. package/dist/assets/{Hidden-DPIGUAMJ.js → Hidden-NXnAHRZU.js} +1 -1
  38. package/dist/assets/{InfoOutlined-BmUBc2r2.js → InfoOutlined-DiESNXUD.js} +1 -1
  39. package/dist/assets/{InputAdornment-DXkRELYA.js → InputAdornment-DKQXkF5o.js} +1 -1
  40. package/dist/assets/{InputLabel-DMWY4sIp.js → InputLabel-DCPOxFdI.js} +1 -1
  41. package/dist/assets/{LastPage-D0B9CdNo.js → LastPage-CupdKuWQ.js} +1 -1
  42. package/dist/assets/{Launch-DhHbLKKF.js → Launch-BvCfmwc3.js} +1 -1
  43. package/dist/assets/{LaunchOutlined-CvTIL2cU.js → LaunchOutlined-B-TcY8Ty.js} +1 -1
  44. package/dist/assets/{Link-CYqMveft.js → Link-B6WCZ3ri.js} +1 -1
  45. package/dist/assets/{ListItemText-BR6T5ZDu.js → ListItemText-CAgBao36.js} +1 -1
  46. package/dist/assets/{LoadingButton-DmCdDxLA.js → LoadingButton-BO2pLS2M.js} +1 -1
  47. package/dist/assets/{LockIcon-C1x7LbhO.js → LockIcon-C--7O0SU.js} +1 -1
  48. package/dist/assets/{Loop-BwgmQ4ke.js → Loop-BbewjFkt.js} +1 -1
  49. package/dist/assets/{MoreHoriz-NGD3jXnn.js → MoreHoriz-BnLDnV7Y.js} +1 -1
  50. package/dist/assets/{MoreVert-MUbtAQHv.js → MoreVert-C8wT9PBh.js} +1 -1
  51. package/dist/assets/{OpenInNew-CJl5exgf.js → OpenInNew-BuRkQUDs.js} +1 -1
  52. package/dist/assets/{Pagination-IHWKke1i.js → Pagination-Tk6JJJWb.js} +1 -1
  53. package/dist/assets/{PlayArrow-DzoHzRoJ.js → PlayArrow-DGa9lwdU.js} +1 -1
  54. package/dist/assets/{QuestionMarkCircle-TnBpzaSI.js → QuestionMarkCircle-BJqkf48h.js} +1 -1
  55. package/dist/assets/{RadioGroup-C6M_sifl.js → RadioGroup-Ceyc11_1.js} +1 -1
  56. package/dist/assets/{Search-wiijyIeu.js → Search-B37iNoKq.js} +1 -1
  57. package/dist/assets/{Select-CIDtym3x.js → Select-B0ouveBQ.js} +1 -1
  58. package/dist/assets/{ServerLogo-Bal3ugu3.js → ServerLogo-8TjGIlip.js} +1 -1
  59. package/dist/assets/{Skeleton-BXCyEPW7.js → Skeleton-8eEDG-Ms.js} +1 -1
  60. package/dist/assets/{Slider-Ntyz_Q-E.js → Slider-BujG4_Kd.js} +1 -1
  61. package/dist/assets/{Stack-CYabuVI4.js → Stack-C7-JMCCu.js} +1 -1
  62. package/dist/assets/{Stepper-DuAngjIl.js → Stepper-Bc34zZ-Y.js} +1 -1
  63. package/dist/assets/{TextField-x4CoNOlz.js → TextField-D1ujlYf9.js} +1 -1
  64. package/dist/assets/{Toolbar-DlYXwq_K.js → Toolbar-3DD8ghgH.js} +1 -1
  65. package/dist/assets/{ViewColumn-8HGbbav-.js → ViewColumn-Dbd2RcMW.js} +1 -1
  66. package/dist/assets/{ViewList-DjDLjZbQ.js → ViewList-B4KeBI85.js} +1 -1
  67. package/dist/assets/{access-control-BSvhOxQQ.js → access-control-g3afaGNm.js} +1 -1
  68. package/dist/assets/{actions-byFcd21l.js → actions-D1fO3id2.js} +1 -1
  69. package/dist/assets/{add-component-core-BaGwMeTq.js → add-component-core-DrCymqMX.js} +1 -1
  70. package/dist/assets/{add-resource-R3DTTpMs.js → add-resource-id1YX_Oo.js} +1 -1
  71. package/dist/assets/{addon-B9HdZ1hJ.js → addon-DwXg8kbW.js} +1 -1
  72. package/dist/assets/{analytics-Drr9ic2m.js → analytics-DCFGDrSe.js} +1 -1
  73. package/dist/assets/api-BYS9rs2B.js +1 -0
  74. package/dist/assets/ar-5o8kqNk7.js +1 -0
  75. package/dist/assets/{audit-logs-tviTMDA1.js → audit-logs-D0fFriz5.js} +1 -1
  76. package/dist/assets/{button-D68lNTBN.js → button-ClHJcnVR.js} +1 -1
  77. package/dist/assets/{click-to-copy-Cy7g0c_W.js → click-to-copy-BqLgKtqA.js} +1 -1
  78. package/dist/assets/{complete-N8h-bC0Y.js → complete-D-sLwQDJ.js} +4 -4
  79. package/dist/assets/{component-CyfiUp-R.js → component-ZjhQBkiP.js} +60 -60
  80. package/dist/assets/{config-BZSxOwu6.js → config-N0FSLwXJ.js} +1 -1
  81. package/dist/assets/{config-BEOq9uec.js → config-_xJ464M_.js} +1 -1
  82. package/dist/assets/{config-navigation-C6EN0Fwq.js → config-navigation-fVL2wq7x.js} +1 -1
  83. package/dist/assets/{confirm-Bz_GmEiI.js → confirm-WGw4zZ8r.js} +1 -1
  84. package/dist/assets/{connect-BZC3CdFF.js → connect-1sWbqUfW.js} +1 -1
  85. package/dist/assets/{connect-Cr0AxBUc.js → connect-BZGrsZSG.js} +1 -1
  86. package/dist/assets/{connect-to-BmqBRB3U.js → connect-to-BzHQacMQ.js} +1 -1
  87. package/dist/assets/{content-layout-2vv5OZW9.js → content-layout-CBN6Dvqp.js} +1 -1
  88. package/dist/assets/{dashboard-Cwcji3JN.js → dashboard-B4ze-X1x.js} +3 -3
  89. package/dist/assets/de-Lu3QkkkU.js +1 -0
  90. package/dist/assets/{did-address-BIfBoDiQ.js → did-address-BURJDyiC.js} +1 -1
  91. package/dist/assets/domain-D5gY-NEc.js +9 -0
  92. package/dist/assets/domain-list-Mq2Fan-d.js +15 -0
  93. package/dist/assets/email-B50BtSL8.js +15 -0
  94. package/dist/assets/es-CTrW8z60.js +1 -0
  95. package/dist/assets/{exchange-passport-D-WRM3Wn.js → exchange-passport-CdNpP3Y-.js} +1 -1
  96. package/dist/assets/{fallback-DTP7cYpM.js → fallback-BgjQELn7.js} +1 -1
  97. package/dist/assets/{format-error-BOzcbfGa.js → format-error-CrcMEK2V.js} +1 -1
  98. package/dist/assets/fr-DU73a_6g.js +1 -0
  99. package/dist/assets/{fuel-Bn4-TEHO.js → fuel-Ct9vWJB8.js} +1 -1
  100. package/dist/assets/{fullpage-rvVF1rz8.js → fullpage-DibIuyDh.js} +1 -1
  101. package/dist/assets/hi-KeUirlJV.js +1 -0
  102. package/dist/assets/{home-DR7GS6ca.js → home-D4Hg_oC0.js} +1 -1
  103. package/dist/assets/id-CtWLWcnp.js +1 -0
  104. package/dist/assets/{iframe-glv0Poq3.js → iframe-DjP5hzT4.js} +1 -1
  105. package/dist/assets/{index-DFZwS5zQ.js → index-2WFTBY3L.js} +1 -1
  106. package/dist/assets/{index-ChqFEpi4.js → index-5HAOVHgh.js} +1 -1
  107. package/dist/assets/{index-DZIjChbd.js → index-9sFaWssT.js} +1 -1
  108. package/dist/assets/{index-B5vlCSnw.js → index-B2uvJWil.js} +1 -1
  109. package/dist/assets/{index-BZqmUYmf.js → index-B8yobdAt.js} +1 -1
  110. package/dist/assets/{index-Bukl4DJp.js → index-BAM5GUAz.js} +1 -1
  111. package/dist/assets/{index-DgFd31_6.js → index-BCt_GquA.js} +1 -1
  112. package/dist/assets/{index-B6NXai6_.js → index-BOtnl4g3.js} +1 -1
  113. package/dist/assets/{index-CEaTcEQs.js → index-BP0e3trc.js} +6 -6
  114. package/dist/assets/{index-wMDpYZdf.js → index-BYp7PNIm.js} +1 -1
  115. package/dist/assets/{index-BcUb67P2.js → index-BxmTVomL.js} +1 -1
  116. package/dist/assets/{index-DWAL5jyd.js → index-C3La5sKU.js} +1 -1
  117. package/dist/assets/{index-C_flIkR0.js → index-CEBNAvPK.js} +1 -1
  118. package/dist/assets/{index-CJPYlJzX.js → index-CHp2FXIo.js} +1 -1
  119. package/dist/assets/{index-BbBRjIRQ.js → index-CInwQHvl.js} +1 -1
  120. package/dist/assets/{index-BreZlHA5.js → index-CLhW7LJ4.js} +1 -1
  121. package/dist/assets/{index-Bsh1JZ9i.js → index-CnjLsEef.js} +1 -1
  122. package/dist/assets/{index-CE9qCuXL.js → index-D-f5DDJ1.js} +1 -1
  123. package/dist/assets/{index-bxrR9ubG.js → index-DVc2iGFg.js} +4 -4
  124. package/dist/assets/{index-B8cOlg3J.js → index-DZi-2Gbw.js} +1 -1
  125. package/dist/assets/{index-3hwSska-.js → index-D_Vu2xLx.js} +3 -3
  126. package/dist/assets/{index-DYNsUZaH.js → index-Di3jF2ud.js} +1 -1
  127. package/dist/assets/{index-BQQSQ70k.js → index-DmXHr_Jd.js} +1 -1
  128. package/dist/assets/{index-CeEJtkL-.js → index-DnjFnDbB.js} +1 -1
  129. package/dist/assets/{index-mmP1Lkjm.js → index-DqtfVmQd.js} +1 -1
  130. package/dist/assets/{index-DsNs234N.js → index-Ee7FJItU.js} +1 -1
  131. package/dist/assets/{index-MgF3lCRP.js → index-FKe4fuVo.js} +1 -1
  132. package/dist/assets/{index-BNm1w4Av.js → index-h75gmDWw.js} +1 -1
  133. package/dist/assets/index-j2-hVzu_.js +262 -0
  134. package/dist/assets/{index-j8Uq5XuX.js → index-wwrsvgTo.js} +1 -1
  135. package/dist/assets/{index-BNFvQJs8.js → index-wxPofhyR.js} +1 -1
  136. package/dist/assets/{index.es-Dz_wpH3d.js → index.es-B4hyWcg0.js} +1 -1
  137. package/dist/assets/index.esm-Xnj83P4x.js +1 -0
  138. package/dist/assets/{invitation-Bxk7RQM2.js → invitation-B6D49MAH.js} +1 -1
  139. package/dist/assets/{invite-DxTtxFmK.js → invite-C9_gSzwl.js} +1 -1
  140. package/dist/assets/{issue-passport-SKwEWQ_s.js → issue-passport-C4GU6O8E.js} +1 -1
  141. package/dist/assets/{item-B-EBHzLe.js → item-BF5S_bSW.js} +1 -1
  142. package/dist/assets/ja-CrqtPWVX.js +1 -0
  143. package/dist/assets/{jss-plugin-props-sort.esm-Bm1tsMYs.js → jss-plugin-props-sort.esm-C037h0ZA.js} +1 -1
  144. package/dist/assets/ko-Cl75HOeP.js +1 -0
  145. package/dist/assets/{launch-result-message-CaImC-I4.js → launch-result-message-CSFk0yKu.js} +1 -1
  146. package/dist/assets/{layout-DskBhVxG.js → layout-Cgc_KlR_.js} +1 -1
  147. package/dist/assets/{list-header-CfS2OSwd.js → list-header-BJmy3Sb6.js} +1 -1
  148. package/dist/assets/localization-DxBUHiuu.js +1 -0
  149. package/dist/assets/{log-BSUm2QeV.js → log-yfx-YeX0.js} +1 -1
  150. package/dist/assets/{login-BXwy09YT.js → login-CBnpVuLH.js} +1 -1
  151. package/dist/assets/{login-oauth-callback-CrNNy4ro.js → login-oauth-callback-DhSyRbsE.js} +1 -1
  152. package/dist/assets/{logo-uploader-Blhm721C.js → logo-uploader-CbVnmlud.js} +3 -3
  153. package/dist/assets/{lost-passport-r7tegJSQ.js → lost-passport-DYISuGT6.js} +3 -3
  154. package/dist/assets/{lottie-Bw0llhbP.js → lottie-yg9CNUXF.js} +1 -1
  155. package/dist/assets/{notifications-CymYmkqD.js → notifications-sAYV5JP7.js} +1 -1
  156. package/dist/assets/{open-window-EH5UZ1B9.js → open-window-B3y-K43C.js} +1 -1
  157. package/dist/assets/overview-B2gi6-EB.js +12 -0
  158. package/dist/assets/{page-header-CGrnydWl.js → page-header-C178XWza.js} +1 -1
  159. package/dist/assets/{permission-VH_Fm7Pw.js → permission-C_C-c12n.js} +1 -1
  160. package/dist/assets/{preferences-D4Eq55c6.js → preferences-dJVu_aGA.js} +1 -1
  161. package/dist/assets/pt-DQT1OGc3.js +1 -0
  162. package/dist/assets/publish-resource-CmTtvQT5.js +1 -0
  163. package/dist/assets/react-ByKj6cfy.js +57 -0
  164. package/dist/assets/{redux-DN6s-mdl.js → redux-B09DmXDw.js} +1 -1
  165. package/dist/assets/{resource-dialog-uAYGlGhi.js → resource-dialog-BwEU4HN_.js} +1 -1
  166. package/dist/assets/ru-BnBjQSIA.js +1 -0
  167. package/dist/assets/sdk-CVUR4sWS.js +1 -0
  168. package/dist/assets/{selector-LFwadlX9.js → selector-C48VqXJG.js} +1 -1
  169. package/dist/assets/session-6dBAYf8V.js +1 -0
  170. package/dist/assets/setup-CW9Mc5ia.js +19 -0
  171. package/dist/assets/{shorten-label-DZrPE8HL.js → shorten-label-BFmx1uT0.js} +1 -1
  172. package/dist/assets/{slicedToArray-DEmwrQWd.js → slicedToArray-nXfwDj8Z.js} +1 -1
  173. package/dist/assets/{spaces-D6Mid5Z_.js → spaces-4Z8WLh5r.js} +1 -1
  174. package/dist/assets/{start-Dgs20fUu.js → start-CphZOBJ-.js} +1 -1
  175. package/dist/assets/{step-actions-CQZle7ap.js → step-actions-dsgNJO3G.js} +1 -1
  176. package/dist/assets/{studio-Bk3f_TnH.js → studio-CqWqozKn.js} +1 -1
  177. package/dist/assets/{switch-control-XeRJBgck.js → switch-control-Cfn8zFPo.js} +1 -1
  178. package/dist/assets/th-CGHFfwO3.js +1 -0
  179. package/dist/assets/{toUpper-D3wJMACz.js → toUpper-D5T8Q9sM.js} +1 -1
  180. package/dist/assets/{transfer-CJn1-1Hv.js → transfer-Cb9oltJL.js} +1 -1
  181. package/dist/assets/trim-DT0GIvSS.js +1 -0
  182. package/dist/assets/{uniqBy-DA6z7OdT.js → uniqBy-DcaH1r2Z.js} +1 -1
  183. package/dist/assets/{unsubscribe-FfeRFV57.js → unsubscribe-B_g1tnbx.js} +1 -1
  184. package/dist/assets/{url-join-5MzXbhiU.js → url-join-2JMT_sNX.js} +1 -1
  185. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-C5KUrb2h.js → use-blocklet-info-for-connect-did-spaces-BdJyHLGD.js} +1 -1
  186. package/dist/assets/{use-mobile-mkcGNRhM.js → use-mobile-iaxCrChc.js} +1 -1
  187. package/dist/assets/{useAsync-ByBqdjCT.js → useAsync-BNwz4d_3.js} +1 -1
  188. package/dist/assets/{useFormControl-BA79DoOc.js → useFormControl-ZYiDKPwe.js} +1 -1
  189. package/dist/assets/{useLocalStorage-CmGNzDHX.js → useLocalStorage-DJ6SjiMe.js} +1 -1
  190. package/dist/assets/{useSetState-Cz7xEaUb.js → useSetState-1EVxD1ii.js} +1 -1
  191. package/dist/assets/{useSlot-CDa1PttK.js → useSlot-DEzPBH-O.js} +1 -1
  192. package/dist/assets/{useSlotProps-4qJAhdYR.js → useSlotProps-OKH9p37y.js} +1 -1
  193. package/dist/assets/{useThemeProps-B-j4MceL.js → useThemeProps-CYOsA0xw.js} +1 -1
  194. package/dist/assets/{user-center-lM3dah3G.js → user-center--iMqbkOW.js} +1 -1
  195. package/dist/assets/{user-sessions-Bf8PBzsX.js → user-sessions-CSjxxHUQ.js} +1 -1
  196. package/dist/assets/{util-CxaUEagR.js → util-BBc8rTnk.js} +1 -1
  197. package/dist/assets/vi-DmvzB5rE.js +1 -0
  198. package/dist/assets/wrap-locale-HTk2AmiE.js +1 -0
  199. package/dist/assets/zh-DdFcZXz5.js +2 -0
  200. package/dist/assets/zh-qFJGs7UR.js +1 -0
  201. package/dist/assets/zh-tw-DfkXr6W8.js +1 -0
  202. package/dist/index.html +1 -1
  203. package/dist/service-worker.js +1 -1
  204. package/package.json +18 -18
  205. package/dist/assets/api-DHCXgKlp.js +0 -1
  206. package/dist/assets/ar-BywPGmOa.js +0 -1
  207. package/dist/assets/de-qs3PjT55.js +0 -1
  208. package/dist/assets/domain-CRovIqk7.js +0 -9
  209. package/dist/assets/domain-list-DcneFIba.js +0 -15
  210. package/dist/assets/email-CeOASC0F.js +0 -9
  211. package/dist/assets/es-DXb9xB6c.js +0 -1
  212. package/dist/assets/fr-CMgZc3LR.js +0 -1
  213. package/dist/assets/hi-Ch52Lky6.js +0 -1
  214. package/dist/assets/id-_x67Rh2B.js +0 -1
  215. package/dist/assets/index-BNnk2PUZ.js +0 -262
  216. package/dist/assets/index.esm-CoLXjYXU.js +0 -1
  217. package/dist/assets/ja-BemsOTjE.js +0 -1
  218. package/dist/assets/ko-CqkhhVdi.js +0 -1
  219. package/dist/assets/localization-BW8TQLcf.js +0 -1
  220. package/dist/assets/overview-BpKMkNIP.js +0 -12
  221. package/dist/assets/pt-DZmF_qcN.js +0 -1
  222. package/dist/assets/publish-resource-CtKz6A2f.js +0 -1
  223. package/dist/assets/react-DJuQ-Z9X.js +0 -57
  224. package/dist/assets/ru-BFNdjdAO.js +0 -1
  225. package/dist/assets/sdk-BYKTwfxu.js +0 -1
  226. package/dist/assets/session-BG5hlQoH.js +0 -1
  227. package/dist/assets/setup-DckNmKNu.js +0 -19
  228. package/dist/assets/th-B61cOYck.js +0 -1
  229. package/dist/assets/vi-B884zOLu.js +0 -1
  230. package/dist/assets/wrap-locale-aLhwmHYY.js +0 -1
  231. package/dist/assets/zh-DjEnl7LY.js +0 -1
  232. package/dist/assets/zh-kNAPjCk5.js +0 -2
  233. package/dist/assets/zh-tw-Bn1Pkz9A.js +0 -1
@@ -1 +1 @@
1
- import{gC as V,r as L,gD as W,V as R,eJ as z,gE as K,gF as J,U as j,by as N}from"./index-CEaTcEQs.js";var P=function(r,a){return r===void 0&&(r=[]),a===void 0&&(a=[]),V(r,a)},S=function(r,a,n){var e=L.useRef(),i=L.useRef(0);P(a,e.current)||(i.current+=1),e.current=a,W(r,[i.current],n)},U=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator==null?void 0:navigator.platform:""),B={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:U?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},x={ctrl:function(r){return r.ctrlKey},shift:function(r){return r.shiftKey},alt:function(r){return r.altKey},meta:function(r){return r.type==="keyup"?B.meta.includes(r.keyCode):r.metaKey}};function G(r){return J(r)||j(r)}function I(r){var a=Object.keys(x).reduce(function(n,e){return x[e](r)?n+1:n},0);return[16,17,18,91,92].includes(r.keyCode)?a:a+1}function T(r,a,n){var e,i;if(!r.key)return!1;if(j(a))return r.keyCode===a?a:!1;var o=a.split("."),s=0;try{for(var l=K(o),c=l.next();!c.done;c=l.next()){var p=c.value,y=x[p],m=B[p.toLowerCase()];(y&&y(r)||m&&m===r.keyCode)&&s++}}catch(b){e={error:b}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(e)throw e.error}}return n?s===o.length&&I(r)===o.length?a:!1:s===o.length?a:!1}function Q(r,a){return N(r)?r:G(r)?function(n){return T(n,r,a)}:Array.isArray(r)?function(n){return r.find(function(e){return T(n,e,a)})}:function(){return!!r}}var X=["keydown"];function Z(r,a,n){var e=n||{},i=e.events,o=i===void 0?X:i,s=e.target,l=e.exactMatch,c=l===void 0?!1:l,p=e.useCapture,y=p===void 0?!1:p,m=R(a),b=R(r);S(function(){var k,C,E,t=z(s,window);if(t){var q=function(u){var v,h=Q(b.current,c),f=h(u),d=G(f)?f:u.key;if(f)return(v=m.current)===null||v===void 0?void 0:v.call(m,u,d)};try{for(var w=K(o),g=w.next();!g.done;g=w.next()){var H=g.value;(E=t==null?void 0:t.addEventListener)===null||E===void 0||E.call(t,H,q,y)}}catch(u){k={error:u}}finally{try{g&&!g.done&&(C=w.return)&&C.call(w)}finally{if(k)throw k.error}}return function(){var u,v,h;try{for(var f=K(o),d=f.next();!d.done;d=f.next()){var M=d.value;(h=t==null?void 0:t.removeEventListener)===null||h===void 0||h.call(t,M,q,y)}}catch(O){u={error:O}}finally{try{d&&!d.done&&(v=f.return)&&v.call(f)}finally{if(u)throw u.error}}}}},[o],s)}export{Z as u};
1
+ import{gC as V,r as L,gD as W,V as R,eJ as z,gE as K,gF as J,U as j,by as N}from"./index-BP0e3trc.js";var P=function(r,a){return r===void 0&&(r=[]),a===void 0&&(a=[]),V(r,a)},S=function(r,a,n){var e=L.useRef(),i=L.useRef(0);P(a,e.current)||(i.current+=1),e.current=a,W(r,[i.current],n)},U=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator==null?void 0:navigator.platform:""),B={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:U?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},x={ctrl:function(r){return r.ctrlKey},shift:function(r){return r.shiftKey},alt:function(r){return r.altKey},meta:function(r){return r.type==="keyup"?B.meta.includes(r.keyCode):r.metaKey}};function G(r){return J(r)||j(r)}function I(r){var a=Object.keys(x).reduce(function(n,e){return x[e](r)?n+1:n},0);return[16,17,18,91,92].includes(r.keyCode)?a:a+1}function T(r,a,n){var e,i;if(!r.key)return!1;if(j(a))return r.keyCode===a?a:!1;var o=a.split("."),s=0;try{for(var l=K(o),c=l.next();!c.done;c=l.next()){var p=c.value,y=x[p],m=B[p.toLowerCase()];(y&&y(r)||m&&m===r.keyCode)&&s++}}catch(b){e={error:b}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(e)throw e.error}}return n?s===o.length&&I(r)===o.length?a:!1:s===o.length?a:!1}function Q(r,a){return N(r)?r:G(r)?function(n){return T(n,r,a)}:Array.isArray(r)?function(n){return r.find(function(e){return T(n,e,a)})}:function(){return!!r}}var X=["keydown"];function Z(r,a,n){var e=n||{},i=e.events,o=i===void 0?X:i,s=e.target,l=e.exactMatch,c=l===void 0?!1:l,p=e.useCapture,y=p===void 0?!1:p,m=R(a),b=R(r);S(function(){var k,C,E,t=z(s,window);if(t){var q=function(u){var v,h=Q(b.current,c),f=h(u),d=G(f)?f:u.key;if(f)return(v=m.current)===null||v===void 0?void 0:v.call(m,u,d)};try{for(var w=K(o),g=w.next();!g.done;g=w.next()){var H=g.value;(E=t==null?void 0:t.addEventListener)===null||E===void 0||E.call(t,H,q,y)}}catch(u){k={error:u}}finally{try{g&&!g.done&&(C=w.return)&&C.call(w)}finally{if(k)throw k.error}}return function(){var u,v,h;try{for(var f=K(o),d=f.next();!d.done;d=f.next()){var M=d.value;(h=t==null?void 0:t.removeEventListener)===null||h===void 0||h.call(t,M,q,y)}}catch(O){u={error:O}}finally{try{d&&!d.done&&(v=f.return)&&v.call(f)}finally{if(u)throw u.error}}}}},[o],s)}export{Z as u};
@@ -1,4 +1,4 @@
1
- import{bs as e,P as o,r as b,j as p,bt as u,bu as h,aj as x,T as w}from"./index-CEaTcEQs.js";const C={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},c={error:{color:e.common.white,backgroundColor:e.error.main},warning:{color:e.common.white,backgroundColor:e.warning.main},success:{color:e.common.white,backgroundColor:e.success.main},primary:{color:e.common.white,backgroundColor:e.primary.main},reverse:{color:"#fff",backgroundColor:"#222"}};function s(n){const t=h(n,s,["style"]),{type:r,content:l,children:m,style:d,className:f,forwardedRef:y,...g}=t,{palette:a}=x(),i=Object.assign({},c[r]||c.primary,d);return a[r]&&Object.assign(i,{color:a[r].contrastText||e.common.white,backgroundColor:a[r].main}),p.jsx(j,{ref:y,component:"span",className:f,style:i,...g,children:l||m})}s.propTypes={children:o.any.isRequired,type:o.oneOf(Object.keys(c)),content:o.string,className:o.string,style:o.oneOfType([o.object,o.string])};s.defaultProps={type:"primary",content:"",className:"",style:{}};const T=b.forwardRef((n,t)=>p.jsx(s,{...n,forwardedRef:t})),O=T,j=u(w)`
1
+ import{bs as e,P as o,r as b,j as p,bt as u,bu as h,aj as x,T as w}from"./index-BP0e3trc.js";const C={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},c={error:{color:e.common.white,backgroundColor:e.error.main},warning:{color:e.common.white,backgroundColor:e.warning.main},success:{color:e.common.white,backgroundColor:e.success.main},primary:{color:e.common.white,backgroundColor:e.primary.main},reverse:{color:"#fff",backgroundColor:"#222"}};function s(n){const t=h(n,s,["style"]),{type:r,content:l,children:m,style:d,className:f,forwardedRef:y,...g}=t,{palette:a}=x(),i=Object.assign({},c[r]||c.primary,d);return a[r]&&Object.assign(i,{color:a[r].contrastText||e.common.white,backgroundColor:a[r].main}),p.jsx(j,{ref:y,component:"span",className:f,style:i,...g,children:l||m})}s.propTypes={children:o.any.isRequired,type:o.oneOf(Object.keys(c)),content:o.string,className:o.string,style:o.oneOfType([o.object,o.string])};s.defaultProps={type:"primary",content:"",className:"",style:{}};const T=b.forwardRef((n,t)=>p.jsx(s,{...n,forwardedRef:t})),O=T,j=u(w)`
2
2
  && {
3
3
  display: inline-flex;
4
4
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{r as d,j as o,bt as h,B as p,P as i}from"./index-CEaTcEQs.js";var a={};Object.defineProperty(a,"__esModule",{value:!0});var f=a.default=void 0;v(d);var c=o;function v(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(y){return Object.getOwnPropertyDescriptor(e,y).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(n){b(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b(e,t,r){return(t=j(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){var t=g(e,"string");return typeof t=="symbol"?t:t+""}function g(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l=function(t){return(0,c.jsx)("svg",u(u({},t),{},{children:(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.361 2.4a.8.8 0 0 0-.728.469L.873 15.54a.8.8 0 0 0-.072.33V27.393a.8.8 0 0 0 .8.8h28.8a.8.8 0 0 0 .8-.8v-11.52a.8.8 0 0 0-.072-.331L25.37 2.869a.8.8 0 0 0-.728-.47H7.361zm-4.96 14.4v9.792h27.2v-9.799a.814.814 0 0 1-.104.007h-7.098l-2.066 3.1a.8.8 0 0 1-.666.356h-8.064a.8.8 0 0 1-.665-.356L8.87 16.8h-6.47zm26.816-1.6H21.97a.8.8 0 0 0-.665.356l-2.067 3.1h-7.208l-2.066-3.1a.8.8 0 0 0-.666-.356H2.785L7.876 4h16.25l5.09 11.2z",fill:"currentColor"})}))};l.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};l.displayName="empty";f=a.default=l;const O=h(p)`
1
+ import{r as d,j as o,bt as h,B as p,P as i}from"./index-BP0e3trc.js";var a={};Object.defineProperty(a,"__esModule",{value:!0});var f=a.default=void 0;v(d);var c=o;function v(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(y){return Object.getOwnPropertyDescriptor(e,y).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(n){b(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b(e,t,r){return(t=j(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){var t=g(e,"string");return typeof t=="symbol"?t:t+""}function g(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l=function(t){return(0,c.jsx)("svg",u(u({},t),{},{children:(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.361 2.4a.8.8 0 0 0-.728.469L.873 15.54a.8.8 0 0 0-.072.33V27.393a.8.8 0 0 0 .8.8h28.8a.8.8 0 0 0 .8-.8v-11.52a.8.8 0 0 0-.072-.331L25.37 2.869a.8.8 0 0 0-.728-.47H7.361zm-4.96 14.4v9.792h27.2v-9.799a.814.814 0 0 1-.104.007h-7.098l-2.066 3.1a.8.8 0 0 1-.666.356h-8.064a.8.8 0 0 1-.665-.356L8.87 16.8h-6.47zm26.816-1.6H21.97a.8.8 0 0 0-.665.356l-2.067 3.1h-7.208l-2.066-3.1a.8.8 0 0 0-.666-.356H2.785L7.876 4h16.25l5.09 11.2z",fill:"currentColor"})}))};l.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};l.displayName="empty";f=a.default=l;const O=h(p)`
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  align-items: center;
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-DJuQ-Z9X.js","assets/index-CEaTcEQs.js","assets/index-D8NuaJ66.css","assets/index-BreZlHA5.js","assets/preact.module-DJUF--8d.js","assets/index-DsNs234N.js","assets/index-DZIjChbd.js","assets/toUpper-D3wJMACz.js","assets/index-B5vlCSnw.js","assets/fallback-DTP7cYpM.js","assets/index-DYNsUZaH.js","assets/Toolbar-DlYXwq_K.js","assets/Hidden-DPIGUAMJ.js","assets/index-B6NXai6_.js","assets/MoreVert-MUbtAQHv.js","assets/selector-LFwadlX9.js","assets/ExpandMore-IE6fvawl.js","assets/Avatar-BIWwirOj.js","assets/useSlot-CDa1PttK.js","assets/resource-dialog-uAYGlGhi.js","assets/OpenInNew-CJl5exgf.js","assets/CloseOutlined-BWhWoWD_.js","assets/use-mobile-mkcGNRhM.js","assets/Link-CYqMveft.js","assets/index-CJPYlJzX.js","assets/index-CE9qCuXL.js","assets/index-BQQSQ70k.js","assets/FormControlLabel-BmopTtvW.js","assets/useFormControl-BA79DoOc.js","assets/Stack-CYabuVI4.js","assets/index-BcUb67P2.js","assets/useThemeProps-B-j4MceL.js","assets/toPropertyKey-PLuKRk1e.js","assets/index-DgFd31_6.js","assets/redux-DN6s-mdl.js","assets/ViewColumn-8HGbbav-.js","assets/FormControl-Chtq9AE7.js","assets/FormGroup-C54kQ9N4.js","assets/Select-CIDtym3x.js","assets/InputLabel-DMWY4sIp.js","assets/ListItemText-BR6T5ZDu.js","assets/TextField-x4CoNOlz.js","assets/LastPage-D0B9CdNo.js","assets/Search-wiijyIeu.js","assets/Delete-B2j1UcE8.js","assets/index-j8Uq5XuX.js","assets/url-join-5MzXbhiU.js","assets/uniqBy-DA6z7OdT.js","assets/react-BW7E7-P9.css"])))=>i.map(i=>d[i]);
2
- import{at as d2,j as o,aG as se,cJ as g0,aK as A,fw as X1,aJ as je,aE as $e,aF as Fe,T as G,r as R,aI as m1,aL as u2,aM as Ue,aN as qe,cP as p2,fx as l1,X as Se,Y as ke,B as z,n as Oe,P as h,$ as We,G as X,e as v1,u as te,aP as we,aY as Ve,bx as n1,a1 as e1,L as ue,bL as b0,a as ve,aC as ge,K as h2,t as $,Z as ae,dw as f2,aa as ye,c as pe,I as x2,bW as g1,ch as j0,cE as m2,cN as He,cO as w0,aj as v2,d2 as g2,cI as Je,bF as re,c3 as Qe,fj as b2,a8 as J1,b as ne,bm as R0,ec as C0,ai as b1,bn as y0,co as z0,aT as Ae,aS as j2,a3 as S0,fy as Q1,f7 as Le,bk as w2,au as k0,cV as R2,l as C2,aB as y2,aq as z2,ar as i1}from"./index-CEaTcEQs.js";import{d as j1}from"./Add-D8jHDZuh.js";import{d as I0}from"./Delete-B2j1UcE8.js";import{d as S2}from"./Error-B4vCt6tb.js";import{D as w1}from"./index-BcUb67P2.js";import{T as M0,b as k2}from"./index-Bsh1JZ9i.js";import{C as R1}from"./confirm-Bz_GmEiI.js";import{u as s1}from"./session-BG5hlQoH.js";import{W as Y1}from"./did-address-BIfBoDiQ.js";import{B as C1,d as I2}from"./ChevronRight-j0-gJxyM.js";import{S as be}from"./shorten-label-DZrPE8HL.js";import{A as P0}from"./Avatar-BIWwirOj.js";import{d as M2}from"./Download-DP_lDlx2.js";import{d as P2}from"./QuestionMarkCircle-TnBpzaSI.js";import{b as L2,c as Z1,T as T2}from"./index-CJPYlJzX.js";import{_ as Pe}from"./useSetState-Cz7xEaUb.js";import{c as y1}from"./index-DZIjChbd.js";import{C as u1,F as p1}from"./FormControlLabel-BmopTtvW.js";import{A as L0}from"./Alert-CRD24aa1.js";import{p as t1}from"./index-HqFqdQ4r.js";import"./api-DHCXgKlp.js";import{i as N2}from"./index-BNFvQJs8.js";import{d as V2}from"./ExpandMore-IE6fvawl.js";import{d as D2}from"./OpenInNew-CJl5exgf.js";import{u as T0}from"./useThemeProps-B-j4MceL.js";import{u as _2}from"./useSlotProps-4qJAhdYR.js";import{d as E2}from"./DeleteOutline-C2h-KiXe.js";import{c as B2,A as N0,u as A2,S as O2,U as H2}from"./item-B-EBHzLe.js";import{d as $2}from"./ArrowDropDown-CFc0zow6.js";import{f as Ne}from"./format-error-BOzcbfGa.js";import{B as h1}from"./ButtonGroup-DcU8GHuP.js";import{T as Te}from"./TextField-x4CoNOlz.js";import{I as z1}from"./InputAdornment-DXkRELYA.js";import{C as F2}from"./click-to-copy-Cy7g0c_W.js";import{d as U2}from"./Launch-DhHbLKKF.js";import{L as q2}from"./MoreVert-MUbtAQHv.js";import{a as W2}from"./ListItemText-BR6T5ZDu.js";import{S as e0}from"./index-BQQSQ70k.js";import{M as G2}from"./index-BbBRjIRQ.js";import{r as K2}from"./index-B8cOlg3J.js";import{d as X2}from"./Done-B-JT0RXC.js";import{c as V0,d as D0,b as J2,S as Q2,a as Y2}from"./Stepper-DuAngjIl.js";import{S as Z2}from"./Stack-CYabuVI4.js";import{R as et,a as t0}from"./RadioGroup-C6M_sifl.js";import"./toPropertyKey-PLuKRk1e.js";import"./index-DgFd31_6.js";import"./redux-DN6s-mdl.js";import"./ViewColumn-8HGbbav-.js";import"./FormControl-Chtq9AE7.js";import"./useFormControl-BA79DoOc.js";import"./FormGroup-C54kQ9N4.js";import"./Select-CIDtym3x.js";import"./InputLabel-DMWY4sIp.js";import"./LastPage-D0B9CdNo.js";import"./Toolbar-DlYXwq_K.js";import"./Search-wiijyIeu.js";import"./index-CE9qCuXL.js";import"./DialogContentText-D5Xxal_F.js";import"./Link-CYqMveft.js";import"./useSlot-CDa1PttK.js";import"./jss-plugin-props-sort.esm-Bm1tsMYs.js";const tt=d2(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),ot=["slots","slotProps"],lt=se(g0)(({theme:e})=>A({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":A({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":A({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:X1(e.palette.grey[200],.12)}:{backgroundColor:X1(e.palette.grey[600],.12)})})),nt=se(tt)({width:24,height:16});function st(e){const{slots:t={},slotProps:l={}}=e,s=je(e,ot),r=e;return o.jsx("li",{children:o.jsx(lt,A({focusRipple:!0},s,{ownerState:r,children:o.jsx(nt,A({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function rt(e){return Fe("MuiBreadcrumbs",e)}const it=$e("MuiBreadcrumbs",["root","ol","li","separator"]),at=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],ct=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},rt,t)},dt=se(G,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${it.li}`]:t.li},t.root]})({}),ut=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),pt=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function ht(e,t,l,s){return e.reduce((r,c,i)=>(i<e.length-1?r=r.concat(c,o.jsx(pt,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(c),r),[])}const _0=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:c,component:i="nav",slots:a={},slotProps:u={},expandText:f="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=s,d=je(s,at),[m,b]=R.useState(!1),v=A({},s,{component:i,expanded:m,expandText:f,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=ct(v),S=u2({elementType:a.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),N=R.useRef(null),T=I=>{const U=()=>{b(!0);const V=N.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=I.length?I:[...I.slice(0,g),o.jsx(st,{"aria-label":f,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:U},"ellipsis"),...I.slice(I.length-x,I.length)]},P=R.Children.toArray(r).filter(I=>R.isValidElement(I)).map((I,U)=>o.jsx("li",{className:C.li,children:I},`child-${U}`));return o.jsx(dt,A({ref:l,component:i,color:"text.secondary",className:Ue(C.root,c),ownerState:v},d,{children:o.jsx(ut,{className:C.ol,ref:N,ownerState:v,children:ht(m||y&&P.length<=y?P:T(P),C.separator,p,v)})}))});function ft(e){return Fe("MuiStepButton",e)}const o0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),xt=["children","className","icon","optional"],mt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},ft,t)},vt=se(g0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${o0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>A({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${o0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),gt=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepButton"}),{children:r,className:c,icon:i,optional:a}=s,u=je(s,xt),{disabled:f,active:x}=R.useContext(V0),{orientation:g}=R.useContext(D0),y=A({},s,{orientation:g}),p=mt(y),d={icon:i,optional:a},m=p2(r,["StepLabel"])?R.cloneElement(r,d):o.jsx(J2,A({},d,{children:r}));return o.jsx(vt,A({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,c),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))});function bt(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const jt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],wt=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},bt,t)},Rt=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>A({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),Ct=se(l1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),yt=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepContent"}),{children:r,className:c,TransitionComponent:i=l1,transitionDuration:a="auto",TransitionProps:u}=s,f=je(s,jt);R.useContext(D0);const{active:x,last:g,expanded:y}=R.useContext(V0),p=A({},s,{last:g}),d=wt(p);let m=a;return a==="auto"&&!i.muiSupportAuto&&(m=void 0),o.jsx(Rt,A({className:Ue(d.root,c),ref:l,ownerState:p},f,{children:o.jsx(Ct,A({as:i,in:x||y,className:d.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:r}))}))});var S1={},zt=ke;Object.defineProperty(S1,"__esModule",{value:!0});var E0=S1.default=void 0,St=zt(Se()),kt=o;E0=S1.default=(0,St.default)((0,kt.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var k1={},It=ke;Object.defineProperty(k1,"__esModule",{value:!0});var B0=k1.default=void 0,Mt=It(Se()),Pt=o;B0=k1.default=(0,Mt.default)((0,Pt.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var I1={},Lt=ke;Object.defineProperty(I1,"__esModule",{value:!0});var A0=I1.default=void 0,Tt=Lt(Se()),Nt=o;A0=I1.default=(0,Tt.default)((0,Nt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Ie({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(Oe,{size:e})})}Ie.propTypes={size:h.number};Ie.defaultProps={size:24};function M1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[a,u]=R.useState(!1),f=We(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(P0,{sx:{borderRadius:1},src:i}),o.jsxs(z,{children:[o.jsx(be,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(be,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:r||"/"})]})]})}M1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function P1({initUrl:e}){const t=v1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:c}=we(),{api:i}=s1(),[a,u]=R.useState(!0),{blocklet:f}=Ve(),[x,g]=R.useState(null),[y,p]=R.useState(!1),d=We(k=>k.breakpoints.down("xl")),{componentDid:m=""}=n1(),[b,v]=R.useState(null),C=()=>{c.getProjects({input:{did:f.meta.did,componentDid:m,tenantScope:l}}).then(k=>{const L=(k==null?void 0:k.projects)||[];u(!1),v(L)}).catch(k=>{u(!1),$.error(k.message)})},S=()=>{t(`${X.UNOWNED_DID}/create/none`,{replace:!0})},N=k=>{g(k)},T=()=>{u(!1),p(!0)},P=()=>{p(!1),g(null)},I=k=>{$.error(k.message),p(!1),g(null)},U=k=>{if(!(k!=null&&k.deleted)){$.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!b&&a)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Ie,{})});if(!b)return null;if(!b.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(e1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:k=>{const L=b[k];return o.jsx(ue,{to:`${L.id}`,children:o.jsx(M1,{did:f.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:k=>k?o.jsx(M0,{type:"success",children:k}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:k=>k?o.jsx(Y1,{size:14,compact:!0,responsive:!1,did:k}):null}},d||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:k=>k?o.jsx(Y1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${k}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:k}):null}},d||m?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:k=>{const L=(f.children||[]).find(E=>E.meta.did===k);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:14,blocklet:L,ancestors:[f]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},k):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:k=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(be,{children:k})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:k=>o.jsx(b0,{value:Number(k),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{const L=b[k];return o.jsxs(z,{display:"flex",children:[o.jsx(ue,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"create",children:o.jsx(E0,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"secondary","aria-label":"create",children:o.jsx(ue,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(B0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"delete",onClick:()=>N(L),children:o.jsx(I0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),M=y?o.jsx(h2,{open:!0,popup:!0,onClose:P,action:"check-has-project-id",locale:r,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:U,onError:I,extraParams:{projectId:x.id,did:f.meta.did,name:x.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Vt,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(A0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(e1,{onClick:S,variant:"contained",children:[o.jsx(j1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(w1,{className:"main-table",locale:r,data:b,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(R1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(k=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(S2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(G,{component:"span",variant:"inherit",color:"text.secondary",children:k})]}))})}),M]})}P1.propTypes={initUrl:h.object};P1.defaultProps={initUrl:null};const Vt=ae(z)`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-ByKj6cfy.js","assets/index-BP0e3trc.js","assets/index-D8NuaJ66.css","assets/index-CLhW7LJ4.js","assets/preact.module-DJUF--8d.js","assets/index-Ee7FJItU.js","assets/index-9sFaWssT.js","assets/toUpper-D5T8Q9sM.js","assets/index-B2uvJWil.js","assets/fallback-BgjQELn7.js","assets/index-Di3jF2ud.js","assets/Toolbar-3DD8ghgH.js","assets/Hidden-NXnAHRZU.js","assets/index-BOtnl4g3.js","assets/MoreVert-C8wT9PBh.js","assets/selector-C48VqXJG.js","assets/ExpandMore-d42Ky8li.js","assets/Avatar-C8UCl2Ga.js","assets/useSlot-DEzPBH-O.js","assets/resource-dialog-BwEU4HN_.js","assets/OpenInNew-BuRkQUDs.js","assets/CloseOutlined-SmGyPCCX.js","assets/use-mobile-iaxCrChc.js","assets/Link-B6WCZ3ri.js","assets/index-CHp2FXIo.js","assets/index-D-f5DDJ1.js","assets/index-DmXHr_Jd.js","assets/FormControlLabel-jY_KMRPD.js","assets/useFormControl-ZYiDKPwe.js","assets/Stack-C7-JMCCu.js","assets/index-BxmTVomL.js","assets/useThemeProps-CYOsA0xw.js","assets/toPropertyKey-PLuKRk1e.js","assets/index-BCt_GquA.js","assets/redux-B09DmXDw.js","assets/ViewColumn-Dbd2RcMW.js","assets/FormControl-C07X4iXm.js","assets/FormGroup-CErrZ95I.js","assets/Select-B0ouveBQ.js","assets/InputLabel-DCPOxFdI.js","assets/ListItemText-CAgBao36.js","assets/TextField-D1ujlYf9.js","assets/LastPage-CupdKuWQ.js","assets/Search-B37iNoKq.js","assets/Delete-Dq713V6u.js","assets/index-wwrsvgTo.js","assets/url-join-2JMT_sNX.js","assets/uniqBy-DcaH1r2Z.js","assets/react-BW7E7-P9.css"])))=>i.map(i=>d[i]);
2
+ import{at as d2,j as o,aG as se,cJ as g0,aK as A,fw as X1,aJ as je,aE as $e,aF as Fe,T as G,r as R,aI as m1,aL as u2,aM as Ue,aN as qe,cP as p2,fx as l1,X as Se,Y as ke,B as z,n as Oe,P as h,$ as We,G as X,e as v1,u as te,aP as we,aY as Ve,bx as n1,a1 as e1,L as ue,bL as b0,a as ve,aC as ge,K as h2,t as $,Z as ae,dw as f2,aa as ye,c as pe,I as x2,bW as g1,ch as j0,cE as m2,cN as He,cO as w0,aj as v2,d2 as g2,cI as Je,bF as re,c3 as Qe,fj as b2,a8 as J1,b as ne,bm as R0,ec as C0,ai as b1,bn as y0,co as z0,aT as Ae,aS as j2,a3 as S0,fy as Q1,f7 as Le,bk as w2,au as k0,cV as R2,l as C2,aB as y2,aq as z2,ar as i1}from"./index-BP0e3trc.js";import{d as j1}from"./Add-BnNzBkSM.js";import{d as I0}from"./Delete-Dq713V6u.js";import{d as S2}from"./Error-C5amiEhI.js";import{D as w1}from"./index-BxmTVomL.js";import{T as M0,b as k2}from"./index-CnjLsEef.js";import{C as R1}from"./confirm-WGw4zZ8r.js";import{u as s1}from"./session-6dBAYf8V.js";import{W as Y1}from"./did-address-BURJDyiC.js";import{B as C1,d as I2}from"./ChevronRight-B4jca3VR.js";import{S as be}from"./shorten-label-BFmx1uT0.js";import{A as P0}from"./Avatar-C8UCl2Ga.js";import{d as M2}from"./Download-DW26ur5s.js";import{d as P2}from"./QuestionMarkCircle-BJqkf48h.js";import{b as L2,c as Z1,T as T2}from"./index-CHp2FXIo.js";import{_ as Pe}from"./useSetState-1EVxD1ii.js";import{c as y1}from"./index-9sFaWssT.js";import{C as u1,F as p1}from"./FormControlLabel-jY_KMRPD.js";import{A as L0}from"./Alert-MdMGtLD7.js";import{p as t1}from"./index-HqFqdQ4r.js";import"./api-BYS9rs2B.js";import{i as N2}from"./index-wxPofhyR.js";import{d as V2}from"./ExpandMore-d42Ky8li.js";import{d as D2}from"./OpenInNew-BuRkQUDs.js";import{u as T0}from"./useThemeProps-CYOsA0xw.js";import{u as _2}from"./useSlotProps-OKH9p37y.js";import{d as E2}from"./DeleteOutline-CnT4EQeF.js";import{c as B2,A as N0,u as A2,S as O2,U as H2}from"./item-BF5S_bSW.js";import{d as $2}from"./ArrowDropDown-BxN9s0B3.js";import{f as Ne}from"./format-error-CrcMEK2V.js";import{B as h1}from"./ButtonGroup-CZa7-ajY.js";import{T as Te}from"./TextField-D1ujlYf9.js";import{I as z1}from"./InputAdornment-DKQXkF5o.js";import{C as F2}from"./click-to-copy-BqLgKtqA.js";import{d as U2}from"./Launch-BvCfmwc3.js";import{L as q2}from"./MoreVert-C8wT9PBh.js";import{a as W2}from"./ListItemText-CAgBao36.js";import{S as e0}from"./index-DmXHr_Jd.js";import{M as G2}from"./index-CInwQHvl.js";import{r as K2}from"./index-DZi-2Gbw.js";import{d as X2}from"./Done-qR9kVgrH.js";import{c as V0,d as D0,b as J2,S as Q2,a as Y2}from"./Stepper-Bc34zZ-Y.js";import{S as Z2}from"./Stack-C7-JMCCu.js";import{R as et,a as t0}from"./RadioGroup-Ceyc11_1.js";import"./toPropertyKey-PLuKRk1e.js";import"./index-BCt_GquA.js";import"./redux-B09DmXDw.js";import"./ViewColumn-Dbd2RcMW.js";import"./FormControl-C07X4iXm.js";import"./useFormControl-ZYiDKPwe.js";import"./FormGroup-CErrZ95I.js";import"./Select-B0ouveBQ.js";import"./InputLabel-DCPOxFdI.js";import"./LastPage-CupdKuWQ.js";import"./Toolbar-3DD8ghgH.js";import"./Search-B37iNoKq.js";import"./index-D-f5DDJ1.js";import"./DialogContentText-DacbluUW.js";import"./Link-B6WCZ3ri.js";import"./useSlot-DEzPBH-O.js";import"./jss-plugin-props-sort.esm-C037h0ZA.js";const tt=d2(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),ot=["slots","slotProps"],lt=se(g0)(({theme:e})=>A({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":A({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":A({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:X1(e.palette.grey[200],.12)}:{backgroundColor:X1(e.palette.grey[600],.12)})})),nt=se(tt)({width:24,height:16});function st(e){const{slots:t={},slotProps:l={}}=e,s=je(e,ot),r=e;return o.jsx("li",{children:o.jsx(lt,A({focusRipple:!0},s,{ownerState:r,children:o.jsx(nt,A({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function rt(e){return Fe("MuiBreadcrumbs",e)}const it=$e("MuiBreadcrumbs",["root","ol","li","separator"]),at=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],ct=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},rt,t)},dt=se(G,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${it.li}`]:t.li},t.root]})({}),ut=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),pt=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function ht(e,t,l,s){return e.reduce((r,c,i)=>(i<e.length-1?r=r.concat(c,o.jsx(pt,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(c),r),[])}const _0=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:c,component:i="nav",slots:a={},slotProps:u={},expandText:f="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=s,d=je(s,at),[m,b]=R.useState(!1),v=A({},s,{component:i,expanded:m,expandText:f,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=ct(v),S=u2({elementType:a.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),N=R.useRef(null),T=I=>{const U=()=>{b(!0);const V=N.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=I.length?I:[...I.slice(0,g),o.jsx(st,{"aria-label":f,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:U},"ellipsis"),...I.slice(I.length-x,I.length)]},P=R.Children.toArray(r).filter(I=>R.isValidElement(I)).map((I,U)=>o.jsx("li",{className:C.li,children:I},`child-${U}`));return o.jsx(dt,A({ref:l,component:i,color:"text.secondary",className:Ue(C.root,c),ownerState:v},d,{children:o.jsx(ut,{className:C.ol,ref:N,ownerState:v,children:ht(m||y&&P.length<=y?P:T(P),C.separator,p,v)})}))});function ft(e){return Fe("MuiStepButton",e)}const o0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),xt=["children","className","icon","optional"],mt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},ft,t)},vt=se(g0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${o0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>A({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${o0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),gt=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepButton"}),{children:r,className:c,icon:i,optional:a}=s,u=je(s,xt),{disabled:f,active:x}=R.useContext(V0),{orientation:g}=R.useContext(D0),y=A({},s,{orientation:g}),p=mt(y),d={icon:i,optional:a},m=p2(r,["StepLabel"])?R.cloneElement(r,d):o.jsx(J2,A({},d,{children:r}));return o.jsx(vt,A({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,c),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))});function bt(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const jt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],wt=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},bt,t)},Rt=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>A({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),Ct=se(l1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),yt=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepContent"}),{children:r,className:c,TransitionComponent:i=l1,transitionDuration:a="auto",TransitionProps:u}=s,f=je(s,jt);R.useContext(D0);const{active:x,last:g,expanded:y}=R.useContext(V0),p=A({},s,{last:g}),d=wt(p);let m=a;return a==="auto"&&!i.muiSupportAuto&&(m=void 0),o.jsx(Rt,A({className:Ue(d.root,c),ref:l,ownerState:p},f,{children:o.jsx(Ct,A({as:i,in:x||y,className:d.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:r}))}))});var S1={},zt=ke;Object.defineProperty(S1,"__esModule",{value:!0});var E0=S1.default=void 0,St=zt(Se()),kt=o;E0=S1.default=(0,St.default)((0,kt.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var k1={},It=ke;Object.defineProperty(k1,"__esModule",{value:!0});var B0=k1.default=void 0,Mt=It(Se()),Pt=o;B0=k1.default=(0,Mt.default)((0,Pt.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var I1={},Lt=ke;Object.defineProperty(I1,"__esModule",{value:!0});var A0=I1.default=void 0,Tt=Lt(Se()),Nt=o;A0=I1.default=(0,Tt.default)((0,Nt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Ie({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(Oe,{size:e})})}Ie.propTypes={size:h.number};Ie.defaultProps={size:24};function M1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[a,u]=R.useState(!1),f=We(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(P0,{sx:{borderRadius:1},src:i}),o.jsxs(z,{children:[o.jsx(be,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(be,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:r||"/"})]})]})}M1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function P1({initUrl:e}){const t=v1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:c}=we(),{api:i}=s1(),[a,u]=R.useState(!0),{blocklet:f}=Ve(),[x,g]=R.useState(null),[y,p]=R.useState(!1),d=We(k=>k.breakpoints.down("xl")),{componentDid:m=""}=n1(),[b,v]=R.useState(null),C=()=>{c.getProjects({input:{did:f.meta.did,componentDid:m,tenantScope:l}}).then(k=>{const L=(k==null?void 0:k.projects)||[];u(!1),v(L)}).catch(k=>{u(!1),$.error(k.message)})},S=()=>{t(`${X.UNOWNED_DID}/create/none`,{replace:!0})},N=k=>{g(k)},T=()=>{u(!1),p(!0)},P=()=>{p(!1),g(null)},I=k=>{$.error(k.message),p(!1),g(null)},U=k=>{if(!(k!=null&&k.deleted)){$.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!b&&a)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Ie,{})});if(!b)return null;if(!b.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(e1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:k=>{const L=b[k];return o.jsx(ue,{to:`${L.id}`,children:o.jsx(M1,{did:f.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:k=>k?o.jsx(M0,{type:"success",children:k}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:k=>k?o.jsx(Y1,{size:14,compact:!0,responsive:!1,did:k}):null}},d||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:k=>k?o.jsx(Y1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${k}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:k}):null}},d||m?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:k=>{const L=(f.children||[]).find(E=>E.meta.did===k);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:14,blocklet:L,ancestors:[f]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},k):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:k=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(be,{children:k})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:k=>o.jsx(b0,{value:Number(k),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{const L=b[k];return o.jsxs(z,{display:"flex",children:[o.jsx(ue,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"create",children:o.jsx(E0,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"secondary","aria-label":"create",children:o.jsx(ue,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(B0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"delete",onClick:()=>N(L),children:o.jsx(I0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),M=y?o.jsx(h2,{open:!0,popup:!0,onClose:P,action:"check-has-project-id",locale:r,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:U,onError:I,extraParams:{projectId:x.id,did:f.meta.did,name:x.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Vt,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(A0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(e1,{onClick:S,variant:"contained",children:[o.jsx(j1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(w1,{className:"main-table",locale:r,data:b,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(R1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(k=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(S2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(G,{component:"span",variant:"inherit",color:"text.secondary",children:k})]}))})}),M]})}P1.propTypes={initUrl:h.object};P1.defaultProps={initUrl:null};const Vt=ae(z)`
3
3
  .main-table > div:first-child {
4
4
  display: none;
5
5
  }
@@ -133,7 +133,7 @@ import{at as d2,j as o,aG as se,cJ as g0,aK as A,fw as X1,aJ as je,aE as $e,aF a
133
133
  background: #fff;
134
134
  z-index: 10;
135
135
  }
136
- `,c0="lastWantToConnectStoreId";function Wl(e){var a,u;const[t,l]=R.useState(null),{session:s}=s1(),r=R.useCallback(f=>{l(f),localStorage.setItem(c0,f==null?void 0:f.id)},[l]),c=R.useMemo(()=>{var y,p,d,m;const f=localStorage.getItem(c0),x=f?(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(b=>b.id===f):null;if(x)return x;let g=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(b=>{var v;return!(b.id!==X.BLOCKLET_STORE.id||b.scope&&b.scope!=="studio"&&b.scope!==((v=s==null?void 0:s.user)==null?void 0:v.did))});return g||(g=(m=(d=e==null?void 0:e.settings)==null?void 0:d.storeList)==null?void 0:m[0]),g},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||c||{},r]}const d1={};async function K0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){d1[r]&&clearTimeout(d1[r]),await new Promise(a=>setTimeout(a,s));const c=Date.now(),i=async(a,u)=>{try{const f=await e();a(f)}catch(f){Date.now()-c>l?u(f):r?d1[r]=setTimeout(()=>i(a,u),t):setTimeout(()=>i(a,u),t)}};return new Promise(i)}function Gl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Kl(e,{did:t,projectId:l,messageId:s}){return K0(async()=>{var c;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((c=r==null?void 0:r.project)!=null&&c.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function Xl(e,{did:t,projectId:l,storeId:s}){return K0(async()=>{var i,a;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((a=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!r.project.connectedStores.find(u=>u.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const X0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,a;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let c=e?((a=l==null?void 0:l.settings)==null?void 0:a.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(c)||(c=[]),c=c.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:r,storeList:c}};function H1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:c,componentDid:i}){var L,E,B;const{t:a}=te(),{session:u}=s1(),{api:f,info:x,inService:g}=we(),y=Ve(),[p,d]=R.useState(!1),m=R.useRef(null),[b,v]=R.useState(!1),[C,S]=R.useState(null),N=O=>{l(O),d(!1)},T=()=>{d(!p)},P=O=>{m.current&&m.current.contains(O.target)||d(!1)},I=()=>{v(!0)},U=()=>{v(!1)},V=async()=>{var O;if(C)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((O=y==null?void 0:y.actions)==null?void 0:O.refreshBlocklet())}catch(K){$.error(`Remove Blocklet Store Error: ${Ne(K)}`)}finally{S(null)}},{storeList:M}=X0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:i,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),k=(E=e==null?void 0:e.meta)==null?void 0:E.did;return o.jsxs(o.Fragment,{children:[o.jsxs(h1,{disabled:r,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[c&&o.jsx(Oe,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${t.name||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx($2,{})})]}),o.jsx(R0,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:O})=>o.jsx(C0,{...O,style:{transformOrigin:"center top"},children:o.jsx(b1,{children:o.jsx(y0,{onClickAway:P,children:o.jsxs(z0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[M==null?void 0:M.map(K=>{var J;return o.jsxs(Ae,{selected:K.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>N(K),children:[o.jsxs(z,{children:[o.jsx(be,{sx:{fontSize:"16px"},maxLength:24,children:K.name}),o.jsx(be,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:K.url})]}),B2({store:K,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(ge,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(K)},children:o.jsx(re,{icon:"ic:outline-delete"})})]},K.url)}),o.jsx(j2,{}),o.jsxs(Ae,{onClick:I,children:[o.jsx(j1,{font:!0}),o.jsx(G,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),b&&o.jsx(N0,{hiddenChildren:!0,open:!0,onClose:U,teamDid:k,storeList:M,scope:"studio",onAdd:(B=y==null?void 0:y.actions)==null?void 0:B.refreshBlocklet}),C&&o.jsx(R1,{displayError:!0,title:`${a("common.delete")} ${C.name}`,description:a("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:a("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}H1.propTypes={store:h.object,blocklet:h.object,onChangeStore:h.func.isRequired,onClick:h.func.isRequired,loading:h.bool.isRequired,disabled:h.bool.isRequired,componentDid:h.string.isRequired,projectType:h.string.isRequired,getData:h.func.isRequired};H1.defaultProps={store:null,blocklet:null};const d0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],u0=1024*1024*10,p0=R.lazy(()=>S0(()=>import("./react-DJuQ-Z9X.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])).then(e=>({default:e.Uploader})));function J0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:c,paramsErrTip:i,setParamsErrTip:a,setLoading:u,initUrl:f,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=te(),{api:d}=we(),m=v1(),b=R.useRef(null),v=R.useRef(null),[C,S]=Wl(s),N=A2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const E=setTimeout(()=>{u(!1)},2e4),B=await Kl(d,L);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${X.UNOWNED_DID}/create`,`${B}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){$.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){$.error(p("blocklet.publish.noStoreSelected"));return}const L=Gl();N(async(E,B)=>{var O,K,J;try{const W=await d.connectByStudio({input:{did:(O=s==null?void 0:s.meta)==null?void 0:O.did,blockletTitle:r==null?void 0:r.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((K=r==null?void 0:r.blockletComponents)==null?void 0:K.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){$.error("failed to connect to store");return}B(W.url),T({did:(J=s==null?void 0:s.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const Z=Ne(W);$.error(Z),u(!1)}})},I=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,U=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,M=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(L=>`${U}/${L}`),k=()=>t?!1:!e||e===X.UNOWNED_DID?($.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Jl,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Te,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:r.blockletTitle||"",onChange:L=>{a({blockletTitle:""}),c({blockletTitle:L.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Te,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===X.UNOWNED_DID&&o.jsx(z1,{position:"end",children:o.jsx(H1,{blocklet:s,store:C,componentDid:y,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===X.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Te,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:r.blockletDescription||"",onChange:L=>{a({blockletDescription:""}),c({blockletDescription:L.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(P0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{k()&&b.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[M.map((L,E)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(ge,{className:"action",onClick:()=>{c(B=>{const O=[...B.blockletScreenshots];return O.splice(E,1),{...B,blockletScreenshots:O}})},children:o.jsx(E2,{})})]},L)),M.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{k()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(Ie,{}),children:[o.jsx(p0,{ref:b,popup:!0,onUploadFinish:L=>{c({blockletLogo:L.data.filename}),g(""),b.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:d0,maxFileSize:u0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(p0,{ref:v,popup:!0,onUploadFinish:L=>{c(E=>{var O;const B=E.blockletScreenshots||[];return B.push((O=L.data)==null?void 0:O.filename),{...E,blockletScreenshots:B}}),v.current.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:U,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:d0,maxFileSize:u0,maxNumberOfFiles:5-M.length}}},"uploader-screenshot")]})]})}J0.propTypes={projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired,blocklet:h.object.isRequired,setLoading:h.func.isRequired,initUrl:h.object.isRequired,componentDid:h.isRequired,initLogoUrl:h.string.isRequired,setInitLogoUrl:h.func.isRequired};const Jl=ae.div`
136
+ `,c0="lastWantToConnectStoreId";function Wl(e){var a,u;const[t,l]=R.useState(null),{session:s}=s1(),r=R.useCallback(f=>{l(f),localStorage.setItem(c0,f==null?void 0:f.id)},[l]),c=R.useMemo(()=>{var y,p,d,m;const f=localStorage.getItem(c0),x=f?(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(b=>b.id===f):null;if(x)return x;let g=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(b=>{var v;return!(b.id!==X.BLOCKLET_STORE.id||b.scope&&b.scope!=="studio"&&b.scope!==((v=s==null?void 0:s.user)==null?void 0:v.did))});return g||(g=(m=(d=e==null?void 0:e.settings)==null?void 0:d.storeList)==null?void 0:m[0]),g},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||c||{},r]}const d1={};async function K0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){d1[r]&&clearTimeout(d1[r]),await new Promise(a=>setTimeout(a,s));const c=Date.now(),i=async(a,u)=>{try{const f=await e();a(f)}catch(f){Date.now()-c>l?u(f):r?d1[r]=setTimeout(()=>i(a,u),t):setTimeout(()=>i(a,u),t)}};return new Promise(i)}function Gl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Kl(e,{did:t,projectId:l,messageId:s}){return K0(async()=>{var c;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((c=r==null?void 0:r.project)!=null&&c.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function Xl(e,{did:t,projectId:l,storeId:s}){return K0(async()=>{var i,a;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((a=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!r.project.connectedStores.find(u=>u.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const X0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,a;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let c=e?((a=l==null?void 0:l.settings)==null?void 0:a.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(c)||(c=[]),c=c.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:r,storeList:c}};function H1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:c,componentDid:i}){var L,E,B;const{t:a}=te(),{session:u}=s1(),{api:f,info:x,inService:g}=we(),y=Ve(),[p,d]=R.useState(!1),m=R.useRef(null),[b,v]=R.useState(!1),[C,S]=R.useState(null),N=O=>{l(O),d(!1)},T=()=>{d(!p)},P=O=>{m.current&&m.current.contains(O.target)||d(!1)},I=()=>{v(!0)},U=()=>{v(!1)},V=async()=>{var O;if(C)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((O=y==null?void 0:y.actions)==null?void 0:O.refreshBlocklet())}catch(K){$.error(`Remove Blocklet Store Error: ${Ne(K)}`)}finally{S(null)}},{storeList:M}=X0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:i,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),k=(E=e==null?void 0:e.meta)==null?void 0:E.did;return o.jsxs(o.Fragment,{children:[o.jsxs(h1,{disabled:r,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[c&&o.jsx(Oe,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${t.name||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx($2,{})})]}),o.jsx(R0,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:O})=>o.jsx(C0,{...O,style:{transformOrigin:"center top"},children:o.jsx(b1,{children:o.jsx(y0,{onClickAway:P,children:o.jsxs(z0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[M==null?void 0:M.map(K=>{var J;return o.jsxs(Ae,{selected:K.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>N(K),children:[o.jsxs(z,{children:[o.jsx(be,{sx:{fontSize:"16px"},maxLength:24,children:K.name}),o.jsx(be,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:K.url})]}),B2({store:K,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(ge,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(K)},children:o.jsx(re,{icon:"ic:outline-delete"})})]},K.url)}),o.jsx(j2,{}),o.jsxs(Ae,{onClick:I,children:[o.jsx(j1,{font:!0}),o.jsx(G,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),b&&o.jsx(N0,{hiddenChildren:!0,open:!0,onClose:U,teamDid:k,storeList:M,scope:"studio",onAdd:(B=y==null?void 0:y.actions)==null?void 0:B.refreshBlocklet}),C&&o.jsx(R1,{displayError:!0,title:`${a("common.delete")} ${C.name}`,description:a("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:a("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}H1.propTypes={store:h.object,blocklet:h.object,onChangeStore:h.func.isRequired,onClick:h.func.isRequired,loading:h.bool.isRequired,disabled:h.bool.isRequired,componentDid:h.string.isRequired,projectType:h.string.isRequired,getData:h.func.isRequired};H1.defaultProps={store:null,blocklet:null};const d0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],u0=1024*1024*10,p0=R.lazy(()=>S0(()=>import("./react-ByKj6cfy.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])).then(e=>({default:e.Uploader})));function J0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:c,paramsErrTip:i,setParamsErrTip:a,setLoading:u,initUrl:f,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=te(),{api:d}=we(),m=v1(),b=R.useRef(null),v=R.useRef(null),[C,S]=Wl(s),N=A2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const E=setTimeout(()=>{u(!1)},2e4),B=await Kl(d,L);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${X.UNOWNED_DID}/create`,`${B}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){$.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){$.error(p("blocklet.publish.noStoreSelected"));return}const L=Gl();N(async(E,B)=>{var O,K,J;try{const W=await d.connectByStudio({input:{did:(O=s==null?void 0:s.meta)==null?void 0:O.did,blockletTitle:r==null?void 0:r.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((K=r==null?void 0:r.blockletComponents)==null?void 0:K.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){$.error("failed to connect to store");return}B(W.url),T({did:(J=s==null?void 0:s.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const Z=Ne(W);$.error(Z),u(!1)}})},I=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,U=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,M=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(L=>`${U}/${L}`),k=()=>t?!1:!e||e===X.UNOWNED_DID?($.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Jl,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Te,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:r.blockletTitle||"",onChange:L=>{a({blockletTitle:""}),c({blockletTitle:L.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Te,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===X.UNOWNED_DID&&o.jsx(z1,{position:"end",children:o.jsx(H1,{blocklet:s,store:C,componentDid:y,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===X.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Te,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:r.blockletDescription||"",onChange:L=>{a({blockletDescription:""}),c({blockletDescription:L.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(P0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{k()&&b.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[M.map((L,E)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(ge,{className:"action",onClick:()=>{c(B=>{const O=[...B.blockletScreenshots];return O.splice(E,1),{...B,blockletScreenshots:O}})},children:o.jsx(E2,{})})]},L)),M.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{k()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(Ie,{}),children:[o.jsx(p0,{ref:b,popup:!0,onUploadFinish:L=>{c({blockletLogo:L.data.filename}),g(""),b.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:d0,maxFileSize:u0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(p0,{ref:v,popup:!0,onUploadFinish:L=>{c(E=>{var O;const B=E.blockletScreenshots||[];return B.push((O=L.data)==null?void 0:O.filename),{...E,blockletScreenshots:B}}),v.current.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:U,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:d0,maxFileSize:u0,maxNumberOfFiles:5-M.length}}},"uploader-screenshot")]})]})}J0.propTypes={projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired,blocklet:h.object.isRequired,setLoading:h.func.isRequired,initUrl:h.object.isRequired,componentDid:h.isRequired,initLogoUrl:h.string.isRequired,setInitLogoUrl:h.func.isRequired};const Jl=ae.div`
137
137
  margin-top: 24px;
138
138
  .screenshot {
139
139
  margin-bottom: 16px;
@@ -178,7 +178,7 @@ import{at as d2,j as o,aG as se,cJ as g0,aK as A,fw as X1,aJ as je,aE as $e,aF a
178
178
  padding-bottom: 12px;
179
179
  border-bottom: ${({theme:e})=>`1px solid ${e.palette.divider}`};
180
180
  }
181
- `;function o2({text:e}){return e?o.jsx(G2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[K2,{target:"_blank"}]]}):o.jsx(ze,{Icon:Ge})}o2.propTypes={text:h.string.isRequired};function l2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:c}){var x;const{t:i}=te(),[a,u]=R.useState(c?"preview":"write"),f=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(G,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(L2,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(Z1,{value:"write",label:"Write"}),o.jsx(Z1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Te,{disabled:s||c,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:c,endAdornment:o.jsxs(z1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ye.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{r({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ye.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:a==="preview"?"block":"none",mt:3,children:o.jsx(o2,{text:e.blockletIntroduction||""})})]})}l2.propTypes={params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,readOnly:h.bool.isRequired,loading:h.bool.isRequired};var U1={},r3=ke;Object.defineProperty(U1,"__esModule",{value:!0});var n2=U1.default=void 0,i3=r3(Se()),f0=o;n2=U1.default=(0,i3.default)([(0,f0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,f0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function q1({step:e,ok:t,active:l,error:s}){let r="grey.500",c=e+1;return t&&(c=o.jsx(X2,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",c=o.jsx(n2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:c})}q1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};q1.defaultProps={step:0,ok:!1,active:0,error:""};function s2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:c,paramsErrTip:i,viewMode:a,projectId:u}){const{t:f}=te(),x=()=>{l(d=>d+1)},g=()=>{l(d=>d-1)},y=d=>d===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription):d===2?i==null?void 0:i.blockletResource:d>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=a||Y0({hasSelectedResources:s,params:r,projectId:u,t:f})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(Q2,{activeStep:t,orientation:"vertical",children:e.map((d,m)=>{const b={},v=c||!n3({hasSelectedResources:s,params:r,projectId:u,step:m,t:f}),C=c?"":y(m);return C&&(b.optional=o.jsx(G,{variant:"caption",color:"error",children:C}),b.error=!0),o.jsxs(Y2,{children:[o.jsx(gt,{icon:o.jsx(q1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...b,children:o.jsx(G,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:d.label})}),o.jsxs(yt,{children:[o.jsx(G,{fontSize:12,children:d.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:f("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},d.label)})}),t>=e.length-1&&o.jsx(b1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(G,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}s2.propTypes={steps:h.array.isRequired,activeStep:h.number.isRequired,setActiveStep:h.func.isRequired,params:h.object.isRequired,viewMode:h.string.isRequired,loading:h.bool.isRequired,projectId:h.string.isRequired,hasSelectedResources:h.bool.isRequired,paramsErrTip:h.shape({projectId:h.string,blockletVersion:h.string,blockletTitle:h.string,blockletDescription:h.string,note:h.string,blockletResource:h.string}).isRequired};const a3=[".zip",".gz"],c3=1024*1024*100,d3=R.lazy(()=>S0(()=>import("./react-DJuQ-Z9X.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])).then(e=>({default:e.Uploader})));function W1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:c,error:i}){const{t:a}=te(),u=R.useRef(null),f=()=>l?!1:!t||t===X.UNOWNED_DID?($.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(G,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),o.jsxs(Z2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(G,{component:"a",href:`${x}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;f()&&((g=u.current)==null||g.open())},children:s.uploadedResource?a("common.change"):a("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(Ie,{}),children:o.jsx(d3,{ref:u,popup:!0,onUploadFinish:g=>{var y;r({uploadedResource:g.data.filename}),c({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:a3,maxFileSize:c3,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:i})]})}W1.propTypes={app:h.object.isRequired,projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,error:h.string.isRequired,setParamsErrTip:h.func.isRequired};W1.defaultProps={};function o1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:c}){var a;const{t:i}=te();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Te,{required:!0,disabled:c||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{r({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Te,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:c||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(z1,{position:"end",children:[((a=t==null?void 0:t.note)==null?void 0:a.length)||0," / ",ye.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{r({note:""}),l({note:u.target.value.slice(0,ye.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}o1.propTypes={readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired};o1.defaultProps={};function r2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&r2(e[t]);return e}const u3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},s),value:s})},x0=(e,t)=>{const l=g1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","autoUpload","possibleSameStore","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},p3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},m0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function G1({initUrl:e,...t}){var K1;const{projectId:l,mode:s,releaseId:r,componentDid:c=""}=n1(),{t:i}=te(),{blocklet:a}=Ve(),[u,f]=Pe({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Pe({}),[y,p]=R.useState(!1),[d,m]=Pe(null),{api:b}=we(),v=We(D=>D.breakpoints.down("md")),[C,S]=R.useState({}),[N,T]=R.useState(!1),P=R.useRef({}),[I,U]=Pe({}),[V,M]=R.useState(""),[k,L]=Pe({}),E=e==null?void 0:e.searchParams.get("dependentComponentsMode"),B=E==="readonly",O=R.useMemo(()=>{const D={};return Object.keys(k).forEach(_=>{const Ce=k[_];Ce&&Ce.forEach(c2=>{D[c2]=!0})}),D},[k]),K=R.useCallback(D=>{B&&f({blockletComponents:[]}),L(D)},[B,L,f]),J=R.useCallback((...D)=>{U(...D),g({blockletResource:""})},[]),W=r==="none"?(u==null?void 0:u.lastReleaseId)||"":r,[Z,Me]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const he=R.useMemo(()=>{var D;return(D=u==null?void 0:u.blockletComponents)!=null&&D.some(_=>_.included)||Object.keys(O).length||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource,O]),ce=[],oe=((a==null?void 0:a.children)||[]).filter(D=>{var _;return(_=D.meta.resource)==null?void 0:_.exportApi}).filter(D=>!c||D.meta.did===c);oe.forEach(D=>{u3({tabs:ce,blocklet:D,t:i,ancestors:[a]})});const[ee,ie]=R.useState((K1=ce[0])==null?void 0:K1.value),fe=!N&&(d==null?void 0:d.status)==="published",Q=fe,xe=C2(()=>{if(!e)return;M(e.searchParams.get("logo")),f(_=>{var Ce;return{..._,blockletTitle:(_==null?void 0:_.blockletTitle)||e.searchParams.get("title"),blockletDescription:(_==null?void 0:_.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(_==null?void 0:_.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(Ce=_==null?void 0:_.blockletComponents)!=null&&Ce.length?_==null?void 0:_.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(_==null?void 0:_.note)||e.searchParams.get("note")||"No note"}});const D=e.searchParams.get("resources");try{const _=JSON.parse(D);S(_)}catch{}}),q=async()=>{if(W)try{const D=await b.getRelease({input:{did:a.meta.did,projectId:l,releaseId:W}});if(p(!1),!D.release){$.error("Release not found");return}D.release=r2(D.release),s!=="view"&&(D.release.note=""),f(_=>x0({..._,...D.release,blockletVersion:s==="create"||s==="new-release"?Le.inc(D.release.blockletVersion,"patch"):D.release.blockletVersion},a)),m(D.release)}catch(D){p(!1),$.error(Ne(D))}},le=async()=>{if(l===X.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){$.error(i("blocklet.publish.errorTip.noDid"));return}try{const _=(await b.getProject({input:{did:a.meta.did,projectId:l}})).project||{};_.blockletVersion?(s==="create"||s==="new-release")&&Le.valid(_.blockletVersion)&&(_.blockletVersion=Le.inc(_.blockletVersion,"patch")):_.blockletVersion="1.0.0";const Ce=x0(_,a);f(Ce),_.lastReleaseId||xe()}catch(D){$.error(Ne(D))}},H=R.useCallback(async()=>{p(!0);try{if(s==="view"){if(!W){$.error("Empty release id");return}await le(),await q();return}await le(),W&&(T(!0),await q())}finally{p(!1)}},[s,W]),Ke=D=>{f({blockletComponents:D})};R.useEffect(()=>{H()},[H]),R.useEffect(()=>{l===X.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const _e=R.useMemo(()=>!!Object.keys(I).find(D=>!!I[D].length),[I]);if(!u&&y)return o.jsx(Ie,{});if(!u)return null;const Ee=oe.find(D=>D.meta.did===ee);if(oe.every(D=>D.status!=="running")&&(oe!=null&&oe.length))return o.jsx(ze,{children:i("blocklet.publish.allComponentsNotRunning")});const Xe=D=>{ie(D)},F=e==null?void 0:e.searchParams.get("resourcesTitle"),Y=e==null?void 0:e.searchParams.get("componentsTitle"),de=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:F||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Y||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],a2=de[Z]||de[de.length-1],Re=p3[Z];return o.jsxs(h3,{...t,children:[o.jsx(t2,{blocklet:a,release:d,getData:H,getRelease:q,mode:s,params:u,setParams:f,setParamsErrTip:g,readOnly:Q,isPublished:fe,loading:y,setLoading:p,initLogoUrl:V,releaseId:W,projectId:l,projectType:he,resourceComponents:oe,resourceComponentsMap:k,resourceRelateComponents:O,resourceItem:Ee,saveSelectedEventsRef:P,hasSelectedResources:_e,releaseUsedLast:N,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(s2,{steps:de,loading:y,viewMode:s==="view",params:u,hasSelectedResources:_e||u.uploadedResource,paramsErrTip:x,activeStep:Z,setActiveStep:Me,projectId:l,resourcesUrlTitle:F,componentsUrlTitle:Y}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&Re!=="introduction"&&o.jsxs(G,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[a2.label,Re==="branding"&&o.jsx(ve,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(P2,{})})})]}),(v||Re==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(J0,{projectId:l,setParams:f,setParamsErrTip:g,params:u,componentDid:c,blocklet:a,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Q,initLogoUrl:V,setInitLogoUrl:M})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})}),(v||Re==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(l2,{loading:y,readOnly:Q,params:u,setParams:f,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[m0.resources].label}),o.jsx(z,{display:v||Re==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(et,{onChange:()=>f({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(t0,{size:"small",checked:u.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(t0,{size:"small",checked:!u.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!c&&o.jsx(T2,{tabs:ce,current:ee,onChange:Xe,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(O1,{loading:y,initialResources:C,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:J,setResourceComponentsMap:K,error:x.blockletResource,app:a,readOnly:Q,component:Ee,componentDid:c,initUrl:e,params:u,setParams:f,projectId:l===X.UNOWNED_DID?"":l,releaseUsedLast:N,release:{...d,id:W}})]}),!u.resourceFromSelect&&o.jsx(W1,{app:a,readOnly:Q,projectId:l===X.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:f,setParamsErrTip:g})]})})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[m0.blocklets].label}),(v||Re==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(N1,{projectType:he,disabled:y||Q,app:a,value:(u==null?void 0:u.blockletComponents)||[],onChange:Ke,resourceRelateComponents:O,dependentComponentsMode:E})})})}),!v&&Re==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})})]})]})]})]})}G1.propTypes={initUrl:h.object};G1.defaultProps={initUrl:null};const h3=ae.div`
181
+ `;function o2({text:e}){return e?o.jsx(G2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[K2,{target:"_blank"}]]}):o.jsx(ze,{Icon:Ge})}o2.propTypes={text:h.string.isRequired};function l2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:c}){var x;const{t:i}=te(),[a,u]=R.useState(c?"preview":"write"),f=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(G,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(L2,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(Z1,{value:"write",label:"Write"}),o.jsx(Z1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Te,{disabled:s||c,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:c,endAdornment:o.jsxs(z1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ye.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{r({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ye.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:a==="preview"?"block":"none",mt:3,children:o.jsx(o2,{text:e.blockletIntroduction||""})})]})}l2.propTypes={params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,readOnly:h.bool.isRequired,loading:h.bool.isRequired};var U1={},r3=ke;Object.defineProperty(U1,"__esModule",{value:!0});var n2=U1.default=void 0,i3=r3(Se()),f0=o;n2=U1.default=(0,i3.default)([(0,f0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,f0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function q1({step:e,ok:t,active:l,error:s}){let r="grey.500",c=e+1;return t&&(c=o.jsx(X2,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",c=o.jsx(n2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:c})}q1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};q1.defaultProps={step:0,ok:!1,active:0,error:""};function s2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:c,paramsErrTip:i,viewMode:a,projectId:u}){const{t:f}=te(),x=()=>{l(d=>d+1)},g=()=>{l(d=>d-1)},y=d=>d===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription):d===2?i==null?void 0:i.blockletResource:d>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=a||Y0({hasSelectedResources:s,params:r,projectId:u,t:f})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(Q2,{activeStep:t,orientation:"vertical",children:e.map((d,m)=>{const b={},v=c||!n3({hasSelectedResources:s,params:r,projectId:u,step:m,t:f}),C=c?"":y(m);return C&&(b.optional=o.jsx(G,{variant:"caption",color:"error",children:C}),b.error=!0),o.jsxs(Y2,{children:[o.jsx(gt,{icon:o.jsx(q1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...b,children:o.jsx(G,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:d.label})}),o.jsxs(yt,{children:[o.jsx(G,{fontSize:12,children:d.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:f("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},d.label)})}),t>=e.length-1&&o.jsx(b1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(G,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}s2.propTypes={steps:h.array.isRequired,activeStep:h.number.isRequired,setActiveStep:h.func.isRequired,params:h.object.isRequired,viewMode:h.string.isRequired,loading:h.bool.isRequired,projectId:h.string.isRequired,hasSelectedResources:h.bool.isRequired,paramsErrTip:h.shape({projectId:h.string,blockletVersion:h.string,blockletTitle:h.string,blockletDescription:h.string,note:h.string,blockletResource:h.string}).isRequired};const a3=[".zip",".gz"],c3=1024*1024*100,d3=R.lazy(()=>S0(()=>import("./react-ByKj6cfy.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])).then(e=>({default:e.Uploader})));function W1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:c,error:i}){const{t:a}=te(),u=R.useRef(null),f=()=>l?!1:!t||t===X.UNOWNED_DID?($.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(G,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),o.jsxs(Z2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(G,{component:"a",href:`${x}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;f()&&((g=u.current)==null||g.open())},children:s.uploadedResource?a("common.change"):a("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(Ie,{}),children:o.jsx(d3,{ref:u,popup:!0,onUploadFinish:g=>{var y;r({uploadedResource:g.data.filename}),c({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:a3,maxFileSize:c3,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:i})]})}W1.propTypes={app:h.object.isRequired,projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,error:h.string.isRequired,setParamsErrTip:h.func.isRequired};W1.defaultProps={};function o1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:c}){var a;const{t:i}=te();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Te,{required:!0,disabled:c||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{r({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Te,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:c||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(z1,{position:"end",children:[((a=t==null?void 0:t.note)==null?void 0:a.length)||0," / ",ye.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{r({note:""}),l({note:u.target.value.slice(0,ye.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}o1.propTypes={readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired};o1.defaultProps={};function r2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&r2(e[t]);return e}const u3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},s),value:s})},x0=(e,t)=>{const l=g1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","autoUpload","possibleSameStore","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},p3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},m0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function G1({initUrl:e,...t}){var K1;const{projectId:l,mode:s,releaseId:r,componentDid:c=""}=n1(),{t:i}=te(),{blocklet:a}=Ve(),[u,f]=Pe({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Pe({}),[y,p]=R.useState(!1),[d,m]=Pe(null),{api:b}=we(),v=We(D=>D.breakpoints.down("md")),[C,S]=R.useState({}),[N,T]=R.useState(!1),P=R.useRef({}),[I,U]=Pe({}),[V,M]=R.useState(""),[k,L]=Pe({}),E=e==null?void 0:e.searchParams.get("dependentComponentsMode"),B=E==="readonly",O=R.useMemo(()=>{const D={};return Object.keys(k).forEach(_=>{const Ce=k[_];Ce&&Ce.forEach(c2=>{D[c2]=!0})}),D},[k]),K=R.useCallback(D=>{B&&f({blockletComponents:[]}),L(D)},[B,L,f]),J=R.useCallback((...D)=>{U(...D),g({blockletResource:""})},[]),W=r==="none"?(u==null?void 0:u.lastReleaseId)||"":r,[Z,Me]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const he=R.useMemo(()=>{var D;return(D=u==null?void 0:u.blockletComponents)!=null&&D.some(_=>_.included)||Object.keys(O).length||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource,O]),ce=[],oe=((a==null?void 0:a.children)||[]).filter(D=>{var _;return(_=D.meta.resource)==null?void 0:_.exportApi}).filter(D=>!c||D.meta.did===c);oe.forEach(D=>{u3({tabs:ce,blocklet:D,t:i,ancestors:[a]})});const[ee,ie]=R.useState((K1=ce[0])==null?void 0:K1.value),fe=!N&&(d==null?void 0:d.status)==="published",Q=fe,xe=C2(()=>{if(!e)return;M(e.searchParams.get("logo")),f(_=>{var Ce;return{..._,blockletTitle:(_==null?void 0:_.blockletTitle)||e.searchParams.get("title"),blockletDescription:(_==null?void 0:_.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(_==null?void 0:_.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(Ce=_==null?void 0:_.blockletComponents)!=null&&Ce.length?_==null?void 0:_.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(_==null?void 0:_.note)||e.searchParams.get("note")||"No note"}});const D=e.searchParams.get("resources");try{const _=JSON.parse(D);S(_)}catch{}}),q=async()=>{if(W)try{const D=await b.getRelease({input:{did:a.meta.did,projectId:l,releaseId:W}});if(p(!1),!D.release){$.error("Release not found");return}D.release=r2(D.release),s!=="view"&&(D.release.note=""),f(_=>x0({..._,...D.release,blockletVersion:s==="create"||s==="new-release"?Le.inc(D.release.blockletVersion,"patch"):D.release.blockletVersion},a)),m(D.release)}catch(D){p(!1),$.error(Ne(D))}},le=async()=>{if(l===X.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){$.error(i("blocklet.publish.errorTip.noDid"));return}try{const _=(await b.getProject({input:{did:a.meta.did,projectId:l}})).project||{};_.blockletVersion?(s==="create"||s==="new-release")&&Le.valid(_.blockletVersion)&&(_.blockletVersion=Le.inc(_.blockletVersion,"patch")):_.blockletVersion="1.0.0";const Ce=x0(_,a);f(Ce),_.lastReleaseId||xe()}catch(D){$.error(Ne(D))}},H=R.useCallback(async()=>{p(!0);try{if(s==="view"){if(!W){$.error("Empty release id");return}await le(),await q();return}await le(),W&&(T(!0),await q())}finally{p(!1)}},[s,W]),Ke=D=>{f({blockletComponents:D})};R.useEffect(()=>{H()},[H]),R.useEffect(()=>{l===X.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const _e=R.useMemo(()=>!!Object.keys(I).find(D=>!!I[D].length),[I]);if(!u&&y)return o.jsx(Ie,{});if(!u)return null;const Ee=oe.find(D=>D.meta.did===ee);if(oe.every(D=>D.status!=="running")&&(oe!=null&&oe.length))return o.jsx(ze,{children:i("blocklet.publish.allComponentsNotRunning")});const Xe=D=>{ie(D)},F=e==null?void 0:e.searchParams.get("resourcesTitle"),Y=e==null?void 0:e.searchParams.get("componentsTitle"),de=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:F||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Y||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],a2=de[Z]||de[de.length-1],Re=p3[Z];return o.jsxs(h3,{...t,children:[o.jsx(t2,{blocklet:a,release:d,getData:H,getRelease:q,mode:s,params:u,setParams:f,setParamsErrTip:g,readOnly:Q,isPublished:fe,loading:y,setLoading:p,initLogoUrl:V,releaseId:W,projectId:l,projectType:he,resourceComponents:oe,resourceComponentsMap:k,resourceRelateComponents:O,resourceItem:Ee,saveSelectedEventsRef:P,hasSelectedResources:_e,releaseUsedLast:N,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(s2,{steps:de,loading:y,viewMode:s==="view",params:u,hasSelectedResources:_e||u.uploadedResource,paramsErrTip:x,activeStep:Z,setActiveStep:Me,projectId:l,resourcesUrlTitle:F,componentsUrlTitle:Y}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&Re!=="introduction"&&o.jsxs(G,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[a2.label,Re==="branding"&&o.jsx(ve,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(P2,{})})})]}),(v||Re==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(J0,{projectId:l,setParams:f,setParamsErrTip:g,params:u,componentDid:c,blocklet:a,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Q,initLogoUrl:V,setInitLogoUrl:M})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})}),(v||Re==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(l2,{loading:y,readOnly:Q,params:u,setParams:f,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[m0.resources].label}),o.jsx(z,{display:v||Re==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(et,{onChange:()=>f({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(t0,{size:"small",checked:u.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(t0,{size:"small",checked:!u.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!c&&o.jsx(T2,{tabs:ce,current:ee,onChange:Xe,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(O1,{loading:y,initialResources:C,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:J,setResourceComponentsMap:K,error:x.blockletResource,app:a,readOnly:Q,component:Ee,componentDid:c,initUrl:e,params:u,setParams:f,projectId:l===X.UNOWNED_DID?"":l,releaseUsedLast:N,release:{...d,id:W}})]}),!u.resourceFromSelect&&o.jsx(W1,{app:a,readOnly:Q,projectId:l===X.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:f,setParamsErrTip:g})]})})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[m0.blocklets].label}),(v||Re==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(N1,{projectType:he,disabled:y||Q,app:a,value:(u==null?void 0:u.blockletComponents)||[],onChange:Ke,resourceRelateComponents:O,dependentComponentsMode:E})})})}),!v&&Re==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})})]})]})]})]})}G1.propTypes={initUrl:h.object};G1.defaultProps={initUrl:null};const h3=ae.div`
182
182
  .section {
183
183
  &.full-width {
184
184
  max-width: 100%;
@@ -1 +1 @@
1
- import{d as A,v as R,p as w,e as p}from"./index-BbBRjIRQ.js";const O=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,x=/^[a-zA-Z]:\\/;function N(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return x.test(e)?!1:O.test(e)}const _=["http","https"],z=["nofollow"],L={};function T(e){const r=e||L,g=r.protocols||_,u=A(r.test);return function(h){R(h,"element",function(t,y,E){if(t.tagName==="a"&&typeof t.properties.href=="string"&&u(t,y,E)){const o=t.properties.href;if(N(o)?g.includes(o.slice(0,o.indexOf(":"))):o.startsWith("//")){const n=s(r.content,t),c=n&&!Array.isArray(n)?[n]:n,i=s(r.rel,t)||z,a=typeof i=="string"?w(i):i,f=s(r.target,t),l=s(r.properties,t);if(l&&Object.assign(t.properties,p(l)),a.length>0&&(t.properties.rel=[...a]),f&&(t.properties.target=f),c){const m=s(r.contentProperties,t)||{};t.children.push({type:"element",tagName:"span",properties:p(m),children:p(c)})}}}})}}function s(e,r){return typeof e=="function"?e(r):e}export{T as r};
1
+ import{d as A,v as R,p as w,e as p}from"./index-CInwQHvl.js";const O=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,x=/^[a-zA-Z]:\\/;function N(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return x.test(e)?!1:O.test(e)}const _=["http","https"],z=["nofollow"],L={};function T(e){const r=e||L,g=r.protocols||_,u=A(r.test);return function(h){R(h,"element",function(t,y,E){if(t.tagName==="a"&&typeof t.properties.href=="string"&&u(t,y,E)){const o=t.properties.href;if(N(o)?g.includes(o.slice(0,o.indexOf(":"))):o.startsWith("//")){const n=s(r.content,t),c=n&&!Array.isArray(n)?[n]:n,i=s(r.rel,t)||z,a=typeof i=="string"?w(i):i,f=s(r.target,t),l=s(r.properties,t);if(l&&Object.assign(t.properties,p(l)),a.length>0&&(t.properties.rel=[...a]),f&&(t.properties.target=f),c){const m=s(r.contentProperties,t)||{};t.children.push({type:"element",tagName:"span",properties:p(m),children:p(c)})}}}})}}function s(e,r){return typeof e=="function"?e(r):e}export{T as r};