@abtnode/blocklet-services 1.16.42-beta-20250408-072924-4b6a877a → 1.16.42-beta-20250409-161010-b0a88c5c

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 (199) hide show
  1. package/api/index.js +1 -1
  2. package/api/routes/user-session.js +2 -2
  3. package/api/routes/user.js +36 -0
  4. package/api/services/auth/connect/destroy-myself.js +64 -0
  5. package/api/services/auth/index.js +2 -0
  6. package/api/services/auth/session.js +36 -16
  7. package/dist/assets/{ArrowDropDown-WXsjNpSB.js → ArrowDropDown-CDjPVis_.js} +1 -1
  8. package/dist/assets/{CheckCircle-D7CrWlJ6.js → CheckCircle-BHD7aj9l.js} +1 -1
  9. package/dist/assets/{ChevronLeft-DeulnkX8.js → ChevronLeft-CUdxcGLW.js} +1 -1
  10. package/dist/assets/{ChevronRight-CACHNf5Y.js → ChevronRight-Bol9kSyE.js} +1 -1
  11. package/dist/assets/{Community-BKnwgGcO.js → Community-Ds1NG5Zj.js} +1 -1
  12. package/dist/assets/{DeleteOutline-DT1G93_1.js → DeleteOutline-BiIEYa8g.js} +1 -1
  13. package/dist/assets/{Done-D9sjuoNQ.js → Done-kAy_Y9ti.js} +1 -1
  14. package/dist/assets/{Download-CBzqKt6X.js → Download-COul5Jpx.js} +1 -1
  15. package/dist/assets/{EditIcon-Bww8_WRx.js → EditIcon-Bt91o1l6.js} +1 -1
  16. package/dist/assets/{Email-C6-GXQIV.js → Email-C7SKOpM8.js} +1 -1
  17. package/dist/assets/{Error-l_WxG8z-.js → Error-xVtnHALO.js} +1 -1
  18. package/dist/assets/{ExpandLess-uIJAqSZm.js → ExpandLess-CW9G6ynD.js} +1 -1
  19. package/dist/assets/{Google-BchHLUIl.js → Google-D98Bf-5Y.js} +1 -1
  20. package/dist/assets/{Holiday-BSfwdA-4.js → Holiday-Dfj3kBBI.js} +1 -1
  21. package/dist/assets/{InfoOutlined-DFTm-vVr.js → InfoOutlined-jnMrCCfZ.js} +1 -1
  22. package/dist/assets/{Launch-DQCS90NS.js → Launch-DFNlDQlk.js} +1 -1
  23. package/dist/assets/{LaunchOutlined-DttrDnYo.js → LaunchOutlined-yZsgpXar.js} +1 -1
  24. package/dist/assets/{Location-CT1S5M1P.js → Location--4ueDivQ.js} +1 -1
  25. package/dist/assets/{LockIcon-kY343jXt.js → LockIcon-B84lMZao.js} +1 -1
  26. package/dist/assets/{Meeting-PVrGyQbK.js → Meeting-CVVnP-bH.js} +1 -1
  27. package/dist/assets/{MoreHoriz-BD8SroCJ.js → MoreHoriz-BqdKN70-.js} +1 -1
  28. package/dist/assets/{OffSick-DD3oLLQu.js → OffSick-C_2x7yDI.js} +1 -1
  29. package/dist/assets/{Phone-BcpEH3XZ.js → Phone-CaKOX2Yu.js} +1 -1
  30. package/dist/assets/{PlayArrow-BEUAi9Bt.js → PlayArrow-CXtQLadK.js} +1 -1
  31. package/dist/assets/{QuestionMarkCircle-BHP2onYz.js → QuestionMarkCircle-5K6WR8Pc.js} +1 -1
  32. package/dist/assets/{ServerLogo-Bi89KNz4.js → ServerLogo-C4P-qXGV.js} +1 -1
  33. package/dist/assets/{Timezone-Ce85fX7w.js → Timezone-Bgwxnj29.js} +1 -1
  34. package/dist/assets/{TuneOutlined-CzDTcEdK.js → TuneOutlined-EaV8HxdX.js} +1 -1
  35. package/dist/assets/{ViewList-6gwww-su.js → ViewList-BPuXZDcI.js} +1 -1
  36. package/dist/assets/{WorkingRemotely-DfgJTsRm.js → WorkingRemotely-Dm2BOs5c.js} +1 -1
  37. package/dist/assets/{access-control-BCncVk0F.js → access-control-CuKW2kRZ.js} +1 -1
  38. package/dist/assets/{actions-C9vqEgMU.js → actions-DqeM3yie.js} +1 -1
  39. package/dist/assets/{add-component-core-DmGxO5Gt.js → add-component-core-DXPSI3Ti.js} +15 -15
  40. package/dist/assets/add-resource-S3Z1zjbJ.js +1 -0
  41. package/dist/assets/{addon-BNDsoean.js → addon-B5UBB-pU.js} +1 -1
  42. package/dist/assets/{advanced-0AsHuHlx.js → advanced-Cvboset8.js} +1 -1
  43. package/dist/assets/api-BVwAqPhr.js +1 -0
  44. package/dist/assets/appearance-DmQgth7a.js +1 -0
  45. package/dist/assets/{audit-logs-7qd9PUxe.js → audit-logs-LLoqbniS.js} +3 -3
  46. package/dist/assets/{base32-CEWQZb_G.js → base32-CMrsHquD.js} +1 -1
  47. package/dist/assets/{branding-BZ7cTCXC.js → branding-BfxdFbW1.js} +2 -2
  48. package/dist/assets/{branding-NhPjoLxG.js → branding-DcviCyPr.js} +3 -3
  49. package/dist/assets/bundle-avatar-Ci9fNblN.js +1 -0
  50. package/dist/assets/button-OxbVr1Od.js +1 -0
  51. package/dist/assets/click-to-copy-q_I2l6Sg.js +1 -0
  52. package/dist/assets/cloneDeep-g5lbcy6_.js +1 -0
  53. package/dist/assets/complete-ogipf6id.js +45 -0
  54. package/dist/assets/{component-D1Fsjeuf.js → component-DVhWy5jQ.js} +1 -1
  55. package/dist/assets/{config-DXNBk8Sr.js → config-BdUShvO-.js} +1 -1
  56. package/dist/assets/{config-DoKTS37s.js → config-YsfQuvvt.js} +2 -2
  57. package/dist/assets/{config-navigation-DO0UJG5K.js → config-navigation-C4hgzi4R.js} +3 -3
  58. package/dist/assets/config-space-DJ-fZ6j4.js +1 -0
  59. package/dist/assets/{confirm-C-7TGRgW.js → confirm-C1Nde1Nq.js} +1 -1
  60. package/dist/assets/connect-BkxyLG9H.js +1 -0
  61. package/dist/assets/{connect-ZYp_tU0D.js → connect-dGBjAgNF.js} +1 -1
  62. package/dist/assets/connect-to-CdG3TX0A.js +1 -0
  63. package/dist/assets/{content-layout-uPtoKIAs.js → content-layout-Bs-vdQ_U.js} +1 -1
  64. package/dist/assets/dashboard-2jQIZ8v5.js +222 -0
  65. package/dist/assets/{delete-confirm-C_4zg33B.js → delete-confirm-CpPzqeJx.js} +1 -1
  66. package/dist/assets/{did-address-_2BUka_2.js → did-address-D-fI5ZyH.js} +1 -1
  67. package/dist/assets/{domain-3zeLA-KU.js → domain-1X_uRV9L.js} +1 -1
  68. package/dist/assets/{domain-action-card-BQASO--e.js → domain-action-card-Crwneu7N.js} +2 -2
  69. package/dist/assets/domains-BHkUaPc7.js +1 -0
  70. package/dist/assets/{email-hHeKrz9y.js → email-DGh9v0en.js} +3 -3
  71. package/dist/assets/{empty-spinner-CoimPnT0.js → empty-spinner-Cia24BVr.js} +1 -1
  72. package/dist/assets/exchange-passport-CgGOJDm9.js +1 -0
  73. package/dist/assets/{format-error-LAoTjvJe.js → format-error-BrmqJs5a.js} +1 -1
  74. package/dist/assets/{fuel-CDRdGVHi.js → fuel-CItPP5Vk.js} +1 -1
  75. package/dist/assets/{get-safe-url-B2pIo8YT.js → get-safe-url-B2BlmlqT.js} +1 -1
  76. package/dist/assets/{get-safe-url-M62JolcK.js → get-safe-url-C2N97NJc.js} +1 -1
  77. package/dist/assets/{home-D8xdbvkr.js → home-12LB7wlV.js} +1 -1
  78. package/dist/assets/{iframe-BGb_KeKZ.js → iframe-54rcs7kU.js} +1 -1
  79. package/dist/assets/{index-B9lZsGBd.js → index-0CgHVUpB.js} +1 -1
  80. package/dist/assets/{index-C07T63uR.js → index-3dawiJIg.js} +3 -3
  81. package/dist/assets/{index-CgA3yF4z.js → index-4WjT4o1e.js} +5 -5
  82. package/dist/assets/{index-C-E-0SKx.js → index-643kpB1h.js} +1 -1
  83. package/dist/assets/{index-BKSHPTts.js → index-9XJ5HzSd.js} +1 -1
  84. package/dist/assets/index-BIu-u1kW.js +1 -0
  85. package/dist/assets/{index-CKv9guDo.js → index-BTOIZL6e.js} +1 -1
  86. package/dist/assets/{index-DvDiL1rm.js → index-BYsXlcQC.js} +1 -1
  87. package/dist/assets/{index-BnqjZUkY.js → index-Bj10Vbvc.js} +4 -4
  88. package/dist/assets/index-C4dzrN-k.js +290 -0
  89. package/dist/assets/{index-BvyQFiS_.js → index-CB6NPYWM.js} +3 -3
  90. package/dist/assets/index-CFs0La6o.js +15 -0
  91. package/dist/assets/{index-pV_0wOyY.js → index-CPE8Apzb.js} +1 -1
  92. package/dist/assets/{index-_IytyGrM.js → index-CTpJt8AJ.js} +45 -45
  93. package/dist/assets/{index-BYC998Xz.js → index-Cuoxr9xB.js} +1 -1
  94. package/dist/assets/{index-IqOEMaG7.js → index-D5G2v7wN.js} +2 -2
  95. package/dist/assets/{index-CqRb1YIC.js → index-DKPGWA5E.js} +1 -1
  96. package/dist/assets/{index-D1iI5v2e.js → index-DQC9zneB.js} +11 -11
  97. package/dist/assets/{index-tUQxVYYQ.js → index-DVQCgvFb.js} +1 -1
  98. package/dist/assets/index-DVogNW6l.js +1 -0
  99. package/dist/assets/{index-CDJctLrv.js → index-DkZfhapD.js} +1 -1
  100. package/dist/assets/{index-Br2EGTW4.js → index-Du71d9ZJ.js} +1 -1
  101. package/dist/assets/{index-CfxqxAZd.js → index-G26gYrxE.js} +2 -2
  102. package/dist/assets/{index-Cc1EUVvj.js → index-YqrAgavD.js} +1 -1
  103. package/dist/assets/{index-njqCeZqY.js → index-jny05NvM.js} +30 -30
  104. package/dist/assets/{invitation-CXLQmmNG.js → invitation-BBqRmSx1.js} +6 -6
  105. package/dist/assets/invite-CKxzd-7d.js +1 -0
  106. package/dist/assets/issue-passport-BA7u3NC-.js +1 -0
  107. package/dist/assets/{item-BMOFJ72c.js → item-DssQyiFI.js} +2 -2
  108. package/dist/assets/landing-page-2uYUfHoY.js +1 -0
  109. package/dist/assets/{launch-result-message-DvcvHHH1.js → launch-result-message-C0Ao1hE-.js} +1 -1
  110. package/dist/assets/{layout-DdaOYlXg.js → layout-R4Ynfcbq.js} +2 -2
  111. package/dist/assets/{list-Df4vHNiY.js → list-BhXWs05I.js} +18 -9
  112. package/dist/assets/{list-header-DvakxkxK.js → list-header-BibBP5t1.js} +1 -1
  113. package/dist/assets/localization-BsSUbpzO.js +1 -0
  114. package/dist/assets/{log-B1ojA9lx.js → log-D4PQ7UF3.js} +7 -7
  115. package/dist/assets/{login-BkqQC8IM.js → login-CuCcTu--.js} +1 -1
  116. package/dist/assets/{login-oauth-callback-CfaWz0tg.js → login-oauth-callback-BzcAZfXM.js} +1 -1
  117. package/dist/assets/{logo-uploader-D6hawLMA.js → logo-uploader-C9TwiAKx.js} +3 -3
  118. package/dist/assets/{lost-passport-CnWrxxcj.js → lost-passport-DD7XCIgg.js} +4 -4
  119. package/dist/assets/{lottie-react.esm-CPHH620R.js → lottie-react.esm-D2t-u0YU.js} +1 -1
  120. package/dist/assets/{lottie-web-B6s7dDoL.js → lottie-web-jYmAQWuC.js} +1 -1
  121. package/dist/assets/omit-DF3Nt1_-.js +1 -0
  122. package/dist/assets/{open-window-DMkA-B_A.js → open-window-Dsc5mHei.js} +1 -1
  123. package/dist/assets/{overview-vOO_cwfO.js → overview-BjFpvrpN.js} +2 -2
  124. package/dist/assets/{page-header-D3dCkXy7.js → page-header-B7j9M6Zp.js} +1 -1
  125. package/dist/assets/{permission-ClAqVelD.js → permission-CLAOGeOf.js} +1 -1
  126. package/dist/assets/preferences-qZW-dsds.js +1 -0
  127. package/dist/assets/profile-embed-6mTqkL03.js +1 -0
  128. package/dist/assets/publish-resource-DO-PRxdk.js +1 -0
  129. package/dist/assets/{raf-schd.esm-GV-XhwE0.js → raf-schd.esm-B3j6BePR.js} +1 -1
  130. package/dist/assets/{react-beautiful-dnd.esm-Cx5BcFIr.js → react-beautiful-dnd.esm-Bu3K07pf.js} +1 -1
  131. package/dist/assets/{relative-time-BnXa0sIK.js → relative-time-Cu4jaQ9H.js} +1 -1
  132. package/dist/assets/{runtime-DmT1MY2S.js → runtime-kNyRK8Hy.js} +1 -1
  133. package/dist/assets/sdk-BjsIctsl.js +1 -0
  134. package/dist/assets/{security-CQrJSvNH.js → security-Dkk4FgYt.js} +4 -4
  135. package/dist/assets/session-UJ7B0EdV.js +1 -0
  136. package/dist/assets/{setup-CH6etNsI.js → setup-SAEzURDR.js} +3 -3
  137. package/dist/assets/{shorten-label-C642GTxb.js → shorten-label-DDBwv81M.js} +1 -1
  138. package/dist/assets/{simple-select-i-SepLIh.js → simple-select-vCKkiHhG.js} +1 -1
  139. package/dist/assets/{slicedToArray-B6WXjdrb.js → slicedToArray-Da5X2Yv5.js} +1 -1
  140. package/dist/assets/spaces-B_lJq3Uz.js +1 -0
  141. package/dist/assets/{start-BC37Pmt4.js → start-C53MN0u7.js} +1 -1
  142. package/dist/assets/status-5Z1CW-le.js +1 -0
  143. package/dist/assets/{step-actions-BIyonirh.js → step-actions-CujnheOz.js} +1 -1
  144. package/dist/assets/{studio-Bv91lan_.js → studio-BYzuzhpL.js} +1 -1
  145. package/dist/assets/{switch-control-DjMziEFc.js → switch-control-DWiX5YiK.js} +1 -1
  146. package/dist/assets/{traffic-D72BUoUS.js → traffic-WemHsP0B.js} +3 -3
  147. package/dist/assets/{transfer-DCQoefO3.js → transfer-CF7CWbdm.js} +1 -1
  148. package/dist/assets/{unsubscribe-DiXKNJyN.js → unsubscribe-Dfof7yLG.js} +1 -1
  149. package/dist/assets/{use-mobile-B_Gqv6b6.js → use-mobile-DjnNmGRG.js} +1 -1
  150. package/dist/assets/{use-mobile-DudfIz3d.js → use-mobile-DpXDDjat.js} +1 -1
  151. package/dist/assets/{useAsync-BmuLIImU.js → useAsync-De6s-0n9.js} +1 -1
  152. package/dist/assets/{useAsyncRetry-CwtLImQi.js → useAsyncRetry-B6OdNqyX.js} +1 -1
  153. package/dist/assets/{useLocalStorage-C1_Fkr6_.js → useLocalStorage-DLwAkPmo.js} +1 -1
  154. package/dist/assets/{useSetState-BL3ktMon.js → useSetState-CWq0AVWn.js} +1 -1
  155. package/dist/assets/{user-center-BjZ6YsoY.js → user-center-CowUpoIn.js} +3 -3
  156. package/dist/assets/{util-CORzDFgw.js → util-B6E4W35Y.js} +1 -1
  157. package/dist/assets/util-C57yoAn6.js +1 -0
  158. package/dist/assets/{vendor-arcblock-D8eCUoJY.js → vendor-arcblock-CD8CMsgQ.js} +148 -81
  159. package/dist/assets/{vendor-hooks-DtYI0-rF.js → vendor-hooks-8r-lvvPs.js} +1 -1
  160. package/dist/assets/{vendor-mui-core-C-PhacC8.js → vendor-mui-core-1jJmAutq.js} +2 -2
  161. package/dist/assets/{vendor-mui-x-BiTj3AZC.js → vendor-mui-x-CPwlD3uT.js} +1 -1
  162. package/dist/assets/{vendor-react-DoD83n6N.js → vendor-react-DEoibe3W.js} +1 -1
  163. package/dist/assets/{vendor-utils-CRBr0QUY.js → vendor-utils-Cm2BKG2b.js} +6 -6
  164. package/dist/assets/{vendor-ux-did-connect-BQ3cvv_1.js → vendor-ux-did-connect-DlrX4cqq.js} +4 -4
  165. package/dist/assets/{wrap-locale-Bn6cqCkC.js → wrap-locale-NNP_yq5G.js} +1 -1
  166. package/dist/index.html +8 -8
  167. package/dist/service-worker.js +1 -1
  168. package/package.json +29 -29
  169. package/dist/assets/add-resource-CJU0s3QQ.js +0 -1
  170. package/dist/assets/api-DlN8K5Jg.js +0 -1
  171. package/dist/assets/appearance-Bw3QRuyJ.js +0 -1
  172. package/dist/assets/bundle-avatar-Ue_TyBqv.js +0 -1
  173. package/dist/assets/button-BQLtMsfK.js +0 -1
  174. package/dist/assets/click-to-copy-CkbZjUXU.js +0 -1
  175. package/dist/assets/cloneDeep-C7Ok409J.js +0 -1
  176. package/dist/assets/complete-Tyckm-4M.js +0 -45
  177. package/dist/assets/config-space-BNW8EpAm.js +0 -1
  178. package/dist/assets/connect-BLlTMxXk.js +0 -1
  179. package/dist/assets/connect-to-h4a_nz1y.js +0 -1
  180. package/dist/assets/dashboard-B9esZ0M-.js +0 -213
  181. package/dist/assets/domains-DTccX50O.js +0 -1
  182. package/dist/assets/exchange-passport-Bt6kGDIV.js +0 -1
  183. package/dist/assets/index-Be9flGYn.js +0 -1
  184. package/dist/assets/index-BvyKTiWe.js +0 -15
  185. package/dist/assets/index-C7X4Y3ad.js +0 -1
  186. package/dist/assets/index-IaaNyqXG.js +0 -290
  187. package/dist/assets/invite-BZt83O3H.js +0 -1
  188. package/dist/assets/issue-passport-CrCyp4XY.js +0 -1
  189. package/dist/assets/landing-page-Dl8nGCZh.js +0 -1
  190. package/dist/assets/localization-rR3sV7At.js +0 -1
  191. package/dist/assets/omit-r8RGw6zD.js +0 -1
  192. package/dist/assets/preferences-YM19d1y9.js +0 -1
  193. package/dist/assets/profile-embed-DJJJzari.js +0 -1
  194. package/dist/assets/publish-resource-OeE_Sv8p.js +0 -1
  195. package/dist/assets/sdk-DRBcrGrS.js +0 -1
  196. package/dist/assets/session-Clq9kJzg.js +0 -1
  197. package/dist/assets/spaces-BBAv0vs3.js +0 -1
  198. package/dist/assets/status-Dz-0ViGp.js +0 -1
  199. package/dist/assets/util-CllYCEyt.js +0 -1
@@ -0,0 +1,222 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-D4PQ7UF3.js","assets/vendor-mui-core-1jJmAutq.js","assets/vendor-react-DEoibe3W.js","assets/useLocalStorage-DLwAkPmo.js","assets/vendor-ux-did-connect-DlrX4cqq.js","assets/vendor-utils-Cm2BKG2b.js","assets/vendor-hooks-8r-lvvPs.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-BDmhBveY.css","assets/index-CTpJt8AJ.js","assets/vendor-arcblock-CD8CMsgQ.js","assets/Download-COul5Jpx.js","assets/bundle-avatar-Ci9fNblN.js","assets/log-D33dFtt_.css","assets/index-jny05NvM.js","assets/index-DVQCgvFb.js","assets/ViewList-BPuXZDcI.js","assets/did-address-D-fI5ZyH.js","assets/permission-CLAOGeOf.js","assets/session-UJ7B0EdV.js","assets/click-to-copy-q_I2l6Sg.js","assets/format-error-BrmqJs5a.js","assets/useAsync-De6s-0n9.js","assets/index-DKPGWA5E.js","assets/DeleteOutline-BiIEYa8g.js","assets/confirm-C1Nde1Nq.js","assets/util-B6E4W35Y.js","assets/base32-CMrsHquD.js","assets/sdk-BjsIctsl.js","assets/index-YqrAgavD.js","assets/actions-DqeM3yie.js","assets/MoreHoriz-BqdKN70-.js","assets/shorten-label-DDBwv81M.js","assets/PlayArrow-CXtQLadK.js","assets/get-safe-url-C2N97NJc.js","assets/index-DVogNW6l.js","assets/useAsyncRetry-B6OdNqyX.js","assets/InfoOutlined-jnMrCCfZ.js","assets/useSetState-CWq0AVWn.js","assets/use-mobile-DjnNmGRG.js","assets/index-G26gYrxE.js","assets/ExpandLess-CW9G6ynD.js","assets/index-DQC9zneB.js","assets/Error-xVtnHALO.js","assets/empty-spinner-Cia24BVr.js","assets/list-header-BibBP5t1.js","assets/QuestionMarkCircle-5K6WR8Pc.js","assets/index-Cuoxr9xB.js","assets/api-BVwAqPhr.js","assets/ChevronRight-Bol9kSyE.js","assets/vendor-mui-x-CPwlD3uT.js","assets/react-beautiful-dnd.esm-Bu3K07pf.js","assets/raf-schd.esm-B3j6BePR.js","assets/item-DssQyiFI.js","assets/Launch-DFNlDQlk.js","assets/Done-kAy_Y9ti.js","assets/delete-confirm-CpPzqeJx.js","assets/ArrowDropDown-CDjPVis_.js","assets/index-BTOIZL6e.js","assets/index-D4PP6P2d.css","assets/index-BYsXlcQC.js","assets/overview-BjFpvrpN.js","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/status-5Z1CW-le.js","assets/omit-DF3Nt1_-.js","assets/spaces-B_lJq3Uz.js","assets/domains-BHkUaPc7.js","assets/domain-action-card-Crwneu7N.js","assets/util-C57yoAn6.js","assets/CheckCircle-BHD7aj9l.js","assets/index-C4dzrN-k.js","assets/Google-D98Bf-5Y.js","assets/cloneDeep-g5lbcy6_.js","assets/EditIcon-Bt91o1l6.js","assets/LockIcon-B84lMZao.js","assets/appearance-DmQgth7a.js","assets/iframe-54rcs7kU.js","assets/audit-logs-LLoqbniS.js","assets/relative-time-Cu4jaQ9H.js","assets/index-Bj10Vbvc.js","assets/list-BhXWs05I.js","assets/traffic-WemHsP0B.js","assets/LaunchOutlined-yZsgpXar.js","assets/ChevronLeft-CUdxcGLW.js","assets/index-DkZfhapD.js","assets/config-navigation-C4hgzi4R.js","assets/slicedToArray-Da5X2Yv5.js","assets/index-0CgHVUpB.js","assets/simple-select-vCKkiHhG.js","assets/index-3dawiJIg.js","assets/use-mobile-DpXDDjat.js","assets/connect-to-CdG3TX0A.js","assets/config-space-DJ-fZ6j4.js","assets/index-643kpB1h.js","assets/switch-control-DWiX5YiK.js","assets/index-CFs0La6o.js","assets/security-Dkk4FgYt.js","assets/config-BdUShvO-.js","assets/branding-DcviCyPr.js","assets/logo-uploader-C9TwiAKx.js","assets/advanced-Cvboset8.js","assets/runtime-kNyRK8Hy.js","assets/component-DVhWy5jQ.js","assets/TuneOutlined-EaV8HxdX.js","assets/add-component-core-DXPSI3Ti.js","assets/launch-result-message-C0Ao1hE-.js","assets/page-header-B7j9M6Zp.js","assets/index-D5G2v7wN.js","assets/content-layout-Bs-vdQ_U.js","assets/add-component-core-D-IRi6XF.css","assets/index-Du71d9ZJ.js"])))=>i.map(i=>d[i]);
2
+ import{c as Oe,u as gn,p as io,h as Ot,f as yn,b as xn,e as oo,i as ao,g as lo,m as co,j as $s,D as uo,E as fo,k as po,H as mo,_ as Y,R as ho}from"./vendor-arcblock-CD8CMsgQ.js";import{E as O,j as o,a2 as we,aa as De,I as Qt,aj as go,ad as vn,al as Wr,ak as yo,b3 as xo,a3 as ze,b4 as vo,bt as bo,T as pe,bC as _o,br as gt,bD as Ns,a4 as U,a5 as Vt,bE as wo,t as Re,$ as Zt,bF as jo,a6 as So,bh as Co,ai as Kr,bG as bn,bH as Ao,am as Eo,ab as To,M as Te,bs as Er,bn as Fe,bI as _n,bJ as wn,bK as jn,A as Ge,b2 as Sn,bj as ko}from"./vendor-mui-core-1jJmAutq.js";import{r as L,L as Cn,f as An,b as z,g as En,u as Ro,l as Io}from"./vendor-react-DEoibe3W.js";import{r as je,b1 as Do,a$ as Jt,b2 as Lo,B as Ze,p as ie,a2 as Us,Z as ne,u as he,an as Po,b3 as Fo,v as Tn,i as Gr,q as Oo,d as Vo,X as Qr,M as Mo,o as $o,a5 as kn,ar as Rn,C as Mt,b4 as No,b5 as Uo,$ as Bs,al as Bo}from"./vendor-ux-did-connect-DlrX4cqq.js";import{z as ot,f as xe,A as ar,B as zo,b as Ho,C as Zr,D as qo,E as In,t as rt,F as Dn,G as Wo,n as at,H as Ko,I as Go,j as zs,g as Qo,h as Zo,l as Hs,k as Jo,m as Yo,J as It,e as At,K as Xo,L as ea,N as ta,M as lr,c as qs}from"./index-CTpJt8AJ.js";import{a9 as ra,y as Yt,aa as sa,z as Dt,H as Ln,x as Pn}from"./vendor-utils-Cm2BKG2b.js";import{_ as Ws}from"./useLocalStorage-DLwAkPmo.js";import{C as Ks}from"./confirm-C1Nde1Nq.js";import{d as na}from"./PlayArrow-CXtQLadK.js";import{g as Gs}from"./get-safe-url-C2N97NJc.js";import{f as Jr}from"./format-error-BrmqJs5a.js";import{i as ia,u as oa,M as aa,c as yt,s as $t,H as la,p as Fn,B as ca}from"./index-DVogNW6l.js";import{u as On}from"./session-UJ7B0EdV.js";import{D as ua,_ as Vn}from"./useAsyncRetry-B6OdNqyX.js";import{f as Je,a as Mn,u as fe,v as da}from"./vendor-hooks-8r-lvvPs.js";import{d as fa}from"./InfoOutlined-jnMrCCfZ.js";import{_ as $n}from"./useSetState-CWq0AVWn.js";import{u as pa}from"./use-mobile-DjnNmGRG.js";const Nn=L.createContext({});function Yr({children:e,type:r}){const[t,s]=L.useState([]),n=L.useRef([]),i=c=>{if(!n.current.includes(c)){const d=[...n.current,c];s(d),n.current=d}},a=c=>{if(n.current.includes(c)){const d=n.current.filter(f=>f!==c);s(d),n.current=d}},l=c=>{const d=t.filter(p=>c.find(g=>g===p));ra(d,t).forEach(p=>a(p))};return o.jsx(Nn.Provider,{value:{type:r,deletingBlocklets:t,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:l},children:e})}Yr.propTypes={type:O.string,children:O.node.isRequired};Yr.defaultProps={type:"blocklets"};function Ed(){return L.useContext(Nn)}var Xr={},ma=we;Object.defineProperty(Xr,"__esModule",{value:!0});var Un=Xr.default=void 0,ha=ma(je()),ga=o;Un=Xr.default=(0,ha.default)((0,ga.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var es={},ya=we;Object.defineProperty(es,"__esModule",{value:!0});var Bn=es.default=void 0,xa=ya(je()),va=o;Bn=es.default=(0,xa.default)((0,va.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var ts={},ba=we;Object.defineProperty(ts,"__esModule",{value:!0});var zn=ts.default=void 0,_a=ba(je()),wa=o;zn=ts.default=(0,_a.default)((0,wa.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var rs={},ja=we;Object.defineProperty(rs,"__esModule",{value:!0});var ss=rs.default=void 0,Sa=ja(je()),Ca=o;ss=rs.default=(0,Sa.default)((0,Ca.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var ns={},Aa=we;Object.defineProperty(ns,"__esModule",{value:!0});var Hn=ns.default=void 0,Ea=Aa(je()),Ta=o;Hn=ns.default=(0,Ea.default)((0,Ta.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var is={},ka=we;Object.defineProperty(is,"__esModule",{value:!0});var qn=is.default=void 0,Ra=ka(je()),Ia=o;qn=is.default=(0,Ra.default)((0,Ia.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var os={},Da=we;Object.defineProperty(os,"__esModule",{value:!0});var Wn=os.default=void 0,La=Da(je()),Pa=o;Wn=os.default=(0,La.default)((0,Pa.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var as=function(e){return o.jsx("svg",{...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})})};as.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};as.displayName="dashboard";var ls={},Fa=we;Object.defineProperty(ls,"__esModule",{value:!0});var Kn=ls.default=void 0,Oa=Fa(je()),Va=o;Kn=ls.default=(0,Oa.default)((0,Va.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const et={Start:na,Stop:Un,Restart:Bn,Reload:zn,Remove:Do,Config:ss,Log:Hn,Group:qn,Cancel:Wn,Dashboard:as,Overview:Kn},Ma=(e,r)=>{if(!e)return"";const t=new URL(e),s=new URLSearchParams(t.searchParams),n=new URL(Yt(t.origin,r));return n.search=s.toString(),n.toString()},$a="internal",Na="external";function cs({blocklet:e,onStart:r,onComplete:t,variant:s,hasPermission:n,getComponentUrl:i,useBlockletUrlEvaluation:a,...l}){const c=ot(),[d,f]=L.useState(null),[p,g]=L.useState(null),[j,T]=L.useState(!1),[k,M]=L.useState(null),{t:y}=L.useContext(Jt),[v]=Ws("skip-blocklet-setup",!1),{loading:I,recommendedUrl:B}=a(e),[_]=Ws("blocklet-type-filter",$a),h=xe.isInProgress(e.status),[w,S]=L.useState(!1);L.useEffect(()=>{var Q,ae;if(!(e!=null&&e.controller))return;S(((ae=(Q=e==null?void 0:e.controller)==null?void 0:Q.status)==null?void 0:ae.value)===Oe.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var ge,ve,Le;try{const le=await c.api.getLauncherSession({input:{launcherSessionId:(ge=e==null?void 0:e.controller)==null?void 0:ge.launcherSessionId,launcherUrl:(ve=e==null?void 0:e.controller)==null?void 0:ve.launcherUrl}});if(le!=null&&le.error){console.error("get launcher session failed",le.error);return}S([ie.LAUNCH_SESSION_STATUS.overdue,ie.LAUNCH_SESSION_STATUS.canceled,ie.LAUNCH_SESSION_STATUS.terminated].includes((Le=le==null?void 0:le.launcherSession)==null?void 0:Le.status))}catch(le){console.error("call getLauncherSession error",le)}})()},[]);const{inService:A}=c,b=(F,Q,ae=!1)=>async()=>{const ge=async Me=>{var Xe;r({action:F,blocklet:e}),T(!0),g(F);let We=!1;try{if(F==="remove")await Q(Me);else if(F==="start"){if(!xe.hasRunnableComponent(e)){ne.error(y("blocklet.noComponent"));return}if(!A&&!v&&!((Xe=e.settings)!=null&&Xe.initialized)&&e.mode!==Oe.BLOCKLET_MODES.DEVELOPMENT){if(!B||!Us(B)){ne.error(y("blocklet.gotoVisitError"));return}const ye=zo(c.info),ct=new URL(B);ct.searchParams.set("serverUrl",ye),window.open(Gs(ct.href,{allowDomains:null})),t({action:F,blocklet:e});return}const Ee=e.children.filter(ye=>!xe.isInProgress(ye.status)&&ye.status!=="running").map(ye=>ye.meta.did),$e={did:e.meta.did,componentDids:Ee};await Q({input:$e})}else if(["stop","restart","reload"].includes(F)){const Ee=e.children.filter(ye=>ye.status==="running").map(ye=>ye.meta.did),$e={did:e.meta.did,componentDids:Ee};await Q({input:$e})}else{const Ee={did:e.meta.did};await Q({input:Ee})}F==="remove"?We=!0:await Ho(1e3),F==="reload"&&ne.success(y("blocklet.reloadSuccess")),M(null),t({action:F,blocklet:e})}catch(Ee){const $e=`Blocklet ${F} failed: ${Jr(Ee)}`;throw t({action:F,blocklet:e,error:new Error($e)}),new Error($e)}finally{We||T(!1)}},ve=()=>{T(!1),M(null)},Le=xe.getDisplayName(e,!0),le=e.mode===Oe.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(pe,{component:"div",children:o.jsx(pe,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Me,We)=>o.jsxs(pe,{component:"div",children:[o.jsx(pe,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")}),o.jsxs(_o,{name:"removeType",value:Me.removeType,onChange:Xe=>We({...Me,removeType:Xe.target.value}),children:[o.jsx(gt,{value:"backup",control:o.jsx(Ns,{}),label:y("blocklet.action.removeApplicationAfterBackup")}),o.jsx(gt,{value:"complete",control:o.jsx(Ns,{}),label:y("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Ct={stop:{title:`${y("common.stop")} ${Le}`,description:y("blocklet.action.stopDescription"),confirm:y("blocklet.action.confirmStop"),cancel:y("common.cancel"),onConfirm:ge,onCancel:ve},restart:{title:`${y("common.restart")} ${Le}`,description:y("blocklet.action.restartDescription"),confirm:y("blocklet.action.confirmRestart"),cancel:y("common.cancel"),onConfirm:ge,onCancel:ve},remove:{title:`${y("common.remove")} ${Le}`,confirm:y("blocklet.action.confirmRemove"),cancel:y("common.cancel"),onConfirm:ge,onCancel:ve,...le},cancelDownload:{title:`${y("common.cancel")}`,description:y("blocklet.action.cancelDownloadDescription",{name:Le}),confirm:y("common.confirm"),cancel:y("common.cancel"),onConfirm:ge,onCancel:ve}};ae?M(Ct[F]):await ge()},P=!!d,V=F=>{try{F.stopPropagation(),F.preventDefault()}catch{}f(F.currentTarget)},$=F=>{try{F.stopPropagation(),F.preventDefault()}catch{}f(null)},H=async(F,Q)=>{try{Q.stopPropagation(),Q.preventDefault()}catch{}if(typeof F.handler=="function")try{T(!0),g(F.action),await F.handler()}catch(ae){console.error(`Blocklet ${F.name} failed: `,ae)}finally{T(!1),f(null)}else f(null)},W=!A&&xe.isDeletableBlocklet(e)?{action:"remove",icon:et.Remove,name:y("common.remove"),handler:b("remove",async({removeType:F})=>{F==="backup"&&await c.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await c.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:h}:null,oe={action:"remove",icon:({sx:F,...Q})=>o.jsx(et.Cancel,{sx:{...F,paddingRight:"2px",zoom:.95},...Q}),name:y("common.cancel"),handler:b("cancelDownload",c.api.cancelDownloadBlocklet,!0)},de=xe.getAppMissingConfigs(e),qe=()=>{var ge;const F=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),Q=i==null?void 0:i({mountPoint:F,blocklet:e});if(!Q||!Us(Q)){ne.error(y("blocklet.gotoVisitError"));return}const ae=(ge=e==null?void 0:e.site)==null?void 0:ge.domainAliases;window.open(Gs(Ma(Q,".well-known/service/admin"),{allowDomains:ae==null?void 0:ae.map(ve=>ve.value)}))};let Ae=[{action:"start",icon:et.Start,inExternal:!0,name:y("common.start"),handler:b("start",c.api.startBlocklet),disabled:w||e.children.every(F=>F.status==="running")||ar(e.status)||I||h},{action:"stop",icon:et.Stop,inExternal:!0,name:y("common.stop"),handler:b("stop",c.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:et.Restart,name:y("common.restart"),handler:b("restart",c.api.restartBlocklet,!0),disabled:w||e.status!=="running"},ar(e.status)?oe:W,{separator:!0},A?null:{action:"dashboard",icon:({style:F,...Q})=>o.jsx(et.Dashboard,{...Q,style:{...F,width:"26px",height:"26px",paddingRight:"3px"}}),name:y("sidebar.dashboard"),handler:qe}].filter(Boolean);return _===Na&&(Ae=Ae.filter(F=>F.inExternal)),s==="menu"?o.jsxs(Qs,{"data-cy":"blocklet-actions",children:[o.jsx(Qt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:V,size:"small",disabled:!n||!ar(e.status)&&j,children:o.jsx(Lo,{})}),o.jsxs(go,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:P,onClose:$,PaperProps:{},children:[de.length>0&&o.jsxs(vn,{style:{maxWidth:"400px"},severity:"error",children:[y("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(Cn,{to:`/blocklets/${e.meta.did}/components`,children:y("blocklet.config.gotoFix")})]}),Ae.map((F,Q)=>F.separator?o.jsx(Wr,{},`separator-${Q}`):o.jsxs(yo,{dense:!0,onClick:ae=>H(F,ae),disabled:j||F.disabled,"data-cy":`${F.action}-blocklet`,children:[o.jsx(xo,{style:{minWidth:24},children:p===F.action&&j?o.jsx(ze,{size:16,sx:{marginRight:1}}):o.jsx(F.icon,{fontSize:"small"})}),o.jsx(vo,{primary:F.name})]},F.name))]}),k&&o.jsx(Ks,{title:k.title,description:k.description,confirm:k.confirm,cancel:k.cancel,params:k.params,onConfirm:k.onConfirm,onCancel:k.onCancel})]}):o.jsxs(Qs,{"data-cy":"blocklet-actions",...l,children:[o.jsx(bo,{children:Ae.filter(F=>!F.separator&&!F.onlyInMenu).map(F=>o.jsxs(Ze,{title:F.name,"data-cy":`${F.action}-blocklet`,onClick:()=>H(F),disabled:!!F.disabled||j,children:[p===F.action&&j?o.jsx(ze,{size:16,sx:{marginRight:1}}):o.jsx(F.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:F.name})]},F.name))}),k&&o.jsx(Ks,{title:k.title,description:k.description,confirm:k.confirm,cancel:k.cancel,params:k.params,onConfirm:k.onConfirm,onCancel:k.onCancel})]})}cs.propTypes={getComponentUrl:O.func,blocklet:O.object.isRequired,onStart:O.func.isRequired,onComplete:O.func.isRequired,variant:O.oneOf(["menu","group"]),hasPermission:O.bool,useBlockletUrlEvaluation:O.func};cs.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const Qs=De.div`
3
+ display: flex;
4
+ align-items: center;
5
+
6
+ @media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
7
+ .MuiButton-root {
8
+ padding: 4px;
9
+ font-size: 10px;
10
+ }
11
+ }
12
+ `,Ua=L.memo(cs),Ba=e=>{const r={};let t=null;return xe.forEachBlockletSync(e,s=>{r[s.meta.bundleDid]?t=xe.getDisplayName(s,!0):s.meta.bundleDid&&(r[s.meta.bundleDid]=!0)}),t},za=(e,r,t)=>{var i;const{hostname:s,href:n}=e;if(!r)return n;if(t){const l=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(s);if(!l)return n;const c=l[0],f=((((i=r.site)==null?void 0:i.domainAliases)||[]).map(p=>p.value).filter(Boolean).find(p=>p.endsWith(ie.DEFAULT_DID_DOMAIN))||"").replace(`.${ie.DEFAULT_DID_DOMAIN}`,"");return f?n.replace(s,`${f}-${c}.${ie.DEFAULT_IP_DOMAIN_SUFFIX}`):n}return n.replace(r.meta.bundleDid,r.appPid)};function Gn(){const{t:e}=he(),{api:r}=On(),{blocklet:t}=Zr(),{inService:s}=ot(),[n,i]=L.useState(!1),[a,l]=L.useState(5),c=t&&t.structVersion!==ie.APP_STRUCT_VERSION,d=()=>{try{if(t.status==="running"){ne.error(e("blocklet.migrate.tip.running"));return}const g=Ba(t);if(g){ne.error(e("blocklet.migrate.tip.duplicate",{name:g}));return}i(!0)}catch(g){ne.error(Jr(g))}},f=()=>{const g=za(window.location,t,s);setTimeout(()=>{window.location.href=g},5e3),l(5),setInterval(()=>{l(j=>j-1)},1e3)},p=()=>i(!1);return[c&&o.jsxs(vn,{severity:"warning",style:{margin:"12px 0"},children:[o.jsxs(U,{display:"flex",alignItems:"center",children:[o.jsx(Ze,{variant:"contained",size:"small",color:"primary",onClick:()=>d(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),o.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(g=>o.jsx(U,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${g}`)},g))]},"alert"),t&&o.jsx(Po,{popup:!0,open:n,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:r.get,checkTimeout:5*60*1e3,onSuccess:f,extraParams:{appDid:t.appDid,did:t.meta.did,wt:qo(t,!0),title:xe.getDisplayName(t)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:a>=0?e("blocklet.migrate.success",{sec:a}):"Redirecting..."},onClose:p},"connect")]}Gn.propTypes={};function us({children:e,style:r,...t}){return o.jsx(Fo,{style:r,...t,children:e})}us.propTypes={children:O.any.isRequired,style:O.object};us.defaultProps={style:{}};const re={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"};function ds({isResource:e,status:r,variant:t,source:s,progress:n,...i}){const{t:a}=L.useContext(Jt),l={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"},c={added:re.grey,waiting:re.yellow,downloading:re.yellow,extracting:re.yellow,downloaded:re.grey,installing:re.yellow,installed:re.grey,starting:re.yellow,running:re.running,stopping:re.yellow,stopped:re.reverse,error:re.error,upgrading:re.yellow,restarting:re.yellow,corrupted:re.error,deleting:re.yellow,resource:re.primary},d=xe.isInProgress(r),f=e&&r==="stopped"?"resource":r,p=a(`blocklet.status.${f}`);return t==="pin"?o.jsx(Vt,{title:a("blocklet.statusTip",{status:p}),children:o.jsxs(U,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...i,children:[o.jsx(U,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:c[f],style:{opacity:.15}}),o.jsx(U,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:c[f]})]})}):t==="dot"?o.jsx(Vt,{title:a("blocklet.statusTip",{status:p}),children:o.jsx(ua,{color:c[f],...i})}):o.jsxs(us,{type:l[f],...i,children:[d&&o.jsx(ze,{size:12,color:"inherit",style:{marginRight:5}}),p,f==="downloading"&&n?o.jsx("div",{style:{marginLeft:5},children:`${n} %`}):null]})}ds.propTypes={status:O.string.isRequired,variant:O.oneOf(["dot","tag","pin"]),source:O.string,progress:O.number,isResource:O.bool};ds.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};function Ha(){const e=wo();return[...e.breakpoints.keys].reverse().reduce((t,s)=>{const n=Re(e.breakpoints.up(s));return!t&&n?s:t},null)||"xs"}function qa(e){return o.jsx(Zt,{...e,children:o.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function Wa(e){return o.jsx(Zt,{...e,children:o.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function Ka(e){return o.jsx(Zt,{...e,children:o.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function Ga(e){return o.jsx(Zt,{...e,children:o.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const Et={fontSize:20,marginInlineEnd:8},Qa={success:o.jsx(qa,{style:Et}),warning:o.jsx(Wa,{style:Et}),error:o.jsx(Ka,{style:Et}),info:o.jsx(Ga,{style:Et})},Za=jo(e=>{const r={xl:"400px",lg:"400px",md:"400px",sm:"300px"},t=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:t,color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},success:s=>({backgroundColor:`${So[600]} !important`,width:r[s.breakpoint]}),error:s=>({backgroundColor:`${e.palette.error.dark} !important`,width:r[s.breakpoint]}),info:s=>({backgroundColor:`${e.palette.primary.main} !important`,width:r[s.breakpoint]}),warning:s=>({backgroundColor:`${Co[700]} !important`,width:r[s.breakpoint]}),icon:{fontSize:20},message:{display:"flex",alignItems:"center",padding:"8px 0",flex:1,width:0},action:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:-8,width:44}}});function fs({keyId:e,notification:r={},viewAllUrl:t,content:s},n){var k;const i=Za({breakpoint:Ha()}),a=[i.contentRoot,i.lessPadding,i[r.severity]].join(" "),l=Qa[r.severity],{closeSnackbar:c}=Tn(),d=()=>c(e),f=An(),p=()=>{c(e),f(t)},g=Je(()=>ia(r),[r]),j=Je(()=>r==null?void 0:r.activity,[r]),T=oa({activity:j,users:[r==null?void 0:r.actorInfo],actors:[(k=r==null?void 0:r.activity)==null?void 0:k.actor],extra:{linkColor:Gr.primaryBase}});return o.jsxs(Oo,{ref:n,className:a,children:[o.jsxs("div",{className:i.message,children:[l,o.jsx(Ya,{onClick:p,style:{width:"calc(100% - 30px)"},children:o.jsx(U,{children:g?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"title",children:T}),o.jsx(aa,{meta:j.meta,type:j.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"title",children:r.title}),s||o.jsx("span",{className:"desc",children:r.description})]})})})]}),o.jsx("div",{className:i.action,children:o.jsx(Qt,{"aria-label":"close",color:"inherit",onClick:d,size:"large",children:o.jsx(Vo,{className:i.icon})},"close")})]})}const Ja=L.forwardRef(fs);fs.propTypes={viewAllUrl:O.string.isRequired,keyId:O.number.isRequired,notification:O.object.isRequired,content:O.node};fs.defaultProps={content:null};const Ya=De.div`
13
+ cursor: pointer;
14
+ display: flex;
15
+ flex-direction: column;
16
+ .title {
17
+ overflow: hidden;
18
+ text-overflow: ellipsis;
19
+ display: -webkit-box;
20
+ -webkit-line-clamp: 1;
21
+ -webkit-box-orient: vertical;
22
+ font-weight: bold;
23
+ }
24
+ .desc {
25
+ overflow: hidden;
26
+ text-overflow: ellipsis;
27
+ display: -webkit-box;
28
+ -webkit-line-clamp: 3;
29
+ -webkit-box-orient: vertical;
30
+ word-break: break-word;
31
+ }
32
+ `;function Qn({attachment:e}){const{data:r}=e;let t="";try{t=new URL(r.url).host}catch{t=r.url}return o.jsxs(Kr,{target:"_blank",rel:"noopener noreferrer",href:r.url,className:"link",style:{wordBreak:"break-all"},onClick:s=>{s.customPreventRedirect=!0},children:[!!t&&o.jsx("span",{className:"url",children:t}),!!r.title&&o.jsx(U,{className:"title",style:{whiteSpace:"unset"},children:r.title}),!!r.description&&o.jsx(U,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:r.description}),!!r.image&&o.jsx("img",{src:gn.getImagePath(r.image),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}Qn.propTypes={attachment:O.object.isRequired};function Zn({attachment:e}){const{data:r}=e;return o.jsx("img",{src:gn.getImagePath(r.url),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}Zn.propTypes={attachment:O.object.isRequired};function ps({attachment:e,...r}){var l;const{data:t}=e,s=((l=t.color)==null?void 0:l.toLowerCase())||r.color,n=t.size||r.size,i=t.fontWeight||r.fontWeight||400;let a="14px";return n==="small"?a="12px":n==="normal"?a="14px":n==="big"?a="16px":n==="large"&&(a="18px"),o.jsx(Xa,{className:"title",style:{fontSize:a,color:s,whiteSpace:"unset",fontWeight:i},children:t.text})}ps.propTypes={attachment:O.object.isRequired};const Xa=De.span`
33
+ width: 100%;
34
+ display: -webkit-box;
35
+ -webkit-box-orient: vertical;
36
+ -webkit-line-clamp: 2;
37
+ overflow: hidden;
38
+ text-overflow: ellipsis;
39
+ white-space: normal;
40
+ word-break: break-word;
41
+ `;ms.propTypes={locale:O.string,data:O.object.isRequired};ms.defaultProps={locale:"en"};function ms({locale:e="en",data:r}){const t={zh:"来自",en:"from"}[e]||"from",s={zh:"接收",en:"Received"}[e]||"Received",i=`https://${yt.getUrlHost(r.chainHost)||yt.getChainHost(r.chainId)}/explorer/tokens/${r.address}/tx`;let a=r.amount;r.decimal&&(a=r.amount/10**r.decimal);const l=Je(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx("a",{href:i,target:"_blank",rel:"noreferrer",onClick:c=>{c.customPreventRedirect=!0},children:o.jsxs(U,{display:"flex",flexDirection:"column",children:[o.jsxs(U,{sx:l,children:[o.jsx(pe,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:s}),o.jsxs(pe,{component:"div",align:"right",style:$t.summaryStyle,flex:1,children:["+",a," ",r.symbol]})]}),o.jsxs(U,{sx:l,children:[o.jsx(pe,{component:"div",style:{...$t.remarkStyle,fontSize:14},children:t}),o.jsx(U,{maxWidth:260,fontSize:14,children:o.jsx(Qr,{did:r.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}hs.propTypes={locale:O.string,data:O.object.isRequired};hs.defaultProps={locale:"en"};function hs({locale:e,data:r}){var c,d;const t={zh:"接收",en:"Received"}[e]||"Received",s={zh:"来自",en:"from"}[e]||"from",n=yt.getUrlHost(r.chainHost)||yt.getChainHost(r.chainId),i=r.did||((d=(c=r==null?void 0:r.credential)==null?void 0:c.issuer)==null?void 0:d.id)||"",a=`https://${n}/explorer/assets/${i}`,l=Je(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx(U,{sx:{pr:1},children:o.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:f=>{f.customPreventRedirect=!0},rel:"noreferrer",children:o.jsxs(U,{display:"flex",flexDirection:"column",children:[o.jsxs(U,{sx:l,children:[o.jsx(pe,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:t}),o.jsx(pe,{component:"div",align:"right",style:$t.summaryStyle,children:"+1 Asset"})]}),i?o.jsxs(U,{sx:l,children:[o.jsx(pe,{component:"div",style:{...$t.remarkStyle,fontSize:14},children:s}),o.jsx(U,{maxWidth:260,fontSize:14,children:o.jsx(Qr,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}Jn.propTypes={data:O.object.isRequired,locale:O.string};function Jn({data:e,locale:r="en"}){return o.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:t=>{t.customPreventRedirect=!0},rel:"noreferrer",children:[o.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),o.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[o.jsx("div",{style:{marginBottom:"6px"},children:e.title}),o.jsx(U,{maxWidth:260,fontSize:10,style:{color:"#a5a5a5"},children:o.jsx(Qr,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:r})})]})]})}gs.propTypes={locale:O.string,data:O.object.isRequired};gs.defaultProps={locale:"en"};function gs({locale:e,data:r}){const t=yt.getChainHost(r.chainId),s=`https://${t}/explorer/txs/${r.hash}`,n={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return o.jsxs("a",{href:s,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},onClick:a=>{a.customPreventRedirect=!0},rel:"noreferrer",children:[o.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:t}),o.jsx("p",{style:{color:"#4598fa",margin:0},children:n}),o.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",r.hash]})]})}function Yn({data:e,isMd:r=!1}){return o.jsx(U,{display:"flex",flexDirection:r?"row":"column",justifyContent:"space-between",sx:{width:"100%",flexWrap:"nowrap",gap:1,overflow:"hidden"},children:e.items.map((t,s)=>o.jsx(ps,{attachment:t,color:s===0?"rgba(156, 163, 175, 1)":"",size:s===0?"normal":"big",fontWeight:s===0?400:600,sx:Mo(s===0?{flexShrink:0}:{flex:1})},s))})}Yn.propTypes={data:O.array.isRequired,isMd:O.bool};function Xn({attachment:e,...r}){const{local:t}=L.useContext(Jt),s=Re(n=>n.breakpoints.down("md"));return o.jsxs(el,{...r,isMd:s,children:[e.type==="link"&&o.jsx(Qn,{attachment:e,...r,isMd:s}),e.type==="image"&&o.jsx(Zn,{attachment:e,isMd:s}),e.type==="text"&&o.jsx(ps,{attachment:e,isMd:s}),e.type==="token"&&o.jsx(ms,{data:e.data,local:t,isMd:s}),e.type==="asset"||e.type==="vc"?o.jsx(hs,{data:e.data,local:t,isMd:s}):null,e.type==="dapp"&&o.jsx(Jn,{data:e.data,local:t,isMd:s}),e.type==="transaction"&&o.jsx(gs,{data:e.data,local:t,...r,isMd:s}),e.type==="divider"&&o.jsx(Wr,{sx:{mb:1,mt:1},style:{color:Gr.dividerColor}}),e.type==="combined"&&o.jsx(Yn,{data:e,isMd:s})]})}const el=De.div`
42
+ display: ${({sx:e={}})=>e.display||"flex"};
43
+ flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
44
+ gap: ${({sx:e={}})=>e.gap||1};
45
+ width: ${({isMd:e=!1})=>e?"100%":"auto"};
46
+ &:last-child {
47
+ margin-bottom: 0;
48
+ }
49
+ `;Xn.propTypes={attachment:O.object.isRequired};function ei({data:e,...r}){const{items:t}=e;return o.jsx(tl,{...r,children:t.map(s=>o.jsxs(bn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[o.jsxs(U,{display:"flex",alignItems:"center",gap:1,children:[s.icon?o.jsx("img",{src:s.icon,alt:s.title,style:{width:16,height:16}}):null,o.jsxs(U,{className:"metric-name",display:"flex",alignItems:"center",children:[s.title,s.subtitle?o.jsx(Vt,{title:s.subtitle,arrow:!0,placement:"top",children:o.jsx(fa,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),o.jsxs(U,{className:"metric-number",sx:{color:s.content_color||"rgba(3, 7, 18, 1)"},children:[s.content,s.sub_content?o.jsxs("span",{className:"sub-content",style:{color:s.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",s.sub_content,")"]}):null]})]},s.title))})}const tl=De(U)`
50
+ display: flex;
51
+ justify-content: flex-start;
52
+ flex-wrap: wrap;
53
+ gap: 16px;
54
+ .metric-number {
55
+ font-size: 18px;
56
+ font-weight: 600;
57
+ .sub-content {
58
+ font-size: 12px;
59
+ font-weight: 400;
60
+ margin-left: 4px;
61
+ }
62
+ }
63
+ .metric-name {
64
+ font-size: 14px;
65
+ color: rgba(156, 163, 175, 1);
66
+ }
67
+ `;ei.propTypes={data:O.object.isRequired};function ti({data:e}){const{items:r}=e,t=Re(a=>a.breakpoints.down("sm")),s=Re(a=>a.breakpoints.down("md")),n=Re(a=>a.breakpoints.down("lg")),i=()=>t?1:s?3:n?4:6;return o.jsx(Ao,{variant:"quilted",cols:i(),gap:8,rowHeight:128,sx:{margin:0},children:r.map(a=>{const l=a.cover||a.display;return l?o.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:o.jsx(Eo,{children:o.jsx("img",{src:l,alt:a.title||"",style:{borderRadius:"8px"}})})},l):null})})}ti.propTypes={data:O.object.isRequired};function ys({data:e,feedType:r,...t}){return o.jsxs(rl,{...t,children:[r==="data-tracker"&&e.type==="table"&&o.jsx(ei,{data:e}),(r==="graphic"||r==="gallery")&&o.jsx(ti,{data:e})]})}const rl=De.div`
68
+ display: flex;
69
+ flex-direction: column;
70
+ width: 100%;
71
+ margin-bottom: 4px;
72
+ &:last-child {
73
+ margin-bottom: 0;
74
+ }
75
+ `;ys.propTypes={data:O.object.isRequired,feedType:O.string};ys.defaultProps={feedType:"data-tracker"};const sl=e=>{let r="rgba(0, 0, 0, 0.12)";return e==="warning"?r="#DE9E37":e==="error"?r="#F16E6E":r="rgba(0, 0, 0, 0.12)",r},nl=e=>e.every(r=>r.type==="text"),il=e=>e.every(r=>r.type==="image"),ol=e=>sa(e,2).map(r=>({type:"combined",items:r})).filter(r=>(r.items||[]).every(t=>{var s,n,i;return(i=(n=(s=t==null?void 0:t.data)==null?void 0:s.text)==null?void 0:n.trim)==null?void 0:i.call(n)})),al=e=>{if(!e.length||e.length<=1)return!1;const r=e[0].type;return e.every(t=>t.type===r)},ll=async(e,r)=>{const s=new $o().user;if(s)try{return await s.getUserPublicInfo({did:e})?await s.getProfileUrl({did:e,locale:r}):void 0}catch(n){console.error(n);return}};function xs({notification:e,severity:r,showSke:t=!0}){const{attachments:s,data:n,...i}=e,a=Re(f=>f.breakpoints.down("md"));if((!s||!s.length)&&Dt(n))return null;const l=sl(r),c=(f,p=!1)=>{if(!f&&!Array.isArray(f))return null;let g=f,j={},T="horizontal";p&&nl(f)&&(g=ol(f),T="vertical",j={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:a||g.length===1?"100%":"28%"});const k=al(g);return o.jsx(U,{sx:{width:"100%",display:"flex",gap:1,flexDirection:p?"row":"column",justifyContent:"flex-start",alignItems:p?"center":"unset",flexWrap:"wrap"},children:g.map((M,y)=>M.type==="section"?o.jsx(L.Fragment,{children:c(M.fields,!0)},y):o.jsxs(L.Fragment,{children:[o.jsx(Xn,{attachment:M,style:j,...i}),!(a&&T==="vertical")&&k&&g.length>1&&y%3!==2?o.jsx(Wr,{orientation:T,style:{color:Gr.dividerColor},sx:T==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},y))})},d=il(s);return o.jsx(cl,{children:o.jsxs("div",{className:"message-in-list",children:[s.length>0&&o.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:d?c(s):o.jsx(bn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:l},children:c(s)})}),!Dt(n)&&o.jsx("div",{className:"message-container",children:o.jsx("div",{className:"data-container",children:o.jsx(ys,{data:n,feedType:e.feedType})})}),s.length===0&&Dt(n)&&t&&o.jsx(To,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const cl=De.div`
76
+ display: flex;
77
+ flex-direction: column;
78
+ .message-in-list {
79
+ padding: 8px 8px 8px 0;
80
+ display: flex;
81
+ border-radius: 8px;
82
+ }
83
+ .message-title {
84
+ color: #25292f;
85
+ font-size: 18px;
86
+ font-weight: bold;
87
+ word-break: break-all;
88
+ }
89
+
90
+ .attach-ske {
91
+ position: relative;
92
+ margin-left: 10px;
93
+ &::after {
94
+ content: '';
95
+ position: absolute;
96
+ left: -10px;
97
+ top: 0;
98
+ height: 100%;
99
+ width: 4px;
100
+ background-color: ${e=>e.leftLineColor};
101
+ }
102
+ }
103
+
104
+ .message-body {
105
+ color: #25292f;
106
+ font-size: 16px;
107
+ word-break: break-all;
108
+ white-space: pre-line;
109
+ }
110
+ .message-container {
111
+ display: flex;
112
+ flex-direction: column;
113
+ justify-content: flex-start;
114
+ .data-container,
115
+ .attachment-container {
116
+ display: flex;
117
+ flex-direction: column;
118
+ width: 100%;
119
+ }
120
+ }
121
+ .actions-container {
122
+ margin-top: 10px;
123
+ .actions-item {
124
+ margin-right: 8px;
125
+ }
126
+ }
127
+ `;xs.propTypes={severity:O.string.isRequired,notification:O.object.isRequired,showSke:O.bool};xs.defaultProps={showSke:!0};const cr=e=>io.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),ul=async(e,r)=>{const{type:t,did:s}=e;return yn.isSameAddr(t,"did")?await ll(s,r)||Ot.getLink(e):Ot.getLink(e)},dl=async(e,r,t=!0)=>{const s=Ot.toTextList(e);return await Promise.all(s.map(async i=>{if(i instanceof Ot.Link){if(t){const a=await ul(i,r),{type:l,chainId:c,did:d}=i;return yn.isSameAddr(l,"dapp")?`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${d}">${i.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${d}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};ri.propTypes={notification:O.object,rows:O.number,minimal:O.bool};function ri({notification:e,rows:r=2,minimal:t=!1}){const[s,n]=L.useState(!1),[i,a]=L.useState(""),{t:l,locale:c}=he(),d=L.useMemo(()=>{const{attachments:M}=e||{};if(!M)return!1;try{return M.length>0}catch{return!1}},[e]),f=L.useMemo(()=>{const{blocks:M}=e||{};if(!M)return!1;try{return M.length>0}catch{return!1}},[e]),p=L.useMemo(()=>{const{description:M}=e||{};return!!M},[e]),g=L.useMemo(()=>{const{data:M}=e||{};return!Dt(M)},[e]),j=L.useMemo(()=>d||f||p||g,[d,f,p,g]);if(L.useEffect(()=>{dl((e==null?void 0:e.description)??"",c).then(M=>{a(M)})},[e==null?void 0:e.description,c]),!j)return null;const T=()=>r===0?"":s?`<span class='toggle-btn' data-name='toggle-expanded'>${l("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${l("common.expand")}</span>`,k=M=>{const{target:y}=M;y.getAttribute("data-name")==="toggle-expanded"&&(n(!s),M.customPreventRedirect=!0)};return o.jsxs(fl,{color:t?"#fff":"",children:[o.jsx(U,{className:"text-container",component:"div",onClick:k,children:i&&(!s&&r>0?o.jsx(la,{basedOn:"letters",unsafeHTML:cr(i),maxLine:r,ellipsisHTML:cr(T())}):o.jsx(pe,{component:"div",className:`content ${r===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:cr(`${i}${T()}`)}}))}),!t&&(d||g)?o.jsx(xs,{severity:e.severity,notification:e}):null]})}const fl=De(U)`
128
+ width: 100%;
129
+ color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
130
+ .text-container {
131
+ word-wrap: break-word;
132
+ word-break: break-all;
133
+ color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
134
+ .toggle-btn {
135
+ display: inline-block;
136
+ white-space: nowrap;
137
+ cursor: pointer;
138
+ margin-left: 4px;
139
+ color: rgba(59, 130, 246, 1);
140
+ }
141
+ .content.ellipsis {
142
+ overflow: hidden;
143
+ text-overflow: ellipsis;
144
+ word-break: break-all;
145
+ display: block;
146
+ display: -webkit-box;
147
+ -webkit-box-orient: vertical;
148
+ -webkit-line-clamp: 2;
149
+ }
150
+ }
151
+ `,pl=L.memo(ri);var vt=e=>e.type==="checkbox",st=e=>e instanceof Date,ue=e=>e==null;const si=e=>typeof e=="object";var J=e=>!ue(e)&&!Array.isArray(e)&&si(e)&&!st(e),ni=e=>J(e)&&e.target?vt(e.target)?e.target.checked:e.target.value:e,ml=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ii=(e,r)=>e.has(ml(r)),hl=e=>{const r=e.constructor&&e.constructor.prototype;return J(r)&&r.hasOwnProperty("isPrototypeOf")},vs=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function X(e){let r;const t=Array.isArray(e);if(e instanceof Date)r=new Date(e);else if(e instanceof Set)r=new Set(e);else if(!(vs&&(e instanceof Blob||e instanceof FileList))&&(t||J(e)))if(r=t?[]:{},!t&&!hl(e))r=e;else for(const s in e)e.hasOwnProperty(s)&&(r[s]=X(e[s]));else return e;return r}var bt=e=>Array.isArray(e)?e.filter(Boolean):[],G=e=>e===void 0,E=(e,r,t)=>{if(!r||!J(e))return t;const s=bt(r.split(/[,[\].]+?/)).reduce((n,i)=>ue(n)?n:n[i],e);return G(s)||s===e?G(e[r])?t:e[r]:s},be=e=>typeof e=="boolean",bs=e=>/^\w*$/.test(e),oi=e=>bt(e.replace(/["|']|\]/g,"").split(/\.|\[/)),K=(e,r,t)=>{let s=-1;const n=bs(r)?[r]:oi(r),i=n.length,a=i-1;for(;++s<i;){const l=n[s];let c=t;if(s!==a){const d=e[l];c=J(d)||Array.isArray(d)?d:isNaN(+n[s+1])?{}:[]}if(l==="__proto__")return;e[l]=c,e=e[l]}return e};const Nt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},_e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Pe={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},gl=z.createContext(null),Xt=()=>z.useContext(gl);var ai=(e,r,t,s=!0)=>{const n={defaultValues:r._defaultValues};for(const i in e)Object.defineProperty(n,i,{get:()=>{const a=i;return r._proxyFormState[a]!==_e.all&&(r._proxyFormState[a]=!s||_e.all),t&&(t[a]=!0),e[a]}});return n},ce=e=>J(e)&&!Object.keys(e).length,li=(e,r,t,s)=>{t(e);const{name:n,...i}=e;return ce(i)||Object.keys(i).length>=Object.keys(r).length||Object.keys(i).find(a=>r[a]===(!s||_e.all))},me=e=>Array.isArray(e)?e:[e],ci=(e,r,t)=>!e||!r||e===r||me(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s)));function er(e){const r=z.useRef(e);r.current=e,z.useEffect(()=>{const t=!e.disabled&&r.current.subject&&r.current.subject.subscribe({next:r.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function yl(e){const r=Xt(),{control:t=r.control,disabled:s,name:n,exact:i}=e||{},[a,l]=z.useState(t._formState),c=z.useRef(!0),d=z.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=z.useRef(n);return f.current=n,er({disabled:s,next:p=>c.current&&ci(f.current,p.name,i)&&li(p,d.current,t._updateFormState)&&l({...t._formState,...p}),subject:t._subjects.state}),z.useEffect(()=>(c.current=!0,d.current.isValid&&t._updateValid(!0),()=>{c.current=!1}),[t]),ai(a,t,d.current,!1)}var ke=e=>typeof e=="string",ui=(e,r,t,s,n)=>ke(e)?(s&&r.watch.add(e),E(t,e,n)):Array.isArray(e)?e.map(i=>(s&&r.watch.add(i),E(t,i))):(s&&(r.watchAll=!0),t);function xl(e){const r=Xt(),{control:t=r.control,name:s,defaultValue:n,disabled:i,exact:a}=e||{},l=z.useRef(s);l.current=s,er({disabled:i,subject:t._subjects.values,next:f=>{ci(l.current,f.name,a)&&d(X(ui(l.current,t._names,f.values||t._formValues,!1,n)))}});const[c,d]=z.useState(t._getWatch(s,n));return z.useEffect(()=>t._removeUnmounted()),c}function vl(e){const r=Xt(),{name:t,disabled:s,control:n=r.control,shouldUnregister:i}=e,a=ii(n._names.array,t),l=xl({control:n,name:t,defaultValue:E(n._formValues,t,E(n._defaultValues,t,e.defaultValue)),exact:!0}),c=yl({control:n,name:t,exact:!0}),d=z.useRef(n.register(t,{...e.rules,value:l,...be(e.disabled)?{disabled:e.disabled}:{}}));return z.useEffect(()=>{const f=n._options.shouldUnregister||i,p=(g,j)=>{const T=E(n._fields,g);T&&T._f&&(T._f.mount=j)};if(p(t,!0),f){const g=X(E(n._options.defaultValues,t));K(n._defaultValues,t,g),G(E(n._formValues,t))&&K(n._formValues,t,g)}return()=>{(a?f&&!n._state.action:f)?n.unregister(t):p(t,!1)}},[t,n,a,i]),z.useEffect(()=>{E(n._fields,t)&&n._updateDisabledField({disabled:s,fields:n._fields,name:t,value:E(n._fields,t)._f.value})},[s,t,n]),{field:{name:t,value:l,...be(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:z.useCallback(f=>d.current.onChange({target:{value:ni(f),name:t},type:Nt.CHANGE}),[t]),onBlur:z.useCallback(()=>d.current.onBlur({target:{value:E(n._formValues,t),name:t},type:Nt.BLUR}),[t,n]),ref:z.useCallback(f=>{const p=E(n._fields,t);p&&f&&(p._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:g=>f.setCustomValidity(g),reportValidity:()=>f.reportValidity()})},[n._fields,t])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!E(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!E(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!E(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!E(c.validatingFields,t)},error:{enumerable:!0,get:()=>E(c.errors,t)}})}}const Ce=e=>e.render(vl(e));var bl=(e,r,t,s,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:n||!0}}:{},Ne=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const t=(Math.random()*16+e)%16|0;return(r=="x"?t:t&3|8).toString(16)})},ur=(e,r,t={})=>t.shouldFocus||G(t.shouldFocus)?t.focusName||`${e}.${G(t.focusIndex)?r:t.focusIndex}.`:"",ft=e=>({isOnSubmit:!e||e===_e.onSubmit,isOnBlur:e===_e.onBlur,isOnChange:e===_e.onChange,isOnAll:e===_e.all,isOnTouch:e===_e.onTouched}),Tr=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const nt=(e,r,t,s)=>{for(const n of t||Object.keys(e)){const i=E(e,n);if(i){const{_f:a,...l}=i;if(a){if(a.refs&&a.refs[0]&&r(a.refs[0],n)&&!s)return!0;if(a.ref&&r(a.ref,a.name)&&!s)return!0;if(nt(l,r))break}else if(J(l)&&nt(l,r))break}}};var di=(e,r,t)=>{const s=me(E(e,t));return K(s,"root",r[t]),K(e,t,s),e},_s=e=>e.type==="file",Ve=e=>typeof e=="function",Ut=e=>{if(!vs)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Lt=e=>ke(e),ws=e=>e.type==="radio",Bt=e=>e instanceof RegExp;const Zs={value:!1,isValid:!1},Js={value:!0,isValid:!0};var fi=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!G(e[0].attributes.value)?G(e[0].value)||e[0].value===""?Js:{value:e[0].value,isValid:!0}:Js:Zs}return Zs};const Ys={isValid:!1,value:null};var pi=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,Ys):Ys;function Xs(e,r,t="validate"){if(Lt(e)||Array.isArray(e)&&e.every(Lt)||be(e)&&!e)return{type:t,message:Lt(e)?e:"",ref:r}}var tt=e=>J(e)&&!Bt(e)?e:{value:e,message:""},kr=async(e,r,t,s,n)=>{const{ref:i,refs:a,required:l,maxLength:c,minLength:d,min:f,max:p,pattern:g,validate:j,name:T,valueAsNumber:k,mount:M,disabled:y}=e._f,v=E(r,T);if(!M||y)return{};const I=a?a[0]:i,B=V=>{s&&I.reportValidity&&(I.setCustomValidity(be(V)?"":V||""),I.reportValidity())},_={},h=ws(i),w=vt(i),S=h||w,A=(k||_s(i))&&G(i.value)&&G(v)||Ut(i)&&i.value===""||v===""||Array.isArray(v)&&!v.length,b=bl.bind(null,T,t,_),P=(V,$,H,W=Pe.maxLength,oe=Pe.minLength)=>{const de=V?$:H;_[T]={type:V?W:oe,message:de,ref:i,...b(V?W:oe,de)}};if(n?!Array.isArray(v)||!v.length:l&&(!S&&(A||ue(v))||be(v)&&!v||w&&!fi(a).isValid||h&&!pi(a).isValid)){const{value:V,message:$}=Lt(l)?{value:!!l,message:l}:tt(l);if(V&&(_[T]={type:Pe.required,message:$,ref:I,...b(Pe.required,$)},!t))return B($),_}if(!A&&(!ue(f)||!ue(p))){let V,$;const H=tt(p),W=tt(f);if(!ue(v)&&!isNaN(v)){const oe=i.valueAsNumber||v&&+v;ue(H.value)||(V=oe>H.value),ue(W.value)||($=oe<W.value)}else{const oe=i.valueAsDate||new Date(v),de=F=>new Date(new Date().toDateString()+" "+F),qe=i.type=="time",Ae=i.type=="week";ke(H.value)&&v&&(V=qe?de(v)>de(H.value):Ae?v>H.value:oe>new Date(H.value)),ke(W.value)&&v&&($=qe?de(v)<de(W.value):Ae?v<W.value:oe<new Date(W.value))}if((V||$)&&(P(!!V,H.message,W.message,Pe.max,Pe.min),!t))return B(_[T].message),_}if((c||d)&&!A&&(ke(v)||n&&Array.isArray(v))){const V=tt(c),$=tt(d),H=!ue(V.value)&&v.length>+V.value,W=!ue($.value)&&v.length<+$.value;if((H||W)&&(P(H,V.message,$.message),!t))return B(_[T].message),_}if(g&&!A&&ke(v)){const{value:V,message:$}=tt(g);if(Bt(V)&&!v.match(V)&&(_[T]={type:Pe.pattern,message:$,ref:i,...b(Pe.pattern,$)},!t))return B($),_}if(j){if(Ve(j)){const V=await j(v,r),$=Xs(V,I);if($&&(_[T]={...$,...b(Pe.validate,$.message)},!t))return B($.message),_}else if(J(j)){let V={};for(const $ in j){if(!ce(V)&&!t)break;const H=Xs(await j[$](v,r),I,$);H&&(V={...H,...b($,H.message)},B(H.message),t&&(_[T]=V))}if(!ce(V)&&(_[T]={ref:I,...V},!t))return _}}return B(!0),_},dr=(e,r)=>[...e,...me(r)],fr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function pr(e,r,t){return[...e.slice(0,r),...me(t),...e.slice(r)]}var mr=(e,r,t)=>Array.isArray(e)?(G(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(r,1)[0]),e):[],hr=(e,r)=>[...me(r),...me(e)];function _l(e,r){let t=0;const s=[...e];for(const n of r)s.splice(n-t,1),t++;return bt(s).length?s:[]}var gr=(e,r)=>G(r)?[]:_l(e,me(r).sort((t,s)=>t-s)),yr=(e,r,t)=>{[e[r],e[t]]=[e[t],e[r]]};function wl(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=G(e)?s++:e[r[s++]];return e}function jl(e){for(const r in e)if(e.hasOwnProperty(r)&&!G(e[r]))return!1;return!0}function Z(e,r){const t=Array.isArray(r)?r:bs(r)?[r]:oi(r),s=t.length===1?e:wl(e,t),n=t.length-1,i=t[n];return s&&delete s[i],n!==0&&(J(s)&&ce(s)||Array.isArray(s)&&jl(s))&&Z(e,t.slice(0,-1)),e}var en=(e,r,t)=>(e[r]=t,e);function Td(e){const r=Xt(),{control:t=r.control,name:s,keyName:n="id",shouldUnregister:i}=e,[a,l]=z.useState(t._getFieldArray(s)),c=z.useRef(t._getFieldArray(s).map(Ne)),d=z.useRef(a),f=z.useRef(s),p=z.useRef(!1);f.current=s,d.current=a,t._names.array.add(s),e.rules&&t.register(s,e.rules),er({next:({values:_,name:h})=>{if(h===f.current||!h){const w=E(_,f.current);Array.isArray(w)&&(l(w),c.current=w.map(Ne))}},subject:t._subjects.array});const g=z.useCallback(_=>{p.current=!0,t._updateFieldArray(s,_)},[t,s]),j=(_,h)=>{const w=me(X(_)),S=dr(t._getFieldArray(s),w);t._names.focus=ur(s,S.length-1,h),c.current=dr(c.current,w.map(Ne)),g(S),l(S),t._updateFieldArray(s,S,dr,{argA:fr(_)})},T=(_,h)=>{const w=me(X(_)),S=hr(t._getFieldArray(s),w);t._names.focus=ur(s,0,h),c.current=hr(c.current,w.map(Ne)),g(S),l(S),t._updateFieldArray(s,S,hr,{argA:fr(_)})},k=_=>{const h=gr(t._getFieldArray(s),_);c.current=gr(c.current,_),g(h),l(h),t._updateFieldArray(s,h,gr,{argA:_})},M=(_,h,w)=>{const S=me(X(h)),A=pr(t._getFieldArray(s),_,S);t._names.focus=ur(s,_,w),c.current=pr(c.current,_,S.map(Ne)),g(A),l(A),t._updateFieldArray(s,A,pr,{argA:_,argB:fr(h)})},y=(_,h)=>{const w=t._getFieldArray(s);yr(w,_,h),yr(c.current,_,h),g(w),l(w),t._updateFieldArray(s,w,yr,{argA:_,argB:h},!1)},v=(_,h)=>{const w=t._getFieldArray(s);mr(w,_,h),mr(c.current,_,h),g(w),l(w),t._updateFieldArray(s,w,mr,{argA:_,argB:h},!1)},I=(_,h)=>{const w=X(h),S=en(t._getFieldArray(s),_,w);c.current=[...S].map((A,b)=>!A||b===_?Ne():c.current[b]),g(S),l([...S]),t._updateFieldArray(s,S,en,{argA:_,argB:w},!0,!1)},B=_=>{const h=me(X(_));c.current=h.map(Ne),g([...h]),l([...h]),t._updateFieldArray(s,[...h],w=>w,{},!0,!1)};return z.useEffect(()=>{if(t._state.action=!1,Tr(s,t._names)&&t._subjects.state.next({...t._formState}),p.current&&(!ft(t._options.mode).isOnSubmit||t._formState.isSubmitted))if(t._options.resolver)t._executeSchema([s]).then(_=>{const h=E(_.errors,s),w=E(t._formState.errors,s);(w?!h&&w.type||h&&(w.type!==h.type||w.message!==h.message):h&&h.type)&&(h?K(t._formState.errors,s,h):Z(t._formState.errors,s),t._subjects.state.next({errors:t._formState.errors}))});else{const _=E(t._fields,s);_&&_._f&&!(ft(t._options.reValidateMode).isOnSubmit&&ft(t._options.mode).isOnSubmit)&&kr(_,t._formValues,t._options.criteriaMode===_e.all,t._options.shouldUseNativeValidation,!0).then(h=>!ce(h)&&t._subjects.state.next({errors:di(t._formState.errors,h,s)}))}t._subjects.values.next({name:s,values:{...t._formValues}}),t._names.focus&&nt(t._fields,(_,h)=>{if(t._names.focus&&h.startsWith(t._names.focus)&&_.focus)return _.focus(),1}),t._names.focus="",t._updateValid(),p.current=!1},[a,s,t]),z.useEffect(()=>(!E(t._formValues,s)&&t._updateFieldArray(s),()=>{(t._options.shouldUnregister||i)&&t.unregister(s)}),[s,t,n,i]),{swap:z.useCallback(y,[g,s,t]),move:z.useCallback(v,[g,s,t]),prepend:z.useCallback(T,[g,s,t]),append:z.useCallback(j,[g,s,t]),remove:z.useCallback(k,[g,s,t]),insert:z.useCallback(M,[g,s,t]),update:z.useCallback(I,[g,s,t]),replace:z.useCallback(B,[g,s,t]),fields:z.useMemo(()=>a.map((_,h)=>({..._,[n]:c.current[h]||Ne()})),[a,n])}}var xr=()=>{let e=[];return{get observers(){return e},next:n=>{for(const i of e)i.next&&i.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(i=>i!==n)}}),unsubscribe:()=>{e=[]}}},zt=e=>ue(e)||!si(e);function Ue(e,r){if(zt(e)||zt(r))return e===r;if(st(e)&&st(r))return e.getTime()===r.getTime();const t=Object.keys(e),s=Object.keys(r);if(t.length!==s.length)return!1;for(const n of t){const i=e[n];if(!s.includes(n))return!1;if(n!=="ref"){const a=r[n];if(st(i)&&st(a)||J(i)&&J(a)||Array.isArray(i)&&Array.isArray(a)?!Ue(i,a):i!==a)return!1}}return!0}var mi=e=>e.type==="select-multiple",Sl=e=>ws(e)||vt(e),vr=e=>Ut(e)&&e.isConnected,hi=e=>{for(const r in e)if(Ve(e[r]))return!0;return!1};function Ht(e,r={}){const t=Array.isArray(e);if(J(e)||t)for(const s in e)Array.isArray(e[s])||J(e[s])&&!hi(e[s])?(r[s]=Array.isArray(e[s])?[]:{},Ht(e[s],r[s])):ue(e[s])||(r[s]=!0);return r}function gi(e,r,t){const s=Array.isArray(e);if(J(e)||s)for(const n in e)Array.isArray(e[n])||J(e[n])&&!hi(e[n])?G(r)||zt(t[n])?t[n]=Array.isArray(e[n])?Ht(e[n],[]):{...Ht(e[n])}:gi(e[n],ue(r)?{}:r[n],t[n]):t[n]=!Ue(e[n],r[n]);return t}var Tt=(e,r)=>gi(e,r,Ht(r)),yi=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>G(e)?e:r?e===""?NaN:e&&+e:t&&ke(e)?new Date(e):s?s(e):e;function br(e){const r=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):r.disabled))return _s(r)?r.files:ws(r)?pi(e.refs).value:mi(r)?[...r.selectedOptions].map(({value:t})=>t):vt(r)?fi(e.refs).value:yi(G(r.value)?e.ref.value:r.value,e)}var Cl=(e,r,t,s)=>{const n={};for(const i of e){const a=E(r,i);a&&K(n,i,a._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:s}},ut=e=>G(e)?e:Bt(e)?e.source:J(e)?Bt(e.value)?e.value.source:e.value:e;const tn="AsyncFunction";var Al=e=>(!e||!e.validate)&&!!(Ve(e.validate)&&e.validate.constructor.name===tn||J(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===tn)),El=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function rn(e,r,t){const s=E(e,t);if(s||bs(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const i=n.join("."),a=E(r,i),l=E(e,i);if(a&&!Array.isArray(a)&&t!==i)return{name:t};if(l&&l.type)return{name:i,error:l};n.pop()}return{name:t}}var Tl=(e,r,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?s.isOnBlur:n.isOnBlur)?!e:(t?s.isOnChange:n.isOnChange)?e:!0,kl=(e,r)=>!bt(E(e,r)).length&&Z(e,r);const Rl={mode:_e.onSubmit,reValidateMode:_e.onChange,shouldFocusError:!0};function Il(e={}){let r={...Rl,...e},t={submitCount:0,isDirty:!1,isLoading:Ve(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},n=J(r.defaultValues)||J(r.values)?X(r.defaultValues||r.values)||{}:{},i=r.shouldUnregister?{}:X(n),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:xr(),array:xr(),state:xr()},g=ft(r.mode),j=ft(r.reValidateMode),T=r.criteriaMode===_e.all,k=u=>m=>{clearTimeout(d),d=setTimeout(u,m)},M=async u=>{if(f.isValid||u){const m=r.resolver?ce((await S()).errors):await b(s,!0);m!==t.isValid&&p.state.next({isValid:m})}},y=(u,m)=>{(f.isValidating||f.validatingFields)&&((u||Array.from(l.mount)).forEach(x=>{x&&(m?K(t.validatingFields,x,m):Z(t.validatingFields,x))}),p.state.next({validatingFields:t.validatingFields,isValidating:!ce(t.validatingFields)}))},v=(u,m=[],x,D,R=!0,C=!0)=>{if(D&&x){if(a.action=!0,C&&Array.isArray(E(s,u))){const N=x(E(s,u),D.argA,D.argB);R&&K(s,u,N)}if(C&&Array.isArray(E(t.errors,u))){const N=x(E(t.errors,u),D.argA,D.argB);R&&K(t.errors,u,N),kl(t.errors,u)}if(f.touchedFields&&C&&Array.isArray(E(t.touchedFields,u))){const N=x(E(t.touchedFields,u),D.argA,D.argB);R&&K(t.touchedFields,u,N)}f.dirtyFields&&(t.dirtyFields=Tt(n,i)),p.state.next({name:u,isDirty:V(u,m),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else K(i,u,m)},I=(u,m)=>{K(t.errors,u,m),p.state.next({errors:t.errors})},B=u=>{t.errors=u,p.state.next({errors:t.errors,isValid:!1})},_=(u,m,x,D)=>{const R=E(s,u);if(R){const C=E(i,u,G(x)?E(n,u):x);G(C)||D&&D.defaultChecked||m?K(i,u,m?C:br(R._f)):W(u,C),a.mount&&M()}},h=(u,m,x,D,R)=>{let C=!1,N=!1;const q={name:u},ee=!!(E(s,u)&&E(s,u)._f&&E(s,u)._f.disabled);if(!x||D){f.isDirty&&(N=t.isDirty,t.isDirty=q.isDirty=V(),C=N!==q.isDirty);const te=ee||Ue(E(n,u),m);N=!!(!ee&&E(t.dirtyFields,u)),te||ee?Z(t.dirtyFields,u):K(t.dirtyFields,u,!0),q.dirtyFields=t.dirtyFields,C=C||f.dirtyFields&&N!==!te}if(x){const te=E(t.touchedFields,u);te||(K(t.touchedFields,u,x),q.touchedFields=t.touchedFields,C=C||f.touchedFields&&te!==x)}return C&&R&&p.state.next(q),C?q:{}},w=(u,m,x,D)=>{const R=E(t.errors,u),C=f.isValid&&be(m)&&t.isValid!==m;if(e.delayError&&x?(c=k(()=>I(u,x)),c(e.delayError)):(clearTimeout(d),c=null,x?K(t.errors,u,x):Z(t.errors,u)),(x?!Ue(R,x):R)||!ce(D)||C){const N={...D,...C&&be(m)?{isValid:m}:{},errors:t.errors,name:u};t={...t,...N},p.state.next(N)}},S=async u=>{y(u,!0);const m=await r.resolver(i,r.context,Cl(u||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return y(u),m},A=async u=>{const{errors:m}=await S(u);if(u)for(const x of u){const D=E(m,x);D?K(t.errors,x,D):Z(t.errors,x)}else t.errors=m;return m},b=async(u,m,x={valid:!0})=>{for(const D in u){const R=u[D];if(R){const{_f:C,...N}=R;if(C){const q=l.array.has(C.name),ee=R._f&&Al(R._f);ee&&f.validatingFields&&y([D],!0);const te=await kr(R,i,T,r.shouldUseNativeValidation&&!m,q);if(ee&&f.validatingFields&&y([D]),te[C.name]&&(x.valid=!1,m))break;!m&&(E(te,C.name)?q?di(t.errors,te,C.name):K(t.errors,C.name,te[C.name]):Z(t.errors,C.name))}!ce(N)&&await b(N,m,x)}}return x.valid},P=()=>{for(const u of l.unMount){const m=E(s,u);m&&(m._f.refs?m._f.refs.every(x=>!vr(x)):!vr(m._f.ref))&&le(u)}l.unMount=new Set},V=(u,m)=>(u&&m&&K(i,u,m),!Ue(Q(),n)),$=(u,m,x)=>ui(u,l,{...a.mount?i:G(m)?n:ke(u)?{[u]:m}:m},x,m),H=u=>bt(E(a.mount?i:n,u,e.shouldUnregister?E(n,u,[]):[])),W=(u,m,x={})=>{const D=E(s,u);let R=m;if(D){const C=D._f;C&&(!C.disabled&&K(i,u,yi(m,C)),R=Ut(C.ref)&&ue(m)?"":m,mi(C.ref)?[...C.ref.options].forEach(N=>N.selected=R.includes(N.value)):C.refs?vt(C.ref)?C.refs.length>1?C.refs.forEach(N=>(!N.defaultChecked||!N.disabled)&&(N.checked=Array.isArray(R)?!!R.find(q=>q===N.value):R===N.value)):C.refs[0]&&(C.refs[0].checked=!!R):C.refs.forEach(N=>N.checked=N.value===R):_s(C.ref)?C.ref.value="":(C.ref.value=R,C.ref.type||p.values.next({name:u,values:{...i}})))}(x.shouldDirty||x.shouldTouch)&&h(u,R,x.shouldTouch,x.shouldDirty,!0),x.shouldValidate&&F(u)},oe=(u,m,x)=>{for(const D in m){const R=m[D],C=`${u}.${D}`,N=E(s,C);(l.array.has(u)||!zt(R)||N&&!N._f)&&!st(R)?oe(C,R,x):W(C,R,x)}},de=(u,m,x={})=>{const D=E(s,u),R=l.array.has(u),C=X(m);K(i,u,C),R?(p.array.next({name:u,values:{...i}}),(f.isDirty||f.dirtyFields)&&x.shouldDirty&&p.state.next({name:u,dirtyFields:Tt(n,i),isDirty:V(u,C)})):D&&!D._f&&!ue(C)?oe(u,C,x):W(u,C,x),Tr(u,l)&&p.state.next({...t}),p.values.next({name:a.mount?u:void 0,values:{...i}})},qe=async u=>{a.mount=!0;const m=u.target;let x=m.name,D=!0;const R=E(s,x),C=()=>m.type?br(R._f):ni(u),N=q=>{D=Number.isNaN(q)||Ue(q,E(i,x,q))};if(R){let q,ee;const te=C(),Ke=u.type===Nt.BLUR||u.type===Nt.FOCUS_OUT,ro=!El(R._f)&&!r.resolver&&!E(t.errors,x)&&!R._f.deps||Tl(Ke,E(t.touchedFields,x),t.isSubmitted,j,g),ir=Tr(x,l,Ke);K(i,x,te),Ke?(R._f.onBlur&&R._f.onBlur(u),c&&c(0)):R._f.onChange&&R._f.onChange(u);const or=h(x,te,Ke,!1),so=!ce(or)||ir;if(!Ke&&p.values.next({name:x,type:u.type,values:{...i}}),ro)return f.isValid&&(e.mode==="onBlur"?Ke&&M():M()),so&&p.state.next({name:x,...ir?{}:or});if(!Ke&&ir&&p.state.next({...t}),r.resolver){const{errors:Vs}=await S([x]);if(N(te),D){const no=rn(t.errors,s,x),Ms=rn(Vs,s,no.name||x);q=Ms.error,x=Ms.name,ee=ce(Vs)}}else y([x],!0),q=(await kr(R,i,T,r.shouldUseNativeValidation))[x],y([x]),N(te),D&&(q?ee=!1:f.isValid&&(ee=await b(s,!0)));D&&(R._f.deps&&F(R._f.deps),w(x,ee,q,or))}},Ae=(u,m)=>{if(E(t.errors,m)&&u.focus)return u.focus(),1},F=async(u,m={})=>{let x,D;const R=me(u);if(r.resolver){const C=await A(G(u)?u:R);x=ce(C),D=u?!R.some(N=>E(C,N)):x}else u?(D=(await Promise.all(R.map(async C=>{const N=E(s,C);return await b(N&&N._f?{[C]:N}:N)}))).every(Boolean),!(!D&&!t.isValid)&&M()):D=x=await b(s);return p.state.next({...!ke(u)||f.isValid&&x!==t.isValid?{}:{name:u},...r.resolver||!u?{isValid:x}:{},errors:t.errors}),m.shouldFocus&&!D&&nt(s,Ae,u?R:l.mount),D},Q=u=>{const m={...a.mount?i:n};return G(u)?m:ke(u)?E(m,u):u.map(x=>E(m,x))},ae=(u,m)=>({invalid:!!E((m||t).errors,u),isDirty:!!E((m||t).dirtyFields,u),error:E((m||t).errors,u),isValidating:!!E(t.validatingFields,u),isTouched:!!E((m||t).touchedFields,u)}),ge=u=>{u&&me(u).forEach(m=>Z(t.errors,m)),p.state.next({errors:u?t.errors:{}})},ve=(u,m,x)=>{const D=(E(s,u,{_f:{}})._f||{}).ref,R=E(t.errors,u)||{},{ref:C,message:N,type:q,...ee}=R;K(t.errors,u,{...ee,...m,ref:D}),p.state.next({name:u,errors:t.errors,isValid:!1}),x&&x.shouldFocus&&D&&D.focus&&D.focus()},Le=(u,m)=>Ve(u)?p.values.subscribe({next:x=>u($(void 0,m),x)}):$(u,m,!0),le=(u,m={})=>{for(const x of u?me(u):l.mount)l.mount.delete(x),l.array.delete(x),m.keepValue||(Z(s,x),Z(i,x)),!m.keepError&&Z(t.errors,x),!m.keepDirty&&Z(t.dirtyFields,x),!m.keepTouched&&Z(t.touchedFields,x),!m.keepIsValidating&&Z(t.validatingFields,x),!r.shouldUnregister&&!m.keepDefaultValue&&Z(n,x);p.values.next({values:{...i}}),p.state.next({...t,...m.keepDirty?{isDirty:V()}:{}}),!m.keepIsValid&&M()},Ct=({disabled:u,name:m,field:x,fields:D,value:R})=>{if(be(u)&&a.mount||u){const C=u?void 0:G(R)?br(x?x._f:E(D,m)._f):R;K(i,m,C),h(m,C,!1,!1,!0)}},Me=(u,m={})=>{let x=E(s,u);const D=be(m.disabled)||be(e.disabled);return K(s,u,{...x||{},_f:{...x&&x._f?x._f:{ref:{name:u}},name:u,mount:!0,...m}}),l.mount.add(u),x?Ct({field:x,disabled:be(m.disabled)?m.disabled:e.disabled,name:u,value:m.value}):_(u,!0,m.value),{...D?{disabled:m.disabled||e.disabled}:{},...r.progressive?{required:!!m.required,min:ut(m.min),max:ut(m.max),minLength:ut(m.minLength),maxLength:ut(m.maxLength),pattern:ut(m.pattern)}:{},name:u,onChange:qe,onBlur:qe,ref:R=>{if(R){Me(u,m),x=E(s,u);const C=G(R.value)&&R.querySelectorAll&&R.querySelectorAll("input,select,textarea")[0]||R,N=Sl(C),q=x._f.refs||[];if(N?q.find(ee=>ee===C):C===x._f.ref)return;K(s,u,{_f:{...x._f,...N?{refs:[...q.filter(vr),C,...Array.isArray(E(n,u))?[{}]:[]],ref:{type:C.type,name:u}}:{ref:C}}}),_(u,!1,void 0,C)}else x=E(s,u,{}),x._f&&(x._f.mount=!1),(r.shouldUnregister||m.shouldUnregister)&&!(ii(l.array,u)&&a.action)&&l.unMount.add(u)}}},We=()=>r.shouldFocusError&&nt(s,Ae,l.mount),Xe=u=>{be(u)&&(p.state.next({disabled:u}),nt(s,(m,x)=>{const D=E(s,x);D&&(m.disabled=D._f.disabled||u,Array.isArray(D._f.refs)&&D._f.refs.forEach(R=>{R.disabled=D._f.disabled||u}))},0,!1))},Ee=(u,m)=>async x=>{let D;x&&(x.preventDefault&&x.preventDefault(),x.persist&&x.persist());let R=X(i);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:C,values:N}=await S();t.errors=C,R=N}else await b(s);if(Z(t.errors,"root"),ce(t.errors)){p.state.next({errors:{}});try{await u(R,x)}catch(C){D=C}}else m&&await m({...t.errors},x),We(),setTimeout(We);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ce(t.errors)&&!D,submitCount:t.submitCount+1,errors:t.errors}),D)throw D},$e=(u,m={})=>{E(s,u)&&(G(m.defaultValue)?de(u,X(E(n,u))):(de(u,m.defaultValue),K(n,u,X(m.defaultValue))),m.keepTouched||Z(t.touchedFields,u),m.keepDirty||(Z(t.dirtyFields,u),t.isDirty=m.defaultValue?V(u,X(E(n,u))):V()),m.keepError||(Z(t.errors,u),f.isValid&&M()),p.state.next({...t}))},ye=(u,m={})=>{const x=u?X(u):n,D=X(x),R=ce(u),C=R?n:D;if(m.keepDefaultValues||(n=x),!m.keepValues){if(m.keepDirtyValues)for(const N of l.mount)E(t.dirtyFields,N)?K(C,N,E(i,N)):de(N,E(C,N));else{if(vs&&G(u))for(const N of l.mount){const q=E(s,N);if(q&&q._f){const ee=Array.isArray(q._f.refs)?q._f.refs[0]:q._f.ref;if(Ut(ee)){const te=ee.closest("form");if(te){te.reset();break}}}}s={}}i=e.shouldUnregister?m.keepDefaultValues?X(n):{}:X(C),p.array.next({values:{...C}}),p.values.next({values:{...C}})}l={mount:m.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!f.isValid||!!m.keepIsValid||!!m.keepDirtyValues,a.watch=!!e.shouldUnregister,p.state.next({submitCount:m.keepSubmitCount?t.submitCount:0,isDirty:R?!1:m.keepDirty?t.isDirty:!!(m.keepDefaultValues&&!Ue(u,n)),isSubmitted:m.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:R?{}:m.keepDirtyValues?m.keepDefaultValues&&i?Tt(n,i):t.dirtyFields:m.keepDefaultValues&&u?Tt(n,u):m.keepDirty?t.dirtyFields:{},touchedFields:m.keepTouched?t.touchedFields:{},errors:m.keepErrors?t.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},ct=(u,m)=>ye(Ve(u)?u(i):u,m);return{control:{register:Me,unregister:le,getFieldState:ae,handleSubmit:Ee,setError:ve,_executeSchema:S,_getWatch:$,_getDirty:V,_updateValid:M,_removeUnmounted:P,_updateFieldArray:v,_updateDisabledField:Ct,_getFieldArray:H,_reset:ye,_resetDefaultValues:()=>Ve(r.defaultValues)&&r.defaultValues().then(u=>{ct(u,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:u=>{t={...t,...u}},_disableForm:Xe,_subjects:p,_proxyFormState:f,_setErrors:B,get _fields(){return s},get _formValues(){return i},get _state(){return a},set _state(u){a=u},get _defaultValues(){return n},get _names(){return l},set _names(u){l=u},get _formState(){return t},set _formState(u){t=u},get _options(){return r},set _options(u){r={...r,...u}}},trigger:F,register:Me,handleSubmit:Ee,watch:Le,setValue:de,getValues:Q,reset:ct,resetField:$e,clearErrors:ge,unregister:le,setError:ve,setFocus:(u,m={})=>{const x=E(s,u),D=x&&x._f;if(D){const R=D.refs?D.refs[0]:D.ref;R.focus&&(R.focus(),m.shouldSelect&&R.select())}},getFieldState:ae}}function xi(e={}){const r=z.useRef(),t=z.useRef(),[s,n]=z.useState({isDirty:!1,isValidating:!1,isLoading:Ve(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Ve(e.defaultValues)?void 0:e.defaultValues});r.current||(r.current={...Il(e),formState:s});const i=r.current.control;return i._options=e,er({subject:i._subjects.state,next:a=>{li(a,i._proxyFormState,i._updateFormState,!0)&&n({...i._formState})}}),z.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),z.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==s.isDirty&&i._subjects.state.next({isDirty:a})}},[i,s.isDirty]),z.useEffect(()=>{e.values&&!Ue(e.values,t.current)?(i._reset(e.values,i._options.resetOptions),t.current=e.values,n(a=>({...a}))):i._resetDefaultValues()},[e.values,i]),z.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),z.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),z.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),r.current.formState=ai(s,i),r.current}var Rr={exports:{}};(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=M;var t=l(xn),s=l(oo),n=l(ao),i=l(lo),a=l(co);function l(y){return y&&y.__esModule?y:{default:y}}function c(y,v){return j(y)||g(y,v)||f(y,v)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
152
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(y,v){if(y){if(typeof y=="string")return p(y,v);var I={}.toString.call(y).slice(8,-1);return I==="Object"&&y.constructor&&(I=y.constructor.name),I==="Map"||I==="Set"?Array.from(y):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?p(y,v):void 0}}function p(y,v){(v==null||v>y.length)&&(v=y.length);for(var I=0,B=Array(v);I<v;I++)B[I]=y[I];return B}function g(y,v){var I=y==null?null:typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(I!=null){var B,_,h,w,S=[],A=!0,b=!1;try{if(h=(I=I.call(y)).next,v!==0)for(;!(A=(B=h.call(I)).done)&&(S.push(B.value),S.length!==v);A=!0);}catch(P){b=!0,_=P}finally{try{if(!A&&I.return!=null&&(w=I.return(),Object(w)!==w))return}finally{if(b)throw _}}return S}}function j(y){if(Array.isArray(y))return y}var T={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},k=/^\[([^\]]+)\](?::([0-9]+))?$/;function M(y,v){if((0,t.default)(y),!y||/[\s<>]/.test(y)||y.indexOf("mailto:")===0||(v=(0,a.default)(v,T),v.validate_length&&y.length>v.max_allowed_length)||!v.allow_fragments&&y.includes("#")||!v.allow_query_components&&(y.includes("?")||y.includes("&")))return!1;var I,B,_,h,w,S,A,b;if(A=y.split("#"),y=A.shift(),A=y.split("?"),y=A.shift(),A=y.split("://"),A.length>1){if(I=A.shift().toLowerCase(),v.require_valid_protocol&&v.protocols.indexOf(I)===-1)return!1}else{if(v.require_protocol)return!1;if(y.slice(0,2)==="//"){if(!v.allow_protocol_relative_urls)return!1;A[0]=y.slice(2)}}if(y=A.join("://"),y==="")return!1;if(A=y.split("/"),y=A.shift(),y===""&&!v.require_host)return!0;if(A=y.split("@"),A.length>1){if(v.disallow_auth||A[0]===""||(B=A.shift(),B.indexOf(":")>=0&&B.split(":").length>2))return!1;var P=B.split(":"),V=c(P,2),$=V[0],H=V[1];if($===""&&H==="")return!1}h=A.join("@"),S=null,b=null;var W=h.match(k);if(W?(_="",b=W[1],S=W[2]||null):(A=h.split(":"),_=A.shift(),A.length&&(S=A.join(":"))),S!==null&&S.length>0){if(w=parseInt(S,10),!/^[0-9]+$/.test(S)||w<=0||w>65535)return!1}else if(v.require_port)return!1;return v.host_whitelist?(0,s.default)(_,v.host_whitelist):_===""&&!v.require_host?!0:!(!(0,i.default)(_)&&!(0,n.default)(_,v)&&(!b||!(0,i.default)(b,6))||(_=_||b,v.host_blacklist&&(0,s.default)(_,v.host_blacklist)))}e.exports=r.default,e.exports.default=r.default})(Rr,Rr.exports);var Dl=Rr.exports;const vi=En(Dl);var Ir={exports:{}},Dr={exports:{}},Lr={exports:{}};(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=t;function t(s){return s==null}e.exports=r.default,e.exports.default=r.default})(Lr,Lr.exports);var Ll=Lr.exports;(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=l;var t=n(xn),s=n(Ll);function n(c){return c&&c.__esModule?c:{default:c}}var i=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;function l(c,d){(0,t.default)(c),d=d||{};var f=d.allow_leading_zeroes===!1?i:a,p=!d.hasOwnProperty("min")||(0,s.default)(d.min)||c>=d.min,g=!d.hasOwnProperty("max")||(0,s.default)(d.max)||c<=d.max,j=!d.hasOwnProperty("lt")||(0,s.default)(d.lt)||c<d.lt,T=!d.hasOwnProperty("gt")||(0,s.default)(d.gt)||c>d.gt;return f.test(c)&&p&&g&&j&&T}e.exports=r.default,e.exports.default=r.default})(Dr,Dr.exports);var Pl=Dr.exports;(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;var t=s(Pl);function s(i){return i&&i.__esModule?i:{default:i}}function n(i){return(0,t.default)(i,{allow_leading_zeroes:!1,min:0,max:65535})}e.exports=r.default,e.exports.default=r.default})(Ir,Ir.exports);var Fl=Ir.exports;const Ol=En(Fl),_r={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};function Vl(){var w,S,A;const{api:e}=ot(),{blocklet:r}=Zr(),{t}=he(),{confirmApi:s,confirmHolder:n}=kn(),i=(w=r==null?void 0:r.meta)==null?void 0:w.did,a=Object.assign({..._r},((A=(S=r==null?void 0:r.settings)==null?void 0:S.notification)==null?void 0:A.email)||{}),{handleSubmit:l,control:c,formState:d,watch:f,reset:p}=xi({defaultValues:Ln(a,Object.keys(_r))}),g=Mn({testReceiver:"",testReceiverError:""}),j=f("enabled"),T=fe(async(b,P,V=!0)=>{var $,H;try{const{blocklet:W}=await e.configNotification({input:{did:i,notification:JSON.stringify({email:b})}}),oe=Object.assign({..._r},((H=($=W==null?void 0:W.settings)==null?void 0:$.notification)==null?void 0:H.email)||{});p(oe),V&&ne.success(t("oauth.saveSuccess"))}catch(W){if(V)ne.error(W.message||t("oauth.saveFailed"));else throw W}}),k=fe(async(b,P,V)=>{try{d.isDirty&&await T(b,P,!1),await e.sendEmail({input:{did:i,receiver:V,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),ne.success(t("notification.email.testSuccess"))}catch($){ne.error($.message||t("notification.email.testfailed"))}}),M=fe((b,P)=>{g.testReceiver="",g.testReceiverError="",s.open({title:t("notification.email.testSendEmail"),content:()=>o.jsx(U,{sx:{width:"300px"},children:o.jsx(Te,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:g.testReceiver,onChange:V=>{g.testReceiver=V.target.value},error:!!g.testReceiverError,helperText:g.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(V){var H;const $=(H=g.testReceiver)==null?void 0:H.trim();if(!$){g.testReceiverError=t("notification.email.receiverRequired");return}if(!$s($)){g.testReceiverError=t("notification.email.receiverInvalid");return}g.testReceiverError="",await k(b,P,$),V()}})}),y=fe(b=>{const P=b==null?void 0:b.trim();return P?$s(P)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),v=fe(b=>{const P=b==null?void 0:b.trim();return P?vi(P,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),I=fe(b=>b?Ol(b)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),B=fe(b=>b!=null&&b.trim()?!0:t("notification.email.userRequired")),_=fe(b=>b!=null&&b.trim()?!0:t("notification.email.passwordRequired")),h=fe(()=>!0);return o.jsxs(U,{children:[o.jsxs("form",{onSubmit:l(T),disabled:!0,children:[o.jsx(Ce,{name:"enabled",control:c,render:({field:b})=>o.jsx(gt,{control:o.jsx(Er,{checked:b.value,...b}),label:t("notification.email.enable"),sx:{marginBottom:"8px"}})}),o.jsx(Ce,{name:"from",control:c,rules:{validate:j?y:h},render:({field:b})=>{var P;return o.jsx(Fe,{fullWidth:!0,children:o.jsx(Te,{...b,required:!0,label:t("notification.email.from"),error:!!d.errors[b.name],helperText:((P=d.errors[b.name])==null?void 0:P.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"host",control:c,rules:{validate:j?v:h},render:({field:b})=>{var P;return o.jsx(Fe,{fullWidth:!0,children:o.jsx(Te,{...b,required:!0,error:!!d.errors[b.name],label:t("notification.email.host"),helperText:((P=d.errors[b.name])==null?void 0:P.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"port",control:c,rules:{validate:j?I:h},render:({field:b})=>{var P;return o.jsx(Fe,{fullWidth:!0,children:o.jsx(Te,{...b,required:!0,type:"number",error:!!d.errors[b.name],label:t("notification.email.port"),helperText:((P=d.errors[b.name])==null?void 0:P.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"user",control:c,rules:{validate:j?B:h},render:({field:b})=>{var P;return o.jsx(Fe,{fullWidth:!0,children:o.jsx(Te,{...b,required:!0,error:!!d.errors[b.name],label:t("notification.email.user"),helperText:((P=d.errors[b.name])==null?void 0:P.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"password",control:c,rules:{validate:j?_:h},render:({field:b})=>{var P;return o.jsx(Fe,{fullWidth:!0,children:o.jsx(Te,{...b,required:!0,type:"password",error:!!d.errors[b.name],label:t("notification.email.password"),helperText:((P=d.errors[b.name])==null?void 0:P.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"secure",control:c,rules:{validate:h},render:({field:b})=>o.jsx(Fe,{fullWidth:!0,children:o.jsx(gt,{control:o.jsx(Er,{checked:b.value,...b,disabled:!j}),label:t("notification.email.secure"),style:{marginBottom:16,marginLeft:1}})})}),o.jsx(Ze,{variant:"outlined",color:"warning",onClick:l(M),sx:{mr:2},disabled:!j,children:t("oauth.runTest")}),o.jsx(Ze,{type:"submit",variant:"contained",disabled:!d.isDirty,children:t("oauth.save")})]}),n]})}const wr={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function Ml(){var I,B,_;const{api:e}=ot(),{blocklet:r}=Zr(),{t}=he(),{confirmApi:s,confirmHolder:n}=kn(),i=(I=r==null?void 0:r.meta)==null?void 0:I.did,a=Object.assign({...wr},((_=(B=r==null?void 0:r.settings)==null?void 0:B.notification)==null?void 0:_.pushKit)||{}),{handleSubmit:l,control:c,formState:d,watch:f,reset:p}=xi({defaultValues:Ln(a,Object.keys(wr))}),g=Mn({testReceiver:"",testReceiverError:""}),j=f("enabled"),T=fe(async(h,w,S=!0)=>{var A,b;try{const{blocklet:P}=await e.configNotification({input:{did:i,notification:JSON.stringify({pushKit:h})}}),V=Object.assign({...wr},((b=(A=P==null?void 0:P.settings)==null?void 0:A.notification)==null?void 0:b.pushKit)||{});p(V),S&&ne.success(t("oauth.saveSuccess"))}catch(P){if(S)ne.error(P.message||t("oauth.saveFailed"));else throw P}}),k=fe(async(h,w)=>{var S,A,b;try{d.isDirty&&await T(h,w,!1);const P=(S=((r==null?void 0:r.configs)||[]).find(H=>H.key==="BLOCKLET_APP_URL"))==null?void 0:S.value,V=Pn(Yt(P,"/.well-known/service/blocklet/logo"),{v:(A=r==null?void 0:r.meta)==null?void 0:A.version,t:new Date((r==null?void 0:r.updatedAt)||0).getTime()}),$={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:r==null?void 0:r.appDid,fullName:(b=r==null?void 0:r.meta)==null?void 0:b.title,avatar:V}}}};await e.sendPush({input:{did:i,receiver:g.testReceiver,notification:JSON.stringify($)}}),ne.success(t("notification.pushKit.testSuccess"))}catch(P){ne.error(P.message||t("notification.pushKit.testfailed"))}}),M=fe((h,w)=>{g.testReceiverError="",s.open({title:t("notification.pushKit.testSend"),content:()=>o.jsx(U,{sx:{width:"450px",maxWidth:"100%"},children:o.jsx(Te,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:g.testReceiver,onChange:S=>{g.testReceiver=S.target.value},error:!!g.testReceiverError,helperText:g.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(S){var b;if(!((b=g.testReceiver)==null?void 0:b.trim())){g.testReceiverError=t("notification.pushKit.receiverRequired");return}g.testReceiverError="",await k(h,w),S()}})}),y=fe(h=>{const w=h==null?void 0:h.trim();return w?vi(w)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),v=fe(()=>!0);return o.jsxs(U,{children:[o.jsxs("form",{onSubmit:l(T),disabled:!0,children:[o.jsx(Ce,{name:"enabled",control:c,render:({field:h})=>o.jsx(gt,{control:o.jsx(Er,{checked:h.value,...h}),label:t("notification.pushKit.enable"),sx:{marginBottom:"8px"}})}),o.jsx(Ce,{name:"endpoint",control:c,rules:{validate:j?y:v},render:({field:h})=>{var w;return o.jsx(Fe,{fullWidth:!0,children:o.jsx(Te,{...h,required:!0,label:t("notification.pushKit.endpoint"),error:!!d.errors[h.name],helperText:((w=d.errors[h.name])==null?void 0:w.message)||" ",disabled:!j})})}}),o.jsxs(U,{component:"details",sx:{pl:"1em"},children:[o.jsx(U,{component:"summary",sx:{mb:1,ml:"-1em"},children:t("notification.pushKit.customOptions")}),o.jsx(Ce,{name:"did",control:c,render:({field:h})=>{var w;return o.jsx(Fe,{fullWidth:!0,children:o.jsx(Te,{...h,label:t("notification.pushKit.did"),error:!!d.errors[h.name],helperText:((w=d.errors[h.name])==null?void 0:w.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"pushPath",control:c,render:({field:h})=>{var w;return o.jsx(Fe,{fullWidth:!0,children:o.jsx(Te,{...h,label:t("notification.pushKit.pushPath"),error:!!d.errors[h.name],helperText:((w=d.errors[h.name])==null?void 0:w.message)||" ",disabled:!j})})}})]}),o.jsx(Ze,{variant:"outlined",color:"warning",onClick:l(M),sx:{mr:2},disabled:!j,children:t("oauth.runTest")}),o.jsx(Ze,{type:"submit",variant:"contained",disabled:!d.isDirty,children:t("oauth.save")})]}),n]})}const sn=[{label:o.jsx(U,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:o.jsx(U,{textAlign:"center",width:"100%",children:"Push Kit"}),value:"pushKit"}];function $l(){const[e,r]=L.useState(sn[0].value),{locale:t}=L.useContext(Jt),s=Je(()=>({email:o.jsx(Vl,{}),pushKit:o.jsx(Ml,{})}),[t]),n=L.useMemo(()=>({padding:"10px 0"}),[]);return o.jsxs(U,{children:[o.jsx(Rn,{tabs:sn,current:e,onChange:r}),o.jsx(U,{style:n,children:s[e]})]})}function se(e,r,t){return _n.call(r,"css")?o.jsx(wn,jn(e,r),t):o.jsx(e,r,t)}function jr(e,r,t){return _n.call(r,"css")?o.jsxs(wn,jn(e,r),t):o.jsxs(e,r,t)}/**
153
+ * (c) Iconify
154
+ *
155
+ * For the full copyright and license information, please view the license.txt or license.gpl.txt
156
+ * files at https://github.com/iconify/iconify
157
+ *
158
+ * Licensed under MIT.
159
+ *
160
+ * @license MIT
161
+ * @version 3.1.1
162
+ */const bi=Object.freeze({left:0,top:0,width:16,height:16}),qt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),_t=Object.freeze({...bi,...qt}),Pr=Object.freeze({..._t,body:"",hidden:!1});function Nl(e,r){const t={};!e.hFlip!=!r.hFlip&&(t.hFlip=!0),!e.vFlip!=!r.vFlip&&(t.vFlip=!0);const s=((e.rotate||0)+(r.rotate||0))%4;return s&&(t.rotate=s),t}function nn(e,r){const t=Nl(e,r);for(const s in Pr)s in qt?s in e&&!(s in t)&&(t[s]=qt[s]):s in r?t[s]=r[s]:s in e&&(t[s]=e[s]);return t}function Ul(e,r){const t=e.icons,s=e.aliases||Object.create(null),n=Object.create(null);function i(a){if(t[a])return n[a]=[];if(!(a in n)){n[a]=null;const l=s[a]&&s[a].parent,c=l&&i(l);c&&(n[a]=[l].concat(c))}return n[a]}return Object.keys(t).concat(Object.keys(s)).forEach(i),n}function Bl(e,r,t){const s=e.icons,n=e.aliases||Object.create(null);let i={};function a(l){i=nn(s[l]||n[l],i)}return a(r),t.forEach(a),nn(e,i)}function zl(e,r){const t=[];if(typeof e!="object"||typeof e.icons!="object")return t;e.not_found instanceof Array&&e.not_found.forEach(n=>{r(n,null),t.push(n)});const s=Ul(e);for(const n in s){const i=s[n];i&&(r(n,Bl(e,n,i)),t.push(n))}return t}const pt=/^[a-z0-9]+(-[a-z0-9]+)*$/,lt=(e,r,t,s="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;s=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const l=n.pop(),c=n.pop(),d={provider:n.length>0?n[0]:s,prefix:c,name:l};return r&&!Pt(d)?null:d}const i=n[0],a=i.split("-");if(a.length>1){const l={provider:s,prefix:a.shift(),name:a.join("-")};return r&&!Pt(l)?null:l}if(t&&s===""){const l={provider:s,prefix:"",name:i};return r&&!Pt(l,t)?null:l}return null},Pt=(e,r)=>e?!!((e.provider===""||e.provider.match(pt))&&(r&&e.prefix===""||e.prefix.match(pt))&&e.name.match(pt)):!1,Hl={provider:"",aliases:{},not_found:{},...bi};function Sr(e,r){for(const t in r)if(t in e&&typeof e[t]!=typeof r[t])return!1;return!0}function ql(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Sr(e,Hl))return null;const t=r.icons;for(const n in t){const i=t[n];if(!n.match(pt)||typeof i.body!="string"||!Sr(i,Pr))return null}const s=r.aliases||Object.create(null);for(const n in s){const i=s[n],a=i.parent;if(!n.match(pt)||typeof a!="string"||!t[a]&&!s[a]||!Sr(i,Pr))return null}return r}const Wt=Object.create(null);function Wl(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function Ie(e,r){const t=Wt[e]||(Wt[e]=Object.create(null));return t[r]||(t[r]=Wl(e,r))}function js(e,r){return ql(r)?zl(r,(t,s)=>{s?e.icons[t]=s:e.missing.add(t)}):[]}function Kl(e,r,t){try{if(typeof t.body=="string")return e.icons[r]={...t},!0}catch{}return!1}function Gl(e,r){let t=[];return(typeof e=="string"?[e]:Object.keys(Wt)).forEach(n=>{(typeof n=="string"&&typeof r=="string"?[r]:Object.keys(Wt[n]||{})).forEach(a=>{const l=Ie(n,a);t=t.concat(Object.keys(l.icons).map(c=>(n!==""?"@"+n+":":"")+a+":"+c))})}),t}let Ss=!1;function Ql(e){return Ss}function wt(e){const r=typeof e=="string"?lt(e,!0,Ss):e;if(r){const t=Ie(r.provider,r.prefix),s=r.name;return t.icons[s]||(t.missing.has(s)?null:void 0)}}function Zl(e,r){const t=lt(e,!0,Ss);if(!t)return!1;const s=Ie(t.provider,t.prefix);return Kl(s,t.name,r)}function _i(e,r){if(typeof e!="object")return!1;typeof r!="string"&&(r=e.provider||"");const t=e.prefix;if(!Pt({provider:r,prefix:t,name:"a"}))return!1;const s=Ie(r,t);return!!js(s,e)}function Jl(e){return!!wt(e)}function Yl(e){const r=wt(e);return r?{..._t,...r}:null}const wi=Object.freeze({width:null,height:null}),ji=Object.freeze({...wi,...qt}),Xl=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ec=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Fr(e,r,t){if(r===1)return e;if(t=t||100,typeof e=="number")return Math.ceil(e*r*t)/t;if(typeof e!="string")return e;const s=e.split(Xl);if(s===null||!s.length)return e;const n=[];let i=s.shift(),a=ec.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?n.push(i):n.push(Math.ceil(l*r*t)/t)}else n.push(i);if(i=s.shift(),i===void 0)return n.join("");a=!a}}const tc=e=>e==="unset"||e==="undefined"||e==="none";function tr(e,r){const t={..._t,...e},s={...ji,...r},n={left:t.left,top:t.top,width:t.width,height:t.height};let i=t.body;[t,s].forEach(T=>{const k=[],M=T.hFlip,y=T.vFlip;let v=T.rotate;M?y?v+=2:(k.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),k.push("scale(-1 1)"),n.top=n.left=0):y&&(k.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),k.push("scale(1 -1)"),n.top=n.left=0);let I;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:I=n.height/2+n.top,k.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:k.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:I=n.width/2+n.left,k.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}v%2===1&&(n.left!==n.top&&(I=n.left,n.left=n.top,n.top=I),n.width!==n.height&&(I=n.width,n.width=n.height,n.height=I)),k.length&&(i='<g transform="'+k.join(" ")+'">'+i+"</g>")});const a=s.width,l=s.height,c=n.width,d=n.height;let f,p;a===null?(p=l===null?"1em":l==="auto"?d:l,f=Fr(p,c/d)):(f=a==="auto"?c:a,p=l===null?Fr(f,d/c):l==="auto"?d:l);const g={},j=(T,k)=>{tc(k)||(g[T]=k.toString())};return j("width",f),j("height",p),g.viewBox=n.left.toString()+" "+n.top.toString()+" "+c.toString()+" "+d.toString(),{attributes:g,body:i}}const rc=/\sid="(\S+)"/g,sc="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let nc=0;function Si(e,r=sc){const t=[];let s;for(;s=rc.exec(e);)t.push(s[1]);if(!t.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(i=>{const a=typeof r=="function"?r(i):r+(nc++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const Qe={local:!0,session:!0},Ci={local:new Set,session:new Set};let Cs=!1;function ic(e){Cs=e}const on="iconify2",xt="iconify",Ai=xt+"-count",an=xt+"-version",Ei=36e5,oc=168;function Or(e,r){try{return e.getItem(r)}catch{}}function As(e,r,t){try{return e.setItem(r,t),!0}catch{}}function ln(e,r){try{e.removeItem(r)}catch{}}function Vr(e,r){return As(e,Ai,r.toString())}function Mr(e){return parseInt(Or(e,Ai))||0}let kt=typeof window>"u"?{}:window;function Ti(e){const r=e+"Storage";try{if(kt&&kt[r]&&typeof kt[r].length=="number")return kt[r]}catch{}Qe[e]=!1}function ki(e,r){const t=Ti(e);if(!t)return;const s=Or(t,an);if(s!==on){if(s){const l=Mr(t);for(let c=0;c<l;c++)ln(t,xt+c.toString())}As(t,an,on),Vr(t,0);return}const n=Math.floor(Date.now()/Ei)-oc,i=l=>{const c=xt+l.toString(),d=Or(t,c);if(typeof d=="string"){try{const f=JSON.parse(d);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>n&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&r(f,l))return!0}catch{}ln(t,c)}};let a=Mr(t);for(let l=a-1;l>=0;l--)i(l)||(l===a-1?(a--,Vr(t,a)):Ci[e].add(l))}function Ri(){if(!Cs){ic(!0);for(const e in Qe)ki(e,r=>{const t=r.data,s=r.provider,n=t.prefix,i=Ie(s,n);if(!js(i,t).length)return!1;const a=t.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function Ii(e,r){switch(e){case"local":case"session":Qe[e]=r;break;case"all":for(const t in Qe)Qe[t]=r;break}}const $r=Object.create(null);function Di(e,r){$r[e]=r}function Nr(e){return $r[e]||$r[""]}function Es(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,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 rr=Object.create(null),dt=["https://api.simplesvg.com","https://api.unisvg.com"],Ft=[];for(;dt.length>0;)dt.length===1||Math.random()>.5?Ft.push(dt.shift()):Ft.push(dt.pop());rr[""]=Es({resources:["https://api.iconify.design"].concat(Ft)});function Li(e,r){const t=Es(r);return t===null?!1:(rr[e]=t,!0)}function sr(e){return rr[e]}function ac(){return Object.keys(rr)}const lc=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Kt=lc();function cc(e){Kt=e}function uc(){return Kt}function dc(e,r){const t=sr(e);if(!t)return 0;let s;if(!t.maxURL)s=0;else{let n=0;t.resources.forEach(a=>{n=Math.max(n,a.length)});const i=r+".json?icons=";s=t.maxURL-n-t.path.length-i.length}return s}function fc(e){return e===404}const pc=(e,r,t)=>{const s=[],n=dc(e,r),i="icons";let a={type:i,provider:e,prefix:r,icons:[]},l=0;return t.forEach((c,d)=>{l+=c.length+1,l>=n&&d>0&&(s.push(a),a={type:i,provider:e,prefix:r,icons:[]},l=c.length),a.icons.push(c)}),s.push(a),s};function mc(e){if(typeof e=="string"){const r=sr(e);if(r)return r.path}return"/"}const hc=(e,r,t)=>{if(!Kt){t("abort",424);return}let s=mc(r.provider);switch(r.type){case"icons":{const i=r.prefix,l=r.icons.join(","),c=new URLSearchParams({icons:l});s+=i+".json?"+c.toString();break}case"custom":{const i=r.uri;s+=i.slice(0,1)==="/"?i.slice(1):i;break}default:t("abort",400);return}let n=503;Kt(e+s).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{t(fc(a)?"abort":"next",a)});return}return n=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?t("abort",i):t("next",n)});return}setTimeout(()=>{t("success",i)})}).catch(()=>{t("next",n)})},gc={prepare:pc,send:hc};function yc(e){const r={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((n,i)=>n.provider!==i.provider?n.provider.localeCompare(i.provider):n.prefix!==i.prefix?n.prefix.localeCompare(i.prefix):n.name.localeCompare(i.name));let s={provider:"",prefix:"",name:""};return e.forEach(n=>{if(s.name===n.name&&s.prefix===n.prefix&&s.provider===n.provider)return;s=n;const i=n.provider,a=n.prefix,l=n.name,c=t[i]||(t[i]=Object.create(null)),d=c[a]||(c[a]=Ie(i,a));let f;l in d.icons?f=r.loaded:a===""||d.missing.has(l)?f=r.missing:f=r.pending;const p={provider:i,prefix:a,name:l};f.push(p)}),r}function Pi(e,r){e.forEach(t=>{const s=t.loaderCallbacks;s&&(t.loaderCallbacks=s.filter(n=>n.id!==r))})}function xc(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let t=!1;const s=e.provider,n=e.prefix;r.forEach(i=>{const a=i.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==n)return!0;const d=c.name;if(e.icons[d])a.loaded.push({provider:s,prefix:n,name:d});else if(e.missing.has(d))a.missing.push({provider:s,prefix:n,name:d});else return t=!0,!0;return!1}),a.pending.length!==l&&(t||Pi([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let vc=0;function bc(e,r,t){const s=vc++,n=Pi.bind(null,t,s);if(!r.pending.length)return n;const i={id:s,icons:r,callback:e,abort:n};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),n}function _c(e,r=!0,t=!1){const s=[];return e.forEach(n=>{const i=typeof n=="string"?lt(n,r,t):n;i&&s.push(i)}),s}var wc={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function jc(e,r,t,s){const n=e.resources.length,i=e.random?Math.floor(Math.random()*n):e.index;let a;if(e.random){let h=e.resources.slice(0);for(a=[];h.length>1;){const w=Math.floor(Math.random()*h.length);a.push(h[w]),h=h.slice(0,w).concat(h.slice(w+1))}a=a.concat(h)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",d=0,f,p=null,g=[],j=[];typeof s=="function"&&j.push(s);function T(){p&&(clearTimeout(p),p=null)}function k(){c==="pending"&&(c="aborted"),T(),g.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),g=[]}function M(h,w){w&&(j=[]),typeof h=="function"&&j.push(h)}function y(){return{startTime:l,payload:r,status:c,queriesSent:d,queriesPending:g.length,subscribe:M,abort:k}}function v(){c="failed",j.forEach(h=>{h(void 0,f)})}function I(){g.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),g=[]}function B(h,w,S){const A=w!=="success";switch(g=g.filter(b=>b!==h),c){case"pending":break;case"failed":if(A||!e.dataAfterTimeout)return;break;default:return}if(w==="abort"){f=S,v();return}if(A){f=S,g.length||(a.length?_():v());return}if(T(),I(),!e.random){const b=e.resources.indexOf(h.resource);b!==-1&&b!==e.index&&(e.index=b)}c="completed",j.forEach(b=>{b(S)})}function _(){if(c!=="pending")return;T();const h=a.shift();if(h===void 0){if(g.length){p=setTimeout(()=>{T(),c==="pending"&&(I(),v())},e.timeout);return}v();return}const w={status:"pending",resource:h,callback:(S,A)=>{B(w,S,A)}};g.push(w),d++,p=setTimeout(_,e.rotate),t(h,r,w.callback)}return setTimeout(_),y}function Fi(e){const r={...wc,...e};let t=[];function s(){t=t.filter(l=>l().status==="pending")}function n(l,c,d){const f=jc(r,l,c,(p,g)=>{s(),d&&d(p,g)});return t.push(f),f}function i(l){return t.find(c=>l(c))||null}return{query:n,find:i,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:s}}function cn(){}const Cr=Object.create(null);function Sc(e){if(!Cr[e]){const r=sr(e);if(!r)return;const t=Fi(r),s={config:r,redundancy:t};Cr[e]=s}return Cr[e]}function Oi(e,r,t){let s,n;if(typeof e=="string"){const i=Nr(e);if(!i)return t(void 0,424),cn;n=i.send;const a=Sc(e);a&&(s=a.redundancy)}else{const i=Es(e);if(i){s=Fi(i);const a=e.resources?e.resources[0]:"",l=Nr(a);l&&(n=l.send)}}return!s||!n?(t(void 0,424),cn):s.query(r,n,t)().abort}function Cc(e,r){const t=e.lastModifiedCached;if(t&&t>=r)return t===r;if(e.lastModifiedCached=r,t)for(const s in Qe)ki(s,n=>{const i=n.data;return n.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===r});return!0}function Ac(e,r){Cs||Ri();function t(s){let n;if(!Qe[s]||!(n=Ti(s)))return;const i=Ci[s];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=Mr(n),!Vr(n,a+1))return;const l={cached:Math.floor(Date.now()/Ei),provider:e.provider,data:r};return As(n,xt+a.toString(),JSON.stringify(l))}r.lastModified&&!Cc(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),t("local")||t("session"))}function un(){}function Ec(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,xc(e)}))}function Tc(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:s}=e,n=e.iconsToLoad;delete e.iconsToLoad;let i;if(!n||!(i=Nr(t)))return;i.prepare(t,s,n).forEach(l=>{Oi(t,l,c=>{if(typeof c!="object")l.icons.forEach(d=>{e.missing.add(d)});else try{const d=js(e,c);if(!d.length)return;const f=e.pendingIcons;f&&d.forEach(p=>{f.delete(p)}),Ac(e,c)}catch(d){console.error(d)}Ec(e)})})}))}const kc=e=>{const t=Ie(e.provider,e.prefix).pendingIcons;return!!(t&&t.has(e.name))},Ts=(e,r)=>{const t=_c(e,!0,Ql()),s=yc(t);if(!s.pending.length){let c=!0;return r&&setTimeout(()=>{c&&r(s.loaded,s.missing,s.pending,un)}),()=>{c=!1}}const n=Object.create(null),i=[];let a,l;return s.pending.forEach(c=>{const{provider:d,prefix:f}=c;if(f===l&&d===a)return;a=d,l=f,i.push(Ie(d,f));const p=n[d]||(n[d]=Object.create(null));p[f]||(p[f]=[])}),s.pending.forEach(c=>{const{provider:d,prefix:f,name:p}=c,g=Ie(d,f),j=g.pendingIcons||(g.pendingIcons=new Set);j.has(p)||(j.add(p),n[d][f].push(p))}),i.forEach(c=>{const{provider:d,prefix:f}=c;n[d][f].length&&Tc(c,n[d][f])}),r?bc(r,s,i):un},Rc=e=>new Promise((r,t)=>{const s=typeof e=="string"?lt(e,!0):e;if(!s){t(e);return}Ts([s||e],n=>{if(n.length&&s){const i=wt(s);if(i){r({..._t,...i});return}}t(e)})});function Vi(e,r){const t={...e};for(const s in r){const n=r[s],i=typeof n;s in wi?(n===null||n&&(i==="string"||i==="number"))&&(t[s]=n):i===typeof t[s]&&(t[s]=s==="rotate"?n%4:n)}return t}const nr={...ji,inline:!1},Ar="iconify",Ur="iconify-inline",He="iconifyData"+Date.now();let Ye=[];function jt(e){for(let r=0;r<Ye.length;r++){const t=Ye[r];if((typeof t.node=="function"?t.node():t.node)===e)return t}}function Mi(e,r=!1){let t=jt(e);return t?(t.temporary&&(t.temporary=r),t):(t={node:e,temporary:r},Ye.push(t),t)}function Ic(){if(document.documentElement)return Mi(document.documentElement);Ye.push({node:()=>document.documentElement})}function Dc(e){Ye=Ye.filter(r=>e!==r&&e!==(typeof r.node=="function"?r.node():r.node))}function St(){return Ye}function Lc(e){const r=document;r.readyState&&r.readyState!=="loading"?e():r.addEventListener("DOMContentLoaded",e)}let mt=null;const Pc={childList:!0,subtree:!0,attributes:!0};function $i(e){if(!e.observer)return;const r=e.observer;r.pendingScan||(r.pendingScan=setTimeout(()=>{delete r.pendingScan,mt&&mt(e)}))}function Fc(e,r){if(!e.observer)return;const t=e.observer;if(!t.pendingScan)for(let s=0;s<r.length;s++){const n=r[s];if(n.addedNodes&&n.addedNodes.length>0||n.type==="attributes"&&n.target[He]!==void 0){t.paused||$i(e);return}}}function Ni(e,r){e.observer.instance.observe(r,Pc)}function Gt(e){let r=e.observer;if(r&&r.instance)return;const t=typeof e.node=="function"?e.node():e.node;!t||!window||(r||(r={paused:0},e.observer=r),r.instance=new window.MutationObserver(Fc.bind(null,e)),Ni(e,t),r.paused||$i(e))}function dn(){St().forEach(Gt)}function Ui(e){if(!e.observer)return;const r=e.observer;r.pendingScan&&(clearTimeout(r.pendingScan),delete r.pendingScan),r.instance&&(r.instance.disconnect(),delete r.instance)}function Oc(e){const r=mt!==null;if(mt!==e&&(mt=e,r&&St().forEach(Ui)),r){dn();return}Lc(dn)}function Br(e){(e?[e]:St()).forEach(r=>{if(!r.observer){r.observer={paused:1};return}const t=r.observer;if(t.paused++,t.paused>1||!t.instance)return;t.instance.disconnect()})}function Vc(e){if(e){const r=jt(e);r&&Br(r)}else Br()}function zr(e){(e?[e]:St()).forEach(r=>{if(!r.observer){Gt(r);return}const t=r.observer;if(t.paused&&(t.paused--,!t.paused)){const s=typeof r.node=="function"?r.node():r.node;if(s)t.instance?Ni(r,s):Gt(r);else return}})}function Mc(e){if(e){const r=jt(e);r&&zr(r)}else zr()}function Bi(e,r=!1){const t=Mi(e,r);return Gt(t),t}function zi(e){const r=jt(e);r&&(Ui(r),Dc(e))}function $c(e,r){if(e.name!==r.name||e.mode!==r.mode)return!0;const t=e.customisations,s=r.customisations;for(const n in nr)if(t[n]!==s[n])return!0;return!1}function Nc(e,r=0){const t=e.replace(/^-?[0-9.]*/,"");function s(n){for(;n<0;)n+=4;return n%4}if(t===""){const n=parseInt(e);return isNaN(n)?0:s(n)}else if(t!==e){let n=0;switch(t){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/n,i%1===0?s(i):0)}}return r}const Uc=/[\s,]+/;function Bc(e,r){r.split(Uc).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const zc=["width","height"],Hc=["inline","hFlip","vFlip"];function qc(e,r){return e===r||e==="true"?!0:e===""||e==="false"?!1:null}function Wc(e){const r=e.getAttribute("data-icon"),t=typeof r=="string"&&lt(r,!0);if(!t)return null;const s={...nr,inline:e.classList&&e.classList.contains(Ur)};zc.forEach(l=>{const c=e.getAttribute("data-"+l);c&&(s[l]=c)});const n=e.getAttribute("data-rotate");typeof n=="string"&&(s.rotate=Nc(n));const i=e.getAttribute("data-flip");typeof i=="string"&&Bc(s,i),Hc.forEach(l=>{const c="data-"+l,d=qc(e.getAttribute(c),c);typeof d=="boolean"&&(s[l]=d)});const a=e.getAttribute("data-mode");return{name:r,icon:t,customisations:s,mode:a}}const Kc="svg."+Ar+", i."+Ar+", span."+Ar+", i."+Ur+", span."+Ur;function Gc(e){const r=[];return e.querySelectorAll(Kc).forEach(t=>{const s=t[He]||t.tagName.toLowerCase()!=="svg"?Wc(t):null;s&&r.push({node:t,props:s})}),r}function Hi(e,r){let t=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in r)t+=" "+s+'="'+r[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}let ht;function Qc(){try{ht=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ht=null}}function Zc(e){return ht===void 0&&Qc(),ht?ht.createHTML(e):e}function qi(e){const r=new Set(["iconify"]);return["provider","prefix"].forEach(t=>{e[t]&&r.add("iconify--"+e[t])}),r}function Wi(e,r,t,s){const n=e.classList;if(s){const a=s.classList;Array.from(a).forEach(l=>{n.add(l)})}const i=[];return r.forEach(a=>{n.contains(a)?t.has(a)&&i.push(a):(n.add(a),i.push(a))}),t.forEach(a=>{r.has(a)||n.remove(a)}),i}function Ki(e,r,t){const s=e.style;(t||[]).forEach(i=>{s.removeProperty(i)});const n=[];for(const i in r)s.getPropertyValue(i)||(n.push(i),s.setProperty(i,r[i]));return n}function Gi(e,r,t){let s;try{s=document.createElement("span")}catch{return e}const n=r.customisations,i=tr(t,n),a=e[He],l=Hi(Si(i.body),{"aria-hidden":"true",role:"img",...i.attributes});s.innerHTML=Zc(l);const c=s.childNodes[0],d=e.attributes;for(let T=0;T<d.length;T++){const k=d.item(T),M=k.name;M!=="class"&&!c.hasAttribute(M)&&c.setAttribute(M,k.value)}const f=qi(r.icon),p=Wi(c,f,new Set(a&&a.addedClasses),e),g=Ki(c,n.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),j={...r,status:"loaded",addedClasses:p,addedStyles:g};return c[He]=j,e.parentNode&&e.parentNode.replaceChild(c,e),c}function Jc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Yc(e){return"data:image/svg+xml,"+Jc(e)}function Xc(e){return'url("'+Yc(e)+'")'}const eu={display:"inline-block"},Hr={"background-color":"currentColor"},Qi={"background-color":"transparent"},fn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},pn={"-webkit-mask":Hr,mask:Hr,background:Qi};for(const e in pn){const r=pn[e];for(const t in fn)r[e+"-"+t]=fn[t]}function mn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function tu(e,r,t,s){const n=r.customisations,i=tr(t,n),a=i.attributes,l=e[He],c=Hi(i.body,{...a,width:t.width+"",height:t.height+""}),d=qi(r.icon),f=Wi(e,d,new Set(l&&l.addedClasses)),g={"--svg":Xc(c),width:mn(a.width),height:mn(a.height),...eu,...s?Hr:Qi};n.inline&&(g["vertical-align"]="-0.125em");const j=Ki(e,g,l&&l.addedStyles),T={...r,status:"loaded",addedClasses:f,addedStyles:j};return e[He]=T,e}let Rt=!1;function ru(){Rt||(Rt=!0,setTimeout(()=>{Rt&&(Rt=!1,it())}))}function it(e,r=!1){const t=Object.create(null);function s(n,i){const{provider:a,prefix:l,name:c}=n,d=Ie(a,l),f=d.icons[c];if(f)return{status:"loaded",icon:f};if(d.missing.has(c))return{status:"missing"};if(i&&!kc(n)){const p=t[a]||(t[a]=Object.create(null));(p[l]||(p[l]=new Set)).add(c)}return{status:"loading"}}(e?[e]:St()).forEach(n=>{const i=typeof n.node=="function"?n.node():n.node;if(!i||!i.querySelectorAll)return;let a=!1,l=!1;function c(d,f,p){if(l||(l=!0,Br(n)),d.tagName.toUpperCase()!=="SVG"){const g=f.mode,j=g==="mask"||(g==="bg"?!1:g==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof j=="boolean"){tu(d,f,{..._t,...p},j);return}}Gi(d,f,p)}Gc(i).forEach(({node:d,props:f})=>{const p=d[He];if(!p){const{status:j,icon:T}=s(f.icon,!0);if(T){c(d,f,T);return}a=a||j==="loading",d[He]={...f,status:j};return}let g;if($c(p,f)){if(g=s(f.icon,p.name!==f.name),!g.icon){a=a||g.status==="loading",Object.assign(p,{...f,status:g.status});return}}else{if(p.status!=="loading")return;if(g=s(f.icon,!1),!g.icon){p.status=g.status;return}}c(d,f,g.icon)}),n.temporary&&!a?zi(i):r&&a?Bi(i,!0):l&&n.observer&&zr(n)});for(const n in t){const i=t[n];for(const a in i){const l=i[a];Ts(Array.from(l).map(c=>({provider:n,prefix:a,name:c})),ru)}}}function su(e){const r=jt(e);r?it(r):it({node:e,temporary:!0},!0)}function Zi(e,r,t=!1){const s=wt(e);if(!s)return null;const n=lt(e),i=Vi(nr,r||{}),a=Gi(document.createElement("span"),{name:e,icon:n,customisations:i},s);return t?a.outerHTML:a}function nu(){return"3.1.1"}function iu(e,r){return Zi(e,r,!1)}function ou(e,r){return Zi(e,r,!0)}function au(e,r){const t=wt(e);if(!t)return null;const s=Vi(nr,r||{});return tr(t,s)}function lu(e){e?su(e):it()}if(typeof document<"u"&&typeof window<"u"){Ic();const e=window;if(e.IconifyPreload!==void 0){const r=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof r=="object"&&r!==null&&(r instanceof Array?r:[r]).forEach(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!_i(s))&&console.error(t)}catch{console.error(t)}})}setTimeout(()=>{Oc(it),it()})}function cu(e,r){Ii(e,r!==!1)}function uu(e){Ii(e,!0)}Di("",gc);if(typeof document<"u"&&typeof window<"u"){Ri();const e=window;if(e.IconifyProviders!==void 0){const r=e.IconifyProviders;if(typeof r=="object"&&r!==null)for(const t in r){const s="IconifyProviders["+t+"] is invalid.";try{const n=r[t];if(typeof n!="object"||!n||n.resources===void 0)continue;Li(t,n)||console.error(s)}catch{console.error(s)}}}}const du={getAPIConfig:sr,setAPIModule:Di,sendAPIQuery:Oi,setFetch:cc,getFetch:uc,listAPIProviders:ac},fu={_api:du,addAPIProvider:Li,loadIcons:Ts,loadIcon:Rc,iconExists:Jl,getIcon:Yl,listIcons:Gl,addIcon:Zl,addCollection:_i,replaceIDs:Si,calculateSize:Fr,buildIcon:tr,getVersion:nu,renderSVG:iu,renderHTML:ou,renderIcon:au,scan:lu,observe:Bi,stopObserving:zi,pauseObserver:Vc,resumeObserver:Mc,enableCache:cu,disableCache:uu};try{self.Iconify===void 0&&(self.Iconify=fu)}catch{}var ks={},pu=we;Object.defineProperty(ks,"__esModule",{value:!0});var Ji=ks.default=void 0,mu=pu(je()),hu=o;Ji=ks.default=(0,mu.default)((0,hu.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function Rs({infos:e}){const{t:r}=he(),t=new URL("https://community.arcblock.io/discussions/add");e.forEach(n=>{t.searchParams.set(n.label,n.value)});const s=e.map(n=>`* ${n.label}: ${n.value}`).join(`
163
+ `);return t.searchParams.set("report","server"),t.searchParams.set("context",`[Enter feedback here]
164
+
165
+
166
+
167
+ <!--
168
+ [Server Info]
169
+ ${s}
170
+ * Page: ${window.location.href}
171
+ -->
172
+ `),se(U,{sx:{mx:{xs:0,md:2}},children:se(Kr,{sx:{color:"text.primary"},target:"_blank",href:t.href,rel:"noreferrer",style:{textDecoration:"underline"},children:r("common.reportIssue")})})}Rs.propTypes={infos:O.arrayOf(O.shape({label:O.string,value:O.string}))};Rs.defaultProps={infos:[]};var Is={},gu=we;Object.defineProperty(Is,"__esModule",{value:!0});var qr=Is.default=void 0,yu=gu(je()),hn=o;qr=Is.default=(0,yu.default)([(0,hn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,hn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function Be({children:e}){return Re(t=>t.breakpoints.down("md"))?o.jsx(Vt,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:o.jsx(U,{sx:{display:"flex",alignItems:"center",gap:1},children:o.jsx(qr,{fontSize:"small"})})}):o.jsxs(U,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(qr,{fontSize:"small"}),e]})}Be.propTypes={children:O.node.isRequired};const xu="https://launcher.arcblock.io/",vu=30*24*60*60*1e3;function Ds({launcherUrl:e,chainHost:r,nftId:t,launcherSessionId:s,...n}){var _,h,w,S,A,b;const{t:i,locale:a}=he(),l=ot(),[c,d]=$n({safeIframeRef:null,popoverAnchorEl:null}),f=L.useRef(null),p=Re(P=>P.breakpoints.down("md")),{sx:g={},...j}=n,T=p?"mobile":"desktop",k=Vn(async()=>{const[P,V]=await Promise.all([l.api.getLauncherSession({input:{launcherSessionId:s,launcherUrl:e}}),In({launcherUrl:e||xu,nftDid:t,launcherSessionId:s,locale:a})]);if(P!=null&&P.error)throw new Error(P.error);return{launcherSession:P.launcherSession,subscriptionURL:V}},[a]);if(k.loading)return o.jsx(Ge,{label:o.jsxs(Be,{children:[!p&&i("expiration.desktop.loading"),o.jsx(ze,{size:16})]}),variant:"success",sx:{cursor:"pointer",...g},...j});if(k.error)return console.error(k.error),o.jsx(Ge,{label:o.jsx(Be,{children:i(`expiration.${T}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...g},...j,onClick:()=>k.retry()});const M=P=>{d({popoverAnchorEl:P.currentTarget})},y=()=>{d({popoverAnchorEl:null})},v=(_=k.value)==null?void 0:_.launcherSession;let I="success";[ie.LAUNCH_SESSION_STATUS.overdue,ie.LAUNCH_SESSION_STATUS.canceled,ie.LAUNCH_SESSION_STATUS.terminated].includes((w=(h=k.value)==null?void 0:h.launcherSession)==null?void 0:w.status)&&(I="error");let B=null;if(v.expirationDate&&!v.subscription){const P=rt(v.expirationDate).diff(rt(),"ms");B=i(`expiration.${T}.tips.${I}`,{validity:Fn(P,{locale:Dn(a),compact:!0,verbose:!0})}),P>0&&P<=vu&&(I="warning")}return o.jsxs(o.Fragment,{children:[o.jsx(Ge,{label:o.jsx(Be,{children:B||((A=(S=v==null?void 0:v.subscription)==null?void 0:S.product)==null?void 0:A.name)||i("common.subscription")}),color:I,variant:I!=="success"?"contained":"outlined",sx:{cursor:"pointer",...g},...j,onClick:M}),o.jsx(Sn,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:y,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(U,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:f,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(b=k.value)==null?void 0:b.subscriptionURL})})})]})}Ds.propTypes={chainHost:O.string.isRequired,nftId:O.string,launcherSessionId:O.string,sx:O.object,retention:O.number,launcherUrl:O.string.isRequired};Ds.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const bu=30*24*60*60*1e3,_u="https://launcher.arcblock.io/";function Ls({launcherUrl:e,chainHost:r,nftId:t,launcherSessionId:s,...n}){var h,w,S,A,b,P,V;const{t:i,locale:a}=he(),[l,c]=$n({safeIframeRef:null,popoverAnchorEl:null}),d=L.useRef(null),f=Re($=>$.breakpoints.down("md")),p=ot(),{sx:g={},...j}=n,T=f?"mobile":"desktop",k=Vn(async()=>{const[$,H]=await Promise.all([p.api.getLauncherSession({input:{launcherSessionId:s||t,launcherUrl:e}}),In({launcherUrl:e||_u,nftDid:t,launcherSessionId:s,locale:a})]);if($!=null&&$.error)throw new Error($.error);return{launcherSession:$.launcherSession,subscriptionURL:H}},[a]);if(k.loading)return o.jsx(Ge,{label:o.jsxs(Be,{children:[!f&&i("expiration.desktop.loading"),o.jsx(ze,{size:16})]}),variant:"success",sx:{cursor:"pointer",...g},...j});if(k.error)return console.error(k.error),o.jsx(Ge,{label:o.jsx(Be,{children:i(`expiration.${T}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...g},...j,onClick:()=>k.retry()});const M=(w=(h=k.value)==null?void 0:h.launcherSession)==null?void 0:w.expirationDate,y=rt(M).isBefore(rt()),v=rt(M).diff(rt(),"ms");let I="success";v<=bu&&(I="warning"),y&&(I="error");const B=$=>{c({popoverAnchorEl:$.currentTarget})},_=()=>{c({popoverAnchorEl:null})};return o.jsxs(o.Fragment,{children:[((A=(S=k.value)==null?void 0:S.launcherSession)==null?void 0:A.subscription)&&o.jsx(Ge,{label:o.jsx(Be,{children:i("expiration.desktop.nextInvoice",{date:Wo(M,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...g},...j,onClick:B}),!((P=(b=k.value)==null?void 0:b.launcherSession)!=null&&P.subscription)&&o.jsx(Ge,{label:o.jsx(Be,{children:i(`expiration.${T}.tips.${I}`,{validity:Fn(v,{locale:Dn(a),compact:!0,verbose:!0})})}),color:I,variant:I!=="success"?"contained":"outlined",sx:{cursor:"pointer",...g},...j,onClick:B}),o.jsx(Sn,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:_,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(U,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:d,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(V=k.value)==null?void 0:V.subscriptionURL})})})]})}Ls.propTypes={chainHost:O.string.isRequired,nftId:O.string,launcherSessionId:O.string,sx:O.object,retention:O.number,launcherUrl:O.string.isRequired};Ls.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var Ps={},wu=we;Object.defineProperty(Ps,"__esModule",{value:!0});var Yi=Ps.default=void 0,ju=wu(je()),Su=o;Yi=Ps.default=(0,ju.default)((0,Su.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var Fs={},Cu=we;Object.defineProperty(Fs,"__esModule",{value:!0});var Xi=Fs.default=void 0,Au=Cu(je()),Eu=o;Xi=Fs.default=(0,Au.default)((0,Eu.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");function Tu(){const{inFullPage:e,toggleFullPage:r}=po();return se(Qt,{onClick:r,children:e?se(Xi,{sx:{transform:"scale(1.3)"}}):se(Yi,{sx:{transform:"scale(1.3)"}})})}function Os({children:e}){var I,B,_;const{t:r}=he(),{loading:t,error:s,actions:{refreshBlocklet:n},env:i,blocklet:a}=at(),{info:l}=Ko(),c=Ro(),d=Re(h=>h.breakpoints.down("md")),[f,p]=L.useState(null),{appId:g,version:j}=i,T=[{label:"App ID",value:g},{label:"App Version",value:j},{label:"App Bundle Name",value:(I=a==null?void 0:a.meta)==null?void 0:I.bundleName},{label:"Server Id",value:l.did},{label:"Server Version",value:l.version}],k=h=>{var S,A,b,P;const w=Array.isArray(h)?h:[h];if(d||w.unshift(se(Tu,{})),a){const V={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};Go(a)?w.unshift(se(Ds,{chainHost:(S=a==null?void 0:a.controller)==null?void 0:S.chainHost,nftId:(A=a==null?void 0:a.controller)==null?void 0:A.nftId,launcherSessionId:(b=a==null?void 0:a.controller)==null?void 0:b.launcherSessionId,launcherUrl:(P=a==null?void 0:a.controller)==null?void 0:P.launcherUrl,sx:V})):l.ownerNft&&l.launcher&&w.unshift(se(Ls,{chainHost:l.launcher.chainHost,launcherUrl:l.launcher.url,nftId:l.ownerNft.did,launcherSessionId:l.ownerNft.launcherSessionId,sx:V}))}return w},M=(B=((a==null?void 0:a.environments)||[]).find(h=>h.key===Oe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:B.value,y=(_=((a==null?void 0:a.environments)||[]).find(h=>h.key===Oe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:_.value;return L.useEffect(()=>{if(d)p(null);else{const{appLogo:h,appLogoRect:w}=window.blocklet??{};(w||h)&&p(`${w||h}&v=${Date.now()}`)}},[M,y,d]),jr(ku,{legacy:!1,fullWidth:!0,headerAddons:k,headerProps:{logo:f?se("img",{src:f,alt:"logo"}):null},footerProps:{addon:se(Rs,{infos:T})},children:[!a&&t&&se(Mt,{relative:"parent",children:se(ze,{})}),!a&&s&&jr(Mt,{relative:"parent",children:[jr(U,{display:"flex",alignItems:"center",children:[se(Ji,{color:"error",sx:{marginRight:1}}),Jr(s)]}),se(Ze,{onClick:()=>n(),children:se("span",{style:{textDecoration:"underline"},children:r("common.retry")})})]}),!!a&&se(U,{flex:1,padding:d?2:3,display:"flex",flexDirection:"column",children:se(No,{FallbackComponent:fo,resetKeys:[c.pathname],children:e})})]})}Os.propTypes={children:O.any};Os.defaultProps={children:null};const ku=De(uo)`
173
+ div.dashboard-content {
174
+ padding: 0;
175
+ }
176
+ .header-addons .locales {
177
+ max-height: 400px;
178
+ overflow-y: auto;
179
+ }
180
+ `;function Ru(){const{t:e,locale:r}=he(),{blocklet:t,launcherSession:s}=at(),[n,i]=da({subscriptionURL:"#"});if(L.useEffect(()=>{var c,d;zs(t,s)&&Qo({launcherSessionId:(c=t==null?void 0:t.controller)==null?void 0:c.launcherSessionId,launcherUrl:(d=t==null?void 0:t.controller)==null?void 0:d.launcherUrl,locale:r}).then(f=>{i({subscriptionURL:f})}).catch(f=>{console.error("get subscription url error:",f)})},[t,s]),!t||!s||!Zo(t)||s.status===ie.LAUNCH_SESSION_STATUS.installed)return"";let a=null,l="";return zs(t,s)?(a=o.jsx(Kr,{href:n.subscriptionURL,children:e("blocklet.manageSubscription")}),l=e("blocklet.suspendedCausedByExpired",{deadline:Hs(s==null?void 0:s.reservedUntil,r)})):Jo(t,s)&&(a=o.jsx(Cn,{to:Yt(ie.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),l=e("blocklet.suspendedCausedByTerminated",{canceledAt:Hs(s==null?void 0:s.terminatedAt,r),deadline:Yo(s==null?void 0:s.terminatedAt,r)})),o.jsxs(U,{component:Uo,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[l,o.jsx(pe,{component:"span",sx:{marginLeft:"4px"},children:a})]})}const eo=L.createContext({});function kd(){return L.useContext(eo)}const{Provider:Iu,Consumer:Rd}=eo,{did:Se,appId:Du}=window.env;function Lu({children:e}){var h,w;const{t:r,locale:t}=he(),{blocklet:s}=at(),[n,i]=L.useState([]),[a,l]=L.useState([]),[c,d]=L.useState([]),f=xe.getDisplayName(s),p=((h=((s==null?void 0:s.environments)||[]).find(S=>S.key===Oe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:h.value)||"auto",g=(s==null?void 0:s.trustedPassports)||[],j=(s==null?void 0:s.trustedFactories)||[],T=(s==null?void 0:s.enablePassportIssuance)!==!1,k=async()=>{try{const S=await At.doBatchQuery({getRoles:{input:{teamDid:Se}},getPermissions:{input:{teamDid:Se}},getInvitations:{input:{teamDid:Se}}});l((S.getRoles.roles||[]).filter(A=>!ie.RBAC_CONFIG.roles.some(b=>b.name===A.name&&(!b.passport||b.ci))).map(A=>(A.hasDescription=!!A.description,A.hasDescription||(A.description=r("team.passport.description",{teamName:f,title:A.title})),A))),d(S.getPermissions.permissions||[]),i(S.getInvitations.invitations||[])}catch(S){ne.error(S.message)}},M=({did:S}={})=>{const A={teamDid:Se,user:{did:S}};return At.getUser({input:A})},y=({query:S,paging:A}={})=>{const b={teamDid:Se};return A&&(b.paging=A),S&&(b.query=S),b.sort={lastLoginAt:-1},At.getUsers({input:b})},v=()=>At.getUsersCountPerRole({input:{teamDid:Se}}),I=()=>k();L.useEffect(()=>{var S;(S=s==null?void 0:s.meta)!=null&&S.did&&k()},[(w=s==null?void 0:s.meta)==null?void 0:w.did]),L.useEffect(()=>{l(S=>S.map(A=>(A.hasDescription||(A.description=r("team.passport.description",{teamName:f,title:A.title})),{...A})))},[r,t]);const B=S=>{S.teamDid===Se&&k()};It(Oe.TeamEvents.userAdded,B,[Se]),It(Oe.TeamEvents.userRemoved,B,[Se]),It(Oe.TeamEvents.userUpdated,B,[Se]);const _={teamDid:Se,teamIssuerDid:Du,teamName:f,invitations:n,roles:a,permissions:c,trustedPassports:g,trustedFactories:j,isNodeTeam:!1,enablePassportIssuance:T,refresh:I,passportColor:p,endpoint:window.location.origin,blocklet:s,api:{getUser:M,getUsers:y,getUsersCountPerRole:v}};return o.jsx(Iu,{value:_,children:e})}const Pu=L.lazy(()=>Y(()=>import("./log-D4PQ7UF3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),Fu=L.lazy(()=>Y(()=>import("./index-jny05NvM.js"),__vite__mapDeps([14,2,1,5,15,4,6,7,8,10,16,9,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,3,33,34,35,36,37,38,39]))),Ou=L.lazy(()=>Y(()=>import("./index-G26gYrxE.js"),__vite__mapDeps([40,4,2,5,1,6,7,8,37,9,10,41,25,21,30,31,3,33,34,35,19,36,22,38,39]))),Vu=L.lazy(()=>Y(()=>import("./index-DQC9zneB.js"),__vite__mapDeps([42,2,1,9,10,4,5,6,7,8,43,25,21,19,17,44,12,32,45,11,20,46,38,15,47,29,48,49,50,24,51,52,53,54,55,56,34,57,58,59,60]))),Mu=L.lazy(()=>Y(()=>import("./overview-BjFpvrpN.js"),__vite__mapDeps([61,1,2,4,5,6,7,8,10,37,62,35,9,23,36,22,17,63,64,65,48,3,25,21,33,34,19,38,39]))),$u=L.lazy(()=>Y(()=>import("./domains-BHkUaPc7.js"),__vite__mapDeps([66,2,4,5,1,6,7,8,9,10,67,41,18,19,36,22,25,21,30,31,56,20,32,68,38,37,23,69]))),Nu=L.lazy(()=>Y(()=>import("./index-C4dzrN-k.js"),__vite__mapDeps([70,2,6,5,1,4,7,8,15,9,10,17,26,27,18,19,71,72,73,25,21,45,38,74,3,33,34,35,36,22,37,39]))),Uu=L.lazy(()=>Y(()=>import("./appearance-DmQgth7a.js"),__vite__mapDeps([75,76,2,10,1,4,5,6,7,8,9]))),Bu=L.lazy(()=>Y(()=>import("./audit-logs-LLoqbniS.js"),__vite__mapDeps([77,4,2,5,1,6,7,8,26,27,3,9,10,58,59,37,78,35,32,60,25,21,33,34,19,36,22,38,39]))),zu=L.lazy(()=>Y(()=>import("./index-Bj10Vbvc.js"),__vite__mapDeps([79,2,1,5,4,6,7,8,9,10,32,23,80,47,12,35,78,37,69,26,27,17,81,36,22,76,82,83,49,84,21,50,3,25,33,34,19,38,39]))),Hu=L.lazy(()=>Y(()=>import("./config-navigation-C4hgzi4R.js"),__vite__mapDeps([85,2,4,5,1,6,7,8,86,10,9,64,72,87,88,48,35,51,52,21,3,25,33,34,19,36,22,37,38,39]))),qu=L.lazy(()=>Y(()=>import("./index-3dawiJIg.js"),__vite__mapDeps([89,1,2,6,5,10,4,7,8,9,90,48,91,92,65,24,21,23,93,31,34,94,45,3,25,33,35,19,36,22,37,38,39]))),Wu=L.lazy(()=>Y(()=>import("./index-CFs0La6o.js"),__vite__mapDeps([95,4,2,5,1,6,7,8,9,10,94,62,23,27,90,3,25,21,33,34,35,19,36,22,37,38,39]))),Ku=L.lazy(()=>Y(()=>import("./security-Dkk4FgYt.js"),__vite__mapDeps([96,4,2,5,1,6,7,8,9,10,88,97,90,3,25,21,33,34,35,19,36,22,37,38,39]))),Gu=L.lazy(()=>Y(()=>import("./branding-DcviCyPr.js"),__vite__mapDeps([98,2,1,4,5,6,7,8,10,55,99,15,73,57,9,18,19,35]))),Qu=L.lazy(()=>Y(()=>import("./advanced-Cvboset8.js"),__vite__mapDeps([100,2,1,9,10,4,5,6,7,8,18,19,25,21,38,20,23,17,63,64,3,33,34,35,36,22,37,39]))),Zu=L.lazy(()=>Y(()=>import("./traffic-WemHsP0B.js").then(e=>e.t),__vite__mapDeps([81,2,9,1,10,4,5,6,7,8,36,22,76,82,83,49,84,21,50]))),Ju=L.lazy(()=>Y(()=>import("./runtime-kNyRK8Hy.js"),__vite__mapDeps([101,2,1,35,5,10,4,6,7,8,9,93,12,3,25,21,33,34,19,36,22,37,38,39]))),Yu=L.lazy(()=>Y(()=>import("./component-DVhWy5jQ.js"),__vite__mapDeps([102,1,2,5,4,6,7,8,10,9,103,94,18,19,86,84,52,20,49,83,57,21,104,53,54,55,24,56,32,25,34,17,105,106,92,65,48,99,15,107,71,72,58,59,87,23,3,68,90,108,91,109,74,37,76,12,33,30,31,35,36,22,38,39]))),Xu=L.lazy(()=>Y(()=>import("./index-Du71d9ZJ.js"),__vite__mapDeps([110,1,2,9,10,4,5,6,7,8]))),ed=Yt(ie.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),td=e=>{const{enqueueSnackbar:r}=Tn(),t=L.useCallback(s=>Pn(ed,{id:s.id,severity:s.severity||"all",componentDid:s.source==="system"?"system":s.componentDid||"all"}),[]);It(`${e}/${ie.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,s=>{const n=t(s),{severity:i,description:a}=s||{},l=["error","warning"].includes(i)||s.sticky;s.source==="system"&&r(a,{variant:i,autoHideDuration:l?null:5e3,content:c=>o.jsx(Ja,{viewAllUrl:n,keyId:c,notification:s,content:o.jsx(pl,{notification:s,minimal:!0,rows:0})})})},[],"user")};function to({blocklet:e,isAdmin:r}){const[t,s]=L.useState(!1),{t:n}=he(),i=pa();return r?o.jsxs(o.Fragment,{children:[o.jsx(zu,{blocklet:e,customTableButtons:[o.jsxs(U,{display:"flex",alignItems:"center",gap:1.5,children:[o.jsx(Qt,{onClick:()=>s(!0),sx:{p:i?0:void 0},children:o.jsx(ss,{})},"settings"),i?o.jsx(pe,{children:n("common.setting")}):null]})]}),o.jsx(Bo,{title:`${n("common.notification")} ${n("common.setting")}`,fullWidth:!0,maxWidth:"md",open:t,onClose:()=>s(!1),PaperProps:{style:{minHeight:"500px"}},children:o.jsx(U,{sx:{mt:"-16px",overflowY:"hidden"},children:o.jsx($l,{})})})]}):o.jsx(ho,{status:403})}to.propTypes={blocklet:O.object.isRequired,isAdmin:O.bool.isRequired};const rd=e=>{var f,p;const{t:r}=he(),{blocklet:t,actions:{refreshBlocklet:s},client:n,did:i}=at(),a=(f=t==null?void 0:t.meta)==null?void 0:f.did,l=!t||lr(t.status)?[]:xe.getAppMissingConfigs(t),c={overview:[{label:r("common.overview"),value:"overview"},{label:o.jsx(ko,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!l.length,children:r("common.components")}),value:"components"}],"did-connect":[{label:r("common.members"),value:"members"},{label:r("team.member.passports"),value:"passports"},{label:r("common.setting"),value:"settings"},{label:r("common.security"),value:"security"}],website:[{label:r("common.domains"),value:"domains"},{label:r("common.branding"),value:"branding",show:!lr(t==null?void 0:t.status)},{label:r("common.theming"),value:"theming",show:!lr(t==null?void 0:t.status)},{label:r("common.navigation"),value:"navigation"},{label:r("common.sitemap"),value:"sitemap"}],operations:[{label:r("common.notificationRecords"),value:"notifications",show:e},{label:r("common.analytics"),value:"analytics"},{label:r("common.auditLogs"),value:"audit-logs"},{label:r("common.advanced"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:r("common.accessKeys"),value:"access-keys"}],developers:[{label:r("common.logs"),value:"logs",show:((p=t==null?void 0:t.children)==null?void 0:p.length)&&t.structVersion===ie.APP_STRUCT_VERSION},{label:r("common.performance"),value:"performance"},{label:r("common.docs"),value:"docs"}]},d={overview:o.jsx(Mu,{}),components:Yu,members:o.jsx(Fu,{type:"blocklet",createPassportSvg:qs}),passports:o.jsx(Nu,{createPassportSvg:qs}),settings:o.jsx(Wu,{orientation:"vertical"}),security:o.jsx(Ku,{}),"did-spaces":o.jsx(qu,{navOrientation:"horizontal"}),branding:o.jsx(Gu,{blocklet:t,onUpdate:s}),theming:o.jsx(Uu,{}),navigation:Hu,domains:o.jsx($u,{}),sitemap:o.jsx(Bs,{children:r("common.comingSoon")}),notifications:o.jsx(to,{blocklet:t,isAdmin:e}),"audit-logs":o.jsx(Bu,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:o.jsx(Zu,{client:n,did:i}),advanced:o.jsx(Qu,{blocklet:t,onUpdate:s}),webhooks:o.jsx(Ou,{}),"access-keys":o.jsx(Bs,{children:r("common.comingSoon")}),logs:Pu,performance:o.jsx(Ju,{client:n,did:i}),docs:o.jsx(Xu,{}),publish:o.jsx(Vu,{})};return{tabGroups:c,renders:d}};function sd(){var M,y;const e=An(),{tab:r="overview",subtab:t}=Io(),{blocklet:s}=at(),{t:n}=he(),{session:i}=On(),a=Je(()=>{var v;return(v=i==null?void 0:i.user)==null?void 0:v.did},[i]),l=Je(()=>{var v;return((v=i.user)==null?void 0:v.role)&&ea.includes(i.user.role)},[i]);td(a);const{tabGroups:c,renders:d}=rd(l),f=v=>{e(`${ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${r}/${v}`)},p=(c[r]||[]).filter(v=>v.show===void 0||v.show),g=((M=(p||[]).find(v=>v.value===t))==null?void 0:M.value)||((y=p==null?void 0:p[0])==null?void 0:y.value)||r,j=d[g]||d.overview,T=["overview"].includes(r),k=s?o.jsxs(Yr,{type:"components",children:[p.length>0&&o.jsx(U,{pt:T?3:0,mb:2,children:o.jsx(Rn,{tabs:p,current:g,onChange:f,scrollButtons:"auto"})}),o.jsx(U,{className:"page-content",children:o.jsx(L.Suspense,{fallback:o.jsx(Mt,{relative:"parent",children:o.jsx(ze,{})}),children:L.isValidElement(j)?j:o.jsx(j,{blocklet:s})})})]}):o.jsx(Mt,{relative:"parent",children:o.jsx(ze,{})});return o.jsx(ta,{children:o.jsx(Lu,{children:o.jsx(Os,{children:o.jsxs(id,{children:[T&&o.jsxs(U,{component:"div",className:"page-header",children:[o.jsxs(pe,{component:"h6",variant:"h6",className:"page-title",color:"textPrimary",children:[s?o.jsx(ca,{blocklet:s,style:{marginRight:16}}):null,s?o.jsxs(U,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[o.jsx(U,{children:xe.getDisplayName(s)}),(s==null?void 0:s.status)!=="unknown"&&o.jsx(ds,{size:"12px",status:s.status,source:s.source,progress:s.progress})]}):`${n("common.blocklet")} ${n("common.detail")}`]}),s?o.jsx(Ua,{className:"page-actions",hasPermission:!0,blocklet:s,onStart:()=>{},onComplete:({error:v}={})=>{v&&ne.error(v.message)},variant:"group"}):null]}),o.jsx(Gn,{}),o.jsx(Ru,{}),k]})})})})}function nd(){var s;const{blocklet:e}=at(),{t:r}=he(),t=(s=e==null?void 0:e.meta)==null?void 0:s.did;return L.useEffect(()=>{const n=Xo();return t&&n.connect(),()=>{t&&n.isConnected()&&n.disconnect()}},[t]),o.jsxs(o.Fragment,{children:[o.jsx(mo,{children:o.jsx("title",{children:r("pageTitle.dashboard")})}),o.jsx(sd,{})]})}const id=De.main`
181
+ .page-header {
182
+ display: flex;
183
+ justify-content: space-between;
184
+ align-items: center;
185
+ flex-wrap: wrap;
186
+ gap: 16px;
187
+ }
188
+
189
+ .page-title {
190
+ display: flex;
191
+ align-items: center;
192
+
193
+ .page-link {
194
+ font-size: 15px;
195
+ margin-top: 8px;
196
+ margin-left: 8px;
197
+ }
198
+ }
199
+
200
+ @media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
201
+ .page-header {
202
+ flex-direction: column;
203
+ align-items: flex-start;
204
+ .page-actions,
205
+ .MuiButtonGroup-root {
206
+ width: 100%;
207
+ }
208
+ .MuiButtonGroup-root {
209
+ .MuiButtonBase-root {
210
+ flex: 1;
211
+ }
212
+ .blocklet-action-text {
213
+ display: none;
214
+ }
215
+ }
216
+ }
217
+
218
+ .page-title {
219
+ margin-bottom: 15px;
220
+ }
221
+ }
222
+ `,Id=Object.freeze(Object.defineProperty({__proto__:null,default:nd},Symbol.toStringTag,{value:"Module"}));export{ds as B,Ce as C,us as W,xi as a,Bn as b,Un as c,Ji as d,Td as e,qn as f,et as g,Ed as h,Id as i,kd as u};
@@ -1 +1 @@
1
- import{j as e,ad as h,T as g,M as j,E as i}from"./vendor-mui-core-C-PhacC8.js";import{u as _}from"./vendor-ux-did-connect-BQ3cvv_1.js";import{C as v}from"./click-to-copy-CkbZjUXU.js";import{S as T}from"./shorten-label-C642GTxb.js";import{C as b}from"./confirm-C-7TGRgW.js";function s({title:l,description:c,confirmPlaceholder:m,cancel:d,confirm:p,params:u,onCancel:f,onConfirm:C,keyName:r}){const{t}=_(),n={title:()=>e.jsxs("div",{children:[l,e.jsx(T,{sx:{fontSize:"14px"},maxLength:64,children:` (${r})`})]}),description:(a,x)=>{const y=o=>{x({...o,__disableConfirm:o.__disableConfirm})};return e.jsxs("div",{children:[e.jsx(h,{severity:"warning",style:{width:"100%"},children:t("common.notice")}),e.jsx("div",{style:{marginTop:24,marginBottom:24},dangerouslySetInnerHTML:{__html:c}}),e.jsxs("div",{style:{marginBottom:24},children:[t("common.click"),":",e.jsx(v,{"data-cy":"click-copy",children:r})]}),e.jsx(g,{component:"div",children:e.jsx(j,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:a.inputVal,onChange:o=>{y({...a,inputVal:o.target.value,__disableConfirm:r!==o.target.value})}})})]})},confirm:p,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...u}};return e.jsx(b,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})}s.propTypes={title:i.any.isRequired,keyName:i.any.isRequired,description:i.any.isRequired,confirmPlaceholder:i.any.isRequired,cancel:i.string,confirm:i.string,params:i.object,onCancel:i.func,onConfirm:i.func.isRequired};s.defaultProps={onCancel:()=>{},cancel:"",confirm:"Confirm",params:{}};export{s as D};
1
+ import{j as e,ad as h,T as g,M as j,E as i}from"./vendor-mui-core-1jJmAutq.js";import{u as _}from"./vendor-ux-did-connect-DlrX4cqq.js";import{C as v}from"./click-to-copy-q_I2l6Sg.js";import{S as T}from"./shorten-label-DDBwv81M.js";import{C as b}from"./confirm-C1Nde1Nq.js";function s({title:l,description:c,confirmPlaceholder:m,cancel:d,confirm:p,params:u,onCancel:f,onConfirm:C,keyName:r}){const{t}=_(),n={title:()=>e.jsxs("div",{children:[l,e.jsx(T,{sx:{fontSize:"14px"},maxLength:64,children:` (${r})`})]}),description:(a,x)=>{const y=o=>{x({...o,__disableConfirm:o.__disableConfirm})};return e.jsxs("div",{children:[e.jsx(h,{severity:"warning",style:{width:"100%"},children:t("common.notice")}),e.jsx("div",{style:{marginTop:24,marginBottom:24},dangerouslySetInnerHTML:{__html:c}}),e.jsxs("div",{style:{marginBottom:24},children:[t("common.click"),":",e.jsx(v,{"data-cy":"click-copy",children:r})]}),e.jsx(g,{component:"div",children:e.jsx(j,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:a.inputVal,onChange:o=>{y({...a,inputVal:o.target.value,__disableConfirm:r!==o.target.value})}})})]})},confirm:p,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...u}};return e.jsx(b,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})}s.propTypes={title:i.any.isRequired,keyName:i.any.isRequired,description:i.any.isRequired,confirmPlaceholder:i.any.isRequired,cancel:i.string,confirm:i.string,params:i.object,onCancel:i.func,onConfirm:i.func.isRequired};s.defaultProps={onCancel:()=>{},cancel:"",confirm:"Confirm",params:{}};export{s as D};
@@ -1 +1 @@
1
- import{j as s,ai as p,E as r}from"./vendor-mui-core-C-PhacC8.js";import{L as d}from"./vendor-react-DoD83n6N.js";import{P as f}from"./vendor-ux-did-connect-BQ3cvv_1.js";function o({did:a,href:t,external:i,avatarProps:l,...n}){const e=s.jsx(f,{did:a,...n});return t?i?s.jsx(p,{target:"_blank",href:t,underline:"hover",children:e}):s.jsx(d,{to:t,children:e}):e}o.propTypes={did:r.string.isRequired,to:r.string,href:r.string,avatarProps:r.object,external:r.bool};o.defaultProps={to:"",href:"",avatarProps:{},external:!1};export{o as W};
1
+ import{j as s,ai as p,E as r}from"./vendor-mui-core-1jJmAutq.js";import{L as d}from"./vendor-react-DEoibe3W.js";import{X as f}from"./vendor-ux-did-connect-DlrX4cqq.js";function o({did:a,href:t,external:i,avatarProps:l,...n}){const e=s.jsx(f,{did:a,...n});return t?i?s.jsx(p,{target:"_blank",href:t,underline:"hover",children:e}):s.jsx(d,{to:t,children:e}):e}o.propTypes={did:r.string.isRequired,to:r.string,href:r.string,avatarProps:r.object,external:r.bool};o.defaultProps={to:"",href:"",avatarProps:{},external:!1};export{o as W};
@@ -1,4 +1,4 @@
1
- import{j as o,a4 as i,E as h,aa as C}from"./vendor-mui-core-C-PhacC8.js";import{o as k,f as B,ag as w,d as x}from"./index-_IytyGrM.js";import{D as E,a as I,b}from"./domain-action-card-BQASO--e.js";import{aZ as T}from"./vendor-ux-did-connect-BQ3cvv_1.js";import{P as A}from"./page-header-D3dCkXy7.js";import{r}from"./vendor-react-DoD83n6N.js";import{_ as L}from"./useSetState-BL3ktMon.js";import{S as D}from"./button-BQLtMsfK.js";import{S as W}from"./layout-DdaOYlXg.js";import{S as _}from"./step-actions-BIyonirh.js";import"./vendor-arcblock-D8eCUoJY.js";import"./vendor-utils-CRBr0QUY.js";import"./vendor-hooks-DtYI0-rF.js";import"./lottie-web-B6s7dDoL.js";import"./ExpandLess-uIJAqSZm.js";import"./permission-ClAqVelD.js";import"./session-Clq9kJzg.js";import"./useAsyncRetry-CwtLImQi.js";import"./useAsync-BmuLIImU.js";import"./confirm-C-7TGRgW.js";import"./format-error-LAoTjvJe.js";import"./actions-C9vqEgMU.js";import"./MoreHoriz-BD8SroCJ.js";import"./delete-confirm-C_4zg33B.js";import"./click-to-copy-CkbZjUXU.js";import"./shorten-label-C642GTxb.js";import"./util-CllYCEyt.js";import"./InfoOutlined-DFTm-vVr.js";import"./index-CqRb1YIC.js";import"./CheckCircle-D7CrWlJ6.js";import"./content-layout-uPtoKIAs.js";import"./use-mobile-B_Gqv6b6.js";function d({onNext:s,onPrevious:S}){var u,f;const{t:n}=r.useContext(T),[j,p]=r.useState(!1),{blocklet:e}=k(),[l,y]=r.useState(""),P=(((e==null?void 0:e.site)||{}).domainAliases||[]).map(t=>B.replaceSlotToIp(t.value,l)),[a,m]=L({domain:"",invalidDNSDomain:null,type:"",addDomainState:{text:""}}),c=(f=(u=e.environments)==null?void 0:u.find(t=>t.key==="BLOCKLET_APP_PK"))==null?void 0:f.value,g=P.find(t=>w.isDidDomain(t));return r.useEffect(()=>{x.get(`/dns-resolve?hostname=${window.location.hostname}`).then(({data:t})=>{y(t.address||"")}).catch(t=>{console.error(t.message)})},[]),o.jsxs($,{children:[o.jsx(i,{className:"header",children:o.jsx(A,{title:n("setup.domain.title"),subTitle:n("setup.domain.subTitle"),onClickBack:S})}),o.jsxs(i,{className:"form",sx:{display:"flex",flexDirection:"column",gap:3,overflowY:"auto"},children:[o.jsxs(i,{children:[o.jsx(i,{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",children:o.jsx(i,{display:"inline",children:`${n("setup.domain.buyOrConnect")} (${n("common.optional")})`})}),o.jsx(i,{mt:1,children:o.jsx(I,{blocklet:e,bugDidDomainProps:{appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,inBlockletSetup:!0},connectDomainProps:{autoFocus:!1,appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,cnameDomain:g,currentIp:l,inBlockletSetup:!0,shouldCheckDomain:!0,resolveDomain:t=>x.get(`/dns-resolve?hostname=${t}`),onInputDomain:t=>{m({domain:t.domain,type:t.type}),p(t.error)},onStateChange:t=>m({addDomainState:t}),onSuccess:t=>{const v={domain:t.domain,type:t.type,nftDid:t.nftDid,chainHost:t.chainHost};m(v),s()},onError:p}})})]}),o.jsxs(i,{children:[o.jsx(i,{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",children:o.jsx(i,{display:"inline",children:n("setup.domain.skipDescription")})}),o.jsx(i,{mt:1,children:o.jsx(b,{inSetup:!0,showAllDomains:!0})})]})]}),o.jsx(_,{mt:8,disabled:!!a.addDomainState.text,blocklet:e,onStartNow:()=>s("complete"),children:a.domain?o.jsx(D,{variant:"contained",loading:!!a.addDomainState.text,disabled:j||!!a.addDomainState.text||!a.domain,onClick:()=>s(),children:a.addDomainState.text||n("setup.continue")}):o.jsx(D,{variant:"contained",disabled:!!a.addDomainState.text,onClick:()=>s(),children:n("setup.continue")})})]})}function Dt(s){return o.jsx(E,{children:o.jsx(d,{...s})})}d.propTypes={onNext:h.func,onPrevious:h.func};d.defaultProps={onNext:()=>{},onPrevious:()=>{}};const $=C(W)`
1
+ import{j as o,a4 as i,E as h,aa as C}from"./vendor-mui-core-1jJmAutq.js";import{n as k,f as B,ac as w,d as x}from"./index-CTpJt8AJ.js";import{D as E,a as I,b}from"./domain-action-card-Crwneu7N.js";import{a$ as T}from"./vendor-ux-did-connect-DlrX4cqq.js";import{P as A}from"./page-header-B7j9M6Zp.js";import{r}from"./vendor-react-DEoibe3W.js";import{_ as L}from"./useSetState-CWq0AVWn.js";import{S as D}from"./button-OxbVr1Od.js";import{S as W}from"./layout-R4Ynfcbq.js";import{S as $}from"./step-actions-CujnheOz.js";import"./vendor-arcblock-CD8CMsgQ.js";import"./vendor-utils-Cm2BKG2b.js";import"./vendor-hooks-8r-lvvPs.js";import"./lottie-web-jYmAQWuC.js";import"./ExpandLess-CW9G6ynD.js";import"./permission-CLAOGeOf.js";import"./session-UJ7B0EdV.js";import"./useAsyncRetry-B6OdNqyX.js";import"./useAsync-De6s-0n9.js";import"./confirm-C1Nde1Nq.js";import"./format-error-BrmqJs5a.js";import"./actions-DqeM3yie.js";import"./MoreHoriz-BqdKN70-.js";import"./delete-confirm-CpPzqeJx.js";import"./click-to-copy-q_I2l6Sg.js";import"./shorten-label-DDBwv81M.js";import"./util-C57yoAn6.js";import"./InfoOutlined-jnMrCCfZ.js";import"./index-DKPGWA5E.js";import"./CheckCircle-BHD7aj9l.js";import"./content-layout-Bs-vdQ_U.js";import"./use-mobile-DjnNmGRG.js";function d({onNext:s,onPrevious:S}){var u,f;const{t:n}=r.useContext(T),[j,p]=r.useState(!1),{blocklet:e}=k(),[l,y]=r.useState(""),P=(((e==null?void 0:e.site)||{}).domainAliases||[]).map(t=>B.replaceSlotToIp(t.value,l)),[a,m]=L({domain:"",invalidDNSDomain:null,type:"",addDomainState:{text:""}}),c=(f=(u=e.environments)==null?void 0:u.find(t=>t.key==="BLOCKLET_APP_PK"))==null?void 0:f.value,v=P.find(t=>w.isDidDomain(t));return r.useEffect(()=>{x.get(`/dns-resolve?hostname=${window.location.hostname}`).then(({data:t})=>{y(t.address||"")}).catch(t=>{console.error(t.message)})},[]),o.jsxs(_,{children:[o.jsx(i,{className:"header",children:o.jsx(A,{title:n("setup.domain.title"),subTitle:n("setup.domain.subTitle"),onClickBack:S})}),o.jsxs(i,{className:"form",sx:{display:"flex",flexDirection:"column",gap:3,overflowY:"auto"},children:[o.jsxs(i,{children:[o.jsx(i,{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",children:o.jsx(i,{display:"inline",children:`${n("setup.domain.buyOrConnect")} (${n("common.optional")})`})}),o.jsx(i,{mt:1,children:o.jsx(I,{blocklet:e,bugDidDomainProps:{appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,inBlockletSetup:!0},connectDomainProps:{autoFocus:!1,appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,cnameDomain:v,currentIp:l,inBlockletSetup:!0,shouldCheckDomain:!0,resolveDomain:t=>x.get(`/dns-resolve?hostname=${t}`),onInputDomain:t=>{m({domain:t.domain,type:t.type}),p(t.error)},onStateChange:t=>m({addDomainState:t}),onSuccess:t=>{const g={domain:t.domain,type:t.type,nftDid:t.nftDid,chainHost:t.chainHost};m(g),s()},onError:p}})})]}),o.jsxs(i,{children:[o.jsx(i,{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",children:o.jsx(i,{display:"inline",children:n("setup.domain.skipDescription")})}),o.jsx(i,{mt:1,children:o.jsx(b,{inSetup:!0,showAllDomains:!0})})]})]}),o.jsx($,{mt:8,disabled:!!a.addDomainState.text,blocklet:e,onStartNow:()=>s("complete"),children:a.domain?o.jsx(D,{variant:"contained",loading:!!a.addDomainState.text,disabled:j||!!a.addDomainState.text||!a.domain,onClick:()=>s(),children:a.addDomainState.text||n("setup.continue")}):o.jsx(D,{variant:"contained",disabled:!!a.addDomainState.text,onClick:()=>s(),children:n("setup.continue")})})]})}function Dt(s){return o.jsx(E,{children:o.jsx(d,{...s})})}d.propTypes={onNext:h.func,onPrevious:h.func};d.defaultProps={onNext:()=>{},onPrevious:()=>{}};const _=C(W)`
2
2
  height: 100%;
3
3
  overflow-y: hidden;
4
4