@abtnode/blocklet-services 1.16.32-beta-04a5da00 → 1.16.32-beta-4d47ae7f

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 (212) hide show
  1. package/api/services/auth/connect/receive-transfer-app-owner.js +8 -5
  2. package/dist/assets/{Add-2VoKTpUb.js → Add-D8_0U-mi.js} +1 -1
  3. package/dist/assets/{AddBox-Dl7mso27.js → AddBox-BpwHbwbG.js} +1 -1
  4. package/dist/assets/{Alert-DPUEB95E.js → Alert-Dlco0B3L.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-0yDa2aHH.js → ArrowDropDown-exkF-BIK.js} +1 -1
  6. package/dist/assets/{Avatar-Cw952dlh.js → Avatar-B1SFM1MR.js} +1 -1
  7. package/dist/assets/{ButtonGroup-d0oDm0RO.js → ButtonGroup-CTrZ2Hyv.js} +1 -1
  8. package/dist/assets/{CheckCircle-CyZ2-BIj.js → CheckCircle-BNxyw6NJ.js} +1 -1
  9. package/dist/assets/{ChevronRight-DDyzifk9.js → ChevronRight-DBpo88DV.js} +1 -1
  10. package/dist/assets/{Close-BkBXMJo_.js → Close-DgxsFA7q.js} +1 -1
  11. package/dist/assets/{CloseOutlined-DmlGPmzq.js → CloseOutlined-CN4iKY7n.js} +1 -1
  12. package/dist/assets/{Delete-B2wSgiTE.js → Delete-BaSq9RZZ.js} +1 -1
  13. package/dist/assets/{DeleteOutline-BMqkCxEq.js → DeleteOutline-Du2BPdlg.js} +1 -1
  14. package/dist/assets/{Done-ZAZhEq2L.js → Done-BG-Fw8ts.js} +1 -1
  15. package/dist/assets/{Download-1xH6mRbf.js → Download-C1y29u9K.js} +1 -1
  16. package/dist/assets/{Edit-MvOKdBEJ.js → Edit-u2-N8rQN.js} +1 -1
  17. package/dist/assets/{EditIcon-B68lRQt1.js → EditIcon-B2Y7T-CN.js} +1 -1
  18. package/dist/assets/{Error-xmdfCNYq.js → Error-B1K0WhCp.js} +1 -1
  19. package/dist/assets/{ExpandMore-DkoxrM3F.js → ExpandMore-DBQIHjkB.js} +1 -1
  20. package/dist/assets/{FilterList-DbTqBTrF.js → FilterList-DumRQ8ls.js} +4 -4
  21. package/dist/assets/{FormControl-BUn4wQGt.js → FormControl-CeSJJZgZ.js} +1 -1
  22. package/dist/assets/{FormControlLabel-Cn1ZEQIw.js → FormControlLabel-CpH9LTeH.js} +1 -1
  23. package/dist/assets/{FormGroup-BDqHH6R7.js → FormGroup-B0Xdxgiy.js} +1 -1
  24. package/dist/assets/{Google-DwKupHqA.js → Google-CvB2nYH_.js} +1 -1
  25. package/dist/assets/Hidden-DJwWGZh0.js +1 -0
  26. package/dist/assets/{InfoOutlined-CgNZyv9N.js → InfoOutlined-BIY-Lnxg.js} +1 -1
  27. package/dist/assets/{InputAdornment-DKErxOxA.js → InputAdornment-VVruavKc.js} +1 -1
  28. package/dist/assets/{InputLabel-BU0FzAth.js → InputLabel-3M9sMlBq.js} +1 -1
  29. package/dist/assets/{LastPage-BRQIhdX7.js → LastPage-CBInTPpp.js} +1 -1
  30. package/dist/assets/{Launch-DZvL7Btt.js → Launch-Dhq-grBI.js} +1 -1
  31. package/dist/assets/{LaunchOutlined-BEo8P2Tl.js → LaunchOutlined-DnkKRXxH.js} +1 -1
  32. package/dist/assets/{Link-CPGMRK--.js → Link-Cpnh7s1v.js} +1 -1
  33. package/dist/assets/{ListItemText-D00e-P7J.js → ListItemText-CHjUage1.js} +1 -1
  34. package/dist/assets/{LoadingButton-Dnokttyl.js → LoadingButton-C47nsxMx.js} +1 -1
  35. package/dist/assets/{LockIcon-lwFTQyw5.js → LockIcon-CoUaWmH-.js} +1 -1
  36. package/dist/assets/{Loop-UQ-nGsCg.js → Loop-CbcENVkw.js} +1 -1
  37. package/dist/assets/{MoreHoriz-ClHVZaho.js → MoreHoriz-B4gnOmnB.js} +1 -1
  38. package/dist/assets/{MoreVert-D7siuKO-.js → MoreVert-CBWkVJTE.js} +1 -1
  39. package/dist/assets/{OpenInNew-Dn1FcPSH.js → OpenInNew-svkkbJCn.js} +1 -1
  40. package/dist/assets/{Pagination-EqcGDqMl.js → Pagination-BBwBFjSJ.js} +1 -1
  41. package/dist/assets/{PlayArrow-CnWuAQ7W.js → PlayArrow-D-mvqfoj.js} +1 -1
  42. package/dist/assets/{QuestionMarkCircle-B7Bpx0cE.js → QuestionMarkCircle-Duxt-AlB.js} +1 -1
  43. package/dist/assets/{RadioGroup-Bu2zmWw_.js → RadioGroup-C4DI71vM.js} +1 -1
  44. package/dist/assets/{Search-CQlVySI6.js → Search-BOxcXluh.js} +1 -1
  45. package/dist/assets/{Select-BzfN1x8W.js → Select-drnrjZt8.js} +1 -1
  46. package/dist/assets/{ServerLogo-DfCDjLNl.js → ServerLogo-CxVp5JLf.js} +1 -1
  47. package/dist/assets/{Skeleton-DqrgKJha.js → Skeleton-YurB3EC5.js} +1 -1
  48. package/dist/assets/{Slider-BtNkKS5B.js → Slider-BX1l_Lvj.js} +1 -1
  49. package/dist/assets/{Stepper-xGvqwz44.js → Stepper-UV_DHoEg.js} +1 -1
  50. package/dist/assets/{TextField-OgHHL_KP.js → TextField-D_Jtjg13.js} +1 -1
  51. package/dist/assets/{Toolbar-IW4D_zYa.js → Toolbar-D7_EWzTj.js} +1 -1
  52. package/dist/assets/{ViewList-BFQT-hmR.js → ViewList-Bwkry3LO.js} +1 -1
  53. package/dist/assets/access-control-YUBGali8.js +13 -0
  54. package/dist/assets/actions-5mXSkQB4.js +1 -0
  55. package/dist/assets/{add-component-core-BPcx3JYq.js → add-component-core-DFH5qH7x.js} +1 -1
  56. package/dist/assets/add-resource-BJ9u32jP.js +1 -0
  57. package/dist/assets/addon-CUxwPHa_.js +31 -0
  58. package/dist/assets/{analytics-C434vWOY.js → analytics-B29460Yu.js} +1 -1
  59. package/dist/assets/api-DbvHYaVa.js +1 -0
  60. package/dist/assets/audit-logs-C1AOwGce.js +58 -0
  61. package/dist/assets/{button-CR8UEQyZ.js → button-BqgSoT0h.js} +1 -1
  62. package/dist/assets/{click-to-copy-3x1G9XH4.js → click-to-copy-CM2U6JEg.js} +1 -1
  63. package/dist/assets/{complete-k3Qs8bm-.js → complete-DaiPBjLS.js} +4 -4
  64. package/dist/assets/{component-D-I8mVct.js → component-npmbPVSM.js} +1 -1
  65. package/dist/assets/{config-D3UgjDma.js → config-BygYwcXq.js} +1 -1
  66. package/dist/assets/{config-D5HYWnF4.js → config-CxG4Kz4G.js} +2 -2
  67. package/dist/assets/{config-navigation-CpN5oPZv.js → config-navigation-Rsc7sQGs.js} +1 -1
  68. package/dist/assets/confirm-3b8GTIgU.js +7 -0
  69. package/dist/assets/{connect-D07YGJkK.js → connect-26mFy5d9.js} +1 -1
  70. package/dist/assets/connect-B87FT6ev.js +5 -0
  71. package/dist/assets/connect-to-B0Td9yUD.js +54 -0
  72. package/dist/assets/{content-layout-DPij9Nh6.js → content-layout-B7X0Mv3n.js} +1 -1
  73. package/dist/assets/{dashboard-BeSQUyuf.js → dashboard-BrV_SESr.js} +8 -8
  74. package/dist/assets/{did-address-43xkXM21.js → did-address-BWnma-3-.js} +1 -1
  75. package/dist/assets/domain-CkCbH8sj.js +9 -0
  76. package/dist/assets/domain-list-wgNQeEgv.js +15 -0
  77. package/dist/assets/{exchange-passport--fiEF2lu.js → exchange-passport-BZ8Q-G3h.js} +1 -1
  78. package/dist/assets/{fallback-Cn_W-m4r.js → fallback-C5E1lZAR.js} +1 -1
  79. package/dist/assets/{format-error-Bn7NObKb.js → format-error-BVI56bJg.js} +1 -1
  80. package/dist/assets/fuel-XF4sXoDA.js +32 -0
  81. package/dist/assets/fullpage-BOyZgu9A.js +1 -0
  82. package/dist/assets/{home-C1E0r4u0.js → home-Dajv5NTd.js} +1 -1
  83. package/dist/assets/{iframe-EFuUBe3_.js → iframe-CmugPIuF.js} +1 -1
  84. package/dist/assets/{index-BnsMQNE7.js → index-2xySyQ5i.js} +2 -2
  85. package/dist/assets/{index-CKp5dXwW.js → index-B0NvcpjT.js} +1 -1
  86. package/dist/assets/index-B7Un-ZeO.js +68 -0
  87. package/dist/assets/{index-Bdey46ix.js → index-BK4259Qj.js} +1 -1
  88. package/dist/assets/index-BP53WpUP.js +4 -0
  89. package/dist/assets/{index-Cb0PVWPM.js → index-BRJLJSjg.js} +2 -2
  90. package/dist/assets/{index-CosdjVLd.js → index-BiafpQ0u.js} +16 -16
  91. package/dist/assets/index-BisUmH-h.js +1 -0
  92. package/dist/assets/index-BrcKk7u6.js +1 -0
  93. package/dist/assets/{index-QiNYWFY0.js → index-BtQK2llU.js} +1 -1
  94. package/dist/assets/{index-cz02fWRO.js → index-BtQOF6n3.js} +1 -1
  95. package/dist/assets/{index-DFjXeol_.js → index-BvZ1bsPZ.js} +1 -1
  96. package/dist/assets/{index-BtPZTcXb.js → index-C0qYe9TG.js} +1 -1
  97. package/dist/assets/{index-Dg03Eob-.js → index-C1Puqx4M.js} +1 -1
  98. package/dist/assets/{index-DesPWyQa.js → index-C2sin8wt.js} +1 -1
  99. package/dist/assets/{index-xkcMt7XQ.js → index-CFmNTsQh.js} +1 -1
  100. package/dist/assets/{index-s7iKiLXT.js → index-CLQi4cVY.js} +6 -6
  101. package/dist/assets/{index-CjW-BiBJ.js → index-CTFB4nHV.js} +1 -1
  102. package/dist/assets/{index-oDZbyv4v.js → index-Ca5y7O4k.js} +4 -4
  103. package/dist/assets/{index-BJtcCGWr.js → index-Cixwi4BX.js} +1 -1
  104. package/dist/assets/index-CrurRDDC.js +1 -0
  105. package/dist/assets/{index-C0SGixzY.js → index-D0ZBFe_v.js} +9 -9
  106. package/dist/assets/{index-UGGSjH4u.js → index-D5lkEFWM.js} +1 -1
  107. package/dist/assets/{index-CvPYqGkG.js → index-DCkU-F0r.js} +1 -1
  108. package/dist/assets/{index-BLVcicxZ.js → index-DHNVLiI8.js} +1 -1
  109. package/dist/assets/{index-CTfT52DI.js → index-DPyKucXe.js} +1 -1
  110. package/dist/assets/{index-BCp3frMn.js → index-Dcphtm5y.js} +1 -1
  111. package/dist/assets/{index-DIxJxM78.js → index-DfZjT3WA.js} +2 -2
  112. package/dist/assets/{index-BZUzIWGh.js → index-TlMkikTm.js} +1 -1
  113. package/dist/assets/{index-D5vX4Ooa.js → index-UKHQeYs5.js} +1 -1
  114. package/dist/assets/{index-DwqzQo9e.js → index-hv_yaUi2.js} +5 -5
  115. package/dist/assets/{index-Cvw6NSyS.js → index-p81jbN_h.js} +1 -1
  116. package/dist/assets/{index.es-DohPHCUD.js → index.es-w-0rtBPs.js} +1 -1
  117. package/dist/assets/{index.esm-Beu0fK3G.js → index.esm-CptJw3C8.js} +1 -1
  118. package/dist/assets/{invitation-c2LXgJZO.js → invitation-KAlNPJe6.js} +2 -2
  119. package/dist/assets/invite-C_RF0Rm2.js +10 -0
  120. package/dist/assets/{issue-passport-CCZaXyql.js → issue-passport-DM7CKvcB.js} +1 -1
  121. package/dist/assets/{item-CBjm7rgp.js → item-DIkrlQMP.js} +1 -1
  122. package/dist/assets/{jss-plugin-props-sort.esm-D6EO5AkF.js → jss-plugin-props-sort.esm-BzROyw1n.js} +1 -1
  123. package/dist/assets/{launch-result-message-DAGuAhAQ.js → launch-result-message-CIfX9Pg1.js} +1 -1
  124. package/dist/assets/{layout-oG70Renu.js → layout-Bb2LZLxa.js} +2 -2
  125. package/dist/assets/list-header-BDhQIu5L.js +57 -0
  126. package/dist/assets/localization-V0WRiXKC.js +1 -0
  127. package/dist/assets/{log-BmIrjtPp.js → log-o0iKO5dx.js} +1 -1
  128. package/dist/assets/{login-juMWHvtW.js → login-B9UvusG-.js} +1 -1
  129. package/dist/assets/{login-oauth-callback-_A65YhiH.js → login-oauth-callback-cZ3oa4a_.js} +1 -1
  130. package/dist/assets/{logo-uploader-P1VlMV5V.js → logo-uploader-D4yqBa_O.js} +3 -3
  131. package/dist/assets/{lost-passport-BkiX_vW7.js → lost-passport-soFqeEb7.js} +4 -4
  132. package/dist/assets/{lottie-Cf2K1-ns.js → lottie-DsjCdNh-.js} +1 -1
  133. package/dist/assets/notifications-B9Mu8Fxb.js +62 -0
  134. package/dist/assets/{open-window-DvlHyaGG.js → open-window-B5RcEIrm.js} +1 -1
  135. package/dist/assets/overview-CFbnZdV0.js +12 -0
  136. package/dist/assets/page-header-BvuGyCDw.js +31 -0
  137. package/dist/assets/{permission-DaB1xF5g.js → permission-BuA9Zt4q.js} +1 -1
  138. package/dist/assets/{preferences-Td5o-d6-.js → preferences-BzcjmMUC.js} +1 -1
  139. package/dist/assets/publish-resource-DwhFCZXw.js +1 -0
  140. package/dist/assets/{react-CwZHH_b9.js → react-CwUjkFxY.js} +3 -3
  141. package/dist/assets/{redux-uiwtTAq3.js → redux-BDPBPXLM.js} +1 -1
  142. package/dist/assets/{resource-dialog-D8uC-XQU.js → resource-dialog-BBzXGjTp.js} +1 -1
  143. package/dist/assets/sdk-CI7TJ_xu.js +1 -0
  144. package/dist/assets/selector-DktPytoX.js +48 -0
  145. package/dist/assets/session-Cw-dytKR.js +1 -0
  146. package/dist/assets/setup-DRfpHXNv.js +19 -0
  147. package/dist/assets/{shorten-label-DHOOsTvW.js → shorten-label-3owfLRzi.js} +1 -1
  148. package/dist/assets/{slicedToArray-shTeAcQc.js → slicedToArray-CQG0j1sa.js} +1 -1
  149. package/dist/assets/{spaces-BirpDOm3.js → spaces-DDj9ynWl.js} +1 -1
  150. package/dist/assets/start-DCKDZC67.js +187 -0
  151. package/dist/assets/step-actions-CoJc8417.js +31 -0
  152. package/dist/assets/studio-B_0UB40R.js +6 -0
  153. package/dist/assets/switch-control-Bun_5Zkk.js +13 -0
  154. package/dist/assets/{toUpper-BAGcwHI1.js → toUpper-Bf_TQKK7.js} +1 -1
  155. package/dist/assets/transfer-C7Cxyvnx.js +16 -0
  156. package/dist/assets/{uniqBy-C2dKepDX.js → uniqBy-BqI7ffNX.js} +1 -1
  157. package/dist/assets/{unsubscribe-CLOTSJNJ.js → unsubscribe-B-iaO9gM.js} +1 -1
  158. package/dist/assets/{url-join-CTlMVeSl.js → url-join-BoNn2Qh7.js} +1 -1
  159. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-BniHEOwv.js → use-blocklet-info-for-connect-did-spaces-CfK0RcTD.js} +1 -1
  160. package/dist/assets/use-mobile-C19pzcVe.js +1 -0
  161. package/dist/assets/{useAsync-C-N7xB1Q.js → useAsync-Ca_M5Jhn.js} +1 -1
  162. package/dist/assets/{useFormControl-DqoBF9iH.js → useFormControl-Cs3LGXJe.js} +1 -1
  163. package/dist/assets/{useLocalStorage-kWCrVKjB.js → useLocalStorage-3-rj5S6B.js} +1 -1
  164. package/dist/assets/{useSetState-B68uVZku.js → useSetState-BTR-3GfC.js} +1 -1
  165. package/dist/assets/{useSlot-CQP4hUUG.js → useSlot-C1f6ZTLt.js} +1 -1
  166. package/dist/assets/{useSlotProps-DMBoZT8C.js → useSlotProps-CCXsWmb3.js} +1 -1
  167. package/dist/assets/{useThemeProps-V4iYGCCr.js → useThemeProps-BjkDmxHT.js} +1 -1
  168. package/dist/assets/user-center-BN2FDsvO.js +1 -0
  169. package/dist/assets/user-sessions-BIEmgTqD.js +1 -0
  170. package/dist/assets/{util-D_sPE-Qe.js → util-DBNeRhAr.js} +1 -1
  171. package/dist/assets/{wrap-locale-BrsNecIZ.js → wrap-locale-D7L9anic.js} +1 -1
  172. package/dist/index.html +1 -1
  173. package/dist/service-worker.js +1 -1
  174. package/package.json +18 -18
  175. package/dist/assets/Hidden-w-nWLLe2.js +0 -1
  176. package/dist/assets/access-control-2b9mvnB3.js +0 -13
  177. package/dist/assets/actions-DaKlRJnV.js +0 -1
  178. package/dist/assets/add-resource-2dxnZcDy.js +0 -1
  179. package/dist/assets/addon-CSAbVfSS.js +0 -31
  180. package/dist/assets/api-_ltIr2BU.js +0 -1
  181. package/dist/assets/audit-logs-CZte5uoR.js +0 -58
  182. package/dist/assets/confirm-CtLbKcS0.js +0 -7
  183. package/dist/assets/connect-B7XAaWGG.js +0 -5
  184. package/dist/assets/connect-to-COqWAMKF.js +0 -54
  185. package/dist/assets/domain-4Nq3hHWj.js +0 -9
  186. package/dist/assets/domain-list-M6G-dRKq.js +0 -15
  187. package/dist/assets/fuel-Df5fciLt.js +0 -32
  188. package/dist/assets/fullpage-DTRlawT9.js +0 -1
  189. package/dist/assets/index-98pN37bN.js +0 -4
  190. package/dist/assets/index-B29G6Shi.js +0 -1
  191. package/dist/assets/index-BrwvkAJ2.js +0 -68
  192. package/dist/assets/index-Bup-bUaa.js +0 -1
  193. package/dist/assets/index-D9l4FLNE.js +0 -1
  194. package/dist/assets/invite-um-OhXL2.js +0 -10
  195. package/dist/assets/list-header-DfX9T1rW.js +0 -57
  196. package/dist/assets/localization-C8kIKwrb.js +0 -1
  197. package/dist/assets/notifications-DwrtVs17.js +0 -62
  198. package/dist/assets/overview-BIRtop8p.js +0 -12
  199. package/dist/assets/page-header-CNwTM6gh.js +0 -31
  200. package/dist/assets/publish-resource-WQmyUOcm.js +0 -1
  201. package/dist/assets/sdk-ByGrtgOC.js +0 -1
  202. package/dist/assets/selector-CLP7imhL.js +0 -48
  203. package/dist/assets/session-BmQaZaGU.js +0 -1
  204. package/dist/assets/setup-WlrDU92w.js +0 -19
  205. package/dist/assets/start-pnT_BQvG.js +0 -187
  206. package/dist/assets/step-actions-Dj3cCBJ3.js +0 -31
  207. package/dist/assets/studio-D3LuzSrd.js +0 -6
  208. package/dist/assets/switch-control-dGBNspU7.js +0 -13
  209. package/dist/assets/transfer-BPGSieyR.js +0 -16
  210. package/dist/assets/use-mobile-coO1LYtd.js +0 -1
  211. package/dist/assets/user-center-B6VeBSYd.js +0 -1
  212. package/dist/assets/user-sessions-Bdav9S_E.js +0 -1
@@ -0,0 +1,68 @@
1
+ import{cs as J,aZ as N,r as x,aQ as P,bX as ve,t as v,a9 as K,u as O,j as e,P as f,eY as Ke,c4 as le,c as V,fl as Ve,T as y,B as j,K as de,at as Ge,a1 as te,n as Z,Z as ke,a0 as Xe,gG as We,X as ne,Y as oe,aU as _,fk as Ye,aD as qe,aS as _e,$ as $e,O as et,b_ as tt,cx as st,G as M,bh as q,a as nt,gH as ot,C as at,bH as it}from"./index-DfZjT3WA.js";import{S as ye}from"./index-BtQK2llU.js";import"./api-DbvHYaVa.js";import{u as Ie,P as rt}from"./use-blocklet-info-for-connect-did-spaces-CfK0RcTD.js";import{b as ct,h as lt,d as se,e as Se,f as dt,i as Ae,j as pt,k as ut,l as Ce,c as ht}from"./spaces-DDj9ynWl.js";import{f as G,D as mt}from"./format-error-BVI56bJg.js";import{T as ft}from"./TextField-D_Jtjg13.js";import{A as xt}from"./Alert-Dlco0B3L.js";import{I as gt}from"./index-C2sin8wt.js";import{W as jt}from"./did-address-BWnma-3-.js";import{S as De}from"./switch-control-Bun_5Zkk.js";import{d as yt}from"./MoreHoriz-B4gnOmnB.js";import{d as St}from"./DeleteOutline-Du2BPdlg.js";import{L as $,a as ee}from"./ListItemText-CHjUage1.js";import{e as At}from"./mode-B2dWMeTO.js";import{T as ce}from"./index-DCkU-F0r.js";import{D as Ct}from"./index-C1Puqx4M.js";import{L as Bt}from"./Link-Cpnh7s1v.js";import{G as Be}from"./redux-BDPBPXLM.js";import"./ExpandMore-DBQIHjkB.js";import"./ButtonGroup-CTrZ2Hyv.js";import"./CloseOutlined-CN4iKY7n.js";import"./index-CFmNTsQh.js";import"./FormControl-CeSJJZgZ.js";import"./useFormControl-Cs3LGXJe.js";import"./InputLabel-3M9sMlBq.js";import"./Select-drnrjZt8.js";import"./useSlot-C1f6ZTLt.js";import"./index-DPyKucXe.js";import"./FormControlLabel-CpH9LTeH.js";import"./FilterList-DumRQ8ls.js";import"./useThemeProps-BjkDmxHT.js";import"./toPropertyKey-PLuKRk1e.js";import"./FormGroup-B0Xdxgiy.js";import"./index-CrurRDDC.js";import"./LastPage-CBInTPpp.js";import"./Toolbar-D7_EWzTj.js";import"./index-BtQOF6n3.js";import"./Search-BOxcXluh.js";import"./Delete-BaSq9RZZ.js";import"./index-DHNVLiI8.js";import"./MoreVert-CBWkVJTE.js";async function vt({blockletDid:t,nodeApi:s,spaceGateways:a}){let n=!1;const l=await Promise.all(a.map(async c=>{let{name:o}=c;const r=await ct(c.endpoint);return!J.isEmpty(r)&&r!==o&&(o=r,n=!0),{...c,name:o}}));return n&&await Promise.all(l.filter(c=>c.did).map(c=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:c.did},spaceGateway:{...c}}}))),l}function kt({setLoading:t,refresh:s}={}){var r;const{blocklet:a}=N(),n=(r=a==null?void 0:a.meta)==null?void 0:r.did,[l,c]=x.useState([]),{api:o}=P();return ve(async()=>{try{if(!n){c([]);return}t==null||t(!0);const{spaceGateways:d}=await o.getBlockletSpaceGateways({input:{did:n}}),p=await vt({blockletDid:n,nodeApi:o,spaceGateways:d});c(p??[])}catch(d){console.error(d),v.error(G(d))}finally{t==null||t(!1)}},[n,s]),{spaceGateways:l}}function Ee({deps:t,setLoading:s}={deps:[],setLoading:()=>{}}){var r;const{blocklet:a}=N(),[n,l]=x.useState([]),{api:c}=P(),o=J.debounce(async()=>{try{if(s(!0),!a){l([]);return}const{backups:d}=await c.getBlockletBackups({input:{did:a.meta.did}});l(d??[])}catch(d){console.error(d),v.error(G(d))}finally{s(!1)}},2e3);return ve(async()=>{o()},[(r=a==null?void 0:a.meta)==null?void 0:r.did].concat(t)),{backups:n}}function It({appDid:t}){const{backups:s}=Ee(),[a,n]=x.useState({message:"",progress:0,completed:!1}),l=P(),{ws:{useSubscription:c}}=l;return c(K.BlockletEvents.backupProgress,o=>{t===(o==null?void 0:o.appDid)&&n(()=>({...o}))},[t]),x.useEffect(()=>{var o;if(s!=null&&s.length&&J.isNull((o=s[0])==null?void 0:o.status)){const[r]=s;n(()=>({message:r.message,progress:r.progress,completed:r.progress>=100}))}},[s]),a}const Ue=x.createContext({}),{Provider:Dt,Consumer:Rs}=Ue;function pe({children:t}){var C;const{t:s}=O(),{api:a}=P(),{blocklet:n}=N(),[l,c]=x.useState(!1),[o,r]=x.useState(!1),{spaceGateways:d}=kt({refresh:o,setLoading:c}),p=It({appDid:n==null?void 0:n.appDid}),[m,D]=x.useState(!1),S=x.useMemo(()=>lt(n==null?void 0:n.environments),[n,o,m]),[g,A]=x.useState(!1),{backups:k}=Ee({deps:[p],setLoading:A}),[H,I]=x.useState(d==null?void 0:d.find(i=>i.endpoint===S)),E=(C=n==null?void 0:n.settings)==null?void 0:C.autoBackup,u=()=>{r(i=>!i)},F=()=>{D(i=>!i)},U=async i=>{await a.updateAutoBackup({input:{did:n.meta.did,autoBackup:i}})},R=async(i,b)=>{d.push({...i,loading:!0}),await a.addBlockletSpaceGateway({input:{did:n.meta.did,spaceGateway:i}}),S!==b&&await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:b}]}}),u(),I(i)},B=async i=>{i&&(i.endpoint===S&&(await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),E!=null&&E.enabled&&await U({enabled:!1})),await a.deleteBlockletSpaceGateway({input:{did:n.meta.did,spaceGatewayDid:i==null?void 0:i.did}}),u(),I(i))},T=async i=>{await a.updateBlockletSpaceGateway({input:{did:n.meta.did,where:{did:i.did},spaceGateway:i}}),S!==i.endpoint&&await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:i.endpoint}]}}),v.success(s("storage.spaces.connectedWithName",{name:(i==null?void 0:i.name)??"DID Spaces"})),u()},h=i=>(i==null?void 0:i.endpoint)===S;return e.jsx(Dt,{value:{spaceGateways:d,selectedSpaceGateway:H,addSpaceGateway:R,deleteSpaceGateway:B,updateSpaceGateway:T,refreshSpaceGateways:u,spaceGatewaysLoading:l,spaceGatewayIsSelected:h,updateAutoBackup:U,backupEndpoint:S,backupProgress:p,backups:k,backupsLoading:g,refreshBackupEndpoint:F,autoBackup:E},children:t})}pe.propTypes={children:f.any.isRequired};pe.defaultProps={};function Q(){return x.useContext(Ue)}function ae({...t}){const{blocklet:s}=N(),{info:a}=P(),{t:n,locale:l}=O(),[c,o]=x.useState(""),[r,d]=x.useState(!1),[p,m]=x.useState(!1),[D,S]=x.useState(""),g=Ie({blocklet:s}),A=Ke(a),{spaceGateways:k,addSpaceGateway:H}=Q(),[I,E]=x.useState({open:!1,action:"connect-to-did-spaces",checkTimeout:1e3*300,checkFn:le.create({baseURL:V(window.location.origin,Ve())}).get,messages:{title:n("storage.spaces.provideNFT.title",{appName:g.appName},l),scan:n("storage.spaces.provideNFT.scan",{appName:g.appName},l),confirm:"",success:e.jsx(y,{gutterBottom:!0,children:n("storage.spaces.provideNFT.success")})},onClose:()=>{E(h=>({...h,open:!1}))}}),[u,F]=x.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:n("storage.spaces.authorize.title",{appName:g.appName},l),scan:n("storage.spaces.authorize.scan",{appName:g.appName},l),confirm:"",success:e.jsx(y,{gutterBottom:!0,children:n("storage.spaces.authorize.success")})},onClose:()=>{F(h=>({...h,open:!1}))}}),U=async({endpoint:h,name:C,did:i})=>{const b=await Se(h);if(!await Ae(b)){v.error(n("storage.spaces.gateway.add.invalidUrl"));return}if(k.some(W=>W.endpoint===h)){v.error(n("storage.spaces.gateway.add.duplicate",{name:C}));return}const L={name:C,did:i,url:b,endpoint:h};await H(L,h),v.success(n("storage.spaces.connectedWithName",{name:(L==null?void 0:L.name)??"DID Spaces"}))},R=async(h,C)=>{try{if(!J.isEmpty(h.spaceGateway))await U(C(h.spaceGateway));else{const i=C(h.endpoint),b=h.space?C(h.space):{};await U({endpoint:i,did:se(i),name:"DID Space",...b})}F(i=>({...i,open:!1})),o(null),E(i=>({...i,open:!1}))}catch(i){console.error(i),v.error(G(i))}},B=()=>{E(h=>({...h,open:!0,extraParams:{appPid:s.appPid,appName:g.appName,appDescription:g.appDescription,scopes:g.scopes,appUrl:g.appUrl,referrer:g.referrer,nodeDid:a.did}}))},T=async()=>{try{d(!0);const h=await Se(c),C=dt(h),i=new URL(h).searchParams.get("spaceDid");if(!await Ae(C))throw new Error(n("storage.spaces.gateway.add.invalidUrl"));F(b=>({...b,open:!0,prefix:V(C,"space/api/did"),baseUrl:new URL(C).origin,checkFn:le.create({baseURL:V(C,"space")}).get,extraParams:{appDid:g.appDid,appName:g.appName,appDescription:g.appDescription,scopes:g.scopes,appUrl:g.appUrl,referrer:g.referrer,nodeDid:a.did,spaceDid:i}})),m(!1)}catch(h){const C=`${n("storage.spaces.gateway.add.failed",l)}: ${G(h)}`;S(C)}finally{d(!1)}};return e.jsxs(j,{children:[e.jsx(ye,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:B,menu:[e.jsx(ye.Item,{sx:{textTransform:"none"},onClick:()=>m(!0),size:"small",...t,children:n("storage.spaces.connect.useSpaceGateway")},"1")],children:e.jsx(y,{sx:{fontWeight:"bold",textTransform:"none"},children:n("storage.spaces.connect.useWallet")})}),e.jsx(de,{forceConnected:!1,saveConnect:!1,prefix:I.prefix,open:I.open,popup:!0,action:I.action,webWalletUrl:A,baseUrl:I.baseUrl,checkFn:I.checkFn,onSuccess:R,onClose:I.onClose,checkTimeout:I.checkTimeout,extraParams:I.extraParams,messages:I.messages,locale:l}),e.jsx(de,{forceConnected:!1,saveConnect:!1,prefix:u.prefix,open:u.open,popup:!0,action:u.action,baseUrl:u.baseUrl,checkFn:u.checkFn,onSuccess:R,onClose:u.onClose,checkTimeout:u.checkTimeout,extraParams:u.extraParams,messages:u.messages,locale:l}),e.jsxs(Ge,{title:n("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:p,onClose:()=>m(!1),PaperProps:{style:{minHeight:"auto"}},actions:e.jsxs(e.Fragment,{children:[e.jsx(te,{onClick:h=>{h.stopPropagation(),m(!1)},color:"inherit",children:n("common.cancel")}),e.jsxs(te,{onClick:T,color:"primary",disabled:r||!c,variant:"contained",autoFocus:!0,children:[r&&e.jsx(Z,{size:16}),n("common.confirm")]})]}),children:[e.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:e.jsx(mt,{component:"div",children:e.jsx(y,{component:"div",children:e.jsx(ft,{label:n("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:c,onChange:h=>{S(null),o(h.target.value)},disabled:r,onKeyPress:async h=>{h.key==="Enter"&&await T()},autoFocus:!0})})})}),!!D&&e.jsx(xt,{severity:"error",style:{width:"100%"},children:D})]})]})}ae.propTypes={};ae.defaultProps={};function be({...t}){const{t:s}=x.useContext(Xe),{blocklet:a,loadingDiskInfo:n,actions:l}=N();if(x.useEffect(()=>{l.refreshBlocklet({showError:!1,attachDiskInfo:!0})},[]),a.diskInfo){const c=(d,p,m)=>e.jsxs(y,{children:[d," ",e.jsx("strong",{children:p?We(p):"empty"})]}),o=a.environments.reduce((d,p)=>(d[p.key]=p.value,d),{}),r=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:c(o.BLOCKLET_APP_DIR,a.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:c(o.BLOCKLET_DATA_DIR,a.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:c(o.BLOCKLET_LOG_DIR,a.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:c(o.BLOCKLET_CACHE_DIR,a.diskInfo.cache)}];return e.jsx(Et,{component:"div",...t,children:r.map(d=>e.jsx(gt,{valueComponent:"div",nameWidth:120,name:d.name,children:d.value},d.key))})}return n?e.jsx(Z,{}):e.jsx(y,{children:s("blocklet.diskInfo.empty")})}const Et=ke(y)``;var we=function(s){return e.jsxs("svg",{...s,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2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MPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};we.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Re(){const{t}=O();return e.jsxs(j,{children:[e.jsxs(j,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(we,{style:{width:250,height:250}}),e.jsx(y,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(ae,{})]}),e.jsx(y,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(be,{})]})}Re.propTypes={};var ue={},Ut=oe;Object.defineProperty(ue,"__esModule",{value:!0});var Te=ue.default=void 0,bt=Ut(ne()),wt=e;Te=ue.default=(0,bt.default)((0,wt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var he={},Rt=oe;Object.defineProperty(he,"__esModule",{value:!0});var Oe=he.default=void 0,Tt=Rt(ne()),Ot=e;Oe=he.default=(0,Tt.default)((0,Ot.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var me={},Ft=oe;Object.defineProperty(me,"__esModule",{value:!0});var Fe=me.default=void 0,Lt=Ft(ne()),Mt=e;Fe=me.default=(0,Lt.default)((0,Mt.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function fe({spaceGateway:t,onDelete:s}){const{t:a}=O(),[n,l]=x.useState(!1),[c,o]=x.useState(!1),r=(p,m)=>{p==null||p.preventDefault(),p==null||p.stopPropagation(),l(m)},d=async p=>{try{p==null||p.stopPropagation(),o(!0),await s(t),l(!1)}catch(m){console.error(m),v.error(`${a("storage.space.gateway.delete.failed")}: ${G(m)}`)}finally{o(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(_,{color:"red",onClick:p=>r(p,!0),children:[e.jsx($,{style:{minWidth:24,color:"red"},children:e.jsx(St,{fontSize:"small"})}),e.jsx(ee,{style:{color:"red"},children:a("common.delete")})]}),e.jsx(Ye,{title:e.jsx(y,{variant:"h6",children:a("common.delConfirmDescription",{data:`${t==null?void 0:t.name}`})}),open:n,confirmButton:{text:a("common.confirm"),props:{variant:"contained",color:"error",loading:c}},cancelButton:{text:a("common.cancel"),props:{variant:"contained",color:"primary"},loading:c},onConfirm:d,onCancel:p=>r(p,!1)})]})}fe.propTypes={onDelete:f.func,spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool}).isRequired};fe.defaultProps={onDelete:()=>{}};function xe({spaceGateway:t,connected:s,onDelete:a,onConnect:n,enableSwitchToSpace:l,backupInProgress:c,...o}){const[r,d]=x.useState(null),{t:p}=O(),[m,D]=x.useState(!1),S=(A,k)=>{A.stopPropagation(),A.preventDefault(),d(k&&A.currentTarget)},g=async A=>{try{D(!0),S(A,!1),await n(t)}catch(k){console.error(k),v.error(k.message)}finally{D(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(qe,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:A=>S(A,!0),size:"small",...o,children:m||t!=null&&t.loading?e.jsx(Z,{size:"24px"}):e.jsx(yt,{})}),e.jsxs(_e,{id:"simple-menu",anchorEl:r,keepMounted:!0,open:!!r,onClose:A=>S(A,!1),children:[e.jsxs(_,{onClick:A=>{S(A,!1),window.open(t.endpoint?pt(t.endpoint):t.url)},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Te,{fontSize:"small"})}),e.jsx(ee,{children:p("common.open")})]}),e.jsxs(_,{onClick:A=>{S(A,!1),window.open(ut(t.endpoint))},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Fe,{fontSize:"small"})}),e.jsx(ee,{children:p("storage.spaces.strategy.viewBackupFiles")})]}),!s&&l&&e.jsxs(_,{onClick:g,children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Oe,{fontSize:"small"})}),e.jsx(ee,{children:p("storage.spaces.connect.switchToSpace")})]}),!c&&e.jsx(fe,{spaceGateway:t,onDelete:a})]})]})}xe.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool,endpoint:f.string.isRequired,loading:f.bool}).isRequired,connected:f.bool.isRequired,enableSwitchToSpace:f.bool,onDelete:f.func,onConnect:f.func,backupInProgress:f.bool};xe.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};var Le=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};Le.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Me=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})})};Me.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ge({spaceGateway:t,connected:s,onDelete:a,onBackupNow:n,...l}){const c=$e(w=>w.breakpoints.down("md")),{t:o,locale:r}=O(),{blocklet:d}=N(),{api:p,info:{did:m}}=P(),{appDid:D,appName:S,appDescription:g,scopes:A,appUrl:k,referrer:H}=Ie({blocklet:d}),{updateSpaceGateway:I,backupEndpoint:E,backupProgress:u,refreshBackupEndpoint:F}=Q(),[U,R]=x.useState(!1),[B,T]=x.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:o("storage.spaces.authorize.title",{appName:S},r),scan:o("storage.spaces.authorize.scan",{appName:S},r),confirm:"",success:e.jsx(y,{gutterBottom:!0,children:o("storage.spaces.authorize.success")})},onClose:()=>{T(w=>({...w,open:!1}))}}),{data:h,loading:C}=et(async()=>s?Ce(E):!0,{refreshDeps:[s,E,B==null?void 0:B.open,U]}),i=s&&h,b=s&&!U&&h&&!(t!=null&&t.loading),X=s&&U&&h,L=s&&!h&&!C&&!U,W=async()=>{if(await Ce(t==null?void 0:t.endpoint)){await p.configBlocklet({input:{did:[d.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),F(),v.success(o("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""}));return}T(Y=>({...Y,open:!0,prefix:V(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:le.create({baseURL:V(t.url,"space")}).get,extraParams:{appDid:D,appName:S,appDescription:g,scopes:A,appUrl:k,referrer:H,nodeDid:m,spaceDid:t.did}}))},Je=async(w,Y)=>{const ie=Y(w.endpoint),Qe=se(ie),z=w.space?Y(w.space):{};if(t.did&&Qe!==t.did){T(re=>({...re,open:!1})),v.error(o("storage.spaces.gateway.switch.failedForMismatchSpace",{name:z!=null&&z.name?z.name:""}));return}const He={...t,name:z.name??"DID Space",did:z.did??se(ie),endpoint:ie};await I(He),T(re=>({...re,open:!1}))},Ze=async()=>{try{if(U)return;R(!0),await n()}catch(w){console.error(w),v.error(w.message)}finally{R(!0)}};return x.useEffect(()=>{u!=null&&u.completed?((u==null?void 0:u.progress)===100&&v.success(o("storage.spaces.backupSuccessfully")),R(!1),u.progress=0,u.message=""):u.progress&&R(!0)},[u]),e.jsxs(Nt,{sx:{backgroundColor:s?"#F0FDFF":"inherit","&:hover":{backgroundColor:s?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",flexDirection:"column",padding:"4px 20px 12px",...l,children:[e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsxs(j,{flex:1,children:[i&&e.jsxs(y,{color:"primary",fontSize:14,children:[e.jsx(Le,{style:{marginRight:"8px"}}),o("storage.spaces.connected.tag")]}),L&&e.jsxs(y,{color:"error",fontSize:14,children:[e.jsx(Me,{style:{marginRight:"8px"}}),o("storage.spaces.disconnected.tag")]})]}),e.jsx(xe,{sx:{padding:"4px"},spaceGateway:t,connected:s,onDelete:a,onConnect:W,enableSwitchToSpace:(u==null?void 0:u.completed)||J.isEmpty(u==null?void 0:u.message),backupInProgress:X})]}),e.jsxs(j,{display:"flex",children:[e.jsxs(j,{display:"flex",flexDirection:"column",flex:"1",minWidth:0,children:[e.jsx(y,{className:"spaces-name",fontSize:"1rem",fontWeight:"bold",children:t.name}),e.jsx(j,{className:"spaces-address",display:X?"none":"flex",color:"#9397A1",marginTop:"4px",children:e.jsx(y,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:t.did&&e.jsx(jt,{copyable:!1,size:14,compact:!0,responsive:!1,did:t.did})})}),e.jsxs(j,{className:"spaces-backup",display:"flex",alignItems:"center",marginTop:"8px",flex:1,children:[b&&e.jsxs(j,{className:"backup-strategy",display:"flex",alignItems:"center",minWidth:"72px",children:[e.jsx(te,{variant:"contained",size:"small",onClick:Ze,children:o("storage.spaces.strategy.backupNow")}),At&&e.jsx(De,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:e.jsx(y,{sx:{marginRight:"8px",fontSize:"16px"},children:e.jsx("span",{children:o("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),X&&e.jsxs(j,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",marginLeft:c&&"16px",width:"90%",marginRight:"auto",alignSelf:"flex-end",children:[e.jsx(y,{color:"primary",children:u==null?void 0:u.message}),e.jsxs(j,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[e.jsx(j,{sx:{width:"100%",mr:1},children:e.jsx(tt,{color:"primary",variant:"determinate",value:u==null?void 0:u.progress})}),e.jsx(j,{sx:{maxWidth:"100%"},children:e.jsxs(y,{variant:"body2",color:"text.secondary",children:[u==null?void 0:u.progress,"%"]})})]})]}),L&&e.jsx(j,{className:"backup-strategy",display:"flex",alignItems:"center",minWidth:"72px",children:e.jsx(te,{color:"error",variant:"contained",size:"small",onClick:W,children:o("storage.spaces.disconnected.reconnectNow")})})]})]}),e.jsx(rt,{src:ht(t.endpoint),width:"72px",height:"72px"})]}),e.jsx(de,{forceConnected:!1,saveConnect:!1,prefix:B.prefix,open:B.open,popup:!0,action:B.action,baseUrl:B.baseUrl,checkFn:B.checkFn,onSuccess:Je,onClose:B.onClose,checkTimeout:B.checkTimeout,extraParams:B.extraParams,messages:B.messages,locale:r},"get-endpoint"),e.jsx(j,{className:`selected-container ${s?"selected":""}`,children:e.jsx(st,{className:"selected-icon"})})]})}ge.propTypes={spaceGateway:f.shape({did:f.string.isRequired,name:f.string.isRequired,url:f.string.isRequired,endpoint:f.string.isRequired,protected:f.bool,loading:f.bool}).isRequired,connected:f.bool.isRequired,progress:f.any.isRequired,onDelete:f.func,onBackupNow:f.func};ge.defaultProps={onDelete:()=>{},onBackupNow:()=>{}};const Nt=ke(j)`
2
+ box-sizing: border-box;
3
+ position: relative;
4
+ min-height: 136px;
5
+ border: 1px solid #f8f8f8;
6
+
7
+ .selected-container {
8
+ position: absolute;
9
+ right: 0px;
10
+ bottom: 0px;
11
+ display: flex;
12
+ -webkit-box-pack: end;
13
+ justify-content: flex-end;
14
+ align-items: flex-end;
15
+ width: 32px;
16
+ height: 32px;
17
+ border-radius: 0px 0px 8px;
18
+ color: rgb(255, 255, 255);
19
+ overflow: hidden;
20
+ transition: all 0.4s ease 0s;
21
+
22
+ &::after {
23
+ position: absolute;
24
+ z-index: 0;
25
+ left: 60px;
26
+ top: 60px;
27
+ display: block;
28
+ width: 0px;
29
+ height: 0px;
30
+ border-width: 16px;
31
+ border-style: solid;
32
+ border-color: transparent #1dc1c7 #1dc1c7 transparent;
33
+ transition: all 0.1s ease 0s;
34
+ content: '';
35
+ }
36
+
37
+ .selected-icon {
38
+ visibility: hidden;
39
+ width: 60%;
40
+ height: 60%;
41
+ position: relative;
42
+ z-index: 2;
43
+ margin: 0px 1px 1px 0px;
44
+ font-size: 16px;
45
+ transition: all 0.2s ease 0s;
46
+ }
47
+ }
48
+
49
+ .selected-container.selected {
50
+ &::after {
51
+ left: 0px;
52
+ top: 0px;
53
+ }
54
+
55
+ .selected-icon {
56
+ visibility: visible;
57
+ }
58
+ }
59
+
60
+ .spaces {
61
+ &-name {
62
+ margin-right: 12px;
63
+ white-space: nowrap;
64
+ overflow: hidden;
65
+ text-overflow: ellipsis;
66
+ }
67
+ }
68
+ `;var je={},Pt=oe;Object.defineProperty(je,"__esModule",{value:!0});var Ne=je.default=void 0,zt=Pt(ne()),Jt=e;Ne=je.default=(0,zt.default)((0,Jt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline");function Pe({...t}){const{t:s,locale:a}=O(),{spaceGateways:n,backups:l}=Q(),c=[{label:"DID Spaces",name:"target",options:{customBodyRenderLite:o=>{var A;const{targetUrl:r,targetName:d,status:p,createdAt:m}=l[o],D=p===M.BACKUPS.STATUS.PROGRESS&&q().diff(m,"hours")>=M.BACKUPS.TIMEOUT_HOURS,S=p===M.BACKUPS.STATUS.SUCCEEDED&&!D,g=d||((A=n.find(k=>r==null?void 0:r.includes(se(k==null?void 0:k.endpoint))))==null?void 0:A.name)||"Unknown DID Space";return S?e.jsx(Bt,{fontSize:"16px",href:r,target:"_blank",children:g}):e.jsx(y,{variant:"body1",fontSize:"16px",children:g})}}},{label:s("common.strategy"),name:"strategy",options:{customBodyRender:o=>{const r=s(o===0?"common.auto":"common.manual");return e.jsx(ce,{children:r})}}},{label:s("common.startTime"),name:"createdAt",options:{customBodyRender:o=>q(o).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.endTime"),name:"updatedAt",options:{customBodyRender:o=>J.isEmpty(o)?"":q(o).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.status"),name:"status",options:{customBodyRenderLite:o=>{const{status:r,message:d,createdAt:p}=(l==null?void 0:l[o])??{},m=r===M.BACKUPS.STATUS.PROGRESS&&q().diff(p,"hours")>=M.BACKUPS.TIMEOUT_HOURS,D=m&&s("common.timeoutError"),S=r===M.BACKUPS.STATUS.PROGRESS&&!m,g=r===M.BACKUPS.STATUS.SUCCEEDED&&!m;return S?e.jsxs(y,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(Z,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):g?e.jsx(ce,{type:"success",children:s("common.succeeded")}):e.jsxs(j,{display:"inline-flex",alignItems:"center",children:[e.jsx(ce,{type:"error",children:s("common.failed")}),"  ",e.jsx(nt,{style:{display:"flex",alignItems:"center",flexShrink:0},title:d||D,children:e.jsx(ot,{children:e.jsx(Ne,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return e.jsx(j,{...t,children:l!=null&&l.length?e.jsx(Ct,{title:e.jsx(y,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")}),data:l,columns:c,emptyNode:s("storage.spaces.record.emptyData",a),options:{download:!1,filter:!1,print:!1}}):e.jsxs(e.Fragment,{children:[e.jsx(j,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:e.jsx(y,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")})}),e.jsx(j,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:s("storage.spaces.record.emptyData")})]})})}Pe.propTypes={};function ze({...t}){const{t:s}=O(),{autoBackup:a,updateAutoBackup:n}=Q(),l=async()=>{try{const c=!(a!=null&&a.enabled);await n({enabled:c}),v.success(s(c?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(c){v.error(c.message)}};return e.jsx(De,{checked:!!(a!=null&&a.enabled),onChange:l,name:"enableWelcomePage",labelProps:{label:e.jsx(y,{marginRight:"8px",children:e.jsx("span",{children:s("storage.spaces.autoBackup.title")})})},style:{...t.style}})}ze.propTypes={};function Zt(){const{t}=O(),{blocklet:s}=N(),{api:a}=P(),{spaceGateways:n,spaceGatewaysLoading:l,deleteSpaceGateway:c,spaceGatewayIsSelected:o}=Q(),r=l&&!(n!=null&&n.length),d=async m=>{await c(m),v.success(t("storage.spaces.gateway.delete.succeeded",{name:`(${m.name})`}))},p=async()=>{await a.backupBlocklet({input:{appDid:s.appDid,to:"spaces"}})};return e.jsxs(j,{display:"flex",flexDirection:"column",children:[e.jsxs(j,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:[e.jsx(y,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:t("storage.spaces.connected.title")}),e.jsx(ze,{style:{marginRight:"32px"}}),e.jsx(ae,{})]}),e.jsx(j,{children:r?e.jsx(j,{display:"flex",justifyContent:"center",children:e.jsx(Z,{})}):e.jsx(Be,{container:!0,spacing:1,children:n.map(m=>e.jsx(Be,{item:!0,xs:12,md:6,children:e.jsx(ge,{style:{marginTop:"12px"},spaceGateway:m,connected:o(m),onDelete:d,onBackupNow:p},m.endpoint)}))})}),e.jsx(Pe,{sx:{marginTop:"24px"}}),e.jsx(y,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(be,{})]})}function Qt(){const{spaceGatewaysLoading:t,spaceGateways:s}=Q();return t?e.jsx(at,{relative:"parent",children:e.jsx(Z,{})}):it(s)?e.jsx(Re,{}):e.jsx(Zt,{})}function Ts(){return e.jsx(pe,{children:e.jsx(Qt,{})})}export{Ts as default};
@@ -1 +1 @@
1
- import{b8 as y}from"./index-DIxJxM78.js";var c={};function u(e,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var T=u;u.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};u.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};u.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var i=new Date().getTime();if(e&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};u.prototype.attempt=function(e,i){this._fn=e,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};u.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};u.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};u.prototype.start=u.prototype.try;u.prototype.errors=function(){return this._errors};u.prototype.attempts=function(){return this._attempts};u.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},i=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],o=n.message,a=(e[o]||0)+1;e[o]=a,a>=t&&(i=n,t=a)}return i};(function(e){var i=T;e.operation=function(t){var r=e.timeouts(t);return new i(r,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in t)r[n]=t[n];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],a=0;a<r.retries;a++)o.push(this.createTimeout(a,r));return t&&t.forever&&!o.length&&o.push(this.createTimeout(a,r)),o.sort(function(s,m){return s-m}),o},e.createTimeout=function(t,r){var n=r.randomize?Math.random()+1:1,o=Math.round(n*Math.max(r.minTimeout,1)*Math.pow(r.factor,t));return o=Math.min(o,r.maxTimeout),o},e.wrap=function(t,r,n){if(r instanceof Array&&(n=r,r=null),!n){n=[];for(var o in t)typeof t[o]=="function"&&n.push(o)}for(var a=0;a<n.length;a++){var s=n[a],m=t[s];t[s]=(function(p){var f=e.operation(r),h=Array.prototype.slice.call(arguments,1),l=h.pop();h.push(function(_){f.retry(_)||(_&&(arguments[0]=f.mainError()),l.apply(this,arguments))}),f.attempt(function(){p.apply(t,h)})}).bind(t,m),t[s].options=r}}})(c);var v=c;const R=y(v);export{R as a,v as r};
1
+ import{b8 as y}from"./index-DfZjT3WA.js";var c={};function u(e,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var T=u;u.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};u.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};u.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var i=new Date().getTime();if(e&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};u.prototype.attempt=function(e,i){this._fn=e,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};u.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};u.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};u.prototype.start=u.prototype.try;u.prototype.errors=function(){return this._errors};u.prototype.attempts=function(){return this._attempts};u.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},i=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],o=n.message,a=(e[o]||0)+1;e[o]=a,a>=t&&(i=n,t=a)}return i};(function(e){var i=T;e.operation=function(t){var r=e.timeouts(t);return new i(r,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in t)r[n]=t[n];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],a=0;a<r.retries;a++)o.push(this.createTimeout(a,r));return t&&t.forever&&!o.length&&o.push(this.createTimeout(a,r)),o.sort(function(s,m){return s-m}),o},e.createTimeout=function(t,r){var n=r.randomize?Math.random()+1:1,o=Math.round(n*Math.max(r.minTimeout,1)*Math.pow(r.factor,t));return o=Math.min(o,r.maxTimeout),o},e.wrap=function(t,r,n){if(r instanceof Array&&(n=r,r=null),!n){n=[];for(var o in t)typeof t[o]=="function"&&n.push(o)}for(var a=0;a<n.length;a++){var s=n[a],m=t[s];t[s]=(function(p){var f=e.operation(r),h=Array.prototype.slice.call(arguments,1),l=h.pop();h.push(function(_){f.retry(_)||(_&&(arguments[0]=f.mainError()),l.apply(this,arguments))}),f.attempt(function(){p.apply(t,h)})}).bind(t,m),t[s].options=r}}})(c);var v=c;const R=y(v);export{R as a,v as r};
@@ -0,0 +1,4 @@
1
+ import{r as h,a0 as g,aZ as y,j as t,C as P,n as v,B as c,a1 as d,P as m,Z as w}from"./index-DfZjT3WA.js";import{P as T}from"./page-header-BvuGyCDw.js";import{u as B}from"./index-D5lkEFWM.js";import{C as E,D,a as N}from"./connect-to-B0Td9yUD.js";import{S as u}from"./step-actions-CoJc8417.js";import{S as b}from"./layout-Bb2LZLxa.js";import"./spaces-DDj9ynWl.js";import"./index-CFmNTsQh.js";import"./api-DbvHYaVa.js";import"./url-join-BoNn2Qh7.js";import"./Skeleton-YurB3EC5.js";import"./Hidden-DJwWGZh0.js";import"./use-blocklet-info-for-connect-did-spaces-CfK0RcTD.js";import"./CloseOutlined-CN4iKY7n.js";import"./did-address-BWnma-3-.js";import"./Link-Cpnh7s1v.js";import"./DeleteOutline-Du2BPdlg.js";import"./format-error-BVI56bJg.js";import"./index-BtQK2llU.js";import"./ExpandMore-DBQIHjkB.js";import"./ButtonGroup-CTrZ2Hyv.js";import"./TextField-D_Jtjg13.js";import"./FormControl-CeSJJZgZ.js";import"./useFormControl-Cs3LGXJe.js";import"./InputLabel-3M9sMlBq.js";import"./Select-drnrjZt8.js";import"./Alert-Dlco0B3L.js";import"./useSlot-C1f6ZTLt.js";import"./content-layout-B7X0Mv3n.js";function l({onNext:a,onPrevious:x}){var s,n,p;const{t:i}=h.useContext(g),{blocklet:e}=y(),{spaceGateway:C,settingStorageEndpoint:j,updateSpaceGateway:f,hasStorageEndpoint:S,loading:o,storageEndpoint:r}=B();return o?t.jsx(P,{relative:"parent",children:t.jsx(v,{})}):t.jsxs(G,{children:[t.jsx("div",{className:"header",children:t.jsx(T,{title:i("setup.didSpace.title"),subTitle:i("setup.didSpace.subTitle"),onClickBack:x})}),t.jsx(c,{sx:{width:"100%",maxWidth:"720px"},children:S?t.jsx(E,{spaceGateway:C,settingStorageEndpoint:j}):t.jsx(D,{})}),((s=e==null?void 0:e.capabilities)==null?void 0:s.didSpace)&&t.jsx(c,{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"24px",children:t.jsx(N,{onConnect:f,storageEndpoint:r})}),((n=e==null?void 0:e.capabilities)==null?void 0:n.didSpace)==="required"&&t.jsx(u,{mt:8,children:t.jsx(d,{loading:o,variant:"contained",disabled:o||!r,onClick:()=>a(),children:i("setup.continue")})}),((p=e==null?void 0:e.capabilities)==null?void 0:p.didSpace)==="optional"&&t.jsx(u,{blocklet:e,onStartNow:()=>a("complete"),children:t.jsx(d,{className:"start-now",loading:o,variant:"contained",disabled:o,onClick:()=>a(),children:i(r?"setup.continue":"setup.skip")})})]})}l.propTypes={onNext:m.func,onPrevious:m.func};l.defaultProps={onNext:()=>{},onPrevious:()=>{}};const G=w(b)`
2
+ height: 100%;
3
+ overflow-y: auto;
4
+ `;export{l as default};
@@ -1,4 +1,4 @@
1
- var bt=Object.defineProperty;var yt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var D=(e,t,n)=>yt(e,typeof t!="symbol"?t+"":t,n);import{aH as xt,cJ as wt,c$ as vt,aL as G,ck as V,r as A,aJ as It,aK as Ct,aP as ve,cE as St,ch as Tt,j as m,aN as Ie,aO as At,P as f,Q as jt,l as Pt,aD as kt,bF as Ce,bn as Lt,bo as Ot,dl as Mt,aj as Rt,O as j,bl as Et,B as Nt,bC as _t,T as qt,dm as Ft,dn as $t,a3 as Bt,dp as zt,bD as De,u as Ve,aE as Ht,f as Dt,E as Vt}from"./index-DIxJxM78.js";import{D as Ut}from"./index-C0SGixzY.js";import{l as R,g as Qt,L as Wt}from"./MoreVert-D7siuKO-.js";import{L as Gt}from"./selector-CLP7imhL.js";const Zt=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Jt=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Xt=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:s,divider:i,selected:a}=e,l=At({root:["root",r&&"dense",!s&&"gutters",i&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Qt,n);return G({},n,l)},Yt=xt(wt,{shouldForwardProp:e=>vt(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Jt})(({theme:e,ownerState:t})=>G({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${R.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${R.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${R.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${R.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${R.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Kt=A.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:s=!1,component:i="div",children:a,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:g}=r,b=Ct(r,Zt),x=A.useContext(ve),I=A.useMemo(()=>({dense:c||x.dense||!1,alignItems:o,disableGutters:l}),[o,x.dense,c,l]),T=A.useRef(null);St(()=>{s&&T.current&&T.current.focus()},[s]);const w=G({},r,{alignItems:o,dense:I.dense,disableGutters:l,divider:u,selected:p}),y=Xt(w),M=Tt(T,n);return m.jsx(ve.Provider,{value:I,children:m.jsx(Yt,G({ref:M,href:b.href||b.to,component:(b.href||b.to)&&i==="div"?"button":i,focusVisibleClassName:Ie(y.focusVisible,d),ownerState:w,className:Ie(y.root,g)},b,{classes:y,children:a}))})});/**
1
+ var bt=Object.defineProperty;var yt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var D=(e,t,n)=>yt(e,typeof t!="symbol"?t+"":t,n);import{aH as xt,cJ as wt,c$ as vt,aL as G,ck as V,r as A,aJ as It,aK as Ct,aP as ve,cE as St,ch as Tt,j as m,aN as Ie,aO as At,P as f,N as Pt,l as jt,aD as kt,bF as Ce,bn as Lt,bo as Ot,dl as Mt,ah as Rt,aB as P,bl as Et,B as Nt,bC as _t,T as qt,dm as Ft,dn as Bt,a1 as $t,dp as zt,bD as De,u as Ve,aE as Ht,f as Dt,E as Vt}from"./index-DfZjT3WA.js";import{D as Ut}from"./index-D0ZBFe_v.js";import{l as R,g as Qt,L as Wt}from"./MoreVert-CBWkVJTE.js";import{L as Gt}from"./selector-DktPytoX.js";const Zt=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Jt=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Xt=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:s,divider:i,selected:a}=e,l=At({root:["root",r&&"dense",!s&&"gutters",i&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Qt,n);return G({},n,l)},Yt=xt(wt,{shouldForwardProp:e=>vt(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Jt})(({theme:e,ownerState:t})=>G({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${R.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${R.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${R.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${R.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${R.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Kt=A.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:s=!1,component:i="div",children:a,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:g}=r,b=Ct(r,Zt),x=A.useContext(ve),I=A.useMemo(()=>({dense:c||x.dense||!1,alignItems:o,disableGutters:l}),[o,x.dense,c,l]),T=A.useRef(null);St(()=>{s&&T.current&&T.current.focus()},[s]);const w=G({},r,{alignItems:o,dense:I.dense,disableGutters:l,divider:u,selected:p}),y=Xt(w),M=Tt(T,n);return m.jsx(ve.Provider,{value:I,children:m.jsx(Yt,G({ref:M,href:b.href||b.to,component:(b.href||b.to)&&i==="div"?"button":i,focusVisibleClassName:Ie(y.focusVisible,d),ownerState:w,className:Ie(y.root,g)},b,{classes:y,children:a}))})});/**
2
2
  * (c) Iconify
3
3
  *
4
4
  * For the full copyright and license information, please view the license.txt
@@ -8,4 +8,4 @@ var bt=Object.defineProperty;var yt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,config
8
8
  *
9
9
  * @license MIT
10
10
  * @version 1.0.8
11
- */const Ue=Object.freeze({left:0,top:0,width:16,height:16}),Z=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),B=Object.freeze({...Ue,...Z}),re=Object.freeze({...B,body:"",hidden:!1}),en=Object.freeze({width:null,height:null}),Qe=Object.freeze({...en,...Z});function tn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const nn=/[\s,]+/;function on(e,t){t.split(nn).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const We={...Qe,preserveAspectRatio:""};function Se(e){const t={...We},n=(r,o)=>e.getAttribute(r)||o;return t.width=n("width",null),t.height=n("height",null),t.rotate=tn(n("rotate","")),on(t,n("flip","")),t.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),t}function rn(e,t){for(const n in We)if(e[n]!==t[n])return!0;return!1}const N=/^[a-z0-9]+(-[a-z0-9]+)*$/,z=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return t&&!Q(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!Q(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return t&&!Q(a,n)?null:a}return null},Q=(e,t)=>e?!!((e.provider===""||e.provider.match(N))&&(t&&e.prefix===""||e.prefix.match(N))&&e.name.match(N)):!1;function sn(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Te(e,t){const n=sn(e,t);for(const r in re)r in Z?r in e&&!(r in n)&&(n[r]=Z[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function cn(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return Object.keys(n).concat(Object.keys(r)).forEach(s),o}function an(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(a){s=Te(r[a]||o[a],s)}return i(t),n.forEach(i),Te(e,s)}function Ge(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=cn(e);for(const o in r){const s=r[o];s&&(t(o,an(e,o,s)),n.push(o))}return n}const ln={provider:"",aliases:{},not_found:{},...Ue};function ee(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Ze(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ee(e,ln))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(N)||typeof s.body!="string"||!ee(s,re))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(N)||typeof i!="string"||!n[i]&&!r[i]||!ee(s,re))return null}return t}const J=Object.create(null);function un(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function k(e,t){const n=J[e]||(J[e]=Object.create(null));return n[t]||(n[t]=un(e,t))}function pe(e,t){return Ze(t)?Ge(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function fn(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function dn(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(J)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(J[o]||{})).forEach(i=>{const a=k(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let q=!1;function Je(e){return typeof e=="boolean"&&(q=e),q}function F(e){const t=typeof e=="string"?z(e,!0,q):e;if(t){const n=k(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Xe(e,t){const n=z(e,!0,q);if(!n)return!1;const r=k(n.provider,n.prefix);return fn(r,n.name,t)}function Ae(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),q&&!t&&!e.prefix){let o=!1;return Ze(e)&&(e.prefix="",Ge(e,(s,i)=>{i&&Xe(s,i)&&(o=!0)})),o}const n=e.prefix;if(!Q({provider:t,prefix:n,name:"a"}))return!1;const r=k(t,n);return!!pe(r,e)}function pn(e){return!!F(e)}function hn(e){const t=F(e);return t?{...B,...t}:null}function gn(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=k(s,i));let u;a in l.icons?u=t.loaded:i===""||l.missing.has(a)?u=t.missing:u=t.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),t}function Ye(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function mn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(e.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(e.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Ye([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let bn=0;function yn(e,t,n){const r=bn++,o=Ye.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const se=Object.create(null);function je(e,t){se[e]=t}function ie(e){return se[e]||se[""]}function xn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?z(o,t,n):o;s&&r.push(s)}),r}var wn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function vn(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let h=e.resources.slice(0);for(i=[];h.length>1;){const v=Math.floor(Math.random()*h.length);i.push(h[v]),h=h.slice(0,v).concat(h.slice(v+1))}i=i.concat(h)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],g=[];typeof r=="function"&&g.push(r);function b(){d&&(clearTimeout(d),d=null)}function x(){c==="pending"&&(c="aborted"),b(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function I(h,v){v&&(g=[]),typeof h=="function"&&g.push(h)}function T(){return{startTime:a,payload:t,status:c,queriesSent:l,queriesPending:p.length,subscribe:I,abort:x}}function w(){c="failed",g.forEach(h=>{h(void 0,u)})}function y(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function M(h,v,P){const S=v!=="success";switch(p=p.filter(L=>L!==h),c){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(v==="abort"){u=P,w();return}if(S){u=P,p.length||(i.length?C():w());return}if(b(),y(),!e.random){const L=e.resources.indexOf(h.resource);L!==-1&&L!==e.index&&(e.index=L)}c="completed",g.forEach(L=>{L(P)})}function C(){if(c!=="pending")return;b();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{b(),c==="pending"&&(y(),w())},e.timeout);return}w();return}const v={status:"pending",resource:h,callback:(P,S)=>{M(v,P,S)}};p.push(v),l++,d=setTimeout(C,e.rotate),n(h,t,v.callback)}return setTimeout(C),T}function Ke(e){const t={...wn,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=vn(t,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function he(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Y=Object.create(null),E=["https://api.simplesvg.com","https://api.unisvg.com"],W=[];for(;E.length>0;)E.length===1||Math.random()>.5?W.push(E.shift()):W.push(E.pop());Y[""]=he({resources:["https://api.iconify.design"].concat(W)});function Pe(e,t){const n=he(t);return n===null?!1:(Y[e]=n,!0)}function K(e){return Y[e]}function In(){return Object.keys(Y)}function ke(){}const te=Object.create(null);function Cn(e){if(!te[e]){const t=K(e);if(!t)return;const n=Ke(t),r={config:t,redundancy:n};te[e]=r}return te[e]}function et(e,t,n){let r,o;if(typeof e=="string"){const s=ie(e);if(!s)return n(void 0,424),ke;o=s.send;const i=Cn(e);i&&(r=i.redundancy)}else{const s=he(e);if(s){r=Ke(s);const i=e.resources?e.resources[0]:"",a=ie(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),ke):r.query(t,o,n)().abort}const Le="iconify2",$="iconify",tt=$+"-count",Oe=$+"-version",nt=36e5,Sn=168;function ce(e,t){try{return e.getItem(t)}catch{}}function ge(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Me(e,t){try{e.removeItem(t)}catch{}}function ae(e,t){return ge(e,tt,t.toString())}function le(e){return parseInt(ce(e,tt))||0}const O={local:!0,session:!0},ot={local:new Set,session:new Set};let me=!1;function Tn(e){me=e}let U=typeof window>"u"?{}:window;function rt(e){const t=e+"Storage";try{if(U&&U[t]&&typeof U[t].length=="number")return U[t]}catch{}O[e]=!1}function st(e,t){const n=rt(e);if(!n)return;const r=ce(n,Oe);if(r!==Le){if(r){const a=le(n);for(let c=0;c<a;c++)Me(n,$+c.toString())}ge(n,Oe,Le),ae(n,0);return}const o=Math.floor(Date.now()/nt)-Sn,s=a=>{const c=$+a.toString(),l=ce(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,a))return!0}catch{}Me(n,c)}};let i=le(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,ae(n,i)):ot[e].add(a))}function it(){if(!me){Tn(!0);for(const e in O)st(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=k(r,o);if(!pe(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function An(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in O)st(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function jn(e,t){me||it();function n(r){let o;if(!O[r]||!(o=rt(r)))return;const s=ot[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=le(o),!ae(o,i+1))return;const a={cached:Math.floor(Date.now()/nt),provider:e.provider,data:t};return ge(o,$+i.toString(),JSON.stringify(a))}t.lastModified&&!An(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Re(){}function Pn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,mn(e)}))}function kn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=ie(n)))return;s.prepare(n,r,o).forEach(a=>{et(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{e.missing.add(l)});else try{const l=pe(e,c);if(!l.length)return;const u=e.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),jn(e,c)}catch(l){console.error(l)}Pn(e)})})}))}const be=(e,t)=>{const n=xn(e,!0,Je()),r=gn(n);if(!r.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(r.loaded,r.missing,r.pending,Re)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(k(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=k(l,u),g=p.pendingIcons||(p.pendingIcons=new Set);g.has(d)||(g.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&kn(c,o[l][u])}),t?yn(t,r,s):Re},Ln=e=>new Promise((t,n)=>{const r=typeof e=="string"?z(e,!0):e;if(!r){n(e);return}be([r||e],o=>{if(o.length&&r){const s=F(r);if(s){t({...B,...s});return}}n(e)})});function On(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function Mn(e,t){const n=typeof e=="string"?z(e,!0,!0):null;if(!n){const s=On(e);return{value:e,data:s}}const r=F(n);if(r!==void 0||!n.prefix)return{value:e,name:n,data:r};const o=be([n],()=>t(e,n,F(n)));return{value:e,name:n,loading:o}}function ne(e){return e.hasAttribute("inline")}let ct=!1;try{ct=navigator.vendor.indexOf("Apple")===0}catch{}function Rn(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(ct||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const En=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Nn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ue(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(En);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=Nn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const _n=e=>e==="unset"||e==="undefined"||e==="none";function at(e,t){const n={...B,...e},r={...Qe,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(b=>{const x=[],I=b.hFlip,T=b.vFlip;let w=b.rotate;I?T?w+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):T&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let y;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:y=o.height/2+o.top,x.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,x.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}w%2===1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),x.length&&(s='<g transform="'+x.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ue(d,c/l)):(u=i==="auto"?c:i,d=a===null?ue(u,l/c):a==="auto"?l:a);const p={},g=(b,x)=>{_n(x)||(p[b]=x.toString())};return g("width",u),g("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const qn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let X=qn();function Fn(e){X=e}function $n(){return X}function Bn(e,t){const n=K(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function zn(e){return e===404}const Hn=(e,t,n)=>{const r=[],o=Bn(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Dn(e){if(typeof e=="string"){const t=K(e);if(t)return t.path}return"/"}const Vn=(e,t,n)=>{if(!X){n("abort",424);return}let r=Dn(t.provider);switch(t.type){case"icons":{const s=t.prefix,a=t.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;X(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(zn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},Un={prepare:Hn,send:Vn};function Ee(e,t){switch(e){case"local":case"session":O[e]=t;break;case"all":for(const n in O)O[n]=t;break}}const oe="data-style";let lt="";function Qn(e){lt=e}function Ne(e,t){let n=Array.from(e.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(oe));n||(n=document.createElement("style"),n.setAttribute(oe,oe),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+lt}function ut(){je("",Un),Je(!0);let e;try{e=window}catch{}if(e){if(it(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Ae(o))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;Pe(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Ee(n,!0),disableCache:n=>Ee(n,!1),iconExists:pn,getIcon:hn,listIcons:dn,addIcon:Xe,addCollection:Ae,calculateSize:ue,buildIcon:at,loadIcons:be,loadIcon:Ln,addAPIProvider:Pe,appendCustomStyle:Qn,_api:{getAPIConfig:K,setAPIModule:je,sendAPIQuery:et,setFetch:Fn,getFetch:$n,listAPIProviders:In}}}function ft(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Wn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Gn(e){return"data:image/svg+xml,"+Wn(e)}function Zn(e){return'url("'+Gn(e)+'")'}const fe={"background-color":"currentColor"},dt={"background-color":"transparent"},_e={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},qe={"-webkit-mask":fe,mask:fe,background:dt};for(const e in qe){const t=qe[e];for(const n in _e)t[e+"-"+n]=_e[n]}function Fe(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Jn(e,t,n){const r=document.createElement("span");let o=e.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=e.attributes,i=ft(o,{...s,width:t.width+"",height:t.height+""}),a=Zn(i),c=r.style,l={"--svg":a,width:Fe(s.width),height:Fe(s.height),...n?fe:dt};for(const u in l)c.setProperty(u,l[u]);return r}let _;function Xn(){try{_=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{_=null}}function Yn(e){return _===void 0&&Xn(),_?_.createHTML(e):e}function Kn(e){const t=document.createElement("span"),n=e.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ft(e.body,n);return t.innerHTML=Yn(o),t.firstChild}function $e(e,t){const n=t.icon.data,r=t.customisations,o=at(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=t.renderedMode;let i;switch(s){case"svg":i=Kn(o);break;default:i=Jn(o,{...B,...n},s==="mask")}const a=Array.from(e.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):e.replaceChild(i,a):e.appendChild(i)}function Be(e,t,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:r}}function eo(e="iconify-icon"){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;const r=t.get(e);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();D(this,"_shadowRoot");D(this,"_state");D(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=ne(this);Ne(c,l),this._state=Be({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=ne(this),u=this._state;l!==u.inline&&(u.inline=l,Ne(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return ne(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}$e(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=Se(this);(c.attrMode!==u||rn(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=Mn(c,(u,d,p)=>{const g=this._state;if(g.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:d,data:p};b.data?this._gotIconData(b):g.icon=b});l.data?this._gotIconData(l):this._state=Be(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Se(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=Rn(c.data.body,u),p=this._state.inline;$e(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ut();for(const a in i)s[a]=s.prototype[a]=i[a];return t.define(e,s),s}eo()||ut();const to=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),pt=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),H=(e,t,n="children")=>e.map(r=>Array.isArray(r[n])?t({...r,[n]:H(r[n],t,n)}):t(r)),no=(e,t="children")=>{const n=[];return H(e,r=>n.push(r),t),n},ye=(e,t,n="children")=>e.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=ye(o,t,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return t(r,s)}),oo=e=>/^https?:\/\//.test(e),ro=e=>{if(!e||!(e!=null&&e.startsWith("/")))return!1;const t=o=>o.endsWith("/")?o:`${o}/`,n=t(window.location.pathname),r=t(new URL(e,window.location.origin).pathname);return n.startsWith(r)},so=(e=[])=>{const t=e.map((r,o)=>({path:r,index:o})).filter(r=>ro(r.path));return t!=null&&t.length?t.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,t[0]).index:-1};var ze,He;const de=((ze=window==null?void 0:window.blocklet)==null?void 0:ze.groupPrefix)||((He=window==null?void 0:window.blocklet)==null?void 0:He.prefix)||"/",io=e=>{const t={...e},n=e==null?void 0:e.background;return typeof n=="string"?t.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(t.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),t},ht=(e,t="en")=>{if(!(e!=null&&e.length))return e;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(oo(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return H(e,o=>{var s;return{...o,title:n(o.title,t),link:(s=o.items)!=null&&s.length?o.link:r(o.link,t),_rawLink:o.link}},"items")},co=e=>H(e,t=>t.role?{...t,role:Array.isArray(t.role)?t.role:[t.role]}:t,"items"),ao=e=>{if(!(e!=null&&e.length))return null;const t=co(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return t.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},lo=e=>{if(!e)return null;const t={...e};return t.theme=io(t.theme),t.navigation=ao(uo(t.navigation)),t},uo=(e=[])=>ye(e,(t,n)=>{var r;return!!t.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),gt=(e,t)=>ye(e,(n,r)=>{var s;const o=!n.role||t&&n.role.includes(t);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),fo={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},po={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function xe({session:e,locale:t,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=e==null?void 0:e.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=A.useRef(null),i=jt({open:!1}),a=Pt((c=!i.open)=>{i.open=c});return o.length===0||!(e!=null&&e.user)?null:m.jsxs(m.Fragment,{children:[m.jsx(kt,{size:"medium",ref:s,onClick:()=>a(),children:m.jsx(Ce,{icon:fo,fontSize:n,style:{transform:"scale(1.08)"}})}),m.jsx(Lt,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>m.jsx(Ot,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:m.jsx(Mt,{...c,timeout:350,children:m.jsxs(Rt,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:j.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${j.gray6}, 0px 0px 0px 1px ${j.gray6}`},children:[m.jsx(Et,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u;return m.jsx(Wt,{disablePadding:!0,children:m.jsxs(Kt,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:j.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?m.jsx(Nt,{component:"img",src:`${_t}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):m.jsx(Ce,{fontSize:50,icon:l.icon||po,color:j.textSubtitle}),m.jsx(qt,{sx:{fontSize:"12px",color:j.textBase,textAlign:"center",lineHeight:"normal"},children:Ft(l.title,t)})]})},l.id)})}),m.jsx($t,{session:e,children:m.jsx(Bt,{variant:"outlined",fullWidth:!0,href:zt,sx:{mt:1,borderRadius:2,color:j.textBase,borderColor:j.lineBorderStrong,"&:hover":{color:j.primaryBase,borderColor:j.primaryBase}},children:t==="zh"?"管理":"Manage"})})]})})})})]})}xe.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};xe.defaultProps={locale:"en",size:24};function we({formattedBlocklet:e,addons:t,sessionManagerProps:n}){var p,g,b,x;const r=A.useContext(De),{locale:o}=Ve()||{},{enableConnect:s=!0,enableLocale:i=!0}=e,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=ht((g=e==null?void 0:e.navigation)==null?void 0:g.sessionManager,o)||[];c=gt(c,(x=(b=r==null?void 0:r.session)==null?void 0:b.user)==null?void 0:x.role);const u=(()=>{if(t&&typeof t!="function")return Array.isArray(t)?t:[t];let I=[];if(i&&o&&I.push(m.jsx(Gt,{showText:!1},"locale-selector")),s&&r){const T=[];a&&(c?c.slice(0,5):[]).forEach(y=>{T.push({label:y.title,icon:y.icon?m.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),I.push(m.jsx(xe,{session:r.session,locale:o},"session-blocklet")),I.push(m.jsx(Ht,{session:r.session,locale:o,menu:T,showRole:!0,...n},"session-user"))}return typeof t=="function"&&(I=t(I)||[]),I})();return A.createElement(m.Fragment,null,...Array.isArray(u)?u:[u])}we.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt};we.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const ho=()=>{const e=Dt();A.useEffect(()=>{e.wallet&&Vt.call("arcHideTopBar","{}")},[e])};function mt({meta:e,fallbackUrl:t,invalidPathFallback:n,headerAddons:r,sessionManagerProps:o,links:s,...i}){var M;ho();const a=A.useContext(De),c=(M=a==null?void 0:a.session)==null?void 0:M.user,l=c==null?void 0:c.role,{locale:u}=Ve()||{},d=A.useMemo(()=>{const C=Object.assign({},window.blocklet,e);try{return lo(C)}catch(h){return console.error("Failed to format blocklet info",h,C),C}},[e]),{localizedNav:p,flattened:g,matchedIndex:b}=A.useMemo(()=>{var P;let C=ht((P=d==null?void 0:d.navigation)==null?void 0:P.dashboard,u)||[];C=gt(C,l),C=H(C,S=>({title:S.title,url:S.link,icon:S.icon?m.jsx("iconify-icon",{height:"100%",width:"100%",icon:S.icon}):null,external:!0,children:S.items}),"items");const h=no(C).filter(S=>!!S.url),v=so(h.map(S=>S.url));return v!==-1&&(h[v].active=!0),{localizedNav:C,flattened:h,matchedIndex:v}},[d,u,l]),x=typeof s=="function"?s(p):[...p,...s];if(A.useLayoutEffect(()=>{c&&!(g!=null&&g.length)&&t&&(window.location.href=t)},[t]),A.useLayoutEffect(()=>{c&&(g!=null&&g.length)&&b===-1&&n&&n()},[n,g,b]),!d.appName)return null;const{appLogo:I,appLogoRect:T,appName:w}=d,y=m.jsx(we,{formattedBlocklet:d,addons:r,sessionManagerProps:o});return m.jsx(Ut,{title:w,fullWidth:!0,sidebarWidth:128,legacy:!1,links:x,...i,headerProps:{homeLink:de,logo:m.jsx("img",{src:T||I,alt:"logo"}),addons:y,...i.headerProps}})}mt.propTypes={meta:to,fallbackUrl:f.string,invalidPathFallback:f.func,headerAddons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt,links:f.oneOfType([f.array,f.func])};mt.defaultProps={meta:{},fallbackUrl:de,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=de}},links:[]};export{to as B,mt as D,we as H,Kt as L,no as a,so as b,lo as f,ht as g,oo as i,H as m,de as p,ho as u};
11
+ */const Ue=Object.freeze({left:0,top:0,width:16,height:16}),Z=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),$=Object.freeze({...Ue,...Z}),re=Object.freeze({...$,body:"",hidden:!1}),en=Object.freeze({width:null,height:null}),Qe=Object.freeze({...en,...Z});function tn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const nn=/[\s,]+/;function on(e,t){t.split(nn).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const We={...Qe,preserveAspectRatio:""};function Se(e){const t={...We},n=(r,o)=>e.getAttribute(r)||o;return t.width=n("width",null),t.height=n("height",null),t.rotate=tn(n("rotate","")),on(t,n("flip","")),t.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),t}function rn(e,t){for(const n in We)if(e[n]!==t[n])return!0;return!1}const N=/^[a-z0-9]+(-[a-z0-9]+)*$/,z=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return t&&!Q(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!Q(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return t&&!Q(a,n)?null:a}return null},Q=(e,t)=>e?!!((e.provider===""||e.provider.match(N))&&(t&&e.prefix===""||e.prefix.match(N))&&e.name.match(N)):!1;function sn(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Te(e,t){const n=sn(e,t);for(const r in re)r in Z?r in e&&!(r in n)&&(n[r]=Z[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function cn(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return Object.keys(n).concat(Object.keys(r)).forEach(s),o}function an(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(a){s=Te(r[a]||o[a],s)}return i(t),n.forEach(i),Te(e,s)}function Ge(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=cn(e);for(const o in r){const s=r[o];s&&(t(o,an(e,o,s)),n.push(o))}return n}const ln={provider:"",aliases:{},not_found:{},...Ue};function ee(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Ze(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ee(e,ln))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(N)||typeof s.body!="string"||!ee(s,re))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(N)||typeof i!="string"||!n[i]&&!r[i]||!ee(s,re))return null}return t}const J=Object.create(null);function un(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function k(e,t){const n=J[e]||(J[e]=Object.create(null));return n[t]||(n[t]=un(e,t))}function pe(e,t){return Ze(t)?Ge(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function fn(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function dn(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(J)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(J[o]||{})).forEach(i=>{const a=k(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let q=!1;function Je(e){return typeof e=="boolean"&&(q=e),q}function F(e){const t=typeof e=="string"?z(e,!0,q):e;if(t){const n=k(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Xe(e,t){const n=z(e,!0,q);if(!n)return!1;const r=k(n.provider,n.prefix);return fn(r,n.name,t)}function Ae(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),q&&!t&&!e.prefix){let o=!1;return Ze(e)&&(e.prefix="",Ge(e,(s,i)=>{i&&Xe(s,i)&&(o=!0)})),o}const n=e.prefix;if(!Q({provider:t,prefix:n,name:"a"}))return!1;const r=k(t,n);return!!pe(r,e)}function pn(e){return!!F(e)}function hn(e){const t=F(e);return t?{...$,...t}:null}function gn(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=k(s,i));let u;a in l.icons?u=t.loaded:i===""||l.missing.has(a)?u=t.missing:u=t.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),t}function Ye(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function mn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(e.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(e.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Ye([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let bn=0;function yn(e,t,n){const r=bn++,o=Ye.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const se=Object.create(null);function Pe(e,t){se[e]=t}function ie(e){return se[e]||se[""]}function xn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?z(o,t,n):o;s&&r.push(s)}),r}var wn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function vn(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let h=e.resources.slice(0);for(i=[];h.length>1;){const v=Math.floor(Math.random()*h.length);i.push(h[v]),h=h.slice(0,v).concat(h.slice(v+1))}i=i.concat(h)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],g=[];typeof r=="function"&&g.push(r);function b(){d&&(clearTimeout(d),d=null)}function x(){c==="pending"&&(c="aborted"),b(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function I(h,v){v&&(g=[]),typeof h=="function"&&g.push(h)}function T(){return{startTime:a,payload:t,status:c,queriesSent:l,queriesPending:p.length,subscribe:I,abort:x}}function w(){c="failed",g.forEach(h=>{h(void 0,u)})}function y(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function M(h,v,j){const S=v!=="success";switch(p=p.filter(L=>L!==h),c){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(v==="abort"){u=j,w();return}if(S){u=j,p.length||(i.length?C():w());return}if(b(),y(),!e.random){const L=e.resources.indexOf(h.resource);L!==-1&&L!==e.index&&(e.index=L)}c="completed",g.forEach(L=>{L(j)})}function C(){if(c!=="pending")return;b();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{b(),c==="pending"&&(y(),w())},e.timeout);return}w();return}const v={status:"pending",resource:h,callback:(j,S)=>{M(v,j,S)}};p.push(v),l++,d=setTimeout(C,e.rotate),n(h,t,v.callback)}return setTimeout(C),T}function Ke(e){const t={...wn,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=vn(t,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function he(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Y=Object.create(null),E=["https://api.simplesvg.com","https://api.unisvg.com"],W=[];for(;E.length>0;)E.length===1||Math.random()>.5?W.push(E.shift()):W.push(E.pop());Y[""]=he({resources:["https://api.iconify.design"].concat(W)});function je(e,t){const n=he(t);return n===null?!1:(Y[e]=n,!0)}function K(e){return Y[e]}function In(){return Object.keys(Y)}function ke(){}const te=Object.create(null);function Cn(e){if(!te[e]){const t=K(e);if(!t)return;const n=Ke(t),r={config:t,redundancy:n};te[e]=r}return te[e]}function et(e,t,n){let r,o;if(typeof e=="string"){const s=ie(e);if(!s)return n(void 0,424),ke;o=s.send;const i=Cn(e);i&&(r=i.redundancy)}else{const s=he(e);if(s){r=Ke(s);const i=e.resources?e.resources[0]:"",a=ie(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),ke):r.query(t,o,n)().abort}const Le="iconify2",B="iconify",tt=B+"-count",Oe=B+"-version",nt=36e5,Sn=168;function ce(e,t){try{return e.getItem(t)}catch{}}function ge(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Me(e,t){try{e.removeItem(t)}catch{}}function ae(e,t){return ge(e,tt,t.toString())}function le(e){return parseInt(ce(e,tt))||0}const O={local:!0,session:!0},ot={local:new Set,session:new Set};let me=!1;function Tn(e){me=e}let U=typeof window>"u"?{}:window;function rt(e){const t=e+"Storage";try{if(U&&U[t]&&typeof U[t].length=="number")return U[t]}catch{}O[e]=!1}function st(e,t){const n=rt(e);if(!n)return;const r=ce(n,Oe);if(r!==Le){if(r){const a=le(n);for(let c=0;c<a;c++)Me(n,B+c.toString())}ge(n,Oe,Le),ae(n,0);return}const o=Math.floor(Date.now()/nt)-Sn,s=a=>{const c=B+a.toString(),l=ce(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,a))return!0}catch{}Me(n,c)}};let i=le(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,ae(n,i)):ot[e].add(a))}function it(){if(!me){Tn(!0);for(const e in O)st(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=k(r,o);if(!pe(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function An(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in O)st(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function Pn(e,t){me||it();function n(r){let o;if(!O[r]||!(o=rt(r)))return;const s=ot[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=le(o),!ae(o,i+1))return;const a={cached:Math.floor(Date.now()/nt),provider:e.provider,data:t};return ge(o,B+i.toString(),JSON.stringify(a))}t.lastModified&&!An(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Re(){}function jn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,mn(e)}))}function kn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=ie(n)))return;s.prepare(n,r,o).forEach(a=>{et(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{e.missing.add(l)});else try{const l=pe(e,c);if(!l.length)return;const u=e.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),Pn(e,c)}catch(l){console.error(l)}jn(e)})})}))}const be=(e,t)=>{const n=xn(e,!0,Je()),r=gn(n);if(!r.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(r.loaded,r.missing,r.pending,Re)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(k(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=k(l,u),g=p.pendingIcons||(p.pendingIcons=new Set);g.has(d)||(g.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&kn(c,o[l][u])}),t?yn(t,r,s):Re},Ln=e=>new Promise((t,n)=>{const r=typeof e=="string"?z(e,!0):e;if(!r){n(e);return}be([r||e],o=>{if(o.length&&r){const s=F(r);if(s){t({...$,...s});return}}n(e)})});function On(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function Mn(e,t){const n=typeof e=="string"?z(e,!0,!0):null;if(!n){const s=On(e);return{value:e,data:s}}const r=F(n);if(r!==void 0||!n.prefix)return{value:e,name:n,data:r};const o=be([n],()=>t(e,n,F(n)));return{value:e,name:n,loading:o}}function ne(e){return e.hasAttribute("inline")}let ct=!1;try{ct=navigator.vendor.indexOf("Apple")===0}catch{}function Rn(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(ct||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const En=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Nn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ue(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(En);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=Nn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const _n=e=>e==="unset"||e==="undefined"||e==="none";function at(e,t){const n={...$,...e},r={...Qe,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(b=>{const x=[],I=b.hFlip,T=b.vFlip;let w=b.rotate;I?T?w+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):T&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let y;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:y=o.height/2+o.top,x.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,x.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}w%2===1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),x.length&&(s='<g transform="'+x.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ue(d,c/l)):(u=i==="auto"?c:i,d=a===null?ue(u,l/c):a==="auto"?l:a);const p={},g=(b,x)=>{_n(x)||(p[b]=x.toString())};return g("width",u),g("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const qn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let X=qn();function Fn(e){X=e}function Bn(){return X}function $n(e,t){const n=K(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function zn(e){return e===404}const Hn=(e,t,n)=>{const r=[],o=$n(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Dn(e){if(typeof e=="string"){const t=K(e);if(t)return t.path}return"/"}const Vn=(e,t,n)=>{if(!X){n("abort",424);return}let r=Dn(t.provider);switch(t.type){case"icons":{const s=t.prefix,a=t.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;X(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(zn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},Un={prepare:Hn,send:Vn};function Ee(e,t){switch(e){case"local":case"session":O[e]=t;break;case"all":for(const n in O)O[n]=t;break}}const oe="data-style";let lt="";function Qn(e){lt=e}function Ne(e,t){let n=Array.from(e.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(oe));n||(n=document.createElement("style"),n.setAttribute(oe,oe),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+lt}function ut(){Pe("",Un),Je(!0);let e;try{e=window}catch{}if(e){if(it(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Ae(o))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;je(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Ee(n,!0),disableCache:n=>Ee(n,!1),iconExists:pn,getIcon:hn,listIcons:dn,addIcon:Xe,addCollection:Ae,calculateSize:ue,buildIcon:at,loadIcons:be,loadIcon:Ln,addAPIProvider:je,appendCustomStyle:Qn,_api:{getAPIConfig:K,setAPIModule:Pe,sendAPIQuery:et,setFetch:Fn,getFetch:Bn,listAPIProviders:In}}}function ft(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Wn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Gn(e){return"data:image/svg+xml,"+Wn(e)}function Zn(e){return'url("'+Gn(e)+'")'}const fe={"background-color":"currentColor"},dt={"background-color":"transparent"},_e={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},qe={"-webkit-mask":fe,mask:fe,background:dt};for(const e in qe){const t=qe[e];for(const n in _e)t[e+"-"+n]=_e[n]}function Fe(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Jn(e,t,n){const r=document.createElement("span");let o=e.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=e.attributes,i=ft(o,{...s,width:t.width+"",height:t.height+""}),a=Zn(i),c=r.style,l={"--svg":a,width:Fe(s.width),height:Fe(s.height),...n?fe:dt};for(const u in l)c.setProperty(u,l[u]);return r}let _;function Xn(){try{_=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{_=null}}function Yn(e){return _===void 0&&Xn(),_?_.createHTML(e):e}function Kn(e){const t=document.createElement("span"),n=e.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ft(e.body,n);return t.innerHTML=Yn(o),t.firstChild}function Be(e,t){const n=t.icon.data,r=t.customisations,o=at(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=t.renderedMode;let i;switch(s){case"svg":i=Kn(o);break;default:i=Jn(o,{...$,...n},s==="mask")}const a=Array.from(e.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):e.replaceChild(i,a):e.appendChild(i)}function $e(e,t,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:r}}function eo(e="iconify-icon"){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;const r=t.get(e);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();D(this,"_shadowRoot");D(this,"_state");D(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=ne(this);Ne(c,l),this._state=$e({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=ne(this),u=this._state;l!==u.inline&&(u.inline=l,Ne(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return ne(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Be(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=Se(this);(c.attrMode!==u||rn(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=Mn(c,(u,d,p)=>{const g=this._state;if(g.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:d,data:p};b.data?this._gotIconData(b):g.icon=b});l.data?this._gotIconData(l):this._state=$e(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Se(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=Rn(c.data.body,u),p=this._state.inline;Be(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ut();for(const a in i)s[a]=s.prototype[a]=i[a];return t.define(e,s),s}eo()||ut();const to=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),pt=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),H=(e,t,n="children")=>e.map(r=>Array.isArray(r[n])?t({...r,[n]:H(r[n],t,n)}):t(r)),no=(e,t="children")=>{const n=[];return H(e,r=>n.push(r),t),n},ye=(e,t,n="children")=>e.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=ye(o,t,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return t(r,s)}),oo=e=>/^https?:\/\//.test(e),ro=e=>{if(!e||!(e!=null&&e.startsWith("/")))return!1;const t=o=>o.endsWith("/")?o:`${o}/`,n=t(window.location.pathname),r=t(new URL(e,window.location.origin).pathname);return n.startsWith(r)},so=(e=[])=>{const t=e.map((r,o)=>({path:r,index:o})).filter(r=>ro(r.path));return t!=null&&t.length?t.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,t[0]).index:-1};var ze,He;const de=((ze=window==null?void 0:window.blocklet)==null?void 0:ze.groupPrefix)||((He=window==null?void 0:window.blocklet)==null?void 0:He.prefix)||"/",io=e=>{const t={...e},n=e==null?void 0:e.background;return typeof n=="string"?t.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(t.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),t},ht=(e,t="en")=>{if(!(e!=null&&e.length))return e;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(oo(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return H(e,o=>{var s;return{...o,title:n(o.title,t),link:(s=o.items)!=null&&s.length?o.link:r(o.link,t),_rawLink:o.link}},"items")},co=e=>H(e,t=>t.role?{...t,role:Array.isArray(t.role)?t.role:[t.role]}:t,"items"),ao=e=>{if(!(e!=null&&e.length))return null;const t=co(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return t.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},lo=e=>{if(!e)return null;const t={...e};return t.theme=io(t.theme),t.navigation=ao(uo(t.navigation)),t},uo=(e=[])=>ye(e,(t,n)=>{var r;return!!t.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),gt=(e,t)=>ye(e,(n,r)=>{var s;const o=!n.role||t&&n.role.includes(t);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),fo={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},po={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function xe({session:e,locale:t,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=e==null?void 0:e.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=A.useRef(null),i=Pt({open:!1}),a=jt((c=!i.open)=>{i.open=c});return o.length===0||!(e!=null&&e.user)?null:m.jsxs(m.Fragment,{children:[m.jsx(kt,{size:"medium",ref:s,onClick:()=>a(),children:m.jsx(Ce,{icon:fo,fontSize:n,style:{transform:"scale(1.08)"}})}),m.jsx(Lt,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>m.jsx(Ot,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:m.jsx(Mt,{...c,timeout:350,children:m.jsxs(Rt,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:P.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${P.gray6}, 0px 0px 0px 1px ${P.gray6}`},children:[m.jsx(Et,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u;return m.jsx(Wt,{disablePadding:!0,children:m.jsxs(Kt,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:P.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?m.jsx(Nt,{component:"img",src:`${_t}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):m.jsx(Ce,{fontSize:50,icon:l.icon||po,color:P.textSubtitle}),m.jsx(qt,{sx:{fontSize:"12px",color:P.textBase,textAlign:"center",lineHeight:"normal"},children:Ft(l.title,t)})]})},l.id)})}),m.jsx(Bt,{session:e,children:m.jsx($t,{variant:"outlined",fullWidth:!0,href:zt,sx:{mt:1,borderRadius:2,color:P.textBase,borderColor:P.lineBorderStrong,"&:hover":{color:P.primaryBase,borderColor:P.primaryBase}},children:t==="zh"?"管理":"Manage"})})]})})})})]})}xe.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};xe.defaultProps={locale:"en",size:24};function we({formattedBlocklet:e,addons:t,sessionManagerProps:n}){var p,g,b,x;const r=A.useContext(De),{locale:o}=Ve()||{},{enableConnect:s=!0,enableLocale:i=!0}=e,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=ht((g=e==null?void 0:e.navigation)==null?void 0:g.sessionManager,o)||[];c=gt(c,(x=(b=r==null?void 0:r.session)==null?void 0:b.user)==null?void 0:x.role);const u=(()=>{if(t&&typeof t!="function")return Array.isArray(t)?t:[t];let I=[];if(i&&o&&I.push(m.jsx(Gt,{showText:!1},"locale-selector")),s&&r){const T=[];a&&(c?c.slice(0,5):[]).forEach(y=>{T.push({label:y.title,icon:y.icon?m.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),I.push(m.jsx(xe,{session:r.session,locale:o},"session-blocklet")),I.push(m.jsx(Ht,{session:r.session,locale:o,menu:T,showRole:!0,...n},"session-user"))}return typeof t=="function"&&(I=t(I)||[]),I})();return A.createElement(m.Fragment,null,...Array.isArray(u)?u:[u])}we.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt};we.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const ho=()=>{const e=Dt();A.useEffect(()=>{e.wallet&&Vt.call("arcHideTopBar","{}")},[e])};function mt({meta:e,fallbackUrl:t,invalidPathFallback:n,headerAddons:r,sessionManagerProps:o,links:s,...i}){var M;ho();const a=A.useContext(De),c=(M=a==null?void 0:a.session)==null?void 0:M.user,l=c==null?void 0:c.role,{locale:u}=Ve()||{},d=A.useMemo(()=>{const C=Object.assign({},window.blocklet,e);try{return lo(C)}catch(h){return console.error("Failed to format blocklet info",h,C),C}},[e]),{localizedNav:p,flattened:g,matchedIndex:b}=A.useMemo(()=>{var j;let C=ht((j=d==null?void 0:d.navigation)==null?void 0:j.dashboard,u)||[];C=gt(C,l),C=H(C,S=>({title:S.title,url:S.link,icon:S.icon?m.jsx("iconify-icon",{height:"100%",width:"100%",icon:S.icon}):null,external:!0,children:S.items}),"items");const h=no(C).filter(S=>!!S.url),v=so(h.map(S=>S.url));return v!==-1&&(h[v].active=!0),{localizedNav:C,flattened:h,matchedIndex:v}},[d,u,l]),x=typeof s=="function"?s(p):[...p,...s];if(A.useLayoutEffect(()=>{c&&!(g!=null&&g.length)&&t&&(window.location.href=t)},[t]),A.useLayoutEffect(()=>{c&&(g!=null&&g.length)&&b===-1&&n&&n()},[n,g,b]),!d.appName)return null;const{appLogo:I,appLogoRect:T,appName:w}=d,y=m.jsx(we,{formattedBlocklet:d,addons:r,sessionManagerProps:o});return m.jsx(Ut,{title:w,fullWidth:!0,sidebarWidth:128,legacy:!1,links:x,...i,headerProps:{homeLink:de,logo:m.jsx("img",{src:T||I,alt:"logo"}),addons:y,...i.headerProps}})}mt.propTypes={meta:to,fallbackUrl:f.string,invalidPathFallback:f.func,headerAddons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt,links:f.oneOfType([f.array,f.func])};mt.defaultProps={meta:{},fallbackUrl:de,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=de}},links:[]};export{to as B,mt as D,we as H,Kt as L,no as a,so as b,lo as f,ht as g,oo as i,H as m,de as p,ho as u};