@abtnode/blocklet-services 1.16.33-beta-20241031-230002-b46137ba → 1.16.33-beta-20241102-083409-a924dd84

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 (204) hide show
  1. package/api/libs/auth/utils.js +2 -0
  2. package/api/services/auth/connect/invite.js +65 -62
  3. package/dist/assets/{Add-C5-W3UKp.js → Add-bOFtqv1E.js} +1 -1
  4. package/dist/assets/{Alert-MPiiZl43.js → Alert-DsAFGE4O.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-Vxgjfzsb.js → ArrowDropDown-CshuI94_.js} +1 -1
  6. package/dist/assets/{Autocomplete-o-9NS9YA.js → Autocomplete-r8azpItz.js} +1 -1
  7. package/dist/assets/{Avatar-DDKBALaJ.js → Avatar-cHoH5Gcs.js} +1 -1
  8. package/dist/assets/{ButtonGroup-D8BlpFOF.js → ButtonGroup-Ba2QsN1i.js} +1 -1
  9. package/dist/assets/{CSSTransition-Cl3dqSUp.js → CSSTransition-Cw_xP1Vb.js} +1 -1
  10. package/dist/assets/{CheckCircle-BZ-KPWDf.js → CheckCircle-D6BKIS_s.js} +1 -1
  11. package/dist/assets/{ChevronLeft-w0oWzfYi.js → ChevronLeft-Cuf9mn8C.js} +1 -1
  12. package/dist/assets/{ChevronRight-B8-OTl-V.js → ChevronRight-DKM1mfYU.js} +1 -1
  13. package/dist/assets/{Close-DOy1k6an.js → Close-BOZcPfPU.js} +1 -1
  14. package/dist/assets/{CloseOutlined-DTHgjq8r.js → CloseOutlined-g2NMRZze.js} +1 -1
  15. package/dist/assets/{Delete-xmuDalv8.js → Delete-3sftcVmc.js} +1 -1
  16. package/dist/assets/{DeleteOutline-DbdWy8tC.js → DeleteOutline-D2b8wb9u.js} +1 -1
  17. package/dist/assets/{DialogContentText-CS5MSQtu.js → DialogContentText-DKna-pLa.js} +1 -1
  18. package/dist/assets/{Done-BIgK0-yu.js → Done-BAj811nu.js} +1 -1
  19. package/dist/assets/{Download-DPw3av5o.js → Download-EZLNqT6R.js} +1 -1
  20. package/dist/assets/{EditIcon-PsnV85kC.js → EditIcon-CMiQSmX5.js} +1 -1
  21. package/dist/assets/{Error-BuytJmXm.js → Error-Dyl_GK7X.js} +1 -1
  22. package/dist/assets/{ExpandMore-DzHAg89w.js → ExpandMore-Cri5eWhB.js} +1 -1
  23. package/dist/assets/{FormControl-DFgqjaDx.js → FormControl-Bzepy6Yn.js} +1 -1
  24. package/dist/assets/{FormControlLabel-CCT1Hxna.js → FormControlLabel-DUqUcjqg.js} +1 -1
  25. package/dist/assets/{FormGroup-CoWGV2kU.js → FormGroup-Dfsxsxnm.js} +1 -1
  26. package/dist/assets/{Google-CHmcXUcd.js → Google-n9BhRIMV.js} +1 -1
  27. package/dist/assets/{Grid-CO5mLAA8.js → Grid-d_5vEATf.js} +1 -1
  28. package/dist/assets/{HelpOutline-CkhSX3fy.js → HelpOutline-CN-JBZ3p.js} +1 -1
  29. package/dist/assets/{Hidden-Bcfg4-bH.js → Hidden-B_94bAwy.js} +1 -1
  30. package/dist/assets/{InfoOutlined-BPE4vAMd.js → InfoOutlined-B6Dnu1aU.js} +1 -1
  31. package/dist/assets/{InputAdornment-B-joVStm.js → InputAdornment-C_v1Y6Di.js} +1 -1
  32. package/dist/assets/{LastPage-XMNFRrKd.js → LastPage-lb4qZ_g6.js} +1 -1
  33. package/dist/assets/{Launch-ZPrDFcJQ.js → Launch-BTyi4wvd.js} +1 -1
  34. package/dist/assets/{LaunchOutlined-BFvRVMx4.js → LaunchOutlined-CNgk8eWz.js} +1 -1
  35. package/dist/assets/{Link-COz46AhA.js → Link-B263Ikvu.js} +1 -1
  36. package/dist/assets/{ListItemButton-DOQg4G8c.js → ListItemButton-DapPFhnE.js} +1 -1
  37. package/dist/assets/{ListSubheader-BphpOySX.js → ListSubheader-Bdp-HRQo.js} +1 -1
  38. package/dist/assets/{LoadingButton-Ct_JtrmU.js → LoadingButton-DdsFlMi1.js} +1 -1
  39. package/dist/assets/{LockIcon-DIkwsUpQ.js → LockIcon-D2gLIi44.js} +1 -1
  40. package/dist/assets/{Loop-B3Y8cnuy.js → Loop-9mUuOWB-.js} +1 -1
  41. package/dist/assets/{MarkEmailRead-C192JefB.js → MarkEmailRead-BkXDErhY.js} +1 -1
  42. package/dist/assets/{Menu-BCLNF0wV.js → Menu-BG_qisJ7.js} +1 -1
  43. package/dist/assets/{MoreHoriz-0nWF2mqR.js → MoreHoriz-DcPej2CD.js} +1 -1
  44. package/dist/assets/{MoreVert-BKZLkhdi.js → MoreVert-BwL-ULCe.js} +1 -1
  45. package/dist/assets/{OpenInNew-DUexeISZ.js → OpenInNew-Ci1H_656.js} +1 -1
  46. package/dist/assets/{Pagination-DIGqgx3i.js → Pagination-KX1cGsLx.js} +1 -1
  47. package/dist/assets/{PlayArrow-BnuD-ix6.js → PlayArrow-D2XJZjjn.js} +1 -1
  48. package/dist/assets/{QuestionMarkCircle-CUjZXC07.js → QuestionMarkCircle-DzQgFhhx.js} +1 -1
  49. package/dist/assets/{RadioGroup-DAJgst3D.js → RadioGroup-CKVkcR5j.js} +1 -1
  50. package/dist/assets/{Search-HNhjKRtr.js → Search-DcB6584F.js} +1 -1
  51. package/dist/assets/{Select-BfCw7EsS.js → Select-FHyYu0mn.js} +1 -1
  52. package/dist/assets/{ServerLogo-gW8Umckw.js → ServerLogo-COVdbFHe.js} +1 -1
  53. package/dist/assets/{Skeleton-DJHsrXrk.js → Skeleton-Bbfoem6Q.js} +1 -1
  54. package/dist/assets/{Slider-DSn38U5h.js → Slider-DlL3lEzg.js} +1 -1
  55. package/dist/assets/{Stack-DZqB4nST.js → Stack-_YfLIpxv.js} +1 -1
  56. package/dist/assets/{Stepper-CYPrVpUA.js → Stepper-C1z1Nu0H.js} +1 -1
  57. package/dist/assets/{TextField-QsTZLSPK.js → TextField-C6DNb6K3.js} +1 -1
  58. package/dist/assets/{Toolbar-ovqJjtaU.js → Toolbar-mIzrJcpi.js} +1 -1
  59. package/dist/assets/{ViewColumn-CMTirt5e.js → ViewColumn-BfOj5Hqi.js} +1 -1
  60. package/dist/assets/{ViewList-Cu4_NFgQ.js → ViewList-CHUygrET.js} +1 -1
  61. package/dist/assets/{access-control-B8mzoGc9.js → access-control-BzGDM72k.js} +1 -1
  62. package/dist/assets/{actions-BnONH73_.js → actions-BI7yMXK2.js} +1 -1
  63. package/dist/assets/{add-component-core-AN4IHhr2.js → add-component-core-D9i8J5Hl.js} +7 -7
  64. package/dist/assets/add-resource-BfHXR_Y_.js +1 -0
  65. package/dist/assets/{addon-BWJyDf-k.js → addon-BwD2KOqI.js} +1 -1
  66. package/dist/assets/{analytics-kMGru_5Y.js → analytics-CNjMo4PR.js} +1 -1
  67. package/dist/assets/api-Cg7ahL5P.js +1 -0
  68. package/dist/assets/{audit-logs-Bl-T8iay.js → audit-logs-Dkin1KDM.js} +1 -1
  69. package/dist/assets/{base32-DUQ3cZE8.js → base32-b0e6z4ei.js} +1 -1
  70. package/dist/assets/{branding-DHKpXd_g.js → branding-Cl9GX76R.js} +2 -2
  71. package/dist/assets/{bundle-avatar-CKD9kBFp.js → bundle-avatar-CFbWkja3.js} +1 -1
  72. package/dist/assets/{button-DSdSJo9K.js → button-BZSmvuzl.js} +1 -1
  73. package/dist/assets/{click-to-copy-D1KutRoB.js → click-to-copy-CYT808Bk.js} +1 -1
  74. package/dist/assets/{complete-27mf0yTo.js → complete-DeQ0rwlU.js} +1 -1
  75. package/dist/assets/{component-CnJIww79.js → component-D2BxwkDd.js} +1 -1
  76. package/dist/assets/{config-C9PWul3j.js → config-Gbmmjnod.js} +1 -1
  77. package/dist/assets/{config-navigation-DH3P7ruJ.js → config-navigation-B7PM-EGI.js} +1 -1
  78. package/dist/assets/{config-DZRAPN8T.js → config-rCxorgFD.js} +1 -1
  79. package/dist/assets/{confirm-mU2XAWpU.js → confirm-D0pWA67W.js} +1 -1
  80. package/dist/assets/{connect-jQHKzr5H.js → connect-Cdtb7SHw.js} +1 -1
  81. package/dist/assets/{connect-MZcaFOBa.js → connect-Tlrdq51n.js} +1 -1
  82. package/dist/assets/{connect-to-Y02CZZdD.js → connect-to-BI3qeY9E.js} +1 -1
  83. package/dist/assets/{content-layout-Tg4aLOhb.js → content-layout-Dg654vli.js} +1 -1
  84. package/dist/assets/{dashboard-DoRd9UiU.js → dashboard-DN-9-3gU.js} +3 -3
  85. package/dist/assets/{deprecate-Cgglj9ZQ.js → deprecate-YD6Y6FfX.js} +1 -1
  86. package/dist/assets/{did-address-BsU-n4pW.js → did-address-D5PpLM1R.js} +1 -1
  87. package/dist/assets/{domain-Bq4K9D6v.js → domain-2MsVV8_b.js} +1 -1
  88. package/dist/assets/{domain-list-Lv7EI03D.js → domain-list-D4PDGQMX.js} +1 -1
  89. package/dist/assets/{email-xfatBnjM.js → email-DqijDSOa.js} +3 -3
  90. package/dist/assets/emotion-cache.browser.esm-CFmFGVO5.js +1 -0
  91. package/dist/assets/{exchange-passport-CO1jvKm4.js → exchange-passport-PFJEY5oF.js} +1 -1
  92. package/dist/assets/{fallback-CXclKVjQ.js → fallback-D3XbER7P.js} +1 -1
  93. package/dist/assets/{form-text-input-BsdUC9Df.js → form-text-input-Dfn1Wn_5.js} +1 -1
  94. package/dist/assets/{format-error-w94y5K97.js → format-error-CbWObE-m.js} +1 -1
  95. package/dist/assets/{fuel-BxaJYD5y.js → fuel-BRC6ySM4.js} +1 -1
  96. package/dist/assets/{fullpage-CU5nzdh1.js → fullpage-CGQnavVT.js} +1 -1
  97. package/dist/assets/{home-BNWIh8sX.js → home-DEHpnOzD.js} +1 -1
  98. package/dist/assets/{iframe-Dof-7CTL.js → iframe-CjWb2_M6.js} +1 -1
  99. package/dist/assets/{index-DuwjjPMM.js → index-1CEybnrZ.js} +1 -1
  100. package/dist/assets/{index-Bzrg-0nr.js → index-1pd_yDXe.js} +1 -1
  101. package/dist/assets/{index-Gp6yqhPr.js → index-5iry99Ky.js} +1 -1
  102. package/dist/assets/{index-CJDdHyzC.js → index-B54dXjy1.js} +1 -1
  103. package/dist/assets/{index-CCoIR1Y8.js → index-BDZlmkSE.js} +1 -1
  104. package/dist/assets/{index-Z5L8aZy0.js → index-BELX75G9.js} +1 -1
  105. package/dist/assets/{index-cknpIisJ.js → index-BEt0dM-9.js} +1 -1
  106. package/dist/assets/{index-EwB98VlP.js → index-BV12QEMX.js} +1 -1
  107. package/dist/assets/{index-DoFFHzG_.js → index-B_B2L5WL.js} +1 -1
  108. package/dist/assets/{index-D3O3p-OT.js → index-BbL9bes4.js} +1 -1
  109. package/dist/assets/{index-CwUTvEH2.js → index-BeoZ-VU7.js} +1 -1
  110. package/dist/assets/{index-BM-DggtM.js → index-BkQ4EI2P.js} +1 -1
  111. package/dist/assets/{index-BVekWfOr.js → index-Bkm0bPy1.js} +4 -4
  112. package/dist/assets/{index-AHJS-pEb.js → index-Bpc59LEO.js} +1 -1
  113. package/dist/assets/{index-BERtaTie.js → index-ByIVK1rt.js} +1 -1
  114. package/dist/assets/{index-Wu0L_EBo.js → index-CHOjWhIO.js} +1 -1
  115. package/dist/assets/{index-BjKbegSH.js → index-CbtulDW6.js} +1 -1
  116. package/dist/assets/{index-Cz4s7XTP.js → index-Cert8PMw.js} +1 -1
  117. package/dist/assets/{index-BEnVwImy.js → index-CmjfXrfq.js} +1 -1
  118. package/dist/assets/{index-BIhzb3Td.js → index-CrRQb6MU.js} +1 -1
  119. package/dist/assets/{index-DJFwMRI_.js → index-Ctfa52p5.js} +7 -7
  120. package/dist/assets/index-D9qREAp1.js +134 -0
  121. package/dist/assets/{index-CcK8Dad4.js → index-DBu7jcSD.js} +1 -1
  122. package/dist/assets/{index-DdN5Gz-u.js → index-DOE-ad6o.js} +1 -1
  123. package/dist/assets/{index-DYLHWOJP.js → index-DSOswIXL.js} +1 -1
  124. package/dist/assets/{index-CLs9hwzO.js → index-DURun-fE.js} +1 -1
  125. package/dist/assets/{index-CX5XyTLv.js → index-DVziVD2f.js} +1 -1
  126. package/dist/assets/{index-x-DvDzf-.js → index-KqotQeYl.js} +3 -3
  127. package/dist/assets/{index-BTabQKF2.js → index-Pws_HXCQ.js} +1 -1
  128. package/dist/assets/{index-CGLfdW1r.js → index-T8nTnmh1.js} +1 -1
  129. package/dist/assets/{index-C6E8zlEZ.js → index-gyya76M7.js} +1 -1
  130. package/dist/assets/{index-zY4NGjp1.js → index-kR3Uq-Mb.js} +3 -3
  131. package/dist/assets/{index-ApL3GvC5.js → index-ni93At8S.js} +1 -1
  132. package/dist/assets/{index-Cak4Ow2M.js → index-uGwRXs0w.js} +1 -1
  133. package/dist/assets/{index-R_t5Wd6C.js → index-wnWr-8e_.js} +1 -1
  134. package/dist/assets/{invitation-6uqENcHT.js → invitation-PGwdnHE4.js} +1 -1
  135. package/dist/assets/{invite-Bjxb62pa.js → invite-B3LCoC_0.js} +1 -1
  136. package/dist/assets/{isEmail-DUBiI8sd.js → isEmail-B5EAjxnP.js} +1 -1
  137. package/dist/assets/{issue-passport-DmbXLVQf.js → issue-passport-Bw_MHd9T.js} +1 -1
  138. package/dist/assets/{item-CFeixDDn.js → item-eNPWM9nS.js} +1 -1
  139. package/dist/assets/{jss-plugin-props-sort.esm-BkCakvUL.js → jss-plugin-props-sort.esm-D5cAYULH.js} +1 -1
  140. package/dist/assets/{launch-result-message-B_HogaQD.js → launch-result-message-D3mtj3IR.js} +1 -1
  141. package/dist/assets/{layout-DhK2V31d.js → layout-CZVKqaZH.js} +1 -1
  142. package/dist/assets/{list-header-BYGhikWN.js → list-header-BlJseGfe.js} +1 -1
  143. package/dist/assets/localization-C4vP52vp.js +1 -0
  144. package/dist/assets/{lodash-Dn8_ZeAF.js → lodash-CmCPMfEh.js} +1 -1
  145. package/dist/assets/{log-BBoGUrfj.js → log-CJD7Smn5.js} +1 -1
  146. package/dist/assets/{login-A7PX2tFz.js → login-DR3kcJtW.js} +1 -1
  147. package/dist/assets/{login-oauth-callback-tSgR97Kc.js → login-oauth-callback-0EjAb9S0.js} +1 -1
  148. package/dist/assets/{logo-uploader-Chwfv_Zv.js → logo-uploader-CtnbwpWA.js} +3 -3
  149. package/dist/assets/{lost-passport-BXRSnuel.js → lost-passport-CynXuP5y.js} +3 -3
  150. package/dist/assets/{lottie-react.esm-qfLXwmv9.js → lottie-react.esm-BBW-VAw8.js} +1 -1
  151. package/dist/assets/{notifications-xGViZTGr.js → notifications-BTr0jDCz.js} +1 -1
  152. package/dist/assets/{open-window-DC9u9zAW.js → open-window-BKaZeE7I.js} +1 -1
  153. package/dist/assets/{overview-mM-QPqFa.js → overview-Cgav-29-.js} +1 -1
  154. package/dist/assets/{page-header-BXSuoXyd.js → page-header-B2iI665X.js} +1 -1
  155. package/dist/assets/{permission-DUjKon-o.js → permission-C4_wbUHQ.js} +1 -1
  156. package/dist/assets/{preferences-BDOT10Le.js → preferences-a3_XT82h.js} +1 -1
  157. package/dist/assets/publish-resource-BwfmZpal.js +1 -0
  158. package/dist/assets/{raf-schd.esm-Bpjsnce3.js → raf-schd.esm-BDHFBmJm.js} +1 -1
  159. package/dist/assets/{react-beautiful-dnd.esm-5Mm-Hqoa.js → react-beautiful-dnd.esm-rfy7xaJI.js} +1 -1
  160. package/dist/assets/refType-C9dfEo74.js +1 -0
  161. package/dist/assets/{resource-dialog-BqU4WMct.js → resource-dialog-C_YfBcxl.js} +1 -1
  162. package/dist/assets/sdk--rGP8Wie.js +1 -0
  163. package/dist/assets/{selector-BQfkr_CY.js → selector-BQdiIKcX.js} +1 -1
  164. package/dist/assets/session-BhA7xYeK.js +1 -0
  165. package/dist/assets/{setup-RGwVXIHk.js → setup-DdL2aJKn.js} +3 -3
  166. package/dist/assets/{shorten-label-BhcDm1Xa.js → shorten-label-leEX0OpC.js} +1 -1
  167. package/dist/assets/{simple-select-CPpSgug4.js → simple-select-DInqAkp_.js} +1 -1
  168. package/dist/assets/{slicedToArray-92iHpNxT.js → slicedToArray-CMlWE9Kb.js} +1 -1
  169. package/dist/assets/{spaces-WTnQE9HX.js → spaces-DqylVolU.js} +1 -1
  170. package/dist/assets/{start-DjIHXcxs.js → start-xeWBZiEu.js} +1 -1
  171. package/dist/assets/{step-actions-CEVnyzA4.js → step-actions-BnvHdZWg.js} +1 -1
  172. package/dist/assets/{studio-BxsvSt8u.js → studio-CfUa1OMb.js} +1 -1
  173. package/dist/assets/{switch-control-BrojiBVz.js → switch-control-DwJl6NzU.js} +1 -1
  174. package/dist/assets/{toUpper-Cb-GeE69.js → toUpper-BN2pcj3y.js} +1 -1
  175. package/dist/assets/{transfer-CTWNv1F7.js → transfer-DnYlCSpz.js} +1 -1
  176. package/dist/assets/{trim-FV_vvgIq.js → trim-B9XGsPSj.js} +1 -1
  177. package/dist/assets/{uniqBy-jaKlPiVv.js → uniqBy-DL1zbncl.js} +1 -1
  178. package/dist/assets/{unsubscribe-Bubftfpy.js → unsubscribe-Bx_0kT2c.js} +1 -1
  179. package/dist/assets/{url-join-CoUJvgw9.js → url-join-DIhZFaTI.js} +1 -1
  180. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-CG7o9oE6.js → use-blocklet-info-for-connect-did-spaces-Bhk5PbPV.js} +1 -1
  181. package/dist/assets/{use-mobile-DfAAA5Qw.js → use-mobile-C8a-WvbB.js} +1 -1
  182. package/dist/assets/{useAsync-R9bGzscW.js → useAsync-clvYxRH3.js} +1 -1
  183. package/dist/assets/{useFormControl-wVGGoaRj.js → useFormControl-cUTo7137.js} +1 -1
  184. package/dist/assets/{useLocalStorage-DmCQRskn.js → useLocalStorage-vovxXSOl.js} +1 -1
  185. package/dist/assets/{useSetState-DMM9-qIL.js → useSetState-Bcpwt_WC.js} +1 -1
  186. package/dist/assets/{useSlot-BIPyjNii.js → useSlot-Bgf6_F9a.js} +1 -1
  187. package/dist/assets/{useSlotProps-DJTrybpd.js → useSlotProps-BKfmEJpm.js} +1 -1
  188. package/dist/assets/{useThemeProps-DD6E2MMK.js → useThemeProps-vkOLleXs.js} +1 -1
  189. package/dist/assets/{user-center-BA9gCxef.js → user-center-B0SlHHaj.js} +1 -1
  190. package/dist/assets/{user-sessions-DLAJ9aMH.js → user-sessions-hVZB4oee.js} +1 -1
  191. package/dist/assets/{util-D3p9_aCc.js → util-vL8zU5OD.js} +1 -1
  192. package/dist/assets/{wrap-locale-D638dqwh.js → wrap-locale-DfIs9PFE.js} +1 -1
  193. package/dist/index.html +1 -1
  194. package/dist/service-worker.js +1 -1
  195. package/package.json +25 -25
  196. package/dist/assets/add-resource-DZqyElGv.js +0 -1
  197. package/dist/assets/api-B-FzaAOJ.js +0 -1
  198. package/dist/assets/emotion-cache.browser.esm-gefWLr3C.js +0 -1
  199. package/dist/assets/index-C5vjMsZy.js +0 -126
  200. package/dist/assets/localization-BIdgFoTP.js +0 -1
  201. package/dist/assets/publish-resource-mkxzOwvG.js +0 -1
  202. package/dist/assets/refType-CRh0h8D9.js +0 -1
  203. package/dist/assets/sdk-B9KxIRfu.js +0 -1
  204. package/dist/assets/session-DmKeILdZ.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-A7PX2tFz.js","assets/use-passport-id-B-b-_oYF.js","assets/LaunchOutlined-BFvRVMx4.js","assets/login-oauth-callback-tSgR97Kc.js","assets/fallback-CXclKVjQ.js","assets/Alert-MPiiZl43.js","assets/useSlot-BIPyjNii.js","assets/connect-jQHKzr5H.js","assets/index-ApL3GvC5.js","assets/fullpage-CU5nzdh1.js","assets/Link-COz46AhA.js","assets/exchange-passport-CO1jvKm4.js","assets/wrap-locale-D638dqwh.js","assets/issue-passport-DmbXLVQf.js","assets/invitation-6uqENcHT.js","assets/index-BIhzb3Td.js","assets/emotion-cache.browser.esm-gefWLr3C.js","assets/index-C6E8zlEZ.js","assets/session-DmKeILdZ.js","assets/sdk-B9KxIRfu.js","assets/CheckCircle-BZ-KPWDf.js","assets/lost-passport-BXRSnuel.js","assets/ViewList-Cu4_NFgQ.js","assets/Done-BIgK0-yu.js","assets/did-address-BsU-n4pW.js","assets/Avatar-DDKBALaJ.js","assets/Stepper-CYPrVpUA.js","assets/start-DjIHXcxs.js","assets/PlayArrow-BnuD-ix6.js","assets/Error-BuytJmXm.js","assets/ServerLogo-gW8Umckw.js","assets/addon-BWJyDf-k.js","assets/selector-BQfkr_CY.js","assets/QuestionMarkCircle-CUjZXC07.js","assets/setup-RGwVXIHk.js","assets/index-cknpIisJ.js","assets/lodash-Dn8_ZeAF.js","assets/spaces-WTnQE9HX.js","assets/api-B-FzaAOJ.js","assets/url-join-CoUJvgw9.js","assets/Skeleton-DJHsrXrk.js","assets/Hidden-Bcfg4-bH.js","assets/invite-Bjxb62pa.js","assets/transfer-CTWNv1F7.js","assets/dashboard-DoRd9UiU.js","assets/index-Z5L8aZy0.js","assets/useLocalStorage-DmCQRskn.js","assets/MoreVert-BKZLkhdi.js","assets/FormControlLabel-CCT1Hxna.js","assets/useFormControl-wVGGoaRj.js","assets/Stack-DZqB4nST.js","assets/confirm-mU2XAWpU.js","assets/DialogContentText-CS5MSQtu.js","assets/format-error-w94y5K97.js","assets/Delete-xmuDalv8.js","assets/ButtonGroup-D8BlpFOF.js","assets/RadioGroup-DAJgst3D.js","assets/FormGroup-CoWGV2kU.js","assets/permission-DUjKon-o.js","assets/useAsync-R9bGzscW.js","assets/index-CcK8Dad4.js","assets/useSetState-DMM9-qIL.js","assets/index-R_t5Wd6C.js","assets/Menu-BCLNF0wV.js","assets/Toolbar-ovqJjtaU.js","assets/index-CCoIR1Y8.js","assets/ListItemButton-DOQg4G8c.js","assets/deprecate-Cgglj9ZQ.js","assets/user-center-BA9gCxef.js","assets/index-DYLHWOJP.js","assets/ExpandMore-DzHAg89w.js","assets/resource-dialog-BqU4WMct.js","assets/OpenInNew-DUexeISZ.js","assets/index-Cak4Ow2M.js","assets/CloseOutlined-DTHgjq8r.js","assets/index-DuwjjPMM.js","assets/user-sessions-DLAJ9aMH.js","assets/index-BERtaTie.js","assets/useThemeProps-DD6E2MMK.js","assets/toPropertyKey-PLuKRk1e.js","assets/index-CwUTvEH2.js","assets/redux-CluOqhW1.js","assets/ViewColumn-CMTirt5e.js","assets/FormControl-DFgqjaDx.js","assets/Grid-CO5mLAA8.js","assets/Select-BfCw7EsS.js","assets/TextField-QsTZLSPK.js","assets/LastPage-XMNFRrKd.js","assets/Search-HNhjKRtr.js","assets/uniqBy-jaKlPiVv.js","assets/index-EwB98VlP.js","assets/InputAdornment-B-joVStm.js","assets/use-mobile-DfAAA5Qw.js","assets/home-BNWIh8sX.js","assets/studio-BxsvSt8u.js","assets/preferences-BDOT10Le.js","assets/iframe-Dof-7CTL.js","assets/branding-DHKpXd_g.js","assets/DeleteOutline-DbdWy8tC.js","assets/react-beautiful-dnd.esm-5Mm-Hqoa.js","assets/raf-schd.esm-Bpjsnce3.js","assets/localization-BIdgFoTP.js","assets/add-resource-DZqyElGv.js","assets/add-component-core-AN4IHhr2.js","assets/item-CFeixDDn.js","assets/Add-C5-W3UKp.js","assets/Launch-ZPrDFcJQ.js","assets/click-to-copy-D1KutRoB.js","assets/shorten-label-BhcDm1Xa.js","assets/jss-plugin-props-sort.esm-BkCakvUL.js","assets/launch-result-message-B_HogaQD.js","assets/Close-DOy1k6an.js","assets/page-header-BXSuoXyd.js","assets/logo-uploader-Chwfv_Zv.js","assets/index-DoFFHzG_.js","assets/index-Bzrg-0nr.js","assets/Google-CHmcXUcd.js","assets/index-CGLfdW1r.js","assets/index-D4PP6P2d.css","assets/index-D3O3p-OT.js","assets/index-CLs9hwzO.js","assets/Autocomplete-o-9NS9YA.js","assets/ListSubheader-BphpOySX.js","assets/util-D3p9_aCc.js","assets/use-blocklet-info-for-connect-did-spaces-CG7o9oE6.js","assets/content-layout-Tg4aLOhb.js","assets/connect-to-Y02CZZdD.js","assets/index-BTabQKF2.js","assets/ArrowDropDown-Vxgjfzsb.js","assets/ChevronLeft-w0oWzfYi.js","assets/ChevronRight-B8-OTl-V.js","assets/add-component-core-D-IRi6XF.css","assets/publish-resource-mkxzOwvG.js","assets/index-BVekWfOr.js","assets/bundle-avatar-CKD9kBFp.js","assets/Download-DPw3av5o.js","assets/index-Gp6yqhPr.js","assets/useSlotProps-DJTrybpd.js","assets/purify.es-Bq0E5Q3l.js","assets/index-CX5XyTLv.js","assets/email-xfatBnjM.js","assets/trim-FV_vvgIq.js","assets/isEmail-DUBiI8sd.js","assets/MarkEmailRead-C192JefB.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-DR3kcJtW.js","assets/use-passport-id-B-b-_oYF.js","assets/LaunchOutlined-CNgk8eWz.js","assets/login-oauth-callback-0EjAb9S0.js","assets/fallback-D3XbER7P.js","assets/Alert-DsAFGE4O.js","assets/useSlot-Bgf6_F9a.js","assets/connect-Cdtb7SHw.js","assets/index-ni93At8S.js","assets/fullpage-CGQnavVT.js","assets/Link-B263Ikvu.js","assets/exchange-passport-PFJEY5oF.js","assets/wrap-locale-DfIs9PFE.js","assets/issue-passport-Bw_MHd9T.js","assets/invitation-PGwdnHE4.js","assets/index-CrRQb6MU.js","assets/emotion-cache.browser.esm-CFmFGVO5.js","assets/index-gyya76M7.js","assets/session-BhA7xYeK.js","assets/sdk--rGP8Wie.js","assets/CheckCircle-D6BKIS_s.js","assets/lost-passport-CynXuP5y.js","assets/ViewList-CHUygrET.js","assets/Done-BAj811nu.js","assets/did-address-D5PpLM1R.js","assets/Avatar-cHoH5Gcs.js","assets/Stepper-C1z1Nu0H.js","assets/start-xeWBZiEu.js","assets/PlayArrow-D2XJZjjn.js","assets/Error-Dyl_GK7X.js","assets/ServerLogo-COVdbFHe.js","assets/addon-BwD2KOqI.js","assets/selector-BQdiIKcX.js","assets/QuestionMarkCircle-DzQgFhhx.js","assets/setup-DdL2aJKn.js","assets/index-BEt0dM-9.js","assets/lodash-CmCPMfEh.js","assets/spaces-DqylVolU.js","assets/api-Cg7ahL5P.js","assets/url-join-DIhZFaTI.js","assets/Skeleton-Bbfoem6Q.js","assets/Hidden-B_94bAwy.js","assets/invite-B3LCoC_0.js","assets/transfer-DnYlCSpz.js","assets/dashboard-DN-9-3gU.js","assets/index-BELX75G9.js","assets/useLocalStorage-vovxXSOl.js","assets/MoreVert-BwL-ULCe.js","assets/FormControlLabel-DUqUcjqg.js","assets/useFormControl-cUTo7137.js","assets/Stack-_YfLIpxv.js","assets/confirm-D0pWA67W.js","assets/DialogContentText-DKna-pLa.js","assets/format-error-CbWObE-m.js","assets/Delete-3sftcVmc.js","assets/ButtonGroup-Ba2QsN1i.js","assets/RadioGroup-CKVkcR5j.js","assets/FormGroup-Dfsxsxnm.js","assets/permission-C4_wbUHQ.js","assets/useAsync-clvYxRH3.js","assets/index-DBu7jcSD.js","assets/useSetState-Bcpwt_WC.js","assets/index-wnWr-8e_.js","assets/Menu-BG_qisJ7.js","assets/Toolbar-mIzrJcpi.js","assets/index-BDZlmkSE.js","assets/ListItemButton-DapPFhnE.js","assets/deprecate-YD6Y6FfX.js","assets/user-center-B0SlHHaj.js","assets/index-DSOswIXL.js","assets/ExpandMore-Cri5eWhB.js","assets/resource-dialog-C_YfBcxl.js","assets/OpenInNew-Ci1H_656.js","assets/index-uGwRXs0w.js","assets/CloseOutlined-g2NMRZze.js","assets/index-1CEybnrZ.js","assets/user-sessions-hVZB4oee.js","assets/index-ByIVK1rt.js","assets/useThemeProps-vkOLleXs.js","assets/toPropertyKey-PLuKRk1e.js","assets/index-BeoZ-VU7.js","assets/redux-CluOqhW1.js","assets/ViewColumn-BfOj5Hqi.js","assets/FormControl-Bzepy6Yn.js","assets/Grid-d_5vEATf.js","assets/Select-FHyYu0mn.js","assets/TextField-C6DNb6K3.js","assets/LastPage-lb4qZ_g6.js","assets/Search-DcB6584F.js","assets/uniqBy-DL1zbncl.js","assets/index-BV12QEMX.js","assets/InputAdornment-C_v1Y6Di.js","assets/use-mobile-C8a-WvbB.js","assets/home-DEHpnOzD.js","assets/studio-CfUa1OMb.js","assets/preferences-a3_XT82h.js","assets/iframe-CjWb2_M6.js","assets/branding-Cl9GX76R.js","assets/DeleteOutline-D2b8wb9u.js","assets/react-beautiful-dnd.esm-rfy7xaJI.js","assets/raf-schd.esm-BDHFBmJm.js","assets/localization-C4vP52vp.js","assets/add-resource-BfHXR_Y_.js","assets/add-component-core-D9i8J5Hl.js","assets/item-eNPWM9nS.js","assets/Add-bOFtqv1E.js","assets/Launch-BTyi4wvd.js","assets/click-to-copy-CYT808Bk.js","assets/shorten-label-leEX0OpC.js","assets/jss-plugin-props-sort.esm-D5cAYULH.js","assets/launch-result-message-D3mtj3IR.js","assets/Close-BOZcPfPU.js","assets/page-header-B2iI665X.js","assets/logo-uploader-CtnbwpWA.js","assets/index-B_B2L5WL.js","assets/index-1pd_yDXe.js","assets/Google-n9BhRIMV.js","assets/index-T8nTnmh1.js","assets/index-D4PP6P2d.css","assets/index-BbL9bes4.js","assets/index-DURun-fE.js","assets/Autocomplete-r8azpItz.js","assets/ListSubheader-Bdp-HRQo.js","assets/util-vL8zU5OD.js","assets/use-blocklet-info-for-connect-did-spaces-Bhk5PbPV.js","assets/content-layout-Dg654vli.js","assets/connect-to-BI3qeY9E.js","assets/index-Pws_HXCQ.js","assets/ArrowDropDown-CshuI94_.js","assets/ChevronLeft-Cuf9mn8C.js","assets/ChevronRight-DKM1mfYU.js","assets/add-component-core-D-IRi6XF.css","assets/publish-resource-BwfmZpal.js","assets/index-Bkm0bPy1.js","assets/bundle-avatar-CFbWkja3.js","assets/Download-EZLNqT6R.js","assets/index-5iry99Ky.js","assets/useSlotProps-BKfmEJpm.js","assets/purify.es-Bq0E5Q3l.js","assets/index-DVziVD2f.js","assets/email-DqijDSOa.js","assets/trim-B9XGsPSj.js","assets/isEmail-B5EAjxnP.js","assets/MarkEmailRead-BkXDErhY.js"])))=>i.map(i=>d[i]);
2
2
  var lo=a=>{throw TypeError(a)};var to=(a,j,_e)=>j.has(a)||lo("Cannot "+_e);var xr=(a,j,_e)=>(to(a,j,"read from private field"),_e?_e.call(a):j.get(a)),Xr=(a,j,_e)=>j.has(a)?lo("Cannot add the same private member more than once"):j instanceof WeakSet?j.add(a):j.set(a,_e),Wr=(a,j,_e,et)=>(to(a,j,"write to private field"),et?et.call(a,_e):j.set(a,_e),_e),Br=(a,j,_e)=>(to(a,j,"access private method"),_e);var no=(a,j,_e,et)=>({set _(nt){Wr(a,j,nt,_e)},get _(){return xr(a,j,et)}});function _mergeNamespaces(a,j){for(var _e=0;_e<j.length;_e++){const et=j[_e];if(typeof et!="string"&&!Array.isArray(et)){for(const nt in et)if(nt!=="default"&&!(nt in a)){const tt=Object.getOwnPropertyDescriptor(et,nt);tt&&Object.defineProperty(a,nt,tt.get?tt:{enumerable:!0,get:()=>et[nt]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}(function(){const j=document.createElement("link").relList;if(j&&j.supports&&j.supports("modulepreload"))return;for(const nt of document.querySelectorAll('link[rel="modulepreload"]'))et(nt);new MutationObserver(nt=>{for(const tt of nt)if(tt.type==="childList")for(const ot of tt.addedNodes)ot.tagName==="LINK"&&ot.rel==="modulepreload"&&et(ot)}).observe(document,{childList:!0,subtree:!0});function _e(nt){const tt={};return nt.integrity&&(tt.integrity=nt.integrity),nt.referrerPolicy&&(tt.referrerPolicy=nt.referrerPolicy),nt.crossOrigin==="use-credentials"?tt.credentials="include":nt.crossOrigin==="anonymous"?tt.credentials="omit":tt.credentials="same-origin",tt}function et(nt){if(nt.ep)return;nt.ep=!0;const tt=_e(nt);fetch(nt.href,tt)}})();const scriptRel="modulepreload",assetsURL=function(a){return"/.well-known/service/static/"+a},seen={},__vitePreload=function(j,_e,et){let nt=Promise.resolve();if(_e&&_e.length>0){document.getElementsByTagName("link");const tt=document.querySelector("meta[property=csp-nonce]"),ot=(tt==null?void 0:tt.nonce)||(tt==null?void 0:tt.getAttribute("nonce"));nt=Promise.allSettled(_e.map(ct=>{if(ct=assetsURL(ct),ct in seen)return;seen[ct]=!0;const ft=ct.endsWith(".css"),ht=ft?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${ct}"]${ht}`))return;const dt=document.createElement("link");if(dt.rel=ft?"stylesheet":scriptRel,ft||(dt.as="script"),dt.crossOrigin="",dt.href=ct,ot&&dt.setAttribute("nonce",ot),document.head.appendChild(dt),ft)return new Promise((yt,Tt)=>{dt.addEventListener("load",yt),dt.addEventListener("error",()=>Tt(new Error(`Unable to preload CSS for ${ct}`)))})}))}return nt.then(tt=>{for(const ot of tt||[]){if(ot.status!=="rejected")continue;const ct=new Event("vite:preloadError",{cancelable:!0});if(ct.payload=ot.reason,window.dispatchEvent(ct),!ct.defaultPrevented)throw ot.reason}return j()})};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}function getAugmentedNamespace(a){if(a.__esModule)return a;var j=a.default;if(typeof j=="function"){var _e=function et(){return this instanceof et?Reflect.construct(j,arguments,this.constructor):j.apply(this,arguments)};_e.prototype=j.prototype}else _e={};return Object.defineProperty(_e,"__esModule",{value:!0}),Object.keys(a).forEach(function(et){var nt=Object.getOwnPropertyDescriptor(a,et);Object.defineProperty(_e,et,nt.get?nt:{enumerable:!0,get:function(){return a[et]}})}),_e}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -427,9 +427,9 @@ ${et.length}`,ot=Buffer$3.from(tt),ct=Buffer$3.concat([ot,nt]);return hash_1.def
427
427
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(j){return j instanceof this?j:new this(j)}static concat(j,..._e){const et=new this(j);return _e.forEach(nt=>et.set(nt)),et}static accessor(j){const et=(this[$internals]=this[$internals]={accessors:{}}).accessors,nt=this.prototype;function tt(ot){const ct=normalizeHeader(ot);et[ct]||(buildAccessors(nt,ot),et[ct]=!0)}return utils$1.isArray(j)?j.forEach(tt):tt(j),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:a},j)=>{let _e=j[0].toUpperCase()+j.slice(1);return{get:()=>a,set(et){this[_e]=et}}});utils$1.freezeMethods(AxiosHeaders$1);function transformData(a,j){const _e=this||defaults$1,et=j||_e,nt=AxiosHeaders$1.from(et.headers);let tt=et.data;return utils$1.forEach(a,function(ct){tt=ct.call(_e,tt,nt.normalize(),j?j.status:void 0)}),nt.normalize(),tt}function isCancel$1(a){return!!(a&&a.__CANCEL__)}function CanceledError$1(a,j,_e){AxiosError$1.call(this,a??"canceled",AxiosError$1.ERR_CANCELED,j,_e),this.name="CanceledError"}utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(a,j,_e){const et=_e.config.validateStatus;!_e.status||!et||et(_e.status)?a(_e):j(new AxiosError$1("Request failed with status code "+_e.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(_e.status/100)-4],_e.config,_e.request,_e))}function parseProtocol(a){const j=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return j&&j[1]||""}function speedometer(a,j){a=a||10;const _e=new Array(a),et=new Array(a);let nt=0,tt=0,ot;return j=j!==void 0?j:1e3,function(ft){const ht=Date.now(),dt=et[tt];ot||(ot=ht),_e[nt]=ft,et[nt]=ht;let yt=tt,Tt=0;for(;yt!==nt;)Tt+=_e[yt++],yt=yt%a;if(nt=(nt+1)%a,nt===tt&&(tt=(tt+1)%a),ht-ot<j)return;const St=dt&&ht-dt;return St?Math.round(Tt*1e3/St):void 0}}function throttle$1(a,j){let _e=0,et=1e3/j,nt,tt;const ot=(ht,dt=Date.now())=>{_e=dt,nt=null,tt&&(clearTimeout(tt),tt=null),a.apply(null,ht)};return[(...ht)=>{const dt=Date.now(),yt=dt-_e;yt>=et?ot(ht,dt):(nt=ht,tt||(tt=setTimeout(()=>{tt=null,ot(nt)},et-yt)))},()=>nt&&ot(nt)]}const progressEventReducer=(a,j,_e=3)=>{let et=0;const nt=speedometer(50,250);return throttle$1(tt=>{const ot=tt.loaded,ct=tt.lengthComputable?tt.total:void 0,ft=ot-et,ht=nt(ft),dt=ot<=ct;et=ot;const yt={loaded:ot,total:ct,progress:ct?ot/ct:void 0,bytes:ft,rate:ht||void 0,estimated:ht&&ct&&dt?(ct-ot)/ht:void 0,event:tt,lengthComputable:ct!=null,[j?"download":"upload"]:!0};a(yt)},_e)},progressEventDecorator=(a,j)=>{const _e=a!=null;return[et=>j[0]({lengthComputable:_e,total:a,loaded:et}),j[1]]},asyncDecorator=a=>(...j)=>utils$1.asap(()=>a(...j)),isURLSameOrigin=platform.hasStandardBrowserEnv?function a(){const j=platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent),_e=document.createElement("a");let et;function nt(tt){let ot=tt;return j&&(_e.setAttribute("href",ot),ot=_e.href),_e.setAttribute("href",ot),{href:_e.href,protocol:_e.protocol?_e.protocol.replace(/:$/,""):"",host:_e.host,search:_e.search?_e.search.replace(/^\?/,""):"",hash:_e.hash?_e.hash.replace(/^#/,""):"",hostname:_e.hostname,port:_e.port,pathname:_e.pathname.charAt(0)==="/"?_e.pathname:"/"+_e.pathname}}return et=nt(window.location.href),function(ot){const ct=utils$1.isString(ot)?nt(ot):ot;return ct.protocol===et.protocol&&ct.host===et.host}}():function a(){return function(){return!0}}(),cookies=platform.hasStandardBrowserEnv?{write(a,j,_e,et,nt,tt){const ot=[a+"="+encodeURIComponent(j)];utils$1.isNumber(_e)&&ot.push("expires="+new Date(_e).toGMTString()),utils$1.isString(et)&&ot.push("path="+et),utils$1.isString(nt)&&ot.push("domain="+nt),tt===!0&&ot.push("secure"),document.cookie=ot.join("; ")},read(a){const j=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return j?decodeURIComponent(j[3]):null},remove(a){this.write(a,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function combineURLs(a,j){return j?a.replace(/\/?\/$/,"")+"/"+j.replace(/^\/+/,""):a}function buildFullPath(a,j){return a&&!isAbsoluteURL(j)?combineURLs(a,j):j}const headersToObject=a=>a instanceof AxiosHeaders$1?{...a}:a;function mergeConfig$1(a,j){j=j||{};const _e={};function et(ht,dt,yt){return utils$1.isPlainObject(ht)&&utils$1.isPlainObject(dt)?utils$1.merge.call({caseless:yt},ht,dt):utils$1.isPlainObject(dt)?utils$1.merge({},dt):utils$1.isArray(dt)?dt.slice():dt}function nt(ht,dt,yt){if(utils$1.isUndefined(dt)){if(!utils$1.isUndefined(ht))return et(void 0,ht,yt)}else return et(ht,dt,yt)}function tt(ht,dt){if(!utils$1.isUndefined(dt))return et(void 0,dt)}function ot(ht,dt){if(utils$1.isUndefined(dt)){if(!utils$1.isUndefined(ht))return et(void 0,ht)}else return et(void 0,dt)}function ct(ht,dt,yt){if(yt in j)return et(ht,dt);if(yt in a)return et(void 0,ht)}const ft={url:tt,method:tt,data:tt,baseURL:ot,transformRequest:ot,transformResponse:ot,paramsSerializer:ot,timeout:ot,timeoutMessage:ot,withCredentials:ot,withXSRFToken:ot,adapter:ot,responseType:ot,xsrfCookieName:ot,xsrfHeaderName:ot,onUploadProgress:ot,onDownloadProgress:ot,decompress:ot,maxContentLength:ot,maxBodyLength:ot,beforeRedirect:ot,transport:ot,httpAgent:ot,httpsAgent:ot,cancelToken:ot,socketPath:ot,responseEncoding:ot,validateStatus:ct,headers:(ht,dt)=>nt(headersToObject(ht),headersToObject(dt),!0)};return utils$1.forEach(Object.keys(Object.assign({},a,j)),function(dt){const yt=ft[dt]||nt,Tt=yt(a[dt],j[dt],dt);utils$1.isUndefined(Tt)&&yt!==ct||(_e[dt]=Tt)}),_e}const resolveConfig=a=>{const j=mergeConfig$1({},a);let{data:_e,withXSRFToken:et,xsrfHeaderName:nt,xsrfCookieName:tt,headers:ot,auth:ct}=j;j.headers=ot=AxiosHeaders$1.from(ot),j.url=buildURL(buildFullPath(j.baseURL,j.url),a.params,a.paramsSerializer),ct&&ot.set("Authorization","Basic "+btoa((ct.username||"")+":"+(ct.password?unescape(encodeURIComponent(ct.password)):"")));let ft;if(utils$1.isFormData(_e)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)ot.setContentType(void 0);else if((ft=ot.getContentType())!==!1){const[ht,...dt]=ft?ft.split(";").map(yt=>yt.trim()).filter(Boolean):[];ot.setContentType([ht||"multipart/form-data",...dt].join("; "))}}if(platform.hasStandardBrowserEnv&&(et&&utils$1.isFunction(et)&&(et=et(j)),et||et!==!1&&isURLSameOrigin(j.url))){const ht=nt&&tt&&cookies.read(tt);ht&&ot.set(nt,ht)}return j},isXHRAdapterSupported=typeof XMLHttpRequest<"u",adapter=isXHRAdapterSupported&&function(a){return new Promise(function(_e,et){const nt=resolveConfig(a);let tt=nt.data;const ot=AxiosHeaders$1.from(nt.headers).normalize();let{responseType:ct,onUploadProgress:ft,onDownloadProgress:ht}=nt,dt,yt,Tt,St,At;function Rt(){St&&St(),At&&At(),nt.cancelToken&&nt.cancelToken.unsubscribe(dt),nt.signal&&nt.signal.removeEventListener("abort",dt)}let It=new XMLHttpRequest;It.open(nt.method.toUpperCase(),nt.url,!0),It.timeout=nt.timeout;function Ct(){if(!It)return;const Pt=AxiosHeaders$1.from("getAllResponseHeaders"in It&&It.getAllResponseHeaders()),Kt={data:!ct||ct==="text"||ct==="json"?It.responseText:It.response,status:It.status,statusText:It.statusText,headers:Pt,config:a,request:It};settle(function(zt){_e(zt),Rt()},function(zt){et(zt),Rt()},Kt),It=null}"onloadend"in It?It.onloadend=Ct:It.onreadystatechange=function(){!It||It.readyState!==4||It.status===0&&!(It.responseURL&&It.responseURL.indexOf("file:")===0)||setTimeout(Ct)},It.onabort=function(){It&&(et(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,a,It)),It=null)},It.onerror=function(){et(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,a,It)),It=null},It.ontimeout=function(){let Bt=nt.timeout?"timeout of "+nt.timeout+"ms exceeded":"timeout exceeded";const Kt=nt.transitional||transitionalDefaults;nt.timeoutErrorMessage&&(Bt=nt.timeoutErrorMessage),et(new AxiosError$1(Bt,Kt.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,a,It)),It=null},tt===void 0&&ot.setContentType(null),"setRequestHeader"in It&&utils$1.forEach(ot.toJSON(),function(Bt,Kt){It.setRequestHeader(Kt,Bt)}),utils$1.isUndefined(nt.withCredentials)||(It.withCredentials=!!nt.withCredentials),ct&&ct!=="json"&&(It.responseType=nt.responseType),ht&&([Tt,At]=progressEventReducer(ht,!0),It.addEventListener("progress",Tt)),ft&&It.upload&&([yt,St]=progressEventReducer(ft),It.upload.addEventListener("progress",yt),It.upload.addEventListener("loadend",St)),(nt.cancelToken||nt.signal)&&(dt=Pt=>{It&&(et(!Pt||Pt.type?new CanceledError$1(null,a,It):Pt),It.abort(),It=null)},nt.cancelToken&&nt.cancelToken.subscribe(dt),nt.signal&&(nt.signal.aborted?dt():nt.signal.addEventListener("abort",dt)));const kt=parseProtocol(nt.url);if(kt&&platform.protocols.indexOf(kt)===-1){et(new AxiosError$1("Unsupported protocol "+kt+":",AxiosError$1.ERR_BAD_REQUEST,a));return}It.send(tt||null)})},composeSignals=(a,j)=>{const{length:_e}=a=a?a.filter(Boolean):[];if(j||_e){let et=new AbortController,nt;const tt=function(ht){if(!nt){nt=!0,ct();const dt=ht instanceof Error?ht:this.reason;et.abort(dt instanceof AxiosError$1?dt:new CanceledError$1(dt instanceof Error?dt.message:dt))}};let ot=j&&setTimeout(()=>{ot=null,tt(new AxiosError$1(`timeout ${j} of ms exceeded`,AxiosError$1.ETIMEDOUT))},j);const ct=()=>{a&&(ot&&clearTimeout(ot),ot=null,a.forEach(ht=>{ht.unsubscribe?ht.unsubscribe(tt):ht.removeEventListener("abort",tt)}),a=null)};a.forEach(ht=>ht.addEventListener("abort",tt));const{signal:ft}=et;return ft.unsubscribe=()=>utils$1.asap(ct),ft}},streamChunk=function*(a,j){let _e=a.byteLength;if(!j||_e<j){yield a;return}let et=0,nt;for(;et<_e;)nt=et+j,yield a.slice(et,nt),et=nt},readBytes=async function*(a,j){for await(const _e of readStream(a))yield*streamChunk(_e,j)},readStream=async function*(a){if(a[Symbol.asyncIterator]){yield*a;return}const j=a.getReader();try{for(;;){const{done:_e,value:et}=await j.read();if(_e)break;yield et}}finally{await j.cancel()}},trackStream=(a,j,_e,et)=>{const nt=readBytes(a,j);let tt=0,ot,ct=ft=>{ot||(ot=!0,et&&et(ft))};return new ReadableStream({async pull(ft){try{const{done:ht,value:dt}=await nt.next();if(ht){ct(),ft.close();return}let yt=dt.byteLength;if(_e){let Tt=tt+=yt;_e(Tt)}ft.enqueue(new Uint8Array(dt))}catch(ht){throw ct(ht),ht}},cancel(ft){return ct(ft),nt.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(a=>j=>a.encode(j))(new TextEncoder):async a=>new Uint8Array(await new Response(a).arrayBuffer())),test$1=(a,...j)=>{try{return!!a(...j)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test$1(()=>{let a=!1;const j=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type");return a&&!j}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test$1(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(a=>a.body)};isFetchSupported&&(a=>{["text","arrayBuffer","blob","formData","stream"].forEach(j=>{!resolvers[j]&&(resolvers[j]=utils$1.isFunction(a[j])?_e=>_e[j]():(_e,et)=>{throw new AxiosError$1(`Response type '${j}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,et)})})})(new Response);const getBodyLength=async a=>{if(a==null)return 0;if(utils$1.isBlob(a))return a.size;if(utils$1.isSpecCompliantForm(a))return(await new Request(platform.origin,{method:"POST",body:a}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(a)||utils$1.isArrayBuffer(a))return a.byteLength;if(utils$1.isURLSearchParams(a)&&(a=a+""),utils$1.isString(a))return(await encodeText(a)).byteLength},resolveBodyLength=async(a,j)=>{const _e=utils$1.toFiniteNumber(a.getContentLength());return _e??getBodyLength(j)},fetchAdapter=isFetchSupported&&(async a=>{let{url:j,method:_e,data:et,signal:nt,cancelToken:tt,timeout:ot,onDownloadProgress:ct,onUploadProgress:ft,responseType:ht,headers:dt,withCredentials:yt="same-origin",fetchOptions:Tt}=resolveConfig(a);ht=ht?(ht+"").toLowerCase():"text";let St=composeSignals([nt,tt&&tt.toAbortSignal()],ot),At;const Rt=St&&St.unsubscribe&&(()=>{St.unsubscribe()});let It;try{if(ft&&supportsRequestStream&&_e!=="get"&&_e!=="head"&&(It=await resolveBodyLength(dt,et))!==0){let Kt=new Request(j,{method:"POST",body:et,duplex:"half"}),jt;if(utils$1.isFormData(et)&&(jt=Kt.headers.get("content-type"))&&dt.setContentType(jt),Kt.body){const[zt,Gt]=progressEventDecorator(It,progressEventReducer(asyncDecorator(ft)));et=trackStream(Kt.body,DEFAULT_CHUNK_SIZE,zt,Gt)}}utils$1.isString(yt)||(yt=yt?"include":"omit");const Ct="credentials"in Request.prototype;At=new Request(j,{...Tt,signal:St,method:_e.toUpperCase(),headers:dt.normalize().toJSON(),body:et,duplex:"half",credentials:Ct?yt:void 0});let kt=await fetch(At);const Pt=supportsResponseStream&&(ht==="stream"||ht==="response");if(supportsResponseStream&&(ct||Pt&&Rt)){const Kt={};["status","statusText","headers"].forEach(tn=>{Kt[tn]=kt[tn]});const jt=utils$1.toFiniteNumber(kt.headers.get("content-length")),[zt,Gt]=ct&&progressEventDecorator(jt,progressEventReducer(asyncDecorator(ct),!0))||[];kt=new Response(trackStream(kt.body,DEFAULT_CHUNK_SIZE,zt,()=>{Gt&&Gt(),Rt&&Rt()}),Kt)}ht=ht||"text";let Bt=await resolvers[utils$1.findKey(resolvers,ht)||"text"](kt,a);return!Pt&&Rt&&Rt(),await new Promise((Kt,jt)=>{settle(Kt,jt,{data:Bt,headers:AxiosHeaders$1.from(kt.headers),status:kt.status,statusText:kt.statusText,config:a,request:At})})}catch(Ct){throw Rt&&Rt(),Ct&&Ct.name==="TypeError"&&/fetch/i.test(Ct.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,a,At),{cause:Ct.cause||Ct}):AxiosError$1.from(Ct,Ct&&Ct.code,a,At)}}),knownAdapters={http:httpAdapter,xhr:adapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(a,j)=>{if(a){try{Object.defineProperty(a,"name",{value:j})}catch{}Object.defineProperty(a,"adapterName",{value:j})}});const renderReason=a=>`- ${a}`,isResolvedHandle=a=>utils$1.isFunction(a)||a===null||a===!1,adapters={getAdapter:a=>{a=utils$1.isArray(a)?a:[a];const{length:j}=a;let _e,et;const nt={};for(let tt=0;tt<j;tt++){_e=a[tt];let ot;if(et=_e,!isResolvedHandle(_e)&&(et=knownAdapters[(ot=String(_e)).toLowerCase()],et===void 0))throw new AxiosError$1(`Unknown adapter '${ot}'`);if(et)break;nt[ot||"#"+tt]=et}if(!et){const tt=Object.entries(nt).map(([ct,ft])=>`adapter ${ct} `+(ft===!1?"is not supported by the environment":"is not available in the build"));let ot=j?tt.length>1?`since :
428
428
  `+tt.map(renderReason).join(`
429
429
  `):" "+renderReason(tt[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+ot,"ERR_NOT_SUPPORT")}return et},adapters:knownAdapters};function throwIfCancellationRequested(a){if(a.cancelToken&&a.cancelToken.throwIfRequested(),a.signal&&a.signal.aborted)throw new CanceledError$1(null,a)}function dispatchRequest(a){return throwIfCancellationRequested(a),a.headers=AxiosHeaders$1.from(a.headers),a.data=transformData.call(a,a.transformRequest),["post","put","patch"].indexOf(a.method)!==-1&&a.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(a.adapter||defaults$1.adapter)(a).then(function(et){return throwIfCancellationRequested(a),et.data=transformData.call(a,a.transformResponse,et),et.headers=AxiosHeaders$1.from(et.headers),et},function(et){return isCancel$1(et)||(throwIfCancellationRequested(a),et&&et.response&&(et.response.data=transformData.call(a,a.transformResponse,et.response),et.response.headers=AxiosHeaders$1.from(et.response.headers))),Promise.reject(et)})}const VERSION$1="1.7.7",validators$1={};["object","boolean","number","function","string","symbol"].forEach((a,j)=>{validators$1[a]=function(et){return typeof et===a||"a"+(j<1?"n ":" ")+a}});const deprecatedWarnings={};validators$1.transitional=function a(j,_e,et){function nt(tt,ot){return"[Axios v"+VERSION$1+"] Transitional option '"+tt+"'"+ot+(et?". "+et:"")}return(tt,ot,ct)=>{if(j===!1)throw new AxiosError$1(nt(ot," has been removed"+(_e?" in "+_e:"")),AxiosError$1.ERR_DEPRECATED);return _e&&!deprecatedWarnings[ot]&&(deprecatedWarnings[ot]=!0,console.warn(nt(ot," has been deprecated since v"+_e+" and will be removed in the near future"))),j?j(tt,ot,ct):!0}};function assertOptions(a,j,_e){if(typeof a!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const et=Object.keys(a);let nt=et.length;for(;nt-- >0;){const tt=et[nt],ot=j[tt];if(ot){const ct=a[tt],ft=ct===void 0||ot(ct,tt,a);if(ft!==!0)throw new AxiosError$1("option "+tt+" must be "+ft,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(_e!==!0)throw new AxiosError$1("Unknown option "+tt,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(j){this.defaults=j,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(j,_e){try{return await this._request(j,_e)}catch(et){if(et instanceof Error){let nt;Error.captureStackTrace?Error.captureStackTrace(nt={}):nt=new Error;const tt=nt.stack?nt.stack.replace(/^.+\n/,""):"";try{et.stack?tt&&!String(et.stack).endsWith(tt.replace(/^.+\n.+\n/,""))&&(et.stack+=`
430
- `+tt):et.stack=tt}catch{}}throw et}}_request(j,_e){typeof j=="string"?(_e=_e||{},_e.url=j):_e=j||{},_e=mergeConfig$1(this.defaults,_e);const{transitional:et,paramsSerializer:nt,headers:tt}=_e;et!==void 0&&validator.assertOptions(et,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),nt!=null&&(utils$1.isFunction(nt)?_e.paramsSerializer={serialize:nt}:validator.assertOptions(nt,{encode:validators.function,serialize:validators.function},!0)),_e.method=(_e.method||this.defaults.method||"get").toLowerCase();let ot=tt&&utils$1.merge(tt.common,tt[_e.method]);tt&&utils$1.forEach(["delete","get","head","post","put","patch","common"],At=>{delete tt[At]}),_e.headers=AxiosHeaders$1.concat(ot,tt);const ct=[];let ft=!0;this.interceptors.request.forEach(function(Rt){typeof Rt.runWhen=="function"&&Rt.runWhen(_e)===!1||(ft=ft&&Rt.synchronous,ct.unshift(Rt.fulfilled,Rt.rejected))});const ht=[];this.interceptors.response.forEach(function(Rt){ht.push(Rt.fulfilled,Rt.rejected)});let dt,yt=0,Tt;if(!ft){const At=[dispatchRequest.bind(this),void 0];for(At.unshift.apply(At,ct),At.push.apply(At,ht),Tt=At.length,dt=Promise.resolve(_e);yt<Tt;)dt=dt.then(At[yt++],At[yt++]);return dt}Tt=ct.length;let St=_e;for(yt=0;yt<Tt;){const At=ct[yt++],Rt=ct[yt++];try{St=At(St)}catch(It){Rt.call(this,It);break}}try{dt=dispatchRequest.call(this,St)}catch(At){return Promise.reject(At)}for(yt=0,Tt=ht.length;yt<Tt;)dt=dt.then(ht[yt++],ht[yt++]);return dt}getUri(j){j=mergeConfig$1(this.defaults,j);const _e=buildFullPath(j.baseURL,j.url);return buildURL(_e,j.params,j.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function a(j){Axios$1.prototype[j]=function(_e,et){return this.request(mergeConfig$1(et||{},{method:j,url:_e,data:(et||{}).data}))}});utils$1.forEach(["post","put","patch"],function a(j){function _e(et){return function(tt,ot,ct){return this.request(mergeConfig$1(ct||{},{method:j,headers:et?{"Content-Type":"multipart/form-data"}:{},url:tt,data:ot}))}}Axios$1.prototype[j]=_e(),Axios$1.prototype[j+"Form"]=_e(!0)});let CancelToken$1=class Eo{constructor(j){if(typeof j!="function")throw new TypeError("executor must be a function.");let _e;this.promise=new Promise(function(tt){_e=tt});const et=this;this.promise.then(nt=>{if(!et._listeners)return;let tt=et._listeners.length;for(;tt-- >0;)et._listeners[tt](nt);et._listeners=null}),this.promise.then=nt=>{let tt;const ot=new Promise(ct=>{et.subscribe(ct),tt=ct}).then(nt);return ot.cancel=function(){et.unsubscribe(tt)},ot},j(function(tt,ot,ct){et.reason||(et.reason=new CanceledError$1(tt,ot,ct),_e(et.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(j){if(this.reason){j(this.reason);return}this._listeners?this._listeners.push(j):this._listeners=[j]}unsubscribe(j){if(!this._listeners)return;const _e=this._listeners.indexOf(j);_e!==-1&&this._listeners.splice(_e,1)}toAbortSignal(){const j=new AbortController,_e=et=>{j.abort(et)};return this.subscribe(_e),j.signal.unsubscribe=()=>this.unsubscribe(_e),j.signal}static source(){let j;return{token:new Eo(function(nt){j=nt}),cancel:j}}};function spread$1(a){return function(_e){return a.apply(null,_e)}}function isAxiosError$1(a){return utils$1.isObject(a)&&a.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode$1).forEach(([a,j])=>{HttpStatusCode$1[j]=a});function createInstance(a){const j=new Axios$1(a),_e=bind(Axios$1.prototype.request,j);return utils$1.extend(_e,Axios$1.prototype,j,{allOwnKeys:!0}),utils$1.extend(_e,j,null,{allOwnKeys:!0}),_e.create=function(nt){return createInstance(mergeConfig$1(a,nt))},_e}const axios$4=createInstance(defaults$1);axios$4.Axios=Axios$1;axios$4.CanceledError=CanceledError$1;axios$4.CancelToken=CancelToken$1;axios$4.isCancel=isCancel$1;axios$4.VERSION=VERSION$1;axios$4.toFormData=toFormData$1;axios$4.AxiosError=AxiosError$1;axios$4.Cancel=axios$4.CanceledError;axios$4.all=function a(j){return Promise.all(j)};axios$4.spread=spread$1;axios$4.isAxiosError=isAxiosError$1;axios$4.mergeConfig=mergeConfig$1;axios$4.AxiosHeaders=AxiosHeaders$1;axios$4.formToJSON=a=>formDataToJSON(utils$1.isHTMLForm(a)?new FormData(a):a);axios$4.getAdapter=adapters.getAdapter;axios$4.HttpStatusCode=HttpStatusCode$1;axios$4.default=axios$4;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios$4,axios$3=Object.freeze(Object.defineProperty({__proto__:null,Axios,AxiosError,AxiosHeaders,Cancel,CancelToken,CanceledError,HttpStatusCode,VERSION,all,default:axios$4,formToJSON,getAdapter,isAxiosError,isCancel,mergeConfig,spread,toFormData},Symbol.toStringTag,{value:"Module"}));var __defProp$3=Object.defineProperty,__defNormalProp$3=(a,j,_e)=>j in a?__defProp$3(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField$3=(a,j,_e)=>(__defNormalProp$3(a,j+"",_e),_e);class AuthService{constructor({api:j}){__publicField$3(this,"api"),this.api=j}async getUserPublicInfo({did:j}){const{data:_e}=await this.api.get("/api/user",{params:{did:j}});return _e}async getUserPrivacyConfig({did:j}){const{data:_e}=await this.api.get("/api/user/privacy/config",{params:{did:j}});return _e}async saveUserPrivacyConfig(j){const{data:_e}=await this.api.post("/api/user/privacy/config",j);return _e}async getUserNotificationConfig(){const{data:j}=await this.api.get("/api/user/notification/config");return j}async saveUserNotificationConfig(j){const{data:_e}=await this.api.post("/api/user/notification/config",j);return _e}async testNotificationWebhook(j){const{data:_e}=await this.api.put("/api/user/notification/webhook",j);return _e}async getProfileUrl({did:j,locale:_e}){const et=`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/user`;return withQuery(et,{did:j,locale:_e})}async getProfile(){const{data:j}=await this.api.get("/api/user/profile");return j}async refreshProfile(){await this.api.put("/api/user/refreshProfile")}async saveProfile({locale:j,inviter:_e}){const{data:et}=await this.api.put("/api/user/profile",{locale:j,inviter:_e});return et}async updateDidSpace({spaceGateway:j}){await this.api.put("/api/user/updateDidSpace",{spaceGateway:j})}async logout({visitorId:j}){const{data:_e}=await this.api.post("/api/user/logout",{visitorId:j});return _e}}class TokenService{getSessionToken(){return api$4.get(constant$3.SESSION_TOKEN_STORAGE_KEY)}setSessionToken(j){api$4.set(constant$3.SESSION_TOKEN_STORAGE_KEY,j)}removeSessionToken(){api$4.remove(constant$3.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(constant$3.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(j){localStorage.setItem(constant$3.REFRESH_TOKEN_STORAGE_KEY,j)}removeRefreshToken(){localStorage.removeItem(constant$3.REFRESH_TOKEN_STORAGE_KEY)}}const blockletCache=new QuickLRU({maxSize:30,maxAge:60*1e3});class BlockletService{async getBlocklet(j,_e=!1){if(!j){if(typeof window>"u"||typeof document>"u")throw new Error("Cannot get blocklet in server side without baseUrl");return window.blocklet}if(!_e&&blockletCache.has(j))return blockletCache.get(j);const et=withQuery(joinURL(j,"__blocklet__.js"),{type:"json",t:Date.now()}),tt=await(await fetch(et)).json();return blockletCache.set(j,tt),tt}async loadBlocklet(){return new Promise((j,_e)=>{if(typeof window>"u"||typeof document>"u"){_e();return}const et=document.createElement("script");let nt="/";window.blocklet&&window.blocklet.prefix&&(nt=window.blocklet.prefix),et.src=withQuery(joinURL(nt,"__blocklet__.js"),{t:Date.now()}),et.onload=()=>{j()},et.onerror=()=>{_e()},document.head.append(et)})}getPrefix(j){var _e;return j?(j==null?void 0:j.prefix)||"/":typeof window>"u"||typeof document>"u"?null:((_e=window.blocklet)==null?void 0:_e.prefix)||"/"}}var __defProp$2=Object.defineProperty,__defNormalProp$2=(a,j,_e)=>j in a?__defProp$2(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField$2=(a,j,_e)=>(__defNormalProp$2(a,typeof j!="symbol"?j+"":j,_e),_e);class UserSessionService{constructor({api:j,blocklet:_e}){__publicField$2(this,"api"),__publicField$2(this,"blocklet"),this.api=j,this.blocklet=_e||new BlockletService}getBaseUrl(j){return j?joinURL(j,constant$3.WELLKNOWN_SERVICE_PATH_PREFIX):void 0}async getUserSessions({did:j,appUrl:_e}){const et=this.getBaseUrl(_e),nt=await this.blocklet.getBlocklet(),{data:tt}=await this.api.get("/api/user-session",{baseURL:et,params:{userDid:j,appPid:nt.appPid}});return tt}async loginByUserSession({appPid:j,userDid:_e,visitorId:et,passportId:nt,appUrl:tt}){const ot=this.getBaseUrl(tt),{data:ct}=await this.api.post("/api/user-session/login",{appPid:j,userDid:_e,visitorId:et,passportId:nt},{baseURL:ot});return ct}}var __defProp$1=Object.defineProperty,__defNormalProp$1=(a,j,_e)=>j in a?__defProp$1(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField$1=(a,j,_e)=>(__defNormalProp$1(a,j+"",_e),_e);class ComponentService{constructor({blocklet:j=window.blocklet}={}){__publicField$1(this,"blocklet"),this.blocklet=j}getComponent(j){var nt;return(((nt=this.blocklet)==null?void 0:nt.componentMountPoints)||[]).find(tt=>[tt.title,tt.name,tt.did].includes(j))}getComponentMountPoint(j){const _e=this.getComponent(j);return(_e==null?void 0:_e.mountPoint)||""}getUrl(j,..._e){var tt;const et=this.getComponentMountPoint(j),nt=((tt=this.blocklet)==null?void 0:tt.appUrl)||"";return joinURL(nt,et,..._e)}}const version$3="1.16.32",sleep$2=(a=0)=>new Promise(j=>{setTimeout(()=>{j()},a)}),getBearerToken=a=>`Bearer ${encodeURIComponent(a)}`,visitorIdKey="__visitor_id",getVisitorId$1=()=>localStorage.getItem(visitorIdKey);function getCSRFToken(){return api$4.get("x-csrf-token")}async function sleepForLoading(a,j=300){a.metaData.endTime=+new Date;const{startTime:_e,endTime:et}=a.metaData,nt=et-_e;nt<j&&await sleep$2(j-nt),delete a.metaData}const createAxios$1=(a,j)=>{const _e={...a==null?void 0:a.headers,"x-blocklet-js-sdk-version":version$3},et=new ComponentService,nt=getVisitorId$1();[void 0,null].includes(nt)||(_e["x-blocklet-visitor-id"]=nt);const tt=axios$4.create({...a,headers:_e});return j!=null&&j.lazy&&(tt.interceptors.request.use(ot=>(ot.metaData={startTime:+new Date},ot),ot=>Promise.reject(ot)),tt.interceptors.response.use(async ot=>(ot.config&&await sleepForLoading(ot.config,j==null?void 0:j.lazyTime),ot),async ot=>(ot.response&&await sleepForLoading(ot.response.config,j==null?void 0:j.lazyTime),Promise.reject(ot)))),tt.interceptors.request.use(ot=>{var ft,ht;const ct=(j==null?void 0:j.componentDid)??((ht=(ft=window.blocklet)==null?void 0:ft.componentId)==null?void 0:ht.split("/").pop());return ot.baseURL=ot.baseURL||et.getComponentMountPoint(ct),ot.timeout=ot.timeout||20*1e3,ot.headers["x-csrf-token"]=getCSRFToken(),ot},ot=>Promise.reject(ot)),tt};async function renewRefreshToken$1(a){if(!a)throw new Error("Refresh token not found");const j=createAxios$1({baseURL:constant$3.WELLKNOWN_SERVICE_PATH_PREFIX,timeout:10*1e3,headers:{authorization:getBearerToken(a)}}),{data:_e}=await j.post("/api/did/refreshSession");return _e}function createRequest$1({getSessionToken:a,setSessionToken:j,removeSessionToken:_e,getRefreshToken:et,setRefreshToken:nt,removeRefreshToken:tt,onRefreshTokenError:ot,onRefreshTokenSuccess:ct},ft,ht){let dt=null;const yt=createAxios$1({timeout:30*1e3,...ft},ht);return yt.interceptors.request.use(async Tt=>{if(!api$4.get(constant$3.SESSION_TOKEN_STORAGE_KEY)){const St=a();St&&(Tt.headers.authorization=getBearerToken(St))}return dt&&await dt,Tt},Tt=>Promise.reject(Tt)),yt.interceptors.response.use(Tt=>Tt,async Tt=>{var At;const St=Tt.config;if(St&&(St.headers=St!=null&&St.headers?{...St.headers}:{},((At=Tt==null?void 0:Tt.response)==null?void 0:At.status)===401&&!St._retry)){St._retry=!0;try{dt||(dt=renewRefreshToken$1(et()));const Rt=await dt;return j(Rt.nextToken),nt(Rt.nextRefreshToken),typeof ct=="function"&&ct(Rt),yt(St)}catch(Rt){return _e(),tt(),typeof ot=="function"&&ot(Rt),Promise.reject(Tt)}finally{dt=null}}return Promise.reject(Tt)}),yt}var __defProp$4=Object.defineProperty,__defNormalProp=(a,j,_e)=>j in a?__defProp$4(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField=(a,j,_e)=>(__defNormalProp(a,typeof j!="symbol"?j+"":j,_e),_e);class BlockletSDK{constructor(){__publicField(this,"api"),__publicField(this,"user"),__publicField(this,"userSession"),__publicField(this,"token"),__publicField(this,"blocklet");const j=new TokenService,_e=createRequest$1({getSessionToken:j.getSessionToken,setSessionToken:j.setSessionToken,removeSessionToken:j.removeSessionToken,getRefreshToken:j.getRefreshToken,setRefreshToken:j.setRefreshToken,removeRefreshToken:j.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},{baseURL:constant$3.WELLKNOWN_SERVICE_PATH_PREFIX});this.user=new AuthService({api:_e});const et=new BlockletService;this.userSession=new UserSessionService({api:_e,blocklet:et}),this.token=j,this.api=_e,this.blocklet=et}}function createAxios$2(a={},j={}){const _e=new TokenService;return createRequest$1({getSessionToken:_e.getSessionToken,setSessionToken:_e.setSessionToken,removeSessionToken:_e.removeSessionToken,getRefreshToken:_e.getRefreshToken,setRefreshToken:_e.setRefreshToken,removeRefreshToken:_e.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},a,j)}class CookieStorageEngine{constructor(j,_e){this.storageKey=j,this.options=_e||{}}setToken(j){return Cookie.set(this.storageKey,j,{...getCookieOptions(this.options)})}getToken(){return Cookie.get(this.storageKey)}removeToken(){return Cookie.remove(this.storageKey,getCookieOptions(this.options))}}function e(a){this.message=a}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(a){var j=String(a).replace(/=+$/,"");if(j.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var _e,et,nt=0,tt=0,ot="";et=j.charAt(tt++);~et&&(_e=nt%4?64*_e+et:et,nt++%4)?ot+=String.fromCharCode(255&_e>>(-2*nt&6)):0)et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(et);return ot};function t$2(a){var j=a.replace(/-/g,"+").replace(/_/g,"/");switch(j.length%4){case 0:break;case 2:j+="==";break;case 3:j+="=";break;default:throw"Illegal base64url string!"}try{return function(_e){return decodeURIComponent(r(_e).replace(/(.)/g,function(et,nt){var tt=nt.charCodeAt(0).toString(16).toUpperCase();return tt.length<2&&(tt="0"+tt),"%"+tt}))}(j)}catch{return r(j)}}function n(a){this.message=a}function o(a,j){if(typeof a!="string")throw new n("Invalid token specified");var _e=(j=j||{}).header===!0?0:1;try{return JSON.parse(t$2(a.split(".")[_e]))}catch(et){throw new n("Invalid token specified: "+et.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";class LocalStorageEngine{constructor(j){this.storageKey=j}setToken(j){if(!(typeof window>"u"||typeof window.localStorage>"u"))return localStorage.setItem(this.storageKey,j)}getToken(){if(typeof window>"u"||typeof window.localStorage>"u")return;const j=localStorage.getItem(this.storageKey);let _e,et;try{if({value:_e,exp:et}=JSON.parse(j),et===void 0||_e===void 0)return j}catch{_e=j}try{et=o(_e).exp}catch{return}if(!(new Date().getTime()>et*1e3))return _e}removeToken(){if(!(typeof window>"u"||typeof window.localStorage>"u"))return localStorage.removeItem(this.storageKey)}}function createStorage(a="did.auth.token",j="ls",_e={}){if(!a)throw new Error("storageKey must be specified to create a storage");let et=null;if(j==="ls")et=new LocalStorageEngine(a);else if(j==="cookie")et=new CookieStorageEngine(a,_e);else throw new Error("storageEngine must be ls or cookie");return{getToken:et.getToken.bind(et),setToken:et.setToken.bind(et),removeToken:et.removeToken.bind(et),engine:j,key:a}}const overheadLength=tweetnacl.box.publicKeyLength+tweetnacl.box.overheadLength,ERROR_MSG_INPUT="Input must be an string, Buffer or Uint8Array";function normalizeInput(a){let j;if(a instanceof Uint8Array)j=a;else if(typeof a=="string")j=new TextEncoder().encode(a);else throw new Error(ERROR_MSG_INPUT);return j}function toHex(a){return Array.prototype.map.call(a,function(j){return(j<16?"0":"")+j.toString(16)}).join("")}function uint32ToHex(a){return(4294967296+a).toString(16).substring(1)}function debugPrint(a,j,_e){let et=`
430
+ `+tt):et.stack=tt}catch{}}throw et}}_request(j,_e){typeof j=="string"?(_e=_e||{},_e.url=j):_e=j||{},_e=mergeConfig$1(this.defaults,_e);const{transitional:et,paramsSerializer:nt,headers:tt}=_e;et!==void 0&&validator.assertOptions(et,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),nt!=null&&(utils$1.isFunction(nt)?_e.paramsSerializer={serialize:nt}:validator.assertOptions(nt,{encode:validators.function,serialize:validators.function},!0)),_e.method=(_e.method||this.defaults.method||"get").toLowerCase();let ot=tt&&utils$1.merge(tt.common,tt[_e.method]);tt&&utils$1.forEach(["delete","get","head","post","put","patch","common"],At=>{delete tt[At]}),_e.headers=AxiosHeaders$1.concat(ot,tt);const ct=[];let ft=!0;this.interceptors.request.forEach(function(Rt){typeof Rt.runWhen=="function"&&Rt.runWhen(_e)===!1||(ft=ft&&Rt.synchronous,ct.unshift(Rt.fulfilled,Rt.rejected))});const ht=[];this.interceptors.response.forEach(function(Rt){ht.push(Rt.fulfilled,Rt.rejected)});let dt,yt=0,Tt;if(!ft){const At=[dispatchRequest.bind(this),void 0];for(At.unshift.apply(At,ct),At.push.apply(At,ht),Tt=At.length,dt=Promise.resolve(_e);yt<Tt;)dt=dt.then(At[yt++],At[yt++]);return dt}Tt=ct.length;let St=_e;for(yt=0;yt<Tt;){const At=ct[yt++],Rt=ct[yt++];try{St=At(St)}catch(It){Rt.call(this,It);break}}try{dt=dispatchRequest.call(this,St)}catch(At){return Promise.reject(At)}for(yt=0,Tt=ht.length;yt<Tt;)dt=dt.then(ht[yt++],ht[yt++]);return dt}getUri(j){j=mergeConfig$1(this.defaults,j);const _e=buildFullPath(j.baseURL,j.url);return buildURL(_e,j.params,j.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function a(j){Axios$1.prototype[j]=function(_e,et){return this.request(mergeConfig$1(et||{},{method:j,url:_e,data:(et||{}).data}))}});utils$1.forEach(["post","put","patch"],function a(j){function _e(et){return function(tt,ot,ct){return this.request(mergeConfig$1(ct||{},{method:j,headers:et?{"Content-Type":"multipart/form-data"}:{},url:tt,data:ot}))}}Axios$1.prototype[j]=_e(),Axios$1.prototype[j+"Form"]=_e(!0)});let CancelToken$1=class Eo{constructor(j){if(typeof j!="function")throw new TypeError("executor must be a function.");let _e;this.promise=new Promise(function(tt){_e=tt});const et=this;this.promise.then(nt=>{if(!et._listeners)return;let tt=et._listeners.length;for(;tt-- >0;)et._listeners[tt](nt);et._listeners=null}),this.promise.then=nt=>{let tt;const ot=new Promise(ct=>{et.subscribe(ct),tt=ct}).then(nt);return ot.cancel=function(){et.unsubscribe(tt)},ot},j(function(tt,ot,ct){et.reason||(et.reason=new CanceledError$1(tt,ot,ct),_e(et.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(j){if(this.reason){j(this.reason);return}this._listeners?this._listeners.push(j):this._listeners=[j]}unsubscribe(j){if(!this._listeners)return;const _e=this._listeners.indexOf(j);_e!==-1&&this._listeners.splice(_e,1)}toAbortSignal(){const j=new AbortController,_e=et=>{j.abort(et)};return this.subscribe(_e),j.signal.unsubscribe=()=>this.unsubscribe(_e),j.signal}static source(){let j;return{token:new Eo(function(nt){j=nt}),cancel:j}}};function spread$1(a){return function(_e){return a.apply(null,_e)}}function isAxiosError$1(a){return utils$1.isObject(a)&&a.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode$1).forEach(([a,j])=>{HttpStatusCode$1[j]=a});function createInstance(a){const j=new Axios$1(a),_e=bind(Axios$1.prototype.request,j);return utils$1.extend(_e,Axios$1.prototype,j,{allOwnKeys:!0}),utils$1.extend(_e,j,null,{allOwnKeys:!0}),_e.create=function(nt){return createInstance(mergeConfig$1(a,nt))},_e}const axios$4=createInstance(defaults$1);axios$4.Axios=Axios$1;axios$4.CanceledError=CanceledError$1;axios$4.CancelToken=CancelToken$1;axios$4.isCancel=isCancel$1;axios$4.VERSION=VERSION$1;axios$4.toFormData=toFormData$1;axios$4.AxiosError=AxiosError$1;axios$4.Cancel=axios$4.CanceledError;axios$4.all=function a(j){return Promise.all(j)};axios$4.spread=spread$1;axios$4.isAxiosError=isAxiosError$1;axios$4.mergeConfig=mergeConfig$1;axios$4.AxiosHeaders=AxiosHeaders$1;axios$4.formToJSON=a=>formDataToJSON(utils$1.isHTMLForm(a)?new FormData(a):a);axios$4.getAdapter=adapters.getAdapter;axios$4.HttpStatusCode=HttpStatusCode$1;axios$4.default=axios$4;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios$4,axios$3=Object.freeze(Object.defineProperty({__proto__:null,Axios,AxiosError,AxiosHeaders,Cancel,CancelToken,CanceledError,HttpStatusCode,VERSION,all,default:axios$4,formToJSON,getAdapter,isAxiosError,isCancel,mergeConfig,spread,toFormData},Symbol.toStringTag,{value:"Module"}));var __defProp$3=Object.defineProperty,__defNormalProp$3=(a,j,_e)=>j in a?__defProp$3(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField$3=(a,j,_e)=>(__defNormalProp$3(a,j+"",_e),_e);class AuthService{constructor({api:j}){__publicField$3(this,"api"),this.api=j}async getUserPublicInfo({did:j}){const{data:_e}=await this.api.get("/api/user",{params:{did:j}});return _e}async getUserPrivacyConfig({did:j}){const{data:_e}=await this.api.get("/api/user/privacy/config",{params:{did:j}});return _e}async saveUserPrivacyConfig(j){const{data:_e}=await this.api.post("/api/user/privacy/config",j);return _e}async getUserNotificationConfig(){const{data:j}=await this.api.get("/api/user/notification/config");return j}async saveUserNotificationConfig(j){const{data:_e}=await this.api.post("/api/user/notification/config",j);return _e}async testNotificationWebhook(j){const{data:_e}=await this.api.put("/api/user/notification/webhook",j);return _e}async getProfileUrl({did:j,locale:_e}){const et=`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/user`;return withQuery(et,{did:j,locale:_e})}async getProfile(){const{data:j}=await this.api.get("/api/user/profile");return j}async refreshProfile(){await this.api.put("/api/user/refreshProfile")}async saveProfile({locale:j,inviter:_e}){const{data:et}=await this.api.put("/api/user/profile",{locale:j,inviter:_e});return et}async updateDidSpace({spaceGateway:j}){await this.api.put("/api/user/updateDidSpace",{spaceGateway:j})}async logout({visitorId:j}){const{data:_e}=await this.api.post("/api/user/logout",{visitorId:j});return _e}}class TokenService{getSessionToken(){return api$4.get(constant$3.SESSION_TOKEN_STORAGE_KEY)}setSessionToken(j){api$4.set(constant$3.SESSION_TOKEN_STORAGE_KEY,j)}removeSessionToken(){api$4.remove(constant$3.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(constant$3.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(j){localStorage.setItem(constant$3.REFRESH_TOKEN_STORAGE_KEY,j)}removeRefreshToken(){localStorage.removeItem(constant$3.REFRESH_TOKEN_STORAGE_KEY)}}const blockletCache=new QuickLRU({maxSize:30,maxAge:60*1e3});class BlockletService{async getBlocklet(j,_e=!1){if(!j){if(typeof window>"u"||typeof document>"u")throw new Error("Cannot get blocklet in server side without baseUrl");return window.blocklet}if(!_e&&blockletCache.has(j))return blockletCache.get(j);const et=withQuery(joinURL(j,"__blocklet__.js"),{type:"json",t:Date.now()}),tt=await(await fetch(et)).json();return blockletCache.set(j,tt),tt}async loadBlocklet(){return new Promise((j,_e)=>{if(typeof window>"u"||typeof document>"u"){_e();return}const et=document.createElement("script");let nt="/";window.blocklet&&window.blocklet.prefix&&(nt=window.blocklet.prefix),et.src=withQuery(joinURL(nt,"__blocklet__.js"),{t:Date.now()}),et.onload=()=>{j()},et.onerror=()=>{_e()},document.head.append(et)})}getPrefix(j){var _e;return j?(j==null?void 0:j.prefix)||"/":typeof window>"u"||typeof document>"u"?null:((_e=window.blocklet)==null?void 0:_e.prefix)||"/"}}var __defProp$2=Object.defineProperty,__defNormalProp$2=(a,j,_e)=>j in a?__defProp$2(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField$2=(a,j,_e)=>(__defNormalProp$2(a,typeof j!="symbol"?j+"":j,_e),_e);class UserSessionService{constructor({api:j,blocklet:_e}){__publicField$2(this,"api"),__publicField$2(this,"blocklet"),this.api=j,this.blocklet=_e||new BlockletService}getBaseUrl(j){return j?joinURL(j,constant$3.WELLKNOWN_SERVICE_PATH_PREFIX):void 0}async getUserSessions({did:j,appUrl:_e}){const et=this.getBaseUrl(_e),nt=await this.blocklet.getBlocklet(),{data:tt}=await this.api.get("/api/user-session",{baseURL:et,params:{userDid:j,appPid:nt.appPid}});return tt}async loginByUserSession({appPid:j,userDid:_e,visitorId:et,passportId:nt,appUrl:tt}){const ot=this.getBaseUrl(tt),{data:ct}=await this.api.post("/api/user-session/login",{appPid:j,userDid:_e,visitorId:et,passportId:nt},{baseURL:ot});return ct}}var __defProp$1=Object.defineProperty,__defNormalProp$1=(a,j,_e)=>j in a?__defProp$1(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField$1=(a,j,_e)=>(__defNormalProp$1(a,j+"",_e),_e);class ComponentService{constructor({blocklet:j=window.blocklet}={}){__publicField$1(this,"blocklet"),this.blocklet=j}getComponent(j){var nt;return(((nt=this.blocklet)==null?void 0:nt.componentMountPoints)||[]).find(tt=>[tt.title,tt.name,tt.did].includes(j))}getComponentMountPoint(j){const _e=this.getComponent(j);return(_e==null?void 0:_e.mountPoint)||""}getUrl(j,..._e){var tt;const et=this.getComponentMountPoint(j),nt=((tt=this.blocklet)==null?void 0:tt.appUrl)||"";return joinURL(nt,et,..._e)}}const version$3="1.16.32",sleep$2=(a=0)=>new Promise(j=>{setTimeout(()=>{j()},a)}),getBearerToken=a=>`Bearer ${encodeURIComponent(a)}`,visitorIdKey="__visitor_id",getVisitorId$1=()=>localStorage.getItem(visitorIdKey);function getCSRFToken(){return api$4.get("x-csrf-token")}async function sleepForLoading(a,j=300){a.metaData.endTime=+new Date;const{startTime:_e,endTime:et}=a.metaData,nt=et-_e;nt<j&&await sleep$2(j-nt),delete a.metaData}const createAxios$1=(a,j)=>{const _e={...a==null?void 0:a.headers,"x-blocklet-js-sdk-version":version$3},et=new ComponentService,nt=getVisitorId$1();[void 0,null].includes(nt)||(_e["x-blocklet-visitor-id"]=nt);const tt=axios$4.create({...a,headers:_e});return j!=null&&j.lazy&&(tt.interceptors.request.use(ot=>(ot.metaData={startTime:+new Date},ot),ot=>Promise.reject(ot)),tt.interceptors.response.use(async ot=>(ot.config&&await sleepForLoading(ot.config,j==null?void 0:j.lazyTime),ot),async ot=>(ot.response&&await sleepForLoading(ot.response.config,j==null?void 0:j.lazyTime),Promise.reject(ot)))),tt.interceptors.request.use(ot=>{var ft,ht;const ct=(j==null?void 0:j.componentDid)??((ht=(ft=window.blocklet)==null?void 0:ft.componentId)==null?void 0:ht.split("/").pop());return ot.baseURL=ot.baseURL||et.getComponentMountPoint(ct),ot.timeout=ot.timeout||20*1e3,ot.headers["x-csrf-token"]=getCSRFToken(),ot},ot=>Promise.reject(ot)),tt};async function renewRefreshToken$1(a){if(!a)throw new Error("Refresh token not found");const j=createAxios$1({baseURL:constant$3.WELLKNOWN_SERVICE_PATH_PREFIX,timeout:10*1e3,headers:{authorization:getBearerToken(a)}}),{data:_e}=await j.post("/api/did/refreshSession");return _e}function createRequest$1({getSessionToken:a,setSessionToken:j,removeSessionToken:_e,getRefreshToken:et,setRefreshToken:nt,removeRefreshToken:tt,onRefreshTokenError:ot,onRefreshTokenSuccess:ct},ft,ht){let dt=null;const yt=createAxios$1({timeout:30*1e3,...ft},ht);return yt.interceptors.request.use(async Tt=>{if(!api$4.get(constant$3.SESSION_TOKEN_STORAGE_KEY)){const St=a();St&&(Tt.headers.authorization=getBearerToken(St))}return dt&&await dt,Tt},Tt=>Promise.reject(Tt)),yt.interceptors.response.use(Tt=>Tt,async Tt=>{var At;const St=Tt.config;if(St&&(St.headers=St!=null&&St.headers?{...St.headers}:{},((At=Tt==null?void 0:Tt.response)==null?void 0:At.status)===401&&!St._retry)){St._retry=!0;try{dt||(dt=renewRefreshToken$1(et()));const Rt=await dt;return j(Rt.nextToken),nt(Rt.nextRefreshToken),typeof ct=="function"&&ct(Rt),yt(St)}catch(Rt){return _e(),tt(),typeof ot=="function"&&ot(Rt),Promise.reject(Tt)}finally{dt=null}}return Promise.reject(Tt)}),yt}var __defProp$4=Object.defineProperty,__defNormalProp=(a,j,_e)=>j in a?__defProp$4(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField=(a,j,_e)=>(__defNormalProp(a,typeof j!="symbol"?j+"":j,_e),_e);class BlockletSDK{constructor(){__publicField(this,"api"),__publicField(this,"user"),__publicField(this,"userSession"),__publicField(this,"token"),__publicField(this,"blocklet");const j=new TokenService,_e=createRequest$1({getSessionToken:j.getSessionToken,setSessionToken:j.setSessionToken,removeSessionToken:j.removeSessionToken,getRefreshToken:j.getRefreshToken,setRefreshToken:j.setRefreshToken,removeRefreshToken:j.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},{baseURL:constant$3.WELLKNOWN_SERVICE_PATH_PREFIX});this.user=new AuthService({api:_e});const et=new BlockletService;this.userSession=new UserSessionService({api:_e,blocklet:et}),this.token=j,this.api=_e,this.blocklet=et}}function createAxios$2(a={},j={}){const _e=new TokenService;return createRequest$1({getSessionToken:_e.getSessionToken,setSessionToken:_e.setSessionToken,removeSessionToken:_e.removeSessionToken,getRefreshToken:_e.getRefreshToken,setRefreshToken:_e.setRefreshToken,removeRefreshToken:_e.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},a,j)}var lib$3={},dsbridge={};Object.defineProperty(dsbridge,"__esModule",{value:!0});dsbridge.default=void 0;var bridge={call:function a(j,_e,et){var nt="";typeof _e=="function"&&(et=_e,_e={});var tt={data:_e===void 0?null:_e};if(typeof et=="function"){var ot="dscb"+window.dscb++;window[ot]=et,tt._dscbstub=ot}return tt=JSON.stringify(tt),window._dsbridge?nt=_dsbridge.call(j,tt):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(nt=prompt("_dsbridge="+j,tt)),JSON.parse(nt||"{}").data},register:function a(j,_e,et){var nt=et?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){bridge.call("_dsb.dsinit")},0)),typeof _e=="object"?nt._obs[j]=_e:nt[j]=_e},registerAsyn:function a(j,_e){this.register(j,_e,!0)},hasNativeMethod:function a(j,_e){return this.call("_dsb.hasNativeMethod",{name:j,type:_e||"all"})},disableJavascriptDialogBlock:function a(j){this.call("_dsb.disableJavascriptDialogBlock",{disable:j!==!1})},canUseBridge(){return!!(window._dsbridge||window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)}};(function(){if(!bridge.canUseBridge()||window._dsf)return;const a=window.close;var j={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:bridge,close:function(){bridge.call("_dsb.closePage"),a()},_handleMessageFromNative:function(nt){var tt=JSON.parse(nt.data),ot={id:nt.callbackId,complete:!0},ct=this._dsf[nt.method],ft=this._dsaf[nt.method],ht=function(kt,Pt){ot.data=kt.apply(Pt,tt),bridge.call("_dsb.returnValue",ot)},dt=function(kt,Pt){tt.push(function(Bt,Kt){ot.data=Bt,ot.complete=Kt!==!1,bridge.call("_dsb.returnValue",ot)}),kt.apply(Pt,tt)};if(ct)ht(ct,this._dsf);else if(ft)dt(ft,this._dsaf);else{var yt=nt.method.split(".");if(yt.length<2)return;var Tt=yt.pop(),St=yt.join("."),At=this._dsf._obs,Rt=At[St]||{},It=Rt[Tt];if(It&&typeof It=="function"){ht(It,Rt);return}if(At=this._dsaf._obs,Rt=At[St]||{},It=Rt[Tt],It&&typeof It=="function"){dt(It,Rt);return}}}};for(var _e in j)window[_e]=j[_e];bridge.register("_hasJavascriptMethod",function(et,nt){var tt=et.split(".");if(tt.length<2)return!!(_dsf[tt]||_dsaf[tt]);var et=tt.pop(),ot=tt.join("."),ct=_dsf._obs[ot]||_dsaf._obs[ot];return ct&&!!ct[et]})})();dsbridge.default=bridge;Object.defineProperty(lib$3,"__esModule",{value:!0});var default_1$4=lib$3.default=void 0,_dsbridge$1=_interopRequireDefault$4(dsbridge);function _interopRequireDefault$4(a){return a&&a.__esModule?a:{default:a}}default_1$4=lib$3.default={register(){_dsbridge$1.default.canUseBridge()?_dsbridge$1.default.register(...arguments):console.warn("dsbridge is not available")},registerAsyn(){_dsbridge$1.default.canUseBridge()?_dsbridge$1.default.registerAsyn(...arguments):console.warn("dsbridge is not available")},call(){_dsbridge$1.default.call(...arguments)},asyncCall(){for(var a=arguments.length,j=new Array(a),_e=0;_e<a;_e++)j[_e]=arguments[_e];return new Promise((et,nt)=>{_dsbridge$1.default.call(...j,tt=>{try{const ot=JSON.parse(tt);if(ot.code===0){const ct=JSON.parse(ot.data);et(ct)}else nt(new Error(ot.error))}catch{et(tt)}})})},shareMessage(a){const{content:j,imgUrl:_e,success:et,fail:nt}=a;if(!j&&!_e){nt("params error");return}_dsbridge$1.default.call("arcShare",JSON.stringify({content:j,imgUrl:_e}),tt=>{const ot=JSON.parse(tt);ot&&ot.code===0?typeof et=="function"&&et(tt):typeof nt=="function"&&nt(tt)})},showLoading(){_dsbridge$1.default.call("arcShowLoading")},hideLoading(){_dsbridge$1.default.call("arcHideLoading")},showToast(a){a&&typeof a=="string"&&_dsbridge$1.default.call("arcToast",a)},chooseImgs(a){const{limit:j,success:_e,fail:et}=a;_dsbridge$1.default.call("arcChooseImgs",JSON.stringify({limit:j}),nt=>{const tt=JSON.parse(nt);tt&&tt.code===0?typeof _e=="function"&&_e(nt):typeof et=="function"&&et(nt)})},previewImgs(a){const{imgs:j}=a;!j||j.length===0||_dsbridge$1.default.call("arcPreviewImgs",JSON.stringify(a))},isSetPWD(a){const{success:j,fail:_e}=a;_dsbridge$1.default.call("arcIsSetPWD","",et=>{const nt=JSON.parse(et);nt&&nt.code===0?typeof j=="function"&&j(et):typeof _e=="function"&&_e(et)})},isCodeABOk(a){const{success:j,fail:_e}=a;_dsbridge$1.default.call("arcIsCodeABOk","",et=>{const nt=JSON.parse(et);nt&&nt.code===0?typeof j=="function"&&j(et):typeof _e=="function"&&_e(et)})}};class CookieStorageEngine{constructor(j,_e){this.storageKey=j,this.options=_e||{}}setToken(j){return Cookie.set(this.storageKey,j,{...getCookieOptions(this.options)})}getToken(){return Cookie.get(this.storageKey)}removeToken(){return Cookie.remove(this.storageKey,getCookieOptions(this.options))}}function e(a){this.message=a}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(a){var j=String(a).replace(/=+$/,"");if(j.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var _e,et,nt=0,tt=0,ot="";et=j.charAt(tt++);~et&&(_e=nt%4?64*_e+et:et,nt++%4)?ot+=String.fromCharCode(255&_e>>(-2*nt&6)):0)et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(et);return ot};function t$2(a){var j=a.replace(/-/g,"+").replace(/_/g,"/");switch(j.length%4){case 0:break;case 2:j+="==";break;case 3:j+="=";break;default:throw"Illegal base64url string!"}try{return function(_e){return decodeURIComponent(r(_e).replace(/(.)/g,function(et,nt){var tt=nt.charCodeAt(0).toString(16).toUpperCase();return tt.length<2&&(tt="0"+tt),"%"+tt}))}(j)}catch{return r(j)}}function n(a){this.message=a}function o(a,j){if(typeof a!="string")throw new n("Invalid token specified");var _e=(j=j||{}).header===!0?0:1;try{return JSON.parse(t$2(a.split(".")[_e]))}catch(et){throw new n("Invalid token specified: "+et.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";class LocalStorageEngine{constructor(j){this.storageKey=j}setToken(j){if(!(typeof window>"u"||typeof window.localStorage>"u"))return localStorage.setItem(this.storageKey,j)}getToken(){if(typeof window>"u"||typeof window.localStorage>"u")return;const j=localStorage.getItem(this.storageKey);let _e,et;try{if({value:_e,exp:et}=JSON.parse(j),et===void 0||_e===void 0)return j}catch{_e=j}try{et=o(_e).exp}catch{return}if(!(new Date().getTime()>et*1e3))return _e}removeToken(){if(!(typeof window>"u"||typeof window.localStorage>"u"))return localStorage.removeItem(this.storageKey)}}function createStorage(a="did.auth.token",j="ls",_e={}){if(!a)throw new Error("storageKey must be specified to create a storage");let et=null;if(j==="ls")et=new LocalStorageEngine(a);else if(j==="cookie")et=new CookieStorageEngine(a,_e);else throw new Error("storageEngine must be ls or cookie");return{getToken:et.getToken.bind(et),setToken:et.setToken.bind(et),removeToken:et.removeToken.bind(et),engine:j,key:a}}const overheadLength=tweetnacl.box.publicKeyLength+tweetnacl.box.overheadLength,ERROR_MSG_INPUT="Input must be an string, Buffer or Uint8Array";function normalizeInput(a){let j;if(a instanceof Uint8Array)j=a;else if(typeof a=="string")j=new TextEncoder().encode(a);else throw new Error(ERROR_MSG_INPUT);return j}function toHex(a){return Array.prototype.map.call(a,function(j){return(j<16?"0":"")+j.toString(16)}).join("")}function uint32ToHex(a){return(4294967296+a).toString(16).substring(1)}function debugPrint(a,j,_e){let et=`
431
431
  `+a+" = ";for(let nt=0;nt<j.length;nt+=2){if(_e===32)et+=uint32ToHex(j[nt]).toUpperCase(),et+=" ",et+=uint32ToHex(j[nt+1]).toUpperCase();else if(_e===64)et+=uint32ToHex(j[nt+1]).toUpperCase(),et+=uint32ToHex(j[nt]).toUpperCase();else throw new Error("Invalid size "+_e);nt%6===4?et+=`
432
- `+new Array(a.length+4).join(" "):nt<j.length-2&&(et+=" ")}console.log(et)}function testSpeed(a,j,_e){let et=new Date().getTime();const nt=new Uint8Array(j);for(let ot=0;ot<j;ot++)nt[ot]=ot%256;const tt=new Date().getTime();console.log("Generated random input in "+(tt-et)+"ms"),et=tt;for(let ot=0;ot<_e;ot++){const ct=a(nt),ft=new Date().getTime(),ht=ft-et;et=ft,console.log("Hashed in "+ht+"ms: "+ct.substring(0,20)+"..."),console.log(Math.round(j/(1<<20)/(ht/1e3)*100)/100+" MB PER SECOND")}}var util$6={normalizeInput,toHex,debugPrint,testSpeed};const util$5=util$6;function ADD64AA(a,j,_e){const et=a[j]+a[_e];let nt=a[j+1]+a[_e+1];et>=4294967296&&nt++,a[j]=et,a[j+1]=nt}function ADD64AC(a,j,_e,et){let nt=a[j]+_e;_e<0&&(nt+=4294967296);let tt=a[j+1]+et;nt>=4294967296&&tt++,a[j]=nt,a[j+1]=tt}function B2B_GET32(a,j){return a[j]^a[j+1]<<8^a[j+2]<<16^a[j+3]<<24}function B2B_G(a,j,_e,et,nt,tt){const ot=m$1[nt],ct=m$1[nt+1],ft=m$1[tt],ht=m$1[tt+1];ADD64AA(v,a,j),ADD64AC(v,a,ot,ct);let dt=v[et]^v[a],yt=v[et+1]^v[a+1];v[et]=yt,v[et+1]=dt,ADD64AA(v,_e,et),dt=v[j]^v[_e],yt=v[j+1]^v[_e+1],v[j]=dt>>>24^yt<<8,v[j+1]=yt>>>24^dt<<8,ADD64AA(v,a,j),ADD64AC(v,a,ft,ht),dt=v[et]^v[a],yt=v[et+1]^v[a+1],v[et]=dt>>>16^yt<<16,v[et+1]=yt>>>16^dt<<16,ADD64AA(v,_e,et),dt=v[j]^v[_e],yt=v[j+1]^v[_e+1],v[j]=yt>>>31^dt<<1,v[j+1]=dt>>>31^yt<<1}const BLAKE2B_IV32=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),SIGMA8=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],SIGMA82=new Uint8Array(SIGMA8.map(function(a){return a*2})),v=new Uint32Array(32),m$1=new Uint32Array(32);function blake2bCompress(a,j){let _e=0;for(_e=0;_e<16;_e++)v[_e]=a.h[_e],v[_e+16]=BLAKE2B_IV32[_e];for(v[24]=v[24]^a.t,v[25]=v[25]^a.t/4294967296,j&&(v[28]=~v[28],v[29]=~v[29]),_e=0;_e<32;_e++)m$1[_e]=B2B_GET32(a.b,4*_e);for(_e=0;_e<12;_e++)B2B_G(0,8,16,24,SIGMA82[_e*16+0],SIGMA82[_e*16+1]),B2B_G(2,10,18,26,SIGMA82[_e*16+2],SIGMA82[_e*16+3]),B2B_G(4,12,20,28,SIGMA82[_e*16+4],SIGMA82[_e*16+5]),B2B_G(6,14,22,30,SIGMA82[_e*16+6],SIGMA82[_e*16+7]),B2B_G(0,10,20,30,SIGMA82[_e*16+8],SIGMA82[_e*16+9]),B2B_G(2,12,22,24,SIGMA82[_e*16+10],SIGMA82[_e*16+11]),B2B_G(4,14,16,26,SIGMA82[_e*16+12],SIGMA82[_e*16+13]),B2B_G(6,8,18,28,SIGMA82[_e*16+14],SIGMA82[_e*16+15]);for(_e=0;_e<16;_e++)a.h[_e]=a.h[_e]^v[_e]^v[_e+16]}const parameterBlock=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function blake2bInit(a,j,_e,et){if(a===0||a>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(j&&j.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(_e&&_e.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(et&&et.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const nt={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:a};parameterBlock.fill(0),parameterBlock[0]=a,j&&(parameterBlock[1]=j.length),parameterBlock[2]=1,parameterBlock[3]=1,_e&&parameterBlock.set(_e,32),et&&parameterBlock.set(et,48);for(let tt=0;tt<16;tt++)nt.h[tt]=BLAKE2B_IV32[tt]^B2B_GET32(parameterBlock,tt*4);return j&&(blake2bUpdate(nt,j),nt.c=128),nt}function blake2bUpdate(a,j){for(let _e=0;_e<j.length;_e++)a.c===128&&(a.t+=a.c,blake2bCompress(a,!1),a.c=0),a.b[a.c++]=j[_e]}function blake2bFinal(a){for(a.t+=a.c;a.c<128;)a.b[a.c++]=0;blake2bCompress(a,!0);const j=new Uint8Array(a.outlen);for(let _e=0;_e<a.outlen;_e++)j[_e]=a.h[_e>>2]>>8*(_e&3);return j}function blake2b(a,j,_e,et,nt){_e=_e||64,a=util$5.normalizeInput(a),et&&(et=util$5.normalizeInput(et)),nt&&(nt=util$5.normalizeInput(nt));const tt=blake2bInit(_e,j,et,nt);return blake2bUpdate(tt,a),blake2bFinal(tt)}function blake2bHex(a,j,_e,et,nt){const tt=blake2b(a,j,_e,et,nt);return util$5.toHex(tt)}var blake2b_1={blake2b,blake2bHex,blake2bInit,blake2bUpdate,blake2bFinal};const blake=getDefaultExportFromCjs$1(blake2b_1);function nonce(a,j){var _e=blake.blake2bInit(tweetnacl.box.nonceLength,null);return blake.blake2bUpdate(_e,a),blake.blake2bUpdate(_e,j),blake.blake2bFinal(_e)}function zero(a){for(var j=0;j<a.length;j++)a[j]=0}function seal(a,j){var _e=new Uint8Array(overheadLength+a.length),et=tweetnacl.box.keyPair();_e.set(et.publicKey);var nt=nonce(et.publicKey,j),tt=tweetnacl.box(a,nt,j,et.secretKey);return _e.set(tt,et.publicKey.length),zero(et.secretKey),_e}function open(a,j,_e){var et=a.subarray(0,tweetnacl.box.publicKeyLength),nt=nonce(et,j),tt=a.subarray(tweetnacl.box.publicKeyLength);return tweetnacl.box.open(tt,nt,et,_e)}const SealedBox={seal,open};function isNil(a){return a==null}var isNil_1=isNil;const isNil$1=getDefaultExportFromCjs$1(isNil_1),name="@arcblock/did-connect",version$2="2.10.56",description="Client side library to work with DID Connect by ArcBlock.",keywords=["react","arcblock","component"],author="wangshijun<wangshijun2010@gmail.com>",homepage="https://github.com/ArcBlock/ux#readme",license="Apache-2.0",main$1="lib/index.js",module$1="lib/index.js",repository={type:"git",url:"git+https://github.com/ArcBlock/ux.git"},scripts={lint:"eslint src tests --ext js --ext jsx","lint:fix":"npm run lint -- --fix",build:"babel --config-file ./babel.config.es.js src --out-dir lib --copy-files --no-copy-ignored",autoexports:"node tools/auto-exports.js",watch:"babel --config-file ./babel.config.es.js src --out-dir lib -w --copy-files --no-copy-ignored",precommit:"CI=1 npm run lint",prepush:"CI=1 npm run lint",prepublish:"npm run build",test:"node tools/jest.js",coverage:"npm run test -- --coverage"},bugs={url:"https://github.com/ArcBlock/ux/issues"},dependencies={"@arcblock/bridge":"^2.10.56","@arcblock/icons":"^2.10.56","@arcblock/react-hooks":"^2.10.56","@arcblock/ws":"^1.18.137","@fontsource/inter":"^5.0.16","@iconify-icons/logos":"^1.2.36","@iconify-icons/material-symbols":"^1.2.58","@iconify/react":"^4.1.1",ahooks:"^3.7.10",axios:"^1.7.5",buffer:"^6.0.3","core-js":"^3.25.5",eventemitter3:"^5.0.1","js-cookie":"^2.2.1","jwt-decode":"^3.1.2",lodash:"^4.17.21","mdi-material-ui":"^7.5.0","p-queue":"^6.6.2","p-wait-for":"^5.0.2","path-to-regexp":"^1.8.0",semver:"^7.6.3",tweetnacl:"^1.0.3","tweetnacl-sealedbox-js":"^1.2.0",ufo:"^1.5.3"},peerDependencies={"@arcblock/ux":"^2.9.79","@blocklet/js-sdk":"^1.16.30","@emotion/react":"^11.10.4","@emotion/styled":"^11.10.4","@mui/material":"^5.15.0",react:"^18.2.0","react-dom":"^18.2.0"},publishConfig={access:"public"},devDependencies={"@babel/cli":"^7.19.3","@babel/core":"^7.19.3","@babel/preset-env":"^7.19.3","@babel/preset-react":"^7.18.6","eslint-plugin-react-hooks":"^4.6.0",glob:"^10.3.3",jest:"^29.7.0"},gitHead="10a7e8065f17c565540a428069fd20e30760848f",pkg={name,version:version$2,description,keywords,author,homepage,license,main:main$1,module:module$1,repository,scripts,bugs,dependencies,peerDependencies,publishConfig,devDependencies,gitHead},DEFAULT_TIMEOUT$1=5*60,DEFAULT_WINDOW_TIMEOUT=30*60,AUTH_SERVICE_PREFIX="/.well-known/service",SESSION_TOKEN_STORAGE_KEY="login_token",REFRESH_TOKEN_STORAGE_KEY="refresh_token",RELAY_SOCKET_PREFIX="/.well-known/service",API_DID_PREFIX="/api/did",DEFAULT_NAME="DID Connect",DID_CONNECT_URL_PARAMS_NAME="__did-connect__";class NotOpenError extends Error{constructor(){super("Failed to open popup")}}const providerName="wallet_url",getWebWalletUrl$1=()=>{var a,j;return window.localStorage.getItem(providerName)||((a=window.env)==null?void 0:a.webWalletUrl)||((j=window.blocklet)==null?void 0:j.webWalletUrl)||"https://web.abtwallet.io/"},checkSameProtocol=a=>{const{protocol:j}=window.location;let _e="";try{_e=new URL(a).protocol}catch{_e=""}return j===_e},{version:version$1}=pkg;function unescape$1(a){return(a+"===".slice((a.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/")}function escape$1(a){return a.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const decodeConnectUrl=a=>window.atob(unescape$1(a)),parseTokenFromConnectUrl=a=>{const j=new URL(a),_e=decodeURIComponent(j.searchParams.get("url"));return new URL(_e).searchParams.get("_t_")},getAppId$1=(a,j)=>{var et,nt,tt;let _e=j==null?void 0:j.publisher;if(!_e){if(a!=null&&a.agentDid)return a.agentDid;_e=a==null?void 0:a.publisher}return _e?_e.replace("did:abt:",""):((et=globalThis.blocklet)==null?void 0:et.appPid)||((nt=globalThis.blocklet)==null?void 0:nt.appId)||((tt=globalThis.env)==null?void 0:tt.appId)||""},getConnectedInfo=a=>{var _e;const j={connected_did:a.did||"",connected_pk:a.pk||"",connected_app:getAppId$1(a.appInfo,a.memberAppInfo)};return(_e=a==null?void 0:a.connectedWallet)!=null&&_e.os&&(j.connected_wallet_os=a.connectedWallet.os),j},updateConnectedInfo=(a,j=!1)=>{if(!a)return;j||(a=getConnectedInfo(a));const _e=getCookieOptions({expireInDays:7,returnDomain:!1});isNil$1(a.connected_did)||Cookie.set("connected_did",a.connected_did,_e),isNil$1(a.connected_pk)||Cookie.set("connected_pk",a.connected_pk,_e),isNil$1(a.connected_app)||Cookie.set("connected_app",a.connected_app,_e),a.connected_wallet_os&&Cookie.set("connected_wallet_os",a.connected_wallet_os,_e)},encodeKey=a=>escape$1(Buffer$1$1.from(a).toString("base64")),decodeKey=a=>Uint8Array.from(Buffer$1$1.from(unescape$1(a),"base64")),decrypt$1=(a,j,_e)=>{const et=SealedBox.open(Uint8Array.from(Buffer$1$1.from(a,"base64")),decodeKey(j),decodeKey(_e));return JSON.parse(Buffer$1$1.from(et).toString("utf8"))},encrypt=(a,j)=>Buffer$1$1.from(SealedBox.seal(Uint8Array.from(Buffer$1$1.from(a)),decodeKey(j))).toString("base64"),parseNextWorkflow=(a,j="_t_")=>{const _e=new URL(a),et={baseUrl:_e.origin,prefix:_e.pathname.replace(/\/auth$/,""),token:_e.searchParams.get(j)||""};if(!et.baseUrl)throw new Error("Invalid next workflow: origin empty");if(!et.token)throw new Error("Invalid next workflow: token not found");return et},getApiErrorMessage=(a,j)=>{var et;let _e=a.message;return a.response&&(_e=((et=a.response)==null?void 0:et.data)||j),_e},createAxios=(a={},{lazy:j=!1,lazyTime:_e=300}={})=>createAxios$2({...a,headers:{...a.headers,"x-did-connect-version":version$1}},{lazy:j,lazyTime:_e}),sleep$1=(a=0)=>new Promise(j=>{setTimeout(()=>{j()},a)});function getBrowserLang(){if(typeof window>"u")return null;const a=window.navigator.languages&&window.navigator.languages[0]||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage||window.navigator.systemLanguage||null;return{"zh-CN":"zh","zh-TW":"zh",zh:"zh",en:"en"}[a]||"en"}async function decodeUrlParams(){const a=window.location.href;try{const j=new URL(a),_e=j.searchParams.get(DID_CONNECT_URL_PARAMS_NAME);if(_e){j.searchParams.delete(DID_CONNECT_URL_PARAMS_NAME);const et=JSON.parse(Buffer$1$1.from(_e,"base64").toString("utf-8"));if(isString$2(et.forceConnected)&&isUndefined$2(et.sourceAppPid)){const tt=await new BlockletSDK().user.getUserPublicInfo({did:et.forceConnected});isUndefined$2(tt==null?void 0:tt.sourceAppPid)||(et.sourceAppPid=tt.sourceAppPid)}return{params:et,url:j.href}}}catch{console.warn("Failed to decode did-connect url params")}return{params:null,url:a}}const openPopup=(a,{width:j=600,height:_e=700,name:et="did-connect:popup"}={})=>{const nt=window.screenX+(window.innerWidth-j)/2,tt=window.screenY+(window.innerHeight-_e)/2,ot=[`left=${nt}`,`top=${tt}`,`width=${j}`,`height=${_e}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],ct=window.open("",et,ot.join(","));if(ct===null)throw new NotOpenError;return ct.location.href=a,ct},runPopup=a=>new Promise((j,_e)=>{let et,nt;const tt=({data:ot})=>{if(ot&&ot.type==="authorization_response"){if(ot!=null&&ot.error){console.error(ot.error);return}setTimeout(()=>{var ct;(ct=a.popup)==null||ct.close(),clearTimeout(nt),clearInterval(et),window.removeEventListener("message",tt,!1),j(ot)},a.closeTimeout||0)}};nt=setTimeout(()=>{clearInterval(et),_e(new Error("Timeout")),window.removeEventListener("message",tt,!1)},(a.timeoutInSeconds||DEFAULT_WINDOW_TIMEOUT)*1e3),et=setInterval(()=>{var ot;(ot=a.popup)!=null&&ot.closed&&(clearInterval(et),clearTimeout(nt),window.removeEventListener("message",tt,!1),_e(new Error("Popup closed")))},1e3),window.addEventListener("message",tt)});function WindowFocusAware({callback:a}){return reactExports.useEffect(()=>(window.addEventListener("focus",a),()=>{window.removeEventListener("focus",a)}),[]),null}WindowFocusAware.propTypes={callback:PropTypes.func.isRequired};function CardSelector({list:a,width:j,height:_e,cardSpace:et,onSelect:nt,defaultIndex:tt}){const[ot,ct]=reactExports.useState(0),[ft,ht]=reactExports.useState(0),dt=reactExports.useRef(null),yt=Rt=>{if(Rt<0||Rt>a.length-1)return;ct(Rt);const It=dt.current.clientWidth;ht(Rt*(j+et)-(It-j)/2+et*.5),nt(Rt)};reactExports.useEffect(()=>{yt(tt);const Rt=It=>It.preventDefault();dt.current.addEventListener("touchmove",Rt,{passive:!1})},[]);let Tt;const St=Rt=>{Tt=Rt.touches[0].clientX},At=Rt=>{const It=Rt.changedTouches[0],Ct=Tt-It.clientX;Math.abs(Ct)>60&&(Ct>0?yt(ot+1):yt(ot-1))};return jsxRuntimeExports.jsx(Contianer,{ref:dt,onTouchStart:St,onTouchEnd:At,children:jsxRuntimeExports.jsx("div",{className:"card-container",style:{transform:`translate(${-ft}px, 0)`},children:a.map((Rt,It)=>Rt instanceof Function?jsxRuntimeExports.jsx("div",{className:`card-item ${It===ot?"selected":""}`,style:{width:j,height:_e,margin:et/2},onClick:()=>yt(It),children:Rt(It)},It):jsxRuntimeExports.jsx("div",{className:`card-item ${It===ot?"selected":""}`,style:{width:j,height:_e,margin:et/2},onClick:()=>yt(It),children:jsxRuntimeExports.jsx("img",{src:Rt.src,alt:Rt.name})},It))})})}const Contianer=newStyled.div`
432
+ `+new Array(a.length+4).join(" "):nt<j.length-2&&(et+=" ")}console.log(et)}function testSpeed(a,j,_e){let et=new Date().getTime();const nt=new Uint8Array(j);for(let ot=0;ot<j;ot++)nt[ot]=ot%256;const tt=new Date().getTime();console.log("Generated random input in "+(tt-et)+"ms"),et=tt;for(let ot=0;ot<_e;ot++){const ct=a(nt),ft=new Date().getTime(),ht=ft-et;et=ft,console.log("Hashed in "+ht+"ms: "+ct.substring(0,20)+"..."),console.log(Math.round(j/(1<<20)/(ht/1e3)*100)/100+" MB PER SECOND")}}var util$6={normalizeInput,toHex,debugPrint,testSpeed};const util$5=util$6;function ADD64AA(a,j,_e){const et=a[j]+a[_e];let nt=a[j+1]+a[_e+1];et>=4294967296&&nt++,a[j]=et,a[j+1]=nt}function ADD64AC(a,j,_e,et){let nt=a[j]+_e;_e<0&&(nt+=4294967296);let tt=a[j+1]+et;nt>=4294967296&&tt++,a[j]=nt,a[j+1]=tt}function B2B_GET32(a,j){return a[j]^a[j+1]<<8^a[j+2]<<16^a[j+3]<<24}function B2B_G(a,j,_e,et,nt,tt){const ot=m$1[nt],ct=m$1[nt+1],ft=m$1[tt],ht=m$1[tt+1];ADD64AA(v,a,j),ADD64AC(v,a,ot,ct);let dt=v[et]^v[a],yt=v[et+1]^v[a+1];v[et]=yt,v[et+1]=dt,ADD64AA(v,_e,et),dt=v[j]^v[_e],yt=v[j+1]^v[_e+1],v[j]=dt>>>24^yt<<8,v[j+1]=yt>>>24^dt<<8,ADD64AA(v,a,j),ADD64AC(v,a,ft,ht),dt=v[et]^v[a],yt=v[et+1]^v[a+1],v[et]=dt>>>16^yt<<16,v[et+1]=yt>>>16^dt<<16,ADD64AA(v,_e,et),dt=v[j]^v[_e],yt=v[j+1]^v[_e+1],v[j]=yt>>>31^dt<<1,v[j+1]=dt>>>31^yt<<1}const BLAKE2B_IV32=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),SIGMA8=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],SIGMA82=new Uint8Array(SIGMA8.map(function(a){return a*2})),v=new Uint32Array(32),m$1=new Uint32Array(32);function blake2bCompress(a,j){let _e=0;for(_e=0;_e<16;_e++)v[_e]=a.h[_e],v[_e+16]=BLAKE2B_IV32[_e];for(v[24]=v[24]^a.t,v[25]=v[25]^a.t/4294967296,j&&(v[28]=~v[28],v[29]=~v[29]),_e=0;_e<32;_e++)m$1[_e]=B2B_GET32(a.b,4*_e);for(_e=0;_e<12;_e++)B2B_G(0,8,16,24,SIGMA82[_e*16+0],SIGMA82[_e*16+1]),B2B_G(2,10,18,26,SIGMA82[_e*16+2],SIGMA82[_e*16+3]),B2B_G(4,12,20,28,SIGMA82[_e*16+4],SIGMA82[_e*16+5]),B2B_G(6,14,22,30,SIGMA82[_e*16+6],SIGMA82[_e*16+7]),B2B_G(0,10,20,30,SIGMA82[_e*16+8],SIGMA82[_e*16+9]),B2B_G(2,12,22,24,SIGMA82[_e*16+10],SIGMA82[_e*16+11]),B2B_G(4,14,16,26,SIGMA82[_e*16+12],SIGMA82[_e*16+13]),B2B_G(6,8,18,28,SIGMA82[_e*16+14],SIGMA82[_e*16+15]);for(_e=0;_e<16;_e++)a.h[_e]=a.h[_e]^v[_e]^v[_e+16]}const parameterBlock=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function blake2bInit(a,j,_e,et){if(a===0||a>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(j&&j.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(_e&&_e.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(et&&et.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const nt={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:a};parameterBlock.fill(0),parameterBlock[0]=a,j&&(parameterBlock[1]=j.length),parameterBlock[2]=1,parameterBlock[3]=1,_e&&parameterBlock.set(_e,32),et&&parameterBlock.set(et,48);for(let tt=0;tt<16;tt++)nt.h[tt]=BLAKE2B_IV32[tt]^B2B_GET32(parameterBlock,tt*4);return j&&(blake2bUpdate(nt,j),nt.c=128),nt}function blake2bUpdate(a,j){for(let _e=0;_e<j.length;_e++)a.c===128&&(a.t+=a.c,blake2bCompress(a,!1),a.c=0),a.b[a.c++]=j[_e]}function blake2bFinal(a){for(a.t+=a.c;a.c<128;)a.b[a.c++]=0;blake2bCompress(a,!0);const j=new Uint8Array(a.outlen);for(let _e=0;_e<a.outlen;_e++)j[_e]=a.h[_e>>2]>>8*(_e&3);return j}function blake2b(a,j,_e,et,nt){_e=_e||64,a=util$5.normalizeInput(a),et&&(et=util$5.normalizeInput(et)),nt&&(nt=util$5.normalizeInput(nt));const tt=blake2bInit(_e,j,et,nt);return blake2bUpdate(tt,a),blake2bFinal(tt)}function blake2bHex(a,j,_e,et,nt){const tt=blake2b(a,j,_e,et,nt);return util$5.toHex(tt)}var blake2b_1={blake2b,blake2bHex,blake2bInit,blake2bUpdate,blake2bFinal};const blake=getDefaultExportFromCjs$1(blake2b_1);function nonce(a,j){var _e=blake.blake2bInit(tweetnacl.box.nonceLength,null);return blake.blake2bUpdate(_e,a),blake.blake2bUpdate(_e,j),blake.blake2bFinal(_e)}function zero(a){for(var j=0;j<a.length;j++)a[j]=0}function seal(a,j){var _e=new Uint8Array(overheadLength+a.length),et=tweetnacl.box.keyPair();_e.set(et.publicKey);var nt=nonce(et.publicKey,j),tt=tweetnacl.box(a,nt,j,et.secretKey);return _e.set(tt,et.publicKey.length),zero(et.secretKey),_e}function open(a,j,_e){var et=a.subarray(0,tweetnacl.box.publicKeyLength),nt=nonce(et,j),tt=a.subarray(tweetnacl.box.publicKeyLength);return tweetnacl.box.open(tt,nt,et,_e)}const SealedBox={seal,open};function isNil(a){return a==null}var isNil_1=isNil;const isNil$1=getDefaultExportFromCjs$1(isNil_1),name="@arcblock/did-connect",version$2="2.10.57",description="Client side library to work with DID Connect by ArcBlock.",keywords=["react","arcblock","component"],author="wangshijun<wangshijun2010@gmail.com>",homepage="https://github.com/ArcBlock/ux#readme",license="Apache-2.0",main$1="lib/index.js",module$1="lib/index.js",repository={type:"git",url:"git+https://github.com/ArcBlock/ux.git"},scripts={lint:"eslint src tests --ext js --ext jsx","lint:fix":"npm run lint -- --fix",build:"babel --config-file ./babel.config.es.js src --out-dir lib --copy-files --no-copy-ignored",autoexports:"node tools/auto-exports.js",watch:"babel --config-file ./babel.config.es.js src --out-dir lib -w --copy-files --no-copy-ignored",precommit:"CI=1 npm run lint",prepush:"CI=1 npm run lint",prepublish:"npm run build",test:"node tools/jest.js",coverage:"npm run test -- --coverage"},bugs={url:"https://github.com/ArcBlock/ux/issues"},dependencies={"@arcblock/bridge":"^2.10.57","@arcblock/icons":"^2.10.57","@arcblock/react-hooks":"^2.10.57","@arcblock/ws":"^1.18.137","@fontsource/inter":"^5.0.16","@iconify-icons/logos":"^1.2.36","@iconify-icons/material-symbols":"^1.2.58","@iconify/react":"^4.1.1",ahooks:"^3.7.10",axios:"^1.7.5",buffer:"^6.0.3","core-js":"^3.25.5",eventemitter3:"^5.0.1","js-cookie":"^2.2.1","jwt-decode":"^3.1.2",lodash:"^4.17.21","mdi-material-ui":"^7.5.0","p-queue":"^6.6.2","p-wait-for":"^5.0.2","path-to-regexp":"^1.8.0",semver:"^7.6.3",tweetnacl:"^1.0.3","tweetnacl-sealedbox-js":"^1.2.0",ufo:"^1.5.3"},peerDependencies={"@arcblock/ux":"^2.9.79","@blocklet/js-sdk":"^1.16.30","@emotion/react":"^11.10.4","@emotion/styled":"^11.10.4","@mui/material":"^5.15.0",react:"^18.2.0","react-dom":"^18.2.0"},publishConfig={access:"public"},devDependencies={"@babel/cli":"^7.19.3","@babel/core":"^7.19.3","@babel/preset-env":"^7.19.3","@babel/preset-react":"^7.18.6","eslint-plugin-react-hooks":"^4.6.0",glob:"^10.3.3",jest:"^29.7.0"},gitHead="cd0308705e9e6f81cabc9cf41e5d63b324f63be7",pkg={name,version:version$2,description,keywords,author,homepage,license,main:main$1,module:module$1,repository,scripts,bugs,dependencies,peerDependencies,publishConfig,devDependencies,gitHead},DEFAULT_TIMEOUT$1=5*60,DEFAULT_WINDOW_TIMEOUT=30*60,AUTH_SERVICE_PREFIX="/.well-known/service",SESSION_TOKEN_STORAGE_KEY="login_token",REFRESH_TOKEN_STORAGE_KEY="refresh_token",RELAY_SOCKET_PREFIX="/.well-known/service",API_DID_PREFIX="/api/did",DEFAULT_NAME="DID Connect",DID_CONNECT_URL_PARAMS_NAME="__did-connect__";class NotOpenError extends Error{constructor(){super("Failed to open popup")}}const providerName="wallet_url",getWebWalletUrl$1=()=>{var a,j;return window.localStorage.getItem(providerName)||((a=window.env)==null?void 0:a.webWalletUrl)||((j=window.blocklet)==null?void 0:j.webWalletUrl)||"https://web.abtwallet.io/"},checkSameProtocol=a=>{const{protocol:j}=window.location;let _e="";try{_e=new URL(a).protocol}catch{_e=""}return j===_e},{version:version$1}=pkg;function unescape$1(a){return(a+"===".slice((a.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/")}function escape$1(a){return a.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const decodeConnectUrl=a=>window.atob(unescape$1(a)),parseTokenFromConnectUrl=a=>{const j=new URL(a),_e=decodeURIComponent(j.searchParams.get("url"));return new URL(_e).searchParams.get("_t_")},getAppId$1=(a,j)=>{var et,nt,tt;let _e=j==null?void 0:j.publisher;if(!_e){if(a!=null&&a.agentDid)return a.agentDid;_e=a==null?void 0:a.publisher}return _e?_e.replace("did:abt:",""):((et=globalThis.blocklet)==null?void 0:et.appPid)||((nt=globalThis.blocklet)==null?void 0:nt.appId)||((tt=globalThis.env)==null?void 0:tt.appId)||""},getConnectedInfo=a=>{var _e;const j={connected_did:a.did||"",connected_pk:a.pk||"",connected_app:getAppId$1(a.appInfo,a.memberAppInfo)};return(_e=a==null?void 0:a.connectedWallet)!=null&&_e.os&&(j.connected_wallet_os=a.connectedWallet.os),j},updateConnectedInfo=(a,j=!1)=>{if(!a)return;j||(a=getConnectedInfo(a));const _e=getCookieOptions({expireInDays:7,returnDomain:!1});isNil$1(a.connected_did)||Cookie.set("connected_did",a.connected_did,_e),isNil$1(a.connected_pk)||Cookie.set("connected_pk",a.connected_pk,_e),isNil$1(a.connected_app)||Cookie.set("connected_app",a.connected_app,_e),a.connected_wallet_os&&Cookie.set("connected_wallet_os",a.connected_wallet_os,_e)},encodeKey=a=>escape$1(Buffer$1$1.from(a).toString("base64")),decodeKey=a=>Uint8Array.from(Buffer$1$1.from(unescape$1(a),"base64")),decrypt$1=(a,j,_e)=>{const et=SealedBox.open(Uint8Array.from(Buffer$1$1.from(a,"base64")),decodeKey(j),decodeKey(_e));return JSON.parse(Buffer$1$1.from(et).toString("utf8"))},encrypt=(a,j)=>Buffer$1$1.from(SealedBox.seal(Uint8Array.from(Buffer$1$1.from(a)),decodeKey(j))).toString("base64"),parseNextWorkflow=(a,j="_t_")=>{const _e=new URL(a),et={baseUrl:_e.origin,prefix:_e.pathname.replace(/\/auth$/,""),token:_e.searchParams.get(j)||""};if(!et.baseUrl)throw new Error("Invalid next workflow: origin empty");if(!et.token)throw new Error("Invalid next workflow: token not found");return et},getApiErrorMessage=(a,j)=>{var et;let _e=a.message;return a.response&&(_e=((et=a.response)==null?void 0:et.data)||j),_e},createAxios=(a={},{lazy:j=!1,lazyTime:_e=300}={})=>createAxios$2({...a,headers:{...a.headers,"x-did-connect-version":version$1}},{lazy:j,lazyTime:_e}),sleep$1=(a=0)=>new Promise(j=>{setTimeout(()=>{j()},a)});function getBrowserLang(){if(typeof window>"u")return null;const a=window.navigator.languages&&window.navigator.languages[0]||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage||window.navigator.systemLanguage||null;return{"zh-CN":"zh","zh-TW":"zh",zh:"zh",en:"en"}[a]||"en"}async function decodeUrlParams(){const a=window.location.href;try{const j=new URL(a),_e=j.searchParams.get(DID_CONNECT_URL_PARAMS_NAME);if(_e){j.searchParams.delete(DID_CONNECT_URL_PARAMS_NAME);const et=JSON.parse(Buffer$1$1.from(_e,"base64").toString("utf-8"));if(isString$2(et.forceConnected)&&isUndefined$2(et.sourceAppPid)){const tt=await new BlockletSDK().user.getUserPublicInfo({did:et.forceConnected});isUndefined$2(tt==null?void 0:tt.sourceAppPid)||(et.sourceAppPid=tt.sourceAppPid)}return{params:et,url:j.href}}}catch{console.warn("Failed to decode did-connect url params")}return{params:null,url:a}}const openPopup=(a,{width:j=600,height:_e=700,name:et="did-connect:popup"}={})=>{const nt=window.screenX+(window.innerWidth-j)/2,tt=window.screenY+(window.innerHeight-_e)/2,ot=[`left=${nt}`,`top=${tt}`,`width=${j}`,`height=${_e}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],ct=window.open("",et,ot.join(","));if(ct===null)throw new NotOpenError;return ct.location.href=a,ct},runPopup=a=>new Promise((j,_e)=>{let et,nt;const tt=({data:ot})=>{if(ot&&ot.type==="authorization_response"){if(ot!=null&&ot.error){console.error(ot.error);return}setTimeout(()=>{var ct;(ct=a.popup)==null||ct.close(),clearTimeout(nt),clearInterval(et),window.removeEventListener("message",tt,!1),j(ot)},a.closeTimeout||0)}};nt=setTimeout(()=>{clearInterval(et),_e(new Error("Timeout")),window.removeEventListener("message",tt,!1)},(a.timeoutInSeconds||DEFAULT_WINDOW_TIMEOUT)*1e3),et=setInterval(()=>{var ot;(ot=a.popup)!=null&&ot.closed&&(clearInterval(et),clearTimeout(nt),window.removeEventListener("message",tt,!1),_e(new Error("Popup closed")))},1e3),window.addEventListener("message",tt)});function WindowFocusAware({callback:a}){return reactExports.useEffect(()=>(window.addEventListener("focus",a),()=>{window.removeEventListener("focus",a)}),[]),null}WindowFocusAware.propTypes={callback:PropTypes.func.isRequired};function CardSelector({list:a,width:j,height:_e,cardSpace:et,onSelect:nt,defaultIndex:tt}){const[ot,ct]=reactExports.useState(0),[ft,ht]=reactExports.useState(0),dt=reactExports.useRef(null),yt=Rt=>{if(Rt<0||Rt>a.length-1)return;ct(Rt);const It=dt.current.clientWidth;ht(Rt*(j+et)-(It-j)/2+et*.5),nt(Rt)};reactExports.useEffect(()=>{yt(tt);const Rt=It=>It.preventDefault();dt.current.addEventListener("touchmove",Rt,{passive:!1})},[]);let Tt;const St=Rt=>{Tt=Rt.touches[0].clientX},At=Rt=>{const It=Rt.changedTouches[0],Ct=Tt-It.clientX;Math.abs(Ct)>60&&(Ct>0?yt(ot+1):yt(ot-1))};return jsxRuntimeExports.jsx(Contianer,{ref:dt,onTouchStart:St,onTouchEnd:At,children:jsxRuntimeExports.jsx("div",{className:"card-container",style:{transform:`translate(${-ft}px, 0)`},children:a.map((Rt,It)=>Rt instanceof Function?jsxRuntimeExports.jsx("div",{className:`card-item ${It===ot?"selected":""}`,style:{width:j,height:_e,margin:et/2},onClick:()=>yt(It),children:Rt(It)},It):jsxRuntimeExports.jsx("div",{className:`card-item ${It===ot?"selected":""}`,style:{width:j,height:_e,margin:et/2},onClick:()=>yt(It),children:jsxRuntimeExports.jsx("img",{src:Rt.src,alt:Rt.name})},It))})})}const Contianer=newStyled.div`
433
433
  overflow: hidden;
434
434
  mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
435
435
  overflow: hidden;
@@ -463,12 +463,12 @@ ${et.length}`,ot=Buffer$3.from(tt),ct=Buffer$3.concat([ot,nt]);return hash_1.def
463
463
  }
464
464
  }
465
465
  }
466
- `;CardSelector.propTypes={list:PropTypes.array,width:PropTypes.number,height:PropTypes.number,cardSpace:PropTypes.number,onSelect:PropTypes.func,defaultIndex:PropTypes.number};CardSelector.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:noop$7,defaultIndex:0};var baseKeys=_baseKeys,getTag$1=_getTag,isArguments$1=isArguments_1,isArray$8=isArray_1,isArrayLike$2=isArrayLike_1,isBuffer$1=isBufferExports,isPrototype=_isPrototype,isTypedArray$1=isTypedArray_1,mapTag$1="[object Map]",setTag$1="[object Set]",objectProto$4=Object.prototype,hasOwnProperty$7=objectProto$4.hasOwnProperty;function isEmpty(a){if(a==null)return!0;if(isArrayLike$2(a)&&(isArray$8(a)||typeof a=="string"||typeof a.splice=="function"||isBuffer$1(a)||isTypedArray$1(a)||isArguments$1(a)))return!a.length;var j=getTag$1(a);if(j==mapTag$1||j==setTag$1)return!a.size;if(isPrototype(a))return!baseKeys(a).length;for(var _e in a)if(hasOwnProperty$7.call(a,_e))return!1;return!0}var isEmpty_1=isEmpty;const isEmpty$1=getDefaultExportFromCjs$1(isEmpty_1);function getMaster(a=window.blocklet){var _e;return(((_e=a==null?void 0:a.settings)==null?void 0:_e.federated)||{}).master}function getConfig(a=window.blocklet){var _e;return(((_e=a==null?void 0:a.settings)==null?void 0:_e.federated)||{}).config}function getFederatedEnabled(a=window.blocklet){const j=getConfig(a);return(j==null?void 0:j.status)==="approved"}function getFederatedApp(a=window.blocklet){const j=getMaster(a);return!isEmpty$1(j)?{appId:j.appId,appName:j.appName,appDescription:j.appDescription,appLogo:j.appLogo,appPid:j.appPid,appUrl:j.appUrl,version:j.version,sourceAppPid:j.appPid,provider:"wallet"}:null}function getCurrentApp(a=window.blocklet){return a?{appId:a.appId,appName:a.appName,appDescription:a.appDescription,appLogo:a.appLogo,appPid:a.appPid,appUrl:a.appUrl,version:a.version,sourceAppPid:null,provider:"wallet"}:window.env?(a=window.env,{appId:a.appId,appName:a.appName,appDescription:a.appDescription,appUrl:a.baseUrl,sourceAppPid:null,provider:"wallet",type:"server"}):null}function getApps(a){const j=[],_e=getFederatedApp(a),et=getCurrentApp(a),nt=getFederatedEnabled(a);return et&&j.push(et),_e&&(_e==null?void 0:_e.appId)!==(et==null?void 0:et.appId)&&nt&&j.push(_e),j.reverse()}async function getBlockletData(a){try{const j=new URL("__blocklet__.js",a);return j.searchParams.set("type","json"),await(await fetch(j.href)).json()}catch(j){return console.error(`Failed to get blocklet data: ${a}`,j),null}}var Guest=function a(j){return jsxRuntimeExports.jsxs("svg",{...j,children:[jsxRuntimeExports.jsx("rect",{x:"1",y:"1",width:"418",height:"473",rx:"19",fill:"#FBFBFB"}),jsxRuntimeExports.jsx("g",{clipPath:"url(#a)",children:jsxRuntimeExports.jsx("path",{opacity:".7",fill:"#DDD",d:"M0 100h420v168H0z"})}),jsxRuntimeExports.jsx("circle",{cx:"210",cy:"248",r:"60",fill:"#C4C5CA"}),jsxRuntimeExports.jsx("path",{d:"M181 284l7.2-7.2 7.2 7.2 7.2-10.8 7.2 10.8 7.2-10.8 7.2 10.8 7.2-7.2 7.2 7.2v-43.2c0-15.907-12.893-28.8-28.8-28.8S181 224.893 181 240.8V284z",fill:"#C4C5CA",stroke:"#fff",strokeWidth:"5",strokeLinejoin:"round"}),jsxRuntimeExports.jsx("path",{d:"M200.797 240.812h3.6-3.6zm21.6 0h3.6-3.6z",fill:"#C4C5CA"}),jsxRuntimeExports.jsx("path",{d:"M200.797 240.812h3.6m18 0h3.6",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntimeExports.jsx("path",{opacity:".7",d:"M24 29h189v40H24V29z",fill:"#C4C5CA"}),jsxRuntimeExports.jsx("path",{opacity:".42",fill:"#C4C5CA",d:"M313 24h83v14h-83z"}),jsxRuntimeExports.jsx("path",{opacity:".7",fill:"#C4C5CA",d:"M291 50h105v26H291z"}),jsxRuntimeExports.jsx("path",{d:"M177.388 388.4c-1.733 0-3.32-.213-4.76-.64a12.355 12.355 0 0 1-3.8-1.88 15.072 15.072 0 0 1-2.96-3l3.76-4.28c1.307 1.813 2.6 3.053 3.88 3.72 1.307.64 2.72.96 4.24.96.827 0 1.56-.107 2.2-.32.667-.24 1.187-.573 1.56-1 .373-.427.56-.933.56-1.52 0-.427-.093-.813-.28-1.16a2.764 2.764 0 0 0-.8-.96 5.139 5.139 0 0 0-1.24-.76 8.666 8.666 0 0 0-1.6-.6 12.728 12.728 0 0 0-1.92-.44c-1.493-.347-2.8-.76-3.92-1.24-1.12-.507-2.053-1.12-2.8-1.84a7.456 7.456 0 0 1-1.68-2.52c-.347-.933-.52-1.987-.52-3.16 0-1.2.267-2.307.8-3.32a8.187 8.187 0 0 1 2.2-2.68 10.68 10.68 0 0 1 3.28-1.72c1.253-.4 2.573-.6 3.96-.6 1.707 0 3.2.2 4.48.6 1.28.373 2.387.92 3.32 1.64.96.72 1.76 1.6 2.4 2.64l-3.8 3.68a9.48 9.48 0 0 0-1.84-1.88 6.482 6.482 0 0 0-2.12-1.12 6.84 6.84 0 0 0-2.32-.4c-.88 0-1.64.12-2.28.36-.64.213-1.147.533-1.52.96-.347.427-.52.947-.52 1.56 0 .48.12.907.36 1.28s.587.707 1.04 1c.453.267 1 .507 1.64.72.64.213 1.347.4 2.12.56 1.467.293 2.787.68 3.96 1.16 1.173.48 2.173 1.067 3 1.76a6.784 6.784 0 0 1 1.96 2.4c.453.907.68 1.933.68 3.08 0 1.893-.453 3.507-1.36 4.84-.907 1.333-2.16 2.36-3.76 3.08-1.6.693-3.467 1.04-5.6 1.04zm17.394-.4v-26.52h5.68V388h-5.68zm-3.96-16.08v-5.08h13.96v5.08h-13.96zm25.387 16.48c-1.76 0-3.346-.48-4.76-1.44-1.413-.96-2.533-2.267-3.36-3.92-.826-1.653-1.24-3.547-1.24-5.68 0-2.133.414-4.013 1.24-5.64.854-1.653 2-2.947 3.44-3.88 1.44-.96 3.08-1.44 4.92-1.44 1.04 0 1.987.16 2.84.48.88.293 1.64.707 2.28 1.24a7.831 7.831 0 0 1 1.68 1.84c.454.693.774 1.44.96 2.24l-1.2-.2v-5.16h5.64V388h-5.72v-5.08l1.28-.12a6.81 6.81 0 0 1-1.04 2.12 8.213 8.213 0 0 1-1.8 1.8c-.693.507-1.48.92-2.36 1.24-.88.293-1.813.44-2.8.44zm1.56-4.92c1.067 0 2-.253 2.8-.76.8-.507 1.414-1.213 1.84-2.12.454-.933.68-2.013.68-3.24 0-1.2-.226-2.253-.68-3.16-.426-.907-1.04-1.613-1.84-2.12-.8-.533-1.733-.8-2.8-.8-1.04 0-1.96.267-2.76.8-.773.507-1.386 1.213-1.84 2.12-.453.907-.68 1.96-.68 3.16 0 1.227.227 2.307.68 3.24.454.907 1.067 1.613 1.84 2.12.8.507 1.72.76 2.76.76zm19.066 13.72l4.64-10.88.08 3.28-10.32-22.76h6.44l5.16 12.2c.213.453.413.987.6 1.6.213.587.387 1.16.52 1.72l-.96.4c.16-.453.347-.973.56-1.56.213-.587.427-1.213.64-1.88l4.44-12.48h6.48l-8.88 21.16-3.64 9.2h-5.76zM92.8 438l10.96-28h5.36l10.92 28h-6.16l-5.64-15.08c-.16-.427-.36-.973-.6-1.64l-.68-2.12-.68-2.12a27.95 27.95 0 0 1-.48-1.72l1.08-.04c-.16.613-.346 1.253-.56 1.92-.186.64-.386 1.307-.6 2-.213.667-.44 1.32-.68 1.96-.24.64-.466 1.267-.68 1.88L98.72 438H92.8zm5.08-5.88l1.96-4.84h12.84l2 4.84h-16.8zm25.292 5.88v-21.16h5.44l.16 4.32-1.12.48c.293-.96.813-1.827 1.56-2.6a8.83 8.83 0 0 1 2.76-1.92 8.1 8.1 0 0 1 3.36-.72c1.6 0 2.933.32 4 .96 1.093.64 1.907 1.613 2.44 2.92.56 1.28.84 2.867.84 4.76V438h-5.68v-12.52c0-.96-.133-1.76-.4-2.4-.267-.64-.68-1.107-1.24-1.4-.533-.32-1.2-.453-2-.4-.64 0-1.24.107-1.8.32a3.94 3.94 0 0 0-1.4.84c-.373.373-.68.8-.92 1.28-.213.48-.32 1-.32 1.56V438h-5.68zm34.723.4c-2.16 0-4.093-.467-5.8-1.4a10.853 10.853 0 0 1-4-3.92c-.96-1.653-1.44-3.547-1.44-5.68 0-2.133.48-4.013 1.44-5.64a10.853 10.853 0 0 1 4-3.92c1.707-.96 3.64-1.44 5.8-1.44 2.133 0 4.04.48 5.72 1.44 1.707.96 3.04 2.267 4 3.92.96 1.627 1.44 3.507 1.44 5.64 0 2.133-.48 4.027-1.44 5.68-.96 1.653-2.293 2.96-4 3.92-1.68.933-3.587 1.4-5.72 1.4zm0-4.96c1.04 0 1.973-.253 2.8-.76a5.371 5.371 0 0 0 1.92-2.16c.48-.933.72-1.973.72-3.12 0-1.173-.24-2.213-.72-3.12-.453-.933-1.093-1.653-1.92-2.16-.827-.533-1.76-.8-2.8-.8-1.067 0-2.013.267-2.84.8a5.673 5.673 0 0 0-1.96 2.16c-.48.907-.707 1.947-.68 3.12-.027 1.147.2 2.187.68 3.12a5.673 5.673 0 0 0 1.96 2.16c.827.507 1.773.76 2.84.76zm15.433 4.56v-21.16h5.44l.16 4.32-1.12.48c.294-.96.814-1.827 1.56-2.6a8.853 8.853 0 0 1 2.76-1.92 8.1 8.1 0 0 1 3.36-.72c1.6 0 2.934.32 4 .96 1.094.64 1.907 1.613 2.44 2.92.56 1.28.84 2.867.84 4.76V438h-5.68v-12.52c0-.96-.133-1.76-.4-2.4-.266-.64-.68-1.107-1.24-1.4-.533-.32-1.2-.453-2-.4-.64 0-1.24.107-1.8.32a3.94 3.94 0 0 0-1.4.84c-.373.373-.68.8-.92 1.28-.213.48-.32 1-.32 1.56V438h-5.68zm27.648 9.2l4.64-10.88.08 3.28-10.32-22.76h6.44l5.16 12.2c.213.453.413.987.6 1.6.213.587.386 1.16.52 1.72l-.96.4c.16-.453.346-.973.56-1.56.213-.587.426-1.213.64-1.88l4.44-12.48h6.48l-8.88 21.16-3.64 9.2h-5.76zm21.297-9.2v-21.16h5.48l.12 4.04-.84.16c.293-.693.68-1.32 1.16-1.88.48-.56 1.04-1.04 1.68-1.44.666-.4 1.36-.707 2.08-.92.72-.24 1.44-.36 2.16-.36 1.093 0 2.08.173 2.96.52.88.347 1.626.893 2.24 1.64.613.72 1.093 1.68 1.44 2.88l-.88-.08.28-.64a6.852 6.852 0 0 1 1.32-1.72 8.178 8.178 0 0 1 1.8-1.36c.666-.4 1.36-.707 2.08-.92a7.448 7.448 0 0 1 2.12-.32c1.653 0 3.026.333 4.12 1 1.093.64 1.906 1.613 2.44 2.92.56 1.307.84 2.907.84 4.8V438h-5.68v-12.44c0-.96-.134-1.747-.4-2.36-.267-.613-.654-1.067-1.16-1.36-.507-.32-1.16-.48-1.96-.48a4.59 4.59 0 0 0-1.72.32c-.507.187-.96.467-1.36.84a3.74 3.74 0 0 0-.88 1.24 3.885 3.885 0 0 0-.32 1.6V438h-5.68v-12.48c0-.88-.147-1.627-.44-2.24-.267-.64-.654-1.12-1.16-1.44-.507-.32-1.134-.48-1.88-.48a4.59 4.59 0 0 0-1.72.32 3.608 3.608 0 0 0-1.32.84c-.374.347-.68.76-.92 1.24-.214.48-.32 1-.32 1.56V438h-5.68zm47.848.4c-2.16 0-4.093-.467-5.8-1.4a10.853 10.853 0 0 1-4-3.92c-.96-1.653-1.44-3.547-1.44-5.68 0-2.133.48-4.013 1.44-5.64a10.853 10.853 0 0 1 4-3.92c1.707-.96 3.64-1.44 5.8-1.44 2.134 0 4.04.48 5.72 1.44 1.707.96 3.04 2.267 4 3.92.96 1.627 1.44 3.507 1.44 5.64 0 2.133-.48 4.027-1.44 5.68-.96 1.653-2.293 2.96-4 3.92-1.68.933-3.586 1.4-5.72 1.4zm0-4.96c1.04 0 1.974-.253 2.8-.76a5.371 5.371 0 0 0 1.92-2.16c.48-.933.72-1.973.72-3.12 0-1.173-.24-2.213-.72-3.12-.453-.933-1.093-1.653-1.92-2.16-.826-.533-1.76-.8-2.8-.8-1.066 0-2.013.267-2.84.8a5.681 5.681 0 0 0-1.96 2.16c-.48.907-.706 1.947-.68 3.12-.026 1.147.2 2.187.68 3.12a5.681 5.681 0 0 0 1.96 2.16c.827.507 1.774.76 2.84.76zm22.714 4.96c-1.547 0-2.88-.333-4-1-1.093-.693-1.947-1.667-2.56-2.92-.587-1.28-.88-2.813-.88-4.6v-13.04h5.68v12.12c0 .96.16 1.8.48 2.52.32.693.773 1.227 1.36 1.6.587.373 1.307.56 2.16.56.613 0 1.187-.093 1.72-.28a3.993 3.993 0 0 0 1.36-.88c.373-.373.667-.813.88-1.32.213-.507.32-1.053.32-1.64v-12.68h5.68V438h-5.4l-.2-4.36 1.04-.48a7.107 7.107 0 0 1-1.6 2.68 7.981 7.981 0 0 1-2.68 1.88c-1.04.453-2.16.68-3.36.68zm25.035 0c-1.973 0-3.733-.32-5.28-.96-1.52-.667-2.747-1.573-3.68-2.72l3.52-3.04c.827.88 1.747 1.52 2.76 1.92a8.75 8.75 0 0 0 3.04.56c.4 0 .76-.04 1.08-.12.347-.107.64-.24.88-.4.24-.187.413-.4.52-.64.133-.267.2-.547.2-.84 0-.587-.24-1.053-.72-1.4-.267-.133-.68-.293-1.24-.48-.56-.213-1.28-.44-2.16-.68-1.36-.347-2.52-.747-3.48-1.2-.933-.48-1.68-1.013-2.24-1.6a6.755 6.755 0 0 1-1.12-1.8c-.24-.667-.36-1.4-.36-2.2 0-.96.213-1.827.64-2.6a6.138 6.138 0 0 1 1.76-2.04 8.66 8.66 0 0 1 2.64-1.28c.987-.32 2.027-.48 3.12-.48s2.16.133 3.2.4 2 .653 2.88 1.16a9.77 9.77 0 0 1 2.36 1.72l-3.04 3.36a9.806 9.806 0 0 0-1.64-1.24 8.324 8.324 0 0 0-1.84-.88c-.64-.213-1.213-.32-1.72-.32-.453 0-.867.04-1.24.12-.347.08-.64.2-.88.36-.24.16-.427.373-.56.64-.107.24-.16.507-.16.8 0 .293.067.573.2.84.16.267.373.493.64.68.293.16.72.347 1.28.56a30.74 30.74 0 0 0 2.36.72c1.28.347 2.36.733 3.24 1.16.907.427 1.627.92 2.16 1.48.453.48.787 1.027 1 1.64.213.613.32 1.293.32 2.04 0 1.307-.373 2.48-1.12 3.52-.72 1.013-1.72 1.813-3 2.4-1.28.56-2.72.84-4.32.84z",fill:"#25292F"}),jsxRuntimeExports.jsx("rect",{x:"1",y:"1",width:"418",height:"558",rx:"19",stroke:"#DDD",strokeWidth:"2"}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",transform:"translate(0 100)",d:"M0 0h420v168H0z"})})})]})};Guest.defaultProps={width:"420",height:"475",viewBox:"0 0 420 475",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const OAuthContext=reactExports.createContext({}),{Provider:Provider$7,Consumer:OAuthConsumer}=OAuthContext,prefix$3=`${AUTH_SERVICE_PREFIX}/api/oauth`,parseResponse=a=>a?typeof a=="string"?{sessionToken:a}:pick$2(a,["sessionToken","refreshToken","visitorId"]):{},translations$5={zh:{bindOAuth:"绑定第三方登录",bind:"绑定",noneOAuth:"未配置第三方登录方式",bindOAuthSucceed:"绑定 {provider} 成功",unbindOAuthSucceed:"解绑 {provider} 成功",loginOAuthFailed:"登录 {provider} 失败",bindOAuthFailed:"绑定 {provider} 失败",unbindOAuthFailed:"绑定 {provider} 失败",switchPassport:"切换通行证",switchPassportFailed:"切换通行证失败",switchPassportSucceed:"切换通行证成功",choosePassport:"请选择一个通行证",switch:"切换",cancel:"取消",currentRole:"当前角色:",passport:"通行证",noPassports:"没有可更换的通行证",getPassportFailed:"获取通行证失败",loginRequired:"授权请求被拒绝",cancelAuth:"取消授权"},en:{bindOAuth:"Bind third party login",bind:"Bind ",noneOAuth:"Third party login is not configured",bindOAuthSucceed:"Bind {provider} succeed",unbindOAuthSucceed:"Unbind {provider} succeed",loginOAuthFailed:"Login {provider} failed",bindOAuthFailed:"Bind {provider} failed",unbindOAuthFailed:"Unbind {provider} failed",switchPassport:"Switch passport",switchPassportFailed:"Switch passport failed",switchPassportSucceed:"Switch passport succeed",choosePassport:"Select a passport to switch",switch:"Switch",cancel:"Cancel",currentRole:"Current role: ",passport:"Passport",noPassports:"No passport to switch",getPassportFailed:"Get passports failed",loginRequired:"You have declined the authentication request",cancelAuth:"Cancel authentication"}};function OAuthProvider({children:a,locale:j,onBindOAuth:_e,onUnbindOAuth:et,onSwitchPassport:nt}){var Kt;const tt=useReactive({baseUrl:"/",bindFnSession:void 0,bindAuthLoading:!1,unbindAuthLoading:!1}),ot=useReactive({open:!1,currentUser:null,passports:[],choosePassport:void 0,reset(){ot.open=!1,ot.currentUser=null,ot.passports=[],ot.choosePassport=void 0}}),ct=useReactive({user:null,checking:!1,loading:!1,error:"",status:"",reset(){ct.loading=!1,ct.checking=!1,ct.error="",ct.status=""}}),ft=useMemoizedFn((jt,zt={})=>translate(translations$5,jt,j,"en",zt)),ht=useCreation(()=>createAxios({baseURL:joinURL(tt.baseUrl,prefix$3)}),[tt.baseUrl,prefix$3]),dt=useMemoizedFn(async()=>{if(tt.baseUrl==="/")return window.blocklet;try{if(new URL(tt.baseUrl).host===window.location.host)return window.blocklet}catch{}return await getBlockletData(tt.baseUrl)}),yt=useMemoizedFn(async({sourceAppPid:jt}={})=>{var hn,wt;const zt=await dt(),Gt=getFederatedEnabled(zt),tn=getMaster(zt);if(Gt&&(tn!=null&&tn.appPid)&&jt===(tn==null?void 0:tn.appPid)){const rt=await getBlockletData(tn.appUrl);return((hn=rt==null?void 0:rt.settings)==null?void 0:hn.oauth)||{}}return((wt=zt==null?void 0:zt.settings)==null?void 0:wt.oauth)||{}}),Tt=useMemoizedFn(async({sourceAppPid:jt}={})=>{const zt=await yt({sourceAppPid:jt});return Object.entries(zt).map(([tn,hn])=>({...hn,provider:tn})).filter(tn=>tn.enabled).sort((tn,hn)=>(tn==null?void 0:tn.order)!==void 0&&(hn==null?void 0:hn.order)!==void 0?tn.order-hn.order:(tn==null?void 0:tn.order)!==void 0?-1:1)}),St=useMemoizedFn(async({provider:jt}={})=>{var Gt;const zt=openPopup(joinURL(tt.baseUrl,"/.well-known/service/oauth/login",jt),{name:"oauth-login:popup"});try{const tn=await runPopup({popup:zt,closeTimeout:0});return tn!=null&&tn.response?(Gt=tn.response)==null?void 0:Gt.code:null}catch(tn){throw(tn==null?void 0:tn.message)==="Popup closed"?new Error(ft("cancelAuth")):tn}}),At=async({session:jt,oauthItem:zt}={})=>{var Gt,tn;tt.bindFnSession=jt,tt.bindAuthLoading=!0;try{const hn=await St(zt),wt=(tn=(Gt=tt.bindFnSession)==null?void 0:Gt.user)==null?void 0:tn.sourceAppPid;await ht.post("/bind",{locale:j,provider:zt.provider,code:hn,sourceAppPid:wt}),Toast$1.success(ft("bindOAuthSucceed",{provider:OAUTH_PROVIDER[zt.provider]})),_e(zt)}catch(hn){Toast$1.error(getApiErrorMessage(hn,ft("bindOAuthFailed",{provider:OAUTH_PROVIDER[zt.provider]})))}finally{tt.bindAuthLoading=!1}},Rt=async({session:jt,connectedAccount:zt})=>{var Gt;tt.unbindAuthLoading=!0;try{const tn=(Gt=jt==null?void 0:jt.user)==null?void 0:Gt.sourceAppPid;await ht.post("/unbind",{locale:j,connectedAccount:omit$1(zt,["showProvider"]),sourceAppPid:tn}),Toast$1.success(ft("unbindOAuthSucceed",{provider:OAUTH_PROVIDER[zt.showProvider||zt.provider]})),et(zt)}catch(tn){Toast$1.error(getApiErrorMessage(tn,ft("unbindOAuthFailed",{provider:OAUTH_PROVIDER[zt.showProvider||zt.provider]})))}finally{tt.unbindAuthLoading=!1}},It=async(jt={})=>{try{const{data:zt}=await ht.get("/passports");zt.length?(ot.open=!0,ot.currentUser=jt,ot.passports=zt||[]):Toast$1.error(ft("noPassports"))}catch(zt){Toast$1.error(zt.message||ft("getPassportFailed"))}},Ct=async()=>{try{const{data:jt}=await ht.post("/switch",{passportId:ot.choosePassport}),{sessionToken:zt,refreshToken:Gt}=parseResponse(jt);nt({sessionToken:zt,refreshToken:Gt}),Toast$1.success(ft("switchPassportSucceed"))}catch(jt){Toast$1.error(jt.message||ft("switchPassportFailed"))}},kt=jt=>{tt.baseUrl=jt||"/"},Pt=useMemoizedFn(async({provider:jt}={},{action:zt="login",...Gt}={})=>{var wt,rt,st;const tn=tt.baseUrl;if((Gt==null?void 0:Gt.sourceAppPid)===((wt=window.blocklet)==null?void 0:wt.appPid))tt.baseUrl=((rt=window.blocklet)==null?void 0:rt.appUrl)||"/";else if(Gt!=null&&Gt.sourceAppPid){const ut=await dt(),pt=getFederatedEnabled(ut),mt=getMaster(ut);pt&&(mt!=null&&mt.appPid)&&(Gt==null?void 0:Gt.sourceAppPid)===(mt==null?void 0:mt.appPid)&&(tt.baseUrl=mt.appUrl)}const hn=(st=window==null?void 0:window.blocklet)==null?void 0:st.componentId;try{const ut=await St({provider:jt});if(ut){const pt={...Gt,action:zt,locale:j,code:ut,provider:jt,componentId:hn,visitorId:getVisitorId$2()};isUndefined$2(pt.inviter)&&window.localStorage.getItem("inviter")&&(pt.inviter=window.localStorage.getItem("inviter"));const{data:mt}=await ht.post("/login",pt);return parseResponse(mt)}return tt.baseUrl=tn,null}catch(ut){const pt=getApiErrorMessage(ut,ft("loginOAuthFailed",{provider:OAUTH_PROVIDER[jt]}));throw tt.baseUrl=tn,new Error(pt)}}),Bt=useMemoizedFn(()=>{});return jsxRuntimeExports.jsxs(Provider$7,{value:{locale:j,getOAuthConfigs:yt,getOAuthConfigList:Tt,bindOAuth:At,unbindOAuth:Rt,loginOAuth:Pt,logoutOAuth:Bt,switchOAuthPassport:It,baseUrl:tt.baseUrl,setBaseUrl:kt,oauthState:ct,unbindAuthLoading:tt.unbindAuthLoading,bindAuthLoading:tt.bindAuthLoading,t:ft},children:[a,jsxRuntimeExports.jsxs(Confirm,{open:ot.open,title:ft("switchPassport"),onConfirm:Ct,onCancel:()=>ot.reset,confirmButton:{text:ft("switch"),props:{variant:"contained",color:"primary"}},cancelButton:{text:ft("cancel"),props:{color:"inherit"}},PaperProps:{style:{width:600}},children:[jsxRuntimeExports.jsxs(Box,{mb:2,children:[ft("currentRole"),(Kt=ot.currentUser)==null?void 0:Kt.role]}),jsxRuntimeExports.jsx(CardSelector,{width:160,height:240,cardSpace:24,list:[()=>jsxRuntimeExports.jsx(Guest,{}),...ot.passports.map(jt=>({src:jt.display,name:jt.title}))],onSelect:jt=>{ot.choosePassport=jt>0?ot.passports[jt-1].id:void 0},defaultIndex:0})]})]})}function useOAuth(){const a=reactExports.useContext(OAuthContext);return omit$1(a,["locale","getToken"])}OAuthProvider.propTypes={children:PropTypes.node.isRequired,locale:PropTypes.string,onBindOAuth:PropTypes.func,onUnbindOAuth:PropTypes.func,onSwitchPassport:PropTypes.func};OAuthProvider.defaultProps={locale:"en",onBindOAuth:noop$7,onUnbindOAuth:noop$7,onSwitchPassport:noop$7};function getPermanentDid(a){return a==null?void 0:a.did}function getConnectedAccounts(a){var j;return(a==null?void 0:a.connectedAccounts)||((j=a==null?void 0:a.extraConfigs)==null?void 0:j.connectedAccounts)||[]}function getSourceProvider(a){var j;return(a==null?void 0:a.sourceProvider)||((j=a==null?void 0:a.extraConfigs)==null?void 0:j.sourceProvider)||"wallet"}function getSourceProviders(a){return getConnectedAccounts(a).map(_e=>_e.provider)}function getConnectedDids(a){return getConnectedAccounts(a).map(et=>et.did)}function getWallet(a){return getConnectedAccounts(a).find(et=>et.provider==="wallet")}function getWalletDid(a){const j=getWallet(a);return j==null?void 0:j.did}function useDid({session:a}){const[j,_e]=reactExports.useState({did:"",wallet:"",walletDid:"",permanentDid:"",connectedDids:[],connectedAccounts:[],sourceProvider:"",sourceProviders:[]});return reactExports.useEffect(()=>{if(a!=null&&a.user){const et=getPermanentDid(a.user),nt=getWalletDid(a.user),tt=getConnectedAccounts(a.user),ot=getConnectedDids(a.user),ct=getWallet(a.user),ft=getSourceProvider(a.user),ht=getSourceProviders(a.user);_e({did:et,wallet:ct,walletDid:nt,permanentDid:et,connectedDids:ot,connectedAccounts:tt,sourceProvider:ft,sourceProviders:ht})}},[a==null?void 0:a.user]),j}function WrapDid({session:a,children:j}){const _e=useDid({session:a});return j instanceof Function?j(_e):null}WrapDid.propTypes={session:PropTypes.object.isRequired,children:PropTypes.func.isRequired};const api$3=createAxios();async function getMasterToken(){const a=joinURL(AUTH_SERVICE_PREFIX,"/api/federated/loginMaster"),{data:j}=await api$3.post(a);return j}async function mountFederatedIframe({mode:a,refreshToken:j="",blocklet:_e}){const et=getMaster(_e);return new Promise(nt=>{if(!["login","logout"].includes(a)){nt();return}const tt=document.createElement("iframe");tt.style.display="none",tt.onload=async()=>{await sleep$1(500),document.body.removeChild(tt),nt()},tt.src=joinURL(et.appUrl,AUTH_SERVICE_PREFIX,`functional/federated?mode=${a}&refreshToken=${j}`),document.body.appendChild(tt)})}async function loginFederatedMaster(a={},{fetchToken:j=!0,blocklet:_e}={}){if(!getFederatedEnabled())return console.warn("Federated not enabled"),null;let nt,tt;j&&({sessionToken:nt,refreshToken:tt}=await getMasterToken());const ot=getMaster(_e),ct=joinURL(ot.appUrl,AUTH_SERVICE_PREFIX,"/api/federated/login"),ft={withCredentials:!0};nt&&(ft.headers={Authorization:`Bearer ${nt}`});const{data:ht}=await api$3.post(ct,a,ft);return tt&&await mountFederatedIframe({mode:"login",refreshToken:tt,blocklet:_e}),ht}const translations$4={zh:{notFoundFederatedInfo:"未发现统一登录的信息",autoLoginFederatedFailed:"自动登录统一登录账号失败",manualLoginFederatedFailed:"手动登录统一登录账号失败"},en:{notFoundFederatedInfo:"No federated login info detected",autoLoginFederatedFailed:"Auto login federated account failed",manualLoginFederatedFailed:"Manual login federated account failed"}};function useFederated({locale:a,handleLoginResult:j,login:_e,handleRefreshUser:et}){const nt=useReactive({federatedMaster:null}),tt=getFederatedEnabled(),ot=getMaster(),ct=getConfig(),ft=useMemoizedFn(async(ht=noop$7,dt={},yt={})=>{var At,Rt;typeof yt=="string"&&(yt={origin:yt});let{mode:Tt="auto",...St}=dt;if(yt.mode&&(Tt=yt.mode),Tt==="auto"){if(!tt)throw new Error(translations$4[a].notFoundFederatedInfo);try{const It=await loginFederatedMaster({appId:globalThis.blocklet.appId},{fetchToken:!1});j({...It,encrypted:!1}),await et({showProgress:!0}),ht()}catch(It){const Ct=It!=null&&It.response?(At=It.response)==null?void 0:At.data:It==null?void 0:It.message;ht(Ct||translations$4[a].autoLoginFederatedFailed)}}else if(Tt==="manual")try{_e(async()=>{await loginFederatedMaster({appId:globalThis.blocklet.appId,onlyWriteCookie:!0}),ht()},{...St},yt)}catch(It){const Ct=It!=null&&It.response?(Rt=It.response)==null?void 0:Rt.data:It==null?void 0:It.message;ht(Ct||translations$4[a].autoLoginFederatedFailed)}});return{master:ot,config:ct,federatedMaster:nt.federatedMaster,federatedEnabled:tt,loginFederated:ft,loginFederatedMaster}}async function renewRefreshToken(a,{authServicePrefix:j,serviceHost:_e}){if(!a)throw new Error("Refresh token not found");const et=createAxios({baseURL:_e,timeout:10*1e3,headers:{authorization:`Bearer ${encodeURIComponent(a)}`}}),{data:nt}=await et.post(joinURL(j,"/refreshSession"));return nt}function createService({refreshTokenStorage:a,sessionTokenStorage:j,serviceHost:_e,authServicePrefix:et,onRefreshTokenError:nt,onRefreshTokenSuccess:tt},ot={}){let ct=null;const ft=createAxios({baseURL:_e,timeout:30*1e3,...ot}),{getToken:ht,setToken:dt,removeToken:yt}=j,{getToken:Tt,setToken:St,removeToken:At}=a;return ft.interceptors.request.use(async Rt=>{if(j.engine==="ls"){const It=ht();It&&(Rt.headers.authorization=`Bearer ${encodeURIComponent(It)}`)}return ct&&await ct,Rt},Rt=>Promise.reject(Rt)),ft.interceptors.response.use(Rt=>Rt,async Rt=>{var Ct;const It=Rt.config;if(It.headers={...It==null?void 0:It.headers},((Ct=Rt==null?void 0:Rt.response)==null?void 0:Ct.status)===401&&!It._retry){It._retry=!0,ct||(ct=renewRefreshToken(Tt(),{serviceHost:_e,authServicePrefix:et}));try{const kt=await ct;return dt(kt.nextToken),St(kt.nextRefreshToken),typeof tt=="function"&&tt(kt),ft(It)}catch(kt){return yt(),At(),typeof nt=="function"&&nt(),Promise.reject(kt)}finally{ct=null}}return Promise.reject(Rt)}),ft}class ErrorToken extends Error{}const LANG_COOKIE_NAME="nf_lang",INTERVAL_TIME=1e3,MAX_RETRY_COUNT=3,decrypt=a=>decrypt$1(a,localStorage.getItem("__encKey"),localStorage.getItem("__decKey"));function useSessionToken({state:a,pageState:j,serviceHost:_e,sessionTokenStorage:et,refreshTokenStorage:nt,lazyRefreshToken:tt,apiOptions:ot={}}){const[ct,ft]=reactExports.useState(0),[ht,dt]=reactExports.useState(INTERVAL_TIME),{getToken:yt,setToken:Tt,removeToken:St}=et,{getToken:At,setToken:Rt,removeToken:It}=nt,Ct=useCreation(()=>createAxios({baseURL:_e,timeout:10*1e3}),[_e]),kt=()=>{St(),It()},Pt=useCreation(()=>createService({sessionTokenStorage:et,refreshTokenStorage:nt,serviceHost:_e,authServicePrefix:j.prefix,onRefreshTokenError(){kt(),a.user&&(a.user=null)}},ot),[_e,j.prefix]),Bt=()=>{const rt=getCookieOptions({returnDomain:!1});Cookie.remove("connected_did",rt),Cookie.remove("connected_pk",rt),Cookie.remove("connected_app",rt),Cookie.remove("connected_wallet_os",rt),kt()},Kt=useMemoizedFn(()=>{const rt=Cookie.get(LANG_COOKIE_NAME)||getBrowserLang();rt!==j.currentLocale&&(j.currentLocale=rt)}),jt=useMemoizedFn(async({showProgress:rt=!1,requestFn:st=null,onlyRefreshToken:ut=!1})=>{var pt;try{if(a.loading)return console.warn("SessionProvider.refresh is currently in progress, call it will be noop"),{loading:!0};rt&&(a.loading=!0);const{data:mt,status:$t}=await st();if($t===400&&(kt(),a.user=null,a.error=""),mt.error)throw a.error=mt.error,a.open=!1,new Error(mt.error);if(mt.user)mt.nextToken&&(Tt(mt.nextToken),mt.nextRefreshToken&&Rt(mt.nextRefreshToken)),ut||(a.open=!1,a.user=mt.user,a.provider=mt.provider,a.walletOS=mt.walletOS),yt()||(Toast$1.error("Can't write session token, please use https url to access this page"),kt());else throw rt&&(a.loading=j.autoConnect),a.open=j.autoConnect,a.user=null,a.provider="",a.walletOS="",new ErrorToken("Invalid token");return{data:mt,status:$t}}catch(mt){throw console.error("SessionProvider.refresh error",mt),a.open=!1,a.error=mt.message,((pt=mt==null?void 0:mt.response)==null?void 0:pt.status)===400?new ErrorToken("Invalid token"):mt}finally{rt&&(a.loading=!1)}}),zt=useMemoizedFn(async(rt=!1,st=!1)=>{const ut=getVisitorId$2()||"",pt=()=>Ct.post(withQuery(joinURL(j.prefix,"/refreshSession"),{visitorId:ut}),null,{headers:{authorization:`Bearer ${encodeURIComponent(At())}`}});dt(void 0);try{await jt({showProgress:rt,requestFn:pt,onlyRefreshToken:st}),ft(0)}catch(mt){mt instanceof ErrorToken?(console.warn("refresh token failed, remove all tokens"),ft(0),kt()):(console.error("refresh token failed, unexpected error:",mt),ft(ct+1),await sleep$1(INTERVAL_TIME),ct>=MAX_RETRY_COUNT&&(ft(0),kt()))}finally{dt(INTERVAL_TIME)}}),Gt=useMemoizedFn((rt=!1)=>{if(tt)return;const st=yt();let ut=rt;const pt=new Date().getTime();if(st)try{const{exp:mt,iat:$t}=o(st);mt*1e3-pt<pt-$t*1e3&&(ut=!0)}catch{ut=!0}else ut=!0;ut&&(At()?zt(!1,!0):(Bt(),a.user&&(a.user=null)))}),tn=useMemoizedFn(async({showProgress:rt=!1,forceRefreshToken:st=!1}={})=>{const ut=getVisitorId$2()||"",pt=()=>Pt.get(withQuery(joinURL(j.prefix,"/session"),{visitorId:ut}));try{if(st)throw new ErrorToken("need force refresh token");await jt({showProgress:rt,requestFn:pt})}catch(mt){mt instanceof ErrorToken&&(console.warn("try to refresh token"),await zt())}}),hn=useMemoizedFn(()=>{if(a.initialized&&a.user)try{Gt()}catch{}}),wt=useMemoizedFn(rt=>{const st=Array.isArray(rt)?rt[0]:rt,{loginToken:ut,sessionToken:pt,refreshToken:mt,visitorId:$t,encrypted:xt=!0}=st,vt=ut||pt;vt&&(Tt(xt?decrypt(vt):vt),mt&&Rt(xt?decrypt(mt):mt)),$t&&setVisitorId(xt?decrypt($t):$t)});return useInterval$1(()=>{Kt(),Gt()},ht,{immediate:!0}),{renewToken:hn,handleRefreshUser:tn,handleRefreshToken:zt,handleLoginResult:wt,decrypt,removeToken:kt,clearSession:Bt,getSessionToken:yt,getRefreshToken:At,setRefreshToken:Rt,setSessionToken:Tt,service:Pt}}var pathToRegexp$2={exports:{}},isarray$2=Array.isArray||function(a){return Object.prototype.toString.call(a)=="[object Array]"},isarray$1=isarray$2;pathToRegexp$2.exports=pathToRegexp;pathToRegexp$2.exports.parse=parse$f;pathToRegexp$2.exports.compile=compile;pathToRegexp$2.exports.tokensToFunction=tokensToFunction;pathToRegexp$2.exports.tokensToRegExp=tokensToRegExp;var PATH_REGEXP=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function parse$f(a,j){for(var _e=[],et=0,nt=0,tt="",ot=j&&j.delimiter||"/",ct;(ct=PATH_REGEXP.exec(a))!=null;){var ft=ct[0],ht=ct[1],dt=ct.index;if(tt+=a.slice(nt,dt),nt=dt+ft.length,ht){tt+=ht[1];continue}var yt=a[nt],Tt=ct[2],St=ct[3],At=ct[4],Rt=ct[5],It=ct[6],Ct=ct[7];tt&&(_e.push(tt),tt="");var kt=Tt!=null&&yt!=null&&yt!==Tt,Pt=It==="+"||It==="*",Bt=It==="?"||It==="*",Kt=Tt||ot,jt=At||Rt,zt=Tt||(typeof _e[_e.length-1]=="string"?_e[_e.length-1]:"");_e.push({name:St||et++,prefix:Tt||"",delimiter:Kt,optional:Bt,repeat:Pt,partial:kt,asterisk:!!Ct,pattern:jt?escapeGroup(jt):Ct?".*":restrictBacktrack(Kt,zt)})}return nt<a.length&&(tt+=a.substr(nt)),tt&&_e.push(tt),_e}function restrictBacktrack(a,j){return!j||j.indexOf(a)>-1?"[^"+escapeString(a)+"]+?":escapeString(j)+"|(?:(?!"+escapeString(j)+")[^"+escapeString(a)+"])+?"}function compile(a,j){return tokensToFunction(parse$f(a,j),j)}function encodeURIComponentPretty(a){return encodeURI(a).replace(/[\/?#]/g,function(j){return"%"+j.charCodeAt(0).toString(16).toUpperCase()})}function encodeAsterisk(a){return encodeURI(a).replace(/[?#]/g,function(j){return"%"+j.charCodeAt(0).toString(16).toUpperCase()})}function tokensToFunction(a,j){for(var _e=new Array(a.length),et=0;et<a.length;et++)typeof a[et]=="object"&&(_e[et]=new RegExp("^(?:"+a[et].pattern+")$",flags(j)));return function(nt,tt){for(var ot="",ct=nt||{},ft=tt||{},ht=ft.pretty?encodeURIComponentPretty:encodeURIComponent,dt=0;dt<a.length;dt++){var yt=a[dt];if(typeof yt=="string"){ot+=yt;continue}var Tt=ct[yt.name],St;if(Tt==null)if(yt.optional){yt.partial&&(ot+=yt.prefix);continue}else throw new TypeError('Expected "'+yt.name+'" to be defined');if(isarray$1(Tt)){if(!yt.repeat)throw new TypeError('Expected "'+yt.name+'" to not repeat, but received `'+JSON.stringify(Tt)+"`");if(Tt.length===0){if(yt.optional)continue;throw new TypeError('Expected "'+yt.name+'" to not be empty')}for(var At=0;At<Tt.length;At++){if(St=ht(Tt[At]),!_e[dt].test(St))throw new TypeError('Expected all "'+yt.name+'" to match "'+yt.pattern+'", but received `'+JSON.stringify(St)+"`");ot+=(At===0?yt.prefix:yt.delimiter)+St}continue}if(St=yt.asterisk?encodeAsterisk(Tt):ht(Tt),!_e[dt].test(St))throw new TypeError('Expected "'+yt.name+'" to match "'+yt.pattern+'", but received "'+St+'"');ot+=yt.prefix+St}return ot}}function escapeString(a){return a.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function escapeGroup(a){return a.replace(/([=!:$\/()])/g,"\\$1")}function attachKeys(a,j){return a.keys=j,a}function flags(a){return a&&a.sensitive?"":"i"}function regexpToRegexp(a,j){var _e=a.source.match(/\((?!\?)/g);if(_e)for(var et=0;et<_e.length;et++)j.push({name:et,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return attachKeys(a,j)}function arrayToRegexp(a,j,_e){for(var et=[],nt=0;nt<a.length;nt++)et.push(pathToRegexp(a[nt],j,_e).source);var tt=new RegExp("(?:"+et.join("|")+")",flags(_e));return attachKeys(tt,j)}function stringToRegexp(a,j,_e){return tokensToRegExp(parse$f(a,_e),j,_e)}function tokensToRegExp(a,j,_e){isarray$1(j)||(_e=j||_e,j=[]),_e=_e||{};for(var et=_e.strict,nt=_e.end!==!1,tt="",ot=0;ot<a.length;ot++){var ct=a[ot];if(typeof ct=="string")tt+=escapeString(ct);else{var ft=escapeString(ct.prefix),ht="(?:"+ct.pattern+")";j.push(ct),ct.repeat&&(ht+="(?:"+ft+ht+")*"),ct.optional?ct.partial?ht=ft+"("+ht+")?":ht="(?:"+ft+"("+ht+"))?":ht=ft+"("+ht+")",tt+=ht}}var dt=escapeString(_e.delimiter||"/"),yt=tt.slice(-dt.length)===dt;return et||(tt=(yt?tt.slice(0,-dt.length):tt)+"(?:"+dt+"(?=$))?"),nt?tt+="$":tt+=et&&yt?"":"(?="+dt+"|$)",attachKeys(new RegExp("^"+tt,flags(_e)),j)}function pathToRegexp(a,j,_e){return isarray$1(j)||(_e=j||_e,j=[]),_e=_e||{},a instanceof RegExp?regexpToRegexp(a,j):isarray$1(a)?arrayToRegexp(a,j,_e):stringToRegexp(a,j,_e)}var pathToRegexpExports=pathToRegexp$2.exports;const pathToRegexp$1=getDefaultExportFromCjs$1(pathToRegexpExports);function useProtectedRoutes({protectedRoutes:a=[]}){const j=useCreation(()=>a.map(et=>pathToRegexp$1(et,[])),[a]);return{checkMatch:useMemoizedFn((et=window.location.pathname)=>j.some(nt=>nt.exec(et)))}}const SessionContext$1=reactExports.createContext();var dist$1={},eventemitter3={exports:{}};(function(a){var j=Object.prototype.hasOwnProperty,_e="~";function et(){}Object.create&&(et.prototype=Object.create(null),new et().__proto__||(_e=!1));function nt(ft,ht,dt){this.fn=ft,this.context=ht,this.once=dt||!1}function tt(ft,ht,dt,yt,Tt){if(typeof dt!="function")throw new TypeError("The listener must be a function");var St=new nt(dt,yt||ft,Tt),At=_e?_e+ht:ht;return ft._events[At]?ft._events[At].fn?ft._events[At]=[ft._events[At],St]:ft._events[At].push(St):(ft._events[At]=St,ft._eventsCount++),ft}function ot(ft,ht){--ft._eventsCount===0?ft._events=new et:delete ft._events[ht]}function ct(){this._events=new et,this._eventsCount=0}ct.prototype.eventNames=function(){var ht=[],dt,yt;if(this._eventsCount===0)return ht;for(yt in dt=this._events)j.call(dt,yt)&&ht.push(_e?yt.slice(1):yt);return Object.getOwnPropertySymbols?ht.concat(Object.getOwnPropertySymbols(dt)):ht},ct.prototype.listeners=function(ht){var dt=_e?_e+ht:ht,yt=this._events[dt];if(!yt)return[];if(yt.fn)return[yt.fn];for(var Tt=0,St=yt.length,At=new Array(St);Tt<St;Tt++)At[Tt]=yt[Tt].fn;return At},ct.prototype.listenerCount=function(ht){var dt=_e?_e+ht:ht,yt=this._events[dt];return yt?yt.fn?1:yt.length:0},ct.prototype.emit=function(ht,dt,yt,Tt,St,At){var Rt=_e?_e+ht:ht;if(!this._events[Rt])return!1;var It=this._events[Rt],Ct=arguments.length,kt,Pt;if(It.fn){switch(It.once&&this.removeListener(ht,It.fn,void 0,!0),Ct){case 1:return It.fn.call(It.context),!0;case 2:return It.fn.call(It.context,dt),!0;case 3:return It.fn.call(It.context,dt,yt),!0;case 4:return It.fn.call(It.context,dt,yt,Tt),!0;case 5:return It.fn.call(It.context,dt,yt,Tt,St),!0;case 6:return It.fn.call(It.context,dt,yt,Tt,St,At),!0}for(Pt=1,kt=new Array(Ct-1);Pt<Ct;Pt++)kt[Pt-1]=arguments[Pt];It.fn.apply(It.context,kt)}else{var Bt=It.length,Kt;for(Pt=0;Pt<Bt;Pt++)switch(It[Pt].once&&this.removeListener(ht,It[Pt].fn,void 0,!0),Ct){case 1:It[Pt].fn.call(It[Pt].context);break;case 2:It[Pt].fn.call(It[Pt].context,dt);break;case 3:It[Pt].fn.call(It[Pt].context,dt,yt);break;case 4:It[Pt].fn.call(It[Pt].context,dt,yt,Tt);break;default:if(!kt)for(Kt=1,kt=new Array(Ct-1);Kt<Ct;Kt++)kt[Kt-1]=arguments[Kt];It[Pt].fn.apply(It[Pt].context,kt)}}return!0},ct.prototype.on=function(ht,dt,yt){return tt(this,ht,dt,yt,!1)},ct.prototype.once=function(ht,dt,yt){return tt(this,ht,dt,yt,!0)},ct.prototype.removeListener=function(ht,dt,yt,Tt){var St=_e?_e+ht:ht;if(!this._events[St])return this;if(!dt)return ot(this,St),this;var At=this._events[St];if(At.fn)At.fn===dt&&(!Tt||At.once)&&(!yt||At.context===yt)&&ot(this,St);else{for(var Rt=0,It=[],Ct=At.length;Rt<Ct;Rt++)(At[Rt].fn!==dt||Tt&&!At[Rt].once||yt&&At[Rt].context!==yt)&&It.push(At[Rt]);It.length?this._events[St]=It.length===1?It[0]:It:ot(this,St)}return this},ct.prototype.removeAllListeners=function(ht){var dt;return ht?(dt=_e?_e+ht:ht,this._events[dt]&&ot(this,dt)):(this._events=new et,this._eventsCount=0),this},ct.prototype.off=ct.prototype.removeListener,ct.prototype.addListener=ct.prototype.on,ct.prefixed=_e,ct.EventEmitter=ct,a.exports=ct})(eventemitter3);var eventemitter3Exports=eventemitter3.exports,priorityQueue={},lowerBound$1={};Object.defineProperty(lowerBound$1,"__esModule",{value:!0});function lowerBound(a,j,_e){let et=0,nt=a.length;for(;nt>0;){const tt=nt/2|0;let ot=et+tt;_e(a[ot],j)<=0?(et=++ot,nt-=tt+1):nt=tt}return et}lowerBound$1.default=lowerBound;Object.defineProperty(priorityQueue,"__esModule",{value:!0});const lower_bound_1=lowerBound$1;class PriorityQueue{constructor(){this._queue=[]}enqueue(j,_e){_e=Object.assign({priority:0},_e);const et={priority:_e.priority,run:j};if(this.size&&this._queue[this.size-1].priority>=_e.priority){this._queue.push(et);return}const nt=lower_bound_1.default(this._queue,et,(tt,ot)=>ot.priority-tt.priority);this._queue.splice(nt,0,et)}dequeue(){const j=this._queue.shift();return j==null?void 0:j.run}filter(j){return this._queue.filter(_e=>_e.priority===j.priority).map(_e=>_e.run)}get size(){return this._queue.length}}priorityQueue.default=PriorityQueue;Object.defineProperty(dist$1,"__esModule",{value:!0});const EventEmitter$4=eventemitter3Exports,p_timeout_1=pTimeoutExports,priority_queue_1=priorityQueue,empty=()=>{},timeoutError=new p_timeout_1.TimeoutError;class PQueue extends EventEmitter$4{constructor(j){var _e,et,nt,tt;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=empty,this._resolveIdle=empty,j=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:priority_queue_1.default},j),!(typeof j.intervalCap=="number"&&j.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(et=(_e=j.intervalCap)===null||_e===void 0?void 0:_e.toString())!==null&&et!==void 0?et:""}\` (${typeof j.intervalCap})`);if(j.interval===void 0||!(Number.isFinite(j.interval)&&j.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(tt=(nt=j.interval)===null||nt===void 0?void 0:nt.toString())!==null&&tt!==void 0?tt:""}\` (${typeof j.interval})`);this._carryoverConcurrencyCount=j.carryoverConcurrencyCount,this._isIntervalIgnored=j.intervalCap===1/0||j.interval===0,this._intervalCap=j.intervalCap,this._interval=j.interval,this._queue=new j.queueClass,this._queueClass=j.queueClass,this.concurrency=j.concurrency,this._timeout=j.timeout,this._throwOnTimeout=j.throwOnTimeout===!0,this._isPaused=j.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=empty,this._pendingCount===0&&(this._resolveIdle(),this._resolveIdle=empty,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const j=Date.now();if(this._intervalId===void 0){const _e=this._intervalEnd-j;if(_e<0)this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;else return this._timeoutId===void 0&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},_e)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const j=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const _e=this._queue.dequeue();return _e?(this.emit("active"),_e(),j&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(j){if(!(typeof j=="number"&&j>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${j}\` (${typeof j})`);this._concurrency=j,this._processQueue()}async add(j,_e={}){return new Promise((et,nt)=>{const tt=async()=>{this._pendingCount++,this._intervalCount++;try{const ot=this._timeout===void 0&&_e.timeout===void 0?j():p_timeout_1.default(Promise.resolve(j()),_e.timeout===void 0?this._timeout:_e.timeout,()=>{(_e.throwOnTimeout===void 0?this._throwOnTimeout:_e.throwOnTimeout)&&nt(timeoutError)});et(await ot)}catch(ot){nt(ot)}this._next()};this._queue.enqueue(tt,_e),this._tryToStartAnother(),this.emit("add")})}async addAll(j,_e){return Promise.all(j.map(async et=>this.add(et,_e)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(j=>{const _e=this._resolveEmpty;this._resolveEmpty=()=>{_e(),j()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(j=>{const _e=this._resolveIdle;this._resolveIdle=()=>{_e(),j()}})}get size(){return this._queue.size}sizeBy(j){return this._queue.filter(j).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(j){this._timeout=j}}var _default$2=dist$1.default=PQueue;const data$s={width:24,height:24,body:'<path fill="currentColor" d="M10 22L0 12L10 2l1.775 1.775L3.55 12l8.225 8.225L10 22Z"/>'},data$r={width:24,height:24,body:'<path fill="currentColor" d="m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 13.4Z"/>'},Transition=reactExports.forwardRef(function a(j,_e){return jsxRuntimeExports.jsx(Slide,{direction:"up",ref:_e,...j})});function withDialog(a){function j({popup:_e,open:et,dialogStyle:nt,responsive:tt,...ot}){const ct=useMediaQuery("(max-width:640px)");if(!_e&&!tt)return jsxRuntimeExports.jsx(a,{...ot});const ft=(dt,yt)=>{},ht=tt?!0:et;return jsxRuntimeExports.jsx(Dialog$1,{open:ht,fullScreen:ct,maxWidth:"lg",onClose:ft,...ct?{TransitionComponent:Transition,PaperProps:{sx:{borderRadius:3,borderBottomLeftRadius:0,borderBottomRightRadius:0}}}:{PaperProps:{sx:{borderRadius:3}}},children:jsxRuntimeExports.jsx(DialogContent,{sx:{maxWidth:"100%",maxHeight:"100%",p:"0px !important"},children:jsxRuntimeExports.jsx(Box,{sx:{maxWidth:"100%",width:ct?"100%":500,height:ct?"100%":"auto"},children:jsxRuntimeExports.jsx(a,{...ot,hideCloseButton:(ot==null?void 0:ot.hideCloseButton)??!1,isFullScreen:ct,mode:"dialog"})})})})}return j.propTypes={responsive:PropTypes.bool,popup:PropTypes.bool,open:PropTypes.bool,dialogStyle:PropTypes.object},j.defaultProps={responsive:!1,popup:!1,open:!1,dialogStyle:{}},j}var useIdle$1={},cjs={};Object.defineProperty(cjs,"__esModule",{value:!0});function throttle(a,j,_e,et){var nt,tt=!1,ot=0;function ct(){nt&&clearTimeout(nt)}function ft(){ct(),tt=!0}typeof j!="boolean"&&(et=_e,_e=j,j=void 0);function ht(){for(var dt=arguments.length,yt=new Array(dt),Tt=0;Tt<dt;Tt++)yt[Tt]=arguments[Tt];var St=this,At=Date.now()-ot;if(tt)return;function Rt(){ot=Date.now(),_e.apply(St,yt)}function It(){nt=void 0}et&&!nt&&Rt(),ct(),et===void 0&&At>a?Rt():j!==!0&&(nt=setTimeout(et?It:Rt,et===void 0?a-At:a))}return ht.cancel=ft,ht}function debounce(a,j,_e){return _e===void 0?throttle(a,j,!1):throttle(a,_e,j!==!1)}cjs.debounce=debounce;cjs.throttle=throttle;var util$4={};Object.defineProperty(util$4,"__esModule",{value:!0});util$4.isNavigator=util$4.isBrowser=util$4.off=util$4.on=util$4.noop=void 0;var noop$1=function(){};util$4.noop=noop$1;function on(a){for(var j=[],_e=1;_e<arguments.length;_e++)j[_e-1]=arguments[_e];a&&a.addEventListener&&a.addEventListener.apply(a,j)}util$4.on=on;function off(a){for(var j=[],_e=1;_e<arguments.length;_e++)j[_e-1]=arguments[_e];a&&a.removeEventListener&&a.removeEventListener.apply(a,j)}util$4.off=off;util$4.isBrowser=typeof window<"u";util$4.isNavigator=typeof navigator<"u";Object.defineProperty(useIdle$1,"__esModule",{value:!0});var react_1=reactExports,throttle_debounce_1=cjs,util_1$3=util$4,defaultEvents=["mousemove","mousedown","resize","keydown","touchstart","wheel"],oneMinute=6e4,useIdle=function(a,j,_e){a===void 0&&(a=oneMinute),j===void 0&&(j=!1),_e===void 0&&(_e=defaultEvents);var et=react_1.useState(j),nt=et[0],tt=et[1];return react_1.useEffect(function(){for(var ot=!0,ct,ft=nt,ht=function(St){ot&&(ft=St,tt(St))},dt=throttle_debounce_1.throttle(50,function(){ft&&ht(!1),clearTimeout(ct),ct=setTimeout(function(){return ht(!0)},a)}),yt=function(){document.hidden||dt()},Tt=0;Tt<_e.length;Tt++)util_1$3.on(window,_e[Tt],dt);return util_1$3.on(document,"visibilitychange",yt),ct=setTimeout(function(){return ht(!0)},a),function(){ot=!1;for(var St=0;St<_e.length;St++)util_1$3.off(window,_e[St],dt);util_1$3.off(document,"visibilitychange",yt)}},[a,_e]),nt},_default$1=useIdle$1.default=useIdle;const DEFAULT_MAX_IDLE_TIME=1e3*60*30,STORAGE_KEY_DISABLED="wallet_sw_keeper_disabled";let id$1;const injectIframe=a=>{const j=document.createElement("iframe");j.title="abt wallet",j.id=id$1,j.style.width=0,j.style.height=0,j.style.border=0,j.style.display="block",j.style.position="absolute",j.style.top=0,j.src=`${a}?action=iframe`,document.body.appendChild(j)},removeIframe=()=>{const a=document.getElementById(id$1);a&&document.body.removeChild(a)},cleanup=()=>{removeIframe(),id$1=null},enable=a=>{id$1||(id$1=`web_wallet_sw_keeper_${Date.now()}`,injectIframe(a))};function WebWalletSWKeeper({webWalletUrl:a,maxIdleTime:j}){const _e=reactExports.useRef(!!id$1),et=_default$1(j),nt=()=>{_e.current||cleanup()};return reactExports.useEffect(()=>{et?nt():enable(a)},[et]),reactExports.useEffect(()=>()=>nt(),[]),null}WebWalletSWKeeper.propTypes={webWalletUrl:PropTypes.string.isRequired,maxIdleTime:PropTypes.number};WebWalletSWKeeper.defaultProps={maxIdleTime:DEFAULT_MAX_IDLE_TIME};const withWebWalletSWKeeper=a=>function({webWalletUrl:_e,maxIdleTime:et,...nt}){const tt=useBrowser();_e=_e||getWebWalletUrl$1();const[ot]=useLocalStorageState(STORAGE_KEY_DISABLED,{defaultValue:1}),ct=detectWalletExtension(),ft=checkSameProtocol(_e),ht=tt.wallet;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!ot&&!ct&&ft&&!ht&&jsxRuntimeExports.jsx(WebWalletSWKeeper,{webWalletUrl:_e,maxIdleTime:et}),jsxRuntimeExports.jsx(a,{webWalletUrl:_e,...nt})]})},BlockletContext$1=reactExports.createContext(),{Provider:Provider$6,Consumer:Consumer$6}=BlockletContext$1;function BlockletProvider$1({children:a,baseUrl:j,loading:_e}){const[et,nt]=reactExports.useState(null),tt=useMemoizedFn(async()=>{if(!j||window.location.href.startsWith(j))throw new Error("no blocklet data");const ot=new URL("__blocklet__.js",j);return ot.searchParams.set("type","json"),await(await fetch(ot.href)).json()});return useAsyncEffect(async()=>{try{const ot=await tt();nt(ot)}catch{const ot=globalThis.blocklet||globalThis.env;nt(ot)}},[j]),jsxRuntimeExports.jsx(Provider$6,{value:et,children:et?a:_e||null})}function useBlockletContext$2(){return{blocklet:reactExports.useContext(BlockletContext$1)}}BlockletProvider$1.propTypes={baseUrl:PropTypes.string,children:PropTypes.any.isRequired,loading:PropTypes.any};BlockletProvider$1.defaultProps={baseUrl:"",loading:null};function Loading(){return jsxRuntimeExports.jsx(Box,{sx:{height:"100%",minWidth:"200px",minHeight:"200px",display:"flex",justifyContent:"center",alignItems:"center"},children:jsxRuntimeExports.jsx(CircularProgress,{sx:{color:colors$1.foregroundsFgInteractive}})})}function withBlocklet(a){function j({...et}){const{blocklet:nt}=useBlockletContext$2();return jsxRuntimeExports.jsx(a,{...et,blocklet:nt})}function _e({baseUrl:et,...nt}){return jsxRuntimeExports.jsx(BlockletProvider$1,{baseUrl:et,loading:jsxRuntimeExports.jsx(Loading,{}),children:jsxRuntimeExports.jsx(j,{baseUrl:et,...nt})})}return _e}const keyPair=tweetnacl.box.keyPair();function useSecurity(){const[a,j]=useLocalStorageState("__encKey",{defaultValue:encodeKey(keyPair.publicKey),deserializer:ot=>ot,serializer:ot=>ot}),[_e,et]=useLocalStorageState("__decKey",{defaultValue:encodeKey(keyPair.secretKey),deserializer:ot=>ot,serializer:ot=>ot});return reactExports.useEffect(()=>{localStorage.getItem("__encKey")||j(encodeKey(keyPair.publicKey)),localStorage.getItem("__decKey")||et(encodeKey(keyPair.secretKey))},[]),{encryptKey:a,decryptKey:_e,decrypt:(ot,ct=a,ft=_e)=>decrypt$1(ot,ct,ft),encrypt:(ot,ct=a)=>encrypt(ot,ct)}}function useApps({blocklet:a,action:j,sourceAppPid:_e,connectState:et,enableSwitchApp:nt}){var ht,dt;const tt=reactExports.useContext(SessionContext$1),ot=useCreation(()=>{var yt;return nt===!0?!0:!(nt===!1||(yt=tt==null?void 0:tt.session)!=null&&yt.user&&!["login"].includes(j))},[j,(ht=tt==null?void 0:tt.session)==null?void 0:ht.user]),ct=useCreation(()=>{if(isUndefined$2(_e)){const yt=getFederatedEnabled(a),Tt=getMaster(a);if(yt&&(Tt!=null&&Tt.appPid))return Tt.appPid}return _e},[_e]);return{appInfoList:useCreation(()=>getApps(a).filter(Tt=>{var St;return ot?!0:isUndefined$2(_e)?isUndefined$2(et.sourceAppPid)?(St=tt==null?void 0:tt.session)!=null&&St.user?Tt.sourceAppPid===tt.session.user.sourceAppPid:Tt.sourceAppPid===ct:Tt.sourceAppPid===et.sourceAppPid:Tt.sourceAppPid===_e}),[ot,_e,et.sourceAppPid,ct,(dt=tt==null?void 0:tt.session)==null?void 0:dt.user]),autoGenerateSourceAppPid:ct,canSwitchApp:ot}}const translations$3={en:{generateError:"Request new qrcode failed",checkError:"Status check failed!",scanned:"Use your wallet to continue operation...",mfaCode:"We sent you a verification request on your DID Wallet, enter the digits below to confirm.",refresh:"Refresh",open:"Open in DID Wallet",openDidConnect:"Open DID Connect",error:"We encountered some errors when processing the request",invalidSessionStatus:"Invalid session status",success:"Success",wait:"Wait a second",waiting:"Waiting for next workflow to complete...",failed:"Failed",oops:"Oops",forbidden:"Login user and wallet user mismatch, please logout, then login to retry",webWallet:"Auth with Web Wallet",cancel:"Cancel",close:"Close",retry:"Retry",retryForbidden:"Please start this workflow from the beginning",getWallet:"Don't have the DID Wallet? Get it now.",back:"Back",connect:"Use the following to connect",connecting:"Connecting to your",connectingSuffix:"Or use the following to connect",connected:"Connected to your",busyTitle:"Busy",busyDesc:"Busy processing another DID Connect request",loginWithBefore:"Login with ",loginWithAfter:"",bindOAuth:"Bind third party login",bind:"Bind ",loginOAuthFailed:"Login with third party failed",loginWithAnotherAccount:"Login with another account",quickLoginDescription:"The following accounts have been detected in the current unified login environment. Click the following accounts to log in quickly.",quickLogin:"Login {appName} with {masterAppName} account",sessionFrom:"Session founded from {appName} blocklet",loginWithThisAccount:"Click to login with this account",chooseAccount:"Choose an account",lostPassport:"Lost your passport?",lostPassportTips:"If you have lost your passport, you can click here to claim back.",download:"Download",downloadTips:"Don't have DID Wallet ?",scanWithWallet:"Easy Login with QR Code Scanning",openInWallet:"Open in DID Wallet",webExtension:"Web Wallet Extension",connectButton:"Connect",switch:"Switch",requestConnect:"Requesting Connection",continueInWallet:"Please continue in the DID Wallet",loginWithBelow:"Login using the following methods",otherAccount:"Other account"},zh:{generateError:"二维码生成失败",checkError:"扫码状态检查失败",scanned:"请到您的钱包上继续操作……",mfaCode:"我们给你的 DID 钱包发送了一个二次验证请求,请输入下面的数字完成验证",refresh:"刷新",open:"在 DID 钱包中打开",openDidConnect:"打开 DID Connect",error:"服务器开小差了!",invalidSessionStatus:"无效的会话状态",success:"成功",failed:"失败",wait:"请稍候",waiting:"正在等待下个流程完成...",forbidden:"登录用户和扫码用户不匹配,为保障安全,请退出后重新登录",oops:"哎呀",webWallet:"使用 Web Wallet 验证",cancel:"取消",close:"关闭",retry:"重试",retryForbidden:"请关闭当前弹窗并重新开始当前流程",getWallet:"还没有 DID Wallet? 现在下载.",back:"返回",connect:"请选择以下方式之一连接",connecting:"正在自动连接您的",connectingSuffix:"或选择以下方式手动连接",connected:"已连接您的",busyTitle:"钱包繁忙",busyDesc:"正在处理其他请求",loginWithBefore:"使用",loginWithAfter:"登录",bindOAuth:"绑定第三方登录",bind:"绑定",loginOAuthFailed:"第三方登录失败",loginWithAnotherAccount:"使用其他账户登录",quickLoginDescription:"检测到当前统一登录环境中已存在下列账户,点击以下账户,进行快捷登录",quickLogin:"使用 {masterAppName} 账户登录 {appName}",sessionFrom:"发现自 {appName} 应用",loginWithThisAccount:"点击使用此账号登录",chooseAccount:"选择一个账号",lostPassport:"找回通行证",lostPassportTips:"如果您丢失了登录通行证,您可以点击这里来找回。",download:"下载",downloadTips:"没有 DID Wallet ?",scanWithWallet:"使用 DID Wallet 扫码二维码",openInWallet:"使用 DID Wallet 打开",webExtension:"浏览器插件",connectButton:"连接",switch:"切换",requestConnect:"正在请求连接",continueInWallet:"请在 DID Wallet 中继续完成您的操作",loginWithBelow:"使用以下方式进行登录",otherAccount:"其他账号"}},StateContext=reactExports.createContext({isWalletWebview:!1,isMobile:!1,matchSmallScreen:!1}),{Provider:Provider$5,Consumer:Consumer$5}=StateContext;function StateProvider({children:a,blocklet:j,action:_e,extraParams:et,locale:nt,...tt}){var Kt;const ot=useMemoizedFn((jt,zt={})=>translate(translations$3,jt,nt,"en",zt)),ct=reactExports.useContext(SessionContext$1),ft=useReactive({sourceAppPid:void 0,status:"created",autoActiveWebview:!0}),ht=reactExports.useRef({cancelCount:0}),dt=useBrowser(),{appInfoList:yt,autoGenerateSourceAppPid:Tt,canSwitchApp:St}=useApps({blocklet:j,connectState:ft,action:_e,sourceAppPid:et==null?void 0:et.sourceAppPid,enableSwitchApp:(et==null?void 0:et.forceSwitch)||(et==null?void 0:et.enableSwitchApp)}),At=reactExports.useRef(null),Rt=useSize(At),Ct=((Rt==null?void 0:Rt.width)||0)<500,kt=useCreation(()=>{var jt,zt;return St?{...et,sourceAppPid:isUndefined$2(ft.sourceAppPid)?Tt:ft.sourceAppPid}:(jt=ct==null?void 0:ct.session)!=null&&jt.user?isUndefined$2(et==null?void 0:et.sourceAppPid)?{...et,sourceAppPid:(zt=ct.session.user)==null?void 0:zt.sourceAppPid}:et:{...et,sourceAppPid:Tt}},[St,et,ft.sourceAppPid,_e,Tt,(Kt=ct==null?void 0:ct.session)==null?void 0:Kt.user]),Pt=useMemoizedFn(jt=>{ft.status=jt||"created"}),Bt={isWalletWebview:dt.wallet,isMobile:dt.mobile.any,matchSmallScreen:Ct,connectState:ft,staticState:ht,reactiveState:ft,appInfoList:yt,extraParams:kt,blocklet:j,t:ot,locale:nt,changeStatus:Pt};return jsxRuntimeExports.jsx(Provider$5,{value:Bt,children:jsxRuntimeExports.jsx(Box,{...tt,ref:At,children:a})})}StateProvider.propTypes={children:PropTypes.any.isRequired,blocklet:PropTypes.object.isRequired,action:PropTypes.string.isRequired,sourceAppPid:PropTypes.string,extraParams:PropTypes.object,locale:PropTypes.string};StateProvider.defaultProps={sourceAppPid:void 0,extraParams:{},locale:"en"};function useStateContext(){return reactExports.useContext(StateContext)}const data$q={width:24,height:24,hidden:!0,body:'<path fill="currentColor" d="M12 11q.825 0 1.413-.588Q14 9.825 14 9t-.587-1.413Q12.825 7 12 7q-.825 0-1.412.587Q10 8.175 10 9q0 .825.588 1.412Q11.175 11 12 11Zm0 2q-1.65 0-2.825-1.175Q8 10.65 8 9q0-1.65 1.175-2.825Q10.35 5 12 5q1.65 0 2.825 1.175Q16 7.35 16 9q0 1.65-1.175 2.825Q13.65 13 12 13Zm0 11q-2.475 0-4.662-.938q-2.188-.937-3.825-2.574Q1.875 18.85.938 16.663Q0 14.475 0 12t.938-4.663q.937-2.187 2.575-3.825Q5.15 1.875 7.338.938Q9.525 0 12 0t4.663.938q2.187.937 3.825 2.574q1.637 1.638 2.574 3.825Q24 9.525 24 12t-.938 4.663q-.937 2.187-2.574 3.825q-1.638 1.637-3.825 2.574Q14.475 24 12 24Zm0-2q1.8 0 3.375-.575T18.25 19.8q-.825-.925-2.425-1.612q-1.6-.688-3.825-.688t-3.825.688q-1.6.687-2.425 1.612q1.3 1.05 2.875 1.625T12 22Zm-7.7-3.6q1.2-1.3 3.225-2.1q2.025-.8 4.475-.8q2.45 0 4.463.8q2.012.8 3.212 2.1q1.1-1.325 1.713-2.95Q22 13.825 22 12q0-2.075-.788-3.887q-.787-1.813-2.15-3.175q-1.362-1.363-3.175-2.151Q14.075 2 12 2q-2.05 0-3.875.787q-1.825.788-3.187 2.151Q3.575 6.3 2.788 8.113Q2 9.925 2 12q0 1.825.6 3.463q.6 1.637 1.7 2.937Z"/>'},data$p={width:24,height:24,body:'<path fill="currentColor" d="M16.15 13H5q-.425 0-.713-.288T4 12q0-.425.288-.713T5 11h11.15L13.3 8.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.313t.712.288L19.3 11.3q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.575 4.575q-.3.3-.712.288t-.713-.313q-.275-.3-.288-.7t.288-.7L16.15 13Z"/>'};var zhCn={exports:{}};(function(a,j){(function(_e,et){a.exports=et(dayjs_minExports)})(commonjsGlobal,function(_e){function et(ot){return ot&&typeof ot=="object"&&"default"in ot?ot:{default:ot}}var nt=et(_e),tt={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(ot,ct){return ct==="W"?ot+"周":ot+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(ot,ct){var ft=100*ot+ct;return ft<600?"凌晨":ft<900?"早上":ft<1100?"上午":ft<1300?"中午":ft<1800?"下午":"晚上"}};return nt.default.locale(tt,null,!0),tt})})(zhCn);var updateLocale$1={exports:{}};(function(a,j){(function(_e,et){a.exports=et()})(commonjsGlobal,function(){return function(_e,et,nt){nt.updateLocale=function(tt,ot){var ct=nt.Ls[tt];if(ct)return(ot?Object.keys(ot):[]).forEach(function(ft){ct[ft]=ot[ft]}),ct}}})})(updateLocale$1);var updateLocaleExports=updateLocale$1.exports;const updateLocale=getDefaultExportFromCjs$1(updateLocaleExports);defaultDayjs.extend(localizedFormatPlugin);defaultDayjs.extend(utc$1);defaultDayjs.extend(timezone$1);defaultDayjs.extend(updateLocale);defaultDayjs.extend(relativeTime$1);defaultDayjs.updateLocale("zh-cn",{relativeTime:{future:"%s后",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"}});setDateTool(defaultDayjs);function RelativeTime({value:a,locale:j,withoutSuffix:_e,from:et,to:nt,type:tt,tz:ot,relativeRange:ct,...ft}){if(!a)return"-";const ht=j==="zh"?"zh-cn":"en-us",dt=defaultDayjs(a).locale(ht);ot&&dt.tz(ot);const yt=formatToDatetime$1(a,{locale:ht,tz:ot});let Tt;if(et)Tt=dt.from(et,_e);else if(nt)Tt=dt.to(nt,_e);else if(ct){const Rt=dt.diff(defaultDayjs());Math.abs(Rt)>ct&&(Tt=yt)}Tt||(Tt=dt.fromNow(_e));let St=Tt,At=yt;return tt==="absolute"&&(St=yt,At=Tt),jsxRuntimeExports.jsx(Tooltip,{title:At,placement:"top-end",enterTouchDelay:0,children:jsxRuntimeExports.jsx("span",{...ft,children:St})})}RelativeTime.propTypes={value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired,locale:PropTypes.string,withoutSuffix:PropTypes.bool,from:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),to:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),type:PropTypes.oneOf(["relative","absolute"]),tz:PropTypes.string,relativeRange:PropTypes.number};RelativeTime.defaultProps={locale:"en",withoutSuffix:!1,from:"",to:"",type:"relative",tz:void 0,relativeRange:void 0};const data$o={width:24,height:24,body:'<path fill="currentColor" d="M7 7H5a2 2 0 0 0-2 2v8h2v-4h2v4h2V9a2 2 0 0 0-2-2m0 4H5V9h2m7-2h-4v10h2v-4h2a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2m0 4h-2V9h2m6 0v6h1v2h-4v-2h1V9h-1V7h4v2Z"/>'},data$n={width:24,height:24,body:'<path fill="currentColor" d="M5 17q-.425 0-.713-.288T4 16v-4q0-.425.288-.713T5 11q.425 0 .713.288T6 12v4q0 .425-.288.713T5 17Zm4 0q-.825 0-1.413-.588T7 15V9q0-.825.588-1.413T9 7h2q.825 0 1.413.588T13 9v6q0 .825-.588 1.413T11 17H9Zm0-2h2V9H9v6Zm6 2q-.425 0-.713-.288T14 16q0-.425.288-.713T15 15h3v-2h-2q-.825 0-1.413-.588T14 11V9q0-.825.588-1.413T16 7h3q.425 0 .713.288T20 8q0 .425-.288.713T19 9h-3v2h2q.825 0 1.413.588T20 13v2q0 .825-.588 1.413T18 17h-3ZM5 9q-.425 0-.713-.288T4 8q0-.425.288-.713T5 7q.425 0 .713.288T6 8q0 .425-.288.713T5 9Z"/>'},data$m={width:24,height:24,body:'<path fill="currentColor" d="M12 22q-2.05 0-3.875-.788t-3.188-2.15q-1.362-1.362-2.15-3.187T2 12q0-2.075.788-3.888t2.15-3.174Q6.3 3.575 8.124 2.788T12 2q2.075 0 3.888.788t3.174 2.15q1.363 1.362 2.15 3.175T22 12q0 2.05-.788 3.875t-2.15 3.188q-1.362 1.362-3.175 2.15T12 22Zm0-2.05q.65-.9 1.125-1.875T13.9 16h-3.8q.3 1.1.775 2.075T12 19.95Zm-2.6-.4q-.45-.825-.788-1.713T8.05 16H5.1q.725 1.25 1.813 2.175T9.4 19.55Zm5.2 0q1.4-.45 2.488-1.375T18.9 16h-2.95q-.225.95-.562 1.838T14.6 19.55ZM4.25 14h3.4q-.075-.5-.113-.988T7.5 12q0-.525.038-1.012T7.65 10h-3.4q-.125.5-.188.988T4 12q0 .525.063 1.012T4.25 14Zm5.4 0h4.7q.075-.5.113-.988T14.5 12q0-.525-.038-1.012T14.35 10h-4.7q-.075.5-.113.988T9.5 12q0 .525.038 1.012T9.65 14Zm6.7 0h3.4q.125-.5.188-.988T20 12q0-.525-.063-1.012T19.75 10h-3.4q.075.5.113.988T16.5 12q0 .525-.038 1.012T16.35 14Zm-.4-6h2.95q-.725-1.25-1.812-2.175T14.6 4.45q.45.825.788 1.713T15.95 8ZM10.1 8h3.8q-.3-1.1-.775-2.075T12 4.05q-.65.9-1.125 1.875T10.1 8Zm-5 0h2.95q.225-.95.563-1.838T9.4 4.45Q8 4.9 6.912 5.825T5.1 8Z"/>'},data$l={width:24,height:24,body:'<path fill="currentColor" d="M1 18q.225-2.675 1.638-4.925T6.4 9.5L4.55 6.3q-.15-.225-.075-.475T4.8 5.45q.2-.125.45-.05t.4.3L7.5 8.9Q9.65 8 12 8t4.5.9l1.85-3.2q.15-.225.4-.3t.45.05q.25.125.325.375t-.075.475L17.6 9.5q2.35 1.325 3.762 3.575T23 18H1Zm6-2.75q.525 0 .888-.363T8.25 14q0-.525-.363-.888T7 12.75q-.525 0-.888.363T5.75 14q0 .525.363.888T7 15.25Zm10 0q.525 0 .888-.363T18.25 14q0-.525-.363-.888T17 12.75q-.525 0-.888.363T15.75 14q0 .525.363.888t.887.362Z"/>'},data$k={width:24,height:24,body:'<path fill="currentColor" d="M14.6 8.075q0-1.075-.712-1.725T12 5.7q-.725 0-1.313.313t-1.012.912q-.4.575-1.088.663T7.4 7.225q-.35-.325-.388-.8t.238-.9q.8-1.2 2.038-1.863T12 3q2.425 0 3.938 1.375t1.512 3.6q0 1.125-.475 2.025t-1.75 2.125q-.925.875-1.25 1.363T13.55 14.6q-.1.6-.513 1t-.987.4q-.575 0-.988-.388t-.412-.962q0-.975.425-1.788T12.5 11.15q1.275-1.125 1.688-1.738t.412-1.337ZM12 22q-.825 0-1.413-.588T10 20q0-.825.588-1.413T12 18q.825 0 1.413.588T14 20q0 .825-.588 1.413T12 22Z"/>'},data$j={width:24,height:24,body:'<path fill="currentColor" d="M4 20q-.825 0-1.413-.588T2 18V6q0-.825.588-1.413T4 4h16q.825 0 1.413.588T22 6v12q0 .825-.588 1.413T20 20H4ZM20 8l-7.475 4.675q-.125.075-.263.113t-.262.037q-.125 0-.263-.037t-.262-.113L4 8v10h16V8Zm-8 3l8-5H4l8 5ZM4 8v.25v-1.475v.025V6v.8v-.012V8.25V8v10V8Z"/>'};function WalletOSIcon({loading:a,walletOS:j,provider:_e,color:et}){return a?jsxRuntimeExports.jsx(Icon,{icon:data$k,style:{color:"transparent"}}):_e===LOGIN_PROVIDER$1.AUTH0?jsxRuntimeExports.jsx(Icon,{icon:data$j,style:{color:et,transform:"scale(0.85)"}}):j==="ios"?jsxRuntimeExports.jsx(Icon,{icon:data$n,style:{color:et,transform:"scale(1.1)"}}):j==="android"?jsxRuntimeExports.jsx(Icon,{icon:data$l,style:{color:et}}):j==="web"?jsxRuntimeExports.jsx(Icon,{icon:data$m,style:{color:et}}):j==="api"?jsxRuntimeExports.jsx(Icon,{icon:data$o,style:{color:et,transform:"scale(1.05)"}}):null}WalletOSIcon.propTypes={loading:PropTypes.bool,walletOS:PropTypes.string,provider:PropTypes.string,color:PropTypes.string};WalletOSIcon.defaultProps={loading:!1,walletOS:null,provider:null,color:"black"};function ItemWrap({children:a,...j}){return jsxRuntimeExports.jsx(Box,{...j,sx:{borderRadius:2,backgroundColor:colors$1.backgroundsBgSubtile,p:2,transition:"background-color 0.5s","&:hover":{backgroundColor:colors$1.backgroundsBgSubtileHover},...j.sx},children:a})}ItemWrap.propTypes={children:PropTypes.any.isRequired};const data$i={width:24,height:24,body:'<path fill="currentColor" d="M8 20h8v-3q0-1.65-1.175-2.825T12 13q-1.65 0-2.825 1.175T8 17v3Zm4-9q1.65 0 2.825-1.175T16 7V4H8v3q0 1.65 1.175 2.825T12 11ZM5 22q-.425 0-.713-.288T4 21q0-.425.288-.713T5 20h1v-3q0-1.525.713-2.863T8.7 12q-1.275-.8-1.987-2.138T6 7V4H5q-.425 0-.713-.288T4 3q0-.425.288-.713T5 2h14q.425 0 .713.288T20 3q0 .425-.288.713T19 4h-1v3q0 1.525-.713 2.863T15.3 12q1.275.8 1.988 2.138T18 17v3h1q.425 0 .713.288T20 21q0 .425-.288.713T19 22H5Z"/>'},data$h={width:24,height:24,body:'<path fill="currentColor" d="m5.75 18l-.4-.35q-1.3-1.15-1.825-2.625T3 12.05Q3 9.7 4.187 7.787T7.4 4.85q.35-.2.75-.025t.525.575q.125.375-.013.75t-.487.575q-1.45.8-2.313 2.213T5 12.05q0 1.125.425 2.188T6.75 16.2l.25.25V15q0-.425.288-.713T8 14q.425 0 .713.288T9 15v4q0 .425-.288.713T8 20H4q-.425 0-.713-.288T3 19q0-.425.288-.713T4 18h1.75ZM17 7.55V9q0 .425-.288.713T16 10q-.425 0-.713-.288T15 9V5q0-.425.288-.713T16 4h4q.425 0 .713.288T21 5q0 .425-.288.713T20 6h-1.75l.4.35q1.025 1.05 1.575 2.225t.7 2.425H18.9q-.125-.875-.537-1.675T17.25 7.8L17 7.55ZM17.4 23q-.2 0-.313-.113t-.162-.287l-.225-1.1q-.3-.125-.563-.263T15.6 20.9l-1.075.325q-.175.05-.325-.013T13.95 21l-.6-1q-.1-.15-.05-.325t.175-.3l.825-.725q-.05-.35-.05-.65t.05-.65l-.825-.725q-.125-.125-.175-.3t.05-.325l.6-1q.1-.15.25-.212t.325-.013l1.075.325q.275-.2.538-.337t.562-.263l.225-1.1q.05-.175.163-.288T17.4 13h1.2q.2 0 .313.113t.162.287l.225 1.1q.3.125.563.275t.537.375l1.05-.375q.175-.05.338.013t.262.212l.6 1.05q.1.15.063.325t-.163.3l-.85.725q.05.3.05.625t-.05.625l.825.725q.125.125.175.3t-.05.325l-.6 1q-.1.15-.25.213t-.325.012L20.4 20.9q-.275.2-.537.338t-.563.262l-.225 1.1q-.05.175-.163.288T18.6 23h-1.2Zm.6-3q.825 0 1.413-.588T20 18q0-.825-.588-1.413T18 16q-.825 0-1.413.588T16 18q0 .825.588 1.413T18 20Z"/>'};function LoadingMask({size:a,padding:j,borderWidth:_e,borderRadius:et,duration:nt,children:tt}){const ot=a,ct=et??ot/8,ft=_e??ot/32,ht=j??ot*.2-ft,dt=nt??2.5;return jsxRuntimeExports.jsxs(Box,{sx:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:ot,height:ot,position:"relative"},children:[jsxRuntimeExports.jsx(Box,{sx:{pointerEvents:"none",position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",width:ot,height:ot,overflow:"hidden",borderRadius:`${ct}px`,backgroundColor:colors$1.strokeBorderBase,"&::before,&::after":{content:'""',position:"absolute",top:0,bottom:0,left:0,right:0,pointerEvents:"none"},"&::after":{left:ft,right:ft,top:ft,bottom:ft,backgroundColor:"white",borderRadius:`${ct-ft}px`},"&::before":{background:`conic-gradient(from 45deg, ${colors$1.foregroundsFgInteractiveTransparent} 0%, ${colors$1.foregroundsFgInteractiveTransparent} 50%, ${colors$1.foregroundsFgInteractive} 90%, ${colors$1.foregroundsFgInteractive} 100%)`,transform:"scale(100)",animation:`rotate ${dt}s linear infinite`,"@keyframes rotate":{"0%":{transform:"scale(100) rotate(0deg)"},"100%":{transform:"scale(100) rotate(360deg)"}}}}}),jsxRuntimeExports.jsx(Box,{sx:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",width:ot-ht-ft,height:ot-ht-ft},children:tt})]})}LoadingMask.propTypes={size:PropTypes.number,padding:PropTypes.number,borderRadius:PropTypes.number,borderWidth:PropTypes.number,duration:PropTypes.number,children:PropTypes.node.isRequired};LoadingMask.defaultProps={size:64,padding:void 0,borderWidth:void 0,duration:void 0,borderRadius:void 0};var DidWallet={};Object.defineProperty(DidWallet,"__esModule",{value:!0});var default_1$4=DidWallet.default=void 0;_interopRequireDefault$4(reactExports);var _jsxRuntime$3=jsxRuntimeExports;function _interopRequireDefault$4(a){return a&&a.__esModule?a:{default:a}}function ownKeys$3(a,j){var _e=Object.keys(a);if(Object.getOwnPropertySymbols){var et=Object.getOwnPropertySymbols(a);j&&(et=et.filter(function(nt){return Object.getOwnPropertyDescriptor(a,nt).enumerable})),_e.push.apply(_e,et)}return _e}function _objectSpread$1(a){for(var j=1;j<arguments.length;j++){var _e=arguments[j]!=null?arguments[j]:{};j%2?ownKeys$3(Object(_e),!0).forEach(function(et){_defineProperty$1(a,et,_e[et])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(_e)):ownKeys$3(Object(_e)).forEach(function(et){Object.defineProperty(a,et,Object.getOwnPropertyDescriptor(_e,et))})}return a}function _defineProperty$1(a,j,_e){return(j=_toPropertyKey$1(j))in a?Object.defineProperty(a,j,{value:_e,enumerable:!0,configurable:!0,writable:!0}):a[j]=_e,a}function _toPropertyKey$1(a){var j=_toPrimitive$1(a,"string");return typeof j=="symbol"?j:j+""}function _toPrimitive$1(a,j){if(typeof a!="object"||!a)return a;var _e=a[Symbol.toPrimitive];if(_e!==void 0){var et=_e.call(a,j||"default");if(typeof et!="object")return et;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(a)}var Component$1=function a(j){return(0,_jsxRuntime$3.jsxs)("svg",_objectSpread$1(_objectSpread$1({},j),{},{children:[(0,_jsxRuntime$3.jsxs)("g",{clipPath:"url(#clip0)",children:[(0,_jsxRuntime$3.jsx)("rect",{width:"32",height:"32",rx:"6",fill:"url(#paint0_linear)"}),(0,_jsxRuntime$3.jsx)("path",{d:"M3.52 7.36A2.56 2.56 0 0 1 6.08 4.8h19.84a2.56 2.56 0 0 1 2.56 2.56v12.16a2.56 2.56 0 0 1-2.56 2.56H6.08a2.56 2.56 0 0 1-2.56-2.56V7.36z",fill:"#9FCBFF",filter:"url(#filter0_i)"}),(0,_jsxRuntime$3.jsx)("path",{d:"M2.56 9.28a2.56 2.56 0 0 1 2.56-2.56h21.76a2.56 2.56 0 0 1 2.56 2.56v13.6a2.56 2.56 0 0 1-2.56 2.56H5.12a2.56 2.56 0 0 1-2.56-2.56V9.28z",fill:"url(#paint1_linear)",filter:"url(#filter1_d)"}),(0,_jsxRuntime$3.jsx)("path",{d:"M0 22.32l32-6.16V32H0v-9.68z",fill:"url(#paint2_linear)",filter:"url(#filter2_d)"}),(0,_jsxRuntime$3.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.536 9.248h8.288c.408 0 .74.3.74.672v4.64c0 .371-.332.672-.74.672H5.536c-.408 0-.74-.3-.74-.672v-.04a.158.158 0 1 0-.316 0v.04c0 .53.473.96 1.056.96h8.288c.583 0 1.056-.43 1.056-.96V9.92c0-.53-.473-.96-1.056-.96H5.536c-.583 0-1.056.43-1.056.96v.04a.158.158 0 0 0 .317 0v-.04c0-.371.33-.672.739-.672zm-1.023 4.638a.127.127 0 0 0 .087.034h1.267c.472 0 .83-.107 1.076-.322.25-.217.381-.548.397-.993a11.281 11.281 0 0 0 0-.734c-.012-.426-.148-.751-.406-.975-.258-.224-.622-.336-1.09-.336H4.6a.127.127 0 0 0-.087.034.117.117 0 0 0-.033.086v3.12c0 .032.011.06.033.086zm1.794-.806c-.099.1-.253.149-.464.149h-.502V11.25h.478c.21 0 .369.051.474.154.108.102.166.26.172.475.006.09.01.208.01.355s-.004.267-.01.36c-.006.221-.059.383-.158.485zm1.63.806a.127.127 0 0 0 .087.034h.64a.116.116 0 0 0 .087-.034.11.11 0 0 0 .038-.086v-3.12a.11.11 0 0 0-.038-.086.116.116 0 0 0-.086-.034h-.641a.127.127 0 0 0-.087.034.117.117 0 0 0-.033.086v3.12c0 .032.011.06.033.086zm1.637.034a.127.127 0 0 1-.086-.034.128.128 0 0 1-.033-.086v-3.12c0-.035.01-.064.033-.086a.127.127 0 0 1 .086-.034h1.244c.469 0 .832.112 1.09.336.259.224.394.549.407.974a11.244 11.244 0 0 1 0 .735c-.016.445-.148.776-.397.993-.245.215-.604.322-1.076.322H9.574zm1.244-.691c.21 0 .365-.05.464-.149.099-.102.152-.264.158-.485a5.52 5.52 0 0 0 .01-.36c0-.147-.004-.265-.01-.355-.006-.214-.064-.373-.172-.475-.106-.103-.263-.154-.474-.154h-.478v1.978h.502zm2.468-1.382a.288.288 0 0 1-.288-.286.288.288 0 0 1 .576 0c0 .158-.13.286-.288.286zm0 1.495a.288.288 0 0 1-.288-.286.288.288 0 0 1 .576 0c0 .158-.13.287-.288.287z",fill:"#4598FA"})]}),(0,_jsxRuntime$3.jsxs)("defs",{children:[(0,_jsxRuntime$3.jsxs)("filter",{id:"filter0_i",x:"3.52",y:"1.8",width:"24.96",height:"20.28",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,_jsxRuntime$3.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,_jsxRuntime$3.jsx)("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,_jsxRuntime$3.jsx)("feOffset",{dy:"-3"}),(0,_jsxRuntime$3.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,_jsxRuntime$3.jsx)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.2 0"}),(0,_jsxRuntime$3.jsx)("feBlend",{in2:"shape",result:"effect1_innerShadow"})]}),(0,_jsxRuntime$3.jsxs)("filter",{id:"filter1_d",x:"-1.44",y:"1.72",width:"34.88",height:"26.72",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,_jsxRuntime$3.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,_jsxRuntime$3.jsx)("feOffset",{dy:"-1"}),(0,_jsxRuntime$3.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{values:"0 0 0 0 0.220767 0 0 0 0 0.470803 0 0 0 0 0.701605 0 0 0 0.18 0"}),(0,_jsxRuntime$3.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow"}),(0,_jsxRuntime$3.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),(0,_jsxRuntime$3.jsxs)("filter",{id:"filter2_d",x:"-5",y:"11.16",width:"42",height:"25.84",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,_jsxRuntime$3.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,_jsxRuntime$3.jsx)("feOffset",{}),(0,_jsxRuntime$3.jsx)("feGaussianBlur",{stdDeviation:"2.5"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{values:"0 0 0 0 0.14382 0 0 0 0 0.205065 0 0 0 0 0.522634 0 0 0 0.25 0"}),(0,_jsxRuntime$3.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow"}),(0,_jsxRuntime$3.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),(0,_jsxRuntime$3.jsxs)("linearGradient",{id:"paint0_linear",x1:"16",x2:"16",y2:"32",gradientUnits:"userSpaceOnUse",children:[(0,_jsxRuntime$3.jsx)("stop",{stopColor:"#4F9DF6"}),(0,_jsxRuntime$3.jsx)("stop",{offset:"1",stopColor:"#0A79F8"})]}),(0,_jsxRuntime$3.jsxs)("linearGradient",{id:"paint1_linear",x1:"16",y1:"6.72",x2:"16",y2:"25.44",gradientUnits:"userSpaceOnUse",children:[(0,_jsxRuntime$3.jsx)("stop",{stopColor:"#fff"}),(0,_jsxRuntime$3.jsx)("stop",{offset:"1",stopColor:"#ECEFFF"})]}),(0,_jsxRuntime$3.jsxs)("linearGradient",{id:"paint2_linear",x1:"16",y1:"19.2",x2:"18.48",y2:"32",gradientUnits:"userSpaceOnUse",children:[(0,_jsxRuntime$3.jsx)("stop",{offset:".007",stopColor:"#77B2F6"}),(0,_jsxRuntime$3.jsx)("stop",{offset:".055",stopColor:"#4F9DF6"}),(0,_jsxRuntime$3.jsx)("stop",{offset:"1",stopColor:"#4598FA"})]}),(0,_jsxRuntime$3.jsx)("clipPath",{id:"clip0",children:(0,_jsxRuntime$3.jsx)("rect",{width:"32",height:"32",rx:"6",fill:"#fff"})})]})]}))};Component$1.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};Component$1.displayName="did-wallet";default_1$4=DidWallet.default=Component$1;function Success({size:a,backgroundColor:j,borderWidth:_e}){const et=a-_e*2;return jsxRuntimeExports.jsxs(Box,{className:"check-icon",sx:{width:et,height:et,position:"relative",borderRadius:"100%","&, *, *::before, *::after":{boxSizing:"content-box !important"},border:nt=>`${_e}px solid ${nt.palette.success.main}`,"&::before, &::after":{content:'""',height:"125%",position:"absolute",background:j,transform:"rotate(-45deg)"},"&::before":{top:`${_e/2+1}px`,left:`-${_e/2}px`,width:`calc(32.5% + ${_e}px)`,transformOrigin:"100% 50%",borderRadius:"100% 0 0 100%"},"&::after":{top:0,left:"37.5%",width:`calc(70% + ${_e}px)`,transformOrigin:"0 50%",borderRadius:"0 100% 100% 0",animation:"rotate-circle 4.25s ease-in"},".icon-line":{height:`${_e+1}px`,backgroundColor:nt=>nt.palette.success.main,display:"block",borderRadius:"100vw",position:"absolute",zIndex:10},"@keyframes rotate-circle":{"0%":{transform:"rotate(-45deg)"},"5%":{transform:"rotate(-45deg)"},"12%":{transform:"rotate(-405deg)"},"100%":{transform:"rotate(-405deg)"}}},children:[jsxRuntimeExports.jsx(Box,{component:"span",className:"icon-line line-tip",sx:{top:"57.5%",left:"17.5%",width:"31.25%",transform:"rotate(45deg)",animation:"icon-line-tip 0.75s","@keyframes icon-line-tip":{"0%":{width:"0",left:"1px",top:"23.75%"},"54%":{width:"0",left:"1px",top:"23.75%"},"70%":{width:"62.5%",left:"-10%",top:"46.25%"},"84%":{width:"21.25%",left:"26.25%",top:"60%"},"100%":{width:"31.25",left:"17.5%",top:"56.25%"}}}}),jsxRuntimeExports.jsx(Box,{component:"span",className:"icon-line line-long",sx:{top:"47.5%",right:"10%",width:"58.75%",transform:"rotate(-45deg)",animation:"icon-line-long 0.75s","@keyframes icon-line-long":{"0%":{width:"0",right:"57.5%",top:"67.5%"},"65%":{width:"0",right:"57.5%",top:"67.5%"},"84%":{width:"68.75%",right:"0px",top:"43.75%"},"100%":{width:"58.75%",right:"10%",top:"47.5%"}}}}),jsxRuntimeExports.jsx(Box,{className:"icon-circle",sx:{top:`-${_e}px`,left:`-${_e}px`,zIndex:10,width:et,height:et,borderRadius:"100%",position:"absolute",boxSizing:"contentBox",border:`${_e}px solid rgba(76, 175, 80, 0.5)`}}),jsxRuntimeExports.jsx(Box,{className:"icon-fix",sx:{top:`calc(8% - ${Math.sqrt(_e)}px)`,width:_e+1,left:`calc(32% - ${Math.sqrt(_e)}px)`,zIndex:1,height:et+_e*2,position:"absolute",transform:"rotate(-45deg)",backgroundColor:j}})]})}Success.propTypes={size:PropTypes.number,borderWidth:PropTypes.number,backgroundColor:PropTypes.string};Success.defaultProps={size:64,borderWidth:4,backgroundColor:"white"};function Button({...a}){return jsxRuntimeExports.jsx(Button$1,{variant:"outlined",color:"inherit",...a,sx:{borderRadius:2,borderColor:colors$1.strokeBorderBase,color:colors$1.foregroundsFgBase,backgroundColor:"#fff",fontWeight:500,fontSize:13,...a.sx}})}function BaseStatus({icon:a,title:j,color:_e,description:et,extraContent:nt,actions:tt}){return jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:1.5},children:[reactExports.isValidElement(a)?a:jsxRuntimeExports.jsx(Box,{sx:{backgroundColor:_e,borderRadius:"100%",fontSize:0},children:jsxRuntimeExports.jsx(Icon,{icon:a,fontSize:52,style:{transform:"scale(0.7)",color:"white"}})}),jsxRuntimeExports.jsxs(Box,{sx:{textAlign:"center"},children:[jsxRuntimeExports.jsx(Typography,{variant:"h6",sx:{fontWeight:500,color:_e},children:j}),jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{color:colors$1.foregroundsFgSubtile,overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":"3",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:et})]}),nt,jsxRuntimeExports.jsx(Box,{children:tt})]})}BaseStatus.propTypes={icon:PropTypes.node,title:PropTypes.string,color:PropTypes.string,description:PropTypes.string,extraContent:PropTypes.node,actions:PropTypes.node};BaseStatus.defaultProps={icon:null,title:"",color:colors$1.foregroundsFgBase,description:"",extraContent:null,actions:null};function MfaCode({title:a,mfaCode:j}){return jsxRuntimeExports.jsxs(Box,{className:"status-mfa",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",border:`1px solid ${colors$1.strokeBorderBase}`,borderRadius:2,maxWidth:"360px",backgroundColor:"transparent",p:1},children:[jsxRuntimeExports.jsx(Box,{className:"status-mfa-tip",sx:{textAlign:"center",textWrap:"balance"},children:a}),jsxRuntimeExports.jsx(Typography,{className:"status-mfa-code",sx:{mt:1,lineHeight:1,fontSize:"36px",fontWeight:700,letterSpacing:1},children:j})]})}MfaCode.propTypes={title:PropTypes.string,mfaCode:PropTypes.number};MfaCode.defaultProps={title:"",mfaCode:0};function ConnectStatus({status:a,nextWorkflow:j,mfaCode:_e,onCancel:et,onRetry:nt,onClose:tt,messages:ot,locale:ct,...ft}){const ht=translations$3[ct]||translations$3.en;return jsxRuntimeExports.jsxs(Box,{...ft,sx:{py:2,minHeight:200,...ft.sx},children:[a==="scanned"&&!j&&jsxRuntimeExports.jsx(BaseStatus,{icon:jsxRuntimeExports.jsx(LoadingMask,{size:52,borderRadius:12,children:jsxRuntimeExports.jsx(default_1$4,{style:{width:"100%",height:"100%"}})}),title:ht.requestConnect,description:ht.continueInWallet,extraContent:_e>0&&jsxRuntimeExports.jsx(MfaCode,{mfaCode:_e,title:ht.mfaCode}),actions:jsxRuntimeExports.jsx(Button,{onClick:et,children:ht.back})}),a==="scanned"&&!!j&&jsxRuntimeExports.jsx(BaseStatus,{color:colors$1.foregroundsFgInteractive,icon:data$i,title:ht.wait,description:ht.waiting,extraContent:_e>0&&jsxRuntimeExports.jsx(MfaCode,{mfaCode:_e,title:ht.mfaCode}),actions:jsxRuntimeExports.jsx(Button,{onClick:et,children:ht.back})}),a==="succeed"&&jsxRuntimeExports.jsx(BaseStatus,{color:"#3ab39d",icon:jsxRuntimeExports.jsx(Success,{size:52}),title:ht.success,description:ot.success,actions:jsxRuntimeExports.jsx(Button,{onClick:tt,children:ht.close})}),a==="error"&&jsxRuntimeExports.jsx(BaseStatus,{color:colors$1.buttonsButtonDanger,icon:data$r,title:ht.failed,description:ot.error||ht.error,actions:jsxRuntimeExports.jsx(Button,{onClick:nt,children:ht.retry})}),a==="busy"&&jsxRuntimeExports.jsx(BaseStatus,{color:"#ed6c02",icon:data$h,title:ht.busyTitle,description:ot.error||ht.busyDesc,actions:jsxRuntimeExports.jsx(Button,{onClick:nt,children:ht.retry})})]})}ConnectStatus.propTypes={status:PropTypes.string,nextWorkflow:PropTypes.string,mfaCode:PropTypes.number,onCancel:PropTypes.func,onRetry:PropTypes.func,onClose:PropTypes.func,messages:PropTypes.shape({confirm:PropTypes.string.isRequired,success:PropTypes.any.isRequired,error:PropTypes.any.isRequired}).isRequired,locale:PropTypes.oneOf(["en","zh"])};ConnectStatus.defaultProps={status:"",nextWorkflow:"",mfaCode:0,onCancel:noop$7,onRetry:noop$7,onClose:noop$7,locale:"en"};function QuickLoginItem({userSession:a,locale:j}){var et,nt,tt,ot;const _e=getSourceProvider(a==null?void 0:a.user)==="wallet";return jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer","&:hover":{backgroundColor:colors$1.surfacePrimarySubtitle}},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flex:1,overflow:"hidden"},children:[jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{src:a.user.avatar,did:a.user.did,size:48,variant:"circle",shape:"circle"}),jsxRuntimeExports.jsxs(Box,{sx:{flex:1,overflow:"hidden"},children:[jsxRuntimeExports.jsxs(Typography,{sx:{fontSize:"16px",fontWeight:"bold",display:"flex",alignItems:"center",gap:1,color:colors$1.textBase},children:[a.user.fullName,jsxRuntimeExports.jsx(Chip,{label:((et=a.user)==null?void 0:et.roleTitle)||((nt=a.user)==null?void 0:nt.role),size:"small",variant:"outlined",sx:()=>({height:"auto",fontWeight:"bold",fontSize:"12px",borderColor:colors$1.lineBorderStrong,color:colors$1.textSubtitle})})]}),_e?jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[jsxRuntimeExports.jsx(WalletOSIcon,{provider:(tt=a==null?void 0:a.extra)==null?void 0:tt.provider,walletOS:(ot=a==null?void 0:a.extra)==null?void 0:ot.walletOS,color:colors$1.textSubtitle}),jsxRuntimeExports.jsx(DID,{did:a.user.did,size:12,sx:{lineHeight:1,fontSize:"12px",mt:.5},responsive:!0})]}):jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"12px",color:colors$1.textSubtitle},children:a.user.email})]})]}),a.updatedAt&&jsxRuntimeExports.jsx(Box,{component:"span",sx:{color:colors$1.textMuted,fontSize:"12px",flexShrink:0},children:jsxRuntimeExports.jsx(RelativeTime,{value:a.updatedAt,locale:j})})]})}QuickLoginItem.propTypes={userSession:PropTypes.shape({user:PropTypes.shape({avatar:PropTypes.string,did:PropTypes.string,fullName:PropTypes.string,role:PropTypes.string,roleTitle:PropTypes.string,email:PropTypes.string}),extra:PropTypes.shape({walletOS:PropTypes.string,provider:PropTypes.string}),updatedAt:PropTypes.string}).isRequired,locale:PropTypes.string};QuickLoginItem.defaultProps={locale:"en"};function QuickConnect({userSessions:a,onLogin:j,onClose:_e,messages:et,onRetry:nt,onLoginAnother:tt}){const{t:ot,locale:ct,changeStatus:ft,blocklet:ht}=useStateContext(),dt=ot("otherAccount"),yt=useReactive({loadingId:null,status:"created",messages:{confirm:et.confirm,success:et.success,error:""},reset(){this.loadingId=null,this.status="created",this.messages.error=""}}),Tt=useMemoizedFn(async At=>{yt.loadingId=At.id;try{await j({...At,appPid:ht==null?void 0:ht.appPid}),yt.status="succeed"}catch(Rt){yt.status="error",yt.messages.error=Rt.messages}finally{yt.loadingId=null}}),St=useMemoizedFn(()=>{yt.reset(),nt()});return reactExports.useEffect(()=>{ft(yt.status)},[ft,yt.status]),yt.status!=="created"?jsxRuntimeExports.jsx(ConnectStatus,{status:yt.status,onRetry:St,onClose:_e,messages:yt.messages,locale:ct,className:"auth-status"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[a.map(At=>{var Rt;return jsxRuntimeExports.jsx(Tooltip,{title:ot("loginWithThisAccount"),arrow:!0,placement:"top",children:jsxRuntimeExports.jsxs(Box,{sx:{position:"relative"},onClick:()=>Tt(At),children:[yt.loadingId===At.id?jsxRuntimeExports.jsx(LinearProgress,{sx:{height:"2px",position:"absolute",top:0,left:0,right:0}}):null,jsxRuntimeExports.jsx(QuickLoginItem,{userSession:At,locale:ct})]})},(Rt=At==null?void 0:At.user)==null?void 0:Rt.did)}),jsxRuntimeExports.jsx(Tooltip,{title:ot("loginWithAnotherAccount"),arrow:!0,placement:"top",children:jsxRuntimeExports.jsx(Box,{children:jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer","&:hover":{backgroundColor:colors$1.surfacePrimarySubtitle},color:colors$1.textBase},onClick:tt,children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Box,{sx:{fontSize:0,p:.5},children:jsxRuntimeExports.jsx(Icon,{icon:data$q,fontSize:"40px"})}),jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"16px",fontWeight:"bold"},children:dt})]}),jsxRuntimeExports.jsx(Icon,{className:"other-item-icon",icon:data$p,fontSize:"24px"})]})})})]})}QuickConnect.propTypes={userSessions:PropTypes.array.isRequired,onLogin:PropTypes.func.isRequired,onRetry:PropTypes.func.isRequired,onClose:PropTypes.func.isRequired,onLoginAnother:PropTypes.func.isRequired,messages:PropTypes.object};QuickConnect.defaultProps={messages:{}};var HASH_UNDEFINED$2="__lodash_hash_undefined__";function setCacheAdd$1(a){return this.__data__.set(a,HASH_UNDEFINED$2),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(a){return this.__data__.has(a)}var _setCacheHas=setCacheHas$1,MapCache$2=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$3(a){var j=-1,_e=a==null?0:a.length;for(this.__data__=new MapCache$2;++j<_e;)this.add(a[j])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd;SetCache$3.prototype.has=setCacheHas;var _SetCache=SetCache$3;function baseFindIndex$1(a,j,_e,et){for(var nt=a.length,tt=_e+(et?1:-1);et?tt--:++tt<nt;)if(j(a[tt],tt,a))return tt;return-1}var _baseFindIndex=baseFindIndex$1;function baseIsNaN$1(a){return a!==a}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(a,j,_e){for(var et=_e-1,nt=a.length;++et<nt;)if(a[et]===j)return et;return-1}var _strictIndexOf=strictIndexOf$1,baseFindIndex=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$2(a,j,_e){return j===j?strictIndexOf(a,j,_e):baseFindIndex(a,baseIsNaN,_e)}var _baseIndexOf=baseIndexOf$2,baseIndexOf$1=_baseIndexOf;function arrayIncludes$3(a,j){var _e=a==null?0:a.length;return!!_e&&baseIndexOf$1(a,j,0)>-1}var _arrayIncludes=arrayIncludes$3;function arrayIncludesWith$2(a,j,_e){for(var et=-1,nt=a==null?0:a.length;++et<nt;)if(_e(j,a[et]))return!0;return!1}var _arrayIncludesWith=arrayIncludesWith$2;function cacheHas$3(a,j){return a.has(j)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arrayIncludes$2=_arrayIncludes,arrayIncludesWith$1=_arrayIncludesWith,arrayMap$3=_arrayMap,baseUnary$1=_baseUnary,cacheHas$2=_cacheHas,nativeMin=Math.min;function baseIntersection$1(a,j,_e){for(var et=_e?arrayIncludesWith$1:arrayIncludes$2,nt=a[0].length,tt=a.length,ot=tt,ct=Array(tt),ft=1/0,ht=[];ot--;){var dt=a[ot];ot&&j&&(dt=arrayMap$3(dt,baseUnary$1(j))),ft=nativeMin(dt.length,ft),ct[ot]=!_e&&(j||nt>=120&&dt.length>=120)?new SetCache$2(ot&&dt):void 0}dt=a[0];var yt=-1,Tt=ct[0];e:for(;++yt<nt&&ht.length<ft;){var St=dt[yt],At=j?j(St):St;if(St=_e||St!==0?St:0,!(Tt?cacheHas$2(Tt,At):et(ht,At,_e))){for(ot=tt;--ot;){var Rt=ct[ot];if(!(Rt?cacheHas$2(Rt,At):et(a[ot],At,_e)))continue e}Tt&&Tt.push(At),ht.push(St)}}return ht}var _baseIntersection=baseIntersection$1,isArrayLikeObject$1=isArrayLikeObject_1;function castArrayLikeObject$1(a){return isArrayLikeObject$1(a)?a:[]}var _castArrayLikeObject=castArrayLikeObject$1,arrayMap$2=_arrayMap,baseIntersection=_baseIntersection,baseRest$2=_baseRest,castArrayLikeObject=_castArrayLikeObject,intersection=baseRest$2(function(a){var j=arrayMap$2(a,castArrayLikeObject);return j.length&&j[0]===a[0]?baseIntersection(j):[]}),intersection_1=intersection;const intersection$1=getDefaultExportFromCjs$1(intersection_1),data$g={width:24,height:24,body:'<path fill="currentColor" d="M19 21q-.975 0-1.75-.563T16.175 19H11q-1.65 0-2.825-1.175T7 15q0-1.65 1.175-2.825T11 11h2q.825 0 1.413-.588T15 9q0-.825-.588-1.413T13 7H7.825q-.325.875-1.088 1.438T5 9q-1.25 0-2.125-.875T2 6q0-1.25.875-2.125T5 3q.975 0 1.738.563T7.824 5H13q1.65 0 2.825 1.175T17 9q0 1.65-1.175 2.825T13 13h-2q-.825 0-1.413.588T9 15q0 .825.588 1.413T11 17h5.175q.325-.875 1.088-1.438T19 15q1.25 0 2.125.875T22 18q0 1.25-.875 2.125T19 21ZM5 7q.425 0 .713-.288T6 6q0-.425-.288-.713T5 5q-.425 0-.713.288T4 6q0 .425.288.713T5 7Z"/>'},chromeExtDownloadUrl="https://chromewebstore.google.com/detail/did-wallet/ibjflpbmadchofnbpppegdbnifdgincp",edgeExtDownloadUrl="https://microsoftedge.microsoft.com/addons/detail/did-wallet/hjgoblidjnnnamdkinbichnfbmghmafd";function WebLoginItem({tokenState:a,locale:j,webWalletUrl:_e}){const et=detectWalletExtension(),{t:nt}=useStateContext(),tt=useMemoizedFn(()=>{openWebWallet({webWalletUrl:_e,url:a.url,locale:j})}),ot=useCreation(()=>{var St;const Tt=(St=window==null?void 0:window.navigator)==null?void 0:St.userAgent;return Tt.indexOf("Edge")>-1||Tt.indexOf("Edg")>-1?"edge":Tt.indexOf("Chrome")>-1?"chrome":"unknown"},[]),ct=useCreation(()=>ot==="edge"?edgeExtDownloadUrl:ot==="chrome"?chromeExtDownloadUrl:null,[ot]),ft=useCreation(()=>et?{onClick:tt}:ct?{href:ct,target:"_blank",rel:"noopener"}:{onClick:tt},[tt]),ht=useCreation(()=>et||ct?"Web Wallet Extension":"Web Wallet",[et,ct]),dt=useCreation(()=>!et&&!ct?new URL(_e).hostname:null,[_e,ct]),yt=useCreation(()=>et?null:ct?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["You can also use"," ",jsxRuntimeExports.jsx(Box,{onClick:tt,component:"span",sx:{color:colors$1.foregroundsFgInteractive,cursor:"pointer","&:hover":{textDecoration:"underline dashed"}},children:"Web Wallet"})]}):null,[et,ct]);return jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(default_1$4,{width:"24px",height:"24px"}),jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"14px",fontWeight:500},children:ht}),dt?jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"12px",color:colors$1.textMuted},children:dt}):null]}),yt?jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"12px",color:colors$1.textMuted},children:yt}):null]})]}),jsxRuntimeExports.jsx(Button,{...ft,startIcon:jsxRuntimeExports.jsx(Icon,{icon:data$g}),children:nt("connectButton")})]})}WebLoginItem.propTypes={tokenState:PropTypes.object.isRequired,locale:PropTypes.string,webWalletUrl:PropTypes.string.isRequired};WebLoginItem.defaultProps={locale:"en"};var qrCodeStyling={exports:{}};(function(a,j){(function(_e,et){a.exports=et()})(commonjsGlobal,function(){return(()=>{var _e={192:(tt,ot)=>{var ct,ft,ht=function(){var dt=function(st,ut){var pt=st,mt=It[ut],$t=null,xt=0,vt=null,it=[],bt={},Mt=function(qt,Dt){$t=function(Vt){for(var an=new Array(Vt),Xt=0;Xt<Vt;Xt+=1){an[Xt]=new Array(Vt);for(var pn=0;pn<Vt;pn+=1)an[Xt][pn]=null}return an}(xt=4*pt+17),Lt(0,0),Lt(xt-7,0),Lt(0,xt-7),Ot(),Ht(),Ft(qt,Dt),pt>=7&&Jt(qt),vt==null&&(vt=nn(pt,mt,it)),Zt(vt,Dt)},Lt=function(qt,Dt){for(var Vt=-1;Vt<=7;Vt+=1)if(!(qt+Vt<=-1||xt<=qt+Vt))for(var an=-1;an<=7;an+=1)Dt+an<=-1||xt<=Dt+an||($t[qt+Vt][Dt+an]=0<=Vt&&Vt<=6&&(an==0||an==6)||0<=an&&an<=6&&(Vt==0||Vt==6)||2<=Vt&&Vt<=4&&2<=an&&an<=4)},Ht=function(){for(var qt=8;qt<xt-8;qt+=1)$t[qt][6]==null&&($t[qt][6]=qt%2==0);for(var Dt=8;Dt<xt-8;Dt+=1)$t[6][Dt]==null&&($t[6][Dt]=Dt%2==0)},Ot=function(){for(var qt=Ct.getPatternPosition(pt),Dt=0;Dt<qt.length;Dt+=1)for(var Vt=0;Vt<qt.length;Vt+=1){var an=qt[Dt],Xt=qt[Vt];if($t[an][Xt]==null)for(var pn=-2;pn<=2;pn+=1)for(var En=-2;En<=2;En+=1)$t[an+pn][Xt+En]=pn==-2||pn==2||En==-2||En==2||pn==0&&En==0}},Jt=function(qt){for(var Dt=Ct.getBCHTypeNumber(pt),Vt=0;Vt<18;Vt+=1){var an=!qt&&(Dt>>Vt&1)==1;$t[Math.floor(Vt/3)][Vt%3+xt-8-3]=an}for(Vt=0;Vt<18;Vt+=1)an=!qt&&(Dt>>Vt&1)==1,$t[Vt%3+xt-8-3][Math.floor(Vt/3)]=an},Ft=function(qt,Dt){for(var Vt=mt<<3|Dt,an=Ct.getBCHTypeInfo(Vt),Xt=0;Xt<15;Xt+=1){var pn=!qt&&(an>>Xt&1)==1;Xt<6?$t[Xt][8]=pn:Xt<8?$t[Xt+1][8]=pn:$t[xt-15+Xt][8]=pn}for(Xt=0;Xt<15;Xt+=1)pn=!qt&&(an>>Xt&1)==1,Xt<8?$t[8][xt-Xt-1]=pn:Xt<9?$t[8][15-Xt-1+1]=pn:$t[8][15-Xt-1]=pn;$t[xt-8][8]=!qt},Zt=function(qt,Dt){for(var Vt=-1,an=xt-1,Xt=7,pn=0,En=Ct.getMaskFunction(Dt),sn=xt-1;sn>0;sn-=2)for(sn==6&&(sn-=1);;){for(var dn=0;dn<2;dn+=1)if($t[an][sn-dn]==null){var Mn=!1;pn<qt.length&&(Mn=(qt[pn]>>>Xt&1)==1),En(an,sn-dn)&&(Mn=!Mn),$t[an][sn-dn]=Mn,(Xt-=1)==-1&&(pn+=1,Xt=7)}if((an+=Vt)<0||xt<=an){an-=Vt,Vt=-Vt;break}}},nn=function(qt,Dt,Vt){for(var an=Bt.getRSBlocks(qt,Dt),Xt=Kt(),pn=0;pn<Vt.length;pn+=1){var En=Vt[pn];Xt.put(En.getMode(),4),Xt.put(En.getLength(),Ct.getLengthInBits(En.getMode(),qt)),En.write(Xt)}var sn=0;for(pn=0;pn<an.length;pn+=1)sn+=an[pn].dataCount;if(Xt.getLengthInBits()>8*sn)throw"code length overflow. ("+Xt.getLengthInBits()+">"+8*sn+")";for(Xt.getLengthInBits()+4<=8*sn&&Xt.put(0,4);Xt.getLengthInBits()%8!=0;)Xt.putBit(!1);for(;!(Xt.getLengthInBits()>=8*sn||(Xt.put(236,8),Xt.getLengthInBits()>=8*sn));)Xt.put(17,8);return function(dn,Mn){for(var yn=0,An=0,Tn=0,gn=new Array(Mn.length),vn=new Array(Mn.length),Ln=0;Ln<Mn.length;Ln+=1){var Sn=Mn[Ln].dataCount,In=Mn[Ln].totalCount-Sn;An=Math.max(An,Sn),Tn=Math.max(Tn,In),gn[Ln]=new Array(Sn);for(var Nn=0;Nn<gn[Ln].length;Nn+=1)gn[Ln][Nn]=255&dn.getBuffer()[Nn+yn];yn+=Sn;var rn=Ct.getErrorCorrectPolynomial(In),Ut=Pt(gn[Ln],rn.getLength()-1).mod(rn);for(vn[Ln]=new Array(rn.getLength()-1),Nn=0;Nn<vn[Ln].length;Nn+=1){var Yt=Nn+Ut.getLength()-vn[Ln].length;vn[Ln][Nn]=Yt>=0?Ut.getAt(Yt):0}}var fn=0;for(Nn=0;Nn<Mn.length;Nn+=1)fn+=Mn[Nn].totalCount;var $n=new Array(fn),Dn=0;for(Nn=0;Nn<An;Nn+=1)for(Ln=0;Ln<Mn.length;Ln+=1)Nn<gn[Ln].length&&($n[Dn]=gn[Ln][Nn],Dn+=1);for(Nn=0;Nn<Tn;Nn+=1)for(Ln=0;Ln<Mn.length;Ln+=1)Nn<vn[Ln].length&&($n[Dn]=vn[Ln][Nn],Dn+=1);return $n}(Xt,an)};bt.addData=function(qt,Dt){var Vt=null;switch(Dt=Dt||"Byte"){case"Numeric":Vt=jt(qt);break;case"Alphanumeric":Vt=zt(qt);break;case"Byte":Vt=Gt(qt);break;case"Kanji":Vt=tn(qt);break;default:throw"mode:"+Dt}it.push(Vt),vt=null},bt.isDark=function(qt,Dt){if(qt<0||xt<=qt||Dt<0||xt<=Dt)throw qt+","+Dt;return $t[qt][Dt]},bt.getModuleCount=function(){return xt},bt.make=function(){if(pt<1){for(var qt=1;qt<40;qt++){for(var Dt=Bt.getRSBlocks(qt,mt),Vt=Kt(),an=0;an<it.length;an++){var Xt=it[an];Vt.put(Xt.getMode(),4),Vt.put(Xt.getLength(),Ct.getLengthInBits(Xt.getMode(),qt)),Xt.write(Vt)}var pn=0;for(an=0;an<Dt.length;an++)pn+=Dt[an].dataCount;if(Vt.getLengthInBits()<=8*pn)break}pt=qt}Mt(!1,function(){for(var En=0,sn=0,dn=0;dn<8;dn+=1){Mt(!0,dn);var Mn=Ct.getLostPoint(bt);(dn==0||En>Mn)&&(En=Mn,sn=dn)}return sn}())},bt.createTableTag=function(qt,Dt){qt=qt||2;var Vt="";Vt+='<table style="',Vt+=" border-width: 0px; border-style: none;",Vt+=" border-collapse: collapse;",Vt+=" padding: 0px; margin: "+(Dt=Dt===void 0?4*qt:Dt)+"px;",Vt+='">',Vt+="<tbody>";for(var an=0;an<bt.getModuleCount();an+=1){Vt+="<tr>";for(var Xt=0;Xt<bt.getModuleCount();Xt+=1)Vt+='<td style="',Vt+=" border-width: 0px; border-style: none;",Vt+=" border-collapse: collapse;",Vt+=" padding: 0px; margin: 0px;",Vt+=" width: "+qt+"px;",Vt+=" height: "+qt+"px;",Vt+=" background-color: ",Vt+=bt.isDark(an,Xt)?"#000000":"#ffffff",Vt+=";",Vt+='"/>';Vt+="</tr>"}return(Vt+="</tbody>")+"</table>"},bt.createSvgTag=function(qt,Dt,Vt,an){var Xt={};typeof arguments[0]=="object"&&(qt=(Xt=arguments[0]).cellSize,Dt=Xt.margin,Vt=Xt.alt,an=Xt.title),qt=qt||2,Dt=Dt===void 0?4*qt:Dt,(Vt=typeof Vt=="string"?{text:Vt}:Vt||{}).text=Vt.text||null,Vt.id=Vt.text?Vt.id||"qrcode-description":null,(an=typeof an=="string"?{text:an}:an||{}).text=an.text||null,an.id=an.text?an.id||"qrcode-title":null;var pn,En,sn,dn,Mn=bt.getModuleCount()*qt+2*Dt,yn="";for(dn="l"+qt+",0 0,"+qt+" -"+qt+",0 0,-"+qt+"z ",yn+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',yn+=Xt.scalable?"":' width="'+Mn+'px" height="'+Mn+'px"',yn+=' viewBox="0 0 '+Mn+" "+Mn+'" ',yn+=' preserveAspectRatio="xMinYMin meet"',yn+=an.text||Vt.text?' role="img" aria-labelledby="'+cn([an.id,Vt.id].join(" ").trim())+'"':"",yn+=">",yn+=an.text?'<title id="'+cn(an.id)+'">'+cn(an.text)+"</title>":"",yn+=Vt.text?'<description id="'+cn(Vt.id)+'">'+cn(Vt.text)+"</description>":"",yn+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',yn+='<path d="',En=0;En<bt.getModuleCount();En+=1)for(sn=En*qt+Dt,pn=0;pn<bt.getModuleCount();pn+=1)bt.isDark(En,pn)&&(yn+="M"+(pn*qt+Dt)+","+sn+dn);return(yn+='" stroke="transparent" fill="black"/>')+"</svg>"},bt.createDataURL=function(qt,Dt){qt=qt||2,Dt=Dt===void 0?4*qt:Dt;var Vt=bt.getModuleCount()*qt+2*Dt,an=Dt,Xt=Vt-Dt;return rt(Vt,Vt,function(pn,En){if(an<=pn&&pn<Xt&&an<=En&&En<Xt){var sn=Math.floor((pn-an)/qt),dn=Math.floor((En-an)/qt);return bt.isDark(dn,sn)?0:1}return 1})},bt.createImgTag=function(qt,Dt,Vt){qt=qt||2,Dt=Dt===void 0?4*qt:Dt;var an=bt.getModuleCount()*qt+2*Dt,Xt="";return Xt+="<img",Xt+=' src="',Xt+=bt.createDataURL(qt,Dt),Xt+='"',Xt+=' width="',Xt+=an,Xt+='"',Xt+=' height="',Xt+=an,Xt+='"',Vt&&(Xt+=' alt="',Xt+=cn(Vt),Xt+='"'),Xt+"/>"};var cn=function(qt){for(var Dt="",Vt=0;Vt<qt.length;Vt+=1){var an=qt.charAt(Vt);switch(an){case"<":Dt+="&lt;";break;case">":Dt+="&gt;";break;case"&":Dt+="&amp;";break;case'"':Dt+="&quot;";break;default:Dt+=an}}return Dt};return bt.createASCII=function(qt,Dt){if((qt=qt||1)<2)return function(gn){gn=gn===void 0?2:gn;var vn,Ln,Sn,In,Nn,rn=1*bt.getModuleCount()+2*gn,Ut=gn,Yt=rn-gn,fn={"██":"█","█ ":"▀"," █":"▄"," ":" "},$n={"██":"▀","█ ":"▀"," █":" "," ":" "},Dn="";for(vn=0;vn<rn;vn+=2){for(Sn=Math.floor((vn-Ut)/1),In=Math.floor((vn+1-Ut)/1),Ln=0;Ln<rn;Ln+=1)Nn="█",Ut<=Ln&&Ln<Yt&&Ut<=vn&&vn<Yt&&bt.isDark(Sn,Math.floor((Ln-Ut)/1))&&(Nn=" "),Ut<=Ln&&Ln<Yt&&Ut<=vn+1&&vn+1<Yt&&bt.isDark(In,Math.floor((Ln-Ut)/1))?Nn+=" ":Nn+="█",Dn+=gn<1&&vn+1>=Yt?$n[Nn]:fn[Nn];Dn+=`
466
+ `;CardSelector.propTypes={list:PropTypes.array,width:PropTypes.number,height:PropTypes.number,cardSpace:PropTypes.number,onSelect:PropTypes.func,defaultIndex:PropTypes.number};CardSelector.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:noop$7,defaultIndex:0};var baseKeys=_baseKeys,getTag$1=_getTag,isArguments$1=isArguments_1,isArray$8=isArray_1,isArrayLike$2=isArrayLike_1,isBuffer$1=isBufferExports,isPrototype=_isPrototype,isTypedArray$1=isTypedArray_1,mapTag$1="[object Map]",setTag$1="[object Set]",objectProto$4=Object.prototype,hasOwnProperty$7=objectProto$4.hasOwnProperty;function isEmpty(a){if(a==null)return!0;if(isArrayLike$2(a)&&(isArray$8(a)||typeof a=="string"||typeof a.splice=="function"||isBuffer$1(a)||isTypedArray$1(a)||isArguments$1(a)))return!a.length;var j=getTag$1(a);if(j==mapTag$1||j==setTag$1)return!a.size;if(isPrototype(a))return!baseKeys(a).length;for(var _e in a)if(hasOwnProperty$7.call(a,_e))return!1;return!0}var isEmpty_1=isEmpty;const isEmpty$1=getDefaultExportFromCjs$1(isEmpty_1);function getMaster(a=window.blocklet){var _e;return(((_e=a==null?void 0:a.settings)==null?void 0:_e.federated)||{}).master}function getConfig(a=window.blocklet){var _e;return(((_e=a==null?void 0:a.settings)==null?void 0:_e.federated)||{}).config}function getFederatedEnabled(a=window.blocklet){const j=getConfig(a);return(j==null?void 0:j.status)==="approved"}function getFederatedApp(a=window.blocklet){const j=getMaster(a);return!isEmpty$1(j)?{appId:j.appId,appName:j.appName,appDescription:j.appDescription,appLogo:j.appLogo,appPid:j.appPid,appUrl:j.appUrl,version:j.version,sourceAppPid:j.appPid,provider:"wallet"}:null}function getCurrentApp(a=window.blocklet){return a?{appId:a.appId,appName:a.appName,appDescription:a.appDescription,appLogo:a.appLogo,appPid:a.appPid,appUrl:a.appUrl,version:a.version,sourceAppPid:null,provider:"wallet"}:window.env?(a=window.env,{appId:a.appId,appName:a.appName,appDescription:a.appDescription,appUrl:a.baseUrl,sourceAppPid:null,provider:"wallet",type:"server"}):null}function getApps(a){const j=[],_e=getFederatedApp(a),et=getCurrentApp(a),nt=getFederatedEnabled(a);return et&&j.push(et),_e&&(_e==null?void 0:_e.appId)!==(et==null?void 0:et.appId)&&nt&&j.push(_e),j.reverse()}async function getBlockletData(a){try{const j=new URL("__blocklet__.js",a);return j.searchParams.set("type","json"),await(await fetch(j.href)).json()}catch(j){return console.error(`Failed to get blocklet data: ${a}`,j),null}}var Guest=function a(j){return jsxRuntimeExports.jsxs("svg",{...j,children:[jsxRuntimeExports.jsx("rect",{x:"1",y:"1",width:"418",height:"473",rx:"19",fill:"#FBFBFB"}),jsxRuntimeExports.jsx("g",{clipPath:"url(#a)",children:jsxRuntimeExports.jsx("path",{opacity:".7",fill:"#DDD",d:"M0 100h420v168H0z"})}),jsxRuntimeExports.jsx("circle",{cx:"210",cy:"248",r:"60",fill:"#C4C5CA"}),jsxRuntimeExports.jsx("path",{d:"M181 284l7.2-7.2 7.2 7.2 7.2-10.8 7.2 10.8 7.2-10.8 7.2 10.8 7.2-7.2 7.2 7.2v-43.2c0-15.907-12.893-28.8-28.8-28.8S181 224.893 181 240.8V284z",fill:"#C4C5CA",stroke:"#fff",strokeWidth:"5",strokeLinejoin:"round"}),jsxRuntimeExports.jsx("path",{d:"M200.797 240.812h3.6-3.6zm21.6 0h3.6-3.6z",fill:"#C4C5CA"}),jsxRuntimeExports.jsx("path",{d:"M200.797 240.812h3.6m18 0h3.6",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntimeExports.jsx("path",{opacity:".7",d:"M24 29h189v40H24V29z",fill:"#C4C5CA"}),jsxRuntimeExports.jsx("path",{opacity:".42",fill:"#C4C5CA",d:"M313 24h83v14h-83z"}),jsxRuntimeExports.jsx("path",{opacity:".7",fill:"#C4C5CA",d:"M291 50h105v26H291z"}),jsxRuntimeExports.jsx("path",{d:"M177.388 388.4c-1.733 0-3.32-.213-4.76-.64a12.355 12.355 0 0 1-3.8-1.88 15.072 15.072 0 0 1-2.96-3l3.76-4.28c1.307 1.813 2.6 3.053 3.88 3.72 1.307.64 2.72.96 4.24.96.827 0 1.56-.107 2.2-.32.667-.24 1.187-.573 1.56-1 .373-.427.56-.933.56-1.52 0-.427-.093-.813-.28-1.16a2.764 2.764 0 0 0-.8-.96 5.139 5.139 0 0 0-1.24-.76 8.666 8.666 0 0 0-1.6-.6 12.728 12.728 0 0 0-1.92-.44c-1.493-.347-2.8-.76-3.92-1.24-1.12-.507-2.053-1.12-2.8-1.84a7.456 7.456 0 0 1-1.68-2.52c-.347-.933-.52-1.987-.52-3.16 0-1.2.267-2.307.8-3.32a8.187 8.187 0 0 1 2.2-2.68 10.68 10.68 0 0 1 3.28-1.72c1.253-.4 2.573-.6 3.96-.6 1.707 0 3.2.2 4.48.6 1.28.373 2.387.92 3.32 1.64.96.72 1.76 1.6 2.4 2.64l-3.8 3.68a9.48 9.48 0 0 0-1.84-1.88 6.482 6.482 0 0 0-2.12-1.12 6.84 6.84 0 0 0-2.32-.4c-.88 0-1.64.12-2.28.36-.64.213-1.147.533-1.52.96-.347.427-.52.947-.52 1.56 0 .48.12.907.36 1.28s.587.707 1.04 1c.453.267 1 .507 1.64.72.64.213 1.347.4 2.12.56 1.467.293 2.787.68 3.96 1.16 1.173.48 2.173 1.067 3 1.76a6.784 6.784 0 0 1 1.96 2.4c.453.907.68 1.933.68 3.08 0 1.893-.453 3.507-1.36 4.84-.907 1.333-2.16 2.36-3.76 3.08-1.6.693-3.467 1.04-5.6 1.04zm17.394-.4v-26.52h5.68V388h-5.68zm-3.96-16.08v-5.08h13.96v5.08h-13.96zm25.387 16.48c-1.76 0-3.346-.48-4.76-1.44-1.413-.96-2.533-2.267-3.36-3.92-.826-1.653-1.24-3.547-1.24-5.68 0-2.133.414-4.013 1.24-5.64.854-1.653 2-2.947 3.44-3.88 1.44-.96 3.08-1.44 4.92-1.44 1.04 0 1.987.16 2.84.48.88.293 1.64.707 2.28 1.24a7.831 7.831 0 0 1 1.68 1.84c.454.693.774 1.44.96 2.24l-1.2-.2v-5.16h5.64V388h-5.72v-5.08l1.28-.12a6.81 6.81 0 0 1-1.04 2.12 8.213 8.213 0 0 1-1.8 1.8c-.693.507-1.48.92-2.36 1.24-.88.293-1.813.44-2.8.44zm1.56-4.92c1.067 0 2-.253 2.8-.76.8-.507 1.414-1.213 1.84-2.12.454-.933.68-2.013.68-3.24 0-1.2-.226-2.253-.68-3.16-.426-.907-1.04-1.613-1.84-2.12-.8-.533-1.733-.8-2.8-.8-1.04 0-1.96.267-2.76.8-.773.507-1.386 1.213-1.84 2.12-.453.907-.68 1.96-.68 3.16 0 1.227.227 2.307.68 3.24.454.907 1.067 1.613 1.84 2.12.8.507 1.72.76 2.76.76zm19.066 13.72l4.64-10.88.08 3.28-10.32-22.76h6.44l5.16 12.2c.213.453.413.987.6 1.6.213.587.387 1.16.52 1.72l-.96.4c.16-.453.347-.973.56-1.56.213-.587.427-1.213.64-1.88l4.44-12.48h6.48l-8.88 21.16-3.64 9.2h-5.76zM92.8 438l10.96-28h5.36l10.92 28h-6.16l-5.64-15.08c-.16-.427-.36-.973-.6-1.64l-.68-2.12-.68-2.12a27.95 27.95 0 0 1-.48-1.72l1.08-.04c-.16.613-.346 1.253-.56 1.92-.186.64-.386 1.307-.6 2-.213.667-.44 1.32-.68 1.96-.24.64-.466 1.267-.68 1.88L98.72 438H92.8zm5.08-5.88l1.96-4.84h12.84l2 4.84h-16.8zm25.292 5.88v-21.16h5.44l.16 4.32-1.12.48c.293-.96.813-1.827 1.56-2.6a8.83 8.83 0 0 1 2.76-1.92 8.1 8.1 0 0 1 3.36-.72c1.6 0 2.933.32 4 .96 1.093.64 1.907 1.613 2.44 2.92.56 1.28.84 2.867.84 4.76V438h-5.68v-12.52c0-.96-.133-1.76-.4-2.4-.267-.64-.68-1.107-1.24-1.4-.533-.32-1.2-.453-2-.4-.64 0-1.24.107-1.8.32a3.94 3.94 0 0 0-1.4.84c-.373.373-.68.8-.92 1.28-.213.48-.32 1-.32 1.56V438h-5.68zm34.723.4c-2.16 0-4.093-.467-5.8-1.4a10.853 10.853 0 0 1-4-3.92c-.96-1.653-1.44-3.547-1.44-5.68 0-2.133.48-4.013 1.44-5.64a10.853 10.853 0 0 1 4-3.92c1.707-.96 3.64-1.44 5.8-1.44 2.133 0 4.04.48 5.72 1.44 1.707.96 3.04 2.267 4 3.92.96 1.627 1.44 3.507 1.44 5.64 0 2.133-.48 4.027-1.44 5.68-.96 1.653-2.293 2.96-4 3.92-1.68.933-3.587 1.4-5.72 1.4zm0-4.96c1.04 0 1.973-.253 2.8-.76a5.371 5.371 0 0 0 1.92-2.16c.48-.933.72-1.973.72-3.12 0-1.173-.24-2.213-.72-3.12-.453-.933-1.093-1.653-1.92-2.16-.827-.533-1.76-.8-2.8-.8-1.067 0-2.013.267-2.84.8a5.673 5.673 0 0 0-1.96 2.16c-.48.907-.707 1.947-.68 3.12-.027 1.147.2 2.187.68 3.12a5.673 5.673 0 0 0 1.96 2.16c.827.507 1.773.76 2.84.76zm15.433 4.56v-21.16h5.44l.16 4.32-1.12.48c.294-.96.814-1.827 1.56-2.6a8.853 8.853 0 0 1 2.76-1.92 8.1 8.1 0 0 1 3.36-.72c1.6 0 2.934.32 4 .96 1.094.64 1.907 1.613 2.44 2.92.56 1.28.84 2.867.84 4.76V438h-5.68v-12.52c0-.96-.133-1.76-.4-2.4-.266-.64-.68-1.107-1.24-1.4-.533-.32-1.2-.453-2-.4-.64 0-1.24.107-1.8.32a3.94 3.94 0 0 0-1.4.84c-.373.373-.68.8-.92 1.28-.213.48-.32 1-.32 1.56V438h-5.68zm27.648 9.2l4.64-10.88.08 3.28-10.32-22.76h6.44l5.16 12.2c.213.453.413.987.6 1.6.213.587.386 1.16.52 1.72l-.96.4c.16-.453.346-.973.56-1.56.213-.587.426-1.213.64-1.88l4.44-12.48h6.48l-8.88 21.16-3.64 9.2h-5.76zm21.297-9.2v-21.16h5.48l.12 4.04-.84.16c.293-.693.68-1.32 1.16-1.88.48-.56 1.04-1.04 1.68-1.44.666-.4 1.36-.707 2.08-.92.72-.24 1.44-.36 2.16-.36 1.093 0 2.08.173 2.96.52.88.347 1.626.893 2.24 1.64.613.72 1.093 1.68 1.44 2.88l-.88-.08.28-.64a6.852 6.852 0 0 1 1.32-1.72 8.178 8.178 0 0 1 1.8-1.36c.666-.4 1.36-.707 2.08-.92a7.448 7.448 0 0 1 2.12-.32c1.653 0 3.026.333 4.12 1 1.093.64 1.906 1.613 2.44 2.92.56 1.307.84 2.907.84 4.8V438h-5.68v-12.44c0-.96-.134-1.747-.4-2.36-.267-.613-.654-1.067-1.16-1.36-.507-.32-1.16-.48-1.96-.48a4.59 4.59 0 0 0-1.72.32c-.507.187-.96.467-1.36.84a3.74 3.74 0 0 0-.88 1.24 3.885 3.885 0 0 0-.32 1.6V438h-5.68v-12.48c0-.88-.147-1.627-.44-2.24-.267-.64-.654-1.12-1.16-1.44-.507-.32-1.134-.48-1.88-.48a4.59 4.59 0 0 0-1.72.32 3.608 3.608 0 0 0-1.32.84c-.374.347-.68.76-.92 1.24-.214.48-.32 1-.32 1.56V438h-5.68zm47.848.4c-2.16 0-4.093-.467-5.8-1.4a10.853 10.853 0 0 1-4-3.92c-.96-1.653-1.44-3.547-1.44-5.68 0-2.133.48-4.013 1.44-5.64a10.853 10.853 0 0 1 4-3.92c1.707-.96 3.64-1.44 5.8-1.44 2.134 0 4.04.48 5.72 1.44 1.707.96 3.04 2.267 4 3.92.96 1.627 1.44 3.507 1.44 5.64 0 2.133-.48 4.027-1.44 5.68-.96 1.653-2.293 2.96-4 3.92-1.68.933-3.586 1.4-5.72 1.4zm0-4.96c1.04 0 1.974-.253 2.8-.76a5.371 5.371 0 0 0 1.92-2.16c.48-.933.72-1.973.72-3.12 0-1.173-.24-2.213-.72-3.12-.453-.933-1.093-1.653-1.92-2.16-.826-.533-1.76-.8-2.8-.8-1.066 0-2.013.267-2.84.8a5.681 5.681 0 0 0-1.96 2.16c-.48.907-.706 1.947-.68 3.12-.026 1.147.2 2.187.68 3.12a5.681 5.681 0 0 0 1.96 2.16c.827.507 1.774.76 2.84.76zm22.714 4.96c-1.547 0-2.88-.333-4-1-1.093-.693-1.947-1.667-2.56-2.92-.587-1.28-.88-2.813-.88-4.6v-13.04h5.68v12.12c0 .96.16 1.8.48 2.52.32.693.773 1.227 1.36 1.6.587.373 1.307.56 2.16.56.613 0 1.187-.093 1.72-.28a3.993 3.993 0 0 0 1.36-.88c.373-.373.667-.813.88-1.32.213-.507.32-1.053.32-1.64v-12.68h5.68V438h-5.4l-.2-4.36 1.04-.48a7.107 7.107 0 0 1-1.6 2.68 7.981 7.981 0 0 1-2.68 1.88c-1.04.453-2.16.68-3.36.68zm25.035 0c-1.973 0-3.733-.32-5.28-.96-1.52-.667-2.747-1.573-3.68-2.72l3.52-3.04c.827.88 1.747 1.52 2.76 1.92a8.75 8.75 0 0 0 3.04.56c.4 0 .76-.04 1.08-.12.347-.107.64-.24.88-.4.24-.187.413-.4.52-.64.133-.267.2-.547.2-.84 0-.587-.24-1.053-.72-1.4-.267-.133-.68-.293-1.24-.48-.56-.213-1.28-.44-2.16-.68-1.36-.347-2.52-.747-3.48-1.2-.933-.48-1.68-1.013-2.24-1.6a6.755 6.755 0 0 1-1.12-1.8c-.24-.667-.36-1.4-.36-2.2 0-.96.213-1.827.64-2.6a6.138 6.138 0 0 1 1.76-2.04 8.66 8.66 0 0 1 2.64-1.28c.987-.32 2.027-.48 3.12-.48s2.16.133 3.2.4 2 .653 2.88 1.16a9.77 9.77 0 0 1 2.36 1.72l-3.04 3.36a9.806 9.806 0 0 0-1.64-1.24 8.324 8.324 0 0 0-1.84-.88c-.64-.213-1.213-.32-1.72-.32-.453 0-.867.04-1.24.12-.347.08-.64.2-.88.36-.24.16-.427.373-.56.64-.107.24-.16.507-.16.8 0 .293.067.573.2.84.16.267.373.493.64.68.293.16.72.347 1.28.56a30.74 30.74 0 0 0 2.36.72c1.28.347 2.36.733 3.24 1.16.907.427 1.627.92 2.16 1.48.453.48.787 1.027 1 1.64.213.613.32 1.293.32 2.04 0 1.307-.373 2.48-1.12 3.52-.72 1.013-1.72 1.813-3 2.4-1.28.56-2.72.84-4.32.84z",fill:"#25292F"}),jsxRuntimeExports.jsx("rect",{x:"1",y:"1",width:"418",height:"558",rx:"19",stroke:"#DDD",strokeWidth:"2"}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",transform:"translate(0 100)",d:"M0 0h420v168H0z"})})})]})};Guest.defaultProps={width:"420",height:"475",viewBox:"0 0 420 475",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const OAuthContext=reactExports.createContext({}),{Provider:Provider$7,Consumer:OAuthConsumer}=OAuthContext,prefix$3=`${AUTH_SERVICE_PREFIX}/api/oauth`,parseResponse=a=>a?typeof a=="string"?{sessionToken:a}:pick$2(a,["sessionToken","refreshToken","visitorId"]):{},translations$5={zh:{bindOAuth:"绑定第三方登录",bind:"绑定",noneOAuth:"未配置第三方登录方式",bindOAuthSucceed:"绑定 {provider} 成功",unbindOAuthSucceed:"解绑 {provider} 成功",loginOAuthFailed:"登录 {provider} 失败",bindOAuthFailed:"绑定 {provider} 失败",unbindOAuthFailed:"绑定 {provider} 失败",switchPassport:"切换通行证",switchPassportFailed:"切换通行证失败",switchPassportSucceed:"切换通行证成功",choosePassport:"请选择一个通行证",switch:"切换",cancel:"取消",currentRole:"当前角色:",passport:"通行证",noPassports:"没有可更换的通行证",getPassportFailed:"获取通行证失败",loginRequired:"授权请求被拒绝",cancelAuth:"取消授权"},en:{bindOAuth:"Bind third party login",bind:"Bind ",noneOAuth:"Third party login is not configured",bindOAuthSucceed:"Bind {provider} succeed",unbindOAuthSucceed:"Unbind {provider} succeed",loginOAuthFailed:"Login {provider} failed",bindOAuthFailed:"Bind {provider} failed",unbindOAuthFailed:"Unbind {provider} failed",switchPassport:"Switch passport",switchPassportFailed:"Switch passport failed",switchPassportSucceed:"Switch passport succeed",choosePassport:"Select a passport to switch",switch:"Switch",cancel:"Cancel",currentRole:"Current role: ",passport:"Passport",noPassports:"No passport to switch",getPassportFailed:"Get passports failed",loginRequired:"You have declined the authentication request",cancelAuth:"Cancel authentication"}};function OAuthProvider({children:a,locale:j,onBindOAuth:_e,onUnbindOAuth:et,onSwitchPassport:nt}){var Kt;const tt=useReactive({baseUrl:"/",bindFnSession:void 0,bindAuthLoading:!1,unbindAuthLoading:!1}),ot=useReactive({open:!1,currentUser:null,passports:[],choosePassport:void 0,reset(){ot.open=!1,ot.currentUser=null,ot.passports=[],ot.choosePassport=void 0}}),ct=useReactive({user:null,checking:!1,loading:!1,error:"",status:"",reset(){ct.loading=!1,ct.checking=!1,ct.error="",ct.status=""}}),ft=useMemoizedFn((jt,zt={})=>translate(translations$5,jt,j,"en",zt)),ht=useCreation(()=>createAxios({baseURL:joinURL(tt.baseUrl,prefix$3)}),[tt.baseUrl,prefix$3]),dt=useMemoizedFn(async()=>{if(tt.baseUrl==="/")return window.blocklet;try{if(new URL(tt.baseUrl).host===window.location.host)return window.blocklet}catch{}return await getBlockletData(tt.baseUrl)}),yt=useMemoizedFn(async({sourceAppPid:jt}={})=>{var hn,wt;const zt=await dt(),Gt=getFederatedEnabled(zt),tn=getMaster(zt);if(Gt&&(tn!=null&&tn.appPid)&&jt===(tn==null?void 0:tn.appPid)){const rt=await getBlockletData(tn.appUrl);return((hn=rt==null?void 0:rt.settings)==null?void 0:hn.oauth)||{}}return((wt=zt==null?void 0:zt.settings)==null?void 0:wt.oauth)||{}}),Tt=useMemoizedFn(async({sourceAppPid:jt}={})=>{const zt=await yt({sourceAppPid:jt});return Object.entries(zt).map(([tn,hn])=>({...hn,provider:tn})).filter(tn=>tn.enabled).sort((tn,hn)=>(tn==null?void 0:tn.order)!==void 0&&(hn==null?void 0:hn.order)!==void 0?tn.order-hn.order:(tn==null?void 0:tn.order)!==void 0?-1:1)}),St=useMemoizedFn(async({provider:jt}={})=>{var Gt;const zt=openPopup(joinURL(tt.baseUrl,"/.well-known/service/oauth/login",jt),{name:"oauth-login:popup"});try{const tn=await runPopup({popup:zt,closeTimeout:0});return tn!=null&&tn.response?(Gt=tn.response)==null?void 0:Gt.code:null}catch(tn){throw(tn==null?void 0:tn.message)==="Popup closed"?new Error(ft("cancelAuth")):tn}}),At=async({session:jt,oauthItem:zt}={})=>{var Gt,tn;tt.bindFnSession=jt,tt.bindAuthLoading=!0;try{const hn=await St(zt),wt=(tn=(Gt=tt.bindFnSession)==null?void 0:Gt.user)==null?void 0:tn.sourceAppPid;await ht.post("/bind",{locale:j,provider:zt.provider,code:hn,sourceAppPid:wt}),Toast$1.success(ft("bindOAuthSucceed",{provider:OAUTH_PROVIDER[zt.provider]})),_e(zt)}catch(hn){Toast$1.error(getApiErrorMessage(hn,ft("bindOAuthFailed",{provider:OAUTH_PROVIDER[zt.provider]})))}finally{tt.bindAuthLoading=!1}},Rt=async({session:jt,connectedAccount:zt})=>{var Gt;tt.unbindAuthLoading=!0;try{const tn=(Gt=jt==null?void 0:jt.user)==null?void 0:Gt.sourceAppPid;await ht.post("/unbind",{locale:j,connectedAccount:omit$1(zt,["showProvider"]),sourceAppPid:tn}),Toast$1.success(ft("unbindOAuthSucceed",{provider:OAUTH_PROVIDER[zt.showProvider||zt.provider]})),et(zt)}catch(tn){Toast$1.error(getApiErrorMessage(tn,ft("unbindOAuthFailed",{provider:OAUTH_PROVIDER[zt.showProvider||zt.provider]})))}finally{tt.unbindAuthLoading=!1}},It=async(jt={})=>{try{const{data:zt}=await ht.get("/passports");zt.length?(ot.open=!0,ot.currentUser=jt,ot.passports=zt||[]):Toast$1.error(ft("noPassports"))}catch(zt){Toast$1.error(zt.message||ft("getPassportFailed"))}},Ct=async()=>{try{const{data:jt}=await ht.post("/switch",{passportId:ot.choosePassport}),{sessionToken:zt,refreshToken:Gt}=parseResponse(jt);nt({sessionToken:zt,refreshToken:Gt}),Toast$1.success(ft("switchPassportSucceed"))}catch(jt){Toast$1.error(jt.message||ft("switchPassportFailed"))}},kt=jt=>{tt.baseUrl=jt||"/"},Pt=useMemoizedFn(async({provider:jt}={},{action:zt="login",...Gt}={})=>{var wt,rt,st;const tn=tt.baseUrl;if((Gt==null?void 0:Gt.sourceAppPid)===((wt=window.blocklet)==null?void 0:wt.appPid))tt.baseUrl=((rt=window.blocklet)==null?void 0:rt.appUrl)||"/";else if(Gt!=null&&Gt.sourceAppPid){const ut=await dt(),pt=getFederatedEnabled(ut),mt=getMaster(ut);pt&&(mt!=null&&mt.appPid)&&(Gt==null?void 0:Gt.sourceAppPid)===(mt==null?void 0:mt.appPid)&&(tt.baseUrl=mt.appUrl)}const hn=(st=window==null?void 0:window.blocklet)==null?void 0:st.componentId;try{const ut=await St({provider:jt});if(ut){const pt={...Gt,action:zt,locale:j,code:ut,provider:jt,componentId:hn,visitorId:getVisitorId$2()};isUndefined$2(pt.inviter)&&window.localStorage.getItem("inviter")&&(pt.inviter=window.localStorage.getItem("inviter"));const{data:mt}=await ht.post("/login",pt);return parseResponse(mt)}return tt.baseUrl=tn,null}catch(ut){const pt=getApiErrorMessage(ut,ft("loginOAuthFailed",{provider:OAUTH_PROVIDER[jt]}));throw tt.baseUrl=tn,new Error(pt)}}),Bt=useMemoizedFn(()=>{});return jsxRuntimeExports.jsxs(Provider$7,{value:{locale:j,getOAuthConfigs:yt,getOAuthConfigList:Tt,bindOAuth:At,unbindOAuth:Rt,loginOAuth:Pt,logoutOAuth:Bt,switchOAuthPassport:It,baseUrl:tt.baseUrl,setBaseUrl:kt,oauthState:ct,unbindAuthLoading:tt.unbindAuthLoading,bindAuthLoading:tt.bindAuthLoading,t:ft},children:[a,jsxRuntimeExports.jsxs(Confirm,{open:ot.open,title:ft("switchPassport"),onConfirm:Ct,onCancel:()=>ot.reset,confirmButton:{text:ft("switch"),props:{variant:"contained",color:"primary"}},cancelButton:{text:ft("cancel"),props:{color:"inherit"}},PaperProps:{style:{width:600}},children:[jsxRuntimeExports.jsxs(Box,{mb:2,children:[ft("currentRole"),(Kt=ot.currentUser)==null?void 0:Kt.role]}),jsxRuntimeExports.jsx(CardSelector,{width:160,height:240,cardSpace:24,list:[()=>jsxRuntimeExports.jsx(Guest,{}),...ot.passports.map(jt=>({src:jt.display,name:jt.title}))],onSelect:jt=>{ot.choosePassport=jt>0?ot.passports[jt-1].id:void 0},defaultIndex:0})]})]})}function useOAuth(){const a=reactExports.useContext(OAuthContext);return omit$1(a,["locale","getToken"])}OAuthProvider.propTypes={children:PropTypes.node.isRequired,locale:PropTypes.string,onBindOAuth:PropTypes.func,onUnbindOAuth:PropTypes.func,onSwitchPassport:PropTypes.func};OAuthProvider.defaultProps={locale:"en",onBindOAuth:noop$7,onUnbindOAuth:noop$7,onSwitchPassport:noop$7};function getPermanentDid(a){return a==null?void 0:a.did}function getConnectedAccounts(a){var j;return(a==null?void 0:a.connectedAccounts)||((j=a==null?void 0:a.extraConfigs)==null?void 0:j.connectedAccounts)||[]}function getSourceProvider(a){var j;return(a==null?void 0:a.sourceProvider)||((j=a==null?void 0:a.extraConfigs)==null?void 0:j.sourceProvider)||"wallet"}function getSourceProviders(a){return getConnectedAccounts(a).map(_e=>_e.provider)}function getConnectedDids(a){return getConnectedAccounts(a).map(et=>et.did)}function getWallet(a){return getConnectedAccounts(a).find(et=>et.provider==="wallet")}function getWalletDid(a){const j=getWallet(a);return j==null?void 0:j.did}function useDid({session:a}){const[j,_e]=reactExports.useState({did:"",wallet:"",walletDid:"",permanentDid:"",connectedDids:[],connectedAccounts:[],sourceProvider:"",sourceProviders:[]});return reactExports.useEffect(()=>{if(a!=null&&a.user){const et=getPermanentDid(a.user),nt=getWalletDid(a.user),tt=getConnectedAccounts(a.user),ot=getConnectedDids(a.user),ct=getWallet(a.user),ft=getSourceProvider(a.user),ht=getSourceProviders(a.user);_e({did:et,wallet:ct,walletDid:nt,permanentDid:et,connectedDids:ot,connectedAccounts:tt,sourceProvider:ft,sourceProviders:ht})}},[a==null?void 0:a.user]),j}function WrapDid({session:a,children:j}){const _e=useDid({session:a});return j instanceof Function?j(_e):null}WrapDid.propTypes={session:PropTypes.object.isRequired,children:PropTypes.func.isRequired};const api$3=createAxios();async function getMasterToken(){const a=joinURL(AUTH_SERVICE_PREFIX,"/api/federated/loginMaster"),{data:j}=await api$3.post(a);return j}async function mountFederatedIframe({mode:a,refreshToken:j="",blocklet:_e}){const et=getMaster(_e);return new Promise(nt=>{if(!["login","logout"].includes(a)){nt();return}const tt=document.createElement("iframe");tt.style.display="none",tt.onload=async()=>{await sleep$1(500),document.body.removeChild(tt),nt()},tt.src=joinURL(et.appUrl,AUTH_SERVICE_PREFIX,`functional/federated?mode=${a}&refreshToken=${j}`),document.body.appendChild(tt)})}async function loginFederatedMaster(a={},{fetchToken:j=!0,blocklet:_e}={}){if(!getFederatedEnabled())return console.warn("Federated not enabled"),null;let nt,tt;j&&({sessionToken:nt,refreshToken:tt}=await getMasterToken());const ot=getMaster(_e),ct=joinURL(ot.appUrl,AUTH_SERVICE_PREFIX,"/api/federated/login"),ft={withCredentials:!0};nt&&(ft.headers={Authorization:`Bearer ${nt}`});const{data:ht}=await api$3.post(ct,a,ft);return tt&&await mountFederatedIframe({mode:"login",refreshToken:tt,blocklet:_e}),ht}const translations$4={zh:{notFoundFederatedInfo:"未发现统一登录的信息",autoLoginFederatedFailed:"自动登录统一登录账号失败",manualLoginFederatedFailed:"手动登录统一登录账号失败"},en:{notFoundFederatedInfo:"No federated login info detected",autoLoginFederatedFailed:"Auto login federated account failed",manualLoginFederatedFailed:"Manual login federated account failed"}};function useFederated({locale:a,handleLoginResult:j,login:_e,handleRefreshUser:et}){const nt=useReactive({federatedMaster:null}),tt=getFederatedEnabled(),ot=getMaster(),ct=getConfig(),ft=useMemoizedFn(async(ht=noop$7,dt={},yt={})=>{var At,Rt;typeof yt=="string"&&(yt={origin:yt});let{mode:Tt="auto",...St}=dt;if(yt.mode&&(Tt=yt.mode),Tt==="auto"){if(!tt)throw new Error(translations$4[a].notFoundFederatedInfo);try{const It=await loginFederatedMaster({appId:globalThis.blocklet.appId},{fetchToken:!1});j({...It,encrypted:!1}),await et({showProgress:!0}),ht()}catch(It){const Ct=It!=null&&It.response?(At=It.response)==null?void 0:At.data:It==null?void 0:It.message;ht(Ct||translations$4[a].autoLoginFederatedFailed)}}else if(Tt==="manual")try{_e(async()=>{await loginFederatedMaster({appId:globalThis.blocklet.appId,onlyWriteCookie:!0}),ht()},{...St},yt)}catch(It){const Ct=It!=null&&It.response?(Rt=It.response)==null?void 0:Rt.data:It==null?void 0:It.message;ht(Ct||translations$4[a].autoLoginFederatedFailed)}});return{master:ot,config:ct,federatedMaster:nt.federatedMaster,federatedEnabled:tt,loginFederated:ft,loginFederatedMaster}}async function renewRefreshToken(a,{authServicePrefix:j,serviceHost:_e}){if(!a)throw new Error("Refresh token not found");const et=createAxios({baseURL:_e,timeout:10*1e3,headers:{authorization:`Bearer ${encodeURIComponent(a)}`}}),{data:nt}=await et.post(joinURL(j,"/refreshSession"));return nt}function createService({refreshTokenStorage:a,sessionTokenStorage:j,serviceHost:_e,authServicePrefix:et,onRefreshTokenError:nt,onRefreshTokenSuccess:tt},ot={}){let ct=null;const ft=createAxios({baseURL:_e,timeout:30*1e3,...ot}),{getToken:ht,setToken:dt,removeToken:yt}=j,{getToken:Tt,setToken:St,removeToken:At}=a;return ft.interceptors.request.use(async Rt=>{if(j.engine==="ls"){const It=ht();It&&(Rt.headers.authorization=`Bearer ${encodeURIComponent(It)}`)}return ct&&await ct,Rt},Rt=>Promise.reject(Rt)),ft.interceptors.response.use(Rt=>Rt,async Rt=>{var Ct;const It=Rt.config;if(It.headers={...It==null?void 0:It.headers},((Ct=Rt==null?void 0:Rt.response)==null?void 0:Ct.status)===401&&!It._retry){It._retry=!0,ct||(ct=renewRefreshToken(Tt(),{serviceHost:_e,authServicePrefix:et}));try{const kt=await ct;return dt(kt.nextToken),St(kt.nextRefreshToken),typeof tt=="function"&&tt(kt),ft(It)}catch(kt){return yt(),At(),typeof nt=="function"&&nt(),Promise.reject(kt)}finally{ct=null}}return Promise.reject(Rt)}),ft}class ErrorToken extends Error{}const LANG_COOKIE_NAME="nf_lang",INTERVAL_TIME=1e3,MAX_RETRY_COUNT=3,decrypt=a=>decrypt$1(a,localStorage.getItem("__encKey"),localStorage.getItem("__decKey"));function useSessionToken({state:a,pageState:j,serviceHost:_e,sessionTokenStorage:et,refreshTokenStorage:nt,lazyRefreshToken:tt,apiOptions:ot={}}){const[ct,ft]=reactExports.useState(0),[ht,dt]=reactExports.useState(INTERVAL_TIME),{getToken:yt,setToken:Tt,removeToken:St}=et,{getToken:At,setToken:Rt,removeToken:It}=nt,Ct=useCreation(()=>createAxios({baseURL:_e,timeout:10*1e3}),[_e]),kt=()=>{St(),It()},Pt=useCreation(()=>createService({sessionTokenStorage:et,refreshTokenStorage:nt,serviceHost:_e,authServicePrefix:j.prefix,onRefreshTokenError(){kt(),a.user&&(a.user=null)}},ot),[_e,j.prefix]),Bt=()=>{const rt=getCookieOptions({returnDomain:!1});Cookie.remove("connected_did",rt),Cookie.remove("connected_pk",rt),Cookie.remove("connected_app",rt),Cookie.remove("connected_wallet_os",rt),kt()},Kt=useMemoizedFn(()=>{const rt=Cookie.get(LANG_COOKIE_NAME)||getBrowserLang();rt!==j.currentLocale&&(j.currentLocale=rt)}),jt=useMemoizedFn(async({showProgress:rt=!1,requestFn:st=null,onlyRefreshToken:ut=!1})=>{var pt;try{if(a.loading)return console.warn("SessionProvider.refresh is currently in progress, call it will be noop"),{loading:!0};rt&&(a.loading=!0);const{data:mt,status:$t}=await st();if($t===400&&(kt(),a.user=null,a.error=""),mt.error)throw a.error=mt.error,a.open=!1,new Error(mt.error);if(mt.user)mt.nextToken&&(Tt(mt.nextToken),mt.nextRefreshToken&&Rt(mt.nextRefreshToken)),ut||(a.open=!1,a.user=mt.user,a.provider=mt.provider,a.walletOS=mt.walletOS),yt()||(Toast$1.error("Can't write session token, please use https url to access this page"),kt());else throw rt&&(a.loading=j.autoConnect),a.open=j.autoConnect,a.user=null,a.provider="",a.walletOS="",new ErrorToken("Invalid token");return{data:mt,status:$t}}catch(mt){throw console.error("SessionProvider.refresh error",mt),a.open=!1,a.error=mt.message,((pt=mt==null?void 0:mt.response)==null?void 0:pt.status)===400?new ErrorToken("Invalid token"):mt}finally{rt&&(a.loading=!1)}}),zt=useMemoizedFn(async(rt=!1,st=!1)=>{const ut=getVisitorId$2()||"",pt=()=>Ct.post(withQuery(joinURL(j.prefix,"/refreshSession"),{visitorId:ut}),null,{headers:{authorization:`Bearer ${encodeURIComponent(At())}`}});dt(void 0);try{await jt({showProgress:rt,requestFn:pt,onlyRefreshToken:st}),ft(0)}catch(mt){mt instanceof ErrorToken?(console.warn("refresh token failed, remove all tokens"),ft(0),kt()):(console.error("refresh token failed, unexpected error:",mt),ft(ct+1),await sleep$1(INTERVAL_TIME),ct>=MAX_RETRY_COUNT&&(ft(0),kt()))}finally{dt(INTERVAL_TIME)}}),Gt=useMemoizedFn((rt=!1)=>{if(tt)return;const st=yt();let ut=rt;const pt=new Date().getTime();if(st)try{const{exp:mt,iat:$t}=o(st);mt*1e3-pt<pt-$t*1e3&&(ut=!0)}catch{ut=!0}else ut=!0;ut&&(At()?zt(!1,!0):(Bt(),a.user&&(a.user=null)))}),tn=useMemoizedFn(async({showProgress:rt=!1,forceRefreshToken:st=!1}={})=>{const ut=getVisitorId$2()||"",pt=()=>Pt.get(withQuery(joinURL(j.prefix,"/session"),{visitorId:ut}));try{if(st)throw new ErrorToken("need force refresh token");await jt({showProgress:rt,requestFn:pt})}catch(mt){mt instanceof ErrorToken&&(console.warn("try to refresh token"),await zt())}}),hn=useMemoizedFn(()=>{if(a.initialized&&a.user)try{Gt()}catch{}}),wt=useMemoizedFn(rt=>{const st=Array.isArray(rt)?rt[0]:rt,{loginToken:ut,sessionToken:pt,refreshToken:mt,visitorId:$t,encrypted:xt=!0}=st,vt=ut||pt;vt&&(Tt(xt?decrypt(vt):vt),mt&&Rt(xt?decrypt(mt):mt)),$t&&setVisitorId(xt?decrypt($t):$t)});return useInterval$1(()=>{Kt(),Gt()},ht,{immediate:!0}),{renewToken:hn,handleRefreshUser:tn,handleRefreshToken:zt,handleLoginResult:wt,decrypt,removeToken:kt,clearSession:Bt,getSessionToken:yt,getRefreshToken:At,setRefreshToken:Rt,setSessionToken:Tt,service:Pt}}var pathToRegexp$2={exports:{}},isarray$2=Array.isArray||function(a){return Object.prototype.toString.call(a)=="[object Array]"},isarray$1=isarray$2;pathToRegexp$2.exports=pathToRegexp;pathToRegexp$2.exports.parse=parse$f;pathToRegexp$2.exports.compile=compile;pathToRegexp$2.exports.tokensToFunction=tokensToFunction;pathToRegexp$2.exports.tokensToRegExp=tokensToRegExp;var PATH_REGEXP=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function parse$f(a,j){for(var _e=[],et=0,nt=0,tt="",ot=j&&j.delimiter||"/",ct;(ct=PATH_REGEXP.exec(a))!=null;){var ft=ct[0],ht=ct[1],dt=ct.index;if(tt+=a.slice(nt,dt),nt=dt+ft.length,ht){tt+=ht[1];continue}var yt=a[nt],Tt=ct[2],St=ct[3],At=ct[4],Rt=ct[5],It=ct[6],Ct=ct[7];tt&&(_e.push(tt),tt="");var kt=Tt!=null&&yt!=null&&yt!==Tt,Pt=It==="+"||It==="*",Bt=It==="?"||It==="*",Kt=Tt||ot,jt=At||Rt,zt=Tt||(typeof _e[_e.length-1]=="string"?_e[_e.length-1]:"");_e.push({name:St||et++,prefix:Tt||"",delimiter:Kt,optional:Bt,repeat:Pt,partial:kt,asterisk:!!Ct,pattern:jt?escapeGroup(jt):Ct?".*":restrictBacktrack(Kt,zt)})}return nt<a.length&&(tt+=a.substr(nt)),tt&&_e.push(tt),_e}function restrictBacktrack(a,j){return!j||j.indexOf(a)>-1?"[^"+escapeString(a)+"]+?":escapeString(j)+"|(?:(?!"+escapeString(j)+")[^"+escapeString(a)+"])+?"}function compile(a,j){return tokensToFunction(parse$f(a,j),j)}function encodeURIComponentPretty(a){return encodeURI(a).replace(/[\/?#]/g,function(j){return"%"+j.charCodeAt(0).toString(16).toUpperCase()})}function encodeAsterisk(a){return encodeURI(a).replace(/[?#]/g,function(j){return"%"+j.charCodeAt(0).toString(16).toUpperCase()})}function tokensToFunction(a,j){for(var _e=new Array(a.length),et=0;et<a.length;et++)typeof a[et]=="object"&&(_e[et]=new RegExp("^(?:"+a[et].pattern+")$",flags(j)));return function(nt,tt){for(var ot="",ct=nt||{},ft=tt||{},ht=ft.pretty?encodeURIComponentPretty:encodeURIComponent,dt=0;dt<a.length;dt++){var yt=a[dt];if(typeof yt=="string"){ot+=yt;continue}var Tt=ct[yt.name],St;if(Tt==null)if(yt.optional){yt.partial&&(ot+=yt.prefix);continue}else throw new TypeError('Expected "'+yt.name+'" to be defined');if(isarray$1(Tt)){if(!yt.repeat)throw new TypeError('Expected "'+yt.name+'" to not repeat, but received `'+JSON.stringify(Tt)+"`");if(Tt.length===0){if(yt.optional)continue;throw new TypeError('Expected "'+yt.name+'" to not be empty')}for(var At=0;At<Tt.length;At++){if(St=ht(Tt[At]),!_e[dt].test(St))throw new TypeError('Expected all "'+yt.name+'" to match "'+yt.pattern+'", but received `'+JSON.stringify(St)+"`");ot+=(At===0?yt.prefix:yt.delimiter)+St}continue}if(St=yt.asterisk?encodeAsterisk(Tt):ht(Tt),!_e[dt].test(St))throw new TypeError('Expected "'+yt.name+'" to match "'+yt.pattern+'", but received "'+St+'"');ot+=yt.prefix+St}return ot}}function escapeString(a){return a.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function escapeGroup(a){return a.replace(/([=!:$\/()])/g,"\\$1")}function attachKeys(a,j){return a.keys=j,a}function flags(a){return a&&a.sensitive?"":"i"}function regexpToRegexp(a,j){var _e=a.source.match(/\((?!\?)/g);if(_e)for(var et=0;et<_e.length;et++)j.push({name:et,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return attachKeys(a,j)}function arrayToRegexp(a,j,_e){for(var et=[],nt=0;nt<a.length;nt++)et.push(pathToRegexp(a[nt],j,_e).source);var tt=new RegExp("(?:"+et.join("|")+")",flags(_e));return attachKeys(tt,j)}function stringToRegexp(a,j,_e){return tokensToRegExp(parse$f(a,_e),j,_e)}function tokensToRegExp(a,j,_e){isarray$1(j)||(_e=j||_e,j=[]),_e=_e||{};for(var et=_e.strict,nt=_e.end!==!1,tt="",ot=0;ot<a.length;ot++){var ct=a[ot];if(typeof ct=="string")tt+=escapeString(ct);else{var ft=escapeString(ct.prefix),ht="(?:"+ct.pattern+")";j.push(ct),ct.repeat&&(ht+="(?:"+ft+ht+")*"),ct.optional?ct.partial?ht=ft+"("+ht+")?":ht="(?:"+ft+"("+ht+"))?":ht=ft+"("+ht+")",tt+=ht}}var dt=escapeString(_e.delimiter||"/"),yt=tt.slice(-dt.length)===dt;return et||(tt=(yt?tt.slice(0,-dt.length):tt)+"(?:"+dt+"(?=$))?"),nt?tt+="$":tt+=et&&yt?"":"(?="+dt+"|$)",attachKeys(new RegExp("^"+tt,flags(_e)),j)}function pathToRegexp(a,j,_e){return isarray$1(j)||(_e=j||_e,j=[]),_e=_e||{},a instanceof RegExp?regexpToRegexp(a,j):isarray$1(a)?arrayToRegexp(a,j,_e):stringToRegexp(a,j,_e)}var pathToRegexpExports=pathToRegexp$2.exports;const pathToRegexp$1=getDefaultExportFromCjs$1(pathToRegexpExports);function useProtectedRoutes({protectedRoutes:a=[]}){const j=useCreation(()=>a.map(et=>pathToRegexp$1(et,[])),[a]);return{checkMatch:useMemoizedFn((et=window.location.pathname)=>j.some(nt=>nt.exec(et)))}}const SessionContext$1=reactExports.createContext();var dist$1={},eventemitter3={exports:{}};(function(a){var j=Object.prototype.hasOwnProperty,_e="~";function et(){}Object.create&&(et.prototype=Object.create(null),new et().__proto__||(_e=!1));function nt(ft,ht,dt){this.fn=ft,this.context=ht,this.once=dt||!1}function tt(ft,ht,dt,yt,Tt){if(typeof dt!="function")throw new TypeError("The listener must be a function");var St=new nt(dt,yt||ft,Tt),At=_e?_e+ht:ht;return ft._events[At]?ft._events[At].fn?ft._events[At]=[ft._events[At],St]:ft._events[At].push(St):(ft._events[At]=St,ft._eventsCount++),ft}function ot(ft,ht){--ft._eventsCount===0?ft._events=new et:delete ft._events[ht]}function ct(){this._events=new et,this._eventsCount=0}ct.prototype.eventNames=function(){var ht=[],dt,yt;if(this._eventsCount===0)return ht;for(yt in dt=this._events)j.call(dt,yt)&&ht.push(_e?yt.slice(1):yt);return Object.getOwnPropertySymbols?ht.concat(Object.getOwnPropertySymbols(dt)):ht},ct.prototype.listeners=function(ht){var dt=_e?_e+ht:ht,yt=this._events[dt];if(!yt)return[];if(yt.fn)return[yt.fn];for(var Tt=0,St=yt.length,At=new Array(St);Tt<St;Tt++)At[Tt]=yt[Tt].fn;return At},ct.prototype.listenerCount=function(ht){var dt=_e?_e+ht:ht,yt=this._events[dt];return yt?yt.fn?1:yt.length:0},ct.prototype.emit=function(ht,dt,yt,Tt,St,At){var Rt=_e?_e+ht:ht;if(!this._events[Rt])return!1;var It=this._events[Rt],Ct=arguments.length,kt,Pt;if(It.fn){switch(It.once&&this.removeListener(ht,It.fn,void 0,!0),Ct){case 1:return It.fn.call(It.context),!0;case 2:return It.fn.call(It.context,dt),!0;case 3:return It.fn.call(It.context,dt,yt),!0;case 4:return It.fn.call(It.context,dt,yt,Tt),!0;case 5:return It.fn.call(It.context,dt,yt,Tt,St),!0;case 6:return It.fn.call(It.context,dt,yt,Tt,St,At),!0}for(Pt=1,kt=new Array(Ct-1);Pt<Ct;Pt++)kt[Pt-1]=arguments[Pt];It.fn.apply(It.context,kt)}else{var Bt=It.length,Kt;for(Pt=0;Pt<Bt;Pt++)switch(It[Pt].once&&this.removeListener(ht,It[Pt].fn,void 0,!0),Ct){case 1:It[Pt].fn.call(It[Pt].context);break;case 2:It[Pt].fn.call(It[Pt].context,dt);break;case 3:It[Pt].fn.call(It[Pt].context,dt,yt);break;case 4:It[Pt].fn.call(It[Pt].context,dt,yt,Tt);break;default:if(!kt)for(Kt=1,kt=new Array(Ct-1);Kt<Ct;Kt++)kt[Kt-1]=arguments[Kt];It[Pt].fn.apply(It[Pt].context,kt)}}return!0},ct.prototype.on=function(ht,dt,yt){return tt(this,ht,dt,yt,!1)},ct.prototype.once=function(ht,dt,yt){return tt(this,ht,dt,yt,!0)},ct.prototype.removeListener=function(ht,dt,yt,Tt){var St=_e?_e+ht:ht;if(!this._events[St])return this;if(!dt)return ot(this,St),this;var At=this._events[St];if(At.fn)At.fn===dt&&(!Tt||At.once)&&(!yt||At.context===yt)&&ot(this,St);else{for(var Rt=0,It=[],Ct=At.length;Rt<Ct;Rt++)(At[Rt].fn!==dt||Tt&&!At[Rt].once||yt&&At[Rt].context!==yt)&&It.push(At[Rt]);It.length?this._events[St]=It.length===1?It[0]:It:ot(this,St)}return this},ct.prototype.removeAllListeners=function(ht){var dt;return ht?(dt=_e?_e+ht:ht,this._events[dt]&&ot(this,dt)):(this._events=new et,this._eventsCount=0),this},ct.prototype.off=ct.prototype.removeListener,ct.prototype.addListener=ct.prototype.on,ct.prefixed=_e,ct.EventEmitter=ct,a.exports=ct})(eventemitter3);var eventemitter3Exports=eventemitter3.exports,priorityQueue={},lowerBound$1={};Object.defineProperty(lowerBound$1,"__esModule",{value:!0});function lowerBound(a,j,_e){let et=0,nt=a.length;for(;nt>0;){const tt=nt/2|0;let ot=et+tt;_e(a[ot],j)<=0?(et=++ot,nt-=tt+1):nt=tt}return et}lowerBound$1.default=lowerBound;Object.defineProperty(priorityQueue,"__esModule",{value:!0});const lower_bound_1=lowerBound$1;class PriorityQueue{constructor(){this._queue=[]}enqueue(j,_e){_e=Object.assign({priority:0},_e);const et={priority:_e.priority,run:j};if(this.size&&this._queue[this.size-1].priority>=_e.priority){this._queue.push(et);return}const nt=lower_bound_1.default(this._queue,et,(tt,ot)=>ot.priority-tt.priority);this._queue.splice(nt,0,et)}dequeue(){const j=this._queue.shift();return j==null?void 0:j.run}filter(j){return this._queue.filter(_e=>_e.priority===j.priority).map(_e=>_e.run)}get size(){return this._queue.length}}priorityQueue.default=PriorityQueue;Object.defineProperty(dist$1,"__esModule",{value:!0});const EventEmitter$4=eventemitter3Exports,p_timeout_1=pTimeoutExports,priority_queue_1=priorityQueue,empty=()=>{},timeoutError=new p_timeout_1.TimeoutError;class PQueue extends EventEmitter$4{constructor(j){var _e,et,nt,tt;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=empty,this._resolveIdle=empty,j=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:priority_queue_1.default},j),!(typeof j.intervalCap=="number"&&j.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(et=(_e=j.intervalCap)===null||_e===void 0?void 0:_e.toString())!==null&&et!==void 0?et:""}\` (${typeof j.intervalCap})`);if(j.interval===void 0||!(Number.isFinite(j.interval)&&j.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(tt=(nt=j.interval)===null||nt===void 0?void 0:nt.toString())!==null&&tt!==void 0?tt:""}\` (${typeof j.interval})`);this._carryoverConcurrencyCount=j.carryoverConcurrencyCount,this._isIntervalIgnored=j.intervalCap===1/0||j.interval===0,this._intervalCap=j.intervalCap,this._interval=j.interval,this._queue=new j.queueClass,this._queueClass=j.queueClass,this.concurrency=j.concurrency,this._timeout=j.timeout,this._throwOnTimeout=j.throwOnTimeout===!0,this._isPaused=j.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=empty,this._pendingCount===0&&(this._resolveIdle(),this._resolveIdle=empty,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const j=Date.now();if(this._intervalId===void 0){const _e=this._intervalEnd-j;if(_e<0)this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;else return this._timeoutId===void 0&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},_e)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const j=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const _e=this._queue.dequeue();return _e?(this.emit("active"),_e(),j&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(j){if(!(typeof j=="number"&&j>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${j}\` (${typeof j})`);this._concurrency=j,this._processQueue()}async add(j,_e={}){return new Promise((et,nt)=>{const tt=async()=>{this._pendingCount++,this._intervalCount++;try{const ot=this._timeout===void 0&&_e.timeout===void 0?j():p_timeout_1.default(Promise.resolve(j()),_e.timeout===void 0?this._timeout:_e.timeout,()=>{(_e.throwOnTimeout===void 0?this._throwOnTimeout:_e.throwOnTimeout)&&nt(timeoutError)});et(await ot)}catch(ot){nt(ot)}this._next()};this._queue.enqueue(tt,_e),this._tryToStartAnother(),this.emit("add")})}async addAll(j,_e){return Promise.all(j.map(async et=>this.add(et,_e)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(j=>{const _e=this._resolveEmpty;this._resolveEmpty=()=>{_e(),j()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(j=>{const _e=this._resolveIdle;this._resolveIdle=()=>{_e(),j()}})}get size(){return this._queue.size}sizeBy(j){return this._queue.filter(j).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(j){this._timeout=j}}var _default$2=dist$1.default=PQueue;const data$s={width:24,height:24,body:'<path fill="currentColor" d="M10 22L0 12L10 2l1.775 1.775L3.55 12l8.225 8.225L10 22Z"/>'},data$r={width:24,height:24,body:'<path fill="currentColor" d="m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 13.4Z"/>'},Transition=reactExports.forwardRef(function a(j,_e){return jsxRuntimeExports.jsx(Slide,{direction:"up",ref:_e,...j})});function withDialog(a){function j({popup:_e,open:et,dialogStyle:nt,responsive:tt,...ot}){const ct=useMediaQuery("(max-width:640px)");if(!_e&&!tt)return jsxRuntimeExports.jsx(a,{...ot});const ft=(dt,yt)=>{},ht=tt?!0:et;return jsxRuntimeExports.jsx(Dialog$1,{open:ht,fullScreen:ct,maxWidth:"lg",onClose:ft,...ct?{TransitionComponent:Transition,PaperProps:{sx:{borderRadius:3,borderBottomLeftRadius:0,borderBottomRightRadius:0}}}:{PaperProps:{sx:{borderRadius:3}}},children:jsxRuntimeExports.jsx(DialogContent,{sx:{maxWidth:"100%",maxHeight:"100%",p:"0px !important"},children:jsxRuntimeExports.jsx(Box,{sx:{maxWidth:"100%",width:ct?"100%":500,height:ct?"100%":"auto"},children:jsxRuntimeExports.jsx(a,{...ot,hideCloseButton:(ot==null?void 0:ot.hideCloseButton)??!1,isFullScreen:ct,mode:"dialog"})})})})}return j.propTypes={responsive:PropTypes.bool,popup:PropTypes.bool,open:PropTypes.bool,dialogStyle:PropTypes.object},j.defaultProps={responsive:!1,popup:!1,open:!1,dialogStyle:{}},j}var useIdle$1={},cjs={};Object.defineProperty(cjs,"__esModule",{value:!0});function throttle(a,j,_e,et){var nt,tt=!1,ot=0;function ct(){nt&&clearTimeout(nt)}function ft(){ct(),tt=!0}typeof j!="boolean"&&(et=_e,_e=j,j=void 0);function ht(){for(var dt=arguments.length,yt=new Array(dt),Tt=0;Tt<dt;Tt++)yt[Tt]=arguments[Tt];var St=this,At=Date.now()-ot;if(tt)return;function Rt(){ot=Date.now(),_e.apply(St,yt)}function It(){nt=void 0}et&&!nt&&Rt(),ct(),et===void 0&&At>a?Rt():j!==!0&&(nt=setTimeout(et?It:Rt,et===void 0?a-At:a))}return ht.cancel=ft,ht}function debounce(a,j,_e){return _e===void 0?throttle(a,j,!1):throttle(a,_e,j!==!1)}cjs.debounce=debounce;cjs.throttle=throttle;var util$4={};Object.defineProperty(util$4,"__esModule",{value:!0});util$4.isNavigator=util$4.isBrowser=util$4.off=util$4.on=util$4.noop=void 0;var noop$1=function(){};util$4.noop=noop$1;function on(a){for(var j=[],_e=1;_e<arguments.length;_e++)j[_e-1]=arguments[_e];a&&a.addEventListener&&a.addEventListener.apply(a,j)}util$4.on=on;function off(a){for(var j=[],_e=1;_e<arguments.length;_e++)j[_e-1]=arguments[_e];a&&a.removeEventListener&&a.removeEventListener.apply(a,j)}util$4.off=off;util$4.isBrowser=typeof window<"u";util$4.isNavigator=typeof navigator<"u";Object.defineProperty(useIdle$1,"__esModule",{value:!0});var react_1=reactExports,throttle_debounce_1=cjs,util_1$3=util$4,defaultEvents=["mousemove","mousedown","resize","keydown","touchstart","wheel"],oneMinute=6e4,useIdle=function(a,j,_e){a===void 0&&(a=oneMinute),j===void 0&&(j=!1),_e===void 0&&(_e=defaultEvents);var et=react_1.useState(j),nt=et[0],tt=et[1];return react_1.useEffect(function(){for(var ot=!0,ct,ft=nt,ht=function(St){ot&&(ft=St,tt(St))},dt=throttle_debounce_1.throttle(50,function(){ft&&ht(!1),clearTimeout(ct),ct=setTimeout(function(){return ht(!0)},a)}),yt=function(){document.hidden||dt()},Tt=0;Tt<_e.length;Tt++)util_1$3.on(window,_e[Tt],dt);return util_1$3.on(document,"visibilitychange",yt),ct=setTimeout(function(){return ht(!0)},a),function(){ot=!1;for(var St=0;St<_e.length;St++)util_1$3.off(window,_e[St],dt);util_1$3.off(document,"visibilitychange",yt)}},[a,_e]),nt},_default$1=useIdle$1.default=useIdle;const DEFAULT_MAX_IDLE_TIME=1e3*60*30,STORAGE_KEY_DISABLED="wallet_sw_keeper_disabled";let id$1;const injectIframe=a=>{const j=document.createElement("iframe");j.title="abt wallet",j.id=id$1,j.style.width=0,j.style.height=0,j.style.border=0,j.style.display="block",j.style.position="absolute",j.style.top=0,j.src=`${a}?action=iframe`,document.body.appendChild(j)},removeIframe=()=>{const a=document.getElementById(id$1);a&&document.body.removeChild(a)},cleanup=()=>{removeIframe(),id$1=null},enable=a=>{id$1||(id$1=`web_wallet_sw_keeper_${Date.now()}`,injectIframe(a))};function WebWalletSWKeeper({webWalletUrl:a,maxIdleTime:j}){const _e=reactExports.useRef(!!id$1),et=_default$1(j),nt=()=>{_e.current||cleanup()};return reactExports.useEffect(()=>{et?nt():enable(a)},[et]),reactExports.useEffect(()=>()=>nt(),[]),null}WebWalletSWKeeper.propTypes={webWalletUrl:PropTypes.string.isRequired,maxIdleTime:PropTypes.number};WebWalletSWKeeper.defaultProps={maxIdleTime:DEFAULT_MAX_IDLE_TIME};const withWebWalletSWKeeper=a=>function({webWalletUrl:_e,maxIdleTime:et,...nt}){const tt=useBrowser();_e=_e||getWebWalletUrl$1();const[ot]=useLocalStorageState(STORAGE_KEY_DISABLED,{defaultValue:1}),ct=detectWalletExtension(),ft=checkSameProtocol(_e),ht=tt.wallet;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!ot&&!ct&&ft&&!ht&&jsxRuntimeExports.jsx(WebWalletSWKeeper,{webWalletUrl:_e,maxIdleTime:et}),jsxRuntimeExports.jsx(a,{webWalletUrl:_e,...nt})]})},BlockletContext$1=reactExports.createContext(),{Provider:Provider$6,Consumer:Consumer$6}=BlockletContext$1;function BlockletProvider$1({children:a,baseUrl:j,loading:_e}){const[et,nt]=reactExports.useState(null),tt=useMemoizedFn(async()=>{if(!j||window.location.href.startsWith(j))throw new Error("no blocklet data");const ot=new URL("__blocklet__.js",j);return ot.searchParams.set("type","json"),await(await fetch(ot.href)).json()});return useAsyncEffect(async()=>{try{const ot=await tt();nt(ot)}catch{const ot=globalThis.blocklet||globalThis.env;nt(ot)}},[j]),jsxRuntimeExports.jsx(Provider$6,{value:et,children:et?a:_e||null})}function useBlockletContext$2(){return{blocklet:reactExports.useContext(BlockletContext$1)}}BlockletProvider$1.propTypes={baseUrl:PropTypes.string,children:PropTypes.any.isRequired,loading:PropTypes.any};BlockletProvider$1.defaultProps={baseUrl:"",loading:null};function Loading(){return jsxRuntimeExports.jsx(Box,{sx:{height:"100%",minWidth:"200px",minHeight:"200px",display:"flex",justifyContent:"center",alignItems:"center"},children:jsxRuntimeExports.jsx(CircularProgress,{sx:{color:colors$1.foregroundsFgInteractive}})})}function withBlocklet(a){function j({...et}){const{blocklet:nt}=useBlockletContext$2();return jsxRuntimeExports.jsx(a,{...et,blocklet:nt})}function _e({baseUrl:et,...nt}){return jsxRuntimeExports.jsx(BlockletProvider$1,{baseUrl:et,loading:jsxRuntimeExports.jsx(Loading,{}),children:jsxRuntimeExports.jsx(j,{baseUrl:et,...nt})})}return _e}const keyPair=tweetnacl.box.keyPair();function useSecurity(){const[a,j]=useLocalStorageState("__encKey",{defaultValue:encodeKey(keyPair.publicKey),deserializer:ot=>ot,serializer:ot=>ot}),[_e,et]=useLocalStorageState("__decKey",{defaultValue:encodeKey(keyPair.secretKey),deserializer:ot=>ot,serializer:ot=>ot});return reactExports.useEffect(()=>{localStorage.getItem("__encKey")||j(encodeKey(keyPair.publicKey)),localStorage.getItem("__decKey")||et(encodeKey(keyPair.secretKey))},[]),{encryptKey:a,decryptKey:_e,decrypt:(ot,ct=a,ft=_e)=>decrypt$1(ot,ct,ft),encrypt:(ot,ct=a)=>encrypt(ot,ct)}}function useApps({blocklet:a,action:j,sourceAppPid:_e,connectState:et,enableSwitchApp:nt}){var ht,dt;const tt=reactExports.useContext(SessionContext$1),ot=useCreation(()=>{var yt;return nt===!0?!0:!(nt===!1||(yt=tt==null?void 0:tt.session)!=null&&yt.user&&!["login"].includes(j))},[j,(ht=tt==null?void 0:tt.session)==null?void 0:ht.user]),ct=useCreation(()=>{if(isUndefined$2(_e)){const yt=getFederatedEnabled(a),Tt=getMaster(a);if(yt&&(Tt!=null&&Tt.appPid))return Tt.appPid}return _e},[_e]);return{appInfoList:useCreation(()=>getApps(a).filter(Tt=>{var St;return ot?!0:isUndefined$2(_e)?isUndefined$2(et.sourceAppPid)?(St=tt==null?void 0:tt.session)!=null&&St.user?Tt.sourceAppPid===tt.session.user.sourceAppPid:Tt.sourceAppPid===ct:Tt.sourceAppPid===et.sourceAppPid:Tt.sourceAppPid===_e}),[ot,_e,et.sourceAppPid,ct,(dt=tt==null?void 0:tt.session)==null?void 0:dt.user]),autoGenerateSourceAppPid:ct,canSwitchApp:ot}}const translations$3={en:{generateError:"Request new qrcode failed",checkError:"Status check failed!",scanned:"Use your wallet to continue operation...",mfaCode:"We sent you a verification request on your DID Wallet, enter the digits below to confirm.",refresh:"Refresh",open:"Open in DID Wallet",openDidConnect:"Open DID Connect",error:"We encountered some errors when processing the request",invalidSessionStatus:"Invalid session status",success:"Success",wait:"Wait a second",waiting:"Waiting for next workflow to complete...",failed:"Failed",oops:"Oops",forbidden:"Login user and wallet user mismatch, please logout, then login to retry",webWallet:"Auth with Web Wallet",cancel:"Cancel",close:"Close",retry:"Retry",retryForbidden:"Please start this workflow from the beginning",getWallet:"Don't have the DID Wallet? Get it now.",back:"Back",connect:"Use the following to connect",connecting:"Connecting to your",connectingSuffix:"Or use the following to connect",connected:"Connected to your",busyTitle:"Busy",busyDesc:"Busy processing another DID Connect request",loginWithBefore:"Login with ",loginWithAfter:"",bindOAuth:"Bind third party login",bind:"Bind ",loginOAuthFailed:"Login with third party failed",loginWithAnotherAccount:"Login with another account",quickLoginDescription:"The following accounts have been detected in the current unified login environment. Click the following accounts to log in quickly.",quickLogin:"Login {appName} with {masterAppName} account",sessionFrom:"Session founded from {appName} blocklet",loginWithThisAccount:"Click to login with this account",chooseAccount:"Choose an account",lostPassport:"Lost your passport?",lostPassportTips:"If you have lost your passport, you can click here to claim back.",download:"Download",downloadTips:"Don't have DID Wallet ?",scanWithWallet:"Easy Login with QR Code Scanning",openInWallet:"Open in DID Wallet",webExtension:"Web Wallet Extension",connectButton:"Connect",switch:"Switch",requestConnect:"Requesting Connection",continueInWallet:"Please continue in the DID Wallet",loginWithBelow:"Login using the following methods",otherAccount:"Other account"},zh:{generateError:"二维码生成失败",checkError:"扫码状态检查失败",scanned:"请到您的钱包上继续操作……",mfaCode:"我们给你的 DID 钱包发送了一个二次验证请求,请输入下面的数字完成验证",refresh:"刷新",open:"在 DID 钱包中打开",openDidConnect:"打开 DID Connect",error:"服务器开小差了!",invalidSessionStatus:"无效的会话状态",success:"成功",failed:"失败",wait:"请稍候",waiting:"正在等待下个流程完成...",forbidden:"登录用户和扫码用户不匹配,为保障安全,请退出后重新登录",oops:"哎呀",webWallet:"使用 Web Wallet 验证",cancel:"取消",close:"关闭",retry:"重试",retryForbidden:"请关闭当前弹窗并重新开始当前流程",getWallet:"还没有 DID Wallet? 现在下载.",back:"返回",connect:"请选择以下方式之一连接",connecting:"正在自动连接您的",connectingSuffix:"或选择以下方式手动连接",connected:"已连接您的",busyTitle:"钱包繁忙",busyDesc:"正在处理其他请求",loginWithBefore:"使用",loginWithAfter:"登录",bindOAuth:"绑定第三方登录",bind:"绑定",loginOAuthFailed:"第三方登录失败",loginWithAnotherAccount:"使用其他账户登录",quickLoginDescription:"检测到当前统一登录环境中已存在下列账户,点击以下账户,进行快捷登录",quickLogin:"使用 {masterAppName} 账户登录 {appName}",sessionFrom:"发现自 {appName} 应用",loginWithThisAccount:"点击使用此账号登录",chooseAccount:"选择一个账号",lostPassport:"找回通行证",lostPassportTips:"如果您丢失了登录通行证,您可以点击这里来找回。",download:"下载",downloadTips:"没有 DID Wallet ?",scanWithWallet:"使用 DID Wallet 扫码二维码",openInWallet:"使用 DID Wallet 打开",webExtension:"浏览器插件",connectButton:"连接",switch:"切换",requestConnect:"正在请求连接",continueInWallet:"请在 DID Wallet 中继续完成您的操作",loginWithBelow:"使用以下方式进行登录",otherAccount:"其他账号"}},StateContext=reactExports.createContext({isWalletWebview:!1,isMobile:!1,matchSmallScreen:!1}),{Provider:Provider$5,Consumer:Consumer$5}=StateContext;function StateProvider({children:a,blocklet:j,action:_e,extraParams:et,locale:nt,...tt}){var Kt;const ot=useMemoizedFn((jt,zt={})=>translate(translations$3,jt,nt,"en",zt)),ct=reactExports.useContext(SessionContext$1),ft=useReactive({sourceAppPid:void 0,status:"created",autoActiveWebview:!0}),ht=reactExports.useRef({cancelCount:0}),dt=useBrowser(),{appInfoList:yt,autoGenerateSourceAppPid:Tt,canSwitchApp:St}=useApps({blocklet:j,connectState:ft,action:_e,sourceAppPid:et==null?void 0:et.sourceAppPid,enableSwitchApp:(et==null?void 0:et.forceSwitch)||(et==null?void 0:et.enableSwitchApp)}),At=reactExports.useRef(null),Rt=useSize(At),Ct=((Rt==null?void 0:Rt.width)||0)<500,kt=useCreation(()=>{var jt,zt;return St?{...et,sourceAppPid:isUndefined$2(ft.sourceAppPid)?Tt:ft.sourceAppPid}:(jt=ct==null?void 0:ct.session)!=null&&jt.user?isUndefined$2(et==null?void 0:et.sourceAppPid)?{...et,sourceAppPid:(zt=ct.session.user)==null?void 0:zt.sourceAppPid}:et:{...et,sourceAppPid:Tt}},[St,et,ft.sourceAppPid,_e,Tt,(Kt=ct==null?void 0:ct.session)==null?void 0:Kt.user]),Pt=useMemoizedFn(jt=>{ft.status=jt||"created"}),Bt={isWalletWebview:dt.wallet,isMobile:dt.mobile.any,matchSmallScreen:Ct,connectState:ft,staticState:ht,reactiveState:ft,appInfoList:yt,extraParams:kt,blocklet:j,t:ot,locale:nt,changeStatus:Pt};return jsxRuntimeExports.jsx(Provider$5,{value:Bt,children:jsxRuntimeExports.jsx(Box,{...tt,ref:At,children:a})})}StateProvider.propTypes={children:PropTypes.any.isRequired,blocklet:PropTypes.object.isRequired,action:PropTypes.string.isRequired,sourceAppPid:PropTypes.string,extraParams:PropTypes.object,locale:PropTypes.string};StateProvider.defaultProps={sourceAppPid:void 0,extraParams:{},locale:"en"};function useStateContext(){return reactExports.useContext(StateContext)}const data$q={width:24,height:24,hidden:!0,body:'<path fill="currentColor" d="M12 11q.825 0 1.413-.588Q14 9.825 14 9t-.587-1.413Q12.825 7 12 7q-.825 0-1.412.587Q10 8.175 10 9q0 .825.588 1.412Q11.175 11 12 11Zm0 2q-1.65 0-2.825-1.175Q8 10.65 8 9q0-1.65 1.175-2.825Q10.35 5 12 5q1.65 0 2.825 1.175Q16 7.35 16 9q0 1.65-1.175 2.825Q13.65 13 12 13Zm0 11q-2.475 0-4.662-.938q-2.188-.937-3.825-2.574Q1.875 18.85.938 16.663Q0 14.475 0 12t.938-4.663q.937-2.187 2.575-3.825Q5.15 1.875 7.338.938Q9.525 0 12 0t4.663.938q2.187.937 3.825 2.574q1.637 1.638 2.574 3.825Q24 9.525 24 12t-.938 4.663q-.937 2.187-2.574 3.825q-1.638 1.637-3.825 2.574Q14.475 24 12 24Zm0-2q1.8 0 3.375-.575T18.25 19.8q-.825-.925-2.425-1.612q-1.6-.688-3.825-.688t-3.825.688q-1.6.687-2.425 1.612q1.3 1.05 2.875 1.625T12 22Zm-7.7-3.6q1.2-1.3 3.225-2.1q2.025-.8 4.475-.8q2.45 0 4.463.8q2.012.8 3.212 2.1q1.1-1.325 1.713-2.95Q22 13.825 22 12q0-2.075-.788-3.887q-.787-1.813-2.15-3.175q-1.362-1.363-3.175-2.151Q14.075 2 12 2q-2.05 0-3.875.787q-1.825.788-3.187 2.151Q3.575 6.3 2.788 8.113Q2 9.925 2 12q0 1.825.6 3.463q.6 1.637 1.7 2.937Z"/>'},data$p={width:24,height:24,body:'<path fill="currentColor" d="M16.15 13H5q-.425 0-.713-.288T4 12q0-.425.288-.713T5 11h11.15L13.3 8.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.313t.712.288L19.3 11.3q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.575 4.575q-.3.3-.712.288t-.713-.313q-.275-.3-.288-.7t.288-.7L16.15 13Z"/>'};var zhCn={exports:{}};(function(a,j){(function(_e,et){a.exports=et(dayjs_minExports)})(commonjsGlobal,function(_e){function et(ot){return ot&&typeof ot=="object"&&"default"in ot?ot:{default:ot}}var nt=et(_e),tt={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(ot,ct){return ct==="W"?ot+"周":ot+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(ot,ct){var ft=100*ot+ct;return ft<600?"凌晨":ft<900?"早上":ft<1100?"上午":ft<1300?"中午":ft<1800?"下午":"晚上"}};return nt.default.locale(tt,null,!0),tt})})(zhCn);var updateLocale$1={exports:{}};(function(a,j){(function(_e,et){a.exports=et()})(commonjsGlobal,function(){return function(_e,et,nt){nt.updateLocale=function(tt,ot){var ct=nt.Ls[tt];if(ct)return(ot?Object.keys(ot):[]).forEach(function(ft){ct[ft]=ot[ft]}),ct}}})})(updateLocale$1);var updateLocaleExports=updateLocale$1.exports;const updateLocale=getDefaultExportFromCjs$1(updateLocaleExports);defaultDayjs.extend(localizedFormatPlugin);defaultDayjs.extend(utc$1);defaultDayjs.extend(timezone$1);defaultDayjs.extend(updateLocale);defaultDayjs.extend(relativeTime$1);defaultDayjs.updateLocale("zh-cn",{relativeTime:{future:"%s后",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"}});setDateTool(defaultDayjs);function RelativeTime({value:a,locale:j,withoutSuffix:_e,from:et,to:nt,type:tt,tz:ot,relativeRange:ct,...ft}){if(!a)return"-";const ht=j==="zh"?"zh-cn":"en-us",dt=defaultDayjs(a).locale(ht);ot&&dt.tz(ot);const yt=formatToDatetime$1(a,{locale:ht,tz:ot});let Tt;if(et)Tt=dt.from(et,_e);else if(nt)Tt=dt.to(nt,_e);else if(ct){const Rt=dt.diff(defaultDayjs());Math.abs(Rt)>ct&&(Tt=yt)}Tt||(Tt=dt.fromNow(_e));let St=Tt,At=yt;return tt==="absolute"&&(St=yt,At=Tt),jsxRuntimeExports.jsx(Tooltip,{title:At,placement:"top-end",enterTouchDelay:0,children:jsxRuntimeExports.jsx("span",{...ft,children:St})})}RelativeTime.propTypes={value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired,locale:PropTypes.string,withoutSuffix:PropTypes.bool,from:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),to:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),type:PropTypes.oneOf(["relative","absolute"]),tz:PropTypes.string,relativeRange:PropTypes.number};RelativeTime.defaultProps={locale:"en",withoutSuffix:!1,from:"",to:"",type:"relative",tz:void 0,relativeRange:void 0};const data$o={width:24,height:24,body:'<path fill="currentColor" d="M7 7H5a2 2 0 0 0-2 2v8h2v-4h2v4h2V9a2 2 0 0 0-2-2m0 4H5V9h2m7-2h-4v10h2v-4h2a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2m0 4h-2V9h2m6 0v6h1v2h-4v-2h1V9h-1V7h4v2Z"/>'},data$n={width:24,height:24,body:'<path fill="currentColor" d="M5 17q-.425 0-.713-.288T4 16v-4q0-.425.288-.713T5 11q.425 0 .713.288T6 12v4q0 .425-.288.713T5 17Zm4 0q-.825 0-1.413-.588T7 15V9q0-.825.588-1.413T9 7h2q.825 0 1.413.588T13 9v6q0 .825-.588 1.413T11 17H9Zm0-2h2V9H9v6Zm6 2q-.425 0-.713-.288T14 16q0-.425.288-.713T15 15h3v-2h-2q-.825 0-1.413-.588T14 11V9q0-.825.588-1.413T16 7h3q.425 0 .713.288T20 8q0 .425-.288.713T19 9h-3v2h2q.825 0 1.413.588T20 13v2q0 .825-.588 1.413T18 17h-3ZM5 9q-.425 0-.713-.288T4 8q0-.425.288-.713T5 7q.425 0 .713.288T6 8q0 .425-.288.713T5 9Z"/>'},data$m={width:24,height:24,body:'<path fill="currentColor" d="M12 22q-2.05 0-3.875-.788t-3.188-2.15q-1.362-1.362-2.15-3.187T2 12q0-2.075.788-3.888t2.15-3.174Q6.3 3.575 8.124 2.788T12 2q2.075 0 3.888.788t3.174 2.15q1.363 1.362 2.15 3.175T22 12q0 2.05-.788 3.875t-2.15 3.188q-1.362 1.362-3.175 2.15T12 22Zm0-2.05q.65-.9 1.125-1.875T13.9 16h-3.8q.3 1.1.775 2.075T12 19.95Zm-2.6-.4q-.45-.825-.788-1.713T8.05 16H5.1q.725 1.25 1.813 2.175T9.4 19.55Zm5.2 0q1.4-.45 2.488-1.375T18.9 16h-2.95q-.225.95-.562 1.838T14.6 19.55ZM4.25 14h3.4q-.075-.5-.113-.988T7.5 12q0-.525.038-1.012T7.65 10h-3.4q-.125.5-.188.988T4 12q0 .525.063 1.012T4.25 14Zm5.4 0h4.7q.075-.5.113-.988T14.5 12q0-.525-.038-1.012T14.35 10h-4.7q-.075.5-.113.988T9.5 12q0 .525.038 1.012T9.65 14Zm6.7 0h3.4q.125-.5.188-.988T20 12q0-.525-.063-1.012T19.75 10h-3.4q.075.5.113.988T16.5 12q0 .525-.038 1.012T16.35 14Zm-.4-6h2.95q-.725-1.25-1.812-2.175T14.6 4.45q.45.825.788 1.713T15.95 8ZM10.1 8h3.8q-.3-1.1-.775-2.075T12 4.05q-.65.9-1.125 1.875T10.1 8Zm-5 0h2.95q.225-.95.563-1.838T9.4 4.45Q8 4.9 6.912 5.825T5.1 8Z"/>'},data$l={width:24,height:24,body:'<path fill="currentColor" d="M1 18q.225-2.675 1.638-4.925T6.4 9.5L4.55 6.3q-.15-.225-.075-.475T4.8 5.45q.2-.125.45-.05t.4.3L7.5 8.9Q9.65 8 12 8t4.5.9l1.85-3.2q.15-.225.4-.3t.45.05q.25.125.325.375t-.075.475L17.6 9.5q2.35 1.325 3.762 3.575T23 18H1Zm6-2.75q.525 0 .888-.363T8.25 14q0-.525-.363-.888T7 12.75q-.525 0-.888.363T5.75 14q0 .525.363.888T7 15.25Zm10 0q.525 0 .888-.363T18.25 14q0-.525-.363-.888T17 12.75q-.525 0-.888.363T15.75 14q0 .525.363.888t.887.362Z"/>'},data$k={width:24,height:24,body:'<path fill="currentColor" d="M14.6 8.075q0-1.075-.712-1.725T12 5.7q-.725 0-1.313.313t-1.012.912q-.4.575-1.088.663T7.4 7.225q-.35-.325-.388-.8t.238-.9q.8-1.2 2.038-1.863T12 3q2.425 0 3.938 1.375t1.512 3.6q0 1.125-.475 2.025t-1.75 2.125q-.925.875-1.25 1.363T13.55 14.6q-.1.6-.513 1t-.987.4q-.575 0-.988-.388t-.412-.962q0-.975.425-1.788T12.5 11.15q1.275-1.125 1.688-1.738t.412-1.337ZM12 22q-.825 0-1.413-.588T10 20q0-.825.588-1.413T12 18q.825 0 1.413.588T14 20q0 .825-.588 1.413T12 22Z"/>'},data$j={width:24,height:24,body:'<path fill="currentColor" d="M4 20q-.825 0-1.413-.588T2 18V6q0-.825.588-1.413T4 4h16q.825 0 1.413.588T22 6v12q0 .825-.588 1.413T20 20H4ZM20 8l-7.475 4.675q-.125.075-.263.113t-.262.037q-.125 0-.263-.037t-.262-.113L4 8v10h16V8Zm-8 3l8-5H4l8 5ZM4 8v.25v-1.475v.025V6v.8v-.012V8.25V8v10V8Z"/>'};function WalletOSIcon({loading:a,walletOS:j,provider:_e,color:et}){return a?jsxRuntimeExports.jsx(Icon,{icon:data$k,style:{color:"transparent"}}):_e===LOGIN_PROVIDER$1.AUTH0?jsxRuntimeExports.jsx(Icon,{icon:data$j,style:{color:et,transform:"scale(0.85)"}}):j==="ios"?jsxRuntimeExports.jsx(Icon,{icon:data$n,style:{color:et,transform:"scale(1.1)"}}):j==="android"?jsxRuntimeExports.jsx(Icon,{icon:data$l,style:{color:et}}):j==="web"?jsxRuntimeExports.jsx(Icon,{icon:data$m,style:{color:et}}):j==="api"?jsxRuntimeExports.jsx(Icon,{icon:data$o,style:{color:et,transform:"scale(1.05)"}}):null}WalletOSIcon.propTypes={loading:PropTypes.bool,walletOS:PropTypes.string,provider:PropTypes.string,color:PropTypes.string};WalletOSIcon.defaultProps={loading:!1,walletOS:null,provider:null,color:"black"};function ItemWrap({children:a,...j}){return jsxRuntimeExports.jsx(Box,{...j,sx:{borderRadius:2,backgroundColor:colors$1.backgroundsBgSubtile,p:2,transition:"background-color 0.5s","&:hover":{backgroundColor:colors$1.backgroundsBgSubtileHover},...j.sx},children:a})}ItemWrap.propTypes={children:PropTypes.any.isRequired};const data$i={width:24,height:24,body:'<path fill="currentColor" d="M8 20h8v-3q0-1.65-1.175-2.825T12 13q-1.65 0-2.825 1.175T8 17v3Zm4-9q1.65 0 2.825-1.175T16 7V4H8v3q0 1.65 1.175 2.825T12 11ZM5 22q-.425 0-.713-.288T4 21q0-.425.288-.713T5 20h1v-3q0-1.525.713-2.863T8.7 12q-1.275-.8-1.987-2.138T6 7V4H5q-.425 0-.713-.288T4 3q0-.425.288-.713T5 2h14q.425 0 .713.288T20 3q0 .425-.288.713T19 4h-1v3q0 1.525-.713 2.863T15.3 12q1.275.8 1.988 2.138T18 17v3h1q.425 0 .713.288T20 21q0 .425-.288.713T19 22H5Z"/>'},data$h={width:24,height:24,body:'<path fill="currentColor" d="m5.75 18l-.4-.35q-1.3-1.15-1.825-2.625T3 12.05Q3 9.7 4.187 7.787T7.4 4.85q.35-.2.75-.025t.525.575q.125.375-.013.75t-.487.575q-1.45.8-2.313 2.213T5 12.05q0 1.125.425 2.188T6.75 16.2l.25.25V15q0-.425.288-.713T8 14q.425 0 .713.288T9 15v4q0 .425-.288.713T8 20H4q-.425 0-.713-.288T3 19q0-.425.288-.713T4 18h1.75ZM17 7.55V9q0 .425-.288.713T16 10q-.425 0-.713-.288T15 9V5q0-.425.288-.713T16 4h4q.425 0 .713.288T21 5q0 .425-.288.713T20 6h-1.75l.4.35q1.025 1.05 1.575 2.225t.7 2.425H18.9q-.125-.875-.537-1.675T17.25 7.8L17 7.55ZM17.4 23q-.2 0-.313-.113t-.162-.287l-.225-1.1q-.3-.125-.563-.263T15.6 20.9l-1.075.325q-.175.05-.325-.013T13.95 21l-.6-1q-.1-.15-.05-.325t.175-.3l.825-.725q-.05-.35-.05-.65t.05-.65l-.825-.725q-.125-.125-.175-.3t.05-.325l.6-1q.1-.15.25-.212t.325-.013l1.075.325q.275-.2.538-.337t.562-.263l.225-1.1q.05-.175.163-.288T17.4 13h1.2q.2 0 .313.113t.162.287l.225 1.1q.3.125.563.275t.537.375l1.05-.375q.175-.05.338.013t.262.212l.6 1.05q.1.15.063.325t-.163.3l-.85.725q.05.3.05.625t-.05.625l.825.725q.125.125.175.3t-.05.325l-.6 1q-.1.15-.25.213t-.325.012L20.4 20.9q-.275.2-.537.338t-.563.262l-.225 1.1q-.05.175-.163.288T18.6 23h-1.2Zm.6-3q.825 0 1.413-.588T20 18q0-.825-.588-1.413T18 16q-.825 0-1.413.588T16 18q0 .825.588 1.413T18 20Z"/>'};function LoadingMask({size:a,padding:j,borderWidth:_e,borderRadius:et,duration:nt,children:tt}){const ot=a,ct=et??ot/8,ft=_e??ot/32,ht=j??ot*.2-ft,dt=nt??2.5;return jsxRuntimeExports.jsxs(Box,{sx:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:ot,height:ot,position:"relative"},children:[jsxRuntimeExports.jsx(Box,{sx:{pointerEvents:"none",position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",width:ot,height:ot,overflow:"hidden",borderRadius:`${ct}px`,backgroundColor:colors$1.strokeBorderBase,"&::before,&::after":{content:'""',position:"absolute",top:0,bottom:0,left:0,right:0,pointerEvents:"none"},"&::after":{left:ft,right:ft,top:ft,bottom:ft,backgroundColor:"white",borderRadius:`${ct-ft}px`},"&::before":{background:`conic-gradient(from 45deg, ${colors$1.foregroundsFgInteractiveTransparent} 0%, ${colors$1.foregroundsFgInteractiveTransparent} 50%, ${colors$1.foregroundsFgInteractive} 90%, ${colors$1.foregroundsFgInteractive} 100%)`,transform:"scale(100)",animation:`rotate ${dt}s linear infinite`,"@keyframes rotate":{"0%":{transform:"scale(100) rotate(0deg)"},"100%":{transform:"scale(100) rotate(360deg)"}}}}}),jsxRuntimeExports.jsx(Box,{sx:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",width:ot-ht-ft,height:ot-ht-ft},children:tt})]})}LoadingMask.propTypes={size:PropTypes.number,padding:PropTypes.number,borderRadius:PropTypes.number,borderWidth:PropTypes.number,duration:PropTypes.number,children:PropTypes.node.isRequired};LoadingMask.defaultProps={size:64,padding:void 0,borderWidth:void 0,duration:void 0,borderRadius:void 0};var DidWallet={};Object.defineProperty(DidWallet,"__esModule",{value:!0});var default_1$3=DidWallet.default=void 0;_interopRequireDefault$3(reactExports);var _jsxRuntime$3=jsxRuntimeExports;function _interopRequireDefault$3(a){return a&&a.__esModule?a:{default:a}}function ownKeys$3(a,j){var _e=Object.keys(a);if(Object.getOwnPropertySymbols){var et=Object.getOwnPropertySymbols(a);j&&(et=et.filter(function(nt){return Object.getOwnPropertyDescriptor(a,nt).enumerable})),_e.push.apply(_e,et)}return _e}function _objectSpread$1(a){for(var j=1;j<arguments.length;j++){var _e=arguments[j]!=null?arguments[j]:{};j%2?ownKeys$3(Object(_e),!0).forEach(function(et){_defineProperty$1(a,et,_e[et])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(_e)):ownKeys$3(Object(_e)).forEach(function(et){Object.defineProperty(a,et,Object.getOwnPropertyDescriptor(_e,et))})}return a}function _defineProperty$1(a,j,_e){return(j=_toPropertyKey$1(j))in a?Object.defineProperty(a,j,{value:_e,enumerable:!0,configurable:!0,writable:!0}):a[j]=_e,a}function _toPropertyKey$1(a){var j=_toPrimitive$1(a,"string");return typeof j=="symbol"?j:j+""}function _toPrimitive$1(a,j){if(typeof a!="object"||!a)return a;var _e=a[Symbol.toPrimitive];if(_e!==void 0){var et=_e.call(a,j||"default");if(typeof et!="object")return et;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(a)}var Component$1=function a(j){return(0,_jsxRuntime$3.jsxs)("svg",_objectSpread$1(_objectSpread$1({},j),{},{children:[(0,_jsxRuntime$3.jsxs)("g",{clipPath:"url(#clip0)",children:[(0,_jsxRuntime$3.jsx)("rect",{width:"32",height:"32",rx:"6",fill:"url(#paint0_linear)"}),(0,_jsxRuntime$3.jsx)("path",{d:"M3.52 7.36A2.56 2.56 0 0 1 6.08 4.8h19.84a2.56 2.56 0 0 1 2.56 2.56v12.16a2.56 2.56 0 0 1-2.56 2.56H6.08a2.56 2.56 0 0 1-2.56-2.56V7.36z",fill:"#9FCBFF",filter:"url(#filter0_i)"}),(0,_jsxRuntime$3.jsx)("path",{d:"M2.56 9.28a2.56 2.56 0 0 1 2.56-2.56h21.76a2.56 2.56 0 0 1 2.56 2.56v13.6a2.56 2.56 0 0 1-2.56 2.56H5.12a2.56 2.56 0 0 1-2.56-2.56V9.28z",fill:"url(#paint1_linear)",filter:"url(#filter1_d)"}),(0,_jsxRuntime$3.jsx)("path",{d:"M0 22.32l32-6.16V32H0v-9.68z",fill:"url(#paint2_linear)",filter:"url(#filter2_d)"}),(0,_jsxRuntime$3.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.536 9.248h8.288c.408 0 .74.3.74.672v4.64c0 .371-.332.672-.74.672H5.536c-.408 0-.74-.3-.74-.672v-.04a.158.158 0 1 0-.316 0v.04c0 .53.473.96 1.056.96h8.288c.583 0 1.056-.43 1.056-.96V9.92c0-.53-.473-.96-1.056-.96H5.536c-.583 0-1.056.43-1.056.96v.04a.158.158 0 0 0 .317 0v-.04c0-.371.33-.672.739-.672zm-1.023 4.638a.127.127 0 0 0 .087.034h1.267c.472 0 .83-.107 1.076-.322.25-.217.381-.548.397-.993a11.281 11.281 0 0 0 0-.734c-.012-.426-.148-.751-.406-.975-.258-.224-.622-.336-1.09-.336H4.6a.127.127 0 0 0-.087.034.117.117 0 0 0-.033.086v3.12c0 .032.011.06.033.086zm1.794-.806c-.099.1-.253.149-.464.149h-.502V11.25h.478c.21 0 .369.051.474.154.108.102.166.26.172.475.006.09.01.208.01.355s-.004.267-.01.36c-.006.221-.059.383-.158.485zm1.63.806a.127.127 0 0 0 .087.034h.64a.116.116 0 0 0 .087-.034.11.11 0 0 0 .038-.086v-3.12a.11.11 0 0 0-.038-.086.116.116 0 0 0-.086-.034h-.641a.127.127 0 0 0-.087.034.117.117 0 0 0-.033.086v3.12c0 .032.011.06.033.086zm1.637.034a.127.127 0 0 1-.086-.034.128.128 0 0 1-.033-.086v-3.12c0-.035.01-.064.033-.086a.127.127 0 0 1 .086-.034h1.244c.469 0 .832.112 1.09.336.259.224.394.549.407.974a11.244 11.244 0 0 1 0 .735c-.016.445-.148.776-.397.993-.245.215-.604.322-1.076.322H9.574zm1.244-.691c.21 0 .365-.05.464-.149.099-.102.152-.264.158-.485a5.52 5.52 0 0 0 .01-.36c0-.147-.004-.265-.01-.355-.006-.214-.064-.373-.172-.475-.106-.103-.263-.154-.474-.154h-.478v1.978h.502zm2.468-1.382a.288.288 0 0 1-.288-.286.288.288 0 0 1 .576 0c0 .158-.13.286-.288.286zm0 1.495a.288.288 0 0 1-.288-.286.288.288 0 0 1 .576 0c0 .158-.13.287-.288.287z",fill:"#4598FA"})]}),(0,_jsxRuntime$3.jsxs)("defs",{children:[(0,_jsxRuntime$3.jsxs)("filter",{id:"filter0_i",x:"3.52",y:"1.8",width:"24.96",height:"20.28",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,_jsxRuntime$3.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,_jsxRuntime$3.jsx)("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,_jsxRuntime$3.jsx)("feOffset",{dy:"-3"}),(0,_jsxRuntime$3.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,_jsxRuntime$3.jsx)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.2 0"}),(0,_jsxRuntime$3.jsx)("feBlend",{in2:"shape",result:"effect1_innerShadow"})]}),(0,_jsxRuntime$3.jsxs)("filter",{id:"filter1_d",x:"-1.44",y:"1.72",width:"34.88",height:"26.72",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,_jsxRuntime$3.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,_jsxRuntime$3.jsx)("feOffset",{dy:"-1"}),(0,_jsxRuntime$3.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{values:"0 0 0 0 0.220767 0 0 0 0 0.470803 0 0 0 0 0.701605 0 0 0 0.18 0"}),(0,_jsxRuntime$3.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow"}),(0,_jsxRuntime$3.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),(0,_jsxRuntime$3.jsxs)("filter",{id:"filter2_d",x:"-5",y:"11.16",width:"42",height:"25.84",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,_jsxRuntime$3.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,_jsxRuntime$3.jsx)("feOffset",{}),(0,_jsxRuntime$3.jsx)("feGaussianBlur",{stdDeviation:"2.5"}),(0,_jsxRuntime$3.jsx)("feColorMatrix",{values:"0 0 0 0 0.14382 0 0 0 0 0.205065 0 0 0 0 0.522634 0 0 0 0.25 0"}),(0,_jsxRuntime$3.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow"}),(0,_jsxRuntime$3.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),(0,_jsxRuntime$3.jsxs)("linearGradient",{id:"paint0_linear",x1:"16",x2:"16",y2:"32",gradientUnits:"userSpaceOnUse",children:[(0,_jsxRuntime$3.jsx)("stop",{stopColor:"#4F9DF6"}),(0,_jsxRuntime$3.jsx)("stop",{offset:"1",stopColor:"#0A79F8"})]}),(0,_jsxRuntime$3.jsxs)("linearGradient",{id:"paint1_linear",x1:"16",y1:"6.72",x2:"16",y2:"25.44",gradientUnits:"userSpaceOnUse",children:[(0,_jsxRuntime$3.jsx)("stop",{stopColor:"#fff"}),(0,_jsxRuntime$3.jsx)("stop",{offset:"1",stopColor:"#ECEFFF"})]}),(0,_jsxRuntime$3.jsxs)("linearGradient",{id:"paint2_linear",x1:"16",y1:"19.2",x2:"18.48",y2:"32",gradientUnits:"userSpaceOnUse",children:[(0,_jsxRuntime$3.jsx)("stop",{offset:".007",stopColor:"#77B2F6"}),(0,_jsxRuntime$3.jsx)("stop",{offset:".055",stopColor:"#4F9DF6"}),(0,_jsxRuntime$3.jsx)("stop",{offset:"1",stopColor:"#4598FA"})]}),(0,_jsxRuntime$3.jsx)("clipPath",{id:"clip0",children:(0,_jsxRuntime$3.jsx)("rect",{width:"32",height:"32",rx:"6",fill:"#fff"})})]})]}))};Component$1.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};Component$1.displayName="did-wallet";default_1$3=DidWallet.default=Component$1;function Success({size:a,backgroundColor:j,borderWidth:_e}){const et=a-_e*2;return jsxRuntimeExports.jsxs(Box,{className:"check-icon",sx:{width:et,height:et,position:"relative",borderRadius:"100%","&, *, *::before, *::after":{boxSizing:"content-box !important"},border:nt=>`${_e}px solid ${nt.palette.success.main}`,"&::before, &::after":{content:'""',height:"125%",position:"absolute",background:j,transform:"rotate(-45deg)"},"&::before":{top:`${_e/2+1}px`,left:`-${_e/2}px`,width:`calc(32.5% + ${_e}px)`,transformOrigin:"100% 50%",borderRadius:"100% 0 0 100%"},"&::after":{top:0,left:"37.5%",width:`calc(70% + ${_e}px)`,transformOrigin:"0 50%",borderRadius:"0 100% 100% 0",animation:"rotate-circle 4.25s ease-in"},".icon-line":{height:`${_e+1}px`,backgroundColor:nt=>nt.palette.success.main,display:"block",borderRadius:"100vw",position:"absolute",zIndex:10},"@keyframes rotate-circle":{"0%":{transform:"rotate(-45deg)"},"5%":{transform:"rotate(-45deg)"},"12%":{transform:"rotate(-405deg)"},"100%":{transform:"rotate(-405deg)"}}},children:[jsxRuntimeExports.jsx(Box,{component:"span",className:"icon-line line-tip",sx:{top:"57.5%",left:"17.5%",width:"31.25%",transform:"rotate(45deg)",animation:"icon-line-tip 0.75s","@keyframes icon-line-tip":{"0%":{width:"0",left:"1px",top:"23.75%"},"54%":{width:"0",left:"1px",top:"23.75%"},"70%":{width:"62.5%",left:"-10%",top:"46.25%"},"84%":{width:"21.25%",left:"26.25%",top:"60%"},"100%":{width:"31.25",left:"17.5%",top:"56.25%"}}}}),jsxRuntimeExports.jsx(Box,{component:"span",className:"icon-line line-long",sx:{top:"47.5%",right:"10%",width:"58.75%",transform:"rotate(-45deg)",animation:"icon-line-long 0.75s","@keyframes icon-line-long":{"0%":{width:"0",right:"57.5%",top:"67.5%"},"65%":{width:"0",right:"57.5%",top:"67.5%"},"84%":{width:"68.75%",right:"0px",top:"43.75%"},"100%":{width:"58.75%",right:"10%",top:"47.5%"}}}}),jsxRuntimeExports.jsx(Box,{className:"icon-circle",sx:{top:`-${_e}px`,left:`-${_e}px`,zIndex:10,width:et,height:et,borderRadius:"100%",position:"absolute",boxSizing:"contentBox",border:`${_e}px solid rgba(76, 175, 80, 0.5)`}}),jsxRuntimeExports.jsx(Box,{className:"icon-fix",sx:{top:`calc(8% - ${Math.sqrt(_e)}px)`,width:_e+1,left:`calc(32% - ${Math.sqrt(_e)}px)`,zIndex:1,height:et+_e*2,position:"absolute",transform:"rotate(-45deg)",backgroundColor:j}})]})}Success.propTypes={size:PropTypes.number,borderWidth:PropTypes.number,backgroundColor:PropTypes.string};Success.defaultProps={size:64,borderWidth:4,backgroundColor:"white"};function Button({...a}){return jsxRuntimeExports.jsx(Button$1,{variant:"outlined",color:"inherit",...a,sx:{borderRadius:2,borderColor:colors$1.strokeBorderBase,color:colors$1.foregroundsFgBase,backgroundColor:"#fff",fontWeight:500,fontSize:13,...a.sx}})}function BaseStatus({icon:a,title:j,color:_e,description:et,extraContent:nt,actions:tt}){return jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:1.5},children:[reactExports.isValidElement(a)?a:jsxRuntimeExports.jsx(Box,{sx:{backgroundColor:_e,borderRadius:"100%",fontSize:0},children:jsxRuntimeExports.jsx(Icon,{icon:a,fontSize:52,style:{transform:"scale(0.7)",color:"white"}})}),jsxRuntimeExports.jsxs(Box,{sx:{textAlign:"center"},children:[jsxRuntimeExports.jsx(Typography,{variant:"h6",sx:{fontWeight:500,color:_e},children:j}),jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{color:colors$1.foregroundsFgSubtile,overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":"3",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:et})]}),nt,jsxRuntimeExports.jsx(Box,{children:tt})]})}BaseStatus.propTypes={icon:PropTypes.node,title:PropTypes.string,color:PropTypes.string,description:PropTypes.string,extraContent:PropTypes.node,actions:PropTypes.node};BaseStatus.defaultProps={icon:null,title:"",color:colors$1.foregroundsFgBase,description:"",extraContent:null,actions:null};function MfaCode({title:a,mfaCode:j}){return jsxRuntimeExports.jsxs(Box,{className:"status-mfa",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",border:`1px solid ${colors$1.strokeBorderBase}`,borderRadius:2,maxWidth:"360px",backgroundColor:"transparent",p:1},children:[jsxRuntimeExports.jsx(Box,{className:"status-mfa-tip",sx:{textAlign:"center",textWrap:"balance"},children:a}),jsxRuntimeExports.jsx(Typography,{className:"status-mfa-code",sx:{mt:1,lineHeight:1,fontSize:"36px",fontWeight:700,letterSpacing:1},children:j})]})}MfaCode.propTypes={title:PropTypes.string,mfaCode:PropTypes.number};MfaCode.defaultProps={title:"",mfaCode:0};function ConnectStatus({status:a,nextWorkflow:j,mfaCode:_e,onCancel:et,onRetry:nt,onClose:tt,messages:ot,locale:ct,...ft}){const ht=translations$3[ct]||translations$3.en;return jsxRuntimeExports.jsxs(Box,{...ft,sx:{py:2,minHeight:200,...ft.sx},children:[a==="scanned"&&!j&&jsxRuntimeExports.jsx(BaseStatus,{icon:jsxRuntimeExports.jsx(LoadingMask,{size:52,borderRadius:12,children:jsxRuntimeExports.jsx(default_1$3,{style:{width:"100%",height:"100%"}})}),title:ht.requestConnect,description:ht.continueInWallet,extraContent:_e>0&&jsxRuntimeExports.jsx(MfaCode,{mfaCode:_e,title:ht.mfaCode}),actions:jsxRuntimeExports.jsx(Button,{onClick:et,children:ht.back})}),a==="scanned"&&!!j&&jsxRuntimeExports.jsx(BaseStatus,{color:colors$1.foregroundsFgInteractive,icon:data$i,title:ht.wait,description:ht.waiting,extraContent:_e>0&&jsxRuntimeExports.jsx(MfaCode,{mfaCode:_e,title:ht.mfaCode}),actions:jsxRuntimeExports.jsx(Button,{onClick:et,children:ht.back})}),a==="succeed"&&jsxRuntimeExports.jsx(BaseStatus,{color:"#3ab39d",icon:jsxRuntimeExports.jsx(Success,{size:52}),title:ht.success,description:ot.success,actions:jsxRuntimeExports.jsx(Button,{onClick:tt,children:ht.close})}),a==="error"&&jsxRuntimeExports.jsx(BaseStatus,{color:colors$1.buttonsButtonDanger,icon:data$r,title:ht.failed,description:ot.error||ht.error,actions:jsxRuntimeExports.jsx(Button,{onClick:nt,children:ht.retry})}),a==="busy"&&jsxRuntimeExports.jsx(BaseStatus,{color:"#ed6c02",icon:data$h,title:ht.busyTitle,description:ot.error||ht.busyDesc,actions:jsxRuntimeExports.jsx(Button,{onClick:nt,children:ht.retry})})]})}ConnectStatus.propTypes={status:PropTypes.string,nextWorkflow:PropTypes.string,mfaCode:PropTypes.number,onCancel:PropTypes.func,onRetry:PropTypes.func,onClose:PropTypes.func,messages:PropTypes.shape({confirm:PropTypes.string.isRequired,success:PropTypes.any.isRequired,error:PropTypes.any.isRequired}).isRequired,locale:PropTypes.oneOf(["en","zh"])};ConnectStatus.defaultProps={status:"",nextWorkflow:"",mfaCode:0,onCancel:noop$7,onRetry:noop$7,onClose:noop$7,locale:"en"};function QuickLoginItem({userSession:a,locale:j}){var et,nt,tt,ot;const _e=getSourceProvider(a==null?void 0:a.user)==="wallet";return jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer","&:hover":{backgroundColor:colors$1.surfacePrimarySubtitle}},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flex:1,overflow:"hidden"},children:[jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{src:a.user.avatar,did:a.user.did,size:48,variant:"circle",shape:"circle"}),jsxRuntimeExports.jsxs(Box,{sx:{flex:1,overflow:"hidden"},children:[jsxRuntimeExports.jsxs(Typography,{sx:{fontSize:"16px",fontWeight:"bold",display:"flex",alignItems:"center",gap:1,color:colors$1.textBase},children:[a.user.fullName,jsxRuntimeExports.jsx(Chip,{label:((et=a.user)==null?void 0:et.roleTitle)||((nt=a.user)==null?void 0:nt.role),size:"small",variant:"outlined",sx:()=>({height:"auto",fontWeight:"bold",fontSize:"12px",borderColor:colors$1.lineBorderStrong,color:colors$1.textSubtitle})})]}),_e?jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[jsxRuntimeExports.jsx(WalletOSIcon,{provider:(tt=a==null?void 0:a.extra)==null?void 0:tt.provider,walletOS:(ot=a==null?void 0:a.extra)==null?void 0:ot.walletOS,color:colors$1.textSubtitle}),jsxRuntimeExports.jsx(DID,{did:a.user.did,size:12,sx:{lineHeight:1,fontSize:"12px",mt:.5},responsive:!0})]}):jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"12px",color:colors$1.textSubtitle},children:a.user.email})]})]}),a.updatedAt&&jsxRuntimeExports.jsx(Box,{component:"span",sx:{color:colors$1.textMuted,fontSize:"12px",flexShrink:0},children:jsxRuntimeExports.jsx(RelativeTime,{value:a.updatedAt,locale:j})})]})}QuickLoginItem.propTypes={userSession:PropTypes.shape({user:PropTypes.shape({avatar:PropTypes.string,did:PropTypes.string,fullName:PropTypes.string,role:PropTypes.string,roleTitle:PropTypes.string,email:PropTypes.string}),extra:PropTypes.shape({walletOS:PropTypes.string,provider:PropTypes.string}),updatedAt:PropTypes.string}).isRequired,locale:PropTypes.string};QuickLoginItem.defaultProps={locale:"en"};function QuickConnect({userSessions:a,onLogin:j,onClose:_e,messages:et,onRetry:nt,onLoginAnother:tt}){const{t:ot,locale:ct,changeStatus:ft,blocklet:ht}=useStateContext(),dt=ot("otherAccount"),yt=useReactive({loadingId:null,status:"created",messages:{confirm:et.confirm,success:et.success,error:""},reset(){this.loadingId=null,this.status="created",this.messages.error=""}}),Tt=useMemoizedFn(async At=>{yt.loadingId=At.id;try{await j({...At,appPid:ht==null?void 0:ht.appPid}),yt.status="succeed"}catch(Rt){yt.status="error",yt.messages.error=Rt.messages}finally{yt.loadingId=null}}),St=useMemoizedFn(()=>{yt.reset(),nt()});return reactExports.useEffect(()=>{ft(yt.status)},[ft,yt.status]),yt.status!=="created"?jsxRuntimeExports.jsx(ConnectStatus,{status:yt.status,onRetry:St,onClose:_e,messages:yt.messages,locale:ct,className:"auth-status"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[a.map(At=>{var Rt;return jsxRuntimeExports.jsx(Tooltip,{title:ot("loginWithThisAccount"),arrow:!0,placement:"top",children:jsxRuntimeExports.jsxs(Box,{sx:{position:"relative"},onClick:()=>Tt(At),children:[yt.loadingId===At.id?jsxRuntimeExports.jsx(LinearProgress,{sx:{height:"2px",position:"absolute",top:0,left:0,right:0}}):null,jsxRuntimeExports.jsx(QuickLoginItem,{userSession:At,locale:ct})]})},(Rt=At==null?void 0:At.user)==null?void 0:Rt.did)}),jsxRuntimeExports.jsx(Tooltip,{title:ot("loginWithAnotherAccount"),arrow:!0,placement:"top",children:jsxRuntimeExports.jsx(Box,{children:jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer","&:hover":{backgroundColor:colors$1.surfacePrimarySubtitle},color:colors$1.textBase},onClick:tt,children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Box,{sx:{fontSize:0,p:.5},children:jsxRuntimeExports.jsx(Icon,{icon:data$q,fontSize:"40px"})}),jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"16px",fontWeight:"bold"},children:dt})]}),jsxRuntimeExports.jsx(Icon,{className:"other-item-icon",icon:data$p,fontSize:"24px"})]})})})]})}QuickConnect.propTypes={userSessions:PropTypes.array.isRequired,onLogin:PropTypes.func.isRequired,onRetry:PropTypes.func.isRequired,onClose:PropTypes.func.isRequired,onLoginAnother:PropTypes.func.isRequired,messages:PropTypes.object};QuickConnect.defaultProps={messages:{}};var HASH_UNDEFINED$2="__lodash_hash_undefined__";function setCacheAdd$1(a){return this.__data__.set(a,HASH_UNDEFINED$2),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(a){return this.__data__.has(a)}var _setCacheHas=setCacheHas$1,MapCache$2=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$3(a){var j=-1,_e=a==null?0:a.length;for(this.__data__=new MapCache$2;++j<_e;)this.add(a[j])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd;SetCache$3.prototype.has=setCacheHas;var _SetCache=SetCache$3;function baseFindIndex$1(a,j,_e,et){for(var nt=a.length,tt=_e+(et?1:-1);et?tt--:++tt<nt;)if(j(a[tt],tt,a))return tt;return-1}var _baseFindIndex=baseFindIndex$1;function baseIsNaN$1(a){return a!==a}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(a,j,_e){for(var et=_e-1,nt=a.length;++et<nt;)if(a[et]===j)return et;return-1}var _strictIndexOf=strictIndexOf$1,baseFindIndex=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$2(a,j,_e){return j===j?strictIndexOf(a,j,_e):baseFindIndex(a,baseIsNaN,_e)}var _baseIndexOf=baseIndexOf$2,baseIndexOf$1=_baseIndexOf;function arrayIncludes$3(a,j){var _e=a==null?0:a.length;return!!_e&&baseIndexOf$1(a,j,0)>-1}var _arrayIncludes=arrayIncludes$3;function arrayIncludesWith$2(a,j,_e){for(var et=-1,nt=a==null?0:a.length;++et<nt;)if(_e(j,a[et]))return!0;return!1}var _arrayIncludesWith=arrayIncludesWith$2;function cacheHas$3(a,j){return a.has(j)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arrayIncludes$2=_arrayIncludes,arrayIncludesWith$1=_arrayIncludesWith,arrayMap$3=_arrayMap,baseUnary$1=_baseUnary,cacheHas$2=_cacheHas,nativeMin=Math.min;function baseIntersection$1(a,j,_e){for(var et=_e?arrayIncludesWith$1:arrayIncludes$2,nt=a[0].length,tt=a.length,ot=tt,ct=Array(tt),ft=1/0,ht=[];ot--;){var dt=a[ot];ot&&j&&(dt=arrayMap$3(dt,baseUnary$1(j))),ft=nativeMin(dt.length,ft),ct[ot]=!_e&&(j||nt>=120&&dt.length>=120)?new SetCache$2(ot&&dt):void 0}dt=a[0];var yt=-1,Tt=ct[0];e:for(;++yt<nt&&ht.length<ft;){var St=dt[yt],At=j?j(St):St;if(St=_e||St!==0?St:0,!(Tt?cacheHas$2(Tt,At):et(ht,At,_e))){for(ot=tt;--ot;){var Rt=ct[ot];if(!(Rt?cacheHas$2(Rt,At):et(a[ot],At,_e)))continue e}Tt&&Tt.push(At),ht.push(St)}}return ht}var _baseIntersection=baseIntersection$1,isArrayLikeObject$1=isArrayLikeObject_1;function castArrayLikeObject$1(a){return isArrayLikeObject$1(a)?a:[]}var _castArrayLikeObject=castArrayLikeObject$1,arrayMap$2=_arrayMap,baseIntersection=_baseIntersection,baseRest$2=_baseRest,castArrayLikeObject=_castArrayLikeObject,intersection=baseRest$2(function(a){var j=arrayMap$2(a,castArrayLikeObject);return j.length&&j[0]===a[0]?baseIntersection(j):[]}),intersection_1=intersection;const intersection$1=getDefaultExportFromCjs$1(intersection_1),data$g={width:24,height:24,body:'<path fill="currentColor" d="M19 21q-.975 0-1.75-.563T16.175 19H11q-1.65 0-2.825-1.175T7 15q0-1.65 1.175-2.825T11 11h2q.825 0 1.413-.588T15 9q0-.825-.588-1.413T13 7H7.825q-.325.875-1.088 1.438T5 9q-1.25 0-2.125-.875T2 6q0-1.25.875-2.125T5 3q.975 0 1.738.563T7.824 5H13q1.65 0 2.825 1.175T17 9q0 1.65-1.175 2.825T13 13h-2q-.825 0-1.413.588T9 15q0 .825.588 1.413T11 17h5.175q.325-.875 1.088-1.438T19 15q1.25 0 2.125.875T22 18q0 1.25-.875 2.125T19 21ZM5 7q.425 0 .713-.288T6 6q0-.425-.288-.713T5 5q-.425 0-.713.288T4 6q0 .425.288.713T5 7Z"/>'},chromeExtDownloadUrl="https://chromewebstore.google.com/detail/did-wallet/ibjflpbmadchofnbpppegdbnifdgincp",edgeExtDownloadUrl="https://microsoftedge.microsoft.com/addons/detail/did-wallet/hjgoblidjnnnamdkinbichnfbmghmafd";function WebLoginItem({tokenState:a,locale:j,webWalletUrl:_e}){const et=detectWalletExtension(),{t:nt}=useStateContext(),tt=useMemoizedFn(()=>{openWebWallet({webWalletUrl:_e,url:a.url,locale:j})}),ot=useCreation(()=>{var St;const Tt=(St=window==null?void 0:window.navigator)==null?void 0:St.userAgent;return Tt.indexOf("Edge")>-1||Tt.indexOf("Edg")>-1?"edge":Tt.indexOf("Chrome")>-1?"chrome":"unknown"},[]),ct=useCreation(()=>ot==="edge"?edgeExtDownloadUrl:ot==="chrome"?chromeExtDownloadUrl:null,[ot]),ft=useCreation(()=>et?{onClick:tt}:ct?{href:ct,target:"_blank",rel:"noopener"}:{onClick:tt},[tt]),ht=useCreation(()=>et||ct?"Web Wallet Extension":"Web Wallet",[et,ct]),dt=useCreation(()=>!et&&!ct?new URL(_e).hostname:null,[_e,ct]),yt=useCreation(()=>et?null:ct?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["You can also use"," ",jsxRuntimeExports.jsx(Box,{onClick:tt,component:"span",sx:{color:colors$1.foregroundsFgInteractive,cursor:"pointer","&:hover":{textDecoration:"underline dashed"}},children:"Web Wallet"})]}):null,[et,ct]);return jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(default_1$3,{width:"24px",height:"24px"}),jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"14px",fontWeight:500},children:ht}),dt?jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"12px",color:colors$1.textMuted},children:dt}):null]}),yt?jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"12px",color:colors$1.textMuted},children:yt}):null]})]}),jsxRuntimeExports.jsx(Button,{...ft,startIcon:jsxRuntimeExports.jsx(Icon,{icon:data$g}),children:nt("connectButton")})]})}WebLoginItem.propTypes={tokenState:PropTypes.object.isRequired,locale:PropTypes.string,webWalletUrl:PropTypes.string.isRequired};WebLoginItem.defaultProps={locale:"en"};var qrCodeStyling={exports:{}};(function(a,j){(function(_e,et){a.exports=et()})(commonjsGlobal,function(){return(()=>{var _e={192:(tt,ot)=>{var ct,ft,ht=function(){var dt=function(st,ut){var pt=st,mt=It[ut],$t=null,xt=0,vt=null,it=[],bt={},Mt=function(qt,Dt){$t=function(Vt){for(var an=new Array(Vt),Xt=0;Xt<Vt;Xt+=1){an[Xt]=new Array(Vt);for(var pn=0;pn<Vt;pn+=1)an[Xt][pn]=null}return an}(xt=4*pt+17),Lt(0,0),Lt(xt-7,0),Lt(0,xt-7),Ot(),Ht(),Ft(qt,Dt),pt>=7&&Jt(qt),vt==null&&(vt=nn(pt,mt,it)),Zt(vt,Dt)},Lt=function(qt,Dt){for(var Vt=-1;Vt<=7;Vt+=1)if(!(qt+Vt<=-1||xt<=qt+Vt))for(var an=-1;an<=7;an+=1)Dt+an<=-1||xt<=Dt+an||($t[qt+Vt][Dt+an]=0<=Vt&&Vt<=6&&(an==0||an==6)||0<=an&&an<=6&&(Vt==0||Vt==6)||2<=Vt&&Vt<=4&&2<=an&&an<=4)},Ht=function(){for(var qt=8;qt<xt-8;qt+=1)$t[qt][6]==null&&($t[qt][6]=qt%2==0);for(var Dt=8;Dt<xt-8;Dt+=1)$t[6][Dt]==null&&($t[6][Dt]=Dt%2==0)},Ot=function(){for(var qt=Ct.getPatternPosition(pt),Dt=0;Dt<qt.length;Dt+=1)for(var Vt=0;Vt<qt.length;Vt+=1){var an=qt[Dt],Xt=qt[Vt];if($t[an][Xt]==null)for(var pn=-2;pn<=2;pn+=1)for(var En=-2;En<=2;En+=1)$t[an+pn][Xt+En]=pn==-2||pn==2||En==-2||En==2||pn==0&&En==0}},Jt=function(qt){for(var Dt=Ct.getBCHTypeNumber(pt),Vt=0;Vt<18;Vt+=1){var an=!qt&&(Dt>>Vt&1)==1;$t[Math.floor(Vt/3)][Vt%3+xt-8-3]=an}for(Vt=0;Vt<18;Vt+=1)an=!qt&&(Dt>>Vt&1)==1,$t[Vt%3+xt-8-3][Math.floor(Vt/3)]=an},Ft=function(qt,Dt){for(var Vt=mt<<3|Dt,an=Ct.getBCHTypeInfo(Vt),Xt=0;Xt<15;Xt+=1){var pn=!qt&&(an>>Xt&1)==1;Xt<6?$t[Xt][8]=pn:Xt<8?$t[Xt+1][8]=pn:$t[xt-15+Xt][8]=pn}for(Xt=0;Xt<15;Xt+=1)pn=!qt&&(an>>Xt&1)==1,Xt<8?$t[8][xt-Xt-1]=pn:Xt<9?$t[8][15-Xt-1+1]=pn:$t[8][15-Xt-1]=pn;$t[xt-8][8]=!qt},Zt=function(qt,Dt){for(var Vt=-1,an=xt-1,Xt=7,pn=0,En=Ct.getMaskFunction(Dt),sn=xt-1;sn>0;sn-=2)for(sn==6&&(sn-=1);;){for(var dn=0;dn<2;dn+=1)if($t[an][sn-dn]==null){var Mn=!1;pn<qt.length&&(Mn=(qt[pn]>>>Xt&1)==1),En(an,sn-dn)&&(Mn=!Mn),$t[an][sn-dn]=Mn,(Xt-=1)==-1&&(pn+=1,Xt=7)}if((an+=Vt)<0||xt<=an){an-=Vt,Vt=-Vt;break}}},nn=function(qt,Dt,Vt){for(var an=Bt.getRSBlocks(qt,Dt),Xt=Kt(),pn=0;pn<Vt.length;pn+=1){var En=Vt[pn];Xt.put(En.getMode(),4),Xt.put(En.getLength(),Ct.getLengthInBits(En.getMode(),qt)),En.write(Xt)}var sn=0;for(pn=0;pn<an.length;pn+=1)sn+=an[pn].dataCount;if(Xt.getLengthInBits()>8*sn)throw"code length overflow. ("+Xt.getLengthInBits()+">"+8*sn+")";for(Xt.getLengthInBits()+4<=8*sn&&Xt.put(0,4);Xt.getLengthInBits()%8!=0;)Xt.putBit(!1);for(;!(Xt.getLengthInBits()>=8*sn||(Xt.put(236,8),Xt.getLengthInBits()>=8*sn));)Xt.put(17,8);return function(dn,Mn){for(var yn=0,An=0,Tn=0,gn=new Array(Mn.length),vn=new Array(Mn.length),Ln=0;Ln<Mn.length;Ln+=1){var Sn=Mn[Ln].dataCount,In=Mn[Ln].totalCount-Sn;An=Math.max(An,Sn),Tn=Math.max(Tn,In),gn[Ln]=new Array(Sn);for(var Nn=0;Nn<gn[Ln].length;Nn+=1)gn[Ln][Nn]=255&dn.getBuffer()[Nn+yn];yn+=Sn;var rn=Ct.getErrorCorrectPolynomial(In),Ut=Pt(gn[Ln],rn.getLength()-1).mod(rn);for(vn[Ln]=new Array(rn.getLength()-1),Nn=0;Nn<vn[Ln].length;Nn+=1){var Yt=Nn+Ut.getLength()-vn[Ln].length;vn[Ln][Nn]=Yt>=0?Ut.getAt(Yt):0}}var fn=0;for(Nn=0;Nn<Mn.length;Nn+=1)fn+=Mn[Nn].totalCount;var $n=new Array(fn),Dn=0;for(Nn=0;Nn<An;Nn+=1)for(Ln=0;Ln<Mn.length;Ln+=1)Nn<gn[Ln].length&&($n[Dn]=gn[Ln][Nn],Dn+=1);for(Nn=0;Nn<Tn;Nn+=1)for(Ln=0;Ln<Mn.length;Ln+=1)Nn<vn[Ln].length&&($n[Dn]=vn[Ln][Nn],Dn+=1);return $n}(Xt,an)};bt.addData=function(qt,Dt){var Vt=null;switch(Dt=Dt||"Byte"){case"Numeric":Vt=jt(qt);break;case"Alphanumeric":Vt=zt(qt);break;case"Byte":Vt=Gt(qt);break;case"Kanji":Vt=tn(qt);break;default:throw"mode:"+Dt}it.push(Vt),vt=null},bt.isDark=function(qt,Dt){if(qt<0||xt<=qt||Dt<0||xt<=Dt)throw qt+","+Dt;return $t[qt][Dt]},bt.getModuleCount=function(){return xt},bt.make=function(){if(pt<1){for(var qt=1;qt<40;qt++){for(var Dt=Bt.getRSBlocks(qt,mt),Vt=Kt(),an=0;an<it.length;an++){var Xt=it[an];Vt.put(Xt.getMode(),4),Vt.put(Xt.getLength(),Ct.getLengthInBits(Xt.getMode(),qt)),Xt.write(Vt)}var pn=0;for(an=0;an<Dt.length;an++)pn+=Dt[an].dataCount;if(Vt.getLengthInBits()<=8*pn)break}pt=qt}Mt(!1,function(){for(var En=0,sn=0,dn=0;dn<8;dn+=1){Mt(!0,dn);var Mn=Ct.getLostPoint(bt);(dn==0||En>Mn)&&(En=Mn,sn=dn)}return sn}())},bt.createTableTag=function(qt,Dt){qt=qt||2;var Vt="";Vt+='<table style="',Vt+=" border-width: 0px; border-style: none;",Vt+=" border-collapse: collapse;",Vt+=" padding: 0px; margin: "+(Dt=Dt===void 0?4*qt:Dt)+"px;",Vt+='">',Vt+="<tbody>";for(var an=0;an<bt.getModuleCount();an+=1){Vt+="<tr>";for(var Xt=0;Xt<bt.getModuleCount();Xt+=1)Vt+='<td style="',Vt+=" border-width: 0px; border-style: none;",Vt+=" border-collapse: collapse;",Vt+=" padding: 0px; margin: 0px;",Vt+=" width: "+qt+"px;",Vt+=" height: "+qt+"px;",Vt+=" background-color: ",Vt+=bt.isDark(an,Xt)?"#000000":"#ffffff",Vt+=";",Vt+='"/>';Vt+="</tr>"}return(Vt+="</tbody>")+"</table>"},bt.createSvgTag=function(qt,Dt,Vt,an){var Xt={};typeof arguments[0]=="object"&&(qt=(Xt=arguments[0]).cellSize,Dt=Xt.margin,Vt=Xt.alt,an=Xt.title),qt=qt||2,Dt=Dt===void 0?4*qt:Dt,(Vt=typeof Vt=="string"?{text:Vt}:Vt||{}).text=Vt.text||null,Vt.id=Vt.text?Vt.id||"qrcode-description":null,(an=typeof an=="string"?{text:an}:an||{}).text=an.text||null,an.id=an.text?an.id||"qrcode-title":null;var pn,En,sn,dn,Mn=bt.getModuleCount()*qt+2*Dt,yn="";for(dn="l"+qt+",0 0,"+qt+" -"+qt+",0 0,-"+qt+"z ",yn+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',yn+=Xt.scalable?"":' width="'+Mn+'px" height="'+Mn+'px"',yn+=' viewBox="0 0 '+Mn+" "+Mn+'" ',yn+=' preserveAspectRatio="xMinYMin meet"',yn+=an.text||Vt.text?' role="img" aria-labelledby="'+cn([an.id,Vt.id].join(" ").trim())+'"':"",yn+=">",yn+=an.text?'<title id="'+cn(an.id)+'">'+cn(an.text)+"</title>":"",yn+=Vt.text?'<description id="'+cn(Vt.id)+'">'+cn(Vt.text)+"</description>":"",yn+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',yn+='<path d="',En=0;En<bt.getModuleCount();En+=1)for(sn=En*qt+Dt,pn=0;pn<bt.getModuleCount();pn+=1)bt.isDark(En,pn)&&(yn+="M"+(pn*qt+Dt)+","+sn+dn);return(yn+='" stroke="transparent" fill="black"/>')+"</svg>"},bt.createDataURL=function(qt,Dt){qt=qt||2,Dt=Dt===void 0?4*qt:Dt;var Vt=bt.getModuleCount()*qt+2*Dt,an=Dt,Xt=Vt-Dt;return rt(Vt,Vt,function(pn,En){if(an<=pn&&pn<Xt&&an<=En&&En<Xt){var sn=Math.floor((pn-an)/qt),dn=Math.floor((En-an)/qt);return bt.isDark(dn,sn)?0:1}return 1})},bt.createImgTag=function(qt,Dt,Vt){qt=qt||2,Dt=Dt===void 0?4*qt:Dt;var an=bt.getModuleCount()*qt+2*Dt,Xt="";return Xt+="<img",Xt+=' src="',Xt+=bt.createDataURL(qt,Dt),Xt+='"',Xt+=' width="',Xt+=an,Xt+='"',Xt+=' height="',Xt+=an,Xt+='"',Vt&&(Xt+=' alt="',Xt+=cn(Vt),Xt+='"'),Xt+"/>"};var cn=function(qt){for(var Dt="",Vt=0;Vt<qt.length;Vt+=1){var an=qt.charAt(Vt);switch(an){case"<":Dt+="&lt;";break;case">":Dt+="&gt;";break;case"&":Dt+="&amp;";break;case'"':Dt+="&quot;";break;default:Dt+=an}}return Dt};return bt.createASCII=function(qt,Dt){if((qt=qt||1)<2)return function(gn){gn=gn===void 0?2:gn;var vn,Ln,Sn,In,Nn,rn=1*bt.getModuleCount()+2*gn,Ut=gn,Yt=rn-gn,fn={"██":"█","█ ":"▀"," █":"▄"," ":" "},$n={"██":"▀","█ ":"▀"," █":" "," ":" "},Dn="";for(vn=0;vn<rn;vn+=2){for(Sn=Math.floor((vn-Ut)/1),In=Math.floor((vn+1-Ut)/1),Ln=0;Ln<rn;Ln+=1)Nn="█",Ut<=Ln&&Ln<Yt&&Ut<=vn&&vn<Yt&&bt.isDark(Sn,Math.floor((Ln-Ut)/1))&&(Nn=" "),Ut<=Ln&&Ln<Yt&&Ut<=vn+1&&vn+1<Yt&&bt.isDark(In,Math.floor((Ln-Ut)/1))?Nn+=" ":Nn+="█",Dn+=gn<1&&vn+1>=Yt?$n[Nn]:fn[Nn];Dn+=`
467
467
  `}return rn%2&&gn>0?Dn.substring(0,Dn.length-rn-1)+Array(rn+1).join("▀"):Dn.substring(0,Dn.length-1)}(Dt);qt-=1,Dt=Dt===void 0?2*qt:Dt;var Vt,an,Xt,pn,En=bt.getModuleCount()*qt+2*Dt,sn=Dt,dn=En-Dt,Mn=Array(qt+1).join("██"),yn=Array(qt+1).join(" "),An="",Tn="";for(Vt=0;Vt<En;Vt+=1){for(Xt=Math.floor((Vt-sn)/qt),Tn="",an=0;an<En;an+=1)pn=1,sn<=an&&an<dn&&sn<=Vt&&Vt<dn&&bt.isDark(Xt,Math.floor((an-sn)/qt))&&(pn=0),Tn+=pn?Mn:yn;for(Xt=0;Xt<qt;Xt+=1)An+=Tn+`
468
468
  `}return An.substring(0,An.length-1)},bt.renderTo2dContext=function(qt,Dt){Dt=Dt||2;for(var Vt=bt.getModuleCount(),an=0;an<Vt;an++)for(var Xt=0;Xt<Vt;Xt++)qt.fillStyle=bt.isDark(an,Xt)?"black":"white",qt.fillRect(an*Dt,Xt*Dt,Dt,Dt)},bt};dt.stringToBytes=(dt.stringToBytesFuncs={default:function(st){for(var ut=[],pt=0;pt<st.length;pt+=1){var mt=st.charCodeAt(pt);ut.push(255&mt)}return ut}}).default,dt.createStringToBytes=function(st,ut){var pt=function(){for(var $t=wt(st),xt=function(){var Ht=$t.read();if(Ht==-1)throw"eof";return Ht},vt=0,it={};;){var bt=$t.read();if(bt==-1)break;var Mt=xt(),Lt=xt()<<8|xt();it[String.fromCharCode(bt<<8|Mt)]=Lt,vt+=1}if(vt!=ut)throw vt+" != "+ut;return it}(),mt=63;return function($t){for(var xt=[],vt=0;vt<$t.length;vt+=1){var it=$t.charCodeAt(vt);if(it<128)xt.push(it);else{var bt=pt[$t.charAt(vt)];typeof bt=="number"?(255&bt)==bt?xt.push(bt):(xt.push(bt>>>8),xt.push(255&bt)):xt.push(mt)}}return xt}};var yt,Tt,St,At,Rt,It={L:1,M:0,Q:3,H:2},Ct=(yt=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],Tt=1335,St=7973,Rt=function(st){for(var ut=0;st!=0;)ut+=1,st>>>=1;return ut},(At={}).getBCHTypeInfo=function(st){for(var ut=st<<10;Rt(ut)-Rt(Tt)>=0;)ut^=Tt<<Rt(ut)-Rt(Tt);return 21522^(st<<10|ut)},At.getBCHTypeNumber=function(st){for(var ut=st<<12;Rt(ut)-Rt(St)>=0;)ut^=St<<Rt(ut)-Rt(St);return st<<12|ut},At.getPatternPosition=function(st){return yt[st-1]},At.getMaskFunction=function(st){switch(st){case 0:return function(ut,pt){return(ut+pt)%2==0};case 1:return function(ut,pt){return ut%2==0};case 2:return function(ut,pt){return pt%3==0};case 3:return function(ut,pt){return(ut+pt)%3==0};case 4:return function(ut,pt){return(Math.floor(ut/2)+Math.floor(pt/3))%2==0};case 5:return function(ut,pt){return ut*pt%2+ut*pt%3==0};case 6:return function(ut,pt){return(ut*pt%2+ut*pt%3)%2==0};case 7:return function(ut,pt){return(ut*pt%3+(ut+pt)%2)%2==0};default:throw"bad maskPattern:"+st}},At.getErrorCorrectPolynomial=function(st){for(var ut=Pt([1],0),pt=0;pt<st;pt+=1)ut=ut.multiply(Pt([1,kt.gexp(pt)],0));return ut},At.getLengthInBits=function(st,ut){if(1<=ut&&ut<10)switch(st){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+st}else if(ut<27)switch(st){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+st}else{if(!(ut<41))throw"type:"+ut;switch(st){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+st}}},At.getLostPoint=function(st){for(var ut=st.getModuleCount(),pt=0,mt=0;mt<ut;mt+=1)for(var $t=0;$t<ut;$t+=1){for(var xt=0,vt=st.isDark(mt,$t),it=-1;it<=1;it+=1)if(!(mt+it<0||ut<=mt+it))for(var bt=-1;bt<=1;bt+=1)$t+bt<0||ut<=$t+bt||it==0&&bt==0||vt==st.isDark(mt+it,$t+bt)&&(xt+=1);xt>5&&(pt+=3+xt-5)}for(mt=0;mt<ut-1;mt+=1)for($t=0;$t<ut-1;$t+=1){var Mt=0;st.isDark(mt,$t)&&(Mt+=1),st.isDark(mt+1,$t)&&(Mt+=1),st.isDark(mt,$t+1)&&(Mt+=1),st.isDark(mt+1,$t+1)&&(Mt+=1),Mt!=0&&Mt!=4||(pt+=3)}for(mt=0;mt<ut;mt+=1)for($t=0;$t<ut-6;$t+=1)st.isDark(mt,$t)&&!st.isDark(mt,$t+1)&&st.isDark(mt,$t+2)&&st.isDark(mt,$t+3)&&st.isDark(mt,$t+4)&&!st.isDark(mt,$t+5)&&st.isDark(mt,$t+6)&&(pt+=40);for($t=0;$t<ut;$t+=1)for(mt=0;mt<ut-6;mt+=1)st.isDark(mt,$t)&&!st.isDark(mt+1,$t)&&st.isDark(mt+2,$t)&&st.isDark(mt+3,$t)&&st.isDark(mt+4,$t)&&!st.isDark(mt+5,$t)&&st.isDark(mt+6,$t)&&(pt+=40);var Lt=0;for($t=0;$t<ut;$t+=1)for(mt=0;mt<ut;mt+=1)st.isDark(mt,$t)&&(Lt+=1);return pt+Math.abs(100*Lt/ut/ut-50)/5*10},At),kt=function(){for(var st=new Array(256),ut=new Array(256),pt=0;pt<8;pt+=1)st[pt]=1<<pt;for(pt=8;pt<256;pt+=1)st[pt]=st[pt-4]^st[pt-5]^st[pt-6]^st[pt-8];for(pt=0;pt<255;pt+=1)ut[st[pt]]=pt;return{glog:function(mt){if(mt<1)throw"glog("+mt+")";return ut[mt]},gexp:function(mt){for(;mt<0;)mt+=255;for(;mt>=256;)mt-=255;return st[mt]}}}();function Pt(st,ut){if(st.length===void 0)throw st.length+"/"+ut;var pt=function(){for(var $t=0;$t<st.length&&st[$t]==0;)$t+=1;for(var xt=new Array(st.length-$t+ut),vt=0;vt<st.length-$t;vt+=1)xt[vt]=st[vt+$t];return xt}(),mt={getAt:function($t){return pt[$t]},getLength:function(){return pt.length},multiply:function($t){for(var xt=new Array(mt.getLength()+$t.getLength()-1),vt=0;vt<mt.getLength();vt+=1)for(var it=0;it<$t.getLength();it+=1)xt[vt+it]^=kt.gexp(kt.glog(mt.getAt(vt))+kt.glog($t.getAt(it)));return Pt(xt,0)},mod:function($t){if(mt.getLength()-$t.getLength()<0)return mt;for(var xt=kt.glog(mt.getAt(0))-kt.glog($t.getAt(0)),vt=new Array(mt.getLength()),it=0;it<mt.getLength();it+=1)vt[it]=mt.getAt(it);for(it=0;it<$t.getLength();it+=1)vt[it]^=kt.gexp(kt.glog($t.getAt(it))+xt);return Pt(vt,0).mod($t)}};return mt}var Bt=function(){var st=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],ut=function(mt,$t){var xt={};return xt.totalCount=mt,xt.dataCount=$t,xt},pt={getRSBlocks:function(mt,$t){var xt=function(Jt,Ft){switch(Ft){case It.L:return st[4*(Jt-1)+0];case It.M:return st[4*(Jt-1)+1];case It.Q:return st[4*(Jt-1)+2];case It.H:return st[4*(Jt-1)+3];default:return}}(mt,$t);if(xt===void 0)throw"bad rs block @ typeNumber:"+mt+"/errorCorrectionLevel:"+$t;for(var vt=xt.length/3,it=[],bt=0;bt<vt;bt+=1)for(var Mt=xt[3*bt+0],Lt=xt[3*bt+1],Ht=xt[3*bt+2],Ot=0;Ot<Mt;Ot+=1)it.push(ut(Lt,Ht));return it}};return pt}(),Kt=function(){var st=[],ut=0,pt={getBuffer:function(){return st},getAt:function(mt){var $t=Math.floor(mt/8);return(st[$t]>>>7-mt%8&1)==1},put:function(mt,$t){for(var xt=0;xt<$t;xt+=1)pt.putBit((mt>>>$t-xt-1&1)==1)},getLengthInBits:function(){return ut},putBit:function(mt){var $t=Math.floor(ut/8);st.length<=$t&&st.push(0),mt&&(st[$t]|=128>>>ut%8),ut+=1}};return pt},jt=function(st){var ut=st,pt={getMode:function(){return 1},getLength:function(xt){return ut.length},write:function(xt){for(var vt=ut,it=0;it+2<vt.length;)xt.put(mt(vt.substring(it,it+3)),10),it+=3;it<vt.length&&(vt.length-it==1?xt.put(mt(vt.substring(it,it+1)),4):vt.length-it==2&&xt.put(mt(vt.substring(it,it+2)),7))}},mt=function(xt){for(var vt=0,it=0;it<xt.length;it+=1)vt=10*vt+$t(xt.charAt(it));return vt},$t=function(xt){if("0"<=xt&&xt<="9")return xt.charCodeAt(0)-48;throw"illegal char :"+xt};return pt},zt=function(st){var ut=st,pt={getMode:function(){return 2},getLength:function($t){return ut.length},write:function($t){for(var xt=ut,vt=0;vt+1<xt.length;)$t.put(45*mt(xt.charAt(vt))+mt(xt.charAt(vt+1)),11),vt+=2;vt<xt.length&&$t.put(mt(xt.charAt(vt)),6)}},mt=function($t){if("0"<=$t&&$t<="9")return $t.charCodeAt(0)-48;if("A"<=$t&&$t<="Z")return $t.charCodeAt(0)-65+10;switch($t){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+$t}};return pt},Gt=function(st){var ut=dt.stringToBytes(st);return{getMode:function(){return 4},getLength:function(pt){return ut.length},write:function(pt){for(var mt=0;mt<ut.length;mt+=1)pt.put(ut[mt],8)}}},tn=function(st){var ut=dt.stringToBytesFuncs.SJIS;if(!ut)throw"sjis not supported.";(function($t,xt){var vt=ut("友");if(vt.length!=2||(vt[0]<<8|vt[1])!=38726)throw"sjis not supported."})();var pt=ut(st),mt={getMode:function(){return 8},getLength:function($t){return~~(pt.length/2)},write:function($t){for(var xt=pt,vt=0;vt+1<xt.length;){var it=(255&xt[vt])<<8|255&xt[vt+1];if(33088<=it&&it<=40956)it-=33088;else{if(!(57408<=it&&it<=60351))throw"illegal char at "+(vt+1)+"/"+it;it-=49472}it=192*(it>>>8&255)+(255&it),$t.put(it,13),vt+=2}if(vt<xt.length)throw"illegal char at "+(vt+1)}};return mt},hn=function(){var st=[],ut={writeByte:function(pt){st.push(255&pt)},writeShort:function(pt){ut.writeByte(pt),ut.writeByte(pt>>>8)},writeBytes:function(pt,mt,$t){mt=mt||0,$t=$t||pt.length;for(var xt=0;xt<$t;xt+=1)ut.writeByte(pt[xt+mt])},writeString:function(pt){for(var mt=0;mt<pt.length;mt+=1)ut.writeByte(pt.charCodeAt(mt))},toByteArray:function(){return st},toString:function(){var pt="";pt+="[";for(var mt=0;mt<st.length;mt+=1)mt>0&&(pt+=","),pt+=st[mt];return pt+"]"}};return ut},wt=function(st){var ut=st,pt=0,mt=0,$t=0,xt={read:function(){for(;$t<8;){if(pt>=ut.length){if($t==0)return-1;throw"unexpected end of file./"+$t}var it=ut.charAt(pt);if(pt+=1,it=="=")return $t=0,-1;it.match(/^\s$/)||(mt=mt<<6|vt(it.charCodeAt(0)),$t+=6)}var bt=mt>>>$t-8&255;return $t-=8,bt}},vt=function(it){if(65<=it&&it<=90)return it-65;if(97<=it&&it<=122)return it-97+26;if(48<=it&&it<=57)return it-48+52;if(it==43)return 62;if(it==47)return 63;throw"c:"+it};return xt},rt=function(st,ut,pt){for(var mt=function(Lt,Ht){var Ot=Lt,Jt=Ht,Ft=new Array(Lt*Ht),Zt={setPixel:function(qt,Dt,Vt){Ft[Dt*Ot+qt]=Vt},write:function(qt){qt.writeString("GIF87a"),qt.writeShort(Ot),qt.writeShort(Jt),qt.writeByte(128),qt.writeByte(0),qt.writeByte(0),qt.writeByte(0),qt.writeByte(0),qt.writeByte(0),qt.writeByte(255),qt.writeByte(255),qt.writeByte(255),qt.writeString(","),qt.writeShort(0),qt.writeShort(0),qt.writeShort(Ot),qt.writeShort(Jt),qt.writeByte(0);var Dt=nn(2);qt.writeByte(2);for(var Vt=0;Dt.length-Vt>255;)qt.writeByte(255),qt.writeBytes(Dt,Vt,255),Vt+=255;qt.writeByte(Dt.length-Vt),qt.writeBytes(Dt,Vt,Dt.length-Vt),qt.writeByte(0),qt.writeString(";")}},nn=function(qt){for(var Dt=1<<qt,Vt=1+(1<<qt),an=qt+1,Xt=cn(),pn=0;pn<Dt;pn+=1)Xt.add(String.fromCharCode(pn));Xt.add(String.fromCharCode(Dt)),Xt.add(String.fromCharCode(Vt));var En,sn,dn,Mn=hn(),yn=(En=Mn,sn=0,dn=0,{write:function(vn,Ln){if(vn>>>Ln)throw"length over";for(;sn+Ln>=8;)En.writeByte(255&(vn<<sn|dn)),Ln-=8-sn,vn>>>=8-sn,dn=0,sn=0;dn|=vn<<sn,sn+=Ln},flush:function(){sn>0&&En.writeByte(dn)}});yn.write(Dt,an);var An=0,Tn=String.fromCharCode(Ft[An]);for(An+=1;An<Ft.length;){var gn=String.fromCharCode(Ft[An]);An+=1,Xt.contains(Tn+gn)?Tn+=gn:(yn.write(Xt.indexOf(Tn),an),Xt.size()<4095&&(Xt.size()==1<<an&&(an+=1),Xt.add(Tn+gn)),Tn=gn)}return yn.write(Xt.indexOf(Tn),an),yn.write(Vt,an),yn.flush(),Mn.toByteArray()},cn=function(){var qt={},Dt=0,Vt={add:function(an){if(Vt.contains(an))throw"dup key:"+an;qt[an]=Dt,Dt+=1},size:function(){return Dt},indexOf:function(an){return qt[an]},contains:function(an){return qt[an]!==void 0}};return Vt};return Zt}(st,ut),$t=0;$t<ut;$t+=1)for(var xt=0;xt<st;xt+=1)mt.setPixel(xt,$t,pt(xt,$t));var vt=hn();mt.write(vt);for(var it=function(){var Lt=0,Ht=0,Ot=0,Jt="",Ft={},Zt=function(cn){Jt+=String.fromCharCode(nn(63&cn))},nn=function(cn){if(!(cn<0)){if(cn<26)return 65+cn;if(cn<52)return cn-26+97;if(cn<62)return cn-52+48;if(cn==62)return 43;if(cn==63)return 47}throw"n:"+cn};return Ft.writeByte=function(cn){for(Lt=Lt<<8|255&cn,Ht+=8,Ot+=1;Ht>=6;)Zt(Lt>>>Ht-6),Ht-=6},Ft.flush=function(){if(Ht>0&&(Zt(Lt<<6-Ht),Lt=0,Ht=0),Ot%3!=0)for(var cn=3-Ot%3,qt=0;qt<cn;qt+=1)Jt+="="},Ft.toString=function(){return Jt},Ft}(),bt=vt.toByteArray(),Mt=0;Mt<bt.length;Mt+=1)it.writeByte(bt[Mt]);return it.flush(),"data:image/gif;base64,"+it};return dt}();ht.stringToBytesFuncs["UTF-8"]=function(dt){return function(yt){for(var Tt=[],St=0;St<yt.length;St++){var At=yt.charCodeAt(St);At<128?Tt.push(At):At<2048?Tt.push(192|At>>6,128|63&At):At<55296||At>=57344?Tt.push(224|At>>12,128|At>>6&63,128|63&At):(St++,At=65536+((1023&At)<<10|1023&yt.charCodeAt(St)),Tt.push(240|At>>18,128|At>>12&63,128|At>>6&63,128|63&At))}return Tt}(dt)},(ft=typeof(ct=function(){return ht})=="function"?ct.apply(ot,[]):ct)===void 0||(tt.exports=ft)},676:(tt,ot,ct)=>{ct.d(ot,{default:()=>cn});const ft="Numeric",ht="Alphanumeric",dt="Byte";var yt=function(){return yt=Object.assign||function(qt){for(var Dt,Vt=1,an=arguments.length;Vt<an;Vt++)for(var Xt in Dt=arguments[Vt])Object.prototype.hasOwnProperty.call(Dt,Xt)&&(qt[Xt]=Dt[Xt]);return qt},yt.apply(this,arguments)},Tt=function(){for(var qt=0,Dt=0,Vt=arguments.length;Dt<Vt;Dt++)qt+=arguments[Dt].length;var an=Array(qt),Xt=0;for(Dt=0;Dt<Vt;Dt++)for(var pn=arguments[Dt],En=0,sn=pn.length;En<sn;En++,Xt++)an[Xt]=pn[En];return an},St=function(qt){return!!qt&&typeof qt=="object"&&!Array.isArray(qt)};function At(qt){for(var Dt=[],Vt=1;Vt<arguments.length;Vt++)Dt[Vt-1]=arguments[Vt];if(!Dt.length)return qt;var an=Dt.shift();return an!==void 0&&St(qt)&&St(an)?(qt=yt({},qt),Object.keys(an).forEach(function(Xt){var pn=qt[Xt],En=an[Xt];Array.isArray(pn)&&Array.isArray(En)?qt[Xt]=En:St(pn)&&St(En)?qt[Xt]=At(Object.assign({},pn),En):qt[Xt]=En}),At.apply(void 0,Tt([qt],Dt))):qt}function Rt(qt,Dt){var Vt=document.createElement("a");Vt.download=Dt,Vt.href=qt,document.body.appendChild(Vt),Vt.click(),document.body.removeChild(Vt)}var It=function(qt,Dt,Vt,an){return new(Vt||(Vt=Promise))(function(Xt,pn){function En(Mn){try{dn(an.next(Mn))}catch(yn){pn(yn)}}function sn(Mn){try{dn(an.throw(Mn))}catch(yn){pn(yn)}}function dn(Mn){var yn;Mn.done?Xt(Mn.value):(yn=Mn.value,yn instanceof Vt?yn:new Vt(function(An){An(yn)})).then(En,sn)}dn((an=an.apply(qt,[])).next())})},Ct=function(qt,Dt){var Vt,an,Xt,pn,En={label:0,sent:function(){if(1&Xt[0])throw Xt[1];return Xt[1]},trys:[],ops:[]};return pn={next:sn(0),throw:sn(1),return:sn(2)},typeof Symbol=="function"&&(pn[Symbol.iterator]=function(){return this}),pn;function sn(dn){return function(Mn){return function(yn){if(Vt)throw new TypeError("Generator is already executing.");for(;En;)try{if(Vt=1,an&&(Xt=2&yn[0]?an.return:yn[0]?an.throw||((Xt=an.return)&&Xt.call(an),0):an.next)&&!(Xt=Xt.call(an,yn[1])).done)return Xt;switch(an=0,Xt&&(yn=[2&yn[0],Xt.value]),yn[0]){case 0:case 1:Xt=yn;break;case 4:return En.label++,{value:yn[1],done:!1};case 5:En.label++,an=yn[1],yn=[0];continue;case 7:yn=En.ops.pop(),En.trys.pop();continue;default:if(!((Xt=(Xt=En.trys).length>0&&Xt[Xt.length-1])||yn[0]!==6&&yn[0]!==2)){En=0;continue}if(yn[0]===3&&(!Xt||yn[1]>Xt[0]&&yn[1]<Xt[3])){En.label=yn[1];break}if(yn[0]===6&&En.label<Xt[1]){En.label=Xt[1],Xt=yn;break}if(Xt&&En.label<Xt[2]){En.label=Xt[2],En.ops.push(yn);break}Xt[2]&&En.ops.pop(),En.trys.pop();continue}yn=Dt.call(qt,En)}catch(An){yn=[6,An],an=0}finally{Vt=Xt=0}if(5&yn[0])throw yn[1];return{value:yn[0]?yn[1]:void 0,done:!0}}([dn,Mn])}}};function kt(qt){return It(this,void 0,void 0,function(){return Ct(this,function(Dt){return[2,new Promise(function(Vt){var an=new XMLHttpRequest;an.onload=function(){var Xt=new FileReader;Xt.onloadend=function(){Vt(Xt.result)},Xt.readAsDataURL(an.response)},an.open("GET",qt),an.responseType="blob",an.send()})]})})}const Pt={L:.07,M:.15,Q:.25,H:.3};var Bt=function(){return Bt=Object.assign||function(qt){for(var Dt,Vt=1,an=arguments.length;Vt<an;Vt++)for(var Xt in Dt=arguments[Vt])Object.prototype.hasOwnProperty.call(Dt,Xt)&&(qt[Xt]=Dt[Xt]);return qt},Bt.apply(this,arguments)},Kt=function(){function qt(Dt){var Vt=Dt.svg,an=Dt.type;this._svg=Vt,this._type=an}return qt.prototype.draw=function(Dt,Vt,an,Xt){var pn;switch(this._type){case"dots":pn=this._drawDot;break;case"classy":pn=this._drawClassy;break;case"classy-rounded":pn=this._drawClassyRounded;break;case"rounded":pn=this._drawRounded;break;case"extra-rounded":pn=this._drawExtraRounded;break;default:pn=this._drawSquare}pn.call(this,{x:Dt,y:Vt,size:an,getNeighbor:Xt})},qt.prototype._rotateFigure=function(Dt){var Vt,an=Dt.x,Xt=Dt.y,pn=Dt.size,En=Dt.rotation,sn=En===void 0?0:En,dn=an+pn/2,Mn=Xt+pn/2;(0,Dt.draw)(),(Vt=this._element)===null||Vt===void 0||Vt.setAttribute("transform","rotate("+180*sn/Math.PI+","+dn+","+Mn+")")},qt.prototype._basicDot=function(Dt){var Vt=this,an=Dt.size,Xt=Dt.x,pn=Dt.y;this._rotateFigure(Bt(Bt({},Dt),{draw:function(){Vt._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),Vt._element.setAttribute("cx",String(Xt+an/2)),Vt._element.setAttribute("cy",String(pn+an/2)),Vt._element.setAttribute("r",String(an/2))}}))},qt.prototype._basicSquare=function(Dt){var Vt=this,an=Dt.size,Xt=Dt.x,pn=Dt.y;this._rotateFigure(Bt(Bt({},Dt),{draw:function(){Vt._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),Vt._element.setAttribute("x",String(Xt)),Vt._element.setAttribute("y",String(pn)),Vt._element.setAttribute("width",String(an)),Vt._element.setAttribute("height",String(an))}}))},qt.prototype._basicSideRounded=function(Dt){var Vt=this,an=Dt.size,Xt=Dt.x,pn=Dt.y;this._rotateFigure(Bt(Bt({},Dt),{draw:function(){Vt._element=document.createElementNS("http://www.w3.org/2000/svg","path"),Vt._element.setAttribute("d","M "+Xt+" "+pn+"v "+an+"h "+an/2+"a "+an/2+" "+an/2+", 0, 0, 0, 0 "+-an)}}))},qt.prototype._basicCornerRounded=function(Dt){var Vt=this,an=Dt.size,Xt=Dt.x,pn=Dt.y;this._rotateFigure(Bt(Bt({},Dt),{draw:function(){Vt._element=document.createElementNS("http://www.w3.org/2000/svg","path"),Vt._element.setAttribute("d","M "+Xt+" "+pn+"v "+an+"h "+an+"v "+-an/2+"a "+an/2+" "+an/2+", 0, 0, 0, "+-an/2+" "+-an/2)}}))},qt.prototype._basicCornerExtraRounded=function(Dt){var Vt=this,an=Dt.size,Xt=Dt.x,pn=Dt.y;this._rotateFigure(Bt(Bt({},Dt),{draw:function(){Vt._element=document.createElementNS("http://www.w3.org/2000/svg","path"),Vt._element.setAttribute("d","M "+Xt+" "+pn+"v "+an+"h "+an+"a "+an+" "+an+", 0, 0, 0, "+-an+" "+-an)}}))},qt.prototype._basicCornersRounded=function(Dt){var Vt=this,an=Dt.size,Xt=Dt.x,pn=Dt.y;this._rotateFigure(Bt(Bt({},Dt),{draw:function(){Vt._element=document.createElementNS("http://www.w3.org/2000/svg","path"),Vt._element.setAttribute("d","M "+Xt+" "+pn+"v "+an/2+"a "+an/2+" "+an/2+", 0, 0, 0, "+an/2+" "+an/2+"h "+an/2+"v "+-an/2+"a "+an/2+" "+an/2+", 0, 0, 0, "+-an/2+" "+-an/2)}}))},qt.prototype._drawDot=function(Dt){var Vt=Dt.x,an=Dt.y,Xt=Dt.size;this._basicDot({x:Vt,y:an,size:Xt,rotation:0})},qt.prototype._drawSquare=function(Dt){var Vt=Dt.x,an=Dt.y,Xt=Dt.size;this._basicSquare({x:Vt,y:an,size:Xt,rotation:0})},qt.prototype._drawRounded=function(Dt){var Vt=Dt.x,an=Dt.y,Xt=Dt.size,pn=Dt.getNeighbor,En=pn?+pn(-1,0):0,sn=pn?+pn(1,0):0,dn=pn?+pn(0,-1):0,Mn=pn?+pn(0,1):0,yn=En+sn+dn+Mn;if(yn!==0)if(yn>2||En&&sn||dn&&Mn)this._basicSquare({x:Vt,y:an,size:Xt,rotation:0});else{if(yn===2){var An=0;return En&&dn?An=Math.PI/2:dn&&sn?An=Math.PI:sn&&Mn&&(An=-Math.PI/2),void this._basicCornerRounded({x:Vt,y:an,size:Xt,rotation:An})}if(yn===1)return An=0,dn?An=Math.PI/2:sn?An=Math.PI:Mn&&(An=-Math.PI/2),void this._basicSideRounded({x:Vt,y:an,size:Xt,rotation:An})}else this._basicDot({x:Vt,y:an,size:Xt,rotation:0})},qt.prototype._drawExtraRounded=function(Dt){var Vt=Dt.x,an=Dt.y,Xt=Dt.size,pn=Dt.getNeighbor,En=pn?+pn(-1,0):0,sn=pn?+pn(1,0):0,dn=pn?+pn(0,-1):0,Mn=pn?+pn(0,1):0,yn=En+sn+dn+Mn;if(yn!==0)if(yn>2||En&&sn||dn&&Mn)this._basicSquare({x:Vt,y:an,size:Xt,rotation:0});else{if(yn===2){var An=0;return En&&dn?An=Math.PI/2:dn&&sn?An=Math.PI:sn&&Mn&&(An=-Math.PI/2),void this._basicCornerExtraRounded({x:Vt,y:an,size:Xt,rotation:An})}if(yn===1)return An=0,dn?An=Math.PI/2:sn?An=Math.PI:Mn&&(An=-Math.PI/2),void this._basicSideRounded({x:Vt,y:an,size:Xt,rotation:An})}else this._basicDot({x:Vt,y:an,size:Xt,rotation:0})},qt.prototype._drawClassy=function(Dt){var Vt=Dt.x,an=Dt.y,Xt=Dt.size,pn=Dt.getNeighbor,En=pn?+pn(-1,0):0,sn=pn?+pn(1,0):0,dn=pn?+pn(0,-1):0,Mn=pn?+pn(0,1):0;En+sn+dn+Mn!==0?En||dn?sn||Mn?this._basicSquare({x:Vt,y:an,size:Xt,rotation:0}):this._basicCornerRounded({x:Vt,y:an,size:Xt,rotation:Math.PI/2}):this._basicCornerRounded({x:Vt,y:an,size:Xt,rotation:-Math.PI/2}):this._basicCornersRounded({x:Vt,y:an,size:Xt,rotation:Math.PI/2})},qt.prototype._drawClassyRounded=function(Dt){var Vt=Dt.x,an=Dt.y,Xt=Dt.size,pn=Dt.getNeighbor,En=pn?+pn(-1,0):0,sn=pn?+pn(1,0):0,dn=pn?+pn(0,-1):0,Mn=pn?+pn(0,1):0;En+sn+dn+Mn!==0?En||dn?sn||Mn?this._basicSquare({x:Vt,y:an,size:Xt,rotation:0}):this._basicCornerExtraRounded({x:Vt,y:an,size:Xt,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:Vt,y:an,size:Xt,rotation:-Math.PI/2}):this._basicCornersRounded({x:Vt,y:an,size:Xt,rotation:Math.PI/2})},qt}();const jt=Kt;var zt=function(){return zt=Object.assign||function(qt){for(var Dt,Vt=1,an=arguments.length;Vt<an;Vt++)for(var Xt in Dt=arguments[Vt])Object.prototype.hasOwnProperty.call(Dt,Xt)&&(qt[Xt]=Dt[Xt]);return qt},zt.apply(this,arguments)},Gt=function(){function qt(Dt){var Vt=Dt.svg,an=Dt.type;this._svg=Vt,this._type=an}return qt.prototype.draw=function(Dt,Vt,an,Xt){var pn;switch(this._type){case"square":pn=this._drawSquare;break;case"extra-rounded":pn=this._drawExtraRounded;break;default:pn=this._drawDot}pn.call(this,{x:Dt,y:Vt,size:an,rotation:Xt})},qt.prototype._rotateFigure=function(Dt){var Vt,an=Dt.x,Xt=Dt.y,pn=Dt.size,En=Dt.rotation,sn=En===void 0?0:En,dn=an+pn/2,Mn=Xt+pn/2;(0,Dt.draw)(),(Vt=this._element)===null||Vt===void 0||Vt.setAttribute("transform","rotate("+180*sn/Math.PI+","+dn+","+Mn+")")},qt.prototype._basicDot=function(Dt){var Vt=this,an=Dt.size,Xt=Dt.x,pn=Dt.y,En=an/7;this._rotateFigure(zt(zt({},Dt),{draw:function(){Vt._element=document.createElementNS("http://www.w3.org/2000/svg","path"),Vt._element.setAttribute("clip-rule","evenodd"),Vt._element.setAttribute("d","M "+(Xt+an/2)+" "+pn+"a "+an/2+" "+an/2+" 0 1 0 0.1 0zm 0 "+En+"a "+(an/2-En)+" "+(an/2-En)+" 0 1 1 -0.1 0Z")}}))},qt.prototype._basicSquare=function(Dt){var Vt=this,an=Dt.size,Xt=Dt.x,pn=Dt.y,En=an/7;this._rotateFigure(zt(zt({},Dt),{draw:function(){Vt._element=document.createElementNS("http://www.w3.org/2000/svg","path"),Vt._element.setAttribute("clip-rule","evenodd"),Vt._element.setAttribute("d","M "+Xt+" "+pn+"v "+an+"h "+an+"v "+-an+"zM "+(Xt+En)+" "+(pn+En)+"h "+(an-2*En)+"v "+(an-2*En)+"h "+(2*En-an)+"z")}}))},qt.prototype._basicExtraRounded=function(Dt){var Vt=this,an=Dt.size,Xt=Dt.x,pn=Dt.y,En=an/7;this._rotateFigure(zt(zt({},Dt),{draw:function(){Vt._element=document.createElementNS("http://www.w3.org/2000/svg","path"),Vt._element.setAttribute("clip-rule","evenodd"),Vt._element.setAttribute("d","M "+Xt+" "+(pn+2.5*En)+"v "+2*En+"a "+2.5*En+" "+2.5*En+", 0, 0, 0, "+2.5*En+" "+2.5*En+"h "+2*En+"a "+2.5*En+" "+2.5*En+", 0, 0, 0, "+2.5*En+" "+2.5*-En+"v "+-2*En+"a "+2.5*En+" "+2.5*En+", 0, 0, 0, "+2.5*-En+" "+2.5*-En+"h "+-2*En+"a "+2.5*En+" "+2.5*En+", 0, 0, 0, "+2.5*-En+" "+2.5*En+"M "+(Xt+2.5*En)+" "+(pn+En)+"h "+2*En+"a "+1.5*En+" "+1.5*En+", 0, 0, 1, "+1.5*En+" "+1.5*En+"v "+2*En+"a "+1.5*En+" "+1.5*En+", 0, 0, 1, "+1.5*-En+" "+1.5*En+"h "+-2*En+"a "+1.5*En+" "+1.5*En+", 0, 0, 1, "+1.5*-En+" "+1.5*-En+"v "+-2*En+"a "+1.5*En+" "+1.5*En+", 0, 0, 1, "+1.5*En+" "+1.5*-En)}}))},qt.prototype._drawDot=function(Dt){var Vt=Dt.x,an=Dt.y,Xt=Dt.size,pn=Dt.rotation;this._basicDot({x:Vt,y:an,size:Xt,rotation:pn})},qt.prototype._drawSquare=function(Dt){var Vt=Dt.x,an=Dt.y,Xt=Dt.size,pn=Dt.rotation;this._basicSquare({x:Vt,y:an,size:Xt,rotation:pn})},qt.prototype._drawExtraRounded=function(Dt){var Vt=Dt.x,an=Dt.y,Xt=Dt.size,pn=Dt.rotation;this._basicExtraRounded({x:Vt,y:an,size:Xt,rotation:pn})},qt}();const tn=Gt;var hn=function(){return hn=Object.assign||function(qt){for(var Dt,Vt=1,an=arguments.length;Vt<an;Vt++)for(var Xt in Dt=arguments[Vt])Object.prototype.hasOwnProperty.call(Dt,Xt)&&(qt[Xt]=Dt[Xt]);return qt},hn.apply(this,arguments)},wt=function(){function qt(Dt){var Vt=Dt.svg,an=Dt.type;this._svg=Vt,this._type=an}return qt.prototype.draw=function(Dt,Vt,an,Xt){(this._type==="square"?this._drawSquare:this._drawDot).call(this,{x:Dt,y:Vt,size:an,rotation:Xt})},qt.prototype._rotateFigure=function(Dt){var Vt,an=Dt.x,Xt=Dt.y,pn=Dt.size,En=Dt.rotation,sn=En===void 0?0:En,dn=an+pn/2,Mn=Xt+pn/2;(0,Dt.draw)(),(Vt=this._element)===null||Vt===void 0||Vt.setAttribute("transform","rotate("+180*sn/Math.PI+","+dn+","+Mn+")")},qt.prototype._basicDot=function(Dt){var Vt=this,an=Dt.size,Xt=Dt.x,pn=Dt.y;this._rotateFigure(hn(hn({},Dt),{draw:function(){Vt._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),Vt._element.setAttribute("cx",String(Xt+an/2)),Vt._element.setAttribute("cy",String(pn+an/2)),Vt._element.setAttribute("r",String(an/2))}}))},qt.prototype._basicSquare=function(Dt){var Vt=this,an=Dt.size,Xt=Dt.x,pn=Dt.y;this._rotateFigure(hn(hn({},Dt),{draw:function(){Vt._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),Vt._element.setAttribute("x",String(Xt)),Vt._element.setAttribute("y",String(pn)),Vt._element.setAttribute("width",String(an)),Vt._element.setAttribute("height",String(an))}}))},qt.prototype._drawDot=function(Dt){var Vt=Dt.x,an=Dt.y,Xt=Dt.size,pn=Dt.rotation;this._basicDot({x:Vt,y:an,size:Xt,rotation:pn})},qt.prototype._drawSquare=function(Dt){var Vt=Dt.x,an=Dt.y,Xt=Dt.size,pn=Dt.rotation;this._basicSquare({x:Vt,y:an,size:Xt,rotation:pn})},qt}();const rt=wt,st="circle";var ut=function(qt,Dt,Vt,an){return new(Vt||(Vt=Promise))(function(Xt,pn){function En(Mn){try{dn(an.next(Mn))}catch(yn){pn(yn)}}function sn(Mn){try{dn(an.throw(Mn))}catch(yn){pn(yn)}}function dn(Mn){var yn;Mn.done?Xt(Mn.value):(yn=Mn.value,yn instanceof Vt?yn:new Vt(function(An){An(yn)})).then(En,sn)}dn((an=an.apply(qt,[])).next())})},pt=function(qt,Dt){var Vt,an,Xt,pn,En={label:0,sent:function(){if(1&Xt[0])throw Xt[1];return Xt[1]},trys:[],ops:[]};return pn={next:sn(0),throw:sn(1),return:sn(2)},typeof Symbol=="function"&&(pn[Symbol.iterator]=function(){return this}),pn;function sn(dn){return function(Mn){return function(yn){if(Vt)throw new TypeError("Generator is already executing.");for(;En;)try{if(Vt=1,an&&(Xt=2&yn[0]?an.return:yn[0]?an.throw||((Xt=an.return)&&Xt.call(an),0):an.next)&&!(Xt=Xt.call(an,yn[1])).done)return Xt;switch(an=0,Xt&&(yn=[2&yn[0],Xt.value]),yn[0]){case 0:case 1:Xt=yn;break;case 4:return En.label++,{value:yn[1],done:!1};case 5:En.label++,an=yn[1],yn=[0];continue;case 7:yn=En.ops.pop(),En.trys.pop();continue;default:if(!((Xt=(Xt=En.trys).length>0&&Xt[Xt.length-1])||yn[0]!==6&&yn[0]!==2)){En=0;continue}if(yn[0]===3&&(!Xt||yn[1]>Xt[0]&&yn[1]<Xt[3])){En.label=yn[1];break}if(yn[0]===6&&En.label<Xt[1]){En.label=Xt[1],Xt=yn;break}if(Xt&&En.label<Xt[2]){En.label=Xt[2],En.ops.push(yn);break}Xt[2]&&En.ops.pop(),En.trys.pop();continue}yn=Dt.call(qt,En)}catch(An){yn=[6,An],an=0}finally{Vt=Xt=0}if(5&yn[0])throw yn[1];return{value:yn[0]?yn[1]:void 0,done:!0}}([dn,Mn])}}},mt=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],$t=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const xt=function(){function qt(Dt){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(Dt.width)),this._element.setAttribute("height",String(Dt.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._instanceId=qt.instanceCount++,this._options=Dt}return Object.defineProperty(qt.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(qt.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),qt.prototype.getElement=function(){return this._element},qt.prototype.drawQR=function(Dt){return ut(this,void 0,void 0,function(){var Vt,an,Xt,pn,En,sn,dn,Mn,yn,An,Tn=this;return pt(this,function(gn){switch(gn.label){case 0:return Vt=Dt.getModuleCount(),an=Math.min(this._options.width,this._options.height)-2*this._options.margin,Xt=this._options.shape===st?an/Math.sqrt(2):an,pn=Xt/Vt,En={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=Dt,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(gn.sent(),!this._image)return[2];sn=this._options,dn=sn.imageOptions,Mn=sn.qrOptions,yn=dn.imageSize*Pt[Mn.errorCorrectionLevel],An=Math.floor(yn*Vt*Vt),En=function(vn){var Ln=vn.originalHeight,Sn=vn.originalWidth,In=vn.maxHiddenDots,Nn=vn.maxHiddenAxisDots,rn=vn.dotSize,Ut={x:0,y:0},Yt={x:0,y:0};if(Ln<=0||Sn<=0||In<=0||rn<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var fn=Ln/Sn;return Ut.x=Math.floor(Math.sqrt(In/fn)),Ut.x<=0&&(Ut.x=1),Nn&&Nn<Ut.x&&(Ut.x=Nn),Ut.x%2==0&&Ut.x--,Yt.x=Ut.x*rn,Ut.y=1+2*Math.ceil((Ut.x*fn-1)/2),Yt.y=Math.round(Yt.x*fn),(Ut.y*Ut.x>In||Nn&&Nn<Ut.y)&&(Nn&&Nn<Ut.y?(Ut.y=Nn,Ut.y%2==0&&Ut.x--):Ut.y-=2,Yt.y=Ut.y*rn,Ut.x=1+2*Math.ceil((Ut.y/fn-1)/2),Yt.x=Math.round(Yt.y/fn)),{height:Yt.y,width:Yt.x,hideYDots:Ut.y,hideXDots:Ut.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:An,maxHiddenAxisDots:Vt-14,dotSize:pn}),gn.label=2;case 2:return this.drawBackground(),this.drawDots(function(vn,Ln){var Sn,In,Nn,rn,Ut,Yt;return!(Tn._options.imageOptions.hideBackgroundDots&&vn>=(Vt-En.hideXDots)/2&&vn<(Vt+En.hideXDots)/2&&Ln>=(Vt-En.hideYDots)/2&&Ln<(Vt+En.hideYDots)/2||!((Sn=mt[vn])===null||Sn===void 0)&&Sn[Ln]||!((In=mt[vn-Vt+7])===null||In===void 0)&&In[Ln]||!((Nn=mt[vn])===null||Nn===void 0)&&Nn[Ln-Vt+7]||!((rn=$t[vn])===null||rn===void 0)&&rn[Ln]||!((Ut=$t[vn-Vt+7])===null||Ut===void 0)&&Ut[Ln]||!((Yt=$t[vn])===null||Yt===void 0)&&Yt[Ln-Vt+7])}),this.drawCorners(),this._options.image?[4,this.drawImage({width:En.width,height:En.height,count:Vt,dotSize:pn})]:[3,4];case 3:gn.sent(),gn.label=4;case 4:return[2]}})})},qt.prototype.drawBackground=function(){var Dt,Vt,an,Xt=this._element,pn=this._options;if(Xt){var En=(Dt=pn.backgroundOptions)===null||Dt===void 0?void 0:Dt.gradient,sn=(Vt=pn.backgroundOptions)===null||Vt===void 0?void 0:Vt.color;if((En||sn)&&this._createColor({options:En,color:sn,additionalRotation:0,x:0,y:0,height:pn.height,width:pn.width,name:"background-color"}),(an=pn.backgroundOptions)===null||an===void 0?void 0:an.round){var dn=Math.min(pn.width,pn.height),Mn=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),Mn.setAttribute("x",String((pn.width-dn)/2)),Mn.setAttribute("y",String((pn.height-dn)/2)),Mn.setAttribute("width",String(dn)),Mn.setAttribute("height",String(dn)),Mn.setAttribute("rx",String(dn/2*pn.backgroundOptions.round)),this._backgroundClipPath.appendChild(Mn)}}},qt.prototype.drawDots=function(Dt){var Vt,an,Xt=this;if(!this._qr)throw"QR code is not defined";var pn=this._options,En=this._qr.getModuleCount();if(En>pn.width||En>pn.height)throw"The canvas is too small.";var sn=Math.min(pn.width,pn.height)-2*pn.margin,dn=(pn.shape===st?sn/Math.sqrt(2):sn)/En,Mn=(pn.width-En*dn)/2,yn=(pn.height-En*dn)/2,An=new jt({svg:this._element,type:pn.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color-"+this._instanceId),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(Vt=pn.dotsOptions)===null||Vt===void 0?void 0:Vt.gradient,color:pn.dotsOptions.color,additionalRotation:0,x:0,y:0,height:pn.height,width:pn.width,name:"dot-color-"+this._instanceId});for(var Tn=function(Dn){for(var xn=function(jn){return Dt&&!Dt(Dn,jn)?"continue":!((an=gn._qr)===null||an===void 0)&&an.isDark(Dn,jn)?(An.draw(Mn+Dn*dn,yn+jn*dn,dn,function(Rn,Pn){return!(Dn+Rn<0||jn+Pn<0||Dn+Rn>=En||jn+Pn>=En)&&!(Dt&&!Dt(Dn+Rn,jn+Pn))&&!!Xt._qr&&Xt._qr.isDark(Dn+Rn,jn+Pn)}),void(An._element&&gn._dotsClipPath&&gn._dotsClipPath.appendChild(An._element))):"continue"},wn=0;wn<En;wn++)xn(wn)},gn=this,vn=0;vn<En;vn++)Tn(vn);if(pn.shape===st){var Ln=Math.floor((sn/dn-En)/2),Sn=En+2*Ln,In=Mn-Ln*dn,Nn=yn-Ln*dn,rn=[],Ut=Math.floor(Sn/2);for(vn=0;vn<Sn;vn++){rn[vn]=[];for(var Yt=0;Yt<Sn;Yt++)vn>=Ln-1&&vn<=Sn-Ln&&Yt>=Ln-1&&Yt<=Sn-Ln||Math.sqrt((vn-Ut)*(vn-Ut)+(Yt-Ut)*(Yt-Ut))>Ut?rn[vn][Yt]=0:rn[vn][Yt]=this._qr.isDark(Yt-2*Ln<0?Yt:Yt>=En?Yt-2*Ln:Yt-Ln,vn-2*Ln<0?vn:vn>=En?vn-2*Ln:vn-Ln)?1:0}var fn=function(Dn){for(var xn=function(jn){if(!rn[Dn][jn])return"continue";An.draw(In+Dn*dn,Nn+jn*dn,dn,function(Rn,Pn){var tr;return!!(!((tr=rn[Dn+Rn])===null||tr===void 0)&&tr[jn+Pn])}),An._element&&$n._dotsClipPath&&$n._dotsClipPath.appendChild(An._element)},wn=0;wn<Sn;wn++)xn(wn)},$n=this;for(vn=0;vn<Sn;vn++)fn(vn)}},qt.prototype.drawCorners=function(){var Dt=this;if(!this._qr)throw"QR code is not defined";var Vt=this._element,an=this._options;if(!Vt)throw"Element code is not defined";var Xt=this._qr.getModuleCount(),pn=Math.min(an.width,an.height)-2*an.margin,En=(an.shape===st?pn/Math.sqrt(2):pn)/Xt,sn=7*En,dn=3*En,Mn=(an.width-Xt*En)/2,yn=(an.height-Xt*En)/2;[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(function(An){var Tn,gn,vn,Ln,Sn,In,Nn,rn,Ut,Yt,fn,$n,Dn=An[0],xn=An[1],wn=An[2],jn=Mn+Dn*En*(Xt-7),Rn=yn+xn*En*(Xt-7),Pn=Dt._dotsClipPath,tr=Dt._dotsClipPath;if((!((Tn=an.cornersSquareOptions)===null||Tn===void 0)&&Tn.gradient||!((gn=an.cornersSquareOptions)===null||gn===void 0)&&gn.color)&&((Pn=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+Dn+"-"+xn),Dt._defs.appendChild(Pn),Dt._cornersSquareClipPath=Dt._cornersDotClipPath=tr=Pn,Dt._createColor({options:(vn=an.cornersSquareOptions)===null||vn===void 0?void 0:vn.gradient,color:(Ln=an.cornersSquareOptions)===null||Ln===void 0?void 0:Ln.color,additionalRotation:wn,x:jn,y:Rn,height:sn,width:sn,name:"corners-square-color-"+Dn+"-"+xn})),(Sn=an.cornersSquareOptions)===null||Sn===void 0?void 0:Sn.type){var Bn=new tn({svg:Dt._element,type:an.cornersSquareOptions.type});Bn.draw(jn,Rn,sn,wn),Bn._element&&Pn&&Pn.appendChild(Bn._element)}else for(var qn=new jt({svg:Dt._element,type:an.dotsOptions.type}),$r=function(Vn){for(var Kn=function(Un){if(!(!((In=mt[Vn])===null||In===void 0)&&In[Un]))return"continue";qn.draw(jn+Vn*En,Rn+Un*En,En,function(Yn,un){var ln;return!!(!((ln=mt[Vn+Yn])===null||ln===void 0)&&ln[Un+un])}),qn._element&&Pn&&Pn.appendChild(qn._element)},br=0;br<mt[Vn].length;br++)Kn(br)},Fn=0;Fn<mt.length;Fn++)$r(Fn);if((!((Nn=an.cornersDotOptions)===null||Nn===void 0)&&Nn.gradient||!((rn=an.cornersDotOptions)===null||rn===void 0)&&rn.color)&&((tr=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+Dn+"-"+xn),Dt._defs.appendChild(tr),Dt._cornersDotClipPath=tr,Dt._createColor({options:(Ut=an.cornersDotOptions)===null||Ut===void 0?void 0:Ut.gradient,color:(Yt=an.cornersDotOptions)===null||Yt===void 0?void 0:Yt.color,additionalRotation:wn,x:jn+2*En,y:Rn+2*En,height:dn,width:dn,name:"corners-dot-color-"+Dn+"-"+xn})),(fn=an.cornersDotOptions)===null||fn===void 0?void 0:fn.type){var Gn=new rt({svg:Dt._element,type:an.cornersDotOptions.type});Gn.draw(jn+2*En,Rn+2*En,dn,wn),Gn._element&&tr&&tr.appendChild(Gn._element)}else{qn=new jt({svg:Dt._element,type:an.dotsOptions.type});var Tr=function(Vn){for(var Kn=function(Un){if(!(!(($n=$t[Vn])===null||$n===void 0)&&$n[Un]))return"continue";qn.draw(jn+Vn*En,Rn+Un*En,En,function(Yn,un){var ln;return!!(!((ln=$t[Vn+Yn])===null||ln===void 0)&&ln[Un+un])}),qn._element&&tr&&tr.appendChild(qn._element)},br=0;br<$t[Vn].length;br++)Kn(br)};for(Fn=0;Fn<$t.length;Fn++)Tr(Fn)}})},qt.prototype.loadImage=function(){var Dt=this;return new Promise(function(Vt,an){var Xt=Dt._options,pn=new Image;if(!Xt.image)return an("Image is not defined");typeof Xt.imageOptions.crossOrigin=="string"&&(pn.crossOrigin=Xt.imageOptions.crossOrigin),Dt._image=pn,pn.onload=function(){Vt()},pn.src=Xt.image})},qt.prototype.drawImage=function(Dt){var Vt=Dt.width,an=Dt.height,Xt=Dt.count,pn=Dt.dotSize;return ut(this,void 0,void 0,function(){var En,sn,dn,Mn,yn,An,Tn,gn,vn;return pt(this,function(Ln){switch(Ln.label){case 0:return En=this._options,sn=(En.width-Xt*pn)/2,dn=(En.height-Xt*pn)/2,Mn=sn+En.imageOptions.margin+(Xt*pn-Vt)/2,yn=dn+En.imageOptions.margin+(Xt*pn-an)/2,An=Vt-2*En.imageOptions.margin,Tn=an-2*En.imageOptions.margin,(gn=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(Mn)),gn.setAttribute("y",String(yn)),gn.setAttribute("width",An+"px"),gn.setAttribute("height",Tn+"px"),[4,kt(En.image||"")];case 1:return vn=Ln.sent(),gn.setAttribute("href",vn||""),this._element.appendChild(gn),[2]}})})},qt.prototype._createColor=function(Dt){var Vt=Dt.options,an=Dt.color,Xt=Dt.additionalRotation,pn=Dt.x,En=Dt.y,sn=Dt.height,dn=Dt.width,Mn=Dt.name,yn=dn>sn?dn:sn,An=document.createElementNS("http://www.w3.org/2000/svg","rect");if(An.setAttribute("x",String(pn)),An.setAttribute("y",String(En)),An.setAttribute("height",String(sn)),An.setAttribute("width",String(dn)),An.setAttribute("clip-path","url('#clip-path-"+Mn+"')"),Vt){var Tn;if(Vt.type==="radial")(Tn=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",Mn),Tn.setAttribute("gradientUnits","userSpaceOnUse"),Tn.setAttribute("fx",String(pn+dn/2)),Tn.setAttribute("fy",String(En+sn/2)),Tn.setAttribute("cx",String(pn+dn/2)),Tn.setAttribute("cy",String(En+sn/2)),Tn.setAttribute("r",String(yn/2));else{var gn=((Vt.rotation||0)+Xt)%(2*Math.PI),vn=(gn+2*Math.PI)%(2*Math.PI),Ln=pn+dn/2,Sn=En+sn/2,In=pn+dn/2,Nn=En+sn/2;vn>=0&&vn<=.25*Math.PI||vn>1.75*Math.PI&&vn<=2*Math.PI?(Ln-=dn/2,Sn-=sn/2*Math.tan(gn),In+=dn/2,Nn+=sn/2*Math.tan(gn)):vn>.25*Math.PI&&vn<=.75*Math.PI?(Sn-=sn/2,Ln-=dn/2/Math.tan(gn),Nn+=sn/2,In+=dn/2/Math.tan(gn)):vn>.75*Math.PI&&vn<=1.25*Math.PI?(Ln+=dn/2,Sn+=sn/2*Math.tan(gn),In-=dn/2,Nn-=sn/2*Math.tan(gn)):vn>1.25*Math.PI&&vn<=1.75*Math.PI&&(Sn+=sn/2,Ln+=dn/2/Math.tan(gn),Nn-=sn/2,In-=dn/2/Math.tan(gn)),(Tn=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",Mn),Tn.setAttribute("gradientUnits","userSpaceOnUse"),Tn.setAttribute("x1",String(Math.round(Ln))),Tn.setAttribute("y1",String(Math.round(Sn))),Tn.setAttribute("x2",String(Math.round(In))),Tn.setAttribute("y2",String(Math.round(Nn)))}Vt.colorStops.forEach(function(rn){var Ut=rn.offset,Yt=rn.color,fn=document.createElementNS("http://www.w3.org/2000/svg","stop");fn.setAttribute("offset",100*Ut+"%"),fn.setAttribute("stop-color",Yt),Tn.appendChild(fn)}),An.setAttribute("fill","url('#"+Mn+"')"),this._defs.appendChild(Tn)}else an&&An.setAttribute("fill",an);this._element.appendChild(An)},qt.instanceCount=0,qt}(),vt="canvas";for(var it={},bt=0;bt<=40;bt++)it[bt]=bt;const Mt={type:vt,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:it[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var Lt=function(){return Lt=Object.assign||function(qt){for(var Dt,Vt=1,an=arguments.length;Vt<an;Vt++)for(var Xt in Dt=arguments[Vt])Object.prototype.hasOwnProperty.call(Dt,Xt)&&(qt[Xt]=Dt[Xt]);return qt},Lt.apply(this,arguments)};function Ht(qt){var Dt=Lt({},qt);if(!Dt.colorStops||!Dt.colorStops.length)throw"Field 'colorStops' is required in gradient";return Dt.rotation?Dt.rotation=Number(Dt.rotation):Dt.rotation=0,Dt.colorStops=Dt.colorStops.map(function(Vt){return Lt(Lt({},Vt),{offset:Number(Vt.offset)})}),Dt}function Ot(qt){var Dt=Lt({},qt);return Dt.width=Number(Dt.width),Dt.height=Number(Dt.height),Dt.margin=Number(Dt.margin),Dt.imageOptions=Lt(Lt({},Dt.imageOptions),{hideBackgroundDots:!!Dt.imageOptions.hideBackgroundDots,imageSize:Number(Dt.imageOptions.imageSize),margin:Number(Dt.imageOptions.margin)}),Dt.margin>Math.min(Dt.width,Dt.height)&&(Dt.margin=Math.min(Dt.width,Dt.height)),Dt.dotsOptions=Lt({},Dt.dotsOptions),Dt.dotsOptions.gradient&&(Dt.dotsOptions.gradient=Ht(Dt.dotsOptions.gradient)),Dt.cornersSquareOptions&&(Dt.cornersSquareOptions=Lt({},Dt.cornersSquareOptions),Dt.cornersSquareOptions.gradient&&(Dt.cornersSquareOptions.gradient=Ht(Dt.cornersSquareOptions.gradient))),Dt.cornersDotOptions&&(Dt.cornersDotOptions=Lt({},Dt.cornersDotOptions),Dt.cornersDotOptions.gradient&&(Dt.cornersDotOptions.gradient=Ht(Dt.cornersDotOptions.gradient))),Dt.backgroundOptions&&(Dt.backgroundOptions=Lt({},Dt.backgroundOptions),Dt.backgroundOptions.gradient&&(Dt.backgroundOptions.gradient=Ht(Dt.backgroundOptions.gradient))),Dt}var Jt=ct(192),Ft=ct.n(Jt),Zt=function(qt,Dt,Vt,an){return new(Vt||(Vt=Promise))(function(Xt,pn){function En(Mn){try{dn(an.next(Mn))}catch(yn){pn(yn)}}function sn(Mn){try{dn(an.throw(Mn))}catch(yn){pn(yn)}}function dn(Mn){var yn;Mn.done?Xt(Mn.value):(yn=Mn.value,yn instanceof Vt?yn:new Vt(function(An){An(yn)})).then(En,sn)}dn((an=an.apply(qt,[])).next())})},nn=function(qt,Dt){var Vt,an,Xt,pn,En={label:0,sent:function(){if(1&Xt[0])throw Xt[1];return Xt[1]},trys:[],ops:[]};return pn={next:sn(0),throw:sn(1),return:sn(2)},typeof Symbol=="function"&&(pn[Symbol.iterator]=function(){return this}),pn;function sn(dn){return function(Mn){return function(yn){if(Vt)throw new TypeError("Generator is already executing.");for(;En;)try{if(Vt=1,an&&(Xt=2&yn[0]?an.return:yn[0]?an.throw||((Xt=an.return)&&Xt.call(an),0):an.next)&&!(Xt=Xt.call(an,yn[1])).done)return Xt;switch(an=0,Xt&&(yn=[2&yn[0],Xt.value]),yn[0]){case 0:case 1:Xt=yn;break;case 4:return En.label++,{value:yn[1],done:!1};case 5:En.label++,an=yn[1],yn=[0];continue;case 7:yn=En.ops.pop(),En.trys.pop();continue;default:if(!((Xt=(Xt=En.trys).length>0&&Xt[Xt.length-1])||yn[0]!==6&&yn[0]!==2)){En=0;continue}if(yn[0]===3&&(!Xt||yn[1]>Xt[0]&&yn[1]<Xt[3])){En.label=yn[1];break}if(yn[0]===6&&En.label<Xt[1]){En.label=Xt[1],Xt=yn;break}if(Xt&&En.label<Xt[2]){En.label=Xt[2],En.ops.push(yn);break}Xt[2]&&En.ops.pop(),En.trys.pop();continue}yn=Dt.call(qt,En)}catch(An){yn=[6,An],an=0}finally{Vt=Xt=0}if(5&yn[0])throw yn[1];return{value:yn[0]?yn[1]:void 0,done:!0}}([dn,Mn])}}};const cn=function(){function qt(Dt){this._options=Dt?Ot(At(Mt,Dt)):Mt,this.update()}return qt._clearContainer=function(Dt){Dt&&(Dt.innerHTML="")},qt.prototype._setupSvg=function(){var Dt=this;if(this._qr){var Vt=new xt(this._options);this._svg=Vt.getElement(),this._svgDrawingPromise=Vt.drawQR(this._qr).then(function(){var an;Dt._svg&&((an=Dt._extension)===null||an===void 0||an.call(Dt,Vt.getElement(),Dt._options))})}},qt.prototype._setupCanvas=function(){var Dt,Vt=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=(Dt=this._svgDrawingPromise)===null||Dt===void 0?void 0:Dt.then(function(){if(Vt._svg){var an=Vt._svg,Xt=new XMLSerializer().serializeToString(an),pn="data:image/svg+xml;base64,"+btoa(Xt),En=new Image;return new Promise(function(sn){En.onload=function(){var dn,Mn;(Mn=(dn=Vt._canvas)===null||dn===void 0?void 0:dn.getContext("2d"))===null||Mn===void 0||Mn.drawImage(En,0,0),sn()},En.src=pn})}}))},qt.prototype._getElement=function(Dt){return Dt===void 0&&(Dt="png"),Zt(this,void 0,void 0,function(){return nn(this,function(Vt){switch(Vt.label){case 0:if(!this._qr)throw"QR code is empty";return Dt.toLowerCase()!=="svg"?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return Vt.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return Vt.sent(),[2,this._canvas]}})})},qt.prototype.update=function(Dt){qt._clearContainer(this._container),this._options=Dt?Ot(At(this._options,Dt)):this._options,this._options.data&&(this._qr=Ft()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(Vt){switch(!0){case/^[0-9]*$/.test(Vt):return ft;case/^[0-9A-Z $%*+\-./:]*$/.test(Vt):return ht;default:return dt}}(this._options.data)),this._qr.make(),this._options.type===vt?this._setupCanvas():this._setupSvg(),this.append(this._container))},qt.prototype.append=function(Dt){if(Dt){if(typeof Dt.appendChild!="function")throw"Container should be a single DOM node";this._options.type===vt?this._canvas&&Dt.appendChild(this._canvas):this._svg&&Dt.appendChild(this._svg),this._container=Dt}},qt.prototype.applyExtension=function(Dt){if(!Dt)throw"Extension function should be defined.";this._extension=Dt,this.update()},qt.prototype.deleteExtension=function(){this._extension=void 0,this.update()},qt.prototype.getRawData=function(Dt){return Dt===void 0&&(Dt="png"),Zt(this,void 0,void 0,function(){var Vt,an,Xt;return nn(this,function(pn){switch(pn.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(Dt)];case 1:return(Vt=pn.sent())?Dt.toLowerCase()==="svg"?(an=new XMLSerializer,Xt=an.serializeToString(Vt),[2,new Blob([`<?xml version="1.0" standalone="no"?>\r
469
469
  `+Xt],{type:"image/svg+xml"})]):[2,new Promise(function(En){return Vt.toBlob(En,"image/"+Dt,1)})]:[2,null]}})})},qt.prototype.download=function(Dt){return Zt(this,void 0,void 0,function(){var Vt,an,Xt,pn,En;return nn(this,function(sn){switch(sn.label){case 0:if(!this._qr)throw"QR code is empty";return Vt="png",an="qr",typeof Dt=="string"?(Vt=Dt,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof Dt=="object"&&Dt!==null&&(Dt.name&&(an=Dt.name),Dt.extension&&(Vt=Dt.extension)),[4,this._getElement(Vt)];case 1:return(Xt=sn.sent())?(Vt.toLowerCase()==="svg"?(pn=new XMLSerializer,En=`<?xml version="1.0" standalone="no"?>\r
470
- `+(En=pn.serializeToString(Xt)),Rt("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(En),an+".svg")):Rt(Xt.toDataURL("image/"+Vt),an+"."+Vt),[2]):[2]}})})},qt}()}},et={};function nt(tt){if(et[tt])return et[tt].exports;var ot=et[tt]={exports:{}};return _e[tt](ot,ot.exports,nt),ot.exports}return nt.n=tt=>{var ot=tt&&tt.__esModule?()=>tt.default:()=>tt;return nt.d(ot,{a:ot}),ot},nt.d=(tt,ot)=>{for(var ct in ot)nt.o(ot,ct)&&!nt.o(tt,ct)&&Object.defineProperty(tt,ct,{enumerable:!0,get:ot[ct]})},nt.o=(tt,ot)=>Object.prototype.hasOwnProperty.call(tt,ot),nt(676)})().default})})(qrCodeStyling);var qrCodeStylingExports=qrCodeStyling.exports;const QRCodeStyling=getDefaultExportFromCjs$1(qrCodeStylingExports),defaults={margin:0,dotsOptions:{type:"dots"},cornersSquareOptions:{type:"extra-rounded"},cornersDotOptions:{type:"dot"}};function QRCode({data:a,size:j,image:_e,config:et,...nt}){const tt=reactExports.useRef(null),ot=reactExports.useMemo(()=>({...defaults,data:a,width:j,height:j,..._e&&{image:_e,imageOptions:{crossOrigin:"anonymous",margin:0}},...et}),[a,j,_e,et]),[ct]=reactExports.useState(new QRCodeStyling(ot));return reactExports.useEffect(()=>{tt.current&&ct.append(tt.current)},[ct,tt]),reactExports.useEffect(()=>{ct&&ct.update(ot)},[a,j,_e,et]),jsxRuntimeExports.jsx(Box,{ref:tt,...nt})}QRCode.propTypes={data:PropTypes.string.isRequired,size:PropTypes.number.isRequired,image:PropTypes.string,config:PropTypes.object};QRCode.defaultProps={image:null,config:{}};function MobileLoginItem({tokenState:a,locale:j,messages:_e}){const{t:et,matchSmallScreen:nt}=useStateContext(),tt="DID Wallet",ot=(_e==null?void 0:_e.scan)||et("scanWithWallet"),ct=et("download"),ft=et("downloadTips"),ht=160,dt=useCreation(()=>["zh","en"].includes?`https://www.didwallet.io/${j}`:"https://www.didwallet.io/en",[j]),yt=useCreation(()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ft," ",jsxRuntimeExports.jsx(Box,{component:"a",href:dt,target:"_blank",rel:"noopener",sx:{color:colors$1.foregroundsFgInteractive,textDecoration:"none","&:hover":{textDecoration:"underline"}},children:ct})]}),[dt,ct,ft]);return jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",gap:1,justifyContent:"space-between",alignItems:nt?"center":"stretch",flexDirection:nt?"column":"row"},children:[jsxRuntimeExports.jsx(Box,{sx:{display:nt?"none":"block"},children:jsxRuntimeExports.jsx(default_1$4,{width:"24px",height:"24px"})}),jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",flex:1,wordBreak:"break-word",width:nt?186:"auto"},children:[jsxRuntimeExports.jsxs(Typography,{sx:{fontSize:"14px",fontWeight:500,display:"flex",alignItems:"center",gap:1},children:[nt?jsxRuntimeExports.jsx(default_1$4,{width:"24px",height:"24px"}):null,tt]}),jsxRuntimeExports.jsx(Typography,{sx:{flex:1,color:colors$1.foregroundsFgMuted,fontSize:"12px"},children:ot}),jsxRuntimeExports.jsx(Box,{sx:{color:colors$1.foregroundsFgMuted,fontSize:"12px",display:nt?"none":"block"},children:yt})]}),jsxRuntimeExports.jsx(QRCode,{data:a.url,size:ht,sx:{p:1.5,borderRadius:2,border:`1px solid ${colors$1.strokeBorderBase}`,backgroundColor:"white",fontSize:0}}),jsxRuntimeExports.jsx(Box,{sx:{color:colors$1.textMuted,fontSize:"12px",display:nt?"block":"none"},children:yt})]})}MobileLoginItem.propTypes={tokenState:PropTypes.object.isRequired,locale:PropTypes.string,messages:PropTypes.object};MobileLoginItem.defaultProps={locale:"en",messages:{}};const data$f={width:256,height:315,body:'<path d="M213.803 167.03c.442 47.58 41.74 63.413 42.197 63.615c-.35 1.116-6.599 22.563-21.757 44.716c-13.104 19.153-26.705 38.235-48.13 38.63c-21.05.388-27.82-12.483-51.888-12.483c-24.061 0-31.582 12.088-51.51 12.871c-20.68.783-36.428-20.71-49.64-39.793c-27-39.033-47.633-110.3-19.928-158.406c13.763-23.89 38.36-39.017 65.056-39.405c20.307-.387 39.475 13.662 51.889 13.662c12.406 0 35.699-16.895 60.186-14.414c10.25.427 39.026 4.14 57.503 31.186c-1.49.923-34.335 20.044-33.978 59.822M174.24 50.199c10.98-13.29 18.369-31.79 16.353-50.199c-15.826.636-34.962 10.546-46.314 23.828c-10.173 11.763-19.082 30.589-16.678 48.633c17.64 1.365 35.66-8.964 46.64-22.262"/>'},data$e={width:256,height:250,body:'<path fill="#161614" d="M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46c6.397 1.185 8.746-2.777 8.746-6.158c0-3.052-.12-13.135-.174-23.83c-35.61 7.742-43.124-15.103-43.124-15.103c-5.823-14.795-14.213-18.73-14.213-18.73c-11.613-7.944.876-7.78.876-7.78c12.853.902 19.621 13.19 19.621 13.19c11.417 19.568 29.945 13.911 37.249 10.64c1.149-8.272 4.466-13.92 8.127-17.116c-28.431-3.236-58.318-14.212-58.318-63.258c0-13.975 5-25.394 13.188-34.358c-1.329-3.224-5.71-16.242 1.24-33.874c0 0 10.749-3.44 35.21 13.121c10.21-2.836 21.16-4.258 32.038-4.307c10.878.049 21.837 1.47 32.066 4.307c24.431-16.56 35.165-13.12 35.165-13.12c6.967 17.63 2.584 30.65 1.255 33.873c8.207 8.964 13.173 20.383 13.173 34.358c0 49.163-29.944 59.988-58.447 63.157c4.591 3.972 8.682 11.762 8.682 23.704c0 17.126-.148 30.91-.148 35.126c0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002C256 57.307 198.691 0 128.001 0Zm-80.06 182.34c-.282.636-1.283.827-2.194.39c-.929-.417-1.45-1.284-1.15-1.922c.276-.655 1.279-.838 2.205-.399c.93.418 1.46 1.293 1.139 1.931Zm6.296 5.618c-.61.566-1.804.303-2.614-.591c-.837-.892-.994-2.086-.375-2.66c.63-.566 1.787-.301 2.626.591c.838.903 1 2.088.363 2.66Zm4.32 7.188c-.785.545-2.067.034-2.86-1.104c-.784-1.138-.784-2.503.017-3.05c.795-.547 2.058-.055 2.861 1.075c.782 1.157.782 2.522-.019 3.08Zm7.304 8.325c-.701.774-2.196.566-3.29-.49c-1.119-1.032-1.43-2.496-.726-3.27c.71-.776 2.213-.558 3.315.49c1.11 1.03 1.45 2.505.701 3.27Zm9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033c-1.448-.439-2.395-1.613-2.103-2.626c.301-1.01 1.747-1.484 3.207-1.028c1.446.436 2.396 1.602 2.095 2.622Zm10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95c-1.53.034-2.769-.82-2.786-1.86c0-1.065 1.202-1.932 2.733-1.958c1.522-.03 2.768.818 2.768 1.868Zm10.555-.405c.182 1.03-.875 2.088-2.387 2.37c-1.485.271-2.861-.365-3.05-1.386c-.184-1.056.893-2.114 2.376-2.387c1.514-.263 2.868.356 3.061 1.403Z"/>'},data$d={width:256,height:262,body:'<path fill="#4285F4" d="M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"/><path fill="#34A853" d="M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"/><path fill="#FBBC05" d="M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782"/><path fill="#EB4335" d="M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"/>'};function IconItem({icon:a,...j}){return jsxRuntimeExports.jsx(IconButton,{...j,sx:{backgroundColor:"white",border:`1px solid ${colors$1.borderBase}`,...j==null?void 0:j.sx},children:jsxRuntimeExports.jsx(Icon,{icon:a,width:"1em",height:"1em"})})}IconItem.propTypes={icon:PropTypes.any.isRequired};function OAuthLoginStack({providerList:a,onLogin:j}){return jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Icon,{icon:data$m,fontSize:"1.3rem"}),jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"16px",fontWeight:"bold"},children:"Others"})]}),jsxRuntimeExports.jsx(Box,{sx:{display:"flex",gap:2},children:a.map(et=>{const nt={[LOGIN_PROVIDER$1.AUTH0]:data$j,[LOGIN_PROVIDER$1.APPLE]:data$f,[LOGIN_PROVIDER$1.GITHUB]:data$e,[LOGIN_PROVIDER$1.GOOGLE]:data$d};return jsxRuntimeExports.jsx(IconItem,{icon:nt[et.provider],onClick:()=>j(et)},et.provider)})})]})}OAuthLoginStack.propTypes={onLogin:PropTypes.func.isRequired,providerList:PropTypes.array.isRequired};function OAuthItem({title:a,icon:j,..._e}){return jsxRuntimeExports.jsxs(ItemWrap,{..._e,sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer","&:hover":{backgroundColor:colors$1.surfacePrimarySubtitle,"& .other-item-icon":{display:"inline-block",transform:"translateX(0)",opacity:"1"}},"& .other-item-icon":{opacity:"0",transform:"translateX(-100%)",transition:"transform 0.2s ease"},..._e==null?void 0:_e.sx},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Icon,{icon:j,width:"1em",height:"1em",fontSize:"1.5rem",style:{transform:"scale(0.95)"}}),jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"16px",fontWeight:"bold"},children:a})]}),jsxRuntimeExports.jsx(Icon,{className:"other-item-icon",icon:data$p,fontSize:"1.3rem",color:colors$1.primaryBase})]})}OAuthItem.propTypes={title:PropTypes.string.isRequired,icon:PropTypes.string.isRequired};function OAuthLoginList({providerList:a,onLogin:j}){const{t:_e}=useStateContext(),et={[LOGIN_PROVIDER$1.AUTH0]:data$j,[LOGIN_PROVIDER$1.APPLE]:data$f,[LOGIN_PROVIDER$1.GITHUB]:data$e,[LOGIN_PROVIDER$1.GOOGLE]:data$d};return jsxRuntimeExports.jsx(Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:a.map(nt=>{if(nt.provider===LOGIN_PROVIDER$1.AUTH0&&a.length===1){const tt=_e("otherAccount");return jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer","&:hover":{backgroundColor:colors$1.surfacePrimarySubtitle}},onClick:()=>{j(nt)},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Icon,{icon:data$m,fontSize:"1.3rem"}),jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"16px",fontWeight:"bold"},children:tt})]}),jsxRuntimeExports.jsx(Box,{sx:{display:"flex",gap:2},children:[{provider:"auth0"},{provider:"google"},{provider:"apple"}].map(ot=>jsxRuntimeExports.jsx(IconButton,{sx:{backgroundColor:"white",border:`1px solid ${colors$1.borderBase}`},children:jsxRuntimeExports.jsx(Icon,{icon:et[ot.provider],width:"1em",height:"1em"})},ot.provider))})]},nt.provider)}return jsxRuntimeExports.jsx(OAuthItem,{title:OAUTH_PROVIDER[nt.provider],icon:et[nt.provider],onClick:()=>{j(nt)}},nt.provider)})})}OAuthLoginList.propTypes={onLogin:PropTypes.func.isRequired,providerList:PropTypes.array.isRequired};function OAuthLogin({providerList:a,type:j,onSuccess:_e,onError:et,tokenState:nt}){const{extraParams:tt,changeStatus:ot}=useStateContext(),{loginOAuth:ct,logoutOAuth:ft,t:ht,oauthState:dt}=useOAuth(),yt=useMemoizedFn(async Tt=>{const St=tt==null?void 0:tt.sourceAppPid;try{dt.loading=!0,dt.status="scanned";const At=await ct(Tt,{action:nt.action,...tt}),Rt=getCookieOptions({returnDomain:!1});Cookie.remove("connected_did",Rt),Cookie.remove("connected_pk",Rt),Cookie.remove("connected_wallet_os",Rt),At!=null&&At.sessionToken&&(dt.loading=!1,dt.status="succeed",_e({...At,encrypted:!1},It=>It,{sourceAppPid:St,connected_app:getAppId$1(nt.appInfo,nt.memberAppInfo)}))}catch(At){const Rt=getApiErrorMessage(At,ht("loginOAuthFailed"));dt.loading=!1,dt.error=Rt,dt.status="error",await ft({provider:Tt.provider}),et(new Error(Rt))}});return reactExports.useEffect(()=>{ot(dt.status)},[ot,dt.status]),j==="stack"?jsxRuntimeExports.jsx(OAuthLoginStack,{providerList:a,onLogin:yt}):jsxRuntimeExports.jsx(OAuthLoginList,{providerList:a,onLogin:yt})}OAuthLogin.propTypes={providerList:PropTypes.array.isRequired,type:PropTypes.oneOf(["list","stack"]),onSuccess:PropTypes.func.isRequired,onError:PropTypes.func.isRequired,tokenState:PropTypes.object.isRequired};OAuthLogin.defaultProps={type:"stack"};function arraySome$1(a,j){for(var _e=-1,et=a==null?0:a.length;++_e<et;)if(j(a[_e],_e,a))return!0;return!1}var _arraySome=arraySome$1,SetCache$1=_SetCache,arraySome=_arraySome,cacheHas$1=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(a,j,_e,et,nt,tt){var ot=_e&COMPARE_PARTIAL_FLAG$5,ct=a.length,ft=j.length;if(ct!=ft&&!(ot&&ft>ct))return!1;var ht=tt.get(a),dt=tt.get(j);if(ht&&dt)return ht==j&&dt==a;var yt=-1,Tt=!0,St=_e&COMPARE_UNORDERED_FLAG$3?new SetCache$1:void 0;for(tt.set(a,j),tt.set(j,a);++yt<ct;){var At=a[yt],Rt=j[yt];if(et)var It=ot?et(Rt,At,yt,j,a,tt):et(At,Rt,yt,a,j,tt);if(It!==void 0){if(It)continue;Tt=!1;break}if(St){if(!arraySome(j,function(Ct,kt){if(!cacheHas$1(St,kt)&&(At===Ct||nt(At,Ct,_e,et,tt)))return St.push(kt)})){Tt=!1;break}}else if(!(At===Rt||nt(At,Rt,_e,et,tt))){Tt=!1;break}}return tt.delete(a),tt.delete(j),Tt}var _equalArrays=equalArrays$2;function mapToArray$1(a){var j=-1,_e=Array(a.size);return a.forEach(function(et,nt){_e[++j]=[nt,et]}),_e}var _mapToArray=mapToArray$1;function setToArray$3(a){var j=-1,_e=Array(a.size);return a.forEach(function(et){_e[++j]=et}),_e}var _setToArray=setToArray$3,Symbol$4=_Symbol,Uint8Array$1=_Uint8Array,eq$5=eq_1$1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray$2=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",symbolProto$2=Symbol$4?Symbol$4.prototype:void 0,symbolValueOf=symbolProto$2?symbolProto$2.valueOf:void 0;function equalByTag$1(a,j,_e,et,nt,tt,ot){switch(_e){case dataViewTag:if(a.byteLength!=j.byteLength||a.byteOffset!=j.byteOffset)return!1;a=a.buffer,j=j.buffer;case arrayBufferTag:return!(a.byteLength!=j.byteLength||!tt(new Uint8Array$1(a),new Uint8Array$1(j)));case boolTag:case dateTag:case numberTag:return eq$5(+a,+j);case errorTag:return a.name==j.name&&a.message==j.message;case regexpTag:case stringTag:return a==j+"";case mapTag:var ct=mapToArray;case setTag:var ft=et&COMPARE_PARTIAL_FLAG$4;if(ct||(ct=setToArray$2),a.size!=j.size&&!ft)return!1;var ht=ot.get(a);if(ht)return ht==j;et|=COMPARE_UNORDERED_FLAG$2,ot.set(a,j);var dt=equalArrays$1(ct(a),ct(j),et,nt,tt,ot);return ot.delete(a),dt;case symbolTag$2:if(symbolValueOf)return symbolValueOf.call(a)==symbolValueOf.call(j)}return!1}var _equalByTag=equalByTag$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$3=Object.prototype,hasOwnProperty$6=objectProto$3.hasOwnProperty;function equalObjects$1(a,j,_e,et,nt,tt){var ot=_e&COMPARE_PARTIAL_FLAG$3,ct=getAllKeys(a),ft=ct.length,ht=getAllKeys(j),dt=ht.length;if(ft!=dt&&!ot)return!1;for(var yt=ft;yt--;){var Tt=ct[yt];if(!(ot?Tt in j:hasOwnProperty$6.call(j,Tt)))return!1}var St=tt.get(a),At=tt.get(j);if(St&&At)return St==j&&At==a;var Rt=!0;tt.set(a,j),tt.set(j,a);for(var It=ot;++yt<ft;){Tt=ct[yt];var Ct=a[Tt],kt=j[Tt];if(et)var Pt=ot?et(kt,Ct,Tt,j,a,tt):et(Ct,kt,Tt,a,j,tt);if(!(Pt===void 0?Ct===kt||nt(Ct,kt,_e,et,tt):Pt)){Rt=!1;break}It||(It=Tt=="constructor")}if(Rt&&!It){var Bt=a.constructor,Kt=j.constructor;Bt!=Kt&&"constructor"in a&&"constructor"in j&&!(typeof Bt=="function"&&Bt instanceof Bt&&typeof Kt=="function"&&Kt instanceof Kt)&&(Rt=!1)}return tt.delete(a),tt.delete(j),Rt}var _equalObjects=equalObjects$1,Stack$1=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag=_getTag,isArray$7=isArray_1,isBuffer=isBufferExports,isTypedArray=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto$2=Object.prototype,hasOwnProperty$5=objectProto$2.hasOwnProperty;function baseIsEqualDeep$1(a,j,_e,et,nt,tt){var ot=isArray$7(a),ct=isArray$7(j),ft=ot?arrayTag:getTag(a),ht=ct?arrayTag:getTag(j);ft=ft==argsTag?objectTag:ft,ht=ht==argsTag?objectTag:ht;var dt=ft==objectTag,yt=ht==objectTag,Tt=ft==ht;if(Tt&&isBuffer(a)){if(!isBuffer(j))return!1;ot=!0,dt=!1}if(Tt&&!dt)return tt||(tt=new Stack$1),ot||isTypedArray(a)?equalArrays(a,j,_e,et,nt,tt):equalByTag(a,j,ft,_e,et,nt,tt);if(!(_e&COMPARE_PARTIAL_FLAG$2)){var St=dt&&hasOwnProperty$5.call(a,"__wrapped__"),At=yt&&hasOwnProperty$5.call(j,"__wrapped__");if(St||At){var Rt=St?a.value():a,It=At?j.value():j;return tt||(tt=new Stack$1),nt(Rt,It,_e,et,tt)}}return Tt?(tt||(tt=new Stack$1),equalObjects(a,j,_e,et,nt,tt)):!1}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike$3=isObjectLike_1;function baseIsEqual$3(a,j,_e,et,nt){return a===j?!0:a==null||j==null||!isObjectLike$3(a)&&!isObjectLike$3(j)?a!==a&&j!==j:baseIsEqualDeep(a,j,_e,et,baseIsEqual$3,nt)}var _baseIsEqual=baseIsEqual$3,Stack=_Stack,baseIsEqual$2=_baseIsEqual,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch$1(a,j,_e,et){var nt=_e.length,tt=nt,ot=!et;if(a==null)return!tt;for(a=Object(a);nt--;){var ct=_e[nt];if(ot&&ct[2]?ct[1]!==a[ct[0]]:!(ct[0]in a))return!1}for(;++nt<tt;){ct=_e[nt];var ft=ct[0],ht=a[ft],dt=ct[1];if(ot&&ct[2]){if(ht===void 0&&!(ft in a))return!1}else{var yt=new Stack;if(et)var Tt=et(ht,dt,ft,a,j,yt);if(!(Tt===void 0?baseIsEqual$2(dt,ht,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,et,yt):Tt))return!1}}return!0}var _baseIsMatch=baseIsMatch$1,isObject$9=isObject_1;function isStrictComparable$2(a){return a===a&&!isObject$9(a)}var _isStrictComparable=isStrictComparable$2,isStrictComparable$1=_isStrictComparable,keys$2=keys_1;function getMatchData$1(a){for(var j=keys$2(a),_e=j.length;_e--;){var et=j[_e],nt=a[et];j[_e]=[et,nt,isStrictComparable$1(nt)]}return j}var _getMatchData=getMatchData$1;function matchesStrictComparable$2(a,j){return function(_e){return _e==null?!1:_e[a]===j&&(j!==void 0||a in Object(_e))}}var _matchesStrictComparable=matchesStrictComparable$2,baseIsMatch=_baseIsMatch,getMatchData=_getMatchData,matchesStrictComparable$1=_matchesStrictComparable;function baseMatches$1(a){var j=getMatchData(a);return j.length==1&&j[0][2]?matchesStrictComparable$1(j[0][0],j[0][1]):function(_e){return _e===a||baseIsMatch(_e,a,j)}}var _baseMatches=baseMatches$1,baseIsEqual$1=_baseIsEqual,get$4=get_1,hasIn=hasIn_1,isKey$3=_isKey,isStrictComparable=_isStrictComparable,matchesStrictComparable=_matchesStrictComparable,toKey$3=_toKey,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty$1(a,j){return isKey$3(a)&&isStrictComparable(j)?matchesStrictComparable(toKey$3(a),j):function(_e){var et=get$4(_e,a);return et===void 0&&et===j?hasIn(_e,a):baseIsEqual$1(j,et,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}var _baseMatchesProperty=baseMatchesProperty$1,baseGet$2=_baseGet;function basePropertyDeep$1(a){return function(j){return baseGet$2(j,a)}}var _basePropertyDeep=basePropertyDeep$1,baseProperty=_baseProperty,basePropertyDeep=_basePropertyDeep,isKey$2=_isKey,toKey$2=_toKey;function property$1(a){return isKey$2(a)?baseProperty(toKey$2(a)):basePropertyDeep(a)}var property_1=property$1,baseMatches=_baseMatches,baseMatchesProperty=_baseMatchesProperty,identity$1=identity_1,isArray$6=isArray_1,property=property_1;function baseIteratee$4(a){return typeof a=="function"?a:a==null?identity$1:typeof a=="object"?isArray$6(a)?baseMatchesProperty(a[0],a[1]):baseMatches(a):property(a)}var _baseIteratee=baseIteratee$4,FUNC_ERROR_TEXT$2="Expected a function";function negate$1(a){if(typeof a!="function")throw new TypeError(FUNC_ERROR_TEXT$2);return function(){var j=arguments;switch(j.length){case 0:return!a.call(this);case 1:return!a.call(this,j[0]);case 2:return!a.call(this,j[0],j[1]);case 3:return!a.call(this,j[0],j[1],j[2])}return!a.apply(this,j)}}var negate_1=negate$1,arrayMap$1=_arrayMap,baseIteratee$3=_baseIteratee,basePickBy=_basePickBy,getAllKeysIn=_getAllKeysIn;function pickBy$1(a,j){if(a==null)return{};var _e=arrayMap$1(getAllKeysIn(a),function(et){return[et]});return j=baseIteratee$3(j),basePickBy(a,_e,function(et,nt){return j(et,nt[0])})}var pickBy_1=pickBy$1,baseIteratee$2=_baseIteratee,negate=negate_1,pickBy=pickBy_1;function omitBy(a,j){return pickBy(a,negate(baseIteratee$2(j)))}var omitBy_1=omitBy;const omitBy$1=getDefaultExportFromCjs$1(omitBy_1);function useInterval(a,j){const _e=reactExports.useRef();reactExports.useEffect(()=>{_e.current=a},[a]),reactExports.useEffect(()=>{function et(){_e.current()}if(j!==null){const nt=setInterval(et,j);return()=>clearInterval(nt)}},[j])}var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(a,j)=>{for(var _e in j)__defProp(a,_e,{get:j[_e],enumerable:!0})},__copyProps=(a,j,_e,et)=>{if(j&&typeof j=="object"||typeof j=="function")for(let nt of __getOwnPropNames(j))!__hasOwnProp.call(a,nt)&&nt!==_e&&__defProp(a,nt,{get:()=>j[nt],enumerable:!(et=__getOwnPropDesc(j,nt))||et.enumerable});return a},__toCommonJS=a=>__copyProps(__defProp({},"__esModule",{value:!0}),a),phoenix_exports={};__export(phoenix_exports,{Channel:()=>Channel,LongPoll:()=>LongPoll,Presence:()=>Presence,Serializer:()=>serializer_default,Socket:()=>Socket$1});var phoenix_cjs=__toCommonJS(phoenix_exports),closure=a=>typeof a=="function"?a:function(){return a},globalSelf=typeof self<"u"?self:null,phxWindow=typeof window<"u"?window:null,global$1=globalSelf||phxWindow||global$1,DEFAULT_VSN="2.0.0",SOCKET_STATES={connecting:0,open:1,closing:2,closed:3},DEFAULT_TIMEOUT=1e4,WS_CLOSE_NORMAL=1e3,CHANNEL_STATES={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},CHANNEL_EVENTS={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},TRANSPORTS={longpoll:"longpoll",websocket:"websocket"},XHR_STATES={complete:4},Push=class{constructor(a,j,_e,et){this.channel=a,this.event=j,this.payload=_e||function(){return{}},this.receivedResp=null,this.timeout=et,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(a){this.timeout=a,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(a,j){return this.hasReceived(a)&&j(this.receivedResp.response),this.recHooks.push({status:a,callback:j}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:a,response:j,_ref:_e}){this.recHooks.filter(et=>et.status===a).forEach(et=>et.callback(j))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,a=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=a,this.matchReceive(a)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(a){return this.receivedResp&&this.receivedResp.status===a}trigger(a,j){this.channel.trigger(this.refEvent,{status:a,response:j})}},Timer=class{constructor(a,j){this.callback=a,this.timerCalc=j,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Channel=class{constructor(a,j,_e){this.state=CHANNEL_STATES.closed,this.topic=a,this.params=closure(j||{}),this.socket=_e,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Push(this,CHANNEL_EVENTS.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Timer(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=CHANNEL_STATES.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(et=>et.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=CHANNEL_STATES.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=CHANNEL_STATES.closed,this.socket.remove(this)}),this.onError(et=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,et),this.isJoining()&&this.joinPush.reset(),this.state=CHANNEL_STATES.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new Push(this,CHANNEL_EVENTS.leave,closure({}),this.timeout).send(),this.state=CHANNEL_STATES.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(CHANNEL_EVENTS.reply,(et,nt)=>{this.trigger(this.replyEventName(nt),et)})}join(a=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=a,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(a){this.on(CHANNEL_EVENTS.close,a)}onError(a){return this.on(CHANNEL_EVENTS.error,j=>a(j))}on(a,j){let _e=this.bindingRef++;return this.bindings.push({event:a,ref:_e,callback:j}),_e}off(a,j){this.bindings=this.bindings.filter(_e=>!(_e.event===a&&(typeof j>"u"||j===_e.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(a,j,_e=this.timeout){if(j=j||{},!this.joinedOnce)throw new Error(`tried to push '${a}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let et=new Push(this,a,function(){return j},_e);return this.canPush()?et.send():(et.startTimeout(),this.pushBuffer.push(et)),et}leave(a=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=CHANNEL_STATES.leaving;let j=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(CHANNEL_EVENTS.close,"leave")},_e=new Push(this,CHANNEL_EVENTS.leave,closure({}),a);return _e.receive("ok",()=>j()).receive("timeout",()=>j()),_e.send(),this.canPush()||_e.trigger("ok",{}),_e}onMessage(a,j,_e){return j}isMember(a,j,_e,et){return this.topic!==a?!1:et&&et!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:a,event:j,payload:_e,joinRef:et}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(a=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=CHANNEL_STATES.joining,this.joinPush.resend(a))}trigger(a,j,_e,et){let nt=this.onMessage(a,j,_e,et);if(j&&!nt)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let tt=this.bindings.filter(ot=>ot.event===a);for(let ot=0;ot<tt.length;ot++)tt[ot].callback(nt,_e,et||this.joinRef())}replyEventName(a){return`chan_reply_${a}`}isClosed(){return this.state===CHANNEL_STATES.closed}isErrored(){return this.state===CHANNEL_STATES.errored}isJoined(){return this.state===CHANNEL_STATES.joined}isJoining(){return this.state===CHANNEL_STATES.joining}isLeaving(){return this.state===CHANNEL_STATES.leaving}},Ajax=class{static request(a,j,_e,et,nt,tt,ot){if(global$1.XDomainRequest){let ct=new global$1.XDomainRequest;return this.xdomainRequest(ct,a,j,et,nt,tt,ot)}else{let ct=new global$1.XMLHttpRequest;return this.xhrRequest(ct,a,j,_e,et,nt,tt,ot)}}static xdomainRequest(a,j,_e,et,nt,tt,ot){return a.timeout=nt,a.open(j,_e),a.onload=()=>{let ct=this.parseJSON(a.responseText);ot&&ot(ct)},tt&&(a.ontimeout=tt),a.onprogress=()=>{},a.send(et),a}static xhrRequest(a,j,_e,et,nt,tt,ot,ct){return a.open(j,_e,!0),a.timeout=tt,a.setRequestHeader("Content-Type",et),a.onerror=()=>ct&&ct(null),a.onreadystatechange=()=>{if(a.readyState===XHR_STATES.complete&&ct){let ft=this.parseJSON(a.responseText);ct(ft)}},ot&&(a.ontimeout=ot),a.send(nt),a}static parseJSON(a){if(!a||a==="")return null;try{return JSON.parse(a)}catch{return console&&console.log("failed to parse JSON response",a),null}}static serialize(a,j){let _e=[];for(var et in a){if(!Object.prototype.hasOwnProperty.call(a,et))continue;let nt=j?`${j}[${et}]`:et,tt=a[et];typeof tt=="object"?_e.push(this.serialize(tt,nt)):_e.push(encodeURIComponent(nt)+"="+encodeURIComponent(tt))}return _e.join("&")}static appendParams(a,j){if(Object.keys(j).length===0)return a;let _e=a.match(/\?/)?"&":"?";return`${a}${_e}${this.serialize(j)}`}},LongPoll=class{constructor(a){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(a),this.readyState=SOCKET_STATES.connecting,this.poll()}normalizeEndpoint(a){return a.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+TRANSPORTS.websocket),"$1/"+TRANSPORTS.longpoll)}endpointURL(){return Ajax.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(a,j,_e){this.close(a,j,_e),this.readyState=SOCKET_STATES.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===SOCKET_STATES.open||this.readyState===SOCKET_STATES.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),a=>{if(a){var{status:j,token:_e,messages:et}=a;this.token=_e}else j=0;switch(j){case 200:et.forEach(nt=>{setTimeout(()=>this.onmessage({data:nt}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=SOCKET_STATES.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${j}`)}})}send(a){this.currentBatch?this.currentBatch.push(a):this.awaitingBatchAck?this.batchBuffer.push(a):(this.currentBatch=[a],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(a){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",a.join(`
471
- `),()=>this.onerror("timeout"),j=>{this.awaitingBatchAck=!1,!j||j.status!==200?(this.onerror(j&&j.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(a,j,_e){for(let nt of this.reqs)nt.abort();this.readyState=SOCKET_STATES.closed;let et=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:a,reason:j,wasClean:_e});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",et)):this.onclose(et)}ajax(a,j,_e,et,nt){let tt,ot=()=>{this.reqs.delete(tt),et()};tt=Ajax.request(a,this.endpointURL(),j,_e,this.timeout,ot,ct=>{this.reqs.delete(tt),this.isActive()&&nt(ct)}),this.reqs.add(tt)}},Presence=class{constructor(a,j={}){let _e=j.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=a,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(_e.state,et=>{let{onJoin:nt,onLeave:tt,onSync:ot}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Presence.syncState(this.state,et,nt,tt),this.pendingDiffs.forEach(ct=>{this.state=Presence.syncDiff(this.state,ct,nt,tt)}),this.pendingDiffs=[],ot()}),this.channel.on(_e.diff,et=>{let{onJoin:nt,onLeave:tt,onSync:ot}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(et):(this.state=Presence.syncDiff(this.state,et,nt,tt),ot())})}onJoin(a){this.caller.onJoin=a}onLeave(a){this.caller.onLeave=a}onSync(a){this.caller.onSync=a}list(a){return Presence.list(this.state,a)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(a,j,_e,et){let nt=this.clone(a),tt={},ot={};return this.map(nt,(ct,ft)=>{j[ct]||(ot[ct]=ft)}),this.map(j,(ct,ft)=>{let ht=nt[ct];if(ht){let dt=ft.metas.map(At=>At.phx_ref),yt=ht.metas.map(At=>At.phx_ref),Tt=ft.metas.filter(At=>yt.indexOf(At.phx_ref)<0),St=ht.metas.filter(At=>dt.indexOf(At.phx_ref)<0);Tt.length>0&&(tt[ct]=ft,tt[ct].metas=Tt),St.length>0&&(ot[ct]=this.clone(ht),ot[ct].metas=St)}else tt[ct]=ft}),this.syncDiff(nt,{joins:tt,leaves:ot},_e,et)}static syncDiff(a,j,_e,et){let{joins:nt,leaves:tt}=this.clone(j);return _e||(_e=function(){}),et||(et=function(){}),this.map(nt,(ot,ct)=>{let ft=a[ot];if(a[ot]=this.clone(ct),ft){let ht=a[ot].metas.map(yt=>yt.phx_ref),dt=ft.metas.filter(yt=>ht.indexOf(yt.phx_ref)<0);a[ot].metas.unshift(...dt)}_e(ot,ft,ct)}),this.map(tt,(ot,ct)=>{let ft=a[ot];if(!ft)return;let ht=ct.metas.map(dt=>dt.phx_ref);ft.metas=ft.metas.filter(dt=>ht.indexOf(dt.phx_ref)<0),et(ot,ft,ct),ft.metas.length===0&&delete a[ot]}),a}static list(a,j){return j||(j=function(_e,et){return et}),this.map(a,(_e,et)=>j(_e,et))}static map(a,j){return Object.getOwnPropertyNames(a).map(_e=>j(_e,a[_e]))}static clone(a){return JSON.parse(JSON.stringify(a))}},serializer_default={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(a,j){if(a.payload.constructor===ArrayBuffer)return j(this.binaryEncode(a));{let _e=[a.join_ref,a.ref,a.topic,a.event,a.payload];return j(JSON.stringify(_e))}},decode(a,j){if(a.constructor===ArrayBuffer)return j(this.binaryDecode(a));{let[_e,et,nt,tt,ot]=JSON.parse(a);return j({join_ref:_e,ref:et,topic:nt,event:tt,payload:ot})}},binaryEncode(a){let{join_ref:j,ref:_e,event:et,topic:nt,payload:tt}=a,ot=this.META_LENGTH+j.length+_e.length+nt.length+et.length,ct=new ArrayBuffer(this.HEADER_LENGTH+ot),ft=new DataView(ct),ht=0;ft.setUint8(ht++,this.KINDS.push),ft.setUint8(ht++,j.length),ft.setUint8(ht++,_e.length),ft.setUint8(ht++,nt.length),ft.setUint8(ht++,et.length),Array.from(j,yt=>ft.setUint8(ht++,yt.charCodeAt(0))),Array.from(_e,yt=>ft.setUint8(ht++,yt.charCodeAt(0))),Array.from(nt,yt=>ft.setUint8(ht++,yt.charCodeAt(0))),Array.from(et,yt=>ft.setUint8(ht++,yt.charCodeAt(0)));var dt=new Uint8Array(ct.byteLength+tt.byteLength);return dt.set(new Uint8Array(ct),0),dt.set(new Uint8Array(tt),ct.byteLength),dt.buffer},binaryDecode(a){let j=new DataView(a),_e=j.getUint8(0),et=new TextDecoder;switch(_e){case this.KINDS.push:return this.decodePush(a,j,et);case this.KINDS.reply:return this.decodeReply(a,j,et);case this.KINDS.broadcast:return this.decodeBroadcast(a,j,et)}},decodePush(a,j,_e){let et=j.getUint8(1),nt=j.getUint8(2),tt=j.getUint8(3),ot=this.HEADER_LENGTH+this.META_LENGTH-1,ct=_e.decode(a.slice(ot,ot+et));ot=ot+et;let ft=_e.decode(a.slice(ot,ot+nt));ot=ot+nt;let ht=_e.decode(a.slice(ot,ot+tt));ot=ot+tt;let dt=a.slice(ot,a.byteLength);return{join_ref:ct,ref:null,topic:ft,event:ht,payload:dt}},decodeReply(a,j,_e){let et=j.getUint8(1),nt=j.getUint8(2),tt=j.getUint8(3),ot=j.getUint8(4),ct=this.HEADER_LENGTH+this.META_LENGTH,ft=_e.decode(a.slice(ct,ct+et));ct=ct+et;let ht=_e.decode(a.slice(ct,ct+nt));ct=ct+nt;let dt=_e.decode(a.slice(ct,ct+tt));ct=ct+tt;let yt=_e.decode(a.slice(ct,ct+ot));ct=ct+ot;let Tt=a.slice(ct,a.byteLength),St={status:yt,response:Tt};return{join_ref:ft,ref:ht,topic:dt,event:CHANNEL_EVENTS.reply,payload:St}},decodeBroadcast(a,j,_e){let et=j.getUint8(1),nt=j.getUint8(2),tt=this.HEADER_LENGTH+2,ot=_e.decode(a.slice(tt,tt+et));tt=tt+et;let ct=_e.decode(a.slice(tt,tt+nt));tt=tt+nt;let ft=a.slice(tt,a.byteLength);return{join_ref:null,ref:null,topic:ot,event:ct,payload:ft}}},Socket$1=class{constructor(j,_e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=_e.timeout||DEFAULT_TIMEOUT,this.transport=_e.transport||global$1.WebSocket||LongPoll,this.establishedConnections=0,this.defaultEncoder=serializer_default.encode.bind(serializer_default),this.defaultDecoder=serializer_default.decode.bind(serializer_default),this.closeWasClean=!1,this.binaryType=_e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==LongPoll?(this.encode=_e.encode||this.defaultEncoder,this.decode=_e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let et=null;phxWindow&&phxWindow.addEventListener&&(phxWindow.addEventListener("pagehide",nt=>{this.conn&&(this.disconnect(),et=this.connectClock)}),phxWindow.addEventListener("pageshow",nt=>{et===this.connectClock&&(et=null,this.connect())})),this.heartbeatIntervalMs=_e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=nt=>_e.rejoinAfterMs?_e.rejoinAfterMs(nt):[1e3,2e3,5e3][nt-1]||1e4,this.reconnectAfterMs=nt=>_e.reconnectAfterMs?_e.reconnectAfterMs(nt):[10,50,100,150,200,250,500,1e3,2e3][nt-1]||5e3,this.logger=_e.logger||null,this.longpollerTimeout=_e.longpollerTimeout||2e4,this.params=closure(_e.params||{}),this.endPoint=`${j}/${TRANSPORTS.websocket}`,this.vsn=_e.vsn||DEFAULT_VSN,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Timer(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return LongPoll}replaceTransport(j){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.sendBuffer=[],this.conn&&(this.conn.close(),this.conn=null),this.transport=j}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let j=Ajax.appendParams(Ajax.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return j.charAt(0)!=="/"?j:j.charAt(1)==="/"?`${this.protocol()}:${j}`:`${this.protocol()}://${location.host}${j}`}disconnect(j,_e,et){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(j,_e,et)}connect(j){j&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=closure(j)),!this.conn&&(this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=_e=>this.onConnError(_e),this.conn.onmessage=_e=>this.onConnMessage(_e),this.conn.onclose=_e=>this.onConnClose(_e))}log(j,_e,et){this.logger(j,_e,et)}hasLogger(){return this.logger!==null}onOpen(j){let _e=this.makeRef();return this.stateChangeCallbacks.open.push([_e,j]),_e}onClose(j){let _e=this.makeRef();return this.stateChangeCallbacks.close.push([_e,j]),_e}onError(j){let _e=this.makeRef();return this.stateChangeCallbacks.error.push([_e,j]),_e}onMessage(j){let _e=this.makeRef();return this.stateChangeCallbacks.message.push([_e,j]),_e}ping(j){if(!this.isConnected())return!1;let _e=this.makeRef(),et=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:_e});let nt=this.onMessage(tt=>{tt.ref===_e&&(this.off([nt]),j(Date.now()-et))});return!0}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,j])=>j())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),WS_CLOSE_NORMAL,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(j,_e,et){if(!this.conn)return j&&j();this.waitForBufferDone(()=>{this.conn&&(_e?this.conn.close(_e,et||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),j&&j()})})}waitForBufferDone(j,_e=1){if(_e===5||!this.conn||!this.conn.bufferedAmount){j();return}setTimeout(()=>{this.waitForBufferDone(j,_e+1)},150*_e)}waitForSocketClosed(j,_e=1){if(_e===5||!this.conn||this.conn.readyState===SOCKET_STATES.closed){j();return}setTimeout(()=>{this.waitForSocketClosed(j,_e+1)},150*_e)}onConnClose(j){let _e=j&&j.code;this.hasLogger()&&this.log("transport","close",j),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&_e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,et])=>et(j))}onConnError(j){this.hasLogger()&&this.log("transport",j);let _e=this.transport,et=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,nt])=>{nt(j,_e,et)}),(_e===this.transport||et>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(j=>{j.isErrored()||j.isLeaving()||j.isClosed()||j.trigger(CHANNEL_EVENTS.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case SOCKET_STATES.connecting:return"connecting";case SOCKET_STATES.open:return"open";case SOCKET_STATES.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(j){this.off(j.stateChangeRefs),this.channels=this.channels.filter(_e=>_e.joinRef()!==j.joinRef())}off(j){for(let _e in this.stateChangeCallbacks)this.stateChangeCallbacks[_e]=this.stateChangeCallbacks[_e].filter(([et])=>j.indexOf(et)===-1)}channel(j,_e={}){let et=new Channel(j,_e,this);return this.channels.push(et),et}push(j){if(this.hasLogger()){let{topic:_e,event:et,payload:nt,ref:tt,join_ref:ot}=j;this.log("push",`${_e} ${et} (${ot}, ${tt})`,nt)}this.isConnected()?this.encode(j,_e=>this.conn.send(_e)):this.sendBuffer.push(()=>this.encode(j,_e=>this.conn.send(_e)))}makeRef(){let j=this.ref+1;return j===this.ref?this.ref=0:this.ref=j,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(j=>j()),this.sendBuffer=[])}onConnMessage(j){this.decode(j.data,_e=>{let{topic:et,event:nt,payload:tt,ref:ot,join_ref:ct}=_e;ot&&ot===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${tt.status||""} ${et} ${nt} ${ot&&"("+ot+")"||""}`,tt);for(let ft=0;ft<this.channels.length;ft++){const ht=this.channels[ft];ht.isMember(et,nt,tt,ct)&&ht.trigger(nt,tt,ot,ct)}for(let ft=0;ft<this.stateChangeCallbacks.message.length;ft++){let[,ht]=this.stateChangeCallbacks.message[ft];ht(_e)}})}leaveOpenTopic(j){let _e=this.channels.find(et=>et.topic===j&&(et.isJoined()||et.isJoining()));_e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${j}"`),_e.leave())}},browser$5={exports:{}},s=1e3,m=s*60,h=m*60,d=h*24,w=d*7,y=d*365.25,ms=function(a,j){j=j||{};var _e=typeof a;if(_e==="string"&&a.length>0)return parse$e(a);if(_e==="number"&&isFinite(a))return j.long?fmtLong(a):fmtShort(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function parse$e(a){if(a=String(a),!(a.length>100)){var j=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(j){var _e=parseFloat(j[1]),et=(j[2]||"ms").toLowerCase();switch(et){case"years":case"year":case"yrs":case"yr":case"y":return _e*y;case"weeks":case"week":case"w":return _e*w;case"days":case"day":case"d":return _e*d;case"hours":case"hour":case"hrs":case"hr":case"h":return _e*h;case"minutes":case"minute":case"mins":case"min":case"m":return _e*m;case"seconds":case"second":case"secs":case"sec":case"s":return _e*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return _e;default:return}}}}function fmtShort(a){var j=Math.abs(a);return j>=d?Math.round(a/d)+"d":j>=h?Math.round(a/h)+"h":j>=m?Math.round(a/m)+"m":j>=s?Math.round(a/s)+"s":a+"ms"}function fmtLong(a){var j=Math.abs(a);return j>=d?plural(a,j,d,"day"):j>=h?plural(a,j,h,"hour"):j>=m?plural(a,j,m,"minute"):j>=s?plural(a,j,s,"second"):a+" ms"}function plural(a,j,_e,et){var nt=j>=_e*1.5;return Math.round(a/_e)+" "+et+(nt?"s":"")}const ms$1=getDefaultExportFromCjs$1(ms);function setup(a){_e.debug=_e,_e.default=_e,_e.coerce=ft,_e.disable=tt,_e.enable=nt,_e.enabled=ot,_e.humanize=ms,_e.destroy=ht,Object.keys(a).forEach(dt=>{_e[dt]=a[dt]}),_e.names=[],_e.skips=[],_e.formatters={};function j(dt){let yt=0;for(let Tt=0;Tt<dt.length;Tt++)yt=(yt<<5)-yt+dt.charCodeAt(Tt),yt|=0;return _e.colors[Math.abs(yt)%_e.colors.length]}_e.selectColor=j;function _e(dt){let yt,Tt=null,St,At;function Rt(...It){if(!Rt.enabled)return;const Ct=Rt,kt=Number(new Date),Pt=kt-(yt||kt);Ct.diff=Pt,Ct.prev=yt,Ct.curr=kt,yt=kt,It[0]=_e.coerce(It[0]),typeof It[0]!="string"&&It.unshift("%O");let Bt=0;It[0]=It[0].replace(/%([a-zA-Z%])/g,(jt,zt)=>{if(jt==="%%")return"%";Bt++;const Gt=_e.formatters[zt];if(typeof Gt=="function"){const tn=It[Bt];jt=Gt.call(Ct,tn),It.splice(Bt,1),Bt--}return jt}),_e.formatArgs.call(Ct,It),(Ct.log||_e.log).apply(Ct,It)}return Rt.namespace=dt,Rt.useColors=_e.useColors(),Rt.color=_e.selectColor(dt),Rt.extend=et,Rt.destroy=_e.destroy,Object.defineProperty(Rt,"enabled",{enumerable:!0,configurable:!1,get:()=>Tt!==null?Tt:(St!==_e.namespaces&&(St=_e.namespaces,At=_e.enabled(dt)),At),set:It=>{Tt=It}}),typeof _e.init=="function"&&_e.init(Rt),Rt}function et(dt,yt){const Tt=_e(this.namespace+(typeof yt>"u"?":":yt)+dt);return Tt.log=this.log,Tt}function nt(dt){_e.save(dt),_e.namespaces=dt,_e.names=[],_e.skips=[];let yt;const Tt=(typeof dt=="string"?dt:"").split(/[\s,]+/),St=Tt.length;for(yt=0;yt<St;yt++)Tt[yt]&&(dt=Tt[yt].replace(/\*/g,".*?"),dt[0]==="-"?_e.skips.push(new RegExp("^"+dt.slice(1)+"$")):_e.names.push(new RegExp("^"+dt+"$")))}function tt(){const dt=[..._e.names.map(ct),..._e.skips.map(ct).map(yt=>"-"+yt)].join(",");return _e.enable(""),dt}function ot(dt){if(dt[dt.length-1]==="*")return!0;let yt,Tt;for(yt=0,Tt=_e.skips.length;yt<Tt;yt++)if(_e.skips[yt].test(dt))return!1;for(yt=0,Tt=_e.names.length;yt<Tt;yt++)if(_e.names[yt].test(dt))return!0;return!1}function ct(dt){return dt.toString().substring(2,dt.toString().length-2).replace(/\.\*\?$/,"*")}function ft(dt){return dt instanceof Error?dt.stack||dt.message:dt}function ht(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return _e.enable(_e.load()),_e}var common$1=setup;(function(a,j){var _e={};j.formatArgs=nt,j.save=tt,j.load=ot,j.useColors=et,j.storage=ct(),j.destroy=(()=>{let ht=!1;return()=>{ht||(ht=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),j.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function et(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let ht;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(ht=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(ht[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function nt(ht){if(ht[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+ht[0]+(this.useColors?"%c ":" ")+"+"+a.exports.humanize(this.diff),!this.useColors)return;const dt="color: "+this.color;ht.splice(1,0,dt,"color: inherit");let yt=0,Tt=0;ht[0].replace(/%[a-zA-Z%]/g,St=>{St!=="%%"&&(yt++,St==="%c"&&(Tt=yt))}),ht.splice(Tt,0,dt)}j.log=console.debug||console.log||(()=>{});function tt(ht){try{ht?j.storage.setItem("debug",ht):j.storage.removeItem("debug")}catch{}}function ot(){let ht;try{ht=j.storage.getItem("debug")}catch{}return!ht&&typeof process$1$1<"u"&&"env"in process$1$1&&(ht=_e.DEBUG),ht}function ct(){try{return localStorage}catch{}}a.exports=common$1(j);const{formatters:ft}=a.exports;ft.j=function(ht){try{return JSON.stringify(ht)}catch(dt){return"[UnexpectedJSONParseError]: "+dt.message}}})(browser$5,browser$5.exports);var browserExports=browser$5.exports;const debug$4=browserExports;var logger=(a,j=!1)=>{const _e=debug$4(["@arcblock/ws",a].join(":"));return{debug:_e,warn:_e,info:_e,trace:j?_e:console.error,error:j?_e:console.error}};const createLogger=logger;var base$2=(a,j,_e)=>class extends a{constructor(nt,tt={}){super(nt,{transport:_e,...tt}),this._logger=createLogger("client",tt.silent),this.emitter=new j,this.onOpen(()=>{this._logger.debug("socket open",nt)}),this.onClose(()=>{this._logger.debug("socket close",nt)}),this.onError(ot=>{this._logger.error("socket error",ot.error)}),this.onMessage(ot=>{this._logger.debug("socket message",ot)})}on(nt,tt,ot={}){this.ensureJoinChannel(nt,ot),this.emitter.on(nt,tt)}off(nt,tt){tt?this.emitter.off(nt,tt):this.emitter.removeAllListeners(nt),this.ensureLeaveChannel(nt)}disconnect(nt,tt,ot){this.emitter.eventNames().forEach(ct=>{this.emitter.removeAllListeners(ct)}),super.disconnect(nt,tt,ot)}ensureJoinChannel(nt,tt={}){if(this.emitter.listenerCount(nt)>0)return;const ct=this.channel(nt,tt);ct.join().receive("ok",ft=>{this._logger.debug("join success",{topic:nt,message:ft})}).receive("error",ft=>{this._logger.error("join error",{topic:nt,error:ft})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:nt})}),ct.on(nt,({status:ft,response:ht})=>{ft==="ok"?this.emitter.emit(nt,ht):this._logger.debug("response error",{topic:nt,status:ft,data:ht})})}ensureLeaveChannel(nt){if(this.emitter.listenerCount(nt)>0)return;const ot=this.channels.find(ct=>ct.topic===nt);ot&&(this.remove(ot),ot.leave().receive("ok",ct=>{this._logger.debug("leave success",{topic:nt,message:ct})}).receive("error",ct=>{this._logger.error("leave error",{topic:nt,err:ct})}).receive("timeout",()=>{this._logger.debug("leave timeout",{topic:nt})}),ot.off(nt))}subscribe(nt,tt={}){let ot=this.channels.find(ct=>ct.topic===nt);return ot||(ot=this.channel(nt,tt),ot.join().receive("ok",ct=>{this._logger.debug("join success",{topic:nt,message:ct})}).receive("error",ct=>{this._logger.error("join error",{topic:nt,error:ct})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:nt})}),ot)}unsubscribe(nt){this.ensureLeaveChannel(nt)}};const EventEmitter$3=eventemitter3Exports,{Socket}=phoenix_cjs,createClient=base$2;var browser$4=createClient(Socket,EventEmitter$3);const WsClient$1=browser$4;var browser$3={WsClient:WsClient$1};function usePageShow(a){const j=reactExports.useRef(a);reactExports.useEffect(()=>{j.current=a},[a]),reactExports.useEffect(()=>{const _e=et=>{!document.hidden&&j.current&&j.current(et)};return document.addEventListener("visibilitychange",_e),()=>{document.removeEventListener("visibilitychange",_e)}},[])}function getSocketHost(a){const j=a||window.location.href;return new URL(j).host}function getExtraHeaders(a){const j={},_e=a||window.location.href;if(_e){const{hostname:et,protocol:nt,port:tt}=new URL(_e);j["x-real-hostname"]=et,j["x-real-port"]=tt,j["x-real-protocol"]=nt.endsWith(":")?nt.substring(0,nt.length-1):nt}return j}const fns={};function createTokenFn({action:a,prefix:j,checkFn:_e,extraParams:et,baseUrl:nt}){const tt=`${j}/token?${stringifyQuery$1(et)}`;return fns[tt]||(fns[tt]=async function(){var yt,Tt;const ct=+new Date,ft=await _e(tt,{headers:getExtraHeaders(nt)}),ht=+new Date;if(ht-ct<500&&await sleep$1(500-(ht-ct)),(yt=ft==null?void 0:ft.data)!=null&&yt.token)return ft.data;if((Tt=ft==null?void 0:ft.data)!=null&&Tt.error)throw new Error(ft.data.error);const dt=isUrl(j)?j:`${nt}${j}`;throw new Error(`Error generating ${a} qrcode from: ${dt}`)}),fns[tt]}const parseExistingSession=()=>{try{const j=new URL(window.location.href).searchParams.get("__connect_url__");if(!j)return null;const _e=decodeConnectUrl(j);return{token:parseTokenFromConnectUrl(_e),url:_e}}catch(a){return{error:a}}},getAppId=()=>get$6(globalThis,"blocklet.appPid")||get$6(globalThis,"blocklet.appId")||get$6(globalThis,"env.appId")||"",getAppPrefix=()=>(get$6(globalThis,"env.apiPrefix")||"/").replace(/\/$/,"").replace(RELAY_SOCKET_PREFIX,""),getRelayChannel=a=>`relay:${getAppId()}:${a}`,getRelayProtocol=()=>window.location.protocol==="https:"?"wss:":"ws:",isSameOrigin=a=>!a||new URL(a).origin===window.location.origin,isSessionEnded=a=>["succeed","error","timeout","busy"].includes(a);function useToken({action:a,checkFn:j,checkInterval:_e,checkTimeout:et,extraParams:nt,locale:tt,prefix:ot,tokenKey:ct,encKey:ft,onError:ht,onSuccess:dt,baseUrl:yt,autoConnect:Tt=!0,forceConnected:St=!0,saveConnect:At=!0,useSocket:Rt=!0,provider:It="wallet"}){const Ct=useReactive({checking:!1,loading:!1,token:"",url:"",store:null,status:"created",error:"",checkCount:0,mfaCode:0,appInfo:null,memberAppInfo:null,connectedDid:"",saveConnect:!1,inExistingSession:!1,nextWorkflow:"",baseUrl:yt,prefix:`${ot}/${a}`,extraParams:omitBy$1(nt,isNil$1),checkFn:j,results:{},action:a,provider:It}),kt=reactExports.useRef(null),Pt=translations$3[tt]||translations$3.en,Bt=useCreation(()=>parseExistingSession(),[]),Kt=Math.ceil(et/_e),jt=useReactive({onSuccessCalled:!1,cancelWhenScannedCounter:0,isSocketAvailable:!1}),{encryptKey:zt,decrypt:Gt}=useSecurity(),tn=useBrowser(),hn=getVisitorId$2(),wt=reactExports.useRef(null),rt=reactExports.useRef(null),st={...Ct.extraParams,locale:tt,[ct]:Ct.token||(Bt==null?void 0:Bt.token),provider:Ct.provider},ut=async()=>{if(!(Bt!=null&&Bt.token&&(Bt==null?void 0:Bt.token)===Ct.token)){try{st[ct]&&Ct.status==="created"&&await Ct.checkFn(`${Ct.prefix}/timeout?${stringifyQuery$1(st)}`,{headers:getExtraHeaders(Ct.baseUrl)})}catch{}try{Ct.token&&rt.current&&(await wt.current.unsubscribe(getRelayChannel(Ct.token)),rt.current=null)}catch{}}},pt=useMemoizedFn((...Lt)=>{const Ht={[ft]:zt,...Ct.extraParams,locale:tt,forceConnected:St,autoConnect:Tt&&!tn.wallet&&!jt.cancelWhenScannedCounter&&["ios","android"].includes(Cookie.get("connected_wallet_os")),provider:Ct.provider};hn&&(Ht.visitorId=hn);const Ot=omit$1(kt.current||{},["sourceAppPid","verbose"]);return Object.keys(Ot).forEach(Ft=>{(!Ht[Ft]||Ft===ft&&Ot[Ft])&&(Ht[Ft]=Ot[Ft])}),Bt!=null&&Bt.token&&!Ht.sourceToken&&(Ht.sourceToken=Bt==null?void 0:Bt.token),createTokenFn({action:a,prefix:Ct.prefix,baseUrl:Ct.baseUrl,checkFn:Ct.checkFn,extraParams:Ht})(...Lt)}),mt=useMemoizedFn(async(Lt=!0)=>{Lt&&ut();try{Ct.loading=!0,Ct.token="",Ct.url="",Ct.store=null,Ct.extraParams=omitBy$1(nt,isNil$1),await sleep$1();const Ht=await pt(),Ot=Ht.extra||{};Ct.loading=!1,Ct.token=Ht.token,Ct.url=Ht.url,Ct.status="created",Ct.error="",Ct.checkCount=0,Ct.appInfo=Ht.appInfo,Ct.memberAppInfo=Ht.memberAppInfo,Ct.connectedDid=Ot.connectedDid,Ct.saveConnect=Ot.saveConnect}catch(Ht){Ct.loading=!1,Ct.status="error",Ct.error=`${Pt.generateError}: ${Ht.message}`}}),$t=()=>{jt.cancelWhenScannedCounter++};reactExports.useEffect(()=>{jt.cancelWhenScannedCounter>0&&(nt.nw?ht(new Error(Pt.retryForbidden)):mt())},[jt.cancelWhenScannedCounter]),reactExports.useEffect(()=>(Rt&&isSameOrigin(Ct.baseUrl)&&getAppId()?(!wt.current||wt.current.isConnected()===!1||wt.current.baseUrl!==Ct.baseUrl)&&(wt.current=new browser$3.WsClient(`${getRelayProtocol()}//${getSocketHost(Ct.baseUrl)}${getAppPrefix()}${RELAY_SOCKET_PREFIX}/relay`,{longpollerTimeout:5e3,heartbeatIntervalMs:30*1e3}),wt.current.baseUrl=Ct.baseUrl,wt.current.onOpen(()=>{jt.isSocketAvailable=!0}),wt.current.connect()):jt.isSocketAvailable&&(jt.isSocketAvailable=!1),()=>{wt.current&&(wt.current.disconnect(),wt.current=null)}),[Ct.baseUrl]);const xt=()=>!Ct.token||Ct.loading||isSessionEnded(Ct.status)?null:_e,vt=reactExports.useRef(null);reactExports.useEffect(()=>{vt.current={state:Ct,params:st}}),reactExports.useEffect(()=>()=>{const{state:Lt,params:Ht}=vt.current;Lt.status==="created"&&Ht[ct]&&Lt.checkFn(`${Lt.prefix}/timeout?${stringifyQuery$1(Ht)}`,{headers:getExtraHeaders(Lt.baseUrl)})},[]);const it=async(Lt=!1)=>{var Ht;if(Ct.checking||(Ct.status==="created"&&Ct.checkCount++,jt.isSocketAvailable&&!Lt))return null;try{Ct.checking=!0;const Ot=await Ct.checkFn(`${Ct.prefix}/status?${stringifyQuery$1(st)}`,{headers:getExtraHeaders(Ct.baseUrl)}),{status:Jt,error:Ft,mfaCode:Zt=0}=Ot.data;if(Ct.store=Ot.data,Ct.mfaCode=Zt,Ct.checking=!1,Ct.status=Jt,Jt==="error"&&Ft){const nn=new Error(Ft);throw nn.response=Ot,nn}return Ot.data}catch(Ot){const{response:Jt}=Ot;if(Jt!=null&&Jt.status){st[ct]&&Ct.checkFn(`${Ct.prefix}/timeout?${stringifyQuery$1(st)}`,{headers:getExtraHeaders(Ct.baseUrl)});const Ft=(Ht=Jt==null?void 0:Jt.data)!=null&&Ht.error?Jt.data.error:Ot.message,Zt=new Error(Ft);Zt.code=Jt.status,Ct.status="error",Ct.checking=!1,Ct.error=Ft,ht(Zt,Ct==null?void 0:Ct.store,Gt)}else Ct.status="error",Ct.checking=!1,Ct.error=Pt.generateError}return null},bt=async()=>{try{if(Bt.error)throw Bt.error;Ct.loading=!0,Ct.token=Bt.token,Ct.url=Bt.url,Ct.inExistingSession=!0;let Lt=await it();if((["scanned"].includes(Lt==null?void 0:Lt.status)||(Lt==null?void 0:Lt.sourceToken)===(Bt==null?void 0:Bt.token))&&(await mt(!1),Lt=await it()),kt.current=(Lt==null?void 0:Lt.extraParams)||null,Lt!=null&&Lt.status&&!["created"].includes(Lt==null?void 0:Lt.status))throw new Error(`${Pt.invalidSessionStatus} [${Lt.status}]`)}catch(Lt){Ct.status="error",Ct.error=Lt.message,ht(Lt,Ct==null?void 0:Ct.store,Gt)}finally{Ct.loading=!1}};reactExports.useEffect(()=>{var Lt;if(!Ct.token&&!Ct.store&&!Ct.loading&&!Ct.error)if(Bt)bt();else{mt(!1);return}if(Ct.status!=="timeout"&&Ct.checkCount>Kt){Ct.status="timeout",ut();return}if(Ct.status==="succeed"&&!jt.onSuccessCalled){const Ht=getConnectedInfo({...Ct.store,appInfo:Ct.appInfo,memberAppInfo:Ct.memberAppInfo});if(isSameOrigin(Ct.baseUrl)&&At&&Ct.saveConnect&&Ct.store.did&&updateConnectedInfo(Ht,!0),Ct.store){const{nextWorkflow:Ot}=Ct.store;if(Ot)try{const Jt=parseNextWorkflow(Ot,ct);Ct.nextWorkflow=(Jt==null?void 0:Jt.nextWorkflow)||Ot,Object.assign(Ct,Jt),Ct.store=null,Ct.error="",Ct.url="",Ct.appInfo=null,Ct.memberAppInfo=null,Ct.checkCount=0,Ct.status="scanned",Ct.results={...Ct.results,[Ct.token]:Ct.store},Ct.checkFn=createAxios({baseURL:Jt.baseUrl,timeout:8e3}).get,it()}catch(Jt){console.error(`Invalid nextWorkflow: ${Ot}`,Jt),Ct.status="error",Ct.error=`Invalid nextWorkflow: ${Ot}: ${Jt.message}`}else if(Ct.nextWorkflow&&(Ct.nextWorkflow="",Ct.url=""),typeof dt=="function"){const Jt=Object.values({...Ct.results,[Ct.token]:Ct.store});jt.onSuccessCalled=!0;const Ft=Jt.length>1?Jt:Jt[0],Zt=cloneDeep$1(Ft);dt(Zt,Gt,{sourceAppPid:nt==null?void 0:nt.sourceAppPid,...Ht})}}return}if((Lt=Ct.store)!=null&&Lt.nextWorkflow){const{nextWorkflow:Ht}=Ct.store;try{const Ot=parseNextWorkflow(Ht,ct);Ct.nextWorkflow=(Ot==null?void 0:Ot.nextWorkflow)||Ht,Object.assign(Ct,Ot),Ct.store=null,Ct.error="",Ct.url="",Ct.appInfo=null,Ct.memberAppInfo=null,Ct.checkCount=0,Ct.status="scanned",Ct.results={...Ct.results,[Ct.token]:Ct.store},Ct.checkFn=createAxios({baseURL:Ot.baseUrl,timeout:8e3}).get,it()}catch(Ot){console.error(`Invalid nextWorkflow: ${Ht}`,Ot),Ct.status="error",Ct.error=`Invalid nextWorkflow: ${Ht}: ${Ot.message}`}}});const Mt=reactExports.useRef(0);return reactExports.useEffect(()=>{if(Ct.token&&jt.isSocketAvailable&&wt.current){let Lt=!1;rt.current?rt.current.token!==Ct.token&&(wt.current.unsubscribe(getRelayChannel(rt.current.token)),Lt=!0):Lt=!0,Lt&&(rt.current=wt.current.subscribe(getRelayChannel(Ct.token)),Mt.current=0,rt.current.token=Ct.token,rt.current.on("updated",({response:Ht})=>{const Ot=+new Date(Ht.updatedAt);if(Ot<=Mt.current){console.warn("Ignore outdated message",Ht);return}Mt.current=Ot;let{status:Jt,error:Ft}=Ht;Jt==="forbidden"&&(Ft=Pt.forbidden,Jt="error"),Ct.status=Jt,Ct.mfaCode=Ht.mfaCode||0,Ct.store=Ht,Ct.error=Ft,Ft&&ht(new Error(Ft),Ct==null?void 0:Ct.store,Gt)}))}},[Ct.token,jt.isSocketAvailable,wt.current]),useInterval(it,xt()),usePageShow(()=>{jt.isSocketAvailable&&Ct.token&&isSessionEnded(Ct.status)===!1&&it(!0)}),{state:Ct,generate:mt,cancelWhenScanned:$t}}var lib$3={},dsbridge={};Object.defineProperty(dsbridge,"__esModule",{value:!0});dsbridge.default=void 0;var bridge={call:function a(j,_e,et){var nt="";typeof _e=="function"&&(et=_e,_e={});var tt={data:_e===void 0?null:_e};if(typeof et=="function"){var ot="dscb"+window.dscb++;window[ot]=et,tt._dscbstub=ot}return tt=JSON.stringify(tt),window._dsbridge?nt=_dsbridge.call(j,tt):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(nt=prompt("_dsbridge="+j,tt)),JSON.parse(nt||"{}").data},register:function a(j,_e,et){var nt=et?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){bridge.call("_dsb.dsinit")},0)),typeof _e=="object"?nt._obs[j]=_e:nt[j]=_e},registerAsyn:function a(j,_e){this.register(j,_e,!0)},hasNativeMethod:function a(j,_e){return this.call("_dsb.hasNativeMethod",{name:j,type:_e||"all"})},disableJavascriptDialogBlock:function a(j){this.call("_dsb.disableJavascriptDialogBlock",{disable:j!==!1})}};(function(){if(!(window._dsbridge||window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)||window._dsf)return;const a=window.close;var j={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:bridge,close:function(){bridge.call("_dsb.closePage"),a()},_handleMessageFromNative:function(nt){var tt=JSON.parse(nt.data),ot={id:nt.callbackId,complete:!0},ct=this._dsf[nt.method],ft=this._dsaf[nt.method],ht=function(kt,Pt){ot.data=kt.apply(Pt,tt),bridge.call("_dsb.returnValue",ot)},dt=function(kt,Pt){tt.push(function(Bt,Kt){ot.data=Bt,ot.complete=Kt!==!1,bridge.call("_dsb.returnValue",ot)}),kt.apply(Pt,tt)};if(ct)ht(ct,this._dsf);else if(ft)dt(ft,this._dsaf);else{var yt=nt.method.split(".");if(yt.length<2)return;var Tt=yt.pop(),St=yt.join("."),At=this._dsf._obs,Rt=At[St]||{},It=Rt[Tt];if(It&&typeof It=="function"){ht(It,Rt);return}if(At=this._dsaf._obs,Rt=At[St]||{},It=Rt[Tt],It&&typeof It=="function"){dt(It,Rt);return}}}};for(var _e in j)window[_e]=j[_e];bridge.register("_hasJavascriptMethod",function(et,nt){var tt=et.split(".");if(tt.length<2)return!!(_dsf[tt]||_dsaf[tt]);var et=tt.pop(),ot=tt.join("."),ct=_dsf._obs[ot]||_dsaf._obs[ot];return ct&&!!ct[et]})})();dsbridge.default=bridge;Object.defineProperty(lib$3,"__esModule",{value:!0});var default_1$3=lib$3.default=void 0,_dsbridge$1=_interopRequireDefault$3(dsbridge);function _interopRequireDefault$3(a){return a&&a.__esModule?a:{default:a}}default_1$3=lib$3.default={call(){_dsbridge$1.default.call(...arguments)},asyncCall(){for(var a=arguments.length,j=new Array(a),_e=0;_e<a;_e++)j[_e]=arguments[_e];return new Promise((et,nt)=>{_dsbridge$1.default.call(...j,tt=>{try{const ot=JSON.parse(tt);if(ot.code===0){const ct=JSON.parse(ot.data);et(ct)}else nt(new Error(ot.error))}catch{et(tt)}})})},shareMessage(a){const{content:j,imgUrl:_e,success:et,fail:nt}=a;if(!j&&!_e){nt("params error");return}_dsbridge$1.default.call("arcShare",JSON.stringify({content:j,imgUrl:_e}),tt=>{const ot=JSON.parse(tt);ot&&ot.code===0?typeof et=="function"&&et(tt):typeof nt=="function"&&nt(tt)})},showLoading(){_dsbridge$1.default.call("arcShowLoading")},hideLoading(){_dsbridge$1.default.call("arcHideLoading")},showToast(a){a&&typeof a=="string"&&_dsbridge$1.default.call("arcToast",a)},chooseImgs(a){const{limit:j,success:_e,fail:et}=a;_dsbridge$1.default.call("arcChooseImgs",JSON.stringify({limit:j}),nt=>{const tt=JSON.parse(nt);tt&&tt.code===0?typeof _e=="function"&&_e(nt):typeof et=="function"&&et(nt)})},previewImgs(a){const{imgs:j}=a;!j||j.length===0||_dsbridge$1.default.call("arcPreviewImgs",JSON.stringify(a))},isSetPWD(a){const{success:j,fail:_e}=a;_dsbridge$1.default.call("arcIsSetPWD","",et=>{const nt=JSON.parse(et);nt&&nt.code===0?typeof j=="function"&&j(et):typeof _e=="function"&&_e(et)})},isCodeABOk(a){const{success:j,fail:_e}=a;_dsbridge$1.default.call("arcIsCodeABOk","",et=>{const nt=JSON.parse(et);nt&&nt.code===0?typeof j=="function"&&j(et):typeof _e=="function"&&_e(et)})}};function WebviewLoginItem({tokenState:a,locale:j,tokenKey:_e}){const{t:et,isWalletWebview:nt,connectState:tt}=useStateContext(),ot=et(nt?"openDidConnect":"openInWallet"),ct=useCreation(()=>{if(!a.url)return"";const dt=new URL(window.location.href);dt.searchParams.set("tokenKey",a.token);const yt=new URL(a.url);return yt.searchParams.set("callback",encodeURIComponent(dt)),yt.searchParams.set("callback_delay",1500),yt.searchParams.set("locale",j),yt.href.replace(/^https?:\/\//,"abt://")},[_e,a.token]),ft=useMemoizedFn(()=>{default_1$3.call("authAction",{action:"auth",deepLink:ct})}),ht={};return nt||(ht.component="a",ht.href=ct),useMount(()=>{tt.autoActiveWebview&&ct&&(tt.autoActiveWebview=!1,ft())}),jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",backgroundColor:colors$1.surfacePrimarySubtitle,textDecoration:"none",color:"inherit"},...ht,onClick:nt?ft:noop$7,children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(default_1$4,{width:"24px",height:"24px"}),jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"14px",fontWeight:500},children:ot})]}),jsxRuntimeExports.jsx(Icon,{icon:data$p,fontSize:"1.3rem",color:colors$1.primaryBase})]})}WebviewLoginItem.propTypes={tokenState:PropTypes.object.isRequired,locale:PropTypes.string,tokenKey:PropTypes.string};WebviewLoginItem.defaultProps={locale:"en",tokenKey:"_t_"};const data$c={width:24,height:24,body:'<path fill="currentColor" d="M12 20q-3.35 0-5.675-2.325T4 12q0-3.35 2.325-5.675T12 4q1.725 0 3.3.712T18 6.75V5q0-.425.288-.713T19 4q.425 0 .713.288T20 5v5q0 .425-.288.713T19 11h-5q-.425 0-.713-.288T13 10q0-.425.288-.713T14 9h3.2q-.8-1.4-2.188-2.2T12 6Q9.5 6 7.75 7.75T6 12q0 2.5 1.75 4.25T12 18q1.7 0 3.113-.863t2.187-2.312q.2-.35.563-.487t.737-.013q.4.125.575.525t-.025.75q-1.025 2-2.925 3.2T12 20Z"/>'};function RefreshOverlay({onRefresh:a,...j}){const _e=et=>{et.stopPropagation(),a()};return jsxRuntimeExports.jsx(Box,{...j,onClick:_e,sx:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.75)",cursor:"pointer",...j.sx},children:jsxRuntimeExports.jsx(Box,{sx:{backgroundColor:colors$1.foregroundsFgInteractive,borderRadius:"100%",fontSize:0},children:jsxRuntimeExports.jsx(Icon,{icon:data$c,fontSize:52,style:{transform:"scale(0.7)",color:"white"}})})})}RefreshOverlay.propTypes={onRefresh:PropTypes.func.isRequired};const busyStatusList=["scanned","succeed","error","busy"];function DIDWalletConnect({onSuccess:a,onError:j,action:_e,prefix:et,checkFn:nt,checkInterval:tt,checkTimeout:ot,locale:ct,tokenKey:ft,encKey:ht,baseUrl:dt,autoConnect:yt,forceConnected:Tt,saveConnect:St,useSocket:At,allowWallet:Rt,provider:It,webWalletUrl:Ct,onRecreateSession:kt,onClose:Pt,messages:Bt,enabledConnectTypes:Kt}){var dn,Mn,yn,An;if(typeof nt!="function")throw new Error("Cannot initialize did connect component without a fetchFn");const jt=reactExports.useContext(SessionContext$1),{connectState:zt,extraParams:Gt,staticState:tn,changeStatus:hn,isWalletWebview:wt,matchSmallScreen:rt,t:st}=useStateContext(),ut=useBrowser(),pt=detectWalletExtension(),{setBaseUrl:mt,oauthState:$t,getOAuthConfigList:xt}=useOAuth(),vt=useCreation(()=>{var Tn;return It||(Gt==null?void 0:Gt.provider)||((Tn=jt==null?void 0:jt.session)==null?void 0:Tn.provider)||"wallet"},[Gt==null?void 0:Gt.provider,(dn=jt==null?void 0:jt.session)==null?void 0:dn.provider]),it=getWalletDid((Mn=jt==null?void 0:jt.session)==null?void 0:Mn.user);reactExports.useEffect(()=>{mt(dt)},[dt]);const{state:bt,generate:Mt,cancelWhenScanned:Lt}=useToken({action:_e,baseUrl:dt,checkFn:nt,checkInterval:tt,checkTimeout:ot,extraParams:Gt,prefix:et,onError:j,onSuccess:a,locale:ct,tokenKey:ft,encKey:ht,autoConnect:yt,forceConnected:Tt===!0?it||!0:Tt,saveConnect:St,useSocket:At,allowWallet:Rt,provider:vt}),[Ht,Ot]=reactExports.useState([]);useAsyncEffect(async()=>{const Tn=await xt({sourceAppPid:zt==null?void 0:zt.sourceAppPid});Ot(Tn)},[zt==null?void 0:zt.sourceAppPid]);const Jt=usePrevious(zt==null?void 0:zt.sourceAppPid);useUpdateEffect(()=>{isUndefined$2(Jt)||Mt()},[zt==null?void 0:zt.sourceAppPid]);const Ft=useCreation(()=>busyStatusList.includes($t.status)||busyStatusList.includes(bt.status),[bt.status,$t.status]);reactExports.useEffect(()=>{busyStatusList.includes($t.status)?hn($t.status):busyStatusList.includes(bt.status)?hn(bt.status):hn("created")},[hn,bt.status,$t.status]);const Zt=useMemoizedFn(()=>{kt(),$t.reset(),Mt(!1)}),nn=useMemoizedFn(()=>{kt(),tn.current.cancelCount++,Lt()}),cn=useCreation(()=>({confirm:Bt.confirm,success:Bt.success,error:bt.error||$t.error||""}),[Bt.confirm,Bt.success,bt.error,$t.error]),qt=useCreation(()=>Rt&&Kt.includes("mobile")&&!wt,[Rt,Kt,wt]),Dt=checkSameProtocol(Ct),Vt=useCreation(()=>Rt&&Kt.includes("web")&&(Dt||pt)&&(!ut.mobile.any||pt),[Rt,Kt,(yn=ut==null?void 0:ut.mobile)==null?void 0:yn.any]),an=useCreation(()=>Rt&&Kt.includes("mobile")&&ut.mobile.any&&!pt,[Rt,Kt,(An=ut==null?void 0:ut.mobile)==null?void 0:An.any]),Xt=useCreation(()=>{const Tn=intersection$1(Object.keys(OAUTH_PROVIDER),Kt);return Ht.filter(gn=>Tn.includes(gn.provider))},[Ht,Kt]),pn=useCreation(()=>Xt.length>0&&["login","invite"].includes(bt.action),[Xt]),En=useCreation(()=>{const Tn=qt||Vt||an;let gn=null;return pn&&(gn=Tn?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider,{sx:{color:colors$1.textMuted,width:rt?"200px":"368px",opacity:.6,maxWidth:"90%",margin:"auto",fontSize:"14px",fontWeight:"bold","&:before, &:after":{borderColor:colors$1.lineStep}},children:"OR"}),jsxRuntimeExports.jsx(OAuthLogin,{providerList:Xt,onSuccess:a,onError:j,tokenState:bt,locale:ct,type:"list"})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{mt:1,textAlign:"center",color:colors$1.foregroundsFgSubtile},children:st("loginWithBelow")}),jsxRuntimeExports.jsx(OAuthLogin,{providerList:Xt,onSuccess:a,onError:j,tokenState:bt,type:"list",locale:ct})]})),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[bt.status==="timeout"?jsxRuntimeExports.jsx(RefreshOverlay,{onRefresh:Zt,sx:{zIndex:1,animation:"fadeIn 1s","@keyframes fadeIn":{"0%":{opacity:0},"100%":{opacity:1}}}}):null,jsxRuntimeExports.jsx(Box,{"data-did-auth-url":bt.url,sx:{display:"none"}}),an&&jsxRuntimeExports.jsx(WebviewLoginItem,{tokenState:bt,locale:ct,tokenKey:ft}),qt&&jsxRuntimeExports.jsx(MobileLoginItem,{tokenState:bt,messages:Bt,locale:ct}),Vt&&jsxRuntimeExports.jsx(WebLoginItem,{tokenState:bt,webWalletUrl:Ct,locale:ct}),gn]})},[bt,bt.url,bt.status,qt,Vt,an,Xt,pn,pn,a,j,ct,ft,Bt,Ct]);return useCreation(()=>bt.loading||$t.loading||!bt.token&&!bt.error,[bt.loading,$t.loading])?jsxRuntimeExports.jsx(Loading,{}):Ft?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Box,{"data-did-auth-url":bt.url,sx:{display:"none"}}),jsxRuntimeExports.jsx(ConnectStatus,{status:$t.status||bt.status,nextWorkflow:bt.nextWorkflow,mfaCode:bt.mfaCode,onCancel:nn,onRetry:Zt,onClose:Pt,messages:cn,locale:ct,className:"auth-status"})]}):En}DIDWalletConnect.propTypes={onError:PropTypes.func,onSuccess:PropTypes.func.isRequired,action:PropTypes.string.isRequired,checkFn:PropTypes.func.isRequired,prefix:PropTypes.string,checkInterval:PropTypes.number,checkTimeout:PropTypes.number,locale:PropTypes.oneOf(["en","zh",""]),tokenKey:PropTypes.string,encKey:PropTypes.string,baseUrl:PropTypes.string,autoConnect:PropTypes.bool,forceConnected:PropTypes.oneOfType([PropTypes.bool,PropTypes.string]),saveConnect:PropTypes.bool,useSocket:PropTypes.bool,allowWallet:PropTypes.bool,provider:PropTypes.oneOf([LOGIN_PROVIDER$1.WALLET,...Object.keys(OAUTH_PROVIDER),""]),webWalletUrl:PropTypes.string,onRecreateSession:PropTypes.func,onClose:PropTypes.func,messages:PropTypes.object,enabledConnectTypes:PropTypes.arrayOf(PropTypes.oneOf(["web","mobile",...Object.keys(OAUTH_PROVIDER)]))};DIDWalletConnect.defaultProps={prefix:API_DID_PREFIX,onError:noop$7,checkInterval:2*1e3,checkTimeout:DEFAULT_TIMEOUT$1*1e3,locale:"en",tokenKey:"_t_",encKey:"_ek_",baseUrl:"",autoConnect:!0,forceConnected:!0,saveConnect:!0,useSocket:!0,allowWallet:!0,provider:"",webWalletUrl:getWebWalletUrl$1(),onRecreateSession:noop$7,onClose:noop$7,messages:{},enabledConnectTypes:["web","mobile",...Object.keys(OAUTH_PROVIDER)]};var Set$1=_Set,noop=noop_1,setToArray$1=_setToArray,INFINITY$2=1/0,createSet$1=Set$1&&1/setToArray$1(new Set$1([,-0]))[1]==INFINITY$2?function(a){return new Set$1(a)}:noop,_createSet=createSet$1,SetCache=_SetCache,arrayIncludes$1=_arrayIncludes,arrayIncludesWith=_arrayIncludesWith,cacheHas=_cacheHas,createSet=_createSet,setToArray=_setToArray,LARGE_ARRAY_SIZE=200;function baseUniq$2(a,j,_e){var et=-1,nt=arrayIncludes$1,tt=a.length,ot=!0,ct=[],ft=ct;if(_e)ot=!1,nt=arrayIncludesWith;else if(tt>=LARGE_ARRAY_SIZE){var ht=j?null:createSet(a);if(ht)return setToArray(ht);ot=!1,nt=cacheHas,ft=new SetCache}else ft=j?[]:ct;e:for(;++et<tt;){var dt=a[et],yt=j?j(dt):dt;if(dt=_e||dt!==0?dt:0,ot&&yt===yt){for(var Tt=ft.length;Tt--;)if(ft[Tt]===yt)continue e;j&&ft.push(yt),ct.push(dt)}else nt(ft,yt,_e)||(ft!==ct&&ft.push(yt),ct.push(dt))}return ct}var _baseUniq=baseUniq$2,baseFlatten$1=_baseFlatten,baseIteratee$1=_baseIteratee,baseRest$1=_baseRest,baseUniq$1=_baseUniq,isArrayLikeObject=isArrayLikeObject_1,last=last_1,unionBy=baseRest$1(function(a){var j=last(a);return isArrayLikeObject(j)&&(j=void 0),baseUniq$1(baseFlatten$1(a,1,isArrayLikeObject,!0),baseIteratee$1(j))}),unionBy_1=unionBy;const unionBy$1=getDefaultExportFromCjs$1(unionBy_1);var baseFor=_baseFor,keys$1=keys_1;function baseForOwn$1(a,j){return a&&baseFor(a,j,keys$1)}var _baseForOwn=baseForOwn$1,isArrayLike$1=isArrayLike_1;function createBaseEach$1(a,j){return function(_e,et){if(_e==null)return _e;if(!isArrayLike$1(_e))return a(_e,et);for(var nt=_e.length,tt=j?nt:-1,ot=Object(_e);(j?tt--:++tt<nt)&&et(ot[tt],tt,ot)!==!1;);return _e}}var _createBaseEach=createBaseEach$1,baseForOwn=_baseForOwn,createBaseEach=_createBaseEach,baseEach$1=createBaseEach(baseForOwn),_baseEach=baseEach$1,baseEach=_baseEach,isArrayLike=isArrayLike_1;function baseMap$1(a,j){var _e=-1,et=isArrayLike(a)?Array(a.length):[];return baseEach(a,function(nt,tt,ot){et[++_e]=j(nt,tt,ot)}),et}var _baseMap=baseMap$1;function baseSortBy$1(a,j){var _e=a.length;for(a.sort(j);_e--;)a[_e]=a[_e].value;return a}var _baseSortBy=baseSortBy$1,isSymbol$5=isSymbol_1;function compareAscending$1(a,j){if(a!==j){var _e=a!==void 0,et=a===null,nt=a===a,tt=isSymbol$5(a),ot=j!==void 0,ct=j===null,ft=j===j,ht=isSymbol$5(j);if(!ct&&!ht&&!tt&&a>j||tt&&ot&&ft&&!ct&&!ht||et&&ot&&ft||!_e&&ft||!nt)return 1;if(!et&&!tt&&!ht&&a<j||ht&&_e&&nt&&!et&&!tt||ct&&_e&&nt||!ot&&nt||!ft)return-1}return 0}var _compareAscending=compareAscending$1,compareAscending=_compareAscending;function compareMultiple$1(a,j,_e){for(var et=-1,nt=a.criteria,tt=j.criteria,ot=nt.length,ct=_e.length;++et<ot;){var ft=compareAscending(nt[et],tt[et]);if(ft){if(et>=ct)return ft;var ht=_e[et];return ft*(ht=="desc"?-1:1)}}return a.index-j.index}var _compareMultiple=compareMultiple$1,arrayMap=_arrayMap,baseGet$1=_baseGet,baseIteratee=_baseIteratee,baseMap=_baseMap,baseSortBy=_baseSortBy,baseUnary=_baseUnary,compareMultiple=_compareMultiple,identity=identity_1,isArray$5=isArray_1;function baseOrderBy$1(a,j,_e){j.length?j=arrayMap(j,function(tt){return isArray$5(tt)?function(ot){return baseGet$1(ot,tt.length===1?tt[0]:tt)}:tt}):j=[identity];var et=-1;j=arrayMap(j,baseUnary(baseIteratee));var nt=baseMap(a,function(tt,ot,ct){var ft=arrayMap(j,function(ht){return ht(tt)});return{criteria:ft,index:++et,value:tt}});return baseSortBy(nt,function(tt,ot){return compareMultiple(tt,ot,_e)})}var _baseOrderBy=baseOrderBy$1,baseFlatten=_baseFlatten,baseOrderBy=_baseOrderBy,baseRest=_baseRest,isIterateeCall=_isIterateeCall,sortBy=baseRest(function(a,j){if(a==null)return[];var _e=j.length;return _e>1&&isIterateeCall(a,j[0],j[1])?j=[]:_e>2&&isIterateeCall(j[0],j[1],j[2])&&(j=[j[0]]),baseOrderBy(a,baseFlatten(j,1),[])}),sortBy_1=sortBy;const sortBy$1=getDefaultExportFromCjs$1(sortBy_1),prefix$2=joinURL(AUTH_SERVICE_PREFIX,"/api/user-session");function useQuickConnect({appPid:a,sourceAppPid:j,loginAppPid:_e,autoFetch:et=!0,baseUrl:nt="/",fetchAll:tt=!1}={}){const ot=getVisitorId$2(),ct=useCreation(()=>createAxios({baseURL:joinURL(nt,prefix$2)},{lazy:!0,lazyTime:500}),[nt]),ft=useMemoizedFn(async()=>{const{data:Rt=[]}=await ct.get("",{params:{visitorId:ot}}),It=getFederatedEnabled(),Ct=getMaster();if(tt&&It&&Ct){const{data:kt}=await ct.get(joinURL(Ct.appUrl,AUTH_SERVICE_PREFIX,"/api/user-session"),{params:{visitorId:ot}});return Rt.concat(kt||[])}return!It||!Ct?Rt.filter(kt=>{var Pt;return((Pt=kt==null?void 0:kt.user)==null?void 0:Pt.sourceAppPid)===null}):Rt}),ht=useReactive({loaded:!1,loadingId:null}),dt=useRequest(ft,{manual:!et,onFinally(){ht.loaded=!0},refreshDeps:[nt]}),yt=async Rt=>{var Ct,kt,Pt;const It=pick$2(Rt,["userDid","visitorId","passportId","id"]);try{ht.loadingId=Rt.id;const Bt=getMaster();if(getFederatedEnabled()&&Bt&&_e!==Rt.appPid){const{data:jt}=await ct.post("login",{...It,appPid:_e},{baseURL:joinURL(Bt.appUrl,AUTH_SERVICE_PREFIX,"/api/user-session")});return jt}const{data:Kt}=await ct.post("login",{...It,appPid:_e});return Kt}catch(Bt){const Kt=Bt.response?((kt=(Ct=Bt.response)==null?void 0:Ct.data)==null?void 0:kt.error)||((Pt=Bt.response)==null?void 0:Pt.data):Bt.message;throw Toast$1.error(Kt),console.error("Quick login error",Bt),Bt}finally{ht.loadingId=null}},Tt=useCreation(()=>dt.data?dt.data.filter(Rt=>Rt.status!=="expired"):[],[dt.data]),St=useCreation(()=>{const Rt=new Date().getTime(),It=sortBy$1(Tt,Ct=>Rt-new Date(Ct.updatedAt).getTime());return unionBy$1(It,Ct=>[Ct.userDid].join("_"))},[Tt,j,a]),At=useCreation(()=>!!(St&&St.length>0),[St]);return{loadingId:ht.loadingId,userSessions:St,quickLoginEnabled:At,loginUserSession:yt,loading:dt.loading,loaded:dt.loaded,refresh:dt.refreshAsync}}const data$b={width:24,height:24,body:'<path fill="currentColor" d="M11.95 18q.525 0 .888-.363t.362-.887q0-.525-.362-.888t-.888-.362q-.525 0-.887.363t-.363.887q0 .525.363.888t.887.362Zm.05 4q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22Zm0-2q3.35 0 5.675-2.325T20 12q0-3.35-2.325-5.675T12 4Q8.65 4 6.325 6.325T4 12q0 3.35 2.325 5.675T12 20Zm0-8Zm.1-4.3q.625 0 1.088.4t.462 1q0 .55-.337.975t-.763.8q-.575.5-1.012 1.1t-.438 1.35q0 .35.263.588t.612.237q.375 0 .638-.25t.337-.625q.1-.525.45-.938t.75-.787q.575-.55.988-1.2t.412-1.45q0-1.275-1.038-2.087T12.1 6q-.95 0-1.812.4T8.975 7.625q-.175.3-.113.638t.338.512q.35.2.725.125t.625-.425q.275-.375.688-.575t.862-.2Z"/>'},data$a={width:24,height:24,body:'<path fill="currentColor" d="m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4L9.55 18Z"/>'};function AppIcon({appInfo:a,...j}){const[_e,et]=reactExports.useState(!1);if(_e||!(a.appUrl||a.appLogo))return jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{did:a.appPid,size:32});let nt=a.appLogo||"";return isUrl(nt)||(nt=joinURL(a.appUrl||"",nt)),jsxRuntimeExports.jsx(Img,{src:nt,alt:a.appName||"Blocklet Icon",width:32,height:32,...j,onError:()=>et(!0)})}AppIcon.propTypes={appInfo:PropTypes.object.isRequired};const getAppDid=a=>a?a.split(":").pop():"";function AppInfoItem({appInfo:a,active:j,appLogo:_e}){return jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",fontWeight:600,color:colors$1.textBase,"& .app-info-content":{paddingLeft:"8px",overflow:"hidden"},"& .app-info-name":{maxWidth:"100%",paddingRight:"32px",lineHeight:"normal",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontSize:"12px"},"& .app-info-did":{fontSize:0},"& .app-info-did .did-address-text":{color:colors$1.textMuted,fontSize:"12px"}},children:[_e||jsxRuntimeExports.jsx(Box,{sx:{borderRadius:"8px",overflow:"hidden",fontSize:0},children:jsxRuntimeExports.jsx(AppIcon,{appInfo:a})}),jsxRuntimeExports.jsxs(Box,{className:"app-info-content",children:[jsxRuntimeExports.jsx(Box,{className:"app-info-name",children:a.appName}),a.appPid&&jsxRuntimeExports.jsx(DidAddressWrapper,{size:12,className:"app-info-did",copyable:!1,color:colors$1.textMuted,compact:!1,responsive:!1,children:getAppDid(a.appPid)})]}),j?jsxRuntimeExports.jsx(IconButton,{size:"small",color:"success",children:jsxRuntimeExports.jsx(Icon$1,{icon:data$a,color:"success"})}):null]})}AppInfoItem.propTypes={appInfo:PropTypes.object.isRequired,active:PropTypes.bool,appLogo:PropTypes.node};AppInfoItem.defaultProps={active:!1,appLogo:null};function CurrentApp({appInfo:a}){const j=reactExports.useRef(null),_e=useReactive({hoverOnButton:!1,hoverOnPopover:!1}),et=useCreation(()=>_e.hoverOnButton||_e.hoverOnPopover,[_e.hoverOnButton,_e.hoverOnPopover]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Box,{component:"span",ref:j,sx:{color:colors$1.foregroundsFgInteractive,cursor:"help"},onClick:()=>{_e.hoverOnButton=!0},onMouseEnter:()=>{_e.hoverOnButton=!0},onMouseLeave:()=>{setTimeout(()=>{_e.hoverOnButton=!1},200)},children:a.appName}),jsxRuntimeExports.jsx(Popover,{open:et,sx:{pointerEvents:"none"},slotProps:{paper:{variant:"outlined",sx:{border:0,boxShadow:`0px 4px 8px 0px ${colors$1.gray6}, 0px 0px 0px 1px ${colors$1.gray6}`,py:1,px:1.5,borderRadius:2,transform:"translateY(-6px) !important"}}},anchorEl:j.current,anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{_e.open=!1},disableRestoreFocus:!0,children:jsxRuntimeExports.jsx(Box,{component:"span",sx:{pointerEvents:"auto"},onMouseEnter:()=>{_e.hoverOnPopover=!0},onMouseLeave:()=>{_e.hoverOnPopover=!1},children:jsxRuntimeExports.jsx(AppInfoItem,{appInfo:a,appLogo:jsxRuntimeExports.jsx(AppIcon,{appInfo:a})})})})]})}CurrentApp.propTypes={appInfo:PropTypes.object.isRequired};function SwitchApp(){const{appInfoList:a,t:j,extraParams:_e,connectState:et}=useStateContext(),nt=reactExports.useRef(null),tt=useReactive({open:!1});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Box,{component:"span",ref:nt,sx:{textTransform:"lowercase",color:colors$1.foregroundsFgInteractive,cursor:"pointer"},onClick:()=>{tt.open=!0},children:j("switch")}),jsxRuntimeExports.jsx(Menu,{anchorEl:nt.current,open:tt.open,onClose:()=>{tt.open=!1},slotProps:{paper:{variant:"outlined",sx:{border:0,boxShadow:`0px 4px 8px 0px ${colors$1.gray6}, 0px 0px 0px 1px ${colors$1.gray6}`,borderRadius:2}}},children:a.map(ot=>jsxRuntimeExports.jsx(MenuItem,{onClick:()=>{tt.open=!1,et.sourceAppPid=ot.sourceAppPid},children:jsxRuntimeExports.jsx(AppInfoItem,{appInfo:ot,active:ot.sourceAppPid===(_e==null?void 0:_e.sourceAppPid)})},ot.appPid))})]})}function AppTips({locale:a,disableSwitchApp:j}){const{appInfoList:_e,extraParams:et,connectState:nt,blocklet:tt}=useStateContext(),ot=useCreation(()=>_e.find(ht=>isUndefined$2(et==null?void 0:et.sourceAppPid)?!0:isNull$3(ht.sourceAppPid)?ht.appPid===(tt==null?void 0:tt.appPid):ht.sourceAppPid===(et==null?void 0:et.sourceAppPid)),[et==null?void 0:et.sourceAppPid,_e]),ct=!j&&_e.length>1;useMount(()=>{(tt==null?void 0:tt.appPid)===(ot==null?void 0:ot.appPid)?nt.sourceAppPid=null:nt.sourceAppPid=ot==null?void 0:ot.appPid});const ft=useCreation(()=>a==="zh"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["您正在使用 ",jsxRuntimeExports.jsx(CurrentApp,{appInfo:ot,appInfoList:_e})," 账户来连接站点",ct?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[",点击",jsxRuntimeExports.jsx(SwitchApp,{appInfoList:_e})]}):null]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["You're using ",jsxRuntimeExports.jsx(CurrentApp,{appInfo:ot})," account for site access",ct?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[". Click to ",jsxRuntimeExports.jsx(SwitchApp,{appInfoList:_e})]}):null]}),[a,ot,_e,ct]);return isEmpty$1(_e)?null:jsxRuntimeExports.jsxs(Box,{sx:{fontSize:"13px",color:colors$1.foregroundsFgSubtile,lineHeight:1.5},children:[ft,ct&&jsxRuntimeExports.jsx(Box,{component:"span",sx:{display:"inline-block",ml:.5,fontSize:"13px",height:"16px",lineHeight:1,verticalAlign:"middle"},children:jsxRuntimeExports.jsx(Box,{component:Icon,icon:data$b,sx:{verticalAlign:"middle"}})})]})}AppTips.propTypes={locale:PropTypes.string,disableSwitchApp:PropTypes.bool};AppTips.defaultProps={locale:"en",disableSwitchApp:!1};var DidLogoColorful={};Object.defineProperty(DidLogoColorful,"__esModule",{value:!0});var default_1$2=DidLogoColorful.default=void 0;_interopRequireDefault$2(reactExports);var _jsxRuntime$2=jsxRuntimeExports;function _interopRequireDefault$2(a){return a&&a.__esModule?a:{default:a}}function ownKeys$2(a,j){var _e=Object.keys(a);if(Object.getOwnPropertySymbols){var et=Object.getOwnPropertySymbols(a);j&&(et=et.filter(function(nt){return Object.getOwnPropertyDescriptor(a,nt).enumerable})),_e.push.apply(_e,et)}return _e}function _objectSpread(a){for(var j=1;j<arguments.length;j++){var _e=arguments[j]!=null?arguments[j]:{};j%2?ownKeys$2(Object(_e),!0).forEach(function(et){_defineProperty(a,et,_e[et])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(_e)):ownKeys$2(Object(_e)).forEach(function(et){Object.defineProperty(a,et,Object.getOwnPropertyDescriptor(_e,et))})}return a}function _defineProperty(a,j,_e){return(j=_toPropertyKey(j))in a?Object.defineProperty(a,j,{value:_e,enumerable:!0,configurable:!0,writable:!0}):a[j]=_e,a}function _toPropertyKey(a){var j=_toPrimitive(a,"string");return typeof j=="symbol"?j:j+""}function _toPrimitive(a,j){if(typeof a!="object"||!a)return a;var _e=a[Symbol.toPrimitive];if(_e!==void 0){var et=_e.call(a,j||"default");if(typeof et!="object")return et;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(a)}var Component=function a(j){return(0,_jsxRuntime$2.jsxs)("svg",_objectSpread(_objectSpread({},j),{},{children:[(0,_jsxRuntime$2.jsx)("path",{d:"M7.366.646L8.46 0h3.981v11.96H8.564a.381.381 0 0 1-.194-.053L4.18 9.431V2.53l.508-.3.893.528-.508.3v5.845L8.7 11.046h2.85V.914h-2.85l-.44.26-.893-.528z",fill:"color(display-p3 .4196 .7412 .9961)"}),(0,_jsxRuntime$2.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.868 8.903V3.057L4.242.915H1.393v10.132h2.85l.44-.26.893.527-1.095.647H.5V0h3.981l4.28 2.53v6.9l-.506.3-.893-.528.506-.299z",fill:"color(display-p3 .2706 .5961 .9804)"})]}))};Component.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"13",height:"12",viewBox:"0 0 13 12",fill:"none"};Component.displayName="did-logo-colorful";default_1$2=DidLogoColorful.default=Component;function PoweredBy({...a}){return jsxRuntimeExports.jsxs(Box,{...a,sx:{display:"flex",alignItems:"center",color:colors$1.foregroundsFgMuted,gap:.5,...a.sx},children:[jsxRuntimeExports.jsx(default_1$2,{}),"Powered By",jsxRuntimeExports.jsx(Box,{component:"a",href:"https://www.didconnect.io/",target:"_blank",rel:"noopener",sx:{color:colors$1.foregroundsFgInteractive,textDecoration:"none","&:hover":{textDecoration:"underline"}},children:"DID Connect"})]})}function AutoHeight({children:a,initHeight:j,slotProps:_e}){var ct;const[et,nt]=reactExports.useState(j),tt=reactExports.useRef(null),ot=useSize(tt);return reactExports.useEffect(()=>{ot!=null&&ot.height&&nt(ot.height)},[ot==null?void 0:ot.height,et]),jsxRuntimeExports.jsx(Box,{..._e==null?void 0:_e.root,sx:{height:et,overflow:"hidden",transition:"height 0.2s ease-in-out",...(ct=_e==null?void 0:_e.root)==null?void 0:ct.sx},children:jsxRuntimeExports.jsx(Box,{..._e==null?void 0:_e.container,ref:tt,children:a})})}AutoHeight.propTypes={initHeight:PropTypes.number,children:PropTypes.node.isRequired,slotProps:PropTypes.object};AutoHeight.defaultProps={initHeight:0,slotProps:{}};const didConnectTab="did-connect",quickConnectTab="quick-connect";function Connect$1({mode:a,isFullScreen:j,hideCloseButton:_e,...et}){var pt;const nt=useReactive({showTab:didConnectTab}),{connectState:tt,blocklet:ot,appInfoList:ct,extraParams:ft}=useStateContext(),{extraContent:ht,onSuccess:dt,action:yt,onClose:Tt,options:St}=et,At=useCreation(()=>ct.find(mt=>isUndefined$2(ft==null?void 0:ft.sourceAppPid)?!0:isNull$3(mt.sourceAppPid)?mt.appPid===(ot==null?void 0:ot.appPid):mt.sourceAppPid===(ft==null?void 0:ft.sourceAppPid)),[ft==null?void 0:ft.sourceAppPid,ct]),Rt=useCreation(()=>isNull$3(tt==null?void 0:tt.sourceAppPid)?At==null?void 0:At.appPid:(tt==null?void 0:tt.sourceAppPid)||getCurrentAppPid(),[tt==null?void 0:tt.sourceAppPid]),{quickLoginEnabled:It,loading:Ct,userSessions:kt,loginUserSession:Pt,refresh:Bt}=useQuickConnect({appPid:Rt,loginAppPid:ot==null?void 0:ot.appPid,sourceAppPid:tt==null?void 0:tt.sourceAppPid,autoFetch:["login"].includes(yt),baseUrl:(At==null?void 0:At.appUrl)||""}),Kt=useCreation(()=>{var mt;return((mt=et==null?void 0:et.messages)==null?void 0:mt.title)||DEFAULT_NAME},[(pt=et==null?void 0:et.messages)==null?void 0:pt.title]),jt=useCreation(()=>{if(yt==="login"){const mt=getMaster(ot),$t=getFederatedEnabled(ot);return ft!=null&&ft.forceConnected?kt.filter(xt=>xt.userDid===(ft==null?void 0:ft.forceConnected)):!$t||!mt?kt.filter(xt=>{var vt;return((vt=xt==null?void 0:xt.user)==null?void 0:vt.sourceAppPid)===null}):kt.filter(xt=>{var vt;return Rt===ot.appPid?((vt=xt.user)==null?void 0:vt.sourceAppPid)===(ft==null?void 0:ft.sourceAppPid):!0})}return kt},[ft==null?void 0:ft.forceConnected,yt,kt]),zt=useMemoizedFn(async(...mt)=>{var it,bt,Mt;const $t=await Pt(...mt),[xt]=mt,vt={};xt&&((it=xt==null?void 0:xt.user)!=null&&it.did&&(vt.connected_did=xt.user.did),(bt=xt==null?void 0:xt.user)!=null&&bt.pk&&(vt.connected_pk=xt.user.pk),(Mt=xt==null?void 0:xt.extra)!=null&&Mt.walletOS&&(vt.connected_wallet_os=xt.extra.walletOS),xt!=null&&xt.appPid&&(vt.connected_app=xt.appPid)),await dt({...$t,encrypted:!1},Lt=>Lt,vt)});reactExports.useEffect(()=>{(St==null?void 0:St.showQuickConnect)!==!1&&!Ct&&It&&(nt.showTab=quickConnectTab)},[Ct,It,St==null?void 0:St.showQuickConnect]);const Gt=useDebounce(Ct,{wait:100}),tn=useMemoizedFn(()=>{nt.showTab=didConnectTab}),hn=useMemoizedFn(()=>{nt.showTab=quickConnectTab}),wt=useCreation(()=>jt.length===0?!0:nt.showTab===didConnectTab||!It,[nt.showTab,It]),rt=useCreation(()=>{let mt=!0;return(Ct||Gt)&&(mt=!1),It||(mt=!1),St.showQuickConnect===!1&&(mt=!1),nt.showTab!==didConnectTab&&(mt=!1),mt},[It,nt.showTab,Ct,Gt]),st=useCreation(()=>jsxRuntimeExports.jsx(Box,{onClick:Tt,sx:{fontSize:"1.5rem",width:"1.5rem",height:"1.5rem",cursor:"pointer",color:colors$1.foregroundsFgSubtile,transition:"transform 0.2s ease-in-out","&:hover":{transform:"rotate(90deg)"}},children:jsxRuntimeExports.jsx(Icon,{icon:data$r})}),[Tt]);let ut=null;return Ct||Gt?ut=jsxRuntimeExports.jsx(Loading,{}):wt?ut=jsxRuntimeExports.jsx(DIDWalletConnect,{...et,onClose:Tt}):ut=jsxRuntimeExports.jsx(QuickConnect,{userSessions:jt,onLogin:zt,onRetry:Bt,onClose:Tt,messages:et.messages,onLoginAnother:tn}),jsxRuntimeExports.jsxs(Card,{variant:"outlined",sx:{color:colors$1.foregroundsFgBase,backgroundColor:"white",borderRadius:2,borderColor:colors$1.strokeBorderBase,height:"100%",display:"flex",flexDirection:"column"},children:[jsxRuntimeExports.jsx(CardHeader,{title:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt&&jsxRuntimeExports.jsx(IconButton,{size:"small",disabled:tt.status!=="created",onClick:hn,disableRipple:!0,sx:{fontSize:"0.75em"},children:jsxRuntimeExports.jsx(Icon,{icon:data$s,color:colors$1.textMuted})}),Kt]}),titleTypographyProps:{display:"flex",alignItems:"center",variant:"h6",lineHeight:"28px",fontWeight:600},action:_e?null:st,sx:{px:2.5,".MuiCardHeader-action":{margin:0,alignSelf:"center"}}}),jsxRuntimeExports.jsx(CardContent,{sx:{borderTop:`1px solid ${colors$1.strokeBorderBase}`,borderBottom:`1px solid ${colors$1.strokeBorderBase}`,flex:1,verticalAlign:"middle",overflow:"auto",p:2.5,position:"relative","&::after":{content:'""',height:"100%",verticalAlign:"middle",display:"inline-block",width:0}},children:jsxRuntimeExports.jsxs(AutoHeight,{slotProps:{root:{sx:{display:"inline-block",width:"100%",verticalAlign:"middle"}},container:{sx:{display:"flex",flexDirection:"column",gap:1}}},children:[jsxRuntimeExports.jsx(AppTips,{locale:et.locale,disableSwitchApp:et.disableSwitchApp}),ut,ht?jsxRuntimeExports.jsx(Box,{children:ht}):null]})}),jsxRuntimeExports.jsx(CardActions,{sx:{py:2,px:2.5,justifyContent:"center"},children:jsxRuntimeExports.jsx(PoweredBy,{sx:{fontSize:"12px"}})})]})}Connect$1.propTypes={action:PropTypes.string.isRequired,onSuccess:PropTypes.func,onClose:PropTypes.func,messages:PropTypes.object,extraContent:PropTypes.any,disableSwitchApp:PropTypes.bool,mode:PropTypes.oneOf(["fullScreen","dialog","normal"]),isFullScreen:PropTypes.bool,options:PropTypes.object,hideCloseButton:PropTypes.bool,locale:PropTypes.string};Connect$1.defaultProps={onSuccess:noop$7,onClose:noop$7,mode:"normal",isFullScreen:!1,extraContent:null,disableSwitchApp:!1,messages:{},options:{},hideCloseButton:!0,locale:"en"};function WrapConnect(a){const{checkFn:j,extraParams:_e,blocklet:et,action:nt,locale:tt}=a;if(typeof j!="function")throw new Error("Cannot initialize did connect component without a fetchFn");return jsxRuntimeExports.jsx(StateProvider,{blocklet:et,action:nt,locale:tt,extraParams:_e,sx:{position:"relative",width:"100%",height:"100%",lineHeight:1.2,fontFamily:"Inter",color:"#334660","&, & *, & *:before, & *:after":{boxSizing:"border-box"}},children:jsxRuntimeExports.jsx(Connect$1,{...a})})}WrapConnect.propTypes={checkFn:PropTypes.func.isRequired,extraParams:PropTypes.object,blocklet:PropTypes.object.isRequired,action:PropTypes.string.isRequired,locale:PropTypes.string};WrapConnect.defaultProps={extraParams:{},locale:"en"};const DidConnect=withWebWalletSWKeeper(withDialog(withBlocklet(WrapConnect))),CLOSE_TIMEOUT=2e3,ConnectHolder=reactExports.forwardRef((a,j)=>{const{api:_e}=reactExports.useContext(SessionContext$1),et={containerEl:null,popup:!0,checkFn:(_e==null?void 0:_e.get)||noop$7,messages:{title:"DID Connect",scan:"Scan QR code to complete this action",confirm:"Confirm on your DID Wallet",success:"Success!"}},nt=useReactive({show:!1,...cloneDeep$1(et)}),[tt,ot]=reactExports.useState({}),ct=useMemoizedFn(()=>{const yt=cloneDeep$1(et);Object.keys(yt).forEach(Tt=>{nt[Tt]=yt[Tt]})}),ft=useMemoizedFn(()=>{nt.show=!1,ct()}),ht=useMemoizedFn(yt=>{const{containerEl:Tt,checkFn:St,popup:At,messages:Rt,...It}=cloneDeep$1(yt);typeof St=="function"&&(nt.checkFn=St),At!==void 0&&(nt.popup=At),Rt!==void 0&&(nt.messages=Rt),Tt!==void 0&&(nt.containerEl=Tt),ot(It),nt.show=!0});reactExports.useImperativeHandle(j,()=>({open:ht,close:ft}),[ht,ft]);const dt=jsxRuntimeExports.jsx(DidConnect,{open:!0,popup:nt.popup,messages:nt.messages,checkFn:nt.checkFn,...tt});return nt.containerEl?reactDomExports.createPortal(dt,nt.containerEl):nt.show&&dt});function useConnect(){const a=reactExports.useRef(null),j=useCreation(()=>new _default$2({concurrency:1})),_e=useMemoizedFn((...ct)=>{var ft;(ft=a.current)==null||ft.close(...ct)}),et=useMemoizedFn(({onSuccess:ct,onClose:ft,onEnd:ht,closeTimeout:dt=CLOSE_TIMEOUT,...yt},...Tt)=>{const St=()=>new Promise(At=>{typeof ct=="function"?yt.onSuccess=(...Rt)=>{ct(...Rt),setTimeout(()=>{_e(),At()},dt)}:yt.onSuccess=()=>{setTimeout(()=>{_e(),At()},dt)},typeof ft=="function"?yt.onClose=(...Rt)=>{ft(...Rt),_e(),At(),j.clear()}:yt.onClose=()=>{_e(),At(),j.clear()},setTimeout(()=>{var Rt;(Rt=a.current)==null||Rt.open(yt,...Tt)})});j.add(St)}),nt=useMemoizedFn((ct={},{baseUrl:ft,locale:ht="en",blocklet:dt=globalThis==null?void 0:globalThis.blocklet,closeTimeout:yt=CLOSE_TIMEOUT}={})=>new Promise((Tt,St)=>{const At=()=>new Promise(Rt=>{(async()=>{var zt;if(isUndefined$2(ft)){const Gt=getFederatedEnabled(),tn=getMaster();ft=Gt?tn.appUrl:window.location.origin}const{onSuccess:Ct,onClose:kt,onError:Pt,...Bt}=ct;if(!((zt=Bt==null?void 0:Bt.extraParams)!=null&&zt.provider))throw isFunction$8(Pt)&&Pt("Must have extraParams.provider"),new Error("Must have extraParams.provider");Bt!=null&&Bt.prefix||(Bt.prefix=window.location.origin+joinURL(dt==null?void 0:dt.prefix,API_DID_PREFIX));const Kt=new URLSearchParams;Kt.set("params",btoa(encodeURIComponent(JSON.stringify(Bt)))),Kt.set("appPid",dt==null?void 0:dt.appPid),Kt.set("locale",ht);const jt=openPopup(joinURL(ft||"/",AUTH_SERVICE_PREFIX,`/connect?${Kt.toString()}`));try{const Gt=await runPopup({popup:jt,closeTimeout:yt});updateConnectedInfo({connected_app:getAppId$1(),...Gt==null?void 0:Gt.options},!0),isFunction$8(Ct)?(Ct({...Gt.response,encrypted:!1}),_e(),Rt()):(_e(),Rt()),Tt({...Gt.response,encrypted:!1})}catch(Gt){throw Gt.message==="Popup closed"?isFunction$8(kt)?(kt(),Rt(),j.clear()):(Rt(),j.clear()):isFunction$8(Pt)&&Pt(Gt),Gt}})().catch(Ct=>{Rt(),St(Ct)})});j.add(At)})),tt=useCreation(()=>jsxRuntimeExports.jsx(ConnectHolder,{ref:a})),ot=useCreation(()=>({open:et,close:_e,openPopup:nt,queue:j}));return{connectHolder:tt,connectApi:ot}}const EVENTS={LOGIN:Symbol("login"),CANCEL_LOGIN:Symbol("cancelLogin"),LOGOUT:Symbol("logout"),SWITCH_PROFILE:Symbol("switchProfile"),CANCEL_SWITCH_PROFILE:Symbol("cancelSwitchProfile"),SWITCH_PASSPORT:Symbol("switchPassport"),CANCEL_SWITCH_PASSPORT:Symbol("cancelSwitchPassport"),BIND_WALLET:Symbol("bindWallet"),CANCEL_BIND_WALLET:Symbol("cancelBindWallet"),CONNECT_TO_DID_SPACE_FOR_FULL_ACCESS:Symbol("connectToDidSpaceForFullAccess")},translations$2={login:{en:{title:"Connect DID Wallet",scan:"Scan following qrcode to connect your DID Wallet",confirm:"Confirm connection in your DID Wallet",success:"Successfully connected"},zh:{title:"连接 DID 钱包",scan:"请使用 DID 钱包扫码下面的二维码完成连接",confirm:"在 DID 钱包中确认连接",success:"连接成功"}},"switch-specified-did":{en:{title:"Switch DID",scan:"You need switch DID to {did} to complete the following actions",confirm:"Confirm switch in your DID Wallet",success:"Successfully switched"},zh:{title:"切换账号",scan:"你需要切换账号至 {did} 才能完成后续的操作",confirm:"在 DID 钱包中确认切换",success:"切换成功"}},"switch-did":{en:{title:"Switch DID",scan:"Scan following qrcode to switch account",confirm:"Confirm switch in your DID Wallet",success:"Successfully switched"},zh:{title:"切换账号",scan:"请使用 DID 钱包扫码下面的二维码完成切换",confirm:"在 DID 钱包中确认切换",success:"切换成功"}},"switch-profile":{en:{title:"Switch Profile",scan:"Scan following qrcode with DID Wallet to switch profile",confirm:"Select profile in your DID Wallet",success:"Profile updated"},zh:{title:"切换个人信息",scan:"请使用 DID 钱包扫码下面的二维码来切换个人信息",confirm:"在 DID 钱包中选择个人信息",success:"个人信息已经更新"}},"switch-passport":{en:{title:"Switch Passport",scan:"Scan following qrcode with DID Wallet to switch passport",confirm:"Select passport in your DID Wallet",success:"Passport and session updated"},zh:{title:"切换通行证",scan:"请使用 DID 钱包扫码二维码来切换通行证",confirm:"在 DID 钱包中选择通行证",success:"通行证和会话已经更新"}},"connect-to-did-spaces-for-user":{en:{title:"Please authorize the application to connect to your DID Space",scan:"Please use your DID wallet to scan the QR code for authorization",confirm:"Select the DID Spaces NFT in your DID wallet",success:"Connection successful"},zh:{title:"请授权应用连接你的 DID Space",scan:"请使用 DID 钱包扫码二维码来完成授权",confirm:"在 DID 钱包中选择 DID Spaces NFT",success:"连接成功"}},"bind-wallet":{en:{title:"Connect DID Wallet for enhanced security",scan:"Scan following qrcode with DID Wallet to connect your DID Wallet",success:"Successfully connected"},zh:{title:"连接 DID 钱包获得更高的安全性",scan:"请使用 DID 钱包扫码二维码来连接您的 DID 钱包",success:"连接成功"}},exchangePassport:{en:{action:"Exchange Passport with NFT",tooltip:"Exchange passport if you owns any required NFT"},zh:{action:"兑换通行证",tooltip:"通过出示你持有的特定 NFT 来获取通行证"}},lostPassport:{en:{action:"Lost Passport"},zh:{action:"找回通行证"}},switchAccountDialog:{en:{confirm:"Switch",title:"Switch Account",description:"Please switch accounts to complete next action",currentAccount:"Current account",nextAccount:"Account to be switched"},zh:{confirm:"切换",title:"切换账号",description:"请切换账号来完成后续的操作",currentAccount:"当前登录的账户",nextAccount:"即将切换的账户"}}};var re$2={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$2=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=MAX_LENGTH$1-6,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:MAX_LENGTH$1,MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$2,RELEASE_TYPES,SEMVER_SPEC_VERSION,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},define_process_env_default$1={};const debug$3=typeof process$1$1=="object"&&define_process_env_default$1&&define_process_env_default$1.NODE_DEBUG&&/\bsemver\b/i.test(define_process_env_default$1.NODE_DEBUG)?(...a)=>console.error("SEMVER",...a):()=>{};var debug_1$1=debug$3;(function(a,j){const{MAX_SAFE_COMPONENT_LENGTH:_e,MAX_SAFE_BUILD_LENGTH:et,MAX_LENGTH:nt}=constants$1,tt=debug_1$1;j=a.exports={};const ot=j.re=[],ct=j.safeRe=[],ft=j.src=[],ht=j.t={};let dt=0;const yt="[a-zA-Z0-9-]",Tt=[["\\s",1],["\\d",nt],[yt,et]],St=Rt=>{for(const[It,Ct]of Tt)Rt=Rt.split(`${It}*`).join(`${It}{0,${Ct}}`).split(`${It}+`).join(`${It}{1,${Ct}}`);return Rt},At=(Rt,It,Ct)=>{const kt=St(It),Pt=dt++;tt(Rt,Pt,It),ht[Rt]=Pt,ft[Pt]=It,ot[Pt]=new RegExp(It,Ct?"g":void 0),ct[Pt]=new RegExp(kt,Ct?"g":void 0)};At("NUMERICIDENTIFIER","0|[1-9]\\d*"),At("NUMERICIDENTIFIERLOOSE","\\d+"),At("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${yt}*`),At("MAINVERSION",`(${ft[ht.NUMERICIDENTIFIER]})\\.(${ft[ht.NUMERICIDENTIFIER]})\\.(${ft[ht.NUMERICIDENTIFIER]})`),At("MAINVERSIONLOOSE",`(${ft[ht.NUMERICIDENTIFIERLOOSE]})\\.(${ft[ht.NUMERICIDENTIFIERLOOSE]})\\.(${ft[ht.NUMERICIDENTIFIERLOOSE]})`),At("PRERELEASEIDENTIFIER",`(?:${ft[ht.NUMERICIDENTIFIER]}|${ft[ht.NONNUMERICIDENTIFIER]})`),At("PRERELEASEIDENTIFIERLOOSE",`(?:${ft[ht.NUMERICIDENTIFIERLOOSE]}|${ft[ht.NONNUMERICIDENTIFIER]})`),At("PRERELEASE",`(?:-(${ft[ht.PRERELEASEIDENTIFIER]}(?:\\.${ft[ht.PRERELEASEIDENTIFIER]})*))`),At("PRERELEASELOOSE",`(?:-?(${ft[ht.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${ft[ht.PRERELEASEIDENTIFIERLOOSE]})*))`),At("BUILDIDENTIFIER",`${yt}+`),At("BUILD",`(?:\\+(${ft[ht.BUILDIDENTIFIER]}(?:\\.${ft[ht.BUILDIDENTIFIER]})*))`),At("FULLPLAIN",`v?${ft[ht.MAINVERSION]}${ft[ht.PRERELEASE]}?${ft[ht.BUILD]}?`),At("FULL",`^${ft[ht.FULLPLAIN]}$`),At("LOOSEPLAIN",`[v=\\s]*${ft[ht.MAINVERSIONLOOSE]}${ft[ht.PRERELEASELOOSE]}?${ft[ht.BUILD]}?`),At("LOOSE",`^${ft[ht.LOOSEPLAIN]}$`),At("GTLT","((?:<|>)?=?)"),At("XRANGEIDENTIFIERLOOSE",`${ft[ht.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),At("XRANGEIDENTIFIER",`${ft[ht.NUMERICIDENTIFIER]}|x|X|\\*`),At("XRANGEPLAIN",`[v=\\s]*(${ft[ht.XRANGEIDENTIFIER]})(?:\\.(${ft[ht.XRANGEIDENTIFIER]})(?:\\.(${ft[ht.XRANGEIDENTIFIER]})(?:${ft[ht.PRERELEASE]})?${ft[ht.BUILD]}?)?)?`),At("XRANGEPLAINLOOSE",`[v=\\s]*(${ft[ht.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ft[ht.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ft[ht.XRANGEIDENTIFIERLOOSE]})(?:${ft[ht.PRERELEASELOOSE]})?${ft[ht.BUILD]}?)?)?`),At("XRANGE",`^${ft[ht.GTLT]}\\s*${ft[ht.XRANGEPLAIN]}$`),At("XRANGELOOSE",`^${ft[ht.GTLT]}\\s*${ft[ht.XRANGEPLAINLOOSE]}$`),At("COERCEPLAIN",`(^|[^\\d])(\\d{1,${_e}})(?:\\.(\\d{1,${_e}}))?(?:\\.(\\d{1,${_e}}))?`),At("COERCE",`${ft[ht.COERCEPLAIN]}(?:$|[^\\d])`),At("COERCEFULL",ft[ht.COERCEPLAIN]+`(?:${ft[ht.PRERELEASE]})?(?:${ft[ht.BUILD]})?(?:$|[^\\d])`),At("COERCERTL",ft[ht.COERCE],!0),At("COERCERTLFULL",ft[ht.COERCEFULL],!0),At("LONETILDE","(?:~>?)"),At("TILDETRIM",`(\\s*)${ft[ht.LONETILDE]}\\s+`,!0),j.tildeTrimReplace="$1~",At("TILDE",`^${ft[ht.LONETILDE]}${ft[ht.XRANGEPLAIN]}$`),At("TILDELOOSE",`^${ft[ht.LONETILDE]}${ft[ht.XRANGEPLAINLOOSE]}$`),At("LONECARET","(?:\\^)"),At("CARETTRIM",`(\\s*)${ft[ht.LONECARET]}\\s+`,!0),j.caretTrimReplace="$1^",At("CARET",`^${ft[ht.LONECARET]}${ft[ht.XRANGEPLAIN]}$`),At("CARETLOOSE",`^${ft[ht.LONECARET]}${ft[ht.XRANGEPLAINLOOSE]}$`),At("COMPARATORLOOSE",`^${ft[ht.GTLT]}\\s*(${ft[ht.LOOSEPLAIN]})$|^$`),At("COMPARATOR",`^${ft[ht.GTLT]}\\s*(${ft[ht.FULLPLAIN]})$|^$`),At("COMPARATORTRIM",`(\\s*)${ft[ht.GTLT]}\\s*(${ft[ht.LOOSEPLAIN]}|${ft[ht.XRANGEPLAIN]})`,!0),j.comparatorTrimReplace="$1$2$3",At("HYPHENRANGE",`^\\s*(${ft[ht.XRANGEPLAIN]})\\s+-\\s+(${ft[ht.XRANGEPLAIN]})\\s*$`),At("HYPHENRANGELOOSE",`^\\s*(${ft[ht.XRANGEPLAINLOOSE]})\\s+-\\s+(${ft[ht.XRANGEPLAINLOOSE]})\\s*$`),At("STAR","(<|>)?=?\\s*\\*"),At("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),At("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(re$2,re$2.exports);var reExports=re$2.exports;const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$1=a=>a?typeof a!="object"?looseOption:a:emptyOpts;var parseOptions_1=parseOptions$1;const numeric=/^[0-9]+$/,compareIdentifiers$1=(a,j)=>{const _e=numeric.test(a),et=numeric.test(j);return _e&&et&&(a=+a,j=+j),a===j?0:_e&&!et?-1:et&&!_e?1:a<j?-1:1},rcompareIdentifiers=(a,j)=>compareIdentifiers$1(j,a);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers};const debug$2=debug_1$1,{MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1}=constants$1,{safeRe:re$1,t:t$1}=reExports,parseOptions=parseOptions_1,{compareIdentifiers}=identifiers$1;let SemVer$d=class Zr{constructor(j,_e){if(_e=parseOptions(_e),j instanceof Zr){if(j.loose===!!_e.loose&&j.includePrerelease===!!_e.includePrerelease)return j;j=j.version}else if(typeof j!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof j}".`);if(j.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",j,_e),this.options=_e,this.loose=!!_e.loose,this.includePrerelease=!!_e.includePrerelease;const et=j.trim().match(_e.loose?re$1[t$1.LOOSE]:re$1[t$1.FULL]);if(!et)throw new TypeError(`Invalid Version: ${j}`);if(this.raw=j,this.major=+et[1],this.minor=+et[2],this.patch=+et[3],this.major>MAX_SAFE_INTEGER$1||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER$1||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER$1||this.patch<0)throw new TypeError("Invalid patch version");et[4]?this.prerelease=et[4].split(".").map(nt=>{if(/^[0-9]+$/.test(nt)){const tt=+nt;if(tt>=0&&tt<MAX_SAFE_INTEGER$1)return tt}return nt}):this.prerelease=[],this.build=et[5]?et[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(j){if(debug$2("SemVer.compare",this.version,this.options,j),!(j instanceof Zr)){if(typeof j=="string"&&j===this.version)return 0;j=new Zr(j,this.options)}return j.version===this.version?0:this.compareMain(j)||this.comparePre(j)}compareMain(j){return j instanceof Zr||(j=new Zr(j,this.options)),compareIdentifiers(this.major,j.major)||compareIdentifiers(this.minor,j.minor)||compareIdentifiers(this.patch,j.patch)}comparePre(j){if(j instanceof Zr||(j=new Zr(j,this.options)),this.prerelease.length&&!j.prerelease.length)return-1;if(!this.prerelease.length&&j.prerelease.length)return 1;if(!this.prerelease.length&&!j.prerelease.length)return 0;let _e=0;do{const et=this.prerelease[_e],nt=j.prerelease[_e];if(debug$2("prerelease compare",_e,et,nt),et===void 0&&nt===void 0)return 0;if(nt===void 0)return 1;if(et===void 0)return-1;if(et===nt)continue;return compareIdentifiers(et,nt)}while(++_e)}compareBuild(j){j instanceof Zr||(j=new Zr(j,this.options));let _e=0;do{const et=this.build[_e],nt=j.build[_e];if(debug$2("build compare",_e,et,nt),et===void 0&&nt===void 0)return 0;if(nt===void 0)return 1;if(et===void 0)return-1;if(et===nt)continue;return compareIdentifiers(et,nt)}while(++_e)}inc(j,_e,et){switch(j){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",_e,et);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",_e,et);break;case"prepatch":this.prerelease.length=0,this.inc("patch",_e,et),this.inc("pre",_e,et);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",_e,et),this.inc("pre",_e,et);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const nt=Number(et)?1:0;if(!_e&&et===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[nt];else{let tt=this.prerelease.length;for(;--tt>=0;)typeof this.prerelease[tt]=="number"&&(this.prerelease[tt]++,tt=-2);if(tt===-1){if(_e===this.prerelease.join(".")&&et===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(nt)}}if(_e){let tt=[_e,nt];et===!1&&(tt=[_e]),compareIdentifiers(this.prerelease[0],_e)===0?isNaN(this.prerelease[1])&&(this.prerelease=tt):this.prerelease=tt}break}default:throw new Error(`invalid increment argument: ${j}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var semver$2=SemVer$d;const SemVer$c=semver$2,parse$d=(a,j,_e=!1)=>{if(a instanceof SemVer$c)return a;try{return new SemVer$c(a,j)}catch(et){if(!_e)return null;throw et}};var parse_1=parse$d;const parse$c=parse_1,valid$2=(a,j)=>{const _e=parse$c(a,j);return _e?_e.version:null};var valid_1=valid$2;const parse$b=parse_1,clean$1=(a,j)=>{const _e=parse$b(a.trim().replace(/^[=v]+/,""),j);return _e?_e.version:null};var clean_1=clean$1;const SemVer$b=semver$2,inc$1=(a,j,_e,et,nt)=>{typeof _e=="string"&&(nt=et,et=_e,_e=void 0);try{return new SemVer$b(a instanceof SemVer$b?a.version:a,_e).inc(j,et,nt).version}catch{return null}};var inc_1=inc$1;const parse$a=parse_1,diff$1=(a,j)=>{const _e=parse$a(a,null,!0),et=parse$a(j,null,!0),nt=_e.compare(et);if(nt===0)return null;const tt=nt>0,ot=tt?_e:et,ct=tt?et:_e,ft=!!ot.prerelease.length;if(!!ct.prerelease.length&&!ft)return!ct.patch&&!ct.minor?"major":ot.patch?"patch":ot.minor?"minor":"major";const dt=ft?"pre":"";return _e.major!==et.major?dt+"major":_e.minor!==et.minor?dt+"minor":_e.patch!==et.patch?dt+"patch":"prerelease"};var diff_1=diff$1;const SemVer$a=semver$2,major$1=(a,j)=>new SemVer$a(a,j).major;var major_1=major$1;const SemVer$9=semver$2,minor$1=(a,j)=>new SemVer$9(a,j).minor;var minor_1=minor$1;const SemVer$8=semver$2,patch$1=(a,j)=>new SemVer$8(a,j).patch;var patch_1=patch$1;const parse$9=parse_1,prerelease$1=(a,j)=>{const _e=parse$9(a,j);return _e&&_e.prerelease.length?_e.prerelease:null};var prerelease_1=prerelease$1;const SemVer$7=semver$2,compare$b=(a,j,_e)=>new SemVer$7(a,_e).compare(new SemVer$7(j,_e));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(a,j,_e)=>compare$a(j,a,_e);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(a,j)=>compare$9(a,j,!0);var compareLoose_1=compareLoose$1;const SemVer$6=semver$2,compareBuild$3=(a,j,_e)=>{const et=new SemVer$6(a,_e),nt=new SemVer$6(j,_e);return et.compare(nt)||et.compareBuild(nt)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(a,j)=>a.sort((_e,et)=>compareBuild$2(_e,et,j));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(a,j)=>a.sort((_e,et)=>compareBuild$1(et,_e,j));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(a,j,_e)=>compare$8(a,j,_e)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(a,j,_e)=>compare$7(a,j,_e)<0;var lt_1=lt$3;const compare$6=compare_1,eq$4=(a,j,_e)=>compare$6(a,j,_e)===0;var eq_1=eq$4;const compare$5=compare_1,neq$2=(a,j,_e)=>compare$5(a,j,_e)!==0;var neq_1=neq$2;const compare$4=compare_1,gte$3=(a,j,_e)=>compare$4(a,j,_e)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(a,j,_e)=>compare$3(a,j,_e)<=0;var lte_1=lte$3;const eq$3=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$1=(a,j,_e,et)=>{switch(j){case"===":return typeof a=="object"&&(a=a.version),typeof _e=="object"&&(_e=_e.version),a===_e;case"!==":return typeof a=="object"&&(a=a.version),typeof _e=="object"&&(_e=_e.version),a!==_e;case"":case"=":case"==":return eq$3(a,_e,et);case"!=":return neq$1(a,_e,et);case">":return gt$3(a,_e,et);case">=":return gte$2(a,_e,et);case"<":return lt$2(a,_e,et);case"<=":return lte$2(a,_e,et);default:throw new TypeError(`Invalid operator: ${j}`)}};var cmp_1=cmp$1;const SemVer$5=semver$2,parse$8=parse_1,{safeRe:re,t}=reExports,coerce$1=(a,j)=>{if(a instanceof SemVer$5)return a;if(typeof a=="number"&&(a=String(a)),typeof a!="string")return null;j=j||{};let _e=null;if(!j.rtl)_e=a.match(j.includePrerelease?re[t.COERCEFULL]:re[t.COERCE]);else{const ft=j.includePrerelease?re[t.COERCERTLFULL]:re[t.COERCERTL];let ht;for(;(ht=ft.exec(a))&&(!_e||_e.index+_e[0].length!==a.length);)(!_e||ht.index+ht[0].length!==_e.index+_e[0].length)&&(_e=ht),ft.lastIndex=ht.index+ht[1].length+ht[2].length;ft.lastIndex=-1}if(_e===null)return null;const et=_e[2],nt=_e[3]||"0",tt=_e[4]||"0",ot=j.includePrerelease&&_e[5]?`-${_e[5]}`:"",ct=j.includePrerelease&&_e[6]?`+${_e[6]}`:"";return parse$8(`${et}.${nt}.${tt}${ot}${ct}`,j)};var coerce_1=coerce$1;class LRUCache{constructor(){this.max=1e3,this.map=new Map}get(j){const _e=this.map.get(j);if(_e!==void 0)return this.map.delete(j),this.map.set(j,_e),_e}delete(j){return this.map.delete(j)}set(j,_e){if(!this.delete(j)&&_e!==void 0){if(this.map.size>=this.max){const nt=this.map.keys().next().value;this.delete(nt)}this.map.set(j,_e)}return this}}var lrucache=LRUCache,range,hasRequiredRange;function requireRange(){if(hasRequiredRange)return range;hasRequiredRange=1;const a=/\s+/g;class j{constructor(pt,mt){if(mt=nt(mt),pt instanceof j)return pt.loose===!!mt.loose&&pt.includePrerelease===!!mt.includePrerelease?pt:new j(pt.raw,mt);if(pt instanceof tt)return this.raw=pt.value,this.set=[[pt]],this.formatted=void 0,this;if(this.options=mt,this.loose=!!mt.loose,this.includePrerelease=!!mt.includePrerelease,this.raw=pt.trim().replace(a," "),this.set=this.raw.split("||").map($t=>this.parseRange($t.trim())).filter($t=>$t.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const $t=this.set[0];if(this.set=this.set.filter(xt=>!Rt(xt[0])),this.set.length===0)this.set=[$t];else if(this.set.length>1){for(const xt of this.set)if(xt.length===1&&It(xt[0])){this.set=[xt];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let pt=0;pt<this.set.length;pt++){pt>0&&(this.formatted+="||");const mt=this.set[pt];for(let $t=0;$t<mt.length;$t++)$t>0&&(this.formatted+=" "),this.formatted+=mt[$t].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(pt){const $t=((this.options.includePrerelease&&St)|(this.options.loose&&At))+":"+pt,xt=et.get($t);if(xt)return xt;const vt=this.options.loose,it=vt?ft[ht.HYPHENRANGELOOSE]:ft[ht.HYPHENRANGE];pt=pt.replace(it,rt(this.options.includePrerelease)),ot("hyphen replace",pt),pt=pt.replace(ft[ht.COMPARATORTRIM],dt),ot("comparator trim",pt),pt=pt.replace(ft[ht.TILDETRIM],yt),ot("tilde trim",pt),pt=pt.replace(ft[ht.CARETTRIM],Tt),ot("caret trim",pt);let bt=pt.split(" ").map(Ot=>kt(Ot,this.options)).join(" ").split(/\s+/).map(Ot=>wt(Ot,this.options));vt&&(bt=bt.filter(Ot=>(ot("loose invalid filter",Ot,this.options),!!Ot.match(ft[ht.COMPARATORLOOSE])))),ot("range list",bt);const Mt=new Map,Lt=bt.map(Ot=>new tt(Ot,this.options));for(const Ot of Lt){if(Rt(Ot))return[Ot];Mt.set(Ot.value,Ot)}Mt.size>1&&Mt.has("")&&Mt.delete("");const Ht=[...Mt.values()];return et.set($t,Ht),Ht}intersects(pt,mt){if(!(pt instanceof j))throw new TypeError("a Range is required");return this.set.some($t=>Ct($t,mt)&&pt.set.some(xt=>Ct(xt,mt)&&$t.every(vt=>xt.every(it=>vt.intersects(it,mt)))))}test(pt){if(!pt)return!1;if(typeof pt=="string")try{pt=new ct(pt,this.options)}catch{return!1}for(let mt=0;mt<this.set.length;mt++)if(st(this.set[mt],pt,this.options))return!0;return!1}}range=j;const _e=lrucache,et=new _e,nt=parseOptions_1,tt=requireComparator(),ot=debug_1$1,ct=semver$2,{safeRe:ft,t:ht,comparatorTrimReplace:dt,tildeTrimReplace:yt,caretTrimReplace:Tt}=reExports,{FLAG_INCLUDE_PRERELEASE:St,FLAG_LOOSE:At}=constants$1,Rt=ut=>ut.value==="<0.0.0-0",It=ut=>ut.value==="",Ct=(ut,pt)=>{let mt=!0;const $t=ut.slice();let xt=$t.pop();for(;mt&&$t.length;)mt=$t.every(vt=>xt.intersects(vt,pt)),xt=$t.pop();return mt},kt=(ut,pt)=>(ot("comp",ut,pt),ut=jt(ut,pt),ot("caret",ut),ut=Bt(ut,pt),ot("tildes",ut),ut=Gt(ut,pt),ot("xrange",ut),ut=hn(ut,pt),ot("stars",ut),ut),Pt=ut=>!ut||ut.toLowerCase()==="x"||ut==="*",Bt=(ut,pt)=>ut.trim().split(/\s+/).map(mt=>Kt(mt,pt)).join(" "),Kt=(ut,pt)=>{const mt=pt.loose?ft[ht.TILDELOOSE]:ft[ht.TILDE];return ut.replace(mt,($t,xt,vt,it,bt)=>{ot("tilde",ut,$t,xt,vt,it,bt);let Mt;return Pt(xt)?Mt="":Pt(vt)?Mt=`>=${xt}.0.0 <${+xt+1}.0.0-0`:Pt(it)?Mt=`>=${xt}.${vt}.0 <${xt}.${+vt+1}.0-0`:bt?(ot("replaceTilde pr",bt),Mt=`>=${xt}.${vt}.${it}-${bt} <${xt}.${+vt+1}.0-0`):Mt=`>=${xt}.${vt}.${it} <${xt}.${+vt+1}.0-0`,ot("tilde return",Mt),Mt})},jt=(ut,pt)=>ut.trim().split(/\s+/).map(mt=>zt(mt,pt)).join(" "),zt=(ut,pt)=>{ot("caret",ut,pt);const mt=pt.loose?ft[ht.CARETLOOSE]:ft[ht.CARET],$t=pt.includePrerelease?"-0":"";return ut.replace(mt,(xt,vt,it,bt,Mt)=>{ot("caret",ut,xt,vt,it,bt,Mt);let Lt;return Pt(vt)?Lt="":Pt(it)?Lt=`>=${vt}.0.0${$t} <${+vt+1}.0.0-0`:Pt(bt)?vt==="0"?Lt=`>=${vt}.${it}.0${$t} <${vt}.${+it+1}.0-0`:Lt=`>=${vt}.${it}.0${$t} <${+vt+1}.0.0-0`:Mt?(ot("replaceCaret pr",Mt),vt==="0"?it==="0"?Lt=`>=${vt}.${it}.${bt}-${Mt} <${vt}.${it}.${+bt+1}-0`:Lt=`>=${vt}.${it}.${bt}-${Mt} <${vt}.${+it+1}.0-0`:Lt=`>=${vt}.${it}.${bt}-${Mt} <${+vt+1}.0.0-0`):(ot("no pr"),vt==="0"?it==="0"?Lt=`>=${vt}.${it}.${bt}${$t} <${vt}.${it}.${+bt+1}-0`:Lt=`>=${vt}.${it}.${bt}${$t} <${vt}.${+it+1}.0-0`:Lt=`>=${vt}.${it}.${bt} <${+vt+1}.0.0-0`),ot("caret return",Lt),Lt})},Gt=(ut,pt)=>(ot("replaceXRanges",ut,pt),ut.split(/\s+/).map(mt=>tn(mt,pt)).join(" ")),tn=(ut,pt)=>{ut=ut.trim();const mt=pt.loose?ft[ht.XRANGELOOSE]:ft[ht.XRANGE];return ut.replace(mt,($t,xt,vt,it,bt,Mt)=>{ot("xRange",ut,$t,xt,vt,it,bt,Mt);const Lt=Pt(vt),Ht=Lt||Pt(it),Ot=Ht||Pt(bt),Jt=Ot;return xt==="="&&Jt&&(xt=""),Mt=pt.includePrerelease?"-0":"",Lt?xt===">"||xt==="<"?$t="<0.0.0-0":$t="*":xt&&Jt?(Ht&&(it=0),bt=0,xt===">"?(xt=">=",Ht?(vt=+vt+1,it=0,bt=0):(it=+it+1,bt=0)):xt==="<="&&(xt="<",Ht?vt=+vt+1:it=+it+1),xt==="<"&&(Mt="-0"),$t=`${xt+vt}.${it}.${bt}${Mt}`):Ht?$t=`>=${vt}.0.0${Mt} <${+vt+1}.0.0-0`:Ot&&($t=`>=${vt}.${it}.0${Mt} <${vt}.${+it+1}.0-0`),ot("xRange return",$t),$t})},hn=(ut,pt)=>(ot("replaceStars",ut,pt),ut.trim().replace(ft[ht.STAR],"")),wt=(ut,pt)=>(ot("replaceGTE0",ut,pt),ut.trim().replace(ft[pt.includePrerelease?ht.GTE0PRE:ht.GTE0],"")),rt=ut=>(pt,mt,$t,xt,vt,it,bt,Mt,Lt,Ht,Ot,Jt)=>(Pt($t)?mt="":Pt(xt)?mt=`>=${$t}.0.0${ut?"-0":""}`:Pt(vt)?mt=`>=${$t}.${xt}.0${ut?"-0":""}`:it?mt=`>=${mt}`:mt=`>=${mt}${ut?"-0":""}`,Pt(Lt)?Mt="":Pt(Ht)?Mt=`<${+Lt+1}.0.0-0`:Pt(Ot)?Mt=`<${Lt}.${+Ht+1}.0-0`:Jt?Mt=`<=${Lt}.${Ht}.${Ot}-${Jt}`:ut?Mt=`<${Lt}.${Ht}.${+Ot+1}-0`:Mt=`<=${Mt}`,`${mt} ${Mt}`.trim()),st=(ut,pt,mt)=>{for(let $t=0;$t<ut.length;$t++)if(!ut[$t].test(pt))return!1;if(pt.prerelease.length&&!mt.includePrerelease){for(let $t=0;$t<ut.length;$t++)if(ot(ut[$t].semver),ut[$t].semver!==tt.ANY&&ut[$t].semver.prerelease.length>0){const xt=ut[$t].semver;if(xt.major===pt.major&&xt.minor===pt.minor&&xt.patch===pt.patch)return!0}return!1}return!0};return range}var comparator,hasRequiredComparator;function requireComparator(){if(hasRequiredComparator)return comparator;hasRequiredComparator=1;const a=Symbol("SemVer ANY");class j{static get ANY(){return a}constructor(dt,yt){if(yt=_e(yt),dt instanceof j){if(dt.loose===!!yt.loose)return dt;dt=dt.value}dt=dt.trim().split(/\s+/).join(" "),ot("comparator",dt,yt),this.options=yt,this.loose=!!yt.loose,this.parse(dt),this.semver===a?this.value="":this.value=this.operator+this.semver.version,ot("comp",this)}parse(dt){const yt=this.options.loose?et[nt.COMPARATORLOOSE]:et[nt.COMPARATOR],Tt=dt.match(yt);if(!Tt)throw new TypeError(`Invalid comparator: ${dt}`);this.operator=Tt[1]!==void 0?Tt[1]:"",this.operator==="="&&(this.operator=""),Tt[2]?this.semver=new ct(Tt[2],this.options.loose):this.semver=a}toString(){return this.value}test(dt){if(ot("Comparator.test",dt,this.options.loose),this.semver===a||dt===a)return!0;if(typeof dt=="string")try{dt=new ct(dt,this.options)}catch{return!1}return tt(dt,this.operator,this.semver,this.options)}intersects(dt,yt){if(!(dt instanceof j))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ft(dt.value,yt).test(this.value):dt.operator===""?dt.value===""?!0:new ft(this.value,yt).test(dt.semver):(yt=_e(yt),yt.includePrerelease&&(this.value==="<0.0.0-0"||dt.value==="<0.0.0-0")||!yt.includePrerelease&&(this.value.startsWith("<0.0.0")||dt.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&dt.operator.startsWith(">")||this.operator.startsWith("<")&&dt.operator.startsWith("<")||this.semver.version===dt.semver.version&&this.operator.includes("=")&&dt.operator.includes("=")||tt(this.semver,"<",dt.semver,yt)&&this.operator.startsWith(">")&&dt.operator.startsWith("<")||tt(this.semver,">",dt.semver,yt)&&this.operator.startsWith("<")&&dt.operator.startsWith(">")))}}comparator=j;const _e=parseOptions_1,{safeRe:et,t:nt}=reExports,tt=cmp_1,ot=debug_1$1,ct=semver$2,ft=requireRange();return comparator}const Range$9=requireRange(),satisfies$4=(a,j,_e)=>{try{j=new Range$9(j,_e)}catch{return!1}return j.test(a)};var satisfies_1=satisfies$4;const Range$8=requireRange(),toComparators$1=(a,j)=>new Range$8(a,j).set.map(_e=>_e.map(et=>et.value).join(" ").trim().split(" "));var toComparators_1=toComparators$1;const SemVer$4=semver$2,Range$7=requireRange(),maxSatisfying$1=(a,j,_e)=>{let et=null,nt=null,tt=null;try{tt=new Range$7(j,_e)}catch{return null}return a.forEach(ot=>{tt.test(ot)&&(!et||nt.compare(ot)===-1)&&(et=ot,nt=new SemVer$4(et,_e))}),et};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$2,Range$6=requireRange(),minSatisfying$1=(a,j,_e)=>{let et=null,nt=null,tt=null;try{tt=new Range$6(j,_e)}catch{return null}return a.forEach(ot=>{tt.test(ot)&&(!et||nt.compare(ot)===1)&&(et=ot,nt=new SemVer$3(et,_e))}),et};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$2,Range$5=requireRange(),gt$2=gt_1,minVersion$1=(a,j)=>{a=new Range$5(a,j);let _e=new SemVer$2("0.0.0");if(a.test(_e)||(_e=new SemVer$2("0.0.0-0"),a.test(_e)))return _e;_e=null;for(let et=0;et<a.set.length;++et){const nt=a.set[et];let tt=null;nt.forEach(ot=>{const ct=new SemVer$2(ot.semver.version);switch(ot.operator){case">":ct.prerelease.length===0?ct.patch++:ct.prerelease.push(0),ct.raw=ct.format();case"":case">=":(!tt||gt$2(ct,tt))&&(tt=ct);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${ot.operator}`)}}),tt&&(!_e||gt$2(_e,tt))&&(_e=tt)}return _e&&a.test(_e)?_e:null};var minVersion_1=minVersion$1;const Range$4=requireRange(),validRange$1=(a,j)=>{try{return new Range$4(a,j).range||"*"}catch{return null}};var valid$1=validRange$1;const SemVer$1=semver$2,Comparator$2=requireComparator(),{ANY:ANY$1}=Comparator$2,Range$3=requireRange(),satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(a,j,_e,et)=>{a=new SemVer$1(a,et),j=new Range$3(j,et);let nt,tt,ot,ct,ft;switch(_e){case">":nt=gt$1,tt=lte$1,ot=lt$1,ct=">",ft=">=";break;case"<":nt=lt$1,tt=gte$1,ot=gt$1,ct="<",ft="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(a,j,et))return!1;for(let ht=0;ht<j.set.length;++ht){const dt=j.set[ht];let yt=null,Tt=null;if(dt.forEach(St=>{St.semver===ANY$1&&(St=new Comparator$2(">=0.0.0")),yt=yt||St,Tt=Tt||St,nt(St.semver,yt.semver,et)?yt=St:ot(St.semver,Tt.semver,et)&&(Tt=St)}),yt.operator===ct||yt.operator===ft||(!Tt.operator||Tt.operator===ct)&&tt(a,Tt.semver))return!1;if(Tt.operator===ft&&ot(a,Tt.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(a,j,_e)=>outside$2(a,j,">",_e);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(a,j,_e)=>outside$1(a,j,"<",_e);var ltr_1=ltr$1;const Range$2=requireRange(),intersects$1=(a,j,_e)=>(a=new Range$2(a,_e),j=new Range$2(j,_e),a.intersects(j,_e));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(a,j,_e)=>{const et=[];let nt=null,tt=null;const ot=a.sort((dt,yt)=>compare$2(dt,yt,_e));for(const dt of ot)satisfies$2(dt,j,_e)?(tt=dt,nt||(nt=dt)):(tt&&et.push([nt,tt]),tt=null,nt=null);nt&&et.push([nt,null]);const ct=[];for(const[dt,yt]of et)dt===yt?ct.push(dt):!yt&&dt===ot[0]?ct.push("*"):yt?dt===ot[0]?ct.push(`<=${yt}`):ct.push(`${dt} - ${yt}`):ct.push(`>=${dt}`);const ft=ct.join(" || "),ht=typeof j.raw=="string"?j.raw:String(j);return ft.length<ht.length?ft:j};const Range$1=requireRange(),Comparator$1=requireComparator(),{ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(a,j,_e={})=>{if(a===j)return!0;a=new Range$1(a,_e),j=new Range$1(j,_e);let et=!1;e:for(const nt of a.set){for(const tt of j.set){const ot=simpleSubset(nt,tt,_e);if(et=et||ot!==null,ot)continue e}if(et)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(a,j,_e)=>{if(a===j)return!0;if(a.length===1&&a[0].semver===ANY){if(j.length===1&&j[0].semver===ANY)return!0;_e.includePrerelease?a=minimumVersionWithPreRelease:a=minimumVersion}if(j.length===1&&j[0].semver===ANY){if(_e.includePrerelease)return!0;j=minimumVersion}const et=new Set;let nt,tt;for(const St of a)St.operator===">"||St.operator===">="?nt=higherGT(nt,St,_e):St.operator==="<"||St.operator==="<="?tt=lowerLT(tt,St,_e):et.add(St.semver);if(et.size>1)return null;let ot;if(nt&&tt){if(ot=compare$1(nt.semver,tt.semver,_e),ot>0)return null;if(ot===0&&(nt.operator!==">="||tt.operator!=="<="))return null}for(const St of et){if(nt&&!satisfies$1(St,String(nt),_e)||tt&&!satisfies$1(St,String(tt),_e))return null;for(const At of j)if(!satisfies$1(St,String(At),_e))return!1;return!0}let ct,ft,ht,dt,yt=tt&&!_e.includePrerelease&&tt.semver.prerelease.length?tt.semver:!1,Tt=nt&&!_e.includePrerelease&&nt.semver.prerelease.length?nt.semver:!1;yt&&yt.prerelease.length===1&&tt.operator==="<"&&yt.prerelease[0]===0&&(yt=!1);for(const St of j){if(dt=dt||St.operator===">"||St.operator===">=",ht=ht||St.operator==="<"||St.operator==="<=",nt){if(Tt&&St.semver.prerelease&&St.semver.prerelease.length&&St.semver.major===Tt.major&&St.semver.minor===Tt.minor&&St.semver.patch===Tt.patch&&(Tt=!1),St.operator===">"||St.operator===">="){if(ct=higherGT(nt,St,_e),ct===St&&ct!==nt)return!1}else if(nt.operator===">="&&!satisfies$1(nt.semver,String(St),_e))return!1}if(tt){if(yt&&St.semver.prerelease&&St.semver.prerelease.length&&St.semver.major===yt.major&&St.semver.minor===yt.minor&&St.semver.patch===yt.patch&&(yt=!1),St.operator==="<"||St.operator==="<="){if(ft=lowerLT(tt,St,_e),ft===St&&ft!==tt)return!1}else if(tt.operator==="<="&&!satisfies$1(tt.semver,String(St),_e))return!1}if(!St.operator&&(tt||nt)&&ot!==0)return!1}return!(nt&&ht&&!tt&&ot!==0||tt&&dt&&!nt&&ot!==0||Tt||yt)},higherGT=(a,j,_e)=>{if(!a)return j;const et=compare$1(a.semver,j.semver,_e);return et>0?a:et<0||j.operator===">"&&a.operator===">="?j:a},lowerLT=(a,j,_e)=>{if(!a)return j;const et=compare$1(a.semver,j.semver,_e);return et<0?a:et>0||j.operator==="<"&&a.operator==="<="?j:a};var subset_1=subset$1;const internalRe=reExports,constants=constants$1,SemVer=semver$2,identifiers=identifiers$1,parse$7=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq$2=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=requireComparator(),Range=requireRange(),satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse$7,valid,clean,inc,diff,major,minor,patch,prerelease,compare,rcompare,compareLoose,compareBuild,sort,rsort,gt,lt,eq:eq$2,neq,gte,lte,cmp,coerce,Comparator,Range,satisfies,toComparators,maxSatisfying,minSatisfying,minVersion,validRange,outside,gtr,ltr,intersects,simplifyRange,subset,SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers};const semver$1=getDefaultExportFromCjs$1(semver),BLACK_LIST=[`${AUTH_SERVICE_PREFIX}/connect`,`${AUTH_SERVICE_PREFIX}/login`,`${AUTH_SERVICE_PREFIX}/invite`,`${AUTH_SERVICE_PREFIX}/issue-passport`,`${AUTH_SERVICE_PREFIX}/oauth/*`],blackListRoute=BLACK_LIST.map(a=>pathToRegexp$1(a,[]));async function login(){const a=(window==null?void 0:window.blocklet)||{},j=window.location.pathname,{componentId:_e,CHAIN_TYPE:et="arcblock",appPid:nt}=a;if(blackListRoute.some(ct=>ct.exec(j)))return null;const ot=getApps();try{const ft=new URLSearchParams(window.location.search).get("inviter")||localStorage.getItem("inviter"),ht=withQuery(joinURL(window.location.origin,AUTH_SERVICE_PREFIX,"/api/user/loginByWallet"),{inviter:ft});return await default_1$3.asyncCall("arcLogin",{target:ht,chainType:et,appPid:nt,componentId:_e,apps:ot.map(yt=>{let Tt=yt==null?void 0:yt.appLogo;return isUrl(Tt)||(Tt=joinURL(yt.appUrl,Tt)),{appName:yt.appName,appPid:yt.appPid,appUrl:yt.appUrl,appLogo:Tt,sourceAppPid:yt.sourceAppPid}})})}catch(ct){return console.error(ct),null}}async function getVisitorId(){return await default_1$3.asyncCall("arcGetVisitorId")}function checkEnableAutoLogin({platform:a,version:j}={}){return!!(a==="ios"&&j&&semver$1.gte(j,"4.15.6")||a==="android"&&j&&semver$1.gte(j,"4.15.1"))}async function didSpacesIsRequired(a){var nt;if((nt=a==null?void 0:a.didSpace)!=null&&nt.endpoint||!window.blocklet||window.self!==window.top)return!1;const j=getWalletDid(a);if(isEmpty$1(j))return!1;const{componentMountPoints:_e}=window.blocklet,[,et]=window.blocklet.componentId.split("/");return _e.some(tt=>{var ot;return((ot=tt==null?void 0:tt.capabilities)==null?void 0:ot.didSpace)==="requiredOnConnect"&&et===tt.did})}const{Provider:Provider$4,Consumer:Consumer$4}=SessionContext$1,didConnectTimeoutError={en:"DID Connect timeout, please reopen DID Connect popup",zh:"DID Connect 超时, 请重新打开 DID Connect"},waitForDidConnect={en:"DID Connect is already opened, please wait for it to complete",zh:"DID Connect 已打开,请等待完成"};function createSessionContext(a=SESSION_TOKEN_STORAGE_KEY,j="ls",_e={},et={}){var ht;let nt="/";(ht=globalThis==null?void 0:globalThis.blocklet)!=null&&ht.prefix&&(nt=globalThis.blocklet.prefix),typeof et=="boolean"&&(et={appendAuthServicePrefix:et,extraParams:{}}),defaultsDeep$1(et,{rolling:!0,appendAuthServicePrefix:!1,extraParams:{},refreshTokenStorageKey:REFRESH_TOKEN_STORAGE_KEY});const tt=createStorage(a,j,_e),ot=createStorage(et.refreshTokenStorageKey,"ls");function ct(dt){var Dn,xn;const{connectApi:yt,connectHolder:Tt}=useConnect(),St=useBrowser(),At=useReactive({extraParams:{},options:{},currentLocale:dt.locale,allowWallet:void 0,openMode:"window",get autoConnect(){return typeof dt.autoConnect=="boolean"?dt.autoConnect:!!dt.autoLogin},get prefix(){return et.appendAuthServicePrefix||dt.appendAuthServicePrefix?joinURL(AUTH_SERVICE_PREFIX,dt.prefix):dt.prefix}}),Rt=useReactive({action:dt.action,error:"",initialized:!1,loading:!1,open:!1,user:null,provider:"",walletOS:"",baseUrl:""}),It=useCreation(()=>dt.locale||At.currentLocale||getBrowserLang(),[dt.locale,At.currentLocale]),{confirmApi:Ct,confirmHolder:kt}=useConfirm(),Pt=useMemoizedFn(()=>{if(Rt.open){const wn=waitForDidConnect[It]||waitForDidConnect.en;throw Toast$1.warning(wn),new Error(wn)}}),Bt=useCreation(()=>new EventEmitter$6,[]),Kt=useMemoizedFn((wn,jn,Rn)=>{const Pn={login:[EVENTS.LOGIN,EVENTS.CANCEL_LOGIN],"bind-wallet":[EVENTS.BIND_WALLET,EVENTS.CANCEL_BIND_WALLET],"switch-passport":[EVENTS.SWITCH_PASSPORT,EVENTS.CANCEL_SWITCH_PASSPORT],"switch-profile":[EVENTS.SWITCH_PROFILE,EVENTS.CANCEL_SWITCH_PROFILE],"switch-did":[EVENTS.LOGIN,EVENTS.CANCEL_LOGIN]};if(!Object.keys(Pn).includes(wn))return;const tr=async(...Bn)=>{isFunction$8(jn)&&await jn(...Bn),Bt.emit(wn,...Bn)};Bt.once(Pn[wn][0],tr),Bt.once(Pn[wn][1],async(...Bn)=>{isFunction$8(tr)&&Bt.off(Pn[wn][0],tr),isFunction$8(Rn)&&await Rn(...Bn),Bt.emit(`cancel-${wn}`,...Bn)})}),jt=usePrevious(Rt.initialized,(wn,jn)=>wn!==jn||wn===!0&&jn===!0),{handleRefreshUser:zt,handleRefreshToken:Gt,renewToken:tn,clearSession:hn,handleLoginResult:wt,decrypt:rt,service:st,getSessionToken:ut,getRefreshToken:pt,setRefreshToken:mt,setSessionToken:$t}=useSessionToken({state:Rt,pageState:At,sessionTokenStorage:tt,refreshTokenStorage:ot,serviceHost:dt.serviceHost,apiOptions:dt.apiOptions,lazyRefreshToken:dt.lazyRefreshToken}),xt=useMemoizedFn((wn,jn={},Rn={})=>{Pt();const Pn=wn;typeof Pn=="object"&&(wn=Pn.onSuccess,jn=Pn.extraParams||{},Rn=Pn.options||{},Rn.origin=Pn.origin||""),(!Rt.user||Rn.origin==="switch-did")&&(Rn.origin==="switch-did"?Kt("switch-did",wn,Pn==null?void 0:Pn.onCancel):Kt("login",wn,Pn==null?void 0:Pn.onCancel),At.extraParams=jn,At.options=Rn,Rt.action="login",In())}),vt=useMemoizedFn(async(wn,jn={},Rn={})=>{var Fn;Pt();const Pn=wn;typeof Pn=="object"&&(wn=Pn.onSuccess,jn=Pn.extraParams||{},Rn=Pn.options||{}),isUndefined$2(jn==null?void 0:jn.inviter)&&window.localStorage.getItem("inviter")&&(jn.inviter=window.localStorage.getItem("inviter"));const{params:tr}=await decodeUrlParams();if(isUndefined$2(jn==null?void 0:jn.forceConnected)&&(tr!=null&&tr.forceConnected)&&(jn.forceConnected=tr.forceConnected,isUndefined$2(Rn.showQuickConnect)&&(Rn.showQuickConnect=!1)),isUndefined$2(jn==null?void 0:jn.sourceAppPid)&&!isUndefined$2(tr==null?void 0:tr.sourceAppPid)&&(jn.sourceAppPid=tr.sourceAppPid),(jn==null?void 0:jn.openMode)==="redirect"){const Gn=(jn==null?void 0:jn.redirect)||"/",Tr=new URL(`${AUTH_SERVICE_PREFIX}/login`,window.location.origin);Tr.searchParams.set("redirect",Gn),jn!=null&&jn.forceConnected&&Tr.searchParams.set("forceConnected",jn==null?void 0:jn.forceConnected),isUndefined$2(jn==null?void 0:jn.sourceAppPid)||Tr.searchParams.set("sourceAppPid",jn==null?void 0:jn.sourceAppPid),isUndefined$2(jn==null?void 0:jn.inviter)||Tr.searchParams.set("inviter",jn==null?void 0:jn.inviter),Rn!=null&&Rn.origin&&Tr.searchParams.set("origin",Rn.origin),window.location.href=Tr.href;return}let Bn=jn==null?void 0:jn.sourceAppPid;isUndefined$2(Bn)&&An&&(Bn=Tn.appPid),await pWaitFor$1(()=>Rt.initialized),typeof Rn=="string"&&(Rn={origin:Rn});const qn=cloneDeep$1(jn);At.allowWallet=void 0;const $r=(qn==null?void 0:qn.openMode)||((Fn=dt==null?void 0:dt.extraParams)==null?void 0:Fn.openMode);isUndefined$2($r)?At.openMode="window":At.openMode=$r,Bn?Rt.baseUrl=globalThis.blocklet.appUrl:Rt.baseUrl="",xt(wn,qn,Rn)}),it=getVisitorId$2(),bt=useMemoizedFn(async wn=>{const jn=joinURL(AUTH_SERVICE_PREFIX,"/api/user/logout");await fetch(jn,{method:"POST",body:JSON.stringify({visitorId:it}),headers:{"Content-Type":"application/json"}}),hn(),Sn(),Rt.user=null,Rt.provider="",Rt.walletOS="",Rt.error="",Rt.loading=!1,Bt.emit("logout"),typeof wn=="function"&&wn()}),{userSessions:Mt,refresh:Lt,loaded:Ht,loginUserSession:Ot}=useQuickConnect({appPid:getCurrentAppPid(Rt.user),loginAppPid:(Dn=globalThis==null?void 0:globalThis.blocklet)==null?void 0:Dn.appPid,sourceAppPid:(xn=Rt==null?void 0:Rt.user)==null?void 0:xn.sourceAppPid,autoFetch:!1,fetchAll:!0}),Jt=useMemoizedFn(async()=>{Rt!=null&&Rt.user||await new Promise(wn=>{vt(()=>{wn()})})}),Ft=useMemoizedFn((wn,jn={},Rn={})=>{Pt();const Pn=wn;typeof Pn=="object"&&(wn=Pn.onSuccess,jn=Pn.extraParams||{},Rn=Pn.options||{}),typeof Rn=="string"&&(Rn={origin:Rn}),Rn!=null&&Rn.userSession?Ot(Rn.userSession).then(tr=>{updateConnectedInfo({connected_did:Rn.userSession.user.did,connected_pk:Rn.userSession.user.pk,connected_wallet_os:Rn.userSession.extra.walletOS,connected_app:getAppId$1()},!0),Kt("switch-did",wn),wt({...tr,encrypted:!1}),zt({showProgress:!0}).then(async()=>{await sleep$1(),Bt.emit(EVENTS.LOGIN,tr,rt,Yt.current),await Vt()})}):(isUndefined$2(jn==null?void 0:jn.forceConnected)&&(jn.forceConnected=!1),vt(wn,jn,{...Rn,origin:"switch-did"}))}),Zt=useMemoizedFn(async()=>{await new BlockletSDK().user.refreshProfile()}),nn=useMemoizedFn(async(wn,jn={})=>{await Jt(),Pt();const Rn=wn;typeof Rn=="object"&&(wn=Rn.onSuccess,jn=Rn.extraParams||{}),Kt("switch-profile",wn,Rn==null?void 0:Rn.onCancel),At.extraParams=jn,At.options={},Rt.action="switch-profile",In()}),cn=useMemoizedFn(async(wn,jn={})=>{await Jt(),Pt();const Rn=wn;typeof Rn=="object"&&(wn=Rn.onSuccess,jn=Rn.extraParams||{}),Kt("switch-passport",wn,Rn==null?void 0:Rn.onCancel),At.extraParams=jn,At.options={},Rt.action="switch-passport",In()}),qt=useMemoizedFn(async({extraParams:wn={},onSuccess:jn=()=>{},...Rn}={})=>{await Jt(),Pt(),At.extraParams={referrer:window.location.href,purpose:"authorize-for-import",...wn},At.options={},Rt.action="connect-to-did-spaces-for-user",In({hideCloseButton:!0,onSuccess:jn,...Rn})}),Dt=useMemoizedFn(async({extraParams:wn={},onSuccess:jn={}}={})=>{await Jt(),qt({extraParams:{purpose:"authorize-for-import",...wn},onSuccess:jn,hideCloseButton:!1})}),Vt=useMemoizedFn(async({extraParams:wn={},onSuccess:jn={}}={})=>{await Jt(),await didSpacesIsRequired(Rt==null?void 0:Rt.user)&&qt({extraParams:{purpose:"authorize-for-full-access",...wn},onSuccess:jn})}),an=useMemoizedFn(async(wn,jn={})=>{if(await Jt(),getWalletDid(Rt.user)){wn({},rt,Yt.current);return}Pt();const Rn=wn;typeof Rn=="object"&&(wn=Rn.onSuccess),Kt("bind-wallet",wn,Rn==null?void 0:Rn.onCancel),At.extraParams=jn,At.options={},Rt.action="bind-wallet",In()}),Xt=useMemoizedFn(async wn=>{At.extraParams={},At.options={},wt(wn),Rt.loading=!1,await zt({showProgress:!0}),await sleep$1(),Rt.action==="login"?(Bt.emit(EVENTS.LOGIN,wn,rt,Yt.current),Vt()):Rt.action==="switch-passport"&&Bt.emit(EVENTS.SWITCH_PASSPORT,wn,rt,Yt.current)}),pn=useMemoizedFn(wn=>{At.extraParams={},At.options={},wt(wn),Rt.loading=!1,zt({showProgress:!0}).then(async()=>{await sleep$1(),Bt.emit(EVENTS.BIND_WALLET,wn,rt,Yt.current)})}),En=useMemoizedFn(()=>{zt({showProgress:!0}),Bt.emit(EVENTS.CONNECT_TO_DID_SPACE_FOR_FULL_ACCESS)}),sn=useMemoizedFn(wn=>{At.extraParams={},At.options={},Rt.loading=!1,zt({showProgress:!0}).then(async()=>{await sleep$1(),Bt.emit(EVENTS.SWITCH_PROFILE,wn,rt,Yt.current)})}),dn=useMemoizedFn(wn=>{At.extraParams={},At.options={},Sn();const jn={login:EVENTS.CANCEL_LOGIN,"switch-profile":EVENTS.CANCEL_SWITCH_PROFILE,"switch-passport":EVENTS.CANCEL_SWITCH_PASSPORT,"bind-wallet":EVENTS.CANCEL_BIND_WALLET};Bt.emit(jn[wn])}),Mn=useMemoizedFn((wn,...jn)=>{try{$n[wn](...jn)}catch(Rn){console.error("Catch error in onSuccess",{action:wn,args:jn,err:Rn})}}),{federatedMaster:yn,federatedEnabled:An,master:Tn}=useFederated({locale:It,decrypt:rt,login:xt,handleLoginResult:wt,handleRefreshUser:zt,setRefreshToken:mt,setSessionToken:$t}),{checkMatch:gn}=useProtectedRoutes({protectedRoutes:dt.protectedRoutes||[]}),vn=useLatest(Mt),Ln=useMemoizedFn(async()=>(Ht||(await Lt(),await sleep$1()),vn.current)),Sn=useMemoizedFn(()=>{Rt.open=!1,yt.close()}),In=async(wn={})=>{var qn,$r,Fn,Gn,Tr,Vn,Kn;let jn=Rt.action;((qn=At==null?void 0:At.options)==null?void 0:qn.origin)==="switch-did"&&(jn=($r=At==null?void 0:At.options)==null?void 0:$r.origin);const Rn=translations$2[jn],Pn=Rn[It]||Rn.en,tr={...et.extraParams,...dt.extraParams,...At.extraParams,previousUserDid:(Fn=Rt==null?void 0:Rt.user)==null?void 0:Fn.did,email:(Gn=Rt==null?void 0:Rt.user)==null?void 0:Gn.email};if(jn==="switch-did"&&(tr!=null&&tr.forceConnected)){const br=(Un,Yn={})=>translate(translations$2["switch-specified-did"],Un,It,"en",Yn);Pn.title=br("title"),Pn.scan=br("scan",{did:tr.forceConnected}),Pn.confirm=br("confirm"),Pn.success=br("success")}tr==null||delete tr.openMode;const Bn={action:Rt.action,locale:It,hideCloseButton:wn==null?void 0:wn.hideCloseButton,extraParams:tr,options:{...dt.options||{},...At.options},checkTimeout:dt.timeout,webWalletUrl:dt.webWalletUrl,messages:Pn,useSocket:dt.useSocket,...omit$1(dt,["action","locale","serviceHost","appendAuthServicePrefix","autoDisconnect","children","timeout","extraParams","options","webWalletUrl","messages","useSocket","lazyRefreshToken","apiOptions","protectedRoutes"]),...pick$2(At.extraParams||{},["autoConnect","forceConnected","saveConnect","useSocket"]),prefix:At.prefix,allowWallet:isUndefined$2(At.allowWallet)?Rt.action!=="login"||(((Tr=globalThis.blocklet)==null?void 0:Tr.DID_CONNECT_ALLOW_WALLET)||"1")==="1":At.allowWallet,onSuccess:async(...br)=>{Mn(Rt.action,...br),isFunction$8(wn==null?void 0:wn.onSuccess)&&await wn.onSuccess(...br),Rt.open=!1},onClose(...br){dn(Rt.action,...br)},onError(br){console.error(br)}};if(Rt.open=!0,["login"].includes(Rt.action)&&At.openMode==="window"&&!St.wallet)try{const br={...Bn,baseUrl:window.location.origin};isUrl(At.prefix)||(br.prefix=joinURL(window.location.origin,dt.serviceHost==="/"?"":dt.serviceHost,At.prefix)),(Vn=br.extraParams)!=null&&Vn.provider||(br.extraParams.provider=((Kn=Rt==null?void 0:Rt.user)==null?void 0:Kn.provider)||"wallet"),await yt.openPopup(br,{locale:It})}catch(br){br instanceof NotOpenError&&Sn(),br.message==="Timeout"?Toast$1.error(didConnectTimeoutError[It]||didConnectTimeoutError.en):console.error(br)}else yt.open(Bn)},Nn=useMemoizedFn(async()=>{const{params:wn,url:jn}=await decodeUrlParams();if(wn){const{switchBehavior:Rn,forceConnected:Pn,sourceAppPid:tr,showClose:Bn}=wn;Pn===Rt.user.did?window.history.replaceState(null,"trim",jn):Rn==="required"?Ft(()=>{},{openMode:"redirect",redirect:jn,sourceAppPid:tr,forceConnected:Pn}):Rn==="disabled"?window.history.replaceState(null,"trim",jn):Ct.open({title:translations$2.switchAccountDialog[It].title,content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:{textAlign:"center",mb:2},children:translations$2.switchAccountDialog[It].description}),jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",color:colors$1.foregroundsFgBase},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1.5,lineHeight:1},children:[jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{did:Rt.user.did,shape:"circle",variant:"circle",size:80}),jsxRuntimeExports.jsx(DID,{did:Rt.user.did,showAvatar:!1,compact:!0,responsive:!1}),translations$2.switchAccountDialog[It].currentAccount]}),jsxRuntimeExports.jsx(Box,{sx:{display:"flex",justifyContent:"center",px:2},children:jsxRuntimeExports.jsx(Box,{component:Icon,icon:data$w,fontSize:24,color:colors$1.foregroundsFgMuted,sx:{animation:"right 2.5s linear infinite","@keyframes right":{"0%":{transform:"translateX(-3px)",opacity:0},"60%":{transform:"translateX(3px)",opacity:1},"100%":{transform:"translateX(0px)",opacity:0}}}})}),jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1.5,lineHeight:1,fontWeight:500},children:[jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{did:Pn,shape:"circle",variant:"circle",size:80}),jsxRuntimeExports.jsx(DID,{did:Pn,showAvatar:!1,compact:!0,responsive:!1}),translations$2.switchAccountDialog[It].nextAccount]})]})]}),showCloseButton:Bn,showCancelButton:!1,confirmButtonText:translations$2.switchAccountDialog[It].confirm,async onConfirm(qn){const Fn=(await Ln()).find(Gn=>Gn.userDid===Pn);if(Fn){Ot(Fn).then(Gn=>{updateConnectedInfo({connected_did:Fn.user.did,connected_pk:Fn.user.pk,connected_wallet_os:Fn.extra.walletOS,connected_app:getAppId$1()},!0),wt({...Gn,encrypted:!1}),zt({showProgress:!0}).then(async()=>{await sleep$1(),Bt.emit(EVENTS.LOGIN,Gn,rt,Yt.current),await Vt()})}),qn();return}Ft(()=>{qn(),window.location.replace(jn)},{sourceAppPid:tr,forceConnected:Pn,enableSwitchApp:!1},{showQuickConnect:!0})}})}}),rn=useMemoizedFn(async(wn,jn)=>{const Rn=Object.assign({login:!0,bindWallet:!0,bindDidSpaces:!1},jn==null?void 0:jn.requirements),Pn=(jn==null?void 0:jn.openMode)||"popup";Rn.login&&await Jt(),Rn.bindWallet&&await new Promise(tr=>{an(()=>{tr()})}),Rn.bindDidSpaces&&(await didSpacesIsRequired(Rt==null?void 0:Rt.user)||await new Promise(tr=>{Rn.bindDidSpaces==="full"?Vt({onSuccess(){tr()}}):Rn.bindDidSpaces==="read"&&Dt({onSuccess(){tr()}})})),Pn==="window"?yt.openPopup(wn,jn):Pn==="popup"&&yt.open(wn)}),Ut={...Rt,loading:At.autoConnect&&!Rt.user||Rt.loading,openDidConnect:rn,login:vt,logout:bt,switchDid:Ft,autoSwitchDid:Nn,refreshProfile:Zt,switchProfile:nn,switchPassport:cn,connectToDidSpaceForImport:Dt,connectToDidSpaceForFullAccess:Vt,bindWallet:an,refresh:zt,updateConnectedInfo,federatedMaster:yn,useOAuth,OAuthProvider,OAuthConsumer,OAuthContext,useDid,WrapDid,getUserSessions:Ln},Yt=useLatest(Ut),fn={api:st,events:Bt,storage:tt,connectApi:yt,session:Yt.current},$n={login:Xt,"switch-profile":sn,"switch-passport":Xt,"bind-wallet":pn,"connect-to-did-spaces-for-user":En};return useUpdateEffect(()=>{if(Rt.initialized){const wn=!jt;Bt.emit("change",{user:cloneDeep$1(Rt.user),isFirst:wn})}},[Rt.user,Rt.initialized,Bt]),useUpdateEffect(()=>{Rt.initialized&&Rt.user&&Nn()},[Rt.initialized]),useMount(async()=>{const wn=Cookie.get("connected_app"),jn=getAppId$1();if(dt.autoDisconnect&&wn&&jn&&wn!==jn){hn(),Rt.initialized=!0,At.autoConnect?In():Sn();return}const Rn=ut();let Pn="web";if(St.mobile.apple.device?Pn="ios":St.mobile.android.device&&(Pn="android"),(window==null?void 0:window.self)===(window==null?void 0:window.parent)&&St.wallet&&checkEnableAutoLogin({version:St.walletVersion,platform:Pn})){if(!it){const Bn=await getVisitorId();setVisitorId(Bn)}if(!Rn)try{Rt.loading=!0;const Bn=await login();if(Bn){await Xt({sessionToken:Bn.sessionToken,refreshToken:Bn.refreshToken,encrypted:!1}),Rt.initialized=!0;return}}finally{Rt.loading=!1}}if(Rn){await zt({showProgress:!0}),Rt.initialized=!0,await Vt();return}if(typeof window<"u"){const Bn=new URL(window.location.href),qn=Bn.searchParams.get("loginToken");if(qn){wt({loginToken:qn,encrypted:!1}),Bn.searchParams.delete("loginToken"),window.history.replaceState({},window.title,Bn.href);return}}if(pt()){await Gt(!0),Rt.initialized=!0;return}try{}catch(Bn){console.error("Federated: tryAutoLogin failed",Bn)}finally{Rt.initialized=!0}At.autoConnect?In():Sn()}),gn()&&!Rt.initialized?jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):jsxRuntimeExports.jsx(Provider$4,{value:fn,children:jsxRuntimeExports.jsxs(OAuthProvider,{locale:It,onSwitchPassport:({sessionToken:wn,refreshToken:jn})=>{Xt({sessionToken:wn,refreshToken:jn,encrypted:!1})},onUnbindOAuth:()=>{zt()},onBindOAuth:()=>{zt()},children:[!Rt.open&&typeof dt.children=="function"?dt.children(Rt):dt.children,Tt,kt,et.rolling&&jsxRuntimeExports.jsx(WindowFocusAware,{callback:()=>tn()})]})})}ct.propTypes={children:PropTypes.any.isRequired,serviceHost:PropTypes.string,action:PropTypes.string,prefix:PropTypes.string,appendAuthServicePrefix:PropTypes.bool,locale:PropTypes.string,timeout:PropTypes.number,autoConnect:PropTypes.bool,autoDisconnect:PropTypes.bool,useSocket:PropTypes.bool,extraParams:PropTypes.object,options:PropTypes.object,webWalletUrl:PropTypes.string,protectedRoutes:PropTypes.arrayOf(PropTypes.string),apiOptions:PropTypes.object,lazyRefreshToken:PropTypes.bool},ct.defaultProps={serviceHost:nt,locale:"",action:"login",prefix:API_DID_PREFIX,appendAuthServicePrefix:!1,extraParams:{},options:{},autoConnect:!1,autoDisconnect:!0,useSocket:!0,timeout:DEFAULT_TIMEOUT$1*1e3,webWalletUrl:"",protectedRoutes:["*"],apiOptions:{},lazyRefreshToken:!1};function ft(dt){return function(Tt){return jsxRuntimeExports.jsx(ToastProvider,{children:jsxRuntimeExports.jsx(Consumer$4,{children:St=>jsxRuntimeExports.jsx(dt,{...Tt,...St})})})}}return{SessionProvider:dt=>jsxRuntimeExports.jsx(ToastProvider,{children:jsxRuntimeExports.jsx(ct,{...dt})}),SessionConsumer:Consumer$4,SessionContext:SessionContext$1,withSession:ft}}let path="/";window.env&&(path=window.env.groupPathPrefix||window.env.pathPrefix||"/");function formatCacheTtl(a,j){return[void 0,null,""].includes(a)?j:a/86400}var uo,co,fo;const sessionTokenExpireInDays=formatCacheTtl((fo=(co=(uo=window.blocklet)==null?void 0:uo.settings)==null?void 0:co.session)==null?void 0:fo.cacheTtl,constant$3.SESSION_CACHE_TTL/86400);var po,ho,mo;const refreshTokenExpireInDays=formatCacheTtl((mo=(ho=(po=window.blocklet)==null?void 0:po.settings)==null?void 0:ho.session)==null?void 0:mo.ttl,constant$3.SESSION_TTL/86400),{SessionProvider,SessionContext,SessionConsumer,withSession}=createSessionContext("login_token","cookie",{returnDomain:!1,path,expireInDays:sessionTokenExpireInDays},{refreshTokenStorageKey:"refresh_token",refreshTokenExpireInDays});function useSessionContext(){return reactExports.useContext(SessionContext)}function Root$1({children:a}){const j=create$3({typography:{fontSize:14,button:{textTransform:"none"}},palette:{primary:{main:"#1DC1C7",contrastText:"#fff"}}});return jsxRuntimeExports.jsx(StyledEngineProvider,{injectFirst:!0,children:jsxRuntimeExports.jsx(ThemeProvider$1,{theme:j,children:jsxRuntimeExports.jsx(ThemeProvider$4,{theme:j,children:jsxRuntimeExports.jsx(LocaleProvider,{translations:translations$9,fallbackLocale:"en",children:jsxRuntimeExports.jsx(ToastProvider,{children:jsxRuntimeExports.jsx(RootInside,{theme:j,children:a})})})})})})}const url$1=new URL(window.location.href),mode=url$1.searchParams.get("mode")||"",isEmbedDialog=url$1.pathname.includes("embed")&&mode==="dialog",isEmbedSection=url$1.pathname.includes("embed")&&mode!=="dialog";function RootInside({children:a,theme:j}){var nt,tt,ot;const{locale:_e}=useLocaleContext(),et=css`
470
+ `+(En=pn.serializeToString(Xt)),Rt("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(En),an+".svg")):Rt(Xt.toDataURL("image/"+Vt),an+"."+Vt),[2]):[2]}})})},qt}()}},et={};function nt(tt){if(et[tt])return et[tt].exports;var ot=et[tt]={exports:{}};return _e[tt](ot,ot.exports,nt),ot.exports}return nt.n=tt=>{var ot=tt&&tt.__esModule?()=>tt.default:()=>tt;return nt.d(ot,{a:ot}),ot},nt.d=(tt,ot)=>{for(var ct in ot)nt.o(ot,ct)&&!nt.o(tt,ct)&&Object.defineProperty(tt,ct,{enumerable:!0,get:ot[ct]})},nt.o=(tt,ot)=>Object.prototype.hasOwnProperty.call(tt,ot),nt(676)})().default})})(qrCodeStyling);var qrCodeStylingExports=qrCodeStyling.exports;const QRCodeStyling=getDefaultExportFromCjs$1(qrCodeStylingExports),defaults={margin:0,dotsOptions:{type:"dots"},cornersSquareOptions:{type:"extra-rounded"},cornersDotOptions:{type:"dot"}};function QRCode({data:a,size:j,image:_e,config:et,...nt}){const tt=reactExports.useRef(null),ot=reactExports.useMemo(()=>({...defaults,data:a,width:j,height:j,..._e&&{image:_e,imageOptions:{crossOrigin:"anonymous",margin:0}},...et}),[a,j,_e,et]),[ct]=reactExports.useState(new QRCodeStyling(ot));return reactExports.useEffect(()=>{tt.current&&ct.append(tt.current)},[ct,tt]),reactExports.useEffect(()=>{ct&&ct.update(ot)},[a,j,_e,et]),jsxRuntimeExports.jsx(Box,{ref:tt,...nt})}QRCode.propTypes={data:PropTypes.string.isRequired,size:PropTypes.number.isRequired,image:PropTypes.string,config:PropTypes.object};QRCode.defaultProps={image:null,config:{}};function MobileLoginItem({tokenState:a,locale:j,messages:_e}){const{t:et,matchSmallScreen:nt}=useStateContext(),tt="DID Wallet",ot=(_e==null?void 0:_e.scan)||et("scanWithWallet"),ct=et("download"),ft=et("downloadTips"),ht=160,dt=useCreation(()=>["zh","en"].includes?`https://www.didwallet.io/${j}`:"https://www.didwallet.io/en",[j]),yt=useCreation(()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ft," ",jsxRuntimeExports.jsx(Box,{component:"a",href:dt,target:"_blank",rel:"noopener",sx:{color:colors$1.foregroundsFgInteractive,textDecoration:"none","&:hover":{textDecoration:"underline"}},children:ct})]}),[dt,ct,ft]);return jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",gap:1,justifyContent:"space-between",alignItems:nt?"center":"stretch",flexDirection:nt?"column":"row"},children:[jsxRuntimeExports.jsx(Box,{sx:{display:nt?"none":"block"},children:jsxRuntimeExports.jsx(default_1$3,{width:"24px",height:"24px"})}),jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",flex:1,wordBreak:"break-word",width:nt?186:"auto"},children:[jsxRuntimeExports.jsxs(Typography,{sx:{fontSize:"14px",fontWeight:500,display:"flex",alignItems:"center",gap:1},children:[nt?jsxRuntimeExports.jsx(default_1$3,{width:"24px",height:"24px"}):null,tt]}),jsxRuntimeExports.jsx(Typography,{sx:{flex:1,color:colors$1.foregroundsFgMuted,fontSize:"12px"},children:ot}),jsxRuntimeExports.jsx(Box,{sx:{color:colors$1.foregroundsFgMuted,fontSize:"12px",display:nt?"none":"block"},children:yt})]}),jsxRuntimeExports.jsx(QRCode,{data:a.url,size:ht,sx:{p:1.5,borderRadius:2,border:`1px solid ${colors$1.strokeBorderBase}`,backgroundColor:"white",fontSize:0}}),jsxRuntimeExports.jsx(Box,{sx:{color:colors$1.textMuted,fontSize:"12px",display:nt?"block":"none"},children:yt})]})}MobileLoginItem.propTypes={tokenState:PropTypes.object.isRequired,locale:PropTypes.string,messages:PropTypes.object};MobileLoginItem.defaultProps={locale:"en",messages:{}};const data$f={width:256,height:315,body:'<path d="M213.803 167.03c.442 47.58 41.74 63.413 42.197 63.615c-.35 1.116-6.599 22.563-21.757 44.716c-13.104 19.153-26.705 38.235-48.13 38.63c-21.05.388-27.82-12.483-51.888-12.483c-24.061 0-31.582 12.088-51.51 12.871c-20.68.783-36.428-20.71-49.64-39.793c-27-39.033-47.633-110.3-19.928-158.406c13.763-23.89 38.36-39.017 65.056-39.405c20.307-.387 39.475 13.662 51.889 13.662c12.406 0 35.699-16.895 60.186-14.414c10.25.427 39.026 4.14 57.503 31.186c-1.49.923-34.335 20.044-33.978 59.822M174.24 50.199c10.98-13.29 18.369-31.79 16.353-50.199c-15.826.636-34.962 10.546-46.314 23.828c-10.173 11.763-19.082 30.589-16.678 48.633c17.64 1.365 35.66-8.964 46.64-22.262"/>'},data$e={width:256,height:250,body:'<path fill="#161614" d="M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46c6.397 1.185 8.746-2.777 8.746-6.158c0-3.052-.12-13.135-.174-23.83c-35.61 7.742-43.124-15.103-43.124-15.103c-5.823-14.795-14.213-18.73-14.213-18.73c-11.613-7.944.876-7.78.876-7.78c12.853.902 19.621 13.19 19.621 13.19c11.417 19.568 29.945 13.911 37.249 10.64c1.149-8.272 4.466-13.92 8.127-17.116c-28.431-3.236-58.318-14.212-58.318-63.258c0-13.975 5-25.394 13.188-34.358c-1.329-3.224-5.71-16.242 1.24-33.874c0 0 10.749-3.44 35.21 13.121c10.21-2.836 21.16-4.258 32.038-4.307c10.878.049 21.837 1.47 32.066 4.307c24.431-16.56 35.165-13.12 35.165-13.12c6.967 17.63 2.584 30.65 1.255 33.873c8.207 8.964 13.173 20.383 13.173 34.358c0 49.163-29.944 59.988-58.447 63.157c4.591 3.972 8.682 11.762 8.682 23.704c0 17.126-.148 30.91-.148 35.126c0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002C256 57.307 198.691 0 128.001 0Zm-80.06 182.34c-.282.636-1.283.827-2.194.39c-.929-.417-1.45-1.284-1.15-1.922c.276-.655 1.279-.838 2.205-.399c.93.418 1.46 1.293 1.139 1.931Zm6.296 5.618c-.61.566-1.804.303-2.614-.591c-.837-.892-.994-2.086-.375-2.66c.63-.566 1.787-.301 2.626.591c.838.903 1 2.088.363 2.66Zm4.32 7.188c-.785.545-2.067.034-2.86-1.104c-.784-1.138-.784-2.503.017-3.05c.795-.547 2.058-.055 2.861 1.075c.782 1.157.782 2.522-.019 3.08Zm7.304 8.325c-.701.774-2.196.566-3.29-.49c-1.119-1.032-1.43-2.496-.726-3.27c.71-.776 2.213-.558 3.315.49c1.11 1.03 1.45 2.505.701 3.27Zm9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033c-1.448-.439-2.395-1.613-2.103-2.626c.301-1.01 1.747-1.484 3.207-1.028c1.446.436 2.396 1.602 2.095 2.622Zm10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95c-1.53.034-2.769-.82-2.786-1.86c0-1.065 1.202-1.932 2.733-1.958c1.522-.03 2.768.818 2.768 1.868Zm10.555-.405c.182 1.03-.875 2.088-2.387 2.37c-1.485.271-2.861-.365-3.05-1.386c-.184-1.056.893-2.114 2.376-2.387c1.514-.263 2.868.356 3.061 1.403Z"/>'},data$d={width:256,height:262,body:'<path fill="#4285F4" d="M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"/><path fill="#34A853" d="M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"/><path fill="#FBBC05" d="M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782"/><path fill="#EB4335" d="M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"/>'};function IconItem({icon:a,...j}){return jsxRuntimeExports.jsx(IconButton,{...j,sx:{backgroundColor:"white",border:`1px solid ${colors$1.borderBase}`,...j==null?void 0:j.sx},children:jsxRuntimeExports.jsx(Icon,{icon:a,width:"1em",height:"1em"})})}IconItem.propTypes={icon:PropTypes.any.isRequired};function OAuthLoginStack({providerList:a,onLogin:j}){return jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Icon,{icon:data$m,fontSize:"1.3rem"}),jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"16px",fontWeight:"bold"},children:"Others"})]}),jsxRuntimeExports.jsx(Box,{sx:{display:"flex",gap:2},children:a.map(et=>{const nt={[LOGIN_PROVIDER$1.AUTH0]:data$j,[LOGIN_PROVIDER$1.APPLE]:data$f,[LOGIN_PROVIDER$1.GITHUB]:data$e,[LOGIN_PROVIDER$1.GOOGLE]:data$d};return jsxRuntimeExports.jsx(IconItem,{icon:nt[et.provider],onClick:()=>j(et)},et.provider)})})]})}OAuthLoginStack.propTypes={onLogin:PropTypes.func.isRequired,providerList:PropTypes.array.isRequired};function OAuthItem({title:a,icon:j,..._e}){return jsxRuntimeExports.jsxs(ItemWrap,{..._e,sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer","&:hover":{backgroundColor:colors$1.surfacePrimarySubtitle,"& .other-item-icon":{display:"inline-block",transform:"translateX(0)",opacity:"1"}},"& .other-item-icon":{opacity:"0",transform:"translateX(-100%)",transition:"transform 0.2s ease"},..._e==null?void 0:_e.sx},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Icon,{icon:j,width:"1em",height:"1em",fontSize:"1.5rem",style:{transform:"scale(0.95)"}}),jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"16px",fontWeight:"bold"},children:a})]}),jsxRuntimeExports.jsx(Icon,{className:"other-item-icon",icon:data$p,fontSize:"1.3rem",color:colors$1.primaryBase})]})}OAuthItem.propTypes={title:PropTypes.string.isRequired,icon:PropTypes.string.isRequired};function OAuthLoginList({providerList:a,onLogin:j}){const{t:_e}=useStateContext(),et={[LOGIN_PROVIDER$1.AUTH0]:data$j,[LOGIN_PROVIDER$1.APPLE]:data$f,[LOGIN_PROVIDER$1.GITHUB]:data$e,[LOGIN_PROVIDER$1.GOOGLE]:data$d};return jsxRuntimeExports.jsx(Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:a.map(nt=>{if(nt.provider===LOGIN_PROVIDER$1.AUTH0&&a.length===1){const tt=_e("otherAccount");return jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer","&:hover":{backgroundColor:colors$1.surfacePrimarySubtitle}},onClick:()=>{j(nt)},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Icon,{icon:data$m,fontSize:"1.3rem"}),jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"16px",fontWeight:"bold"},children:tt})]}),jsxRuntimeExports.jsx(Box,{sx:{display:"flex",gap:2},children:[{provider:"auth0"},{provider:"google"},{provider:"apple"}].map(ot=>jsxRuntimeExports.jsx(IconButton,{sx:{backgroundColor:"white",border:`1px solid ${colors$1.borderBase}`},children:jsxRuntimeExports.jsx(Icon,{icon:et[ot.provider],width:"1em",height:"1em"})},ot.provider))})]},nt.provider)}return jsxRuntimeExports.jsx(OAuthItem,{title:OAUTH_PROVIDER[nt.provider],icon:et[nt.provider],onClick:()=>{j(nt)}},nt.provider)})})}OAuthLoginList.propTypes={onLogin:PropTypes.func.isRequired,providerList:PropTypes.array.isRequired};function OAuthLogin({providerList:a,type:j,onSuccess:_e,onError:et,tokenState:nt}){const{extraParams:tt,changeStatus:ot}=useStateContext(),{loginOAuth:ct,logoutOAuth:ft,t:ht,oauthState:dt}=useOAuth(),yt=useMemoizedFn(async Tt=>{const St=tt==null?void 0:tt.sourceAppPid;try{dt.loading=!0,dt.status="scanned";const At=await ct(Tt,{action:nt.action,...tt}),Rt=getCookieOptions({returnDomain:!1});Cookie.remove("connected_did",Rt),Cookie.remove("connected_pk",Rt),Cookie.remove("connected_wallet_os",Rt),At!=null&&At.sessionToken&&(dt.loading=!1,dt.status="succeed",_e({...At,encrypted:!1},It=>It,{sourceAppPid:St,connected_app:getAppId$1(nt.appInfo,nt.memberAppInfo)}))}catch(At){const Rt=getApiErrorMessage(At,ht("loginOAuthFailed"));dt.loading=!1,dt.error=Rt,dt.status="error",await ft({provider:Tt.provider}),et(new Error(Rt))}});return reactExports.useEffect(()=>{ot(dt.status)},[ot,dt.status]),j==="stack"?jsxRuntimeExports.jsx(OAuthLoginStack,{providerList:a,onLogin:yt}):jsxRuntimeExports.jsx(OAuthLoginList,{providerList:a,onLogin:yt})}OAuthLogin.propTypes={providerList:PropTypes.array.isRequired,type:PropTypes.oneOf(["list","stack"]),onSuccess:PropTypes.func.isRequired,onError:PropTypes.func.isRequired,tokenState:PropTypes.object.isRequired};OAuthLogin.defaultProps={type:"stack"};function arraySome$1(a,j){for(var _e=-1,et=a==null?0:a.length;++_e<et;)if(j(a[_e],_e,a))return!0;return!1}var _arraySome=arraySome$1,SetCache$1=_SetCache,arraySome=_arraySome,cacheHas$1=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(a,j,_e,et,nt,tt){var ot=_e&COMPARE_PARTIAL_FLAG$5,ct=a.length,ft=j.length;if(ct!=ft&&!(ot&&ft>ct))return!1;var ht=tt.get(a),dt=tt.get(j);if(ht&&dt)return ht==j&&dt==a;var yt=-1,Tt=!0,St=_e&COMPARE_UNORDERED_FLAG$3?new SetCache$1:void 0;for(tt.set(a,j),tt.set(j,a);++yt<ct;){var At=a[yt],Rt=j[yt];if(et)var It=ot?et(Rt,At,yt,j,a,tt):et(At,Rt,yt,a,j,tt);if(It!==void 0){if(It)continue;Tt=!1;break}if(St){if(!arraySome(j,function(Ct,kt){if(!cacheHas$1(St,kt)&&(At===Ct||nt(At,Ct,_e,et,tt)))return St.push(kt)})){Tt=!1;break}}else if(!(At===Rt||nt(At,Rt,_e,et,tt))){Tt=!1;break}}return tt.delete(a),tt.delete(j),Tt}var _equalArrays=equalArrays$2;function mapToArray$1(a){var j=-1,_e=Array(a.size);return a.forEach(function(et,nt){_e[++j]=[nt,et]}),_e}var _mapToArray=mapToArray$1;function setToArray$3(a){var j=-1,_e=Array(a.size);return a.forEach(function(et){_e[++j]=et}),_e}var _setToArray=setToArray$3,Symbol$4=_Symbol,Uint8Array$1=_Uint8Array,eq$5=eq_1$1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray$2=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",symbolProto$2=Symbol$4?Symbol$4.prototype:void 0,symbolValueOf=symbolProto$2?symbolProto$2.valueOf:void 0;function equalByTag$1(a,j,_e,et,nt,tt,ot){switch(_e){case dataViewTag:if(a.byteLength!=j.byteLength||a.byteOffset!=j.byteOffset)return!1;a=a.buffer,j=j.buffer;case arrayBufferTag:return!(a.byteLength!=j.byteLength||!tt(new Uint8Array$1(a),new Uint8Array$1(j)));case boolTag:case dateTag:case numberTag:return eq$5(+a,+j);case errorTag:return a.name==j.name&&a.message==j.message;case regexpTag:case stringTag:return a==j+"";case mapTag:var ct=mapToArray;case setTag:var ft=et&COMPARE_PARTIAL_FLAG$4;if(ct||(ct=setToArray$2),a.size!=j.size&&!ft)return!1;var ht=ot.get(a);if(ht)return ht==j;et|=COMPARE_UNORDERED_FLAG$2,ot.set(a,j);var dt=equalArrays$1(ct(a),ct(j),et,nt,tt,ot);return ot.delete(a),dt;case symbolTag$2:if(symbolValueOf)return symbolValueOf.call(a)==symbolValueOf.call(j)}return!1}var _equalByTag=equalByTag$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$3=Object.prototype,hasOwnProperty$6=objectProto$3.hasOwnProperty;function equalObjects$1(a,j,_e,et,nt,tt){var ot=_e&COMPARE_PARTIAL_FLAG$3,ct=getAllKeys(a),ft=ct.length,ht=getAllKeys(j),dt=ht.length;if(ft!=dt&&!ot)return!1;for(var yt=ft;yt--;){var Tt=ct[yt];if(!(ot?Tt in j:hasOwnProperty$6.call(j,Tt)))return!1}var St=tt.get(a),At=tt.get(j);if(St&&At)return St==j&&At==a;var Rt=!0;tt.set(a,j),tt.set(j,a);for(var It=ot;++yt<ft;){Tt=ct[yt];var Ct=a[Tt],kt=j[Tt];if(et)var Pt=ot?et(kt,Ct,Tt,j,a,tt):et(Ct,kt,Tt,a,j,tt);if(!(Pt===void 0?Ct===kt||nt(Ct,kt,_e,et,tt):Pt)){Rt=!1;break}It||(It=Tt=="constructor")}if(Rt&&!It){var Bt=a.constructor,Kt=j.constructor;Bt!=Kt&&"constructor"in a&&"constructor"in j&&!(typeof Bt=="function"&&Bt instanceof Bt&&typeof Kt=="function"&&Kt instanceof Kt)&&(Rt=!1)}return tt.delete(a),tt.delete(j),Rt}var _equalObjects=equalObjects$1,Stack$1=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag=_getTag,isArray$7=isArray_1,isBuffer=isBufferExports,isTypedArray=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto$2=Object.prototype,hasOwnProperty$5=objectProto$2.hasOwnProperty;function baseIsEqualDeep$1(a,j,_e,et,nt,tt){var ot=isArray$7(a),ct=isArray$7(j),ft=ot?arrayTag:getTag(a),ht=ct?arrayTag:getTag(j);ft=ft==argsTag?objectTag:ft,ht=ht==argsTag?objectTag:ht;var dt=ft==objectTag,yt=ht==objectTag,Tt=ft==ht;if(Tt&&isBuffer(a)){if(!isBuffer(j))return!1;ot=!0,dt=!1}if(Tt&&!dt)return tt||(tt=new Stack$1),ot||isTypedArray(a)?equalArrays(a,j,_e,et,nt,tt):equalByTag(a,j,ft,_e,et,nt,tt);if(!(_e&COMPARE_PARTIAL_FLAG$2)){var St=dt&&hasOwnProperty$5.call(a,"__wrapped__"),At=yt&&hasOwnProperty$5.call(j,"__wrapped__");if(St||At){var Rt=St?a.value():a,It=At?j.value():j;return tt||(tt=new Stack$1),nt(Rt,It,_e,et,tt)}}return Tt?(tt||(tt=new Stack$1),equalObjects(a,j,_e,et,nt,tt)):!1}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike$3=isObjectLike_1;function baseIsEqual$3(a,j,_e,et,nt){return a===j?!0:a==null||j==null||!isObjectLike$3(a)&&!isObjectLike$3(j)?a!==a&&j!==j:baseIsEqualDeep(a,j,_e,et,baseIsEqual$3,nt)}var _baseIsEqual=baseIsEqual$3,Stack=_Stack,baseIsEqual$2=_baseIsEqual,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch$1(a,j,_e,et){var nt=_e.length,tt=nt,ot=!et;if(a==null)return!tt;for(a=Object(a);nt--;){var ct=_e[nt];if(ot&&ct[2]?ct[1]!==a[ct[0]]:!(ct[0]in a))return!1}for(;++nt<tt;){ct=_e[nt];var ft=ct[0],ht=a[ft],dt=ct[1];if(ot&&ct[2]){if(ht===void 0&&!(ft in a))return!1}else{var yt=new Stack;if(et)var Tt=et(ht,dt,ft,a,j,yt);if(!(Tt===void 0?baseIsEqual$2(dt,ht,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,et,yt):Tt))return!1}}return!0}var _baseIsMatch=baseIsMatch$1,isObject$9=isObject_1;function isStrictComparable$2(a){return a===a&&!isObject$9(a)}var _isStrictComparable=isStrictComparable$2,isStrictComparable$1=_isStrictComparable,keys$2=keys_1;function getMatchData$1(a){for(var j=keys$2(a),_e=j.length;_e--;){var et=j[_e],nt=a[et];j[_e]=[et,nt,isStrictComparable$1(nt)]}return j}var _getMatchData=getMatchData$1;function matchesStrictComparable$2(a,j){return function(_e){return _e==null?!1:_e[a]===j&&(j!==void 0||a in Object(_e))}}var _matchesStrictComparable=matchesStrictComparable$2,baseIsMatch=_baseIsMatch,getMatchData=_getMatchData,matchesStrictComparable$1=_matchesStrictComparable;function baseMatches$1(a){var j=getMatchData(a);return j.length==1&&j[0][2]?matchesStrictComparable$1(j[0][0],j[0][1]):function(_e){return _e===a||baseIsMatch(_e,a,j)}}var _baseMatches=baseMatches$1,baseIsEqual$1=_baseIsEqual,get$4=get_1,hasIn=hasIn_1,isKey$3=_isKey,isStrictComparable=_isStrictComparable,matchesStrictComparable=_matchesStrictComparable,toKey$3=_toKey,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty$1(a,j){return isKey$3(a)&&isStrictComparable(j)?matchesStrictComparable(toKey$3(a),j):function(_e){var et=get$4(_e,a);return et===void 0&&et===j?hasIn(_e,a):baseIsEqual$1(j,et,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}var _baseMatchesProperty=baseMatchesProperty$1,baseGet$2=_baseGet;function basePropertyDeep$1(a){return function(j){return baseGet$2(j,a)}}var _basePropertyDeep=basePropertyDeep$1,baseProperty=_baseProperty,basePropertyDeep=_basePropertyDeep,isKey$2=_isKey,toKey$2=_toKey;function property$1(a){return isKey$2(a)?baseProperty(toKey$2(a)):basePropertyDeep(a)}var property_1=property$1,baseMatches=_baseMatches,baseMatchesProperty=_baseMatchesProperty,identity$1=identity_1,isArray$6=isArray_1,property=property_1;function baseIteratee$4(a){return typeof a=="function"?a:a==null?identity$1:typeof a=="object"?isArray$6(a)?baseMatchesProperty(a[0],a[1]):baseMatches(a):property(a)}var _baseIteratee=baseIteratee$4,FUNC_ERROR_TEXT$2="Expected a function";function negate$1(a){if(typeof a!="function")throw new TypeError(FUNC_ERROR_TEXT$2);return function(){var j=arguments;switch(j.length){case 0:return!a.call(this);case 1:return!a.call(this,j[0]);case 2:return!a.call(this,j[0],j[1]);case 3:return!a.call(this,j[0],j[1],j[2])}return!a.apply(this,j)}}var negate_1=negate$1,arrayMap$1=_arrayMap,baseIteratee$3=_baseIteratee,basePickBy=_basePickBy,getAllKeysIn=_getAllKeysIn;function pickBy$1(a,j){if(a==null)return{};var _e=arrayMap$1(getAllKeysIn(a),function(et){return[et]});return j=baseIteratee$3(j),basePickBy(a,_e,function(et,nt){return j(et,nt[0])})}var pickBy_1=pickBy$1,baseIteratee$2=_baseIteratee,negate=negate_1,pickBy=pickBy_1;function omitBy(a,j){return pickBy(a,negate(baseIteratee$2(j)))}var omitBy_1=omitBy;const omitBy$1=getDefaultExportFromCjs$1(omitBy_1);function useInterval(a,j){const _e=reactExports.useRef();reactExports.useEffect(()=>{_e.current=a},[a]),reactExports.useEffect(()=>{function et(){_e.current()}if(j!==null){const nt=setInterval(et,j);return()=>clearInterval(nt)}},[j])}var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(a,j)=>{for(var _e in j)__defProp(a,_e,{get:j[_e],enumerable:!0})},__copyProps=(a,j,_e,et)=>{if(j&&typeof j=="object"||typeof j=="function")for(let nt of __getOwnPropNames(j))!__hasOwnProp.call(a,nt)&&nt!==_e&&__defProp(a,nt,{get:()=>j[nt],enumerable:!(et=__getOwnPropDesc(j,nt))||et.enumerable});return a},__toCommonJS=a=>__copyProps(__defProp({},"__esModule",{value:!0}),a),phoenix_exports={};__export(phoenix_exports,{Channel:()=>Channel,LongPoll:()=>LongPoll,Presence:()=>Presence,Serializer:()=>serializer_default,Socket:()=>Socket$1});var phoenix_cjs=__toCommonJS(phoenix_exports),closure=a=>typeof a=="function"?a:function(){return a},globalSelf=typeof self<"u"?self:null,phxWindow=typeof window<"u"?window:null,global$1=globalSelf||phxWindow||global$1,DEFAULT_VSN="2.0.0",SOCKET_STATES={connecting:0,open:1,closing:2,closed:3},DEFAULT_TIMEOUT=1e4,WS_CLOSE_NORMAL=1e3,CHANNEL_STATES={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},CHANNEL_EVENTS={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},TRANSPORTS={longpoll:"longpoll",websocket:"websocket"},XHR_STATES={complete:4},Push=class{constructor(a,j,_e,et){this.channel=a,this.event=j,this.payload=_e||function(){return{}},this.receivedResp=null,this.timeout=et,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(a){this.timeout=a,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(a,j){return this.hasReceived(a)&&j(this.receivedResp.response),this.recHooks.push({status:a,callback:j}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:a,response:j,_ref:_e}){this.recHooks.filter(et=>et.status===a).forEach(et=>et.callback(j))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,a=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=a,this.matchReceive(a)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(a){return this.receivedResp&&this.receivedResp.status===a}trigger(a,j){this.channel.trigger(this.refEvent,{status:a,response:j})}},Timer=class{constructor(a,j){this.callback=a,this.timerCalc=j,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Channel=class{constructor(a,j,_e){this.state=CHANNEL_STATES.closed,this.topic=a,this.params=closure(j||{}),this.socket=_e,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Push(this,CHANNEL_EVENTS.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Timer(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=CHANNEL_STATES.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(et=>et.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=CHANNEL_STATES.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=CHANNEL_STATES.closed,this.socket.remove(this)}),this.onError(et=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,et),this.isJoining()&&this.joinPush.reset(),this.state=CHANNEL_STATES.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new Push(this,CHANNEL_EVENTS.leave,closure({}),this.timeout).send(),this.state=CHANNEL_STATES.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(CHANNEL_EVENTS.reply,(et,nt)=>{this.trigger(this.replyEventName(nt),et)})}join(a=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=a,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(a){this.on(CHANNEL_EVENTS.close,a)}onError(a){return this.on(CHANNEL_EVENTS.error,j=>a(j))}on(a,j){let _e=this.bindingRef++;return this.bindings.push({event:a,ref:_e,callback:j}),_e}off(a,j){this.bindings=this.bindings.filter(_e=>!(_e.event===a&&(typeof j>"u"||j===_e.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(a,j,_e=this.timeout){if(j=j||{},!this.joinedOnce)throw new Error(`tried to push '${a}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let et=new Push(this,a,function(){return j},_e);return this.canPush()?et.send():(et.startTimeout(),this.pushBuffer.push(et)),et}leave(a=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=CHANNEL_STATES.leaving;let j=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(CHANNEL_EVENTS.close,"leave")},_e=new Push(this,CHANNEL_EVENTS.leave,closure({}),a);return _e.receive("ok",()=>j()).receive("timeout",()=>j()),_e.send(),this.canPush()||_e.trigger("ok",{}),_e}onMessage(a,j,_e){return j}isMember(a,j,_e,et){return this.topic!==a?!1:et&&et!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:a,event:j,payload:_e,joinRef:et}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(a=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=CHANNEL_STATES.joining,this.joinPush.resend(a))}trigger(a,j,_e,et){let nt=this.onMessage(a,j,_e,et);if(j&&!nt)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let tt=this.bindings.filter(ot=>ot.event===a);for(let ot=0;ot<tt.length;ot++)tt[ot].callback(nt,_e,et||this.joinRef())}replyEventName(a){return`chan_reply_${a}`}isClosed(){return this.state===CHANNEL_STATES.closed}isErrored(){return this.state===CHANNEL_STATES.errored}isJoined(){return this.state===CHANNEL_STATES.joined}isJoining(){return this.state===CHANNEL_STATES.joining}isLeaving(){return this.state===CHANNEL_STATES.leaving}},Ajax=class{static request(a,j,_e,et,nt,tt,ot){if(global$1.XDomainRequest){let ct=new global$1.XDomainRequest;return this.xdomainRequest(ct,a,j,et,nt,tt,ot)}else{let ct=new global$1.XMLHttpRequest;return this.xhrRequest(ct,a,j,_e,et,nt,tt,ot)}}static xdomainRequest(a,j,_e,et,nt,tt,ot){return a.timeout=nt,a.open(j,_e),a.onload=()=>{let ct=this.parseJSON(a.responseText);ot&&ot(ct)},tt&&(a.ontimeout=tt),a.onprogress=()=>{},a.send(et),a}static xhrRequest(a,j,_e,et,nt,tt,ot,ct){return a.open(j,_e,!0),a.timeout=tt,a.setRequestHeader("Content-Type",et),a.onerror=()=>ct&&ct(null),a.onreadystatechange=()=>{if(a.readyState===XHR_STATES.complete&&ct){let ft=this.parseJSON(a.responseText);ct(ft)}},ot&&(a.ontimeout=ot),a.send(nt),a}static parseJSON(a){if(!a||a==="")return null;try{return JSON.parse(a)}catch{return console&&console.log("failed to parse JSON response",a),null}}static serialize(a,j){let _e=[];for(var et in a){if(!Object.prototype.hasOwnProperty.call(a,et))continue;let nt=j?`${j}[${et}]`:et,tt=a[et];typeof tt=="object"?_e.push(this.serialize(tt,nt)):_e.push(encodeURIComponent(nt)+"="+encodeURIComponent(tt))}return _e.join("&")}static appendParams(a,j){if(Object.keys(j).length===0)return a;let _e=a.match(/\?/)?"&":"?";return`${a}${_e}${this.serialize(j)}`}},LongPoll=class{constructor(a){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(a),this.readyState=SOCKET_STATES.connecting,this.poll()}normalizeEndpoint(a){return a.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+TRANSPORTS.websocket),"$1/"+TRANSPORTS.longpoll)}endpointURL(){return Ajax.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(a,j,_e){this.close(a,j,_e),this.readyState=SOCKET_STATES.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===SOCKET_STATES.open||this.readyState===SOCKET_STATES.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),a=>{if(a){var{status:j,token:_e,messages:et}=a;this.token=_e}else j=0;switch(j){case 200:et.forEach(nt=>{setTimeout(()=>this.onmessage({data:nt}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=SOCKET_STATES.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${j}`)}})}send(a){this.currentBatch?this.currentBatch.push(a):this.awaitingBatchAck?this.batchBuffer.push(a):(this.currentBatch=[a],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(a){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",a.join(`
471
+ `),()=>this.onerror("timeout"),j=>{this.awaitingBatchAck=!1,!j||j.status!==200?(this.onerror(j&&j.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(a,j,_e){for(let nt of this.reqs)nt.abort();this.readyState=SOCKET_STATES.closed;let et=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:a,reason:j,wasClean:_e});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",et)):this.onclose(et)}ajax(a,j,_e,et,nt){let tt,ot=()=>{this.reqs.delete(tt),et()};tt=Ajax.request(a,this.endpointURL(),j,_e,this.timeout,ot,ct=>{this.reqs.delete(tt),this.isActive()&&nt(ct)}),this.reqs.add(tt)}},Presence=class{constructor(a,j={}){let _e=j.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=a,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(_e.state,et=>{let{onJoin:nt,onLeave:tt,onSync:ot}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Presence.syncState(this.state,et,nt,tt),this.pendingDiffs.forEach(ct=>{this.state=Presence.syncDiff(this.state,ct,nt,tt)}),this.pendingDiffs=[],ot()}),this.channel.on(_e.diff,et=>{let{onJoin:nt,onLeave:tt,onSync:ot}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(et):(this.state=Presence.syncDiff(this.state,et,nt,tt),ot())})}onJoin(a){this.caller.onJoin=a}onLeave(a){this.caller.onLeave=a}onSync(a){this.caller.onSync=a}list(a){return Presence.list(this.state,a)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(a,j,_e,et){let nt=this.clone(a),tt={},ot={};return this.map(nt,(ct,ft)=>{j[ct]||(ot[ct]=ft)}),this.map(j,(ct,ft)=>{let ht=nt[ct];if(ht){let dt=ft.metas.map(At=>At.phx_ref),yt=ht.metas.map(At=>At.phx_ref),Tt=ft.metas.filter(At=>yt.indexOf(At.phx_ref)<0),St=ht.metas.filter(At=>dt.indexOf(At.phx_ref)<0);Tt.length>0&&(tt[ct]=ft,tt[ct].metas=Tt),St.length>0&&(ot[ct]=this.clone(ht),ot[ct].metas=St)}else tt[ct]=ft}),this.syncDiff(nt,{joins:tt,leaves:ot},_e,et)}static syncDiff(a,j,_e,et){let{joins:nt,leaves:tt}=this.clone(j);return _e||(_e=function(){}),et||(et=function(){}),this.map(nt,(ot,ct)=>{let ft=a[ot];if(a[ot]=this.clone(ct),ft){let ht=a[ot].metas.map(yt=>yt.phx_ref),dt=ft.metas.filter(yt=>ht.indexOf(yt.phx_ref)<0);a[ot].metas.unshift(...dt)}_e(ot,ft,ct)}),this.map(tt,(ot,ct)=>{let ft=a[ot];if(!ft)return;let ht=ct.metas.map(dt=>dt.phx_ref);ft.metas=ft.metas.filter(dt=>ht.indexOf(dt.phx_ref)<0),et(ot,ft,ct),ft.metas.length===0&&delete a[ot]}),a}static list(a,j){return j||(j=function(_e,et){return et}),this.map(a,(_e,et)=>j(_e,et))}static map(a,j){return Object.getOwnPropertyNames(a).map(_e=>j(_e,a[_e]))}static clone(a){return JSON.parse(JSON.stringify(a))}},serializer_default={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(a,j){if(a.payload.constructor===ArrayBuffer)return j(this.binaryEncode(a));{let _e=[a.join_ref,a.ref,a.topic,a.event,a.payload];return j(JSON.stringify(_e))}},decode(a,j){if(a.constructor===ArrayBuffer)return j(this.binaryDecode(a));{let[_e,et,nt,tt,ot]=JSON.parse(a);return j({join_ref:_e,ref:et,topic:nt,event:tt,payload:ot})}},binaryEncode(a){let{join_ref:j,ref:_e,event:et,topic:nt,payload:tt}=a,ot=this.META_LENGTH+j.length+_e.length+nt.length+et.length,ct=new ArrayBuffer(this.HEADER_LENGTH+ot),ft=new DataView(ct),ht=0;ft.setUint8(ht++,this.KINDS.push),ft.setUint8(ht++,j.length),ft.setUint8(ht++,_e.length),ft.setUint8(ht++,nt.length),ft.setUint8(ht++,et.length),Array.from(j,yt=>ft.setUint8(ht++,yt.charCodeAt(0))),Array.from(_e,yt=>ft.setUint8(ht++,yt.charCodeAt(0))),Array.from(nt,yt=>ft.setUint8(ht++,yt.charCodeAt(0))),Array.from(et,yt=>ft.setUint8(ht++,yt.charCodeAt(0)));var dt=new Uint8Array(ct.byteLength+tt.byteLength);return dt.set(new Uint8Array(ct),0),dt.set(new Uint8Array(tt),ct.byteLength),dt.buffer},binaryDecode(a){let j=new DataView(a),_e=j.getUint8(0),et=new TextDecoder;switch(_e){case this.KINDS.push:return this.decodePush(a,j,et);case this.KINDS.reply:return this.decodeReply(a,j,et);case this.KINDS.broadcast:return this.decodeBroadcast(a,j,et)}},decodePush(a,j,_e){let et=j.getUint8(1),nt=j.getUint8(2),tt=j.getUint8(3),ot=this.HEADER_LENGTH+this.META_LENGTH-1,ct=_e.decode(a.slice(ot,ot+et));ot=ot+et;let ft=_e.decode(a.slice(ot,ot+nt));ot=ot+nt;let ht=_e.decode(a.slice(ot,ot+tt));ot=ot+tt;let dt=a.slice(ot,a.byteLength);return{join_ref:ct,ref:null,topic:ft,event:ht,payload:dt}},decodeReply(a,j,_e){let et=j.getUint8(1),nt=j.getUint8(2),tt=j.getUint8(3),ot=j.getUint8(4),ct=this.HEADER_LENGTH+this.META_LENGTH,ft=_e.decode(a.slice(ct,ct+et));ct=ct+et;let ht=_e.decode(a.slice(ct,ct+nt));ct=ct+nt;let dt=_e.decode(a.slice(ct,ct+tt));ct=ct+tt;let yt=_e.decode(a.slice(ct,ct+ot));ct=ct+ot;let Tt=a.slice(ct,a.byteLength),St={status:yt,response:Tt};return{join_ref:ft,ref:ht,topic:dt,event:CHANNEL_EVENTS.reply,payload:St}},decodeBroadcast(a,j,_e){let et=j.getUint8(1),nt=j.getUint8(2),tt=this.HEADER_LENGTH+2,ot=_e.decode(a.slice(tt,tt+et));tt=tt+et;let ct=_e.decode(a.slice(tt,tt+nt));tt=tt+nt;let ft=a.slice(tt,a.byteLength);return{join_ref:null,ref:null,topic:ot,event:ct,payload:ft}}},Socket$1=class{constructor(j,_e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=_e.timeout||DEFAULT_TIMEOUT,this.transport=_e.transport||global$1.WebSocket||LongPoll,this.establishedConnections=0,this.defaultEncoder=serializer_default.encode.bind(serializer_default),this.defaultDecoder=serializer_default.decode.bind(serializer_default),this.closeWasClean=!1,this.binaryType=_e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==LongPoll?(this.encode=_e.encode||this.defaultEncoder,this.decode=_e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let et=null;phxWindow&&phxWindow.addEventListener&&(phxWindow.addEventListener("pagehide",nt=>{this.conn&&(this.disconnect(),et=this.connectClock)}),phxWindow.addEventListener("pageshow",nt=>{et===this.connectClock&&(et=null,this.connect())})),this.heartbeatIntervalMs=_e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=nt=>_e.rejoinAfterMs?_e.rejoinAfterMs(nt):[1e3,2e3,5e3][nt-1]||1e4,this.reconnectAfterMs=nt=>_e.reconnectAfterMs?_e.reconnectAfterMs(nt):[10,50,100,150,200,250,500,1e3,2e3][nt-1]||5e3,this.logger=_e.logger||null,this.longpollerTimeout=_e.longpollerTimeout||2e4,this.params=closure(_e.params||{}),this.endPoint=`${j}/${TRANSPORTS.websocket}`,this.vsn=_e.vsn||DEFAULT_VSN,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Timer(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return LongPoll}replaceTransport(j){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.sendBuffer=[],this.conn&&(this.conn.close(),this.conn=null),this.transport=j}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let j=Ajax.appendParams(Ajax.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return j.charAt(0)!=="/"?j:j.charAt(1)==="/"?`${this.protocol()}:${j}`:`${this.protocol()}://${location.host}${j}`}disconnect(j,_e,et){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(j,_e,et)}connect(j){j&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=closure(j)),!this.conn&&(this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=_e=>this.onConnError(_e),this.conn.onmessage=_e=>this.onConnMessage(_e),this.conn.onclose=_e=>this.onConnClose(_e))}log(j,_e,et){this.logger(j,_e,et)}hasLogger(){return this.logger!==null}onOpen(j){let _e=this.makeRef();return this.stateChangeCallbacks.open.push([_e,j]),_e}onClose(j){let _e=this.makeRef();return this.stateChangeCallbacks.close.push([_e,j]),_e}onError(j){let _e=this.makeRef();return this.stateChangeCallbacks.error.push([_e,j]),_e}onMessage(j){let _e=this.makeRef();return this.stateChangeCallbacks.message.push([_e,j]),_e}ping(j){if(!this.isConnected())return!1;let _e=this.makeRef(),et=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:_e});let nt=this.onMessage(tt=>{tt.ref===_e&&(this.off([nt]),j(Date.now()-et))});return!0}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,j])=>j())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),WS_CLOSE_NORMAL,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(j,_e,et){if(!this.conn)return j&&j();this.waitForBufferDone(()=>{this.conn&&(_e?this.conn.close(_e,et||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),j&&j()})})}waitForBufferDone(j,_e=1){if(_e===5||!this.conn||!this.conn.bufferedAmount){j();return}setTimeout(()=>{this.waitForBufferDone(j,_e+1)},150*_e)}waitForSocketClosed(j,_e=1){if(_e===5||!this.conn||this.conn.readyState===SOCKET_STATES.closed){j();return}setTimeout(()=>{this.waitForSocketClosed(j,_e+1)},150*_e)}onConnClose(j){let _e=j&&j.code;this.hasLogger()&&this.log("transport","close",j),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&_e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,et])=>et(j))}onConnError(j){this.hasLogger()&&this.log("transport",j);let _e=this.transport,et=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,nt])=>{nt(j,_e,et)}),(_e===this.transport||et>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(j=>{j.isErrored()||j.isLeaving()||j.isClosed()||j.trigger(CHANNEL_EVENTS.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case SOCKET_STATES.connecting:return"connecting";case SOCKET_STATES.open:return"open";case SOCKET_STATES.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(j){this.off(j.stateChangeRefs),this.channels=this.channels.filter(_e=>_e.joinRef()!==j.joinRef())}off(j){for(let _e in this.stateChangeCallbacks)this.stateChangeCallbacks[_e]=this.stateChangeCallbacks[_e].filter(([et])=>j.indexOf(et)===-1)}channel(j,_e={}){let et=new Channel(j,_e,this);return this.channels.push(et),et}push(j){if(this.hasLogger()){let{topic:_e,event:et,payload:nt,ref:tt,join_ref:ot}=j;this.log("push",`${_e} ${et} (${ot}, ${tt})`,nt)}this.isConnected()?this.encode(j,_e=>this.conn.send(_e)):this.sendBuffer.push(()=>this.encode(j,_e=>this.conn.send(_e)))}makeRef(){let j=this.ref+1;return j===this.ref?this.ref=0:this.ref=j,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(j=>j()),this.sendBuffer=[])}onConnMessage(j){this.decode(j.data,_e=>{let{topic:et,event:nt,payload:tt,ref:ot,join_ref:ct}=_e;ot&&ot===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${tt.status||""} ${et} ${nt} ${ot&&"("+ot+")"||""}`,tt);for(let ft=0;ft<this.channels.length;ft++){const ht=this.channels[ft];ht.isMember(et,nt,tt,ct)&&ht.trigger(nt,tt,ot,ct)}for(let ft=0;ft<this.stateChangeCallbacks.message.length;ft++){let[,ht]=this.stateChangeCallbacks.message[ft];ht(_e)}})}leaveOpenTopic(j){let _e=this.channels.find(et=>et.topic===j&&(et.isJoined()||et.isJoining()));_e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${j}"`),_e.leave())}},browser$5={exports:{}},s=1e3,m=s*60,h=m*60,d=h*24,w=d*7,y=d*365.25,ms=function(a,j){j=j||{};var _e=typeof a;if(_e==="string"&&a.length>0)return parse$e(a);if(_e==="number"&&isFinite(a))return j.long?fmtLong(a):fmtShort(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function parse$e(a){if(a=String(a),!(a.length>100)){var j=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(j){var _e=parseFloat(j[1]),et=(j[2]||"ms").toLowerCase();switch(et){case"years":case"year":case"yrs":case"yr":case"y":return _e*y;case"weeks":case"week":case"w":return _e*w;case"days":case"day":case"d":return _e*d;case"hours":case"hour":case"hrs":case"hr":case"h":return _e*h;case"minutes":case"minute":case"mins":case"min":case"m":return _e*m;case"seconds":case"second":case"secs":case"sec":case"s":return _e*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return _e;default:return}}}}function fmtShort(a){var j=Math.abs(a);return j>=d?Math.round(a/d)+"d":j>=h?Math.round(a/h)+"h":j>=m?Math.round(a/m)+"m":j>=s?Math.round(a/s)+"s":a+"ms"}function fmtLong(a){var j=Math.abs(a);return j>=d?plural(a,j,d,"day"):j>=h?plural(a,j,h,"hour"):j>=m?plural(a,j,m,"minute"):j>=s?plural(a,j,s,"second"):a+" ms"}function plural(a,j,_e,et){var nt=j>=_e*1.5;return Math.round(a/_e)+" "+et+(nt?"s":"")}const ms$1=getDefaultExportFromCjs$1(ms);function setup(a){_e.debug=_e,_e.default=_e,_e.coerce=ft,_e.disable=tt,_e.enable=nt,_e.enabled=ot,_e.humanize=ms,_e.destroy=ht,Object.keys(a).forEach(dt=>{_e[dt]=a[dt]}),_e.names=[],_e.skips=[],_e.formatters={};function j(dt){let yt=0;for(let Tt=0;Tt<dt.length;Tt++)yt=(yt<<5)-yt+dt.charCodeAt(Tt),yt|=0;return _e.colors[Math.abs(yt)%_e.colors.length]}_e.selectColor=j;function _e(dt){let yt,Tt=null,St,At;function Rt(...It){if(!Rt.enabled)return;const Ct=Rt,kt=Number(new Date),Pt=kt-(yt||kt);Ct.diff=Pt,Ct.prev=yt,Ct.curr=kt,yt=kt,It[0]=_e.coerce(It[0]),typeof It[0]!="string"&&It.unshift("%O");let Bt=0;It[0]=It[0].replace(/%([a-zA-Z%])/g,(jt,zt)=>{if(jt==="%%")return"%";Bt++;const Gt=_e.formatters[zt];if(typeof Gt=="function"){const tn=It[Bt];jt=Gt.call(Ct,tn),It.splice(Bt,1),Bt--}return jt}),_e.formatArgs.call(Ct,It),(Ct.log||_e.log).apply(Ct,It)}return Rt.namespace=dt,Rt.useColors=_e.useColors(),Rt.color=_e.selectColor(dt),Rt.extend=et,Rt.destroy=_e.destroy,Object.defineProperty(Rt,"enabled",{enumerable:!0,configurable:!1,get:()=>Tt!==null?Tt:(St!==_e.namespaces&&(St=_e.namespaces,At=_e.enabled(dt)),At),set:It=>{Tt=It}}),typeof _e.init=="function"&&_e.init(Rt),Rt}function et(dt,yt){const Tt=_e(this.namespace+(typeof yt>"u"?":":yt)+dt);return Tt.log=this.log,Tt}function nt(dt){_e.save(dt),_e.namespaces=dt,_e.names=[],_e.skips=[];let yt;const Tt=(typeof dt=="string"?dt:"").split(/[\s,]+/),St=Tt.length;for(yt=0;yt<St;yt++)Tt[yt]&&(dt=Tt[yt].replace(/\*/g,".*?"),dt[0]==="-"?_e.skips.push(new RegExp("^"+dt.slice(1)+"$")):_e.names.push(new RegExp("^"+dt+"$")))}function tt(){const dt=[..._e.names.map(ct),..._e.skips.map(ct).map(yt=>"-"+yt)].join(",");return _e.enable(""),dt}function ot(dt){if(dt[dt.length-1]==="*")return!0;let yt,Tt;for(yt=0,Tt=_e.skips.length;yt<Tt;yt++)if(_e.skips[yt].test(dt))return!1;for(yt=0,Tt=_e.names.length;yt<Tt;yt++)if(_e.names[yt].test(dt))return!0;return!1}function ct(dt){return dt.toString().substring(2,dt.toString().length-2).replace(/\.\*\?$/,"*")}function ft(dt){return dt instanceof Error?dt.stack||dt.message:dt}function ht(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return _e.enable(_e.load()),_e}var common$1=setup;(function(a,j){var _e={};j.formatArgs=nt,j.save=tt,j.load=ot,j.useColors=et,j.storage=ct(),j.destroy=(()=>{let ht=!1;return()=>{ht||(ht=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),j.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function et(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let ht;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(ht=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(ht[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function nt(ht){if(ht[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+ht[0]+(this.useColors?"%c ":" ")+"+"+a.exports.humanize(this.diff),!this.useColors)return;const dt="color: "+this.color;ht.splice(1,0,dt,"color: inherit");let yt=0,Tt=0;ht[0].replace(/%[a-zA-Z%]/g,St=>{St!=="%%"&&(yt++,St==="%c"&&(Tt=yt))}),ht.splice(Tt,0,dt)}j.log=console.debug||console.log||(()=>{});function tt(ht){try{ht?j.storage.setItem("debug",ht):j.storage.removeItem("debug")}catch{}}function ot(){let ht;try{ht=j.storage.getItem("debug")}catch{}return!ht&&typeof process$1$1<"u"&&"env"in process$1$1&&(ht=_e.DEBUG),ht}function ct(){try{return localStorage}catch{}}a.exports=common$1(j);const{formatters:ft}=a.exports;ft.j=function(ht){try{return JSON.stringify(ht)}catch(dt){return"[UnexpectedJSONParseError]: "+dt.message}}})(browser$5,browser$5.exports);var browserExports=browser$5.exports;const debug$4=browserExports;var logger=(a,j=!1)=>{const _e=debug$4(["@arcblock/ws",a].join(":"));return{debug:_e,warn:_e,info:_e,trace:j?_e:console.error,error:j?_e:console.error}};const createLogger=logger;var base$2=(a,j,_e)=>class extends a{constructor(nt,tt={}){super(nt,{transport:_e,...tt}),this._logger=createLogger("client",tt.silent),this.emitter=new j,this.onOpen(()=>{this._logger.debug("socket open",nt)}),this.onClose(()=>{this._logger.debug("socket close",nt)}),this.onError(ot=>{this._logger.error("socket error",ot.error)}),this.onMessage(ot=>{this._logger.debug("socket message",ot)})}on(nt,tt,ot={}){this.ensureJoinChannel(nt,ot),this.emitter.on(nt,tt)}off(nt,tt){tt?this.emitter.off(nt,tt):this.emitter.removeAllListeners(nt),this.ensureLeaveChannel(nt)}disconnect(nt,tt,ot){this.emitter.eventNames().forEach(ct=>{this.emitter.removeAllListeners(ct)}),super.disconnect(nt,tt,ot)}ensureJoinChannel(nt,tt={}){if(this.emitter.listenerCount(nt)>0)return;const ct=this.channel(nt,tt);ct.join().receive("ok",ft=>{this._logger.debug("join success",{topic:nt,message:ft})}).receive("error",ft=>{this._logger.error("join error",{topic:nt,error:ft})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:nt})}),ct.on(nt,({status:ft,response:ht})=>{ft==="ok"?this.emitter.emit(nt,ht):this._logger.debug("response error",{topic:nt,status:ft,data:ht})})}ensureLeaveChannel(nt){if(this.emitter.listenerCount(nt)>0)return;const ot=this.channels.find(ct=>ct.topic===nt);ot&&(this.remove(ot),ot.leave().receive("ok",ct=>{this._logger.debug("leave success",{topic:nt,message:ct})}).receive("error",ct=>{this._logger.error("leave error",{topic:nt,err:ct})}).receive("timeout",()=>{this._logger.debug("leave timeout",{topic:nt})}),ot.off(nt))}subscribe(nt,tt={}){let ot=this.channels.find(ct=>ct.topic===nt);return ot||(ot=this.channel(nt,tt),ot.join().receive("ok",ct=>{this._logger.debug("join success",{topic:nt,message:ct})}).receive("error",ct=>{this._logger.error("join error",{topic:nt,error:ct})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:nt})}),ot)}unsubscribe(nt){this.ensureLeaveChannel(nt)}};const EventEmitter$3=eventemitter3Exports,{Socket}=phoenix_cjs,createClient=base$2;var browser$4=createClient(Socket,EventEmitter$3);const WsClient$1=browser$4;var browser$3={WsClient:WsClient$1};function usePageShow(a){const j=reactExports.useRef(a);reactExports.useEffect(()=>{j.current=a},[a]),reactExports.useEffect(()=>{const _e=et=>{!document.hidden&&j.current&&j.current(et)};return document.addEventListener("visibilitychange",_e),()=>{document.removeEventListener("visibilitychange",_e)}},[])}function getSocketHost(a){const j=a||window.location.href;return new URL(j).host}function getExtraHeaders(a){const j={},_e=a||window.location.href;if(_e){const{hostname:et,protocol:nt,port:tt}=new URL(_e);j["x-real-hostname"]=et,j["x-real-port"]=tt,j["x-real-protocol"]=nt.endsWith(":")?nt.substring(0,nt.length-1):nt}return j}const fns={};function createTokenFn({action:a,prefix:j,checkFn:_e,extraParams:et,baseUrl:nt}){const tt=`${j}/token?${stringifyQuery$1(et)}`;return fns[tt]||(fns[tt]=async function(){var yt,Tt;const ct=+new Date,ft=await _e(tt,{headers:getExtraHeaders(nt)}),ht=+new Date;if(ht-ct<500&&await sleep$1(500-(ht-ct)),(yt=ft==null?void 0:ft.data)!=null&&yt.token)return ft.data;if((Tt=ft==null?void 0:ft.data)!=null&&Tt.error)throw new Error(ft.data.error);const dt=isUrl(j)?j:`${nt}${j}`;throw new Error(`Error generating ${a} qrcode from: ${dt}`)}),fns[tt]}const parseExistingSession=()=>{try{const j=new URL(window.location.href).searchParams.get("__connect_url__");if(!j)return null;const _e=decodeConnectUrl(j);return{token:parseTokenFromConnectUrl(_e),url:_e}}catch(a){return{error:a}}},getAppId=()=>get$6(globalThis,"blocklet.appPid")||get$6(globalThis,"blocklet.appId")||get$6(globalThis,"env.appId")||"",getAppPrefix=()=>(get$6(globalThis,"env.apiPrefix")||"/").replace(/\/$/,"").replace(RELAY_SOCKET_PREFIX,""),getRelayChannel=a=>`relay:${getAppId()}:${a}`,getRelayProtocol=()=>window.location.protocol==="https:"?"wss:":"ws:",isSameOrigin=a=>!a||new URL(a).origin===window.location.origin,isSessionEnded=a=>["succeed","error","timeout","busy"].includes(a);function useToken({action:a,checkFn:j,checkInterval:_e,checkTimeout:et,extraParams:nt,locale:tt,prefix:ot,tokenKey:ct,encKey:ft,onError:ht,onSuccess:dt,baseUrl:yt,autoConnect:Tt=!0,forceConnected:St=!0,saveConnect:At=!0,useSocket:Rt=!0,provider:It="wallet"}){const Ct=useReactive({checking:!1,loading:!1,token:"",url:"",store:null,status:"created",error:"",checkCount:0,mfaCode:0,appInfo:null,memberAppInfo:null,connectedDid:"",saveConnect:!1,inExistingSession:!1,nextWorkflow:"",baseUrl:yt,prefix:`${ot}/${a}`,extraParams:omitBy$1(nt,isNil$1),checkFn:j,results:{},action:a,provider:It}),kt=reactExports.useRef(null),Pt=translations$3[tt]||translations$3.en,Bt=useCreation(()=>parseExistingSession(),[]),Kt=Math.ceil(et/_e),jt=useReactive({onSuccessCalled:!1,cancelWhenScannedCounter:0,isSocketAvailable:!1}),{encryptKey:zt,decrypt:Gt}=useSecurity(),tn=useBrowser(),hn=getVisitorId$2(),wt=reactExports.useRef(null),rt=reactExports.useRef(null),st={...Ct.extraParams,locale:tt,[ct]:Ct.token||(Bt==null?void 0:Bt.token),provider:Ct.provider},ut=async()=>{if(!(Bt!=null&&Bt.token&&(Bt==null?void 0:Bt.token)===Ct.token)){try{st[ct]&&Ct.status==="created"&&await Ct.checkFn(`${Ct.prefix}/timeout?${stringifyQuery$1(st)}`,{headers:getExtraHeaders(Ct.baseUrl)})}catch{}try{Ct.token&&rt.current&&(await wt.current.unsubscribe(getRelayChannel(Ct.token)),rt.current=null)}catch{}}},pt=useMemoizedFn((...Lt)=>{const Ht={[ft]:zt,...Ct.extraParams,locale:tt,forceConnected:St,autoConnect:Tt&&!tn.wallet&&!jt.cancelWhenScannedCounter&&["ios","android"].includes(Cookie.get("connected_wallet_os")),provider:Ct.provider};hn&&(Ht.visitorId=hn);const Ot=omit$1(kt.current||{},["sourceAppPid","verbose"]);return Object.keys(Ot).forEach(Ft=>{(!Ht[Ft]||Ft===ft&&Ot[Ft])&&(Ht[Ft]=Ot[Ft])}),Bt!=null&&Bt.token&&!Ht.sourceToken&&(Ht.sourceToken=Bt==null?void 0:Bt.token),createTokenFn({action:a,prefix:Ct.prefix,baseUrl:Ct.baseUrl,checkFn:Ct.checkFn,extraParams:Ht})(...Lt)}),mt=useMemoizedFn(async(Lt=!0)=>{Lt&&ut();try{Ct.loading=!0,Ct.token="",Ct.url="",Ct.store=null,Ct.extraParams=omitBy$1(nt,isNil$1),await sleep$1();const Ht=await pt(),Ot=Ht.extra||{};Ct.loading=!1,Ct.token=Ht.token,Ct.url=Ht.url,Ct.status="created",Ct.error="",Ct.checkCount=0,Ct.appInfo=Ht.appInfo,Ct.memberAppInfo=Ht.memberAppInfo,Ct.connectedDid=Ot.connectedDid,Ct.saveConnect=Ot.saveConnect}catch(Ht){Ct.loading=!1,Ct.status="error",Ct.error=`${Pt.generateError}: ${Ht.message}`}}),$t=()=>{jt.cancelWhenScannedCounter++};reactExports.useEffect(()=>{jt.cancelWhenScannedCounter>0&&(nt.nw?ht(new Error(Pt.retryForbidden)):mt())},[jt.cancelWhenScannedCounter]),reactExports.useEffect(()=>(Rt&&isSameOrigin(Ct.baseUrl)&&getAppId()?(!wt.current||wt.current.isConnected()===!1||wt.current.baseUrl!==Ct.baseUrl)&&(wt.current=new browser$3.WsClient(`${getRelayProtocol()}//${getSocketHost(Ct.baseUrl)}${getAppPrefix()}${RELAY_SOCKET_PREFIX}/relay`,{longpollerTimeout:5e3,heartbeatIntervalMs:30*1e3}),wt.current.baseUrl=Ct.baseUrl,wt.current.onOpen(()=>{jt.isSocketAvailable=!0}),wt.current.connect()):jt.isSocketAvailable&&(jt.isSocketAvailable=!1),()=>{wt.current&&(wt.current.disconnect(),wt.current=null)}),[Ct.baseUrl]);const xt=()=>!Ct.token||Ct.loading||isSessionEnded(Ct.status)?null:_e,vt=reactExports.useRef(null);reactExports.useEffect(()=>{vt.current={state:Ct,params:st}}),reactExports.useEffect(()=>()=>{const{state:Lt,params:Ht}=vt.current;Lt.status==="created"&&Ht[ct]&&Lt.checkFn(`${Lt.prefix}/timeout?${stringifyQuery$1(Ht)}`,{headers:getExtraHeaders(Lt.baseUrl)})},[]);const it=async(Lt=!1)=>{var Ht;if(Ct.checking||(Ct.status==="created"&&Ct.checkCount++,jt.isSocketAvailable&&!Lt))return null;try{Ct.checking=!0;const Ot=await Ct.checkFn(`${Ct.prefix}/status?${stringifyQuery$1(st)}`,{headers:getExtraHeaders(Ct.baseUrl)}),{status:Jt,error:Ft,mfaCode:Zt=0}=Ot.data;if(Ct.store=Ot.data,Ct.mfaCode=Zt,Ct.checking=!1,Ct.status=Jt,Jt==="error"&&Ft){const nn=new Error(Ft);throw nn.response=Ot,nn}return Ot.data}catch(Ot){const{response:Jt}=Ot;if(Jt!=null&&Jt.status){st[ct]&&Ct.checkFn(`${Ct.prefix}/timeout?${stringifyQuery$1(st)}`,{headers:getExtraHeaders(Ct.baseUrl)});const Ft=(Ht=Jt==null?void 0:Jt.data)!=null&&Ht.error?Jt.data.error:Ot.message,Zt=new Error(Ft);Zt.code=Jt.status,Ct.status="error",Ct.checking=!1,Ct.error=Ft,ht(Zt,Ct==null?void 0:Ct.store,Gt)}else Ct.status="error",Ct.checking=!1,Ct.error=Pt.generateError}return null},bt=async()=>{try{if(Bt.error)throw Bt.error;Ct.loading=!0,Ct.token=Bt.token,Ct.url=Bt.url,Ct.inExistingSession=!0;let Lt=await it();if((["scanned"].includes(Lt==null?void 0:Lt.status)||(Lt==null?void 0:Lt.sourceToken)===(Bt==null?void 0:Bt.token))&&(await mt(!1),Lt=await it()),kt.current=(Lt==null?void 0:Lt.extraParams)||null,Lt!=null&&Lt.status&&!["created"].includes(Lt==null?void 0:Lt.status))throw new Error(`${Pt.invalidSessionStatus} [${Lt.status}]`)}catch(Lt){Ct.status="error",Ct.error=Lt.message,ht(Lt,Ct==null?void 0:Ct.store,Gt)}finally{Ct.loading=!1}};reactExports.useEffect(()=>{var Lt;if(!Ct.token&&!Ct.store&&!Ct.loading&&!Ct.error)if(Bt)bt();else{mt(!1);return}if(Ct.status!=="timeout"&&Ct.checkCount>Kt){Ct.status="timeout",ut();return}if(Ct.status==="succeed"&&!jt.onSuccessCalled){const Ht=getConnectedInfo({...Ct.store,appInfo:Ct.appInfo,memberAppInfo:Ct.memberAppInfo});if(isSameOrigin(Ct.baseUrl)&&At&&Ct.saveConnect&&Ct.store.did&&updateConnectedInfo(Ht,!0),Ct.store){const{nextWorkflow:Ot}=Ct.store;if(Ot)try{const Jt=parseNextWorkflow(Ot,ct);Ct.nextWorkflow=(Jt==null?void 0:Jt.nextWorkflow)||Ot,Object.assign(Ct,Jt),Ct.store=null,Ct.error="",Ct.url="",Ct.appInfo=null,Ct.memberAppInfo=null,Ct.checkCount=0,Ct.status="scanned",Ct.results={...Ct.results,[Ct.token]:Ct.store},Ct.checkFn=createAxios({baseURL:Jt.baseUrl,timeout:8e3}).get,it()}catch(Jt){console.error(`Invalid nextWorkflow: ${Ot}`,Jt),Ct.status="error",Ct.error=`Invalid nextWorkflow: ${Ot}: ${Jt.message}`}else if(Ct.nextWorkflow&&(Ct.nextWorkflow="",Ct.url=""),typeof dt=="function"){const Jt=Object.values({...Ct.results,[Ct.token]:Ct.store});jt.onSuccessCalled=!0;const Ft=Jt.length>1?Jt:Jt[0],Zt=cloneDeep$1(Ft);dt(Zt,Gt,{sourceAppPid:nt==null?void 0:nt.sourceAppPid,...Ht})}}return}if((Lt=Ct.store)!=null&&Lt.nextWorkflow){const{nextWorkflow:Ht}=Ct.store;try{const Ot=parseNextWorkflow(Ht,ct);Ct.nextWorkflow=(Ot==null?void 0:Ot.nextWorkflow)||Ht,Object.assign(Ct,Ot),Ct.store=null,Ct.error="",Ct.url="",Ct.appInfo=null,Ct.memberAppInfo=null,Ct.checkCount=0,Ct.status="scanned",Ct.results={...Ct.results,[Ct.token]:Ct.store},Ct.checkFn=createAxios({baseURL:Ot.baseUrl,timeout:8e3}).get,it()}catch(Ot){console.error(`Invalid nextWorkflow: ${Ht}`,Ot),Ct.status="error",Ct.error=`Invalid nextWorkflow: ${Ht}: ${Ot.message}`}}});const Mt=reactExports.useRef(0);return reactExports.useEffect(()=>{if(Ct.token&&jt.isSocketAvailable&&wt.current){let Lt=!1;rt.current?rt.current.token!==Ct.token&&(wt.current.unsubscribe(getRelayChannel(rt.current.token)),Lt=!0):Lt=!0,Lt&&(rt.current=wt.current.subscribe(getRelayChannel(Ct.token)),Mt.current=0,rt.current.token=Ct.token,rt.current.on("updated",({response:Ht})=>{const Ot=+new Date(Ht.updatedAt);if(Ot<=Mt.current){console.warn("Ignore outdated message",Ht);return}Mt.current=Ot;let{status:Jt,error:Ft}=Ht;Jt==="forbidden"&&(Ft=Pt.forbidden,Jt="error"),Ct.status=Jt,Ct.mfaCode=Ht.mfaCode||0,Ct.store=Ht,Ct.error=Ft,Ft&&ht(new Error(Ft),Ct==null?void 0:Ct.store,Gt)}))}},[Ct.token,jt.isSocketAvailable,wt.current]),useInterval(it,xt()),usePageShow(()=>{jt.isSocketAvailable&&Ct.token&&isSessionEnded(Ct.status)===!1&&it(!0)}),{state:Ct,generate:mt,cancelWhenScanned:$t}}function WebviewLoginItem({tokenState:a,locale:j,tokenKey:_e}){const{t:et,isWalletWebview:nt,connectState:tt}=useStateContext(),ot=et(nt?"openDidConnect":"openInWallet"),ct=useCreation(()=>{if(!a.url)return"";const dt=new URL(window.location.href);dt.searchParams.set("tokenKey",a.token);const yt=new URL(a.url);return yt.searchParams.set("callback",encodeURIComponent(dt)),yt.searchParams.set("callback_delay",1500),yt.searchParams.set("locale",j),yt.href.replace(/^https?:\/\//,"abt://")},[_e,a.token]),ft=useMemoizedFn(()=>{default_1$4.call("authAction",{action:"auth",deepLink:ct})}),ht={};return nt||(ht.component="a",ht.href=ct),useMount(()=>{tt.autoActiveWebview&&ct&&(tt.autoActiveWebview=!1,ft())}),jsxRuntimeExports.jsxs(ItemWrap,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",backgroundColor:colors$1.surfacePrimarySubtitle,textDecoration:"none",color:"inherit"},...ht,onClick:nt?ft:noop$7,children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(default_1$3,{width:"24px",height:"24px"}),jsxRuntimeExports.jsx(Typography,{sx:{fontSize:"14px",fontWeight:500},children:ot})]}),jsxRuntimeExports.jsx(Icon,{icon:data$p,fontSize:"1.3rem",color:colors$1.primaryBase})]})}WebviewLoginItem.propTypes={tokenState:PropTypes.object.isRequired,locale:PropTypes.string,tokenKey:PropTypes.string};WebviewLoginItem.defaultProps={locale:"en",tokenKey:"_t_"};const data$c={width:24,height:24,body:'<path fill="currentColor" d="M12 20q-3.35 0-5.675-2.325T4 12q0-3.35 2.325-5.675T12 4q1.725 0 3.3.712T18 6.75V5q0-.425.288-.713T19 4q.425 0 .713.288T20 5v5q0 .425-.288.713T19 11h-5q-.425 0-.713-.288T13 10q0-.425.288-.713T14 9h3.2q-.8-1.4-2.188-2.2T12 6Q9.5 6 7.75 7.75T6 12q0 2.5 1.75 4.25T12 18q1.7 0 3.113-.863t2.187-2.312q.2-.35.563-.487t.737-.013q.4.125.575.525t-.025.75q-1.025 2-2.925 3.2T12 20Z"/>'};function RefreshOverlay({onRefresh:a,...j}){const _e=et=>{et.stopPropagation(),a()};return jsxRuntimeExports.jsx(Box,{...j,onClick:_e,sx:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.75)",cursor:"pointer",...j.sx},children:jsxRuntimeExports.jsx(Box,{sx:{backgroundColor:colors$1.foregroundsFgInteractive,borderRadius:"100%",fontSize:0},children:jsxRuntimeExports.jsx(Icon,{icon:data$c,fontSize:52,style:{transform:"scale(0.7)",color:"white"}})})})}RefreshOverlay.propTypes={onRefresh:PropTypes.func.isRequired};const busyStatusList=["scanned","succeed","error","busy"];function DIDWalletConnect({onSuccess:a,onError:j,action:_e,prefix:et,checkFn:nt,checkInterval:tt,checkTimeout:ot,locale:ct,tokenKey:ft,encKey:ht,baseUrl:dt,autoConnect:yt,forceConnected:Tt,saveConnect:St,useSocket:At,allowWallet:Rt,provider:It,webWalletUrl:Ct,onRecreateSession:kt,onClose:Pt,messages:Bt,enabledConnectTypes:Kt}){var dn,Mn,yn,An;if(typeof nt!="function")throw new Error("Cannot initialize did connect component without a fetchFn");const jt=reactExports.useContext(SessionContext$1),{connectState:zt,extraParams:Gt,staticState:tn,changeStatus:hn,isWalletWebview:wt,matchSmallScreen:rt,t:st}=useStateContext(),ut=useBrowser(),pt=detectWalletExtension(),{setBaseUrl:mt,oauthState:$t,getOAuthConfigList:xt}=useOAuth(),vt=useCreation(()=>{var Tn;return It||(Gt==null?void 0:Gt.provider)||((Tn=jt==null?void 0:jt.session)==null?void 0:Tn.provider)||"wallet"},[Gt==null?void 0:Gt.provider,(dn=jt==null?void 0:jt.session)==null?void 0:dn.provider]),it=getWalletDid((Mn=jt==null?void 0:jt.session)==null?void 0:Mn.user);reactExports.useEffect(()=>{mt(dt)},[dt]);const{state:bt,generate:Mt,cancelWhenScanned:Lt}=useToken({action:_e,baseUrl:dt,checkFn:nt,checkInterval:tt,checkTimeout:ot,extraParams:Gt,prefix:et,onError:j,onSuccess:a,locale:ct,tokenKey:ft,encKey:ht,autoConnect:yt,forceConnected:Tt===!0?it||!0:Tt,saveConnect:St,useSocket:At,allowWallet:Rt,provider:vt}),[Ht,Ot]=reactExports.useState([]);useAsyncEffect(async()=>{const Tn=await xt({sourceAppPid:zt==null?void 0:zt.sourceAppPid});Ot(Tn)},[zt==null?void 0:zt.sourceAppPid]);const Jt=usePrevious(zt==null?void 0:zt.sourceAppPid);useUpdateEffect(()=>{isUndefined$2(Jt)||Mt()},[zt==null?void 0:zt.sourceAppPid]);const Ft=useCreation(()=>busyStatusList.includes($t.status)||busyStatusList.includes(bt.status),[bt.status,$t.status]);reactExports.useEffect(()=>{busyStatusList.includes($t.status)?hn($t.status):busyStatusList.includes(bt.status)?hn(bt.status):hn("created")},[hn,bt.status,$t.status]);const Zt=useMemoizedFn(()=>{kt(),$t.reset(),Mt(!1)}),nn=useMemoizedFn(()=>{kt(),tn.current.cancelCount++,Lt()}),cn=useCreation(()=>({confirm:Bt.confirm,success:Bt.success,error:bt.error||$t.error||""}),[Bt.confirm,Bt.success,bt.error,$t.error]),qt=useCreation(()=>Rt&&Kt.includes("mobile")&&!wt,[Rt,Kt,wt]),Dt=checkSameProtocol(Ct),Vt=useCreation(()=>Rt&&Kt.includes("web")&&(Dt||pt)&&(!ut.mobile.any||pt),[Rt,Kt,(yn=ut==null?void 0:ut.mobile)==null?void 0:yn.any]),an=useCreation(()=>Rt&&Kt.includes("mobile")&&ut.mobile.any&&!pt,[Rt,Kt,(An=ut==null?void 0:ut.mobile)==null?void 0:An.any]),Xt=useCreation(()=>{const Tn=intersection$1(Object.keys(OAUTH_PROVIDER),Kt);return Ht.filter(gn=>Tn.includes(gn.provider))},[Ht,Kt]),pn=useCreation(()=>Xt.length>0&&["login","invite"].includes(bt.action),[Xt]),En=useCreation(()=>{const Tn=qt||Vt||an;let gn=null;return pn&&(gn=Tn?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider,{sx:{color:colors$1.textMuted,width:rt?"200px":"368px",opacity:.6,maxWidth:"90%",margin:"auto",fontSize:"14px",fontWeight:"bold","&:before, &:after":{borderColor:colors$1.lineStep}},children:"OR"}),jsxRuntimeExports.jsx(OAuthLogin,{providerList:Xt,onSuccess:a,onError:j,tokenState:bt,locale:ct,type:"list"})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{mt:1,textAlign:"center",color:colors$1.foregroundsFgSubtile},children:st("loginWithBelow")}),jsxRuntimeExports.jsx(OAuthLogin,{providerList:Xt,onSuccess:a,onError:j,tokenState:bt,type:"list",locale:ct})]})),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[bt.status==="timeout"?jsxRuntimeExports.jsx(RefreshOverlay,{onRefresh:Zt,sx:{zIndex:1,animation:"fadeIn 1s","@keyframes fadeIn":{"0%":{opacity:0},"100%":{opacity:1}}}}):null,jsxRuntimeExports.jsx(Box,{"data-did-auth-url":bt.url,sx:{display:"none"}}),an&&jsxRuntimeExports.jsx(WebviewLoginItem,{tokenState:bt,locale:ct,tokenKey:ft}),qt&&jsxRuntimeExports.jsx(MobileLoginItem,{tokenState:bt,messages:Bt,locale:ct}),Vt&&jsxRuntimeExports.jsx(WebLoginItem,{tokenState:bt,webWalletUrl:Ct,locale:ct}),gn]})},[bt,bt.url,bt.status,qt,Vt,an,Xt,pn,pn,a,j,ct,ft,Bt,Ct]);return useCreation(()=>bt.loading||$t.loading||!bt.token&&!bt.error,[bt.loading,$t.loading])?jsxRuntimeExports.jsx(Loading,{}):Ft?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Box,{"data-did-auth-url":bt.url,sx:{display:"none"}}),jsxRuntimeExports.jsx(ConnectStatus,{status:$t.status||bt.status,nextWorkflow:bt.nextWorkflow,mfaCode:bt.mfaCode,onCancel:nn,onRetry:Zt,onClose:Pt,messages:cn,locale:ct,className:"auth-status"})]}):En}DIDWalletConnect.propTypes={onError:PropTypes.func,onSuccess:PropTypes.func.isRequired,action:PropTypes.string.isRequired,checkFn:PropTypes.func.isRequired,prefix:PropTypes.string,checkInterval:PropTypes.number,checkTimeout:PropTypes.number,locale:PropTypes.oneOf(["en","zh",""]),tokenKey:PropTypes.string,encKey:PropTypes.string,baseUrl:PropTypes.string,autoConnect:PropTypes.bool,forceConnected:PropTypes.oneOfType([PropTypes.bool,PropTypes.string]),saveConnect:PropTypes.bool,useSocket:PropTypes.bool,allowWallet:PropTypes.bool,provider:PropTypes.oneOf([LOGIN_PROVIDER$1.WALLET,...Object.keys(OAUTH_PROVIDER),""]),webWalletUrl:PropTypes.string,onRecreateSession:PropTypes.func,onClose:PropTypes.func,messages:PropTypes.object,enabledConnectTypes:PropTypes.arrayOf(PropTypes.oneOf(["web","mobile",...Object.keys(OAUTH_PROVIDER)]))};DIDWalletConnect.defaultProps={prefix:API_DID_PREFIX,onError:noop$7,checkInterval:2*1e3,checkTimeout:DEFAULT_TIMEOUT$1*1e3,locale:"en",tokenKey:"_t_",encKey:"_ek_",baseUrl:"",autoConnect:!0,forceConnected:!0,saveConnect:!0,useSocket:!0,allowWallet:!0,provider:"",webWalletUrl:getWebWalletUrl$1(),onRecreateSession:noop$7,onClose:noop$7,messages:{},enabledConnectTypes:["web","mobile",...Object.keys(OAUTH_PROVIDER)]};var Set$1=_Set,noop=noop_1,setToArray$1=_setToArray,INFINITY$2=1/0,createSet$1=Set$1&&1/setToArray$1(new Set$1([,-0]))[1]==INFINITY$2?function(a){return new Set$1(a)}:noop,_createSet=createSet$1,SetCache=_SetCache,arrayIncludes$1=_arrayIncludes,arrayIncludesWith=_arrayIncludesWith,cacheHas=_cacheHas,createSet=_createSet,setToArray=_setToArray,LARGE_ARRAY_SIZE=200;function baseUniq$2(a,j,_e){var et=-1,nt=arrayIncludes$1,tt=a.length,ot=!0,ct=[],ft=ct;if(_e)ot=!1,nt=arrayIncludesWith;else if(tt>=LARGE_ARRAY_SIZE){var ht=j?null:createSet(a);if(ht)return setToArray(ht);ot=!1,nt=cacheHas,ft=new SetCache}else ft=j?[]:ct;e:for(;++et<tt;){var dt=a[et],yt=j?j(dt):dt;if(dt=_e||dt!==0?dt:0,ot&&yt===yt){for(var Tt=ft.length;Tt--;)if(ft[Tt]===yt)continue e;j&&ft.push(yt),ct.push(dt)}else nt(ft,yt,_e)||(ft!==ct&&ft.push(yt),ct.push(dt))}return ct}var _baseUniq=baseUniq$2,baseFlatten$1=_baseFlatten,baseIteratee$1=_baseIteratee,baseRest$1=_baseRest,baseUniq$1=_baseUniq,isArrayLikeObject=isArrayLikeObject_1,last=last_1,unionBy=baseRest$1(function(a){var j=last(a);return isArrayLikeObject(j)&&(j=void 0),baseUniq$1(baseFlatten$1(a,1,isArrayLikeObject,!0),baseIteratee$1(j))}),unionBy_1=unionBy;const unionBy$1=getDefaultExportFromCjs$1(unionBy_1);var baseFor=_baseFor,keys$1=keys_1;function baseForOwn$1(a,j){return a&&baseFor(a,j,keys$1)}var _baseForOwn=baseForOwn$1,isArrayLike$1=isArrayLike_1;function createBaseEach$1(a,j){return function(_e,et){if(_e==null)return _e;if(!isArrayLike$1(_e))return a(_e,et);for(var nt=_e.length,tt=j?nt:-1,ot=Object(_e);(j?tt--:++tt<nt)&&et(ot[tt],tt,ot)!==!1;);return _e}}var _createBaseEach=createBaseEach$1,baseForOwn=_baseForOwn,createBaseEach=_createBaseEach,baseEach$1=createBaseEach(baseForOwn),_baseEach=baseEach$1,baseEach=_baseEach,isArrayLike=isArrayLike_1;function baseMap$1(a,j){var _e=-1,et=isArrayLike(a)?Array(a.length):[];return baseEach(a,function(nt,tt,ot){et[++_e]=j(nt,tt,ot)}),et}var _baseMap=baseMap$1;function baseSortBy$1(a,j){var _e=a.length;for(a.sort(j);_e--;)a[_e]=a[_e].value;return a}var _baseSortBy=baseSortBy$1,isSymbol$5=isSymbol_1;function compareAscending$1(a,j){if(a!==j){var _e=a!==void 0,et=a===null,nt=a===a,tt=isSymbol$5(a),ot=j!==void 0,ct=j===null,ft=j===j,ht=isSymbol$5(j);if(!ct&&!ht&&!tt&&a>j||tt&&ot&&ft&&!ct&&!ht||et&&ot&&ft||!_e&&ft||!nt)return 1;if(!et&&!tt&&!ht&&a<j||ht&&_e&&nt&&!et&&!tt||ct&&_e&&nt||!ot&&nt||!ft)return-1}return 0}var _compareAscending=compareAscending$1,compareAscending=_compareAscending;function compareMultiple$1(a,j,_e){for(var et=-1,nt=a.criteria,tt=j.criteria,ot=nt.length,ct=_e.length;++et<ot;){var ft=compareAscending(nt[et],tt[et]);if(ft){if(et>=ct)return ft;var ht=_e[et];return ft*(ht=="desc"?-1:1)}}return a.index-j.index}var _compareMultiple=compareMultiple$1,arrayMap=_arrayMap,baseGet$1=_baseGet,baseIteratee=_baseIteratee,baseMap=_baseMap,baseSortBy=_baseSortBy,baseUnary=_baseUnary,compareMultiple=_compareMultiple,identity=identity_1,isArray$5=isArray_1;function baseOrderBy$1(a,j,_e){j.length?j=arrayMap(j,function(tt){return isArray$5(tt)?function(ot){return baseGet$1(ot,tt.length===1?tt[0]:tt)}:tt}):j=[identity];var et=-1;j=arrayMap(j,baseUnary(baseIteratee));var nt=baseMap(a,function(tt,ot,ct){var ft=arrayMap(j,function(ht){return ht(tt)});return{criteria:ft,index:++et,value:tt}});return baseSortBy(nt,function(tt,ot){return compareMultiple(tt,ot,_e)})}var _baseOrderBy=baseOrderBy$1,baseFlatten=_baseFlatten,baseOrderBy=_baseOrderBy,baseRest=_baseRest,isIterateeCall=_isIterateeCall,sortBy=baseRest(function(a,j){if(a==null)return[];var _e=j.length;return _e>1&&isIterateeCall(a,j[0],j[1])?j=[]:_e>2&&isIterateeCall(j[0],j[1],j[2])&&(j=[j[0]]),baseOrderBy(a,baseFlatten(j,1),[])}),sortBy_1=sortBy;const sortBy$1=getDefaultExportFromCjs$1(sortBy_1),prefix$2=joinURL(AUTH_SERVICE_PREFIX,"/api/user-session");function useQuickConnect({appPid:a,sourceAppPid:j,loginAppPid:_e,autoFetch:et=!0,baseUrl:nt="/",fetchAll:tt=!1}={}){const ot=getVisitorId$2(),ct=useCreation(()=>createAxios({baseURL:joinURL(nt,prefix$2)},{lazy:!0,lazyTime:500}),[nt]),ft=useMemoizedFn(async()=>{const{data:Rt=[]}=await ct.get("",{params:{visitorId:ot}}),It=getFederatedEnabled(),Ct=getMaster();if(tt&&It&&Ct){const{data:kt}=await ct.get(joinURL(Ct.appUrl,AUTH_SERVICE_PREFIX,"/api/user-session"),{params:{visitorId:ot}});return Rt.concat(kt||[])}return!It||!Ct?Rt.filter(kt=>{var Pt;return((Pt=kt==null?void 0:kt.user)==null?void 0:Pt.sourceAppPid)===null}):Rt}),ht=useReactive({loaded:!1,loadingId:null}),dt=useRequest(ft,{manual:!et,onFinally(){ht.loaded=!0},refreshDeps:[nt]}),yt=async Rt=>{var Ct,kt,Pt;const It=pick$2(Rt,["userDid","visitorId","passportId","id"]);try{ht.loadingId=Rt.id;const Bt=getMaster();if(getFederatedEnabled()&&Bt&&_e!==Rt.appPid){const{data:jt}=await ct.post("login",{...It,appPid:_e},{baseURL:joinURL(Bt.appUrl,AUTH_SERVICE_PREFIX,"/api/user-session")});return jt}const{data:Kt}=await ct.post("login",{...It,appPid:_e});return Kt}catch(Bt){const Kt=Bt.response?((kt=(Ct=Bt.response)==null?void 0:Ct.data)==null?void 0:kt.error)||((Pt=Bt.response)==null?void 0:Pt.data):Bt.message;throw Toast$1.error(Kt),console.error("Quick login error",Bt),Bt}finally{ht.loadingId=null}},Tt=useCreation(()=>dt.data?dt.data.filter(Rt=>Rt.status!=="expired"):[],[dt.data]),St=useCreation(()=>{const Rt=new Date().getTime(),It=sortBy$1(Tt,Ct=>Rt-new Date(Ct.updatedAt).getTime());return unionBy$1(It,Ct=>[Ct.userDid].join("_"))},[Tt,j,a]),At=useCreation(()=>!!(St&&St.length>0),[St]);return{loadingId:ht.loadingId,userSessions:St,quickLoginEnabled:At,loginUserSession:yt,loading:dt.loading,loaded:dt.loaded,refresh:dt.refreshAsync}}const data$b={width:24,height:24,body:'<path fill="currentColor" d="M11.95 18q.525 0 .888-.363t.362-.887q0-.525-.362-.888t-.888-.362q-.525 0-.887.363t-.363.887q0 .525.363.888t.887.362Zm.05 4q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22Zm0-2q3.35 0 5.675-2.325T20 12q0-3.35-2.325-5.675T12 4Q8.65 4 6.325 6.325T4 12q0 3.35 2.325 5.675T12 20Zm0-8Zm.1-4.3q.625 0 1.088.4t.462 1q0 .55-.337.975t-.763.8q-.575.5-1.012 1.1t-.438 1.35q0 .35.263.588t.612.237q.375 0 .638-.25t.337-.625q.1-.525.45-.938t.75-.787q.575-.55.988-1.2t.412-1.45q0-1.275-1.038-2.087T12.1 6q-.95 0-1.812.4T8.975 7.625q-.175.3-.113.638t.338.512q.35.2.725.125t.625-.425q.275-.375.688-.575t.862-.2Z"/>'},data$a={width:24,height:24,body:'<path fill="currentColor" d="m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4L9.55 18Z"/>'};function AppIcon({appInfo:a,...j}){const[_e,et]=reactExports.useState(!1);if(_e||!(a.appUrl||a.appLogo))return jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{did:a.appPid,size:32});let nt=a.appLogo||"";return isUrl(nt)||(nt=joinURL(a.appUrl||"",nt)),jsxRuntimeExports.jsx(Img,{src:nt,alt:a.appName||"Blocklet Icon",width:32,height:32,...j,onError:()=>et(!0)})}AppIcon.propTypes={appInfo:PropTypes.object.isRequired};const getAppDid=a=>a?a.split(":").pop():"";function AppInfoItem({appInfo:a,active:j,appLogo:_e}){return jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",fontWeight:600,color:colors$1.textBase,"& .app-info-content":{paddingLeft:"8px",overflow:"hidden"},"& .app-info-name":{maxWidth:"100%",paddingRight:"32px",lineHeight:"normal",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontSize:"12px"},"& .app-info-did":{fontSize:0},"& .app-info-did .did-address-text":{color:colors$1.textMuted,fontSize:"12px"}},children:[_e||jsxRuntimeExports.jsx(Box,{sx:{borderRadius:"8px",overflow:"hidden",fontSize:0},children:jsxRuntimeExports.jsx(AppIcon,{appInfo:a})}),jsxRuntimeExports.jsxs(Box,{className:"app-info-content",children:[jsxRuntimeExports.jsx(Box,{className:"app-info-name",children:a.appName}),a.appPid&&jsxRuntimeExports.jsx(DidAddressWrapper,{size:12,className:"app-info-did",copyable:!1,color:colors$1.textMuted,compact:!1,responsive:!1,children:getAppDid(a.appPid)})]}),j?jsxRuntimeExports.jsx(IconButton,{size:"small",color:"success",children:jsxRuntimeExports.jsx(Icon$1,{icon:data$a,color:"success"})}):null]})}AppInfoItem.propTypes={appInfo:PropTypes.object.isRequired,active:PropTypes.bool,appLogo:PropTypes.node};AppInfoItem.defaultProps={active:!1,appLogo:null};function CurrentApp({appInfo:a}){const j=reactExports.useRef(null),_e=useReactive({hoverOnButton:!1,hoverOnPopover:!1}),et=useCreation(()=>_e.hoverOnButton||_e.hoverOnPopover,[_e.hoverOnButton,_e.hoverOnPopover]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Box,{component:"span",ref:j,sx:{color:colors$1.foregroundsFgInteractive,cursor:"help"},onClick:()=>{_e.hoverOnButton=!0},onMouseEnter:()=>{_e.hoverOnButton=!0},onMouseLeave:()=>{setTimeout(()=>{_e.hoverOnButton=!1},200)},children:a.appName}),jsxRuntimeExports.jsx(Popover,{open:et,sx:{pointerEvents:"none"},slotProps:{paper:{variant:"outlined",sx:{border:0,boxShadow:`0px 4px 8px 0px ${colors$1.gray6}, 0px 0px 0px 1px ${colors$1.gray6}`,py:1,px:1.5,borderRadius:2,transform:"translateY(-6px) !important"}}},anchorEl:j.current,anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{_e.open=!1},disableRestoreFocus:!0,children:jsxRuntimeExports.jsx(Box,{component:"span",sx:{pointerEvents:"auto"},onMouseEnter:()=>{_e.hoverOnPopover=!0},onMouseLeave:()=>{_e.hoverOnPopover=!1},children:jsxRuntimeExports.jsx(AppInfoItem,{appInfo:a,appLogo:jsxRuntimeExports.jsx(AppIcon,{appInfo:a})})})})]})}CurrentApp.propTypes={appInfo:PropTypes.object.isRequired};function SwitchApp(){const{appInfoList:a,t:j,extraParams:_e,connectState:et}=useStateContext(),nt=reactExports.useRef(null),tt=useReactive({open:!1});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Box,{component:"span",ref:nt,sx:{textTransform:"lowercase",color:colors$1.foregroundsFgInteractive,cursor:"pointer"},onClick:()=>{tt.open=!0},children:j("switch")}),jsxRuntimeExports.jsx(Menu,{anchorEl:nt.current,open:tt.open,onClose:()=>{tt.open=!1},slotProps:{paper:{variant:"outlined",sx:{border:0,boxShadow:`0px 4px 8px 0px ${colors$1.gray6}, 0px 0px 0px 1px ${colors$1.gray6}`,borderRadius:2}}},children:a.map(ot=>jsxRuntimeExports.jsx(MenuItem,{onClick:()=>{tt.open=!1,et.sourceAppPid=ot.sourceAppPid},children:jsxRuntimeExports.jsx(AppInfoItem,{appInfo:ot,active:ot.sourceAppPid===(_e==null?void 0:_e.sourceAppPid)})},ot.appPid))})]})}function AppTips({locale:a,disableSwitchApp:j}){const{appInfoList:_e,extraParams:et,connectState:nt,blocklet:tt}=useStateContext(),ot=useCreation(()=>_e.find(ht=>isUndefined$2(et==null?void 0:et.sourceAppPid)?!0:isNull$3(ht.sourceAppPid)?ht.appPid===(tt==null?void 0:tt.appPid):ht.sourceAppPid===(et==null?void 0:et.sourceAppPid)),[et==null?void 0:et.sourceAppPid,_e]),ct=!j&&_e.length>1;useMount(()=>{(tt==null?void 0:tt.appPid)===(ot==null?void 0:ot.appPid)?nt.sourceAppPid=null:nt.sourceAppPid=ot==null?void 0:ot.appPid});const ft=useCreation(()=>a==="zh"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["您正在使用 ",jsxRuntimeExports.jsx(CurrentApp,{appInfo:ot,appInfoList:_e})," 账户来连接站点",ct?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[",点击",jsxRuntimeExports.jsx(SwitchApp,{appInfoList:_e})]}):null]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["You're using ",jsxRuntimeExports.jsx(CurrentApp,{appInfo:ot})," account for site access",ct?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[". Click to ",jsxRuntimeExports.jsx(SwitchApp,{appInfoList:_e})]}):null]}),[a,ot,_e,ct]);return isEmpty$1(_e)?null:jsxRuntimeExports.jsxs(Box,{sx:{fontSize:"13px",color:colors$1.foregroundsFgSubtile,lineHeight:1.5},children:[ft,ct&&jsxRuntimeExports.jsx(Box,{component:"span",sx:{display:"inline-block",ml:.5,fontSize:"13px",height:"16px",lineHeight:1,verticalAlign:"middle"},children:jsxRuntimeExports.jsx(Box,{component:Icon,icon:data$b,sx:{verticalAlign:"middle"}})})]})}AppTips.propTypes={locale:PropTypes.string,disableSwitchApp:PropTypes.bool};AppTips.defaultProps={locale:"en",disableSwitchApp:!1};var DidLogoColorful={};Object.defineProperty(DidLogoColorful,"__esModule",{value:!0});var default_1$2=DidLogoColorful.default=void 0;_interopRequireDefault$2(reactExports);var _jsxRuntime$2=jsxRuntimeExports;function _interopRequireDefault$2(a){return a&&a.__esModule?a:{default:a}}function ownKeys$2(a,j){var _e=Object.keys(a);if(Object.getOwnPropertySymbols){var et=Object.getOwnPropertySymbols(a);j&&(et=et.filter(function(nt){return Object.getOwnPropertyDescriptor(a,nt).enumerable})),_e.push.apply(_e,et)}return _e}function _objectSpread(a){for(var j=1;j<arguments.length;j++){var _e=arguments[j]!=null?arguments[j]:{};j%2?ownKeys$2(Object(_e),!0).forEach(function(et){_defineProperty(a,et,_e[et])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(_e)):ownKeys$2(Object(_e)).forEach(function(et){Object.defineProperty(a,et,Object.getOwnPropertyDescriptor(_e,et))})}return a}function _defineProperty(a,j,_e){return(j=_toPropertyKey(j))in a?Object.defineProperty(a,j,{value:_e,enumerable:!0,configurable:!0,writable:!0}):a[j]=_e,a}function _toPropertyKey(a){var j=_toPrimitive(a,"string");return typeof j=="symbol"?j:j+""}function _toPrimitive(a,j){if(typeof a!="object"||!a)return a;var _e=a[Symbol.toPrimitive];if(_e!==void 0){var et=_e.call(a,j||"default");if(typeof et!="object")return et;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(a)}var Component=function a(j){return(0,_jsxRuntime$2.jsxs)("svg",_objectSpread(_objectSpread({},j),{},{children:[(0,_jsxRuntime$2.jsx)("path",{d:"M7.366.646L8.46 0h3.981v11.96H8.564a.381.381 0 0 1-.194-.053L4.18 9.431V2.53l.508-.3.893.528-.508.3v5.845L8.7 11.046h2.85V.914h-2.85l-.44.26-.893-.528z",fill:"color(display-p3 .4196 .7412 .9961)"}),(0,_jsxRuntime$2.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.868 8.903V3.057L4.242.915H1.393v10.132h2.85l.44-.26.893.527-1.095.647H.5V0h3.981l4.28 2.53v6.9l-.506.3-.893-.528.506-.299z",fill:"color(display-p3 .2706 .5961 .9804)"})]}))};Component.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"13",height:"12",viewBox:"0 0 13 12",fill:"none"};Component.displayName="did-logo-colorful";default_1$2=DidLogoColorful.default=Component;function PoweredBy({...a}){return jsxRuntimeExports.jsxs(Box,{...a,sx:{display:"flex",alignItems:"center",color:colors$1.foregroundsFgMuted,gap:.5,...a.sx},children:[jsxRuntimeExports.jsx(default_1$2,{}),"Powered By",jsxRuntimeExports.jsx(Box,{component:"a",href:"https://www.didconnect.io/",target:"_blank",rel:"noopener",sx:{color:colors$1.foregroundsFgInteractive,textDecoration:"none","&:hover":{textDecoration:"underline"}},children:"DID Connect"})]})}function AutoHeight({children:a,initHeight:j,slotProps:_e}){var ct;const[et,nt]=reactExports.useState(j),tt=reactExports.useRef(null),ot=useSize(tt);return reactExports.useEffect(()=>{ot!=null&&ot.height&&nt(ot.height)},[ot==null?void 0:ot.height,et]),jsxRuntimeExports.jsx(Box,{..._e==null?void 0:_e.root,sx:{height:et,overflow:"hidden",transition:"height 0.2s ease-in-out",...(ct=_e==null?void 0:_e.root)==null?void 0:ct.sx},children:jsxRuntimeExports.jsx(Box,{..._e==null?void 0:_e.container,ref:tt,children:a})})}AutoHeight.propTypes={initHeight:PropTypes.number,children:PropTypes.node.isRequired,slotProps:PropTypes.object};AutoHeight.defaultProps={initHeight:0,slotProps:{}};const didConnectTab="did-connect",quickConnectTab="quick-connect";function Connect$1({mode:a,isFullScreen:j,hideCloseButton:_e,...et}){var pt;const nt=useReactive({showTab:didConnectTab}),{connectState:tt,blocklet:ot,appInfoList:ct,extraParams:ft}=useStateContext(),{extraContent:ht,onSuccess:dt,action:yt,onClose:Tt,options:St}=et,At=useCreation(()=>ct.find(mt=>isUndefined$2(ft==null?void 0:ft.sourceAppPid)?!0:isNull$3(mt.sourceAppPid)?mt.appPid===(ot==null?void 0:ot.appPid):mt.sourceAppPid===(ft==null?void 0:ft.sourceAppPid)),[ft==null?void 0:ft.sourceAppPid,ct]),Rt=useCreation(()=>isNull$3(tt==null?void 0:tt.sourceAppPid)?At==null?void 0:At.appPid:(tt==null?void 0:tt.sourceAppPid)||getCurrentAppPid(),[tt==null?void 0:tt.sourceAppPid]),{quickLoginEnabled:It,loading:Ct,userSessions:kt,loginUserSession:Pt,refresh:Bt}=useQuickConnect({appPid:Rt,loginAppPid:ot==null?void 0:ot.appPid,sourceAppPid:tt==null?void 0:tt.sourceAppPid,autoFetch:["login"].includes(yt),baseUrl:(At==null?void 0:At.appUrl)||""}),Kt=useCreation(()=>{var mt;return((mt=et==null?void 0:et.messages)==null?void 0:mt.title)||DEFAULT_NAME},[(pt=et==null?void 0:et.messages)==null?void 0:pt.title]),jt=useCreation(()=>{if(yt==="login"){const mt=getMaster(ot),$t=getFederatedEnabled(ot);return ft!=null&&ft.forceConnected?kt.filter(xt=>xt.userDid===(ft==null?void 0:ft.forceConnected)):!$t||!mt?kt.filter(xt=>{var vt;return((vt=xt==null?void 0:xt.user)==null?void 0:vt.sourceAppPid)===null}):kt.filter(xt=>{var vt;return Rt===ot.appPid?((vt=xt.user)==null?void 0:vt.sourceAppPid)===(ft==null?void 0:ft.sourceAppPid):!0})}return kt},[ft==null?void 0:ft.forceConnected,yt,kt]),zt=useMemoizedFn(async(...mt)=>{var it,bt,Mt;const $t=await Pt(...mt),[xt]=mt,vt={};xt&&((it=xt==null?void 0:xt.user)!=null&&it.did&&(vt.connected_did=xt.user.did),(bt=xt==null?void 0:xt.user)!=null&&bt.pk&&(vt.connected_pk=xt.user.pk),(Mt=xt==null?void 0:xt.extra)!=null&&Mt.walletOS&&(vt.connected_wallet_os=xt.extra.walletOS),xt!=null&&xt.appPid&&(vt.connected_app=xt.appPid)),await dt({...$t,encrypted:!1},Lt=>Lt,vt)});reactExports.useEffect(()=>{(St==null?void 0:St.showQuickConnect)!==!1&&!Ct&&It&&(nt.showTab=quickConnectTab)},[Ct,It,St==null?void 0:St.showQuickConnect]);const Gt=useDebounce(Ct,{wait:100}),tn=useMemoizedFn(()=>{nt.showTab=didConnectTab}),hn=useMemoizedFn(()=>{nt.showTab=quickConnectTab}),wt=useCreation(()=>jt.length===0?!0:nt.showTab===didConnectTab||!It,[nt.showTab,It]),rt=useCreation(()=>{let mt=!0;return(Ct||Gt)&&(mt=!1),It||(mt=!1),St.showQuickConnect===!1&&(mt=!1),nt.showTab!==didConnectTab&&(mt=!1),mt},[It,nt.showTab,Ct,Gt]),st=useCreation(()=>jsxRuntimeExports.jsx(Box,{onClick:Tt,sx:{fontSize:"1.5rem",width:"1.5rem",height:"1.5rem",cursor:"pointer",color:colors$1.foregroundsFgSubtile,transition:"transform 0.2s ease-in-out","&:hover":{transform:"rotate(90deg)"}},children:jsxRuntimeExports.jsx(Icon,{icon:data$r})}),[Tt]);let ut=null;return Ct||Gt?ut=jsxRuntimeExports.jsx(Loading,{}):wt?ut=jsxRuntimeExports.jsx(DIDWalletConnect,{...et,onClose:Tt}):ut=jsxRuntimeExports.jsx(QuickConnect,{userSessions:jt,onLogin:zt,onRetry:Bt,onClose:Tt,messages:et.messages,onLoginAnother:tn}),jsxRuntimeExports.jsxs(Card,{variant:"outlined",sx:{color:colors$1.foregroundsFgBase,backgroundColor:"white",borderRadius:2,borderColor:colors$1.strokeBorderBase,height:"100%",display:"flex",flexDirection:"column"},children:[jsxRuntimeExports.jsx(CardHeader,{title:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt&&jsxRuntimeExports.jsx(IconButton,{size:"small",disabled:tt.status!=="created",onClick:hn,disableRipple:!0,sx:{fontSize:"0.75em"},children:jsxRuntimeExports.jsx(Icon,{icon:data$s,color:colors$1.textMuted})}),Kt]}),titleTypographyProps:{display:"flex",alignItems:"center",variant:"h6",lineHeight:"28px",fontWeight:600},action:_e?null:st,sx:{px:2.5,".MuiCardHeader-action":{margin:0,alignSelf:"center"}}}),jsxRuntimeExports.jsx(CardContent,{sx:{borderTop:`1px solid ${colors$1.strokeBorderBase}`,borderBottom:`1px solid ${colors$1.strokeBorderBase}`,flex:1,verticalAlign:"middle",overflow:"auto",p:2.5,position:"relative","&::after":{content:'""',height:"100%",verticalAlign:"middle",display:"inline-block",width:0}},children:jsxRuntimeExports.jsxs(AutoHeight,{slotProps:{root:{sx:{display:"inline-block",width:"100%",verticalAlign:"middle"}},container:{sx:{display:"flex",flexDirection:"column",gap:1}}},children:[jsxRuntimeExports.jsx(AppTips,{locale:et.locale,disableSwitchApp:et.disableSwitchApp}),ut,ht?jsxRuntimeExports.jsx(Box,{children:ht}):null]})}),jsxRuntimeExports.jsx(CardActions,{sx:{py:2,px:2.5,justifyContent:"center"},children:jsxRuntimeExports.jsx(PoweredBy,{sx:{fontSize:"12px"}})})]})}Connect$1.propTypes={action:PropTypes.string.isRequired,onSuccess:PropTypes.func,onClose:PropTypes.func,messages:PropTypes.object,extraContent:PropTypes.any,disableSwitchApp:PropTypes.bool,mode:PropTypes.oneOf(["fullScreen","dialog","normal"]),isFullScreen:PropTypes.bool,options:PropTypes.object,hideCloseButton:PropTypes.bool,locale:PropTypes.string};Connect$1.defaultProps={onSuccess:noop$7,onClose:noop$7,mode:"normal",isFullScreen:!1,extraContent:null,disableSwitchApp:!1,messages:{},options:{},hideCloseButton:!0,locale:"en"};function WrapConnect(a){const{checkFn:j,extraParams:_e,blocklet:et,action:nt,locale:tt}=a;if(typeof j!="function")throw new Error("Cannot initialize did connect component without a fetchFn");return jsxRuntimeExports.jsx(StateProvider,{blocklet:et,action:nt,locale:tt,extraParams:_e,sx:{position:"relative",width:"100%",height:"100%",lineHeight:1.2,fontFamily:"Inter",color:"#334660","&, & *, & *:before, & *:after":{boxSizing:"border-box"}},children:jsxRuntimeExports.jsx(Connect$1,{...a})})}WrapConnect.propTypes={checkFn:PropTypes.func.isRequired,extraParams:PropTypes.object,blocklet:PropTypes.object.isRequired,action:PropTypes.string.isRequired,locale:PropTypes.string};WrapConnect.defaultProps={extraParams:{},locale:"en"};const DidConnect=withWebWalletSWKeeper(withDialog(withBlocklet(WrapConnect))),CLOSE_TIMEOUT=2e3,ConnectHolder=reactExports.forwardRef((a,j)=>{const{api:_e}=reactExports.useContext(SessionContext$1),et={containerEl:null,popup:!0,checkFn:(_e==null?void 0:_e.get)||noop$7,messages:{title:"DID Connect",scan:"Scan QR code to complete this action",confirm:"Confirm on your DID Wallet",success:"Success!"}},nt=useReactive({show:!1,...cloneDeep$1(et)}),[tt,ot]=reactExports.useState({}),ct=useMemoizedFn(()=>{const yt=cloneDeep$1(et);Object.keys(yt).forEach(Tt=>{nt[Tt]=yt[Tt]})}),ft=useMemoizedFn(()=>{nt.show=!1,ct()}),ht=useMemoizedFn(yt=>{const{containerEl:Tt,checkFn:St,popup:At,messages:Rt,...It}=cloneDeep$1(yt);typeof St=="function"&&(nt.checkFn=St),At!==void 0&&(nt.popup=At),Rt!==void 0&&(nt.messages=Rt),Tt!==void 0&&(nt.containerEl=Tt),ot(It),nt.show=!0});reactExports.useImperativeHandle(j,()=>({open:ht,close:ft}),[ht,ft]);const dt=jsxRuntimeExports.jsx(DidConnect,{open:!0,popup:nt.popup,messages:nt.messages,checkFn:nt.checkFn,...tt});return nt.containerEl?reactDomExports.createPortal(dt,nt.containerEl):nt.show&&dt});function useConnect(){const a=reactExports.useRef(null),j=useCreation(()=>new _default$2({concurrency:1})),_e=useMemoizedFn((...ct)=>{var ft;(ft=a.current)==null||ft.close(...ct)}),et=useMemoizedFn(({onSuccess:ct,onClose:ft,onEnd:ht,closeTimeout:dt=CLOSE_TIMEOUT,...yt},...Tt)=>{const St=()=>new Promise(At=>{typeof ct=="function"?yt.onSuccess=(...Rt)=>{ct(...Rt),setTimeout(()=>{_e(),At()},dt)}:yt.onSuccess=()=>{setTimeout(()=>{_e(),At()},dt)},typeof ft=="function"?yt.onClose=(...Rt)=>{ft(...Rt),_e(),At(),j.clear()}:yt.onClose=()=>{_e(),At(),j.clear()},setTimeout(()=>{var Rt;(Rt=a.current)==null||Rt.open(yt,...Tt)})});j.add(St)}),nt=useMemoizedFn((ct={},{baseUrl:ft,locale:ht="en",blocklet:dt=globalThis==null?void 0:globalThis.blocklet,closeTimeout:yt=CLOSE_TIMEOUT}={})=>new Promise((Tt,St)=>{const At=()=>new Promise(Rt=>{(async()=>{var zt;if(isUndefined$2(ft)){const Gt=getFederatedEnabled(),tn=getMaster();ft=Gt?tn.appUrl:window.location.origin}const{onSuccess:Ct,onClose:kt,onError:Pt,...Bt}=ct;if(!((zt=Bt==null?void 0:Bt.extraParams)!=null&&zt.provider))throw isFunction$8(Pt)&&Pt("Must have extraParams.provider"),new Error("Must have extraParams.provider");Bt!=null&&Bt.prefix||(Bt.prefix=window.location.origin+joinURL(dt==null?void 0:dt.prefix,API_DID_PREFIX));const Kt=new URLSearchParams;Kt.set("params",btoa(encodeURIComponent(JSON.stringify(Bt)))),Kt.set("appPid",dt==null?void 0:dt.appPid),Kt.set("locale",ht);const jt=openPopup(joinURL(ft||"/",AUTH_SERVICE_PREFIX,`/connect?${Kt.toString()}`));try{const Gt=await runPopup({popup:jt,closeTimeout:yt});updateConnectedInfo({connected_app:getAppId$1(),...Gt==null?void 0:Gt.options},!0),isFunction$8(Ct)?(Ct({...Gt.response,encrypted:!1}),_e(),Rt()):(_e(),Rt()),Tt({...Gt.response,encrypted:!1})}catch(Gt){throw Gt.message==="Popup closed"?isFunction$8(kt)?(kt(),Rt(),j.clear()):(Rt(),j.clear()):isFunction$8(Pt)&&Pt(Gt),Gt}})().catch(Ct=>{Rt(),St(Ct)})});j.add(At)})),tt=useCreation(()=>jsxRuntimeExports.jsx(ConnectHolder,{ref:a})),ot=useCreation(()=>({open:et,close:_e,openPopup:nt,queue:j}));return{connectHolder:tt,connectApi:ot}}const EVENTS={LOGIN:Symbol("login"),CANCEL_LOGIN:Symbol("cancelLogin"),LOGOUT:Symbol("logout"),SWITCH_PROFILE:Symbol("switchProfile"),CANCEL_SWITCH_PROFILE:Symbol("cancelSwitchProfile"),SWITCH_PASSPORT:Symbol("switchPassport"),CANCEL_SWITCH_PASSPORT:Symbol("cancelSwitchPassport"),BIND_WALLET:Symbol("bindWallet"),CANCEL_BIND_WALLET:Symbol("cancelBindWallet"),CONNECT_TO_DID_SPACE_FOR_FULL_ACCESS:Symbol("connectToDidSpaceForFullAccess")},translations$2={login:{en:{title:"Connect DID Wallet",scan:"Scan following qrcode to connect your DID Wallet",confirm:"Confirm connection in your DID Wallet",success:"Successfully connected"},zh:{title:"连接 DID 钱包",scan:"请使用 DID 钱包扫码下面的二维码完成连接",confirm:"在 DID 钱包中确认连接",success:"连接成功"}},"switch-specified-did":{en:{title:"Switch DID",scan:"You need switch DID to {did} to complete the following actions",confirm:"Confirm switch in your DID Wallet",success:"Successfully switched"},zh:{title:"切换账号",scan:"你需要切换账号至 {did} 才能完成后续的操作",confirm:"在 DID 钱包中确认切换",success:"切换成功"}},"switch-did":{en:{title:"Switch DID",scan:"Scan following qrcode to switch account",confirm:"Confirm switch in your DID Wallet",success:"Successfully switched"},zh:{title:"切换账号",scan:"请使用 DID 钱包扫码下面的二维码完成切换",confirm:"在 DID 钱包中确认切换",success:"切换成功"}},"switch-profile":{en:{title:"Switch Profile",scan:"Scan following qrcode with DID Wallet to switch profile",confirm:"Select profile in your DID Wallet",success:"Profile updated"},zh:{title:"切换个人信息",scan:"请使用 DID 钱包扫码下面的二维码来切换个人信息",confirm:"在 DID 钱包中选择个人信息",success:"个人信息已经更新"}},"switch-passport":{en:{title:"Switch Passport",scan:"Scan following qrcode with DID Wallet to switch passport",confirm:"Select passport in your DID Wallet",success:"Passport and session updated"},zh:{title:"切换通行证",scan:"请使用 DID 钱包扫码二维码来切换通行证",confirm:"在 DID 钱包中选择通行证",success:"通行证和会话已经更新"}},"connect-to-did-spaces-for-user":{en:{title:"Please authorize the application to connect to your DID Space",scan:"Please use your DID wallet to scan the QR code for authorization",confirm:"Select the DID Spaces NFT in your DID wallet",success:"Connection successful"},zh:{title:"请授权应用连接你的 DID Space",scan:"请使用 DID 钱包扫码二维码来完成授权",confirm:"在 DID 钱包中选择 DID Spaces NFT",success:"连接成功"}},"bind-wallet":{en:{title:"Connect DID Wallet for enhanced security",scan:"Scan following qrcode with DID Wallet to connect your DID Wallet",success:"Successfully connected"},zh:{title:"连接 DID 钱包获得更高的安全性",scan:"请使用 DID 钱包扫码二维码来连接您的 DID 钱包",success:"连接成功"}},exchangePassport:{en:{action:"Exchange Passport with NFT",tooltip:"Exchange passport if you owns any required NFT"},zh:{action:"兑换通行证",tooltip:"通过出示你持有的特定 NFT 来获取通行证"}},lostPassport:{en:{action:"Lost Passport"},zh:{action:"找回通行证"}},switchAccountDialog:{en:{confirm:"Switch",title:"Switch Account",description:"Please switch accounts to complete next action",currentAccount:"Current account",nextAccount:"Account to be switched"},zh:{confirm:"切换",title:"切换账号",description:"请切换账号来完成后续的操作",currentAccount:"当前登录的账户",nextAccount:"即将切换的账户"}}};var re$2={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$2=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=MAX_LENGTH$1-6,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:MAX_LENGTH$1,MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$2,RELEASE_TYPES,SEMVER_SPEC_VERSION,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},define_process_env_default$1={};const debug$3=typeof process$1$1=="object"&&define_process_env_default$1&&define_process_env_default$1.NODE_DEBUG&&/\bsemver\b/i.test(define_process_env_default$1.NODE_DEBUG)?(...a)=>console.error("SEMVER",...a):()=>{};var debug_1$1=debug$3;(function(a,j){const{MAX_SAFE_COMPONENT_LENGTH:_e,MAX_SAFE_BUILD_LENGTH:et,MAX_LENGTH:nt}=constants$1,tt=debug_1$1;j=a.exports={};const ot=j.re=[],ct=j.safeRe=[],ft=j.src=[],ht=j.t={};let dt=0;const yt="[a-zA-Z0-9-]",Tt=[["\\s",1],["\\d",nt],[yt,et]],St=Rt=>{for(const[It,Ct]of Tt)Rt=Rt.split(`${It}*`).join(`${It}{0,${Ct}}`).split(`${It}+`).join(`${It}{1,${Ct}}`);return Rt},At=(Rt,It,Ct)=>{const kt=St(It),Pt=dt++;tt(Rt,Pt,It),ht[Rt]=Pt,ft[Pt]=It,ot[Pt]=new RegExp(It,Ct?"g":void 0),ct[Pt]=new RegExp(kt,Ct?"g":void 0)};At("NUMERICIDENTIFIER","0|[1-9]\\d*"),At("NUMERICIDENTIFIERLOOSE","\\d+"),At("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${yt}*`),At("MAINVERSION",`(${ft[ht.NUMERICIDENTIFIER]})\\.(${ft[ht.NUMERICIDENTIFIER]})\\.(${ft[ht.NUMERICIDENTIFIER]})`),At("MAINVERSIONLOOSE",`(${ft[ht.NUMERICIDENTIFIERLOOSE]})\\.(${ft[ht.NUMERICIDENTIFIERLOOSE]})\\.(${ft[ht.NUMERICIDENTIFIERLOOSE]})`),At("PRERELEASEIDENTIFIER",`(?:${ft[ht.NUMERICIDENTIFIER]}|${ft[ht.NONNUMERICIDENTIFIER]})`),At("PRERELEASEIDENTIFIERLOOSE",`(?:${ft[ht.NUMERICIDENTIFIERLOOSE]}|${ft[ht.NONNUMERICIDENTIFIER]})`),At("PRERELEASE",`(?:-(${ft[ht.PRERELEASEIDENTIFIER]}(?:\\.${ft[ht.PRERELEASEIDENTIFIER]})*))`),At("PRERELEASELOOSE",`(?:-?(${ft[ht.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${ft[ht.PRERELEASEIDENTIFIERLOOSE]})*))`),At("BUILDIDENTIFIER",`${yt}+`),At("BUILD",`(?:\\+(${ft[ht.BUILDIDENTIFIER]}(?:\\.${ft[ht.BUILDIDENTIFIER]})*))`),At("FULLPLAIN",`v?${ft[ht.MAINVERSION]}${ft[ht.PRERELEASE]}?${ft[ht.BUILD]}?`),At("FULL",`^${ft[ht.FULLPLAIN]}$`),At("LOOSEPLAIN",`[v=\\s]*${ft[ht.MAINVERSIONLOOSE]}${ft[ht.PRERELEASELOOSE]}?${ft[ht.BUILD]}?`),At("LOOSE",`^${ft[ht.LOOSEPLAIN]}$`),At("GTLT","((?:<|>)?=?)"),At("XRANGEIDENTIFIERLOOSE",`${ft[ht.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),At("XRANGEIDENTIFIER",`${ft[ht.NUMERICIDENTIFIER]}|x|X|\\*`),At("XRANGEPLAIN",`[v=\\s]*(${ft[ht.XRANGEIDENTIFIER]})(?:\\.(${ft[ht.XRANGEIDENTIFIER]})(?:\\.(${ft[ht.XRANGEIDENTIFIER]})(?:${ft[ht.PRERELEASE]})?${ft[ht.BUILD]}?)?)?`),At("XRANGEPLAINLOOSE",`[v=\\s]*(${ft[ht.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ft[ht.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ft[ht.XRANGEIDENTIFIERLOOSE]})(?:${ft[ht.PRERELEASELOOSE]})?${ft[ht.BUILD]}?)?)?`),At("XRANGE",`^${ft[ht.GTLT]}\\s*${ft[ht.XRANGEPLAIN]}$`),At("XRANGELOOSE",`^${ft[ht.GTLT]}\\s*${ft[ht.XRANGEPLAINLOOSE]}$`),At("COERCEPLAIN",`(^|[^\\d])(\\d{1,${_e}})(?:\\.(\\d{1,${_e}}))?(?:\\.(\\d{1,${_e}}))?`),At("COERCE",`${ft[ht.COERCEPLAIN]}(?:$|[^\\d])`),At("COERCEFULL",ft[ht.COERCEPLAIN]+`(?:${ft[ht.PRERELEASE]})?(?:${ft[ht.BUILD]})?(?:$|[^\\d])`),At("COERCERTL",ft[ht.COERCE],!0),At("COERCERTLFULL",ft[ht.COERCEFULL],!0),At("LONETILDE","(?:~>?)"),At("TILDETRIM",`(\\s*)${ft[ht.LONETILDE]}\\s+`,!0),j.tildeTrimReplace="$1~",At("TILDE",`^${ft[ht.LONETILDE]}${ft[ht.XRANGEPLAIN]}$`),At("TILDELOOSE",`^${ft[ht.LONETILDE]}${ft[ht.XRANGEPLAINLOOSE]}$`),At("LONECARET","(?:\\^)"),At("CARETTRIM",`(\\s*)${ft[ht.LONECARET]}\\s+`,!0),j.caretTrimReplace="$1^",At("CARET",`^${ft[ht.LONECARET]}${ft[ht.XRANGEPLAIN]}$`),At("CARETLOOSE",`^${ft[ht.LONECARET]}${ft[ht.XRANGEPLAINLOOSE]}$`),At("COMPARATORLOOSE",`^${ft[ht.GTLT]}\\s*(${ft[ht.LOOSEPLAIN]})$|^$`),At("COMPARATOR",`^${ft[ht.GTLT]}\\s*(${ft[ht.FULLPLAIN]})$|^$`),At("COMPARATORTRIM",`(\\s*)${ft[ht.GTLT]}\\s*(${ft[ht.LOOSEPLAIN]}|${ft[ht.XRANGEPLAIN]})`,!0),j.comparatorTrimReplace="$1$2$3",At("HYPHENRANGE",`^\\s*(${ft[ht.XRANGEPLAIN]})\\s+-\\s+(${ft[ht.XRANGEPLAIN]})\\s*$`),At("HYPHENRANGELOOSE",`^\\s*(${ft[ht.XRANGEPLAINLOOSE]})\\s+-\\s+(${ft[ht.XRANGEPLAINLOOSE]})\\s*$`),At("STAR","(<|>)?=?\\s*\\*"),At("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),At("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(re$2,re$2.exports);var reExports=re$2.exports;const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$1=a=>a?typeof a!="object"?looseOption:a:emptyOpts;var parseOptions_1=parseOptions$1;const numeric=/^[0-9]+$/,compareIdentifiers$1=(a,j)=>{const _e=numeric.test(a),et=numeric.test(j);return _e&&et&&(a=+a,j=+j),a===j?0:_e&&!et?-1:et&&!_e?1:a<j?-1:1},rcompareIdentifiers=(a,j)=>compareIdentifiers$1(j,a);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers};const debug$2=debug_1$1,{MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1}=constants$1,{safeRe:re$1,t:t$1}=reExports,parseOptions=parseOptions_1,{compareIdentifiers}=identifiers$1;let SemVer$d=class Zr{constructor(j,_e){if(_e=parseOptions(_e),j instanceof Zr){if(j.loose===!!_e.loose&&j.includePrerelease===!!_e.includePrerelease)return j;j=j.version}else if(typeof j!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof j}".`);if(j.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",j,_e),this.options=_e,this.loose=!!_e.loose,this.includePrerelease=!!_e.includePrerelease;const et=j.trim().match(_e.loose?re$1[t$1.LOOSE]:re$1[t$1.FULL]);if(!et)throw new TypeError(`Invalid Version: ${j}`);if(this.raw=j,this.major=+et[1],this.minor=+et[2],this.patch=+et[3],this.major>MAX_SAFE_INTEGER$1||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER$1||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER$1||this.patch<0)throw new TypeError("Invalid patch version");et[4]?this.prerelease=et[4].split(".").map(nt=>{if(/^[0-9]+$/.test(nt)){const tt=+nt;if(tt>=0&&tt<MAX_SAFE_INTEGER$1)return tt}return nt}):this.prerelease=[],this.build=et[5]?et[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(j){if(debug$2("SemVer.compare",this.version,this.options,j),!(j instanceof Zr)){if(typeof j=="string"&&j===this.version)return 0;j=new Zr(j,this.options)}return j.version===this.version?0:this.compareMain(j)||this.comparePre(j)}compareMain(j){return j instanceof Zr||(j=new Zr(j,this.options)),compareIdentifiers(this.major,j.major)||compareIdentifiers(this.minor,j.minor)||compareIdentifiers(this.patch,j.patch)}comparePre(j){if(j instanceof Zr||(j=new Zr(j,this.options)),this.prerelease.length&&!j.prerelease.length)return-1;if(!this.prerelease.length&&j.prerelease.length)return 1;if(!this.prerelease.length&&!j.prerelease.length)return 0;let _e=0;do{const et=this.prerelease[_e],nt=j.prerelease[_e];if(debug$2("prerelease compare",_e,et,nt),et===void 0&&nt===void 0)return 0;if(nt===void 0)return 1;if(et===void 0)return-1;if(et===nt)continue;return compareIdentifiers(et,nt)}while(++_e)}compareBuild(j){j instanceof Zr||(j=new Zr(j,this.options));let _e=0;do{const et=this.build[_e],nt=j.build[_e];if(debug$2("build compare",_e,et,nt),et===void 0&&nt===void 0)return 0;if(nt===void 0)return 1;if(et===void 0)return-1;if(et===nt)continue;return compareIdentifiers(et,nt)}while(++_e)}inc(j,_e,et){switch(j){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",_e,et);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",_e,et);break;case"prepatch":this.prerelease.length=0,this.inc("patch",_e,et),this.inc("pre",_e,et);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",_e,et),this.inc("pre",_e,et);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const nt=Number(et)?1:0;if(!_e&&et===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[nt];else{let tt=this.prerelease.length;for(;--tt>=0;)typeof this.prerelease[tt]=="number"&&(this.prerelease[tt]++,tt=-2);if(tt===-1){if(_e===this.prerelease.join(".")&&et===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(nt)}}if(_e){let tt=[_e,nt];et===!1&&(tt=[_e]),compareIdentifiers(this.prerelease[0],_e)===0?isNaN(this.prerelease[1])&&(this.prerelease=tt):this.prerelease=tt}break}default:throw new Error(`invalid increment argument: ${j}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var semver$2=SemVer$d;const SemVer$c=semver$2,parse$d=(a,j,_e=!1)=>{if(a instanceof SemVer$c)return a;try{return new SemVer$c(a,j)}catch(et){if(!_e)return null;throw et}};var parse_1=parse$d;const parse$c=parse_1,valid$2=(a,j)=>{const _e=parse$c(a,j);return _e?_e.version:null};var valid_1=valid$2;const parse$b=parse_1,clean$1=(a,j)=>{const _e=parse$b(a.trim().replace(/^[=v]+/,""),j);return _e?_e.version:null};var clean_1=clean$1;const SemVer$b=semver$2,inc$1=(a,j,_e,et,nt)=>{typeof _e=="string"&&(nt=et,et=_e,_e=void 0);try{return new SemVer$b(a instanceof SemVer$b?a.version:a,_e).inc(j,et,nt).version}catch{return null}};var inc_1=inc$1;const parse$a=parse_1,diff$1=(a,j)=>{const _e=parse$a(a,null,!0),et=parse$a(j,null,!0),nt=_e.compare(et);if(nt===0)return null;const tt=nt>0,ot=tt?_e:et,ct=tt?et:_e,ft=!!ot.prerelease.length;if(!!ct.prerelease.length&&!ft)return!ct.patch&&!ct.minor?"major":ot.patch?"patch":ot.minor?"minor":"major";const dt=ft?"pre":"";return _e.major!==et.major?dt+"major":_e.minor!==et.minor?dt+"minor":_e.patch!==et.patch?dt+"patch":"prerelease"};var diff_1=diff$1;const SemVer$a=semver$2,major$1=(a,j)=>new SemVer$a(a,j).major;var major_1=major$1;const SemVer$9=semver$2,minor$1=(a,j)=>new SemVer$9(a,j).minor;var minor_1=minor$1;const SemVer$8=semver$2,patch$1=(a,j)=>new SemVer$8(a,j).patch;var patch_1=patch$1;const parse$9=parse_1,prerelease$1=(a,j)=>{const _e=parse$9(a,j);return _e&&_e.prerelease.length?_e.prerelease:null};var prerelease_1=prerelease$1;const SemVer$7=semver$2,compare$b=(a,j,_e)=>new SemVer$7(a,_e).compare(new SemVer$7(j,_e));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(a,j,_e)=>compare$a(j,a,_e);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(a,j)=>compare$9(a,j,!0);var compareLoose_1=compareLoose$1;const SemVer$6=semver$2,compareBuild$3=(a,j,_e)=>{const et=new SemVer$6(a,_e),nt=new SemVer$6(j,_e);return et.compare(nt)||et.compareBuild(nt)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(a,j)=>a.sort((_e,et)=>compareBuild$2(_e,et,j));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(a,j)=>a.sort((_e,et)=>compareBuild$1(et,_e,j));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(a,j,_e)=>compare$8(a,j,_e)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(a,j,_e)=>compare$7(a,j,_e)<0;var lt_1=lt$3;const compare$6=compare_1,eq$4=(a,j,_e)=>compare$6(a,j,_e)===0;var eq_1=eq$4;const compare$5=compare_1,neq$2=(a,j,_e)=>compare$5(a,j,_e)!==0;var neq_1=neq$2;const compare$4=compare_1,gte$3=(a,j,_e)=>compare$4(a,j,_e)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(a,j,_e)=>compare$3(a,j,_e)<=0;var lte_1=lte$3;const eq$3=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$1=(a,j,_e,et)=>{switch(j){case"===":return typeof a=="object"&&(a=a.version),typeof _e=="object"&&(_e=_e.version),a===_e;case"!==":return typeof a=="object"&&(a=a.version),typeof _e=="object"&&(_e=_e.version),a!==_e;case"":case"=":case"==":return eq$3(a,_e,et);case"!=":return neq$1(a,_e,et);case">":return gt$3(a,_e,et);case">=":return gte$2(a,_e,et);case"<":return lt$2(a,_e,et);case"<=":return lte$2(a,_e,et);default:throw new TypeError(`Invalid operator: ${j}`)}};var cmp_1=cmp$1;const SemVer$5=semver$2,parse$8=parse_1,{safeRe:re,t}=reExports,coerce$1=(a,j)=>{if(a instanceof SemVer$5)return a;if(typeof a=="number"&&(a=String(a)),typeof a!="string")return null;j=j||{};let _e=null;if(!j.rtl)_e=a.match(j.includePrerelease?re[t.COERCEFULL]:re[t.COERCE]);else{const ft=j.includePrerelease?re[t.COERCERTLFULL]:re[t.COERCERTL];let ht;for(;(ht=ft.exec(a))&&(!_e||_e.index+_e[0].length!==a.length);)(!_e||ht.index+ht[0].length!==_e.index+_e[0].length)&&(_e=ht),ft.lastIndex=ht.index+ht[1].length+ht[2].length;ft.lastIndex=-1}if(_e===null)return null;const et=_e[2],nt=_e[3]||"0",tt=_e[4]||"0",ot=j.includePrerelease&&_e[5]?`-${_e[5]}`:"",ct=j.includePrerelease&&_e[6]?`+${_e[6]}`:"";return parse$8(`${et}.${nt}.${tt}${ot}${ct}`,j)};var coerce_1=coerce$1;class LRUCache{constructor(){this.max=1e3,this.map=new Map}get(j){const _e=this.map.get(j);if(_e!==void 0)return this.map.delete(j),this.map.set(j,_e),_e}delete(j){return this.map.delete(j)}set(j,_e){if(!this.delete(j)&&_e!==void 0){if(this.map.size>=this.max){const nt=this.map.keys().next().value;this.delete(nt)}this.map.set(j,_e)}return this}}var lrucache=LRUCache,range,hasRequiredRange;function requireRange(){if(hasRequiredRange)return range;hasRequiredRange=1;const a=/\s+/g;class j{constructor(pt,mt){if(mt=nt(mt),pt instanceof j)return pt.loose===!!mt.loose&&pt.includePrerelease===!!mt.includePrerelease?pt:new j(pt.raw,mt);if(pt instanceof tt)return this.raw=pt.value,this.set=[[pt]],this.formatted=void 0,this;if(this.options=mt,this.loose=!!mt.loose,this.includePrerelease=!!mt.includePrerelease,this.raw=pt.trim().replace(a," "),this.set=this.raw.split("||").map($t=>this.parseRange($t.trim())).filter($t=>$t.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const $t=this.set[0];if(this.set=this.set.filter(xt=>!Rt(xt[0])),this.set.length===0)this.set=[$t];else if(this.set.length>1){for(const xt of this.set)if(xt.length===1&&It(xt[0])){this.set=[xt];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let pt=0;pt<this.set.length;pt++){pt>0&&(this.formatted+="||");const mt=this.set[pt];for(let $t=0;$t<mt.length;$t++)$t>0&&(this.formatted+=" "),this.formatted+=mt[$t].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(pt){const $t=((this.options.includePrerelease&&St)|(this.options.loose&&At))+":"+pt,xt=et.get($t);if(xt)return xt;const vt=this.options.loose,it=vt?ft[ht.HYPHENRANGELOOSE]:ft[ht.HYPHENRANGE];pt=pt.replace(it,rt(this.options.includePrerelease)),ot("hyphen replace",pt),pt=pt.replace(ft[ht.COMPARATORTRIM],dt),ot("comparator trim",pt),pt=pt.replace(ft[ht.TILDETRIM],yt),ot("tilde trim",pt),pt=pt.replace(ft[ht.CARETTRIM],Tt),ot("caret trim",pt);let bt=pt.split(" ").map(Ot=>kt(Ot,this.options)).join(" ").split(/\s+/).map(Ot=>wt(Ot,this.options));vt&&(bt=bt.filter(Ot=>(ot("loose invalid filter",Ot,this.options),!!Ot.match(ft[ht.COMPARATORLOOSE])))),ot("range list",bt);const Mt=new Map,Lt=bt.map(Ot=>new tt(Ot,this.options));for(const Ot of Lt){if(Rt(Ot))return[Ot];Mt.set(Ot.value,Ot)}Mt.size>1&&Mt.has("")&&Mt.delete("");const Ht=[...Mt.values()];return et.set($t,Ht),Ht}intersects(pt,mt){if(!(pt instanceof j))throw new TypeError("a Range is required");return this.set.some($t=>Ct($t,mt)&&pt.set.some(xt=>Ct(xt,mt)&&$t.every(vt=>xt.every(it=>vt.intersects(it,mt)))))}test(pt){if(!pt)return!1;if(typeof pt=="string")try{pt=new ct(pt,this.options)}catch{return!1}for(let mt=0;mt<this.set.length;mt++)if(st(this.set[mt],pt,this.options))return!0;return!1}}range=j;const _e=lrucache,et=new _e,nt=parseOptions_1,tt=requireComparator(),ot=debug_1$1,ct=semver$2,{safeRe:ft,t:ht,comparatorTrimReplace:dt,tildeTrimReplace:yt,caretTrimReplace:Tt}=reExports,{FLAG_INCLUDE_PRERELEASE:St,FLAG_LOOSE:At}=constants$1,Rt=ut=>ut.value==="<0.0.0-0",It=ut=>ut.value==="",Ct=(ut,pt)=>{let mt=!0;const $t=ut.slice();let xt=$t.pop();for(;mt&&$t.length;)mt=$t.every(vt=>xt.intersects(vt,pt)),xt=$t.pop();return mt},kt=(ut,pt)=>(ot("comp",ut,pt),ut=jt(ut,pt),ot("caret",ut),ut=Bt(ut,pt),ot("tildes",ut),ut=Gt(ut,pt),ot("xrange",ut),ut=hn(ut,pt),ot("stars",ut),ut),Pt=ut=>!ut||ut.toLowerCase()==="x"||ut==="*",Bt=(ut,pt)=>ut.trim().split(/\s+/).map(mt=>Kt(mt,pt)).join(" "),Kt=(ut,pt)=>{const mt=pt.loose?ft[ht.TILDELOOSE]:ft[ht.TILDE];return ut.replace(mt,($t,xt,vt,it,bt)=>{ot("tilde",ut,$t,xt,vt,it,bt);let Mt;return Pt(xt)?Mt="":Pt(vt)?Mt=`>=${xt}.0.0 <${+xt+1}.0.0-0`:Pt(it)?Mt=`>=${xt}.${vt}.0 <${xt}.${+vt+1}.0-0`:bt?(ot("replaceTilde pr",bt),Mt=`>=${xt}.${vt}.${it}-${bt} <${xt}.${+vt+1}.0-0`):Mt=`>=${xt}.${vt}.${it} <${xt}.${+vt+1}.0-0`,ot("tilde return",Mt),Mt})},jt=(ut,pt)=>ut.trim().split(/\s+/).map(mt=>zt(mt,pt)).join(" "),zt=(ut,pt)=>{ot("caret",ut,pt);const mt=pt.loose?ft[ht.CARETLOOSE]:ft[ht.CARET],$t=pt.includePrerelease?"-0":"";return ut.replace(mt,(xt,vt,it,bt,Mt)=>{ot("caret",ut,xt,vt,it,bt,Mt);let Lt;return Pt(vt)?Lt="":Pt(it)?Lt=`>=${vt}.0.0${$t} <${+vt+1}.0.0-0`:Pt(bt)?vt==="0"?Lt=`>=${vt}.${it}.0${$t} <${vt}.${+it+1}.0-0`:Lt=`>=${vt}.${it}.0${$t} <${+vt+1}.0.0-0`:Mt?(ot("replaceCaret pr",Mt),vt==="0"?it==="0"?Lt=`>=${vt}.${it}.${bt}-${Mt} <${vt}.${it}.${+bt+1}-0`:Lt=`>=${vt}.${it}.${bt}-${Mt} <${vt}.${+it+1}.0-0`:Lt=`>=${vt}.${it}.${bt}-${Mt} <${+vt+1}.0.0-0`):(ot("no pr"),vt==="0"?it==="0"?Lt=`>=${vt}.${it}.${bt}${$t} <${vt}.${it}.${+bt+1}-0`:Lt=`>=${vt}.${it}.${bt}${$t} <${vt}.${+it+1}.0-0`:Lt=`>=${vt}.${it}.${bt} <${+vt+1}.0.0-0`),ot("caret return",Lt),Lt})},Gt=(ut,pt)=>(ot("replaceXRanges",ut,pt),ut.split(/\s+/).map(mt=>tn(mt,pt)).join(" ")),tn=(ut,pt)=>{ut=ut.trim();const mt=pt.loose?ft[ht.XRANGELOOSE]:ft[ht.XRANGE];return ut.replace(mt,($t,xt,vt,it,bt,Mt)=>{ot("xRange",ut,$t,xt,vt,it,bt,Mt);const Lt=Pt(vt),Ht=Lt||Pt(it),Ot=Ht||Pt(bt),Jt=Ot;return xt==="="&&Jt&&(xt=""),Mt=pt.includePrerelease?"-0":"",Lt?xt===">"||xt==="<"?$t="<0.0.0-0":$t="*":xt&&Jt?(Ht&&(it=0),bt=0,xt===">"?(xt=">=",Ht?(vt=+vt+1,it=0,bt=0):(it=+it+1,bt=0)):xt==="<="&&(xt="<",Ht?vt=+vt+1:it=+it+1),xt==="<"&&(Mt="-0"),$t=`${xt+vt}.${it}.${bt}${Mt}`):Ht?$t=`>=${vt}.0.0${Mt} <${+vt+1}.0.0-0`:Ot&&($t=`>=${vt}.${it}.0${Mt} <${vt}.${+it+1}.0-0`),ot("xRange return",$t),$t})},hn=(ut,pt)=>(ot("replaceStars",ut,pt),ut.trim().replace(ft[ht.STAR],"")),wt=(ut,pt)=>(ot("replaceGTE0",ut,pt),ut.trim().replace(ft[pt.includePrerelease?ht.GTE0PRE:ht.GTE0],"")),rt=ut=>(pt,mt,$t,xt,vt,it,bt,Mt,Lt,Ht,Ot,Jt)=>(Pt($t)?mt="":Pt(xt)?mt=`>=${$t}.0.0${ut?"-0":""}`:Pt(vt)?mt=`>=${$t}.${xt}.0${ut?"-0":""}`:it?mt=`>=${mt}`:mt=`>=${mt}${ut?"-0":""}`,Pt(Lt)?Mt="":Pt(Ht)?Mt=`<${+Lt+1}.0.0-0`:Pt(Ot)?Mt=`<${Lt}.${+Ht+1}.0-0`:Jt?Mt=`<=${Lt}.${Ht}.${Ot}-${Jt}`:ut?Mt=`<${Lt}.${Ht}.${+Ot+1}-0`:Mt=`<=${Mt}`,`${mt} ${Mt}`.trim()),st=(ut,pt,mt)=>{for(let $t=0;$t<ut.length;$t++)if(!ut[$t].test(pt))return!1;if(pt.prerelease.length&&!mt.includePrerelease){for(let $t=0;$t<ut.length;$t++)if(ot(ut[$t].semver),ut[$t].semver!==tt.ANY&&ut[$t].semver.prerelease.length>0){const xt=ut[$t].semver;if(xt.major===pt.major&&xt.minor===pt.minor&&xt.patch===pt.patch)return!0}return!1}return!0};return range}var comparator,hasRequiredComparator;function requireComparator(){if(hasRequiredComparator)return comparator;hasRequiredComparator=1;const a=Symbol("SemVer ANY");class j{static get ANY(){return a}constructor(dt,yt){if(yt=_e(yt),dt instanceof j){if(dt.loose===!!yt.loose)return dt;dt=dt.value}dt=dt.trim().split(/\s+/).join(" "),ot("comparator",dt,yt),this.options=yt,this.loose=!!yt.loose,this.parse(dt),this.semver===a?this.value="":this.value=this.operator+this.semver.version,ot("comp",this)}parse(dt){const yt=this.options.loose?et[nt.COMPARATORLOOSE]:et[nt.COMPARATOR],Tt=dt.match(yt);if(!Tt)throw new TypeError(`Invalid comparator: ${dt}`);this.operator=Tt[1]!==void 0?Tt[1]:"",this.operator==="="&&(this.operator=""),Tt[2]?this.semver=new ct(Tt[2],this.options.loose):this.semver=a}toString(){return this.value}test(dt){if(ot("Comparator.test",dt,this.options.loose),this.semver===a||dt===a)return!0;if(typeof dt=="string")try{dt=new ct(dt,this.options)}catch{return!1}return tt(dt,this.operator,this.semver,this.options)}intersects(dt,yt){if(!(dt instanceof j))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ft(dt.value,yt).test(this.value):dt.operator===""?dt.value===""?!0:new ft(this.value,yt).test(dt.semver):(yt=_e(yt),yt.includePrerelease&&(this.value==="<0.0.0-0"||dt.value==="<0.0.0-0")||!yt.includePrerelease&&(this.value.startsWith("<0.0.0")||dt.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&dt.operator.startsWith(">")||this.operator.startsWith("<")&&dt.operator.startsWith("<")||this.semver.version===dt.semver.version&&this.operator.includes("=")&&dt.operator.includes("=")||tt(this.semver,"<",dt.semver,yt)&&this.operator.startsWith(">")&&dt.operator.startsWith("<")||tt(this.semver,">",dt.semver,yt)&&this.operator.startsWith("<")&&dt.operator.startsWith(">")))}}comparator=j;const _e=parseOptions_1,{safeRe:et,t:nt}=reExports,tt=cmp_1,ot=debug_1$1,ct=semver$2,ft=requireRange();return comparator}const Range$9=requireRange(),satisfies$4=(a,j,_e)=>{try{j=new Range$9(j,_e)}catch{return!1}return j.test(a)};var satisfies_1=satisfies$4;const Range$8=requireRange(),toComparators$1=(a,j)=>new Range$8(a,j).set.map(_e=>_e.map(et=>et.value).join(" ").trim().split(" "));var toComparators_1=toComparators$1;const SemVer$4=semver$2,Range$7=requireRange(),maxSatisfying$1=(a,j,_e)=>{let et=null,nt=null,tt=null;try{tt=new Range$7(j,_e)}catch{return null}return a.forEach(ot=>{tt.test(ot)&&(!et||nt.compare(ot)===-1)&&(et=ot,nt=new SemVer$4(et,_e))}),et};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$2,Range$6=requireRange(),minSatisfying$1=(a,j,_e)=>{let et=null,nt=null,tt=null;try{tt=new Range$6(j,_e)}catch{return null}return a.forEach(ot=>{tt.test(ot)&&(!et||nt.compare(ot)===1)&&(et=ot,nt=new SemVer$3(et,_e))}),et};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$2,Range$5=requireRange(),gt$2=gt_1,minVersion$1=(a,j)=>{a=new Range$5(a,j);let _e=new SemVer$2("0.0.0");if(a.test(_e)||(_e=new SemVer$2("0.0.0-0"),a.test(_e)))return _e;_e=null;for(let et=0;et<a.set.length;++et){const nt=a.set[et];let tt=null;nt.forEach(ot=>{const ct=new SemVer$2(ot.semver.version);switch(ot.operator){case">":ct.prerelease.length===0?ct.patch++:ct.prerelease.push(0),ct.raw=ct.format();case"":case">=":(!tt||gt$2(ct,tt))&&(tt=ct);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${ot.operator}`)}}),tt&&(!_e||gt$2(_e,tt))&&(_e=tt)}return _e&&a.test(_e)?_e:null};var minVersion_1=minVersion$1;const Range$4=requireRange(),validRange$1=(a,j)=>{try{return new Range$4(a,j).range||"*"}catch{return null}};var valid$1=validRange$1;const SemVer$1=semver$2,Comparator$2=requireComparator(),{ANY:ANY$1}=Comparator$2,Range$3=requireRange(),satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(a,j,_e,et)=>{a=new SemVer$1(a,et),j=new Range$3(j,et);let nt,tt,ot,ct,ft;switch(_e){case">":nt=gt$1,tt=lte$1,ot=lt$1,ct=">",ft=">=";break;case"<":nt=lt$1,tt=gte$1,ot=gt$1,ct="<",ft="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(a,j,et))return!1;for(let ht=0;ht<j.set.length;++ht){const dt=j.set[ht];let yt=null,Tt=null;if(dt.forEach(St=>{St.semver===ANY$1&&(St=new Comparator$2(">=0.0.0")),yt=yt||St,Tt=Tt||St,nt(St.semver,yt.semver,et)?yt=St:ot(St.semver,Tt.semver,et)&&(Tt=St)}),yt.operator===ct||yt.operator===ft||(!Tt.operator||Tt.operator===ct)&&tt(a,Tt.semver))return!1;if(Tt.operator===ft&&ot(a,Tt.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(a,j,_e)=>outside$2(a,j,">",_e);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(a,j,_e)=>outside$1(a,j,"<",_e);var ltr_1=ltr$1;const Range$2=requireRange(),intersects$1=(a,j,_e)=>(a=new Range$2(a,_e),j=new Range$2(j,_e),a.intersects(j,_e));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(a,j,_e)=>{const et=[];let nt=null,tt=null;const ot=a.sort((dt,yt)=>compare$2(dt,yt,_e));for(const dt of ot)satisfies$2(dt,j,_e)?(tt=dt,nt||(nt=dt)):(tt&&et.push([nt,tt]),tt=null,nt=null);nt&&et.push([nt,null]);const ct=[];for(const[dt,yt]of et)dt===yt?ct.push(dt):!yt&&dt===ot[0]?ct.push("*"):yt?dt===ot[0]?ct.push(`<=${yt}`):ct.push(`${dt} - ${yt}`):ct.push(`>=${dt}`);const ft=ct.join(" || "),ht=typeof j.raw=="string"?j.raw:String(j);return ft.length<ht.length?ft:j};const Range$1=requireRange(),Comparator$1=requireComparator(),{ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(a,j,_e={})=>{if(a===j)return!0;a=new Range$1(a,_e),j=new Range$1(j,_e);let et=!1;e:for(const nt of a.set){for(const tt of j.set){const ot=simpleSubset(nt,tt,_e);if(et=et||ot!==null,ot)continue e}if(et)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(a,j,_e)=>{if(a===j)return!0;if(a.length===1&&a[0].semver===ANY){if(j.length===1&&j[0].semver===ANY)return!0;_e.includePrerelease?a=minimumVersionWithPreRelease:a=minimumVersion}if(j.length===1&&j[0].semver===ANY){if(_e.includePrerelease)return!0;j=minimumVersion}const et=new Set;let nt,tt;for(const St of a)St.operator===">"||St.operator===">="?nt=higherGT(nt,St,_e):St.operator==="<"||St.operator==="<="?tt=lowerLT(tt,St,_e):et.add(St.semver);if(et.size>1)return null;let ot;if(nt&&tt){if(ot=compare$1(nt.semver,tt.semver,_e),ot>0)return null;if(ot===0&&(nt.operator!==">="||tt.operator!=="<="))return null}for(const St of et){if(nt&&!satisfies$1(St,String(nt),_e)||tt&&!satisfies$1(St,String(tt),_e))return null;for(const At of j)if(!satisfies$1(St,String(At),_e))return!1;return!0}let ct,ft,ht,dt,yt=tt&&!_e.includePrerelease&&tt.semver.prerelease.length?tt.semver:!1,Tt=nt&&!_e.includePrerelease&&nt.semver.prerelease.length?nt.semver:!1;yt&&yt.prerelease.length===1&&tt.operator==="<"&&yt.prerelease[0]===0&&(yt=!1);for(const St of j){if(dt=dt||St.operator===">"||St.operator===">=",ht=ht||St.operator==="<"||St.operator==="<=",nt){if(Tt&&St.semver.prerelease&&St.semver.prerelease.length&&St.semver.major===Tt.major&&St.semver.minor===Tt.minor&&St.semver.patch===Tt.patch&&(Tt=!1),St.operator===">"||St.operator===">="){if(ct=higherGT(nt,St,_e),ct===St&&ct!==nt)return!1}else if(nt.operator===">="&&!satisfies$1(nt.semver,String(St),_e))return!1}if(tt){if(yt&&St.semver.prerelease&&St.semver.prerelease.length&&St.semver.major===yt.major&&St.semver.minor===yt.minor&&St.semver.patch===yt.patch&&(yt=!1),St.operator==="<"||St.operator==="<="){if(ft=lowerLT(tt,St,_e),ft===St&&ft!==tt)return!1}else if(tt.operator==="<="&&!satisfies$1(tt.semver,String(St),_e))return!1}if(!St.operator&&(tt||nt)&&ot!==0)return!1}return!(nt&&ht&&!tt&&ot!==0||tt&&dt&&!nt&&ot!==0||Tt||yt)},higherGT=(a,j,_e)=>{if(!a)return j;const et=compare$1(a.semver,j.semver,_e);return et>0?a:et<0||j.operator===">"&&a.operator===">="?j:a},lowerLT=(a,j,_e)=>{if(!a)return j;const et=compare$1(a.semver,j.semver,_e);return et<0?a:et>0||j.operator==="<"&&a.operator==="<="?j:a};var subset_1=subset$1;const internalRe=reExports,constants=constants$1,SemVer=semver$2,identifiers=identifiers$1,parse$7=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq$2=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=requireComparator(),Range=requireRange(),satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse$7,valid,clean,inc,diff,major,minor,patch,prerelease,compare,rcompare,compareLoose,compareBuild,sort,rsort,gt,lt,eq:eq$2,neq,gte,lte,cmp,coerce,Comparator,Range,satisfies,toComparators,maxSatisfying,minSatisfying,minVersion,validRange,outside,gtr,ltr,intersects,simplifyRange,subset,SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers};const semver$1=getDefaultExportFromCjs$1(semver),BLACK_LIST=[`${AUTH_SERVICE_PREFIX}/connect`,`${AUTH_SERVICE_PREFIX}/login`,`${AUTH_SERVICE_PREFIX}/invite`,`${AUTH_SERVICE_PREFIX}/issue-passport`,`${AUTH_SERVICE_PREFIX}/oauth/*`],blackListRoute=BLACK_LIST.map(a=>pathToRegexp$1(a,[]));async function login(){const a=(window==null?void 0:window.blocklet)||{},j=window.location.pathname,{componentId:_e,CHAIN_TYPE:et="arcblock",appPid:nt}=a;if(blackListRoute.some(ct=>ct.exec(j)))return null;const ot=getApps();try{const ft=new URLSearchParams(window.location.search).get("inviter")||localStorage.getItem("inviter"),ht=withQuery(joinURL(window.location.origin,AUTH_SERVICE_PREFIX,"/api/user/loginByWallet"),{inviter:ft});return await default_1$4.asyncCall("arcLogin",{target:ht,chainType:et,appPid:nt,componentId:_e,apps:ot.map(yt=>{let Tt=yt==null?void 0:yt.appLogo;return isUrl(Tt)||(Tt=joinURL(yt.appUrl,Tt)),{appName:yt.appName,appPid:yt.appPid,appUrl:yt.appUrl,appLogo:Tt,sourceAppPid:yt.sourceAppPid}})})}catch(ct){return console.error(ct),null}}async function getVisitorId(){return await default_1$4.asyncCall("arcGetVisitorId")}function checkEnableAutoLogin({platform:a,version:j}={}){return!!(a==="ios"&&j&&semver$1.gte(j,"4.15.6")||a==="android"&&j&&semver$1.gte(j,"4.15.1"))}async function didSpacesIsRequired(a){var nt;if((nt=a==null?void 0:a.didSpace)!=null&&nt.endpoint||!window.blocklet||window.self!==window.top)return!1;const j=getWalletDid(a);if(isEmpty$1(j))return!1;const{componentMountPoints:_e}=window.blocklet,[,et]=window.blocklet.componentId.split("/");return _e.some(tt=>{var ot;return((ot=tt==null?void 0:tt.capabilities)==null?void 0:ot.didSpace)==="requiredOnConnect"&&et===tt.did})}const{Provider:Provider$4,Consumer:Consumer$4}=SessionContext$1,didConnectTimeoutError={en:"DID Connect timeout, please reopen DID Connect popup",zh:"DID Connect 超时, 请重新打开 DID Connect"},waitForDidConnect={en:"DID Connect is already opened, please wait for it to complete",zh:"DID Connect 已打开,请等待完成"};function createSessionContext(a=SESSION_TOKEN_STORAGE_KEY,j="ls",_e={},et={}){var ht;let nt="/";(ht=globalThis==null?void 0:globalThis.blocklet)!=null&&ht.prefix&&(nt=globalThis.blocklet.prefix),typeof et=="boolean"&&(et={appendAuthServicePrefix:et,extraParams:{}}),defaultsDeep$1(et,{rolling:!0,appendAuthServicePrefix:!1,extraParams:{},refreshTokenStorageKey:REFRESH_TOKEN_STORAGE_KEY});const tt=createStorage(a,j,_e),ot=createStorage(et.refreshTokenStorageKey,"ls");function ct(dt){var Dn,xn;const{connectApi:yt,connectHolder:Tt}=useConnect(),St=useBrowser(),At=useReactive({extraParams:{},options:{},currentLocale:dt.locale,allowWallet:void 0,openMode:"window",get autoConnect(){return typeof dt.autoConnect=="boolean"?dt.autoConnect:!!dt.autoLogin},get prefix(){return et.appendAuthServicePrefix||dt.appendAuthServicePrefix?joinURL(AUTH_SERVICE_PREFIX,dt.prefix):dt.prefix}}),Rt=useReactive({action:dt.action,error:"",initialized:!1,loading:!1,open:!1,user:null,provider:"",walletOS:"",baseUrl:""}),It=useCreation(()=>dt.locale||At.currentLocale||getBrowserLang(),[dt.locale,At.currentLocale]),{confirmApi:Ct,confirmHolder:kt}=useConfirm(),Pt=useMemoizedFn(()=>{if(Rt.open){const wn=waitForDidConnect[It]||waitForDidConnect.en;throw Toast$1.warning(wn),new Error(wn)}}),Bt=useCreation(()=>new EventEmitter$6,[]),Kt=useMemoizedFn((wn,jn,Rn)=>{const Pn={login:[EVENTS.LOGIN,EVENTS.CANCEL_LOGIN],"bind-wallet":[EVENTS.BIND_WALLET,EVENTS.CANCEL_BIND_WALLET],"switch-passport":[EVENTS.SWITCH_PASSPORT,EVENTS.CANCEL_SWITCH_PASSPORT],"switch-profile":[EVENTS.SWITCH_PROFILE,EVENTS.CANCEL_SWITCH_PROFILE],"switch-did":[EVENTS.LOGIN,EVENTS.CANCEL_LOGIN]};if(!Object.keys(Pn).includes(wn))return;const tr=async(...Bn)=>{isFunction$8(jn)&&await jn(...Bn),Bt.emit(wn,...Bn)};Bt.once(Pn[wn][0],tr),Bt.once(Pn[wn][1],async(...Bn)=>{isFunction$8(tr)&&Bt.off(Pn[wn][0],tr),isFunction$8(Rn)&&await Rn(...Bn),Bt.emit(`cancel-${wn}`,...Bn)})}),jt=usePrevious(Rt.initialized,(wn,jn)=>wn!==jn||wn===!0&&jn===!0),{handleRefreshUser:zt,handleRefreshToken:Gt,renewToken:tn,clearSession:hn,handleLoginResult:wt,decrypt:rt,service:st,getSessionToken:ut,getRefreshToken:pt,setRefreshToken:mt,setSessionToken:$t}=useSessionToken({state:Rt,pageState:At,sessionTokenStorage:tt,refreshTokenStorage:ot,serviceHost:dt.serviceHost,apiOptions:dt.apiOptions,lazyRefreshToken:dt.lazyRefreshToken}),xt=useMemoizedFn((wn,jn={},Rn={})=>{Pt();const Pn=wn;typeof Pn=="object"&&(wn=Pn.onSuccess,jn=Pn.extraParams||{},Rn=Pn.options||{},Rn.origin=Pn.origin||""),(!Rt.user||Rn.origin==="switch-did")&&(Rn.origin==="switch-did"?Kt("switch-did",wn,Pn==null?void 0:Pn.onCancel):Kt("login",wn,Pn==null?void 0:Pn.onCancel),At.extraParams=jn,At.options=Rn,Rt.action="login",In())}),vt=useMemoizedFn(async(wn,jn={},Rn={})=>{var Fn;Pt();const Pn=wn;typeof Pn=="object"&&(wn=Pn.onSuccess,jn=Pn.extraParams||{},Rn=Pn.options||{}),isUndefined$2(jn==null?void 0:jn.inviter)&&window.localStorage.getItem("inviter")&&(jn.inviter=window.localStorage.getItem("inviter"));const{params:tr}=await decodeUrlParams();if(isUndefined$2(jn==null?void 0:jn.forceConnected)&&(tr!=null&&tr.forceConnected)&&(jn.forceConnected=tr.forceConnected,isUndefined$2(Rn.showQuickConnect)&&(Rn.showQuickConnect=!1)),isUndefined$2(jn==null?void 0:jn.sourceAppPid)&&!isUndefined$2(tr==null?void 0:tr.sourceAppPid)&&(jn.sourceAppPid=tr.sourceAppPid),(jn==null?void 0:jn.openMode)==="redirect"){const Gn=(jn==null?void 0:jn.redirect)||"/",Tr=new URL(`${AUTH_SERVICE_PREFIX}/login`,window.location.origin);Tr.searchParams.set("redirect",Gn),jn!=null&&jn.forceConnected&&Tr.searchParams.set("forceConnected",jn==null?void 0:jn.forceConnected),isUndefined$2(jn==null?void 0:jn.sourceAppPid)||Tr.searchParams.set("sourceAppPid",jn==null?void 0:jn.sourceAppPid),isUndefined$2(jn==null?void 0:jn.inviter)||Tr.searchParams.set("inviter",jn==null?void 0:jn.inviter),Rn!=null&&Rn.origin&&Tr.searchParams.set("origin",Rn.origin),window.location.href=Tr.href;return}let Bn=jn==null?void 0:jn.sourceAppPid;isUndefined$2(Bn)&&An&&(Bn=Tn.appPid),await pWaitFor$1(()=>Rt.initialized),typeof Rn=="string"&&(Rn={origin:Rn});const qn=cloneDeep$1(jn);At.allowWallet=void 0;const $r=(qn==null?void 0:qn.openMode)||((Fn=dt==null?void 0:dt.extraParams)==null?void 0:Fn.openMode);isUndefined$2($r)?At.openMode="window":At.openMode=$r,Bn?Rt.baseUrl=globalThis.blocklet.appUrl:Rt.baseUrl="",xt(wn,qn,Rn)}),it=getVisitorId$2(),bt=useMemoizedFn(async wn=>{const jn=joinURL(AUTH_SERVICE_PREFIX,"/api/user/logout");await fetch(jn,{method:"POST",body:JSON.stringify({visitorId:it}),headers:{"Content-Type":"application/json"}}),hn(),Sn(),Rt.user=null,Rt.provider="",Rt.walletOS="",Rt.error="",Rt.loading=!1,Bt.emit("logout"),typeof wn=="function"&&wn()}),{userSessions:Mt,refresh:Lt,loaded:Ht,loginUserSession:Ot}=useQuickConnect({appPid:getCurrentAppPid(Rt.user),loginAppPid:(Dn=globalThis==null?void 0:globalThis.blocklet)==null?void 0:Dn.appPid,sourceAppPid:(xn=Rt==null?void 0:Rt.user)==null?void 0:xn.sourceAppPid,autoFetch:!1,fetchAll:!0}),Jt=useMemoizedFn(async()=>{Rt!=null&&Rt.user||await new Promise(wn=>{vt(()=>{wn()})})}),Ft=useMemoizedFn((wn,jn={},Rn={})=>{Pt();const Pn=wn;typeof Pn=="object"&&(wn=Pn.onSuccess,jn=Pn.extraParams||{},Rn=Pn.options||{}),typeof Rn=="string"&&(Rn={origin:Rn}),Rn!=null&&Rn.userSession?Ot(Rn.userSession).then(tr=>{updateConnectedInfo({connected_did:Rn.userSession.user.did,connected_pk:Rn.userSession.user.pk,connected_wallet_os:Rn.userSession.extra.walletOS,connected_app:getAppId$1()},!0),Kt("switch-did",wn),wt({...tr,encrypted:!1}),zt({showProgress:!0}).then(async()=>{await sleep$1(),Bt.emit(EVENTS.LOGIN,tr,rt,Yt.current),await Vt()})}):(isUndefined$2(jn==null?void 0:jn.forceConnected)&&(jn.forceConnected=!1),vt(wn,jn,{...Rn,origin:"switch-did"}))}),Zt=useMemoizedFn(async()=>{await new BlockletSDK().user.refreshProfile()}),nn=useMemoizedFn(async(wn,jn={})=>{await Jt(),Pt();const Rn=wn;typeof Rn=="object"&&(wn=Rn.onSuccess,jn=Rn.extraParams||{}),Kt("switch-profile",wn,Rn==null?void 0:Rn.onCancel),At.extraParams=jn,At.options={},Rt.action="switch-profile",In()}),cn=useMemoizedFn(async(wn,jn={})=>{await Jt(),Pt();const Rn=wn;typeof Rn=="object"&&(wn=Rn.onSuccess,jn=Rn.extraParams||{}),Kt("switch-passport",wn,Rn==null?void 0:Rn.onCancel),At.extraParams=jn,At.options={},Rt.action="switch-passport",In()}),qt=useMemoizedFn(async({extraParams:wn={},onSuccess:jn=()=>{},...Rn}={})=>{await Jt(),Pt(),At.extraParams={referrer:window.location.href,purpose:"authorize-for-import",...wn},At.options={},Rt.action="connect-to-did-spaces-for-user",In({hideCloseButton:!0,onSuccess:jn,...Rn})}),Dt=useMemoizedFn(async({extraParams:wn={},onSuccess:jn={}}={})=>{await Jt(),qt({extraParams:{purpose:"authorize-for-import",...wn},onSuccess:jn,hideCloseButton:!1})}),Vt=useMemoizedFn(async({extraParams:wn={},onSuccess:jn={}}={})=>{await Jt(),await didSpacesIsRequired(Rt==null?void 0:Rt.user)&&qt({extraParams:{purpose:"authorize-for-full-access",...wn},onSuccess:jn})}),an=useMemoizedFn(async(wn,jn={})=>{if(await Jt(),getWalletDid(Rt.user)){wn({},rt,Yt.current);return}Pt();const Rn=wn;typeof Rn=="object"&&(wn=Rn.onSuccess),Kt("bind-wallet",wn,Rn==null?void 0:Rn.onCancel),At.extraParams=jn,At.options={},Rt.action="bind-wallet",In()}),Xt=useMemoizedFn(async wn=>{At.extraParams={},At.options={},wt(wn),Rt.loading=!1,await zt({showProgress:!0}),await sleep$1(),Rt.action==="login"?(Bt.emit(EVENTS.LOGIN,wn,rt,Yt.current),Vt()):Rt.action==="switch-passport"&&Bt.emit(EVENTS.SWITCH_PASSPORT,wn,rt,Yt.current)}),pn=useMemoizedFn(wn=>{At.extraParams={},At.options={},wt(wn),Rt.loading=!1,zt({showProgress:!0}).then(async()=>{await sleep$1(),Bt.emit(EVENTS.BIND_WALLET,wn,rt,Yt.current)})}),En=useMemoizedFn(()=>{zt({showProgress:!0}),Bt.emit(EVENTS.CONNECT_TO_DID_SPACE_FOR_FULL_ACCESS)}),sn=useMemoizedFn(wn=>{At.extraParams={},At.options={},Rt.loading=!1,zt({showProgress:!0}).then(async()=>{await sleep$1(),Bt.emit(EVENTS.SWITCH_PROFILE,wn,rt,Yt.current)})}),dn=useMemoizedFn(wn=>{At.extraParams={},At.options={},Sn();const jn={login:EVENTS.CANCEL_LOGIN,"switch-profile":EVENTS.CANCEL_SWITCH_PROFILE,"switch-passport":EVENTS.CANCEL_SWITCH_PASSPORT,"bind-wallet":EVENTS.CANCEL_BIND_WALLET};Bt.emit(jn[wn])}),Mn=useMemoizedFn((wn,...jn)=>{try{$n[wn](...jn)}catch(Rn){console.error("Catch error in onSuccess",{action:wn,args:jn,err:Rn})}}),{federatedMaster:yn,federatedEnabled:An,master:Tn}=useFederated({locale:It,decrypt:rt,login:xt,handleLoginResult:wt,handleRefreshUser:zt,setRefreshToken:mt,setSessionToken:$t}),{checkMatch:gn}=useProtectedRoutes({protectedRoutes:dt.protectedRoutes||[]}),vn=useLatest(Mt),Ln=useMemoizedFn(async()=>(Ht||(await Lt(),await sleep$1()),vn.current)),Sn=useMemoizedFn(()=>{Rt.open=!1,yt.close()}),In=async(wn={})=>{var qn,$r,Fn,Gn,Tr,Vn,Kn;let jn=Rt.action;((qn=At==null?void 0:At.options)==null?void 0:qn.origin)==="switch-did"&&(jn=($r=At==null?void 0:At.options)==null?void 0:$r.origin);const Rn=translations$2[jn],Pn=Rn[It]||Rn.en,tr={...et.extraParams,...dt.extraParams,...At.extraParams,previousUserDid:(Fn=Rt==null?void 0:Rt.user)==null?void 0:Fn.did,email:(Gn=Rt==null?void 0:Rt.user)==null?void 0:Gn.email};if(jn==="switch-did"&&(tr!=null&&tr.forceConnected)){const br=(Un,Yn={})=>translate(translations$2["switch-specified-did"],Un,It,"en",Yn);Pn.title=br("title"),Pn.scan=br("scan",{did:tr.forceConnected}),Pn.confirm=br("confirm"),Pn.success=br("success")}tr==null||delete tr.openMode;const Bn={action:Rt.action,locale:It,hideCloseButton:wn==null?void 0:wn.hideCloseButton,extraParams:tr,options:{...dt.options||{},...At.options},checkTimeout:dt.timeout,webWalletUrl:dt.webWalletUrl,messages:Pn,useSocket:dt.useSocket,...omit$1(dt,["action","locale","serviceHost","appendAuthServicePrefix","autoDisconnect","children","timeout","extraParams","options","webWalletUrl","messages","useSocket","lazyRefreshToken","apiOptions","protectedRoutes"]),...pick$2(At.extraParams||{},["autoConnect","forceConnected","saveConnect","useSocket"]),prefix:At.prefix,allowWallet:isUndefined$2(At.allowWallet)?Rt.action!=="login"||(((Tr=globalThis.blocklet)==null?void 0:Tr.DID_CONNECT_ALLOW_WALLET)||"1")==="1":At.allowWallet,onSuccess:async(...br)=>{Mn(Rt.action,...br),isFunction$8(wn==null?void 0:wn.onSuccess)&&await wn.onSuccess(...br),Rt.open=!1},onClose(...br){dn(Rt.action,...br)},onError(br){console.error(br)}};if(Rt.open=!0,["login"].includes(Rt.action)&&At.openMode==="window"&&!St.wallet)try{const br={...Bn,baseUrl:window.location.origin};isUrl(At.prefix)||(br.prefix=joinURL(window.location.origin,dt.serviceHost==="/"?"":dt.serviceHost,At.prefix)),(Vn=br.extraParams)!=null&&Vn.provider||(br.extraParams.provider=((Kn=Rt==null?void 0:Rt.user)==null?void 0:Kn.provider)||"wallet"),await yt.openPopup(br,{locale:It})}catch(br){br instanceof NotOpenError&&Sn(),br.message==="Timeout"?Toast$1.error(didConnectTimeoutError[It]||didConnectTimeoutError.en):console.error(br)}else yt.open(Bn)},Nn=useMemoizedFn(async()=>{const{params:wn,url:jn}=await decodeUrlParams();if(wn){const{switchBehavior:Rn,forceConnected:Pn,sourceAppPid:tr,showClose:Bn}=wn;Pn===Rt.user.did?window.history.replaceState(null,"trim",jn):Rn==="required"?Ft(()=>{},{openMode:"redirect",redirect:jn,sourceAppPid:tr,forceConnected:Pn}):Rn==="disabled"?window.history.replaceState(null,"trim",jn):Ct.open({title:translations$2.switchAccountDialog[It].title,content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:{textAlign:"center",mb:2},children:translations$2.switchAccountDialog[It].description}),jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",color:colors$1.foregroundsFgBase},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1.5,lineHeight:1},children:[jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{did:Rt.user.did,shape:"circle",variant:"circle",size:80}),jsxRuntimeExports.jsx(DID,{did:Rt.user.did,showAvatar:!1,compact:!0,responsive:!1}),translations$2.switchAccountDialog[It].currentAccount]}),jsxRuntimeExports.jsx(Box,{sx:{display:"flex",justifyContent:"center",px:2},children:jsxRuntimeExports.jsx(Box,{component:Icon,icon:data$w,fontSize:24,color:colors$1.foregroundsFgMuted,sx:{animation:"right 2.5s linear infinite","@keyframes right":{"0%":{transform:"translateX(-3px)",opacity:0},"60%":{transform:"translateX(3px)",opacity:1},"100%":{transform:"translateX(0px)",opacity:0}}}})}),jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1.5,lineHeight:1,fontWeight:500},children:[jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{did:Pn,shape:"circle",variant:"circle",size:80}),jsxRuntimeExports.jsx(DID,{did:Pn,showAvatar:!1,compact:!0,responsive:!1}),translations$2.switchAccountDialog[It].nextAccount]})]})]}),showCloseButton:Bn,showCancelButton:!1,confirmButtonText:translations$2.switchAccountDialog[It].confirm,async onConfirm(qn){const Fn=(await Ln()).find(Gn=>Gn.userDid===Pn);if(Fn){Ot(Fn).then(Gn=>{updateConnectedInfo({connected_did:Fn.user.did,connected_pk:Fn.user.pk,connected_wallet_os:Fn.extra.walletOS,connected_app:getAppId$1()},!0),wt({...Gn,encrypted:!1}),zt({showProgress:!0}).then(async()=>{await sleep$1(),Bt.emit(EVENTS.LOGIN,Gn,rt,Yt.current),await Vt()})}),qn();return}Ft(()=>{qn(),window.location.replace(jn)},{sourceAppPid:tr,forceConnected:Pn,enableSwitchApp:!1},{showQuickConnect:!0})}})}}),rn=useMemoizedFn(async(wn,jn)=>{const Rn=Object.assign({login:!0,bindWallet:!0,bindDidSpaces:!1},jn==null?void 0:jn.requirements),Pn=(jn==null?void 0:jn.openMode)||"popup";Rn.login&&await Jt(),Rn.bindWallet&&await new Promise(tr=>{an(()=>{tr()})}),Rn.bindDidSpaces&&(await didSpacesIsRequired(Rt==null?void 0:Rt.user)||await new Promise(tr=>{Rn.bindDidSpaces==="full"?Vt({onSuccess(){tr()}}):Rn.bindDidSpaces==="read"&&Dt({onSuccess(){tr()}})})),Pn==="window"?yt.openPopup(wn,jn):Pn==="popup"&&yt.open(wn)}),Ut={...Rt,loading:At.autoConnect&&!Rt.user||Rt.loading,openDidConnect:rn,login:vt,logout:bt,switchDid:Ft,autoSwitchDid:Nn,refreshProfile:Zt,switchProfile:nn,switchPassport:cn,connectToDidSpaceForImport:Dt,connectToDidSpaceForFullAccess:Vt,bindWallet:an,refresh:zt,updateConnectedInfo,federatedMaster:yn,useOAuth,OAuthProvider,OAuthConsumer,OAuthContext,useDid,WrapDid,getUserSessions:Ln},Yt=useLatest(Ut),fn={api:st,events:Bt,storage:tt,connectApi:yt,session:Yt.current},$n={login:Xt,"switch-profile":sn,"switch-passport":Xt,"bind-wallet":pn,"connect-to-did-spaces-for-user":En};return useUpdateEffect(()=>{if(Rt.initialized){const wn=!jt;Bt.emit("change",{user:cloneDeep$1(Rt.user),isFirst:wn})}},[Rt.user,Rt.initialized,Bt]),useUpdateEffect(()=>{Rt.initialized&&Rt.user&&Nn()},[Rt.initialized]),useMount(async()=>{default_1$4.registerAsyn("blocklet:logout",bt);const wn=Cookie.get("connected_app"),jn=getAppId$1();if(dt.autoDisconnect&&wn&&jn&&wn!==jn){hn(),Rt.initialized=!0,At.autoConnect?In():Sn();return}const Rn=ut();let Pn="web";if(St.mobile.apple.device?Pn="ios":St.mobile.android.device&&(Pn="android"),(window==null?void 0:window.self)===(window==null?void 0:window.parent)&&St.wallet&&checkEnableAutoLogin({version:St.walletVersion,platform:Pn})){if(!it){const Bn=await getVisitorId();setVisitorId(Bn)}if(!Rn)try{Rt.loading=!0;const Bn=await login();if(Bn){await Xt({sessionToken:Bn.sessionToken,refreshToken:Bn.refreshToken,encrypted:!1}),Rt.initialized=!0;return}}finally{Rt.loading=!1}}if(Rn){await zt({showProgress:!0}),Rt.initialized=!0,await Vt();return}if(typeof window<"u"){const Bn=new URL(window.location.href),qn=Bn.searchParams.get("loginToken");if(qn){wt({loginToken:qn,encrypted:!1}),Bn.searchParams.delete("loginToken"),window.history.replaceState({},window.title,Bn.href);return}}if(pt()){await Gt(!0),Rt.initialized=!0;return}try{}catch(Bn){console.error("Federated: tryAutoLogin failed",Bn)}finally{Rt.initialized=!0}At.autoConnect?In():Sn()}),gn()&&!Rt.initialized?jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):jsxRuntimeExports.jsx(Provider$4,{value:fn,children:jsxRuntimeExports.jsxs(OAuthProvider,{locale:It,onSwitchPassport:({sessionToken:wn,refreshToken:jn})=>{Xt({sessionToken:wn,refreshToken:jn,encrypted:!1})},onUnbindOAuth:()=>{zt()},onBindOAuth:()=>{zt()},children:[!Rt.open&&typeof dt.children=="function"?dt.children(Rt):dt.children,Tt,kt,et.rolling&&jsxRuntimeExports.jsx(WindowFocusAware,{callback:()=>tn()})]})})}ct.propTypes={children:PropTypes.any.isRequired,serviceHost:PropTypes.string,action:PropTypes.string,prefix:PropTypes.string,appendAuthServicePrefix:PropTypes.bool,locale:PropTypes.string,timeout:PropTypes.number,autoConnect:PropTypes.bool,autoDisconnect:PropTypes.bool,useSocket:PropTypes.bool,extraParams:PropTypes.object,options:PropTypes.object,webWalletUrl:PropTypes.string,protectedRoutes:PropTypes.arrayOf(PropTypes.string),apiOptions:PropTypes.object,lazyRefreshToken:PropTypes.bool},ct.defaultProps={serviceHost:nt,locale:"",action:"login",prefix:API_DID_PREFIX,appendAuthServicePrefix:!1,extraParams:{},options:{},autoConnect:!1,autoDisconnect:!0,useSocket:!0,timeout:DEFAULT_TIMEOUT$1*1e3,webWalletUrl:"",protectedRoutes:["*"],apiOptions:{},lazyRefreshToken:!1};function ft(dt){return function(Tt){return jsxRuntimeExports.jsx(ToastProvider,{children:jsxRuntimeExports.jsx(Consumer$4,{children:St=>jsxRuntimeExports.jsx(dt,{...Tt,...St})})})}}return{SessionProvider:dt=>jsxRuntimeExports.jsx(ToastProvider,{children:jsxRuntimeExports.jsx(ct,{...dt})}),SessionConsumer:Consumer$4,SessionContext:SessionContext$1,withSession:ft}}let path="/";window.env&&(path=window.env.groupPathPrefix||window.env.pathPrefix||"/");function formatCacheTtl(a,j){return[void 0,null,""].includes(a)?j:a/86400}var uo,co,fo;const sessionTokenExpireInDays=formatCacheTtl((fo=(co=(uo=window.blocklet)==null?void 0:uo.settings)==null?void 0:co.session)==null?void 0:fo.cacheTtl,constant$3.SESSION_CACHE_TTL/86400);var po,ho,mo;const refreshTokenExpireInDays=formatCacheTtl((mo=(ho=(po=window.blocklet)==null?void 0:po.settings)==null?void 0:ho.session)==null?void 0:mo.ttl,constant$3.SESSION_TTL/86400),{SessionProvider,SessionContext,SessionConsumer,withSession}=createSessionContext("login_token","cookie",{returnDomain:!1,path,expireInDays:sessionTokenExpireInDays},{refreshTokenStorageKey:"refresh_token",refreshTokenExpireInDays});function useSessionContext(){return reactExports.useContext(SessionContext)}function Root$1({children:a}){const j=create$3({typography:{fontSize:14,button:{textTransform:"none"}},palette:{primary:{main:"#1DC1C7",contrastText:"#fff"}}});return jsxRuntimeExports.jsx(StyledEngineProvider,{injectFirst:!0,children:jsxRuntimeExports.jsx(ThemeProvider$1,{theme:j,children:jsxRuntimeExports.jsx(ThemeProvider$4,{theme:j,children:jsxRuntimeExports.jsx(LocaleProvider,{translations:translations$9,fallbackLocale:"en",children:jsxRuntimeExports.jsx(ToastProvider,{children:jsxRuntimeExports.jsx(RootInside,{theme:j,children:a})})})})})})}const url$1=new URL(window.location.href),mode=url$1.searchParams.get("mode")||"",isEmbedDialog=url$1.pathname.includes("embed")&&mode==="dialog",isEmbedSection=url$1.pathname.includes("embed")&&mode!=="dialog";function RootInside({children:a,theme:j}){var nt,tt,ot;const{locale:_e}=useLocaleContext(),et=css`
472
472
  ${isEmbedDialog?"body { background-color: transparent }":""}
473
473
  ${isEmbedSection?".MuiModal-backdrop { background-color: transparent !important }":""}
474
474
  a {
@@ -1349,4 +1349,4 @@ ${et.length}`,ot=Buffer$3.from(tt),ct=Buffer$3.concat([ot,nt]);return hash_1.def
1349
1349
  `)&&a.flags==="s")}),fails$2=fails$d,globalThis$1=globalThis_1,$RegExp=globalThis$1.RegExp,regexpUnsupportedNcg=fails$2(function(){var a=$RegExp("(?<a>b)","g");return a.exec("b").groups.a!=="b"||"b".replace(a,"$<a>c")!=="bc"}),call$4=functionCall,uncurryThis$5=functionUncurryThis,toString$3=toString$4,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=shared$4,create$1=objectCreate,getInternalState=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt$3=uncurryThis$5("".charAt),indexOf=uncurryThis$5("".indexOf),replace$1=uncurryThis$5("".replace),stringSlice$3=uncurryThis$5("".slice),UPDATES_LAST_INDEX_WRONG=function(){var a=/a/,j=/b*/g;return call$4(nativeExec,a,"a"),call$4(nativeExec,j,"a"),a.lastIndex!==0||j.lastIndex!==0}(),UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=/()??/.exec("")[1]!==void 0,PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG;PATCH&&(patchedExec=function(j){var _e=this,et=getInternalState(_e),nt=toString$3(j),tt=et.raw,ot,ct,ft,ht,dt,yt,Tt;if(tt)return tt.lastIndex=_e.lastIndex,ot=call$4(patchedExec,tt,nt),_e.lastIndex=tt.lastIndex,ot;var St=et.groups,At=UNSUPPORTED_Y&&_e.sticky,Rt=call$4(regexpFlags,_e),It=_e.source,Ct=0,kt=nt;if(At&&(Rt=replace$1(Rt,"y",""),indexOf(Rt,"g")===-1&&(Rt+="g"),kt=stringSlice$3(nt,_e.lastIndex),_e.lastIndex>0&&(!_e.multiline||_e.multiline&&charAt$3(nt,_e.lastIndex-1)!==`
1350
1350
  `)&&(It="(?: "+It+")",kt=" "+kt,Ct++),ct=new RegExp("^(?:"+It+")",Rt)),NPCG_INCLUDED&&(ct=new RegExp("^"+It+"$(?!\\s)",Rt)),UPDATES_LAST_INDEX_WRONG&&(ft=_e.lastIndex),ht=call$4(nativeExec,At?ct:_e,kt),At?ht?(ht.input=stringSlice$3(ht.input,Ct),ht[0]=stringSlice$3(ht[0],Ct),ht.index=_e.lastIndex,_e.lastIndex+=ht[0].length):_e.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&ht&&(_e.lastIndex=_e.global?ht.index+ht[0].length:ft),NPCG_INCLUDED&&ht&&ht.length>1&&call$4(nativeReplace,ht[0],ct,function(){for(dt=1;dt<arguments.length-2;dt++)arguments[dt]===void 0&&(ht[dt]=void 0)}),ht&&St)for(ht.groups=yt=create$1(null),dt=0;dt<St.length;dt++)Tt=St[dt],yt[Tt[0]]=ht[Tt[1]];return ht});var regexpExec$2=patchedExec,$$1=_export,exec=regexpExec$2;$$1({target:"RegExp",proto:!0,forced:/./.exec!==exec},{exec});var classofRaw=classofRaw$2,uncurryThis$4=functionUncurryThis,functionUncurryThisClause=function(a){if(classofRaw(a)==="Function")return uncurryThis$4(a)},isObject=isObject$6,classof$1=classofRaw$2,wellKnownSymbol$3=wellKnownSymbol$7,MATCH$1=wellKnownSymbol$3("match"),isRegexp=function(a){var j;return isObject(a)&&((j=a[MATCH$1])!==void 0?!!j:classof$1(a)==="RegExp")},isRegExp=isRegexp,$TypeError$1=TypeError,notARegexp=function(a){if(isRegExp(a))throw new $TypeError$1("The method doesn't accept regular expressions");return a},wellKnownSymbol$2=wellKnownSymbol$7,MATCH=wellKnownSymbol$2("match"),correctIsRegexpLogic=function(a){var j=/./;try{"/./"[a](j)}catch{try{return j[MATCH]=!1,"/./"[a](j)}catch{}}return!1},$=_export,uncurryThis$3=functionUncurryThisClause,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,toLength$1=toLength$3,toString$2=toString$4,notARegExp=notARegexp,requireObjectCoercible$2=requireObjectCoercible$5,correctIsRegExpLogic=correctIsRegexpLogic,slice=uncurryThis$3("".slice),min$1=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic("endsWith"),MDN_POLYFILL_BUG=!CORRECT_IS_REGEXP_LOGIC&&!!function(){var a=getOwnPropertyDescriptor(String.prototype,"endsWith");return a&&!a.writable}();$({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{endsWith:function a(j){var _e=toString$2(requireObjectCoercible$2(this));notARegExp(j);var et=arguments.length>1?arguments[1]:void 0,nt=_e.length,tt=et===void 0?nt:min$1(toLength$1(et),nt),ot=toString$2(j);return slice(_e,tt-ot.length,tt)===ot}});var NATIVE_BIND=functionBindNative,FunctionPrototype=Function.prototype,apply$1=FunctionPrototype.apply,call$3=FunctionPrototype.call,functionApply=typeof Reflect=="object"&&Reflect.apply||(NATIVE_BIND?call$3.bind(apply$1):function(){return call$3.apply(apply$1,arguments)}),call$2=functionCall,defineBuiltIn=defineBuiltIn$2,regexpExec$1=regexpExec$2,fails$1=fails$d,wellKnownSymbol$1=wellKnownSymbol$7,createNonEnumerableProperty=createNonEnumerableProperty$3,SPECIES=wellKnownSymbol$1("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(a,j,_e,et){var nt=wellKnownSymbol$1(a),tt=!fails$1(function(){var ht={};return ht[nt]=function(){return 7},""[a](ht)!==7}),ot=tt&&!fails$1(function(){var ht=!1,dt=/a/;return a==="split"&&(dt={},dt.constructor={},dt.constructor[SPECIES]=function(){return dt},dt.flags="",dt[nt]=/./[nt]),dt.exec=function(){return ht=!0,null},dt[nt](""),!ht});if(!tt||!ot||_e){var ct=/./[nt],ft=j(nt,""[a],function(ht,dt,yt,Tt,St){var At=dt.exec;return At===regexpExec$1||At===RegExpPrototype.exec?tt&&!St?{done:!0,value:call$2(ct,dt,yt,Tt)}:{done:!0,value:call$2(ht,yt,dt,Tt)}:{done:!1}});defineBuiltIn(String.prototype,a,ft[0]),defineBuiltIn(RegExpPrototype,nt,ft[1])}et&&createNonEnumerableProperty(RegExpPrototype[nt],"sham",!0)},uncurryThis$2=functionUncurryThis,toIntegerOrInfinity$1=toIntegerOrInfinity$4,toString$1=toString$4,requireObjectCoercible$1=requireObjectCoercible$5,charAt$2=uncurryThis$2("".charAt),charCodeAt=uncurryThis$2("".charCodeAt),stringSlice$2=uncurryThis$2("".slice),createMethod=function(a){return function(j,_e){var et=toString$1(requireObjectCoercible$1(j)),nt=toIntegerOrInfinity$1(_e),tt=et.length,ot,ct;return nt<0||nt>=tt?a?"":void 0:(ot=charCodeAt(et,nt),ot<55296||ot>56319||nt+1===tt||(ct=charCodeAt(et,nt+1))<56320||ct>57343?a?charAt$2(et,nt):ot:a?stringSlice$2(et,nt,nt+2):(ot-55296<<10)+(ct-56320)+65536)}},stringMultibyte={codeAt:createMethod(!1),charAt:createMethod(!0)},charAt$1=stringMultibyte.charAt,advanceStringIndex$1=function(a,j,_e){return j+(_e?charAt$1(a,j).length:1)},uncurryThis$1=functionUncurryThis,toObject=toObject$2,floor=Math.floor,charAt=uncurryThis$1("".charAt),replace=uncurryThis$1("".replace),stringSlice$1=uncurryThis$1("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(a,j,_e,et,nt,tt){var ot=_e+a.length,ct=et.length,ft=SUBSTITUTION_SYMBOLS_NO_NAMED;return nt!==void 0&&(nt=toObject(nt),ft=SUBSTITUTION_SYMBOLS),replace(tt,ft,function(ht,dt){var yt;switch(charAt(dt,0)){case"$":return"$";case"&":return a;case"`":return stringSlice$1(j,0,_e);case"'":return stringSlice$1(j,ot);case"<":yt=nt[stringSlice$1(dt,1,-1)];break;default:var Tt=+dt;if(Tt===0)return ht;if(Tt>ct){var St=floor(Tt/10);return St===0?ht:St<=ct?et[St-1]===void 0?charAt(dt,1):et[St-1]+charAt(dt,1):ht}yt=et[Tt-1]}return yt===void 0?"":yt})},call$1=functionCall,anObject$1=anObject$7,isCallable$1=isCallable$d,classof=classofRaw$2,regexpExec=regexpExec$2,$TypeError=TypeError,regexpExecAbstract=function(a,j){var _e=a.exec;if(isCallable$1(_e)){var et=call$1(_e,a,j);return et!==null&&anObject$1(et),et}if(classof(a)==="RegExp")return call$1(regexpExec,a,j);throw new $TypeError("RegExp#exec called on incompatible receiver")},apply=functionApply,call=functionCall,uncurryThis=functionUncurryThis,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,fails=fails$d,anObject=anObject$7,isCallable=isCallable$d,isNullOrUndefined=isNullOrUndefined$3,toIntegerOrInfinity=toIntegerOrInfinity$4,toLength=toLength$3,toString=toString$4,requireObjectCoercible=requireObjectCoercible$5,advanceStringIndex=advanceStringIndex$1,getMethod=getMethod$2,getSubstitution=getSubstitution$1,regExpExec=regexpExecAbstract,wellKnownSymbol=wellKnownSymbol$7,REPLACE=wellKnownSymbol("replace"),max=Math.max,min=Math.min,concat=uncurryThis([].concat),push=uncurryThis([].push),stringIndexOf=uncurryThis("".indexOf),stringSlice=uncurryThis("".slice),maybeToString=function(a){return a===void 0?a:String(a)},REPLACE_KEEPS_$0=function(){return"a".replace(/./,"$0")==="$0"}(),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=function(){return/./[REPLACE]?/./[REPLACE]("a","$0")==="":!1}(),REPLACE_SUPPORTS_NAMED_GROUPS=!fails(function(){var a=/./;return a.exec=function(){var j=[];return j.groups={a:"7"},j},"".replace(a,"$<a>")!=="7"});fixRegExpWellKnownSymbolLogic("replace",function(a,j,_e){var et=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(tt,ot){var ct=requireObjectCoercible(this),ft=isNullOrUndefined(tt)?void 0:getMethod(tt,REPLACE);return ft?call(ft,tt,ct,ot):call(j,toString(ct),tt,ot)},function(nt,tt){var ot=anObject(this),ct=toString(nt);if(typeof tt=="string"&&stringIndexOf(tt,et)===-1&&stringIndexOf(tt,"$<")===-1){var ft=_e(j,ot,ct,tt);if(ft.done)return ft.value}var ht=isCallable(tt);ht||(tt=toString(tt));var dt=ot.global,yt;dt&&(yt=ot.unicode,ot.lastIndex=0);for(var Tt=[],St;St=regExpExec(ot,ct),!(St===null||(push(Tt,St),!dt));){var At=toString(St[0]);At===""&&(ot.lastIndex=advanceStringIndex(ct,toLength(ot.lastIndex),yt))}for(var Rt="",It=0,Ct=0;Ct<Tt.length;Ct++){St=Tt[Ct];for(var kt=toString(St[0]),Pt=max(min(toIntegerOrInfinity(St.index),ct.length),0),Bt=[],Kt,jt=1;jt<St.length;jt++)push(Bt,maybeToString(St[jt]));var zt=St.groups;if(ht){var Gt=concat([kt],Bt,Pt,ct);zt!==void 0&&push(Gt,zt),Kt=toString(apply(tt,void 0,Gt))}else Kt=getSubstitution(kt,ct,Pt,Bt,zt,tt);Pt>=It&&(Rt+=stringSlice(ct,It,Pt)+Kt,It=Pt+kt.length)}return Rt+stringSlice(ct,It)}]},!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);const queryType={name:"Query"},mutationType={name:"Mutation"},subscriptionType=null,types=[{kind:"SCALAR",name:"Any",description:null,fields:null,inputFields:null,interfaces:null,enumValues:null,possibleTypes:null},{kind:"SCALAR",name:"Bytes",description:null,fields:null,inputFields:null,interfaces:null,enumValues:null,possibleTypes:null},{kind:"SCALAR",name:"Float32",description:null,fields:null,inputFields:null,interfaces:null,enumValues:null,possibleTypes:null},{kind:"SCALAR",name:"Int32",description:null,fields:null,inputFields:null,interfaces:null,enumValues:null,possibleTypes:null},{kind:"SCALAR",name:"Int64",description:null,fields:null,inputFields:null,interfaces:null,enumValues:null,possibleTypes:null},{kind:"SCALAR",name:"Uint32",description:null,fields:null,inputFields:null,interfaces:null,enumValues:null,possibleTypes:null},{kind:"SCALAR",name:"Uint64",description:null,fields:null,inputFields:null,interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"AutoBackupInput",description:null,fields:null,inputFields:[{name:"enabled",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"SCALAR",name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",fields:null,inputFields:null,interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"AutoCheckUpdateInput",description:null,fields:null,inputFields:[{name:"enabled",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"BlockletAccessPolicyInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"roles",description:null,type:{kind:"SCALAR",name:"Any",ofType:null},defaultValue:null},{name:"reverse",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"isProtected",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"SCALAR",name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",fields:null,inputFields:null,interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"BlockletAccessPolicyQueryInput",description:null,fields:null,inputFields:[{name:"search",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"BlockletResponseHeaderPolicyInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"securityHeader",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"cors",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"customHeader",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"removeHeader",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"isProtected",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"BlockletResponseHeaderPolicyQueryInput",description:null,fields:null,inputFields:[{name:"search",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"BlockletSecurityRuleInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"pathPattern",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"componentDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"priority",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"responseHeaderPolicyId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"accessPolicyId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"enabled",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"remark",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"accessPolicy",description:null,type:{kind:"INPUT_OBJECT",name:"BlockletAccessPolicyInput",ofType:null},defaultValue:null},{name:"responseHeaderPolicy",description:null,type:{kind:"INPUT_OBJECT",name:"BlockletResponseHeaderPolicyInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"BlockletSecurityRuleQueryInput",description:null,fields:null,inputFields:[{name:"search",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"BlockletStoreInput",description:null,fields:null,inputFields:[{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"url",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"logoUrl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"maintainer",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"cdnUrl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"protected",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"scope",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"ConfigEntryInput",description:null,fields:null,inputFields:[{name:"key",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"value",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"required",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"validation",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"secure",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"custom",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"shared",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"ConfigNavigationInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"title",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"link",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"icon",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"section",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"component",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"parent",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"role",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"visible",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"from",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"ConnectedAccountInput",description:null,fields:null,inputFields:[{name:"provider",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"pk",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"lastLoginAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"userInfo",description:null,type:{kind:"INPUT_OBJECT",name:"ConnectedAccountInfoInput",ofType:null},defaultValue:null},{name:"extra",description:null,type:{kind:"SCALAR",name:"Any",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"ConnectedAccountInfoInput",description:null,fields:null,inputFields:[{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"picture",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"email",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"emailVerified",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"sub",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"extraData",description:null,type:{kind:"SCALAR",name:"Any",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"DownloadTokenInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"token",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"HashFileInput",description:null,fields:null,inputFields:[{name:"file",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"hash",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"InviteSettingsInput",description:null,fields:null,inputFields:[{name:"enabled",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"IssuerInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"pk",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"LoginEmailSettingsInput",description:null,fields:null,inputFields:[{name:"enabled",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"requireVerified",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"requireUnique",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"trustOauthProviders",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"enableDomainBlackList",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"domainBlackList",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"enableDomainWhiteList",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"domainWhiteList",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"trustedIssuers",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"IssuerInput",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"LoginPhoneSettingsInput",description:null,fields:null,inputFields:[{name:"enabled",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"requireVerified",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"requireUnique",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"trustedIssuers",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"IssuerInput",ofType:null}}},defaultValue:null},{name:"enableRegionBlackList",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"regionBlackList",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"enableRegionWhiteList",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"regionWhiteList",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"NodeInfoInput",description:null,fields:null,inputFields:[{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"autoUpgrade",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"enableWelcomePage",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"registerUrl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"webWalletUrl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletRegistryList",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"BlockletStoreInput",ofType:null}}},defaultValue:null},{name:"diskAlertThreshold",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"enableBetaRelease",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"nftDomainUrl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"enableFileSystemIsolation",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"enableDocker",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"isDockerInstalled",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"PagingInput",description:null,fields:null,inputFields:[{name:"total",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"pageSize",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"pageCount",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"page",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"PassportInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"title",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"issuer",description:null,type:{kind:"INPUT_OBJECT",name:"IssuerInput",ofType:null},defaultValue:null},{name:"type",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"issuanceDate",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"expirationDate",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"status",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"role",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"lastLoginAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"scope",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"display",description:null,type:{kind:"INPUT_OBJECT",name:"PassportDisplayInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"PassportDisplayInput",description:null,fields:null,inputFields:[{name:"type",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"content",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"PermissionInput",description:null,fields:null,inputFields:[{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"isProtected",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestAddBlockletAccessPolicyInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"data",description:null,type:{kind:"INPUT_OBJECT",name:"BlockletAccessPolicyInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestAddBlockletResponseHeaderPolicyInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"data",description:null,type:{kind:"INPUT_OBJECT",name:"BlockletResponseHeaderPolicyInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestAddBlockletSecurityRuleInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"data",description:null,type:{kind:"INPUT_OBJECT",name:"BlockletSecurityRuleInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestAddBlockletSpaceGatewayInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"spaceGateway",description:null,type:{kind:"INPUT_OBJECT",name:"SpaceGatewayInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestAddBlockletStoreInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"url",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"scope",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestAddDomainAliasInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"domainAlias",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"force",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"type",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"nftDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"chainHost",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"inBlockletSetup",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestAddLetsEncryptCertInput",description:null,fields:null,inputFields:[{name:"domain",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"siteId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"inBlockletSetup",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestAddNginxHttpsCertInput",description:null,fields:null,inputFields:[{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"privateKey",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"certificate",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestAddRoutingRuleInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"rule",description:null,type:{kind:"INPUT_OBJECT",name:"RoutingRuleInput",ofType:null},defaultValue:null},{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestAddRoutingSiteInput",description:null,fields:null,inputFields:[{name:"domain",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"type",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"rules",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"RoutingRuleInput",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestAuditFederatedLoginInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"memberPid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"status",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestBackupBlockletInput",description:null,fields:null,inputFields:[{name:"appDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"to",description:null,type:{kind:"ENUM",name:"BackupTo",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestBlockletInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestBlockletDetailInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"attachDiskInfo",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"attachRuntimeInfo",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"getOptionalComponents",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestBlockletDiffInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"hashFiles",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"HashFileInput",ofType:null}}},defaultValue:null},{name:"rootDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestBlockletMetaInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"storeUrl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestBlockletMetaFromUrlInput",description:null,fields:null,inputFields:[{name:"url",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"checkPrice",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestBlockletRuntimeHistoryInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"hours",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestCheckDomainsInput",description:null,fields:null,inputFields:[{name:"domains",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestClearCacheInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"pattern",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestComponentsInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"componentDids",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestConfigBlockletInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"configs",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"ConfigEntryInput",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestConfigFederatedInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"autoLogin",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestConfigNavigationsInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"navigations",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"ConfigNavigationInput",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestConfigNotificationInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"notification",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestConfigOAuthInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"oauth",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestConfigPassportIssuanceInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"enable",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestConfigPublicToStoreInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"publicToStore",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestConfigTrustedFactoriesInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"trustedFactories",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"TrustedFactoryInput",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestConfigTrustedPassportsInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"trustedPassports",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"TrustedPassportInput",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestConnectByStudioInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"storeId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"storeUrl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"storeName",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletTitle",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"type",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"tenantScope",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"componentDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"messageId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestConnectToStoreInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"storeId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"storeUrl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"storeName",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"projectId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestCreateAccessKeyInput",description:null,fields:null,inputFields:[{name:"remark",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"passport",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestCreateInvitationInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"role",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"remark",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"sourceAppPid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"display",description:null,type:{kind:"INPUT_OBJECT",name:"PassportDisplayInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestCreatePassportIssuanceInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"ownerDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"display",description:null,type:{kind:"INPUT_OBJECT",name:"PassportDisplayInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestCreatePermissionInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestCreateProjectInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"type",description:null,type:{kind:"ENUM",name:"PublishType",ofType:null},defaultValue:null},{name:"blockletDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletTitle",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"componentDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"tenantScope",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestCreateReleaseInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"projectId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"releaseId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletVersion",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletTitle",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletDescription",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletLogo",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletIntroduction",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletScreenshots",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"note",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"status",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletComponents",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"uploadedResource",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestCreateRoleInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"title",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"childName",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"permissions",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"extra",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestCreateTransferNodeInvitationInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"remark",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestCreateWebHookInput",description:null,fields:null,inputFields:[{name:"type",description:null,type:{kind:"ENUM",name:"SenderType",ofType:null},defaultValue:null},{name:"title",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"params",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"WebHookParamInput",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteAccessKeyInput",description:null,fields:null,inputFields:[{name:"accessKeyId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"keepData",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletAccessPolicyInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletResponseHeaderPolicyInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletSecurityRuleInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletSpaceGatewayInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"spaceGatewayDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletStoreInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"url",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"projectId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"scope",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteComponentInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"rootDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"keepData",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteDomainAliasInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"domainAlias",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteInvitationInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"inviteId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteNginxHttpsCertInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeletePermissionInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteRoleInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteRoutingRuleInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"ruleId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteRoutingSiteInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteTeamSessionInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"sessionId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDeleteWebHookInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDisbandFederatedLoginInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestDisconnectFromStoreInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"storeId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"projectId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"storeScope",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestEndSessionInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestFindCertificateByDomainInput",description:null,fields:null,inputFields:[{name:"domain",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGatewayInput",description:null,fields:null,inputFields:[{name:"requestLimit",description:null,type:{kind:"INPUT_OBJECT",name:"RequestLimitInput",ofType:null},defaultValue:null},{name:"cacheEnabled",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetAuditLogsInput",description:null,fields:null,inputFields:[{name:"paging",description:null,type:{kind:"INPUT_OBJECT",name:"PagingInput",ofType:null},defaultValue:null},{name:"scope",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"category",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetBlockletAccessPoliciesInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"paging",description:null,type:{kind:"INPUT_OBJECT",name:"PagingInput",ofType:null},defaultValue:null},{name:"query",description:null,type:{kind:"INPUT_OBJECT",name:"BlockletAccessPolicyQueryInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetBlockletAccessPolicyInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetBlockletBackupsInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetBlockletNotificationsInput",description:null,fields:null,inputFields:[{name:"receiver",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"sender",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"read",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"paging",description:null,type:{kind:"INPUT_OBJECT",name:"PagingInput",ofType:null},defaultValue:null},{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetBlockletResponseHeaderPoliciesInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"paging",description:null,type:{kind:"INPUT_OBJECT",name:"PagingInput",ofType:null},defaultValue:null},{name:"query",description:null,type:{kind:"INPUT_OBJECT",name:"BlockletResponseHeaderPolicyQueryInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetBlockletResponseHeaderPolicyInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetBlockletSecurityRuleInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetBlockletSecurityRulesInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"paging",description:null,type:{kind:"INPUT_OBJECT",name:"PagingInput",ofType:null},defaultValue:null},{name:"query",description:null,type:{kind:"INPUT_OBJECT",name:"BlockletSecurityRuleQueryInput",ofType:null},defaultValue:null},{name:"includeDisabled",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetBlockletsInput",description:null,fields:null,inputFields:[{name:"useCache",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetDynamicComponentsInput",description:null,fields:null,inputFields:[{name:"url",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetLauncherSessionInput",description:null,fields:null,inputFields:[{name:"launcherSessionId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"launcherUrl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetNotificationsInput",description:null,fields:null,inputFields:[{name:"receiver",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"sender",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"read",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"paging",description:null,type:{kind:"INPUT_OBJECT",name:"PagingInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetPassportIssuancesInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"ownerDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetProjectsInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"paging",description:null,type:{kind:"INPUT_OBJECT",name:"PagingInput",ofType:null},defaultValue:null},{name:"componentDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"tenantScope",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetReleasesInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"projectId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"paging",description:null,type:{kind:"INPUT_OBJECT",name:"PagingInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetRoutingSitesInput",description:null,fields:null,inputFields:[{name:"snapshotHash",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetRoutingSnapshotsInput",description:null,fields:null,inputFields:[{name:"limit",description:null,type:{kind:"SCALAR",name:"Int32",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetSelectedResourcesInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"projectId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"releaseId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"componentDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetSessionInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetSnapshotSitesInput",description:null,fields:null,inputFields:[{name:"hash",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGetTrafficInsightsInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"startDate",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"endDate",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"paging",description:null,type:{kind:"INPUT_OBJECT",name:"PagingInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestGrantPermissionForRoleInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"roleName",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"grantName",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestHasPermissionInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"role",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"permission",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestInstallComponentInput",description:null,fields:null,inputFields:[{name:"rootDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"mountPoint",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"url",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"file",description:null,type:{kind:"SCALAR",name:"Upload",ofType:null},defaultValue:null},{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"diffVersion",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"deleteSet",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"title",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"configs",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"ConfigEntryInput",ofType:null}}},defaultValue:null},{name:"downloadTokenList",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"DownloadTokenInput",ofType:null}}},defaultValue:null},{name:"skipNavigation",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"onlyRequired",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestIsDidDomainInput",description:null,fields:null,inputFields:[{name:"domain",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestIssuePassportToUserInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"userDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"role",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"display",description:null,type:{kind:"INPUT_OBJECT",name:"PassportDisplayInput",ofType:null},defaultValue:null},{name:"notify",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"notification",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestJoinFederatedLoginInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"appUrl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestLimitInput",description:null,fields:null,inputFields:[{name:"enabled",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"rate",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"ipHeader",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestLogoutUserInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"appPid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"userDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"visitorId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestMigrateApplicationToStructV2Input",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"appSk",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestNodeRoutingInput",description:null,fields:null,inputFields:[{name:"provider",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"snapshotHash",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"forceRepopulate",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestNodeRuntimeHistoryInput",description:null,fields:null,inputFields:[{name:"hours",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestProjectInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"projectId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"messageId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestPublishToStoreInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"projectId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"releaseId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"type",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"storeId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestQuitFederatedLoginInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestReadBlockletNotificationsInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestReadNotificationsInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestReleaseInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"projectId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"releaseId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestResetNodeInput",description:null,fields:null,inputFields:[{name:"owner",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"blocklets",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"webhooks",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"certificates",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"accessKeys",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"blockletExtras",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"routingRules",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"users",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"invitations",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestRestoreBlockletInput",description:null,fields:null,inputFields:[{name:"endpoint",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"appDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"delegation",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"password",description:null,type:{kind:"SCALAR",name:"Bytes",ofType:null},defaultValue:null},{name:"wallet",description:null,type:{kind:"SCALAR",name:"Any",ofType:null},defaultValue:null},{name:"from",description:null,type:{kind:"ENUM",name:"BackupTo",ofType:null},defaultValue:null},{name:"appPid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestRevokePermissionFromRoleInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"roleName",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"grantName",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestRevokeUserPassportInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"userDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"passportId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestSendEmailInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"receiver",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"email",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestSendMsgInput",description:null,fields:null,inputFields:[{name:"webhookId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"message",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestSendPushInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"receiver",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"notification",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestStartSessionInput",description:null,fields:null,inputFields:[{name:"data",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestSwitchProfileInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"userDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"profile",description:null,type:{kind:"INPUT_OBJECT",name:"UserProfileInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestTagInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"tag",description:null,type:{kind:"INPUT_OBJECT",name:"TagInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestTagsInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"paging",description:null,type:{kind:"INPUT_OBJECT",name:"PagingInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestTakeRoutingSnapshotInput",description:null,fields:null,inputFields:[{name:"dryRun",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"message",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestTeamPermissionInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"permission",description:null,type:{kind:"INPUT_OBJECT",name:"PermissionInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestTeamRoleInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"role",description:null,type:{kind:"INPUT_OBJECT",name:"RoleUpdateInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestTeamUserInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"user",description:null,type:{kind:"INPUT_OBJECT",name:"UserInfoInput",ofType:null},defaultValue:null},{name:"options",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTeamUserOptionsInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestTeamUserOptionsInput",description:null,fields:null,inputFields:[{name:"enableConnectedAccount",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"includeTags",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateAccessKeyInput",description:null,fields:null,inputFields:[{name:"accessKeyId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"remark",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"passport",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateAppSessionConfigInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"config",description:null,type:{kind:"INPUT_OBJECT",name:"SessionConfigInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateAutoBackupInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"autoBackup",description:null,type:{kind:"INPUT_OBJECT",name:"AutoBackupInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateAutoCheckUpdateInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"autoCheckUpdate",description:null,type:{kind:"INPUT_OBJECT",name:"AutoCheckUpdateInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateBlockletAccessPolicyInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"data",description:null,type:{kind:"INPUT_OBJECT",name:"BlockletAccessPolicyInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateBlockletResponseHeaderPolicyInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"data",description:null,type:{kind:"INPUT_OBJECT",name:"BlockletResponseHeaderPolicyInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateBlockletSecurityRuleInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"data",description:null,type:{kind:"INPUT_OBJECT",name:"BlockletSecurityRuleInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateBlockletSpaceGatewayInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"where",description:null,type:{kind:"INPUT_OBJECT",name:"SpaceGatewayInput",ofType:null},defaultValue:null},{name:"spaceGateway",description:null,type:{kind:"INPUT_OBJECT",name:"SpaceGatewayInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateComponentMountPointInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"rootDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"mountPoint",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateComponentTitleInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"rootDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"title",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateComponentsInput",description:null,fields:null,inputFields:[{name:"updateId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"rootDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"selectedComponents",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateInviteSettingsInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"invite",description:null,type:{kind:"INPUT_OBJECT",name:"InviteSettingsInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateNginxHttpsCertInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdatePermissionsForRoleInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"roleName",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"grantNames",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateProjectInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"projectId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletTitle",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletDescription",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"blockletIntroduction",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"autoUpload",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"possibleSameStore",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateRoutingRuleInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"rule",description:null,type:{kind:"INPUT_OBJECT",name:"RoutingRuleInput",ofType:null},defaultValue:null},{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateRoutingSiteInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"corsAllowedOrigins",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"domain",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateSelectedResourcesInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"projectId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"releaseId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"componentDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"resources",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateSessionInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"data",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateUserExtraInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"remark",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"extra",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateUserProfileInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"remark",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"locale",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUpdateUserTagsInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"tags",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Uint32",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestUsersInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"query",description:null,type:{kind:"INPUT_OBJECT",name:"UserQueryInput",ofType:null},defaultValue:null},{name:"sort",description:null,type:{kind:"INPUT_OBJECT",name:"UserSortInput",ofType:null},defaultValue:null},{name:"paging",description:null,type:{kind:"INPUT_OBJECT",name:"PagingInput",ofType:null},defaultValue:null},{name:"dids",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RequestVersionedBlockletInput",description:null,fields:null,inputFields:[{name:"type",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"storeUrl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"url",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"file",description:null,type:{kind:"SCALAR",name:"Upload",ofType:null},defaultValue:null},{name:"diffVersion",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"deleteSet",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},defaultValue:null},{name:"title",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"startImmediately",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"downloadTokenList",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"DownloadTokenInput",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RoleUpdateInput",description:null,fields:null,inputFields:[{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"title",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"extra",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RoutingRuleInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"from",description:null,type:{kind:"INPUT_OBJECT",name:"RoutingRuleFromInput",ofType:null},defaultValue:null},{name:"to",description:null,type:{kind:"INPUT_OBJECT",name:"RoutingRuleToInput",ofType:null},defaultValue:null},{name:"isProtected",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RoutingRuleFromInput",description:null,fields:null,inputFields:[{name:"pathPrefix",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"header",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"RoutingRuleHeaderInput",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RoutingRuleHeaderInput",description:null,fields:null,inputFields:[{name:"key",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"value",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"type",description:null,type:{kind:"ENUM",name:"HeaderMatchType",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RoutingRuleResponseInput",description:null,fields:null,inputFields:[{name:"status",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"contentType",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"body",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"RoutingRuleToInput",description:null,fields:null,inputFields:[{name:"port",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"type",description:null,type:{kind:"ENUM",name:"BackendServiceType",ofType:null},defaultValue:null},{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"url",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"redirectCode",description:null,type:{kind:"SCALAR",name:"Int32",ofType:null},defaultValue:null},{name:"interfaceName",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"componentId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"pageGroup",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"response",description:null,type:{kind:"INPUT_OBJECT",name:"RoutingRuleResponseInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"SessionConfigInput",description:null,fields:null,inputFields:[{name:"cacheTtl",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"ttl",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"email",description:null,type:{kind:"INPUT_OBJECT",name:"LoginEmailSettingsInput",ofType:null},defaultValue:null},{name:"phone",description:null,type:{kind:"INPUT_OBJECT",name:"LoginPhoneSettingsInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"SpaceGatewayInput",description:null,fields:null,inputFields:[{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"url",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"protected",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"endpoint",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"TagInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"title",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"color",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"createdAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"updatedAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"TeamInput",description:null,fields:null,inputFields:[{name:"teamDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"TrustedFactoryInput",description:null,fields:null,inputFields:[{name:"holderDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"issuerDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"factoryAddress",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"remark",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"passport",description:null,type:{kind:"INPUT_OBJECT",name:"TrustedPassportMappingToInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"TrustedPassportInput",description:null,fields:null,inputFields:[{name:"issuerDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"remark",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"mappings",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"TrustedPassportMappingInput",ofType:null}}},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"TrustedPassportMappingInput",description:null,fields:null,inputFields:[{name:"from",description:null,type:{kind:"INPUT_OBJECT",name:"TrustedPassportMappingFromInput",ofType:null},defaultValue:null},{name:"to",description:null,type:{kind:"INPUT_OBJECT",name:"TrustedPassportMappingToInput",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"TrustedPassportMappingFromInput",description:null,fields:null,inputFields:[{name:"passport",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"TrustedPassportMappingToInput",description:null,fields:null,inputFields:[{name:"role",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"ttl",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"ttlPolicy",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"UserInfoInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"pk",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"role",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"avatar",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"fullName",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"email",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"approved",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"createdAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"updatedAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"locale",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"passports",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"PassportInput",ofType:null}}},defaultValue:null},{name:"firstLoginAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"lastLoginAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"remark",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"lastLoginIp",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"sourceProvider",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"sourceAppPid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"connectedAccounts",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"ConnectedAccountInput",ofType:null}}},defaultValue:null},{name:"extra",description:null,type:{kind:"SCALAR",name:"Any",ofType:null},defaultValue:null},{name:"tags",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"TagInput",ofType:null}}},defaultValue:null},{name:"didSpace",description:null,type:{kind:"SCALAR",name:"Any",ofType:null},defaultValue:null},{name:"userSessions",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"INPUT_OBJECT",name:"UserSessionInput",ofType:null}}},defaultValue:null},{name:"url",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"phone",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"inviter",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"generation",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"emailVerified",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"phoneVerified",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"UserProfileInput",description:null,fields:null,inputFields:[{name:"did",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"avatar",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"fullName",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"email",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"UserQueryInput",description:null,fields:null,inputFields:[{name:"role",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"approved",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"search",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"connectedDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"tags",description:null,type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Uint32",ofType:null}}},defaultValue:null},{name:"includeTags",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"includeUserSessions",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"inviter",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"invitee",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"generation",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"UserSessionInput",description:null,fields:null,inputFields:[{name:"id",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"visitorId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"appPid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"userDid",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"ua",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"passportId",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"status",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"lastLoginIp",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"extra",description:null,type:{kind:"SCALAR",name:"Any",ofType:null},defaultValue:null},{name:"createdAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"updatedAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"UserSortInput",description:null,fields:null,inputFields:[{name:"updatedAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"createdAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null},{name:"lastLoginAt",description:null,type:{kind:"SCALAR",name:"Uint32",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"INPUT_OBJECT",name:"WebHookParamInput",description:null,fields:null,inputFields:[{name:"name",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"description",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"required",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:null},{name:"defaultValue",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"value",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null},{name:"type",description:null,type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null}],interfaces:null,enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"AccessKey",description:null,fields:[{name:"accessKeyId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"accessKeyPublic",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"remark",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"passport",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"lastUsedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdBy",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatedBy",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"AuditLog",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"scope",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"category",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"action",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"content",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"actor",description:null,args:[],type:{kind:"OBJECT",name:"AuditLogActor",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"env",description:null,args:[],type:{kind:"OBJECT",name:"AuditLogEnv",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"ip",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"ua",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"AuditLogActor",description:null,fields:[{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"role",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"fullName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"AuditLogEnv",description:null,fields:[{name:"browser",description:null,args:[],type:{kind:"OBJECT",name:"AuditLogEnvItem",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"os",description:null,args:[],type:{kind:"OBJECT",name:"AuditLogEnvItem",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"AuditLogEnvItem",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"version",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"AutoBackup",description:null,fields:[{name:"enabled",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"AutoCheckUpdate",description:null,fields:[{name:"enabled",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Backup",description:null,fields:[{name:"appPid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"userDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"strategy",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sourceUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"target",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"targetName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"targetUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"status",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"message",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"progress",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletAccessPolicy",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"roles",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"reverse",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isProtected",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletBackupState",description:null,fields:[{name:"appDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"appPid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletCapabilities",description:null,fields:[{name:"clusterMode",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"component",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"navigation",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"didSpace",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"resourceExportApi",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletController",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"nftId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"nftOwner",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"chainHost",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"expireDate",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"consumedAt",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"launcherUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"launcherSessionId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"ownerDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"status",description:null,args:[],type:{kind:"OBJECT",name:"BlockletControllerStatus",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletControllerStatus",description:null,fields:[{name:"value",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"reason",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletDiff",description:null,fields:[{name:"hasBlocklet",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"version",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"addSet",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"changeSet",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"deleteSet",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletDist",description:null,fields:[{name:"tarball",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"integrity",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletEngine",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"displayName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"version",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"available",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"visible",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"logo",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletHistoryItem",description:null,fields:[{name:"date",description:null,args:[],type:{kind:"SCALAR",name:"Uint64",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cpu",description:null,args:[],type:{kind:"SCALAR",name:"Uint64",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"mem",description:null,args:[],type:{kind:"SCALAR",name:"Uint64",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletMeta",description:null,fields:[{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"version",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"interfaces",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletMetaInterface",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"author",description:null,args:[],type:{kind:"OBJECT",name:"BlockletMetaPerson",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"main",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"stats",description:null,args:[],type:{kind:"OBJECT",name:"BlockletStats",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"homepage",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"path",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"community",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"documentation",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"support",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"screenshots",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"keywords",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"group",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"logo",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"title",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"dist",description:null,args:[],type:{kind:"OBJECT",name:"BlockletDist",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"maintainers",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletMetaPerson",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"contributors",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletMetaPerson",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"repository",description:null,args:[],type:{kind:"OBJECT",name:"BlockletRepository",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"payment",description:null,args:[],type:{kind:"OBJECT",name:"BlockletPayment",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"nftFactory",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"lastPublishedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"capabilities",description:null,args:[],type:{kind:"OBJECT",name:"BlockletCapabilities",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"components",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ChildConfig",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"environments",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Environment",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"requirements",description:null,args:[],type:{kind:"OBJECT",name:"Requirement",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"bundleDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"bundleName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"navigation",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Any",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"resources",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"resource",description:null,args:[],type:{kind:"OBJECT",name:"BlockletResource",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"engine",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"owner",description:null,args:[],type:{kind:"OBJECT",name:"BlockletMetaOwner",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletMetaInterface",description:null,fields:[{name:"type",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"path",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"prefix",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"protocol",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"port",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"services",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletMetaService",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"cacheable",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"pageGroups",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletMetaOwner",description:null,fields:[{name:"avatar",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"email",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"fullName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletMetaPerson",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"email",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"url",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletMetaService",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"config",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletMigrateRecord",description:null,fields:[{name:"appSk",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"appDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"at",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletPayment",description:null,fields:[{name:"price",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletPaymentPrice",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"share",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletPaymentShare",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletPaymentPrice",description:null,fields:[{name:"address",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"value",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"symbol",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletPaymentShare",description:null,fields:[{name:"address",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"value",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletPreUpdateInfo",description:null,fields:[{name:"updateId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateList",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"UpdateList",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletRepository",description:null,fields:[{name:"type",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"url",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletResource",description:null,fields:[{name:"exportApi",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"types",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletResourceType",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"bundles",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletResourceBundle",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletResourceBundle",description:null,fields:[{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"type",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"public",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletResourceType",description:null,fields:[{name:"type",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletResponseHeaderPolicy",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"securityHeader",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cors",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"customHeader",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"removeHeader",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isProtected",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletSecurityRule",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pathPattern",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"componentDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"priority",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"responseHeaderPolicyId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"accessPolicyId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"enabled",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"remark",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"accessPolicy",description:null,args:[],type:{kind:"OBJECT",name:"BlockletAccessPolicy",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"responseHeaderPolicy",description:null,args:[],type:{kind:"OBJECT",name:"BlockletResponseHeaderPolicy",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletSettings",description:null,fields:[{name:"initialized",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"enablePassportIssuance",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"trustedPassports",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"TrustedPassport",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"whoCanAccess",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"owner",description:null,args:[],type:{kind:"OBJECT",name:"WalletInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"children",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"SimpleBlockletState",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"publicToStore",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"storeList",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletStore",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"navigations",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ConfigNavigation",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"oauth",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"trustedFactories",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"TrustedFactory",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"notification",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"session",description:null,args:[],type:{kind:"OBJECT",name:"SessionConfig",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"federated",description:null,args:[],type:{kind:"OBJECT",name:"FederatedConfig",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"autoCheckUpdate",description:null,args:[],type:{kind:"OBJECT",name:"AutoCheckUpdate",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"autoBackup",description:null,args:[],type:{kind:"OBJECT",name:"AutoBackup",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"invite",description:null,args:[],type:{kind:"OBJECT",name:"InviteSettings",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletState",description:null,fields:[{name:"meta",description:null,args:[],type:{kind:"OBJECT",name:"BlockletMeta",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"status",description:null,args:[],type:{kind:"ENUM",name:"BlockletStatus",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"installedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"startedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pausedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"stoppedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"environments",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ConfigEntry",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"configs",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ConfigEntry",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"diskInfo",description:null,args:[],type:{kind:"OBJECT",name:"DiskInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"runtimeInfo",description:null,args:[],type:{kind:"OBJECT",name:"RuntimeInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"appRuntimeInfo",description:null,args:[],type:{kind:"OBJECT",name:"RuntimeInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"source",description:null,args:[],type:{kind:"ENUM",name:"BlockletSource",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deployedFrom",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"bundleSource",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"port",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"engine",description:null,args:[],type:{kind:"OBJECT",name:"BlockletEngine",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"mode",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"ports",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"children",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ComponentState",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"optionalComponents",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"OptionalComponentState",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"trustedPassports",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"TrustedPassport",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"trustedFactories",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"TrustedFactory",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"enablePassportIssuance",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"dynamic",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"mountPoint",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"settings",description:null,args:[],type:{kind:"OBJECT",name:"BlockletSettings",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"appDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"site",description:null,args:[],type:{kind:"OBJECT",name:"RoutingSite",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"controller",description:null,args:[],type:{kind:"OBJECT",name:"BlockletController",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"migratedFrom",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletMigrateRecord",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"appPid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"externalSk",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"externalSkSource",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"structVersion",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletStats",description:null,fields:[{name:"downloads",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"star",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"purchases",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BlockletStore",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"url",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"logoUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"maintainer",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cdnUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"protected",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"scope",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"BooleanResponse",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"result",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Certificate",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"domain",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"meta",description:null,args:[],type:{kind:"OBJECT",name:"CertificateMeta",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"matchedSites",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"MatchedSites",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isProtected",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"source",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"status",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"CertificateIssuer",description:null,fields:[{name:"countryName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"organizationName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"commonName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"CertificateMeta",description:null,fields:[{name:"issuer",description:null,args:[],type:{kind:"OBJECT",name:"CertificateIssuer",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sans",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"validFrom",description:null,args:[],type:{kind:"SCALAR",name:"Int64",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"validTo",description:null,args:[],type:{kind:"SCALAR",name:"Int64",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"fingerprintAlg",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"fingerprint",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"validityPeriod",description:null,args:[],type:{kind:"SCALAR",name:"Int64",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ChildConfig",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"mountPoint",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"required",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ComponentState",description:null,fields:[{name:"meta",description:null,args:[],type:{kind:"OBJECT",name:"BlockletMeta",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"status",description:null,args:[],type:{kind:"ENUM",name:"BlockletStatus",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"installedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"startedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pausedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"stoppedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"environments",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ConfigEntry",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"configs",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ConfigEntry",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"diskInfo",description:null,args:[],type:{kind:"OBJECT",name:"DiskInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"runtimeInfo",description:null,args:[],type:{kind:"OBJECT",name:"RuntimeInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"source",description:null,args:[],type:{kind:"ENUM",name:"BlockletSource",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deployedFrom",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"bundleSource",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"port",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"engine",description:null,args:[],type:{kind:"OBJECT",name:"BlockletEngine",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"mode",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"ports",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"children",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ComponentState",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"dynamic",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"mountPoint",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"dependents",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Dependent",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"required",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ConfigEntry",description:null,fields:[{name:"key",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"value",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"required",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"validation",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"secure",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"custom",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"shared",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ConfigNavigation",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"title",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"link",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"icon",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"section",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"component",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"parent",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"role",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"visible",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"from",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ConnectedAccount",description:null,fields:[{name:"provider",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pk",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"lastLoginAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"userInfo",description:null,args:[],type:{kind:"OBJECT",name:"ConnectedAccountInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"extra",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ConnectedAccountInfo",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"picture",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"email",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"emailVerified",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sub",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"extraData",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ConnectedStore",description:null,fields:[{name:"storeId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"storeName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"storeUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"accessToken",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"developerDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"developerEmail",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"developerName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"scope",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"CreateAccessKey",description:null,fields:[{name:"accessKeyId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"accessKeySecret",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"remark",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"passport",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"lastUsedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"DelegationState",description:null,fields:[{name:"delegated",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Dependent",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"required",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"DiskInfo",description:null,fields:[{name:"app",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"data",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"log",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cache",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blocklets",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Environment",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"default",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"required",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"secure",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"validation",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"shared",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"FederatedConfig",description:null,fields:[{name:"config",description:null,args:[],type:{kind:"OBJECT",name:"FederatedConfigDetail",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sites",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"FederatedConfigSite",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"FederatedConfigDetail",description:null,fields:[{name:"appId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"appPid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"delegation",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isMaster",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"autoLogin",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"FederatedConfigSite",description:null,fields:[{name:"appId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"appPid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"aliasDid",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"appName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"appDescription",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"appUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"aliasDomain",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"appLogo",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"appLogoRect",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pk",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"version",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"serverId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"serverVersion",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"appliedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"status",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isMaster",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Fuel",description:null,fields:[{name:"endpoint",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"address",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"value",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"reason",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Gateway",description:null,fields:[{name:"requestLimit",description:null,args:[],type:{kind:"OBJECT",name:"RequestLimit",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cacheEnabled",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"GeneralResponse",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"IPInfo",description:null,fields:[{name:"internalV4",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"externalV4",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"internalV6",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"externalV6",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"InviteInfo",description:null,fields:[{name:"inviteId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"role",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"remark",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"expireDate",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"inviter",description:null,args:[],type:{kind:"OBJECT",name:"UserInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"teamDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"interfaceName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"display",description:null,args:[],type:{kind:"OBJECT",name:"PassportDisplay",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"InviteSettings",description:null,fields:[{name:"enabled",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Issuer",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pk",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"KeyValue",description:null,fields:[{name:"key",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"value",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"LauncherInfo",description:null,fields:[{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"type",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"provider",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"url",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"tag",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"chainHost",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"LoginEmailSettings",description:null,fields:[{name:"enabled",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"requireVerified",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"requireUnique",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"trustOauthProviders",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"enableDomainBlackList",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"domainBlackList",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"enableDomainWhiteList",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"domainWhiteList",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"trustedIssuers",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Issuer",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"LoginPhoneSettings",description:null,fields:[{name:"enabled",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"requireVerified",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"requireUnique",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"trustedIssuers",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Issuer",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"enableRegionBlackList",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"regionBlackList",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"enableRegionWhiteList",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"regionWhiteList",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"MatchedSites",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"domain",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"NodeEnvInfo",description:null,fields:[{name:"ip",description:null,args:[],type:{kind:"OBJECT",name:"IPInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"os",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"location",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"docker",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"image",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletEngines",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletEngine",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"gitpod",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"disk",description:null,args:[],type:{kind:"OBJECT",name:"DiskInfo",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"NodeHistoryItem",description:null,fields:[{name:"date",description:null,args:[],type:{kind:"SCALAR",name:"Uint64",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cpu",description:null,args:[],type:{kind:"SCALAR",name:"Uint64",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"mem",description:null,args:[],type:{kind:"SCALAR",name:"Uint64",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"daemonMem",description:null,args:[],type:{kind:"SCALAR",name:"Uint64",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"serviceMem",description:null,args:[],type:{kind:"SCALAR",name:"Uint64",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"hubMem",description:null,args:[],type:{kind:"SCALAR",name:"Uint64",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"NodeRouting",description:null,fields:[{name:"provider",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"snapshotHash",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"adminPath",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"requestLimit",description:null,args:[],type:{kind:"OBJECT",name:"RequestLimit",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cacheEnabled",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"NodeRuntimeConfig",description:null,fields:[{name:"blockletMaxMemoryLimit",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"daemonMaxMemoryLimit",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"proxyMaxMemoryLimit",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"NodeState",description:null,fields:[{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pk",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"version",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"port",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"initialized",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"nodeOwner",description:null,args:[],type:{kind:"OBJECT",name:"WalletInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"startedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"initializedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"mode",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"routing",description:null,args:[],type:{kind:"OBJECT",name:"NodeRouting",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"environments",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ConfigEntry",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"uptime",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"autoUpgrade",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"nextVersion",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"upgradeSessionId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"registerUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"enableWelcomePage",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"webWalletUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletRegistryList",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletStore",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"ownerNft",description:null,args:[],type:{kind:"OBJECT",name:"OwnerNft",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"diskAlertThreshold",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"trustedPassports",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"TrustedPassport",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"launcher",description:null,args:[],type:{kind:"OBJECT",name:"LauncherInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"enablePassportIssuance",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"didRegistry",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"didDomain",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"status",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"trustedFactories",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"TrustedFactory",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"enableBetaRelease",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"runtimeConfig",description:null,args:[],type:{kind:"OBJECT",name:"NodeRuntimeConfig",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"nftDomainUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"enableFileSystemIsolation",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"enableDocker",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isDockerInstalled",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Notification",description:null,fields:[{name:"sender",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"receiver",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"title",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"action",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"entityType",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"entityId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"read",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"severity",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"OptionalComponentState",description:null,fields:[{name:"logoUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"dependencies",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"OptionalDependencies",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"meta",description:null,args:[],type:{kind:"OBJECT",name:"BlockletMeta",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"OptionalDependencies",description:null,fields:[{name:"parentDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"parentName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"parentTitle",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"mountPoint",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"required",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"OwnerNft",description:null,fields:[{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"holder",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"issuer",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"launcherSessionId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Paging",description:null,fields:[{name:"total",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pageSize",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pageCount",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"page",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Passport",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"title",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"issuer",description:null,args:[],type:{kind:"OBJECT",name:"Issuer",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"type",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"issuanceDate",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"expirationDate",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"status",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"role",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"lastLoginAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"scope",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"display",description:null,args:[],type:{kind:"OBJECT",name:"PassportDisplay",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"PassportDisplay",description:null,fields:[{name:"type",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"content",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"PassportIssuanceInfo",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"title",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"expireDate",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"teamDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"ownerDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"display",description:null,args:[],type:{kind:"OBJECT",name:"PassportDisplay",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Permission",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isProtected",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Project",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"type",description:null,args:[],type:{kind:"ENUM",name:"PublishType",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletVersion",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletTitle",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletDescription",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletLogo",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletIntroduction",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletScreenshots",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatedAt",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"componentDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"lastReleaseId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"lastReleaseFiles",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"connectedStores",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ConnectedStore",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"tenantScope",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdBy",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"autoUpload",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"possibleSameStore",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Release",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"projectId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletVersion",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletTitle",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletDescription",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletLogo",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletIntroduction",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletScreenshots",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"note",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"files",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"status",description:null,args:[],type:{kind:"ENUM",name:"ReleaseStatus",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatedAt",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletComponents",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ReleaseComponent",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"publishedStoreIds",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"uploadedResource",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ReleaseComponent",description:null,fields:[{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"required",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"RequestLimit",description:null,fields:[{name:"enabled",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"rate",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"ipHeader",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Requirement",description:null,fields:[{name:"server",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"os",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cpu",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"fuels",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Fuel",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseAccessKeys",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"list",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"AccessKey",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseAddLetsEncryptCert",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseAddNginxHttpsCert",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlocklet",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blocklet",description:null,args:[],type:{kind:"OBJECT",name:"BlockletState",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlockletAccessPolicies",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"accessPolicies",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletAccessPolicy",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"paging",description:null,args:[],type:{kind:"OBJECT",name:"Paging",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlockletAccessPolicy",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"accessPolicy",description:null,args:[],type:{kind:"OBJECT",name:"BlockletAccessPolicy",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlockletDiff",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blockletDiff",description:null,args:[],type:{kind:"OBJECT",name:"BlockletDiff",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlockletMeta",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"meta",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlockletMetaFromUrl",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"meta",description:null,args:[],type:{kind:"OBJECT",name:"BlockletMeta",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isFree",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"inStore",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"registryUrl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlockletResponseHeaderPolicies",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"responseHeaderPolicies",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletResponseHeaderPolicy",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"paging",description:null,args:[],type:{kind:"OBJECT",name:"Paging",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlockletResponseHeaderPolicy",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"responseHeaderPolicy",description:null,args:[],type:{kind:"OBJECT",name:"BlockletResponseHeaderPolicy",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlockletRuntimeHistory",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"history",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletHistoryItem",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlockletSecurityRule",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"securityRule",description:null,args:[],type:{kind:"OBJECT",name:"BlockletSecurityRule",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlockletSecurityRules",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"securityRules",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletSecurityRule",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"paging",description:null,args:[],type:{kind:"OBJECT",name:"Paging",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseBlockletsFromBackup",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"backups",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletBackupState",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseCheckComponentsForUpdates",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"preUpdateInfo",description:null,args:[],type:{kind:"OBJECT",name:"BlockletPreUpdateInfo",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseCheckDomains",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseCheckNodeVersion",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"version",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseClearCache",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"removed",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseConnectByStudio",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"url",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseConnectToStore",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"url",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseCreateAccessKey",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"data",description:null,args:[],type:{kind:"OBJECT",name:"CreateAccessKey",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseCreateInvitation",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"inviteInfo",description:null,args:[],type:{kind:"OBJECT",name:"InviteInfo",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseCreatePassportIssuance",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"info",description:null,args:[],type:{kind:"OBJECT",name:"PassportIssuanceInfo",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseCreateTransferNodeInvitation",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"inviteInfo",description:null,args:[],type:{kind:"OBJECT",name:"InviteInfo",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseCreateWebHook",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"webhook",description:null,args:[],type:{kind:"OBJECT",name:"WebHookSender",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseDelegationState",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"state",description:null,args:[],type:{kind:"OBJECT",name:"DelegationState",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseDeleteAccessKey",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseDeleteNginxHttpsCert",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseDeleteWebHook",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseDisconnectFromStore",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseFindCertificateByDomain",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cert",description:null,args:[],type:{kind:"OBJECT",name:"Certificate",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGateway",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"gateway",description:null,args:[],type:{kind:"OBJECT",name:"Gateway",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cacheEnabled",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetAuditLogs",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"list",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"AuditLog",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"paging",description:null,args:[],type:{kind:"OBJECT",name:"Paging",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetBlockletBackups",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"backups",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Backup",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetBlockletNotifications",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"list",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Notification",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"paging",description:null,args:[],type:{kind:"OBJECT",name:"Paging",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetBlockletSpaceGateways",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"spaceGateways",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"SpaceGateway",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetBlocklets",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"blocklets",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"BlockletState",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetCertificates",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"certificates",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Certificate",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetDynamicComponents",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"components",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ComponentState",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetInvitations",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"invitations",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"InviteInfo",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetLauncherSession",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"error",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"launcherSession",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetNodeEnv",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"info",description:null,args:[],type:{kind:"OBJECT",name:"NodeEnvInfo",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetNodeInfo",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"info",description:null,args:[],type:{kind:"OBJECT",name:"NodeState",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetNotifications",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"list",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Notification",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"paging",description:null,args:[],type:{kind:"OBJECT",name:"Paging",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetPassportIssuances",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"list",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"PassportIssuanceInfo",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetProject",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"project",description:null,args:[],type:{kind:"OBJECT",name:"Project",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetProjects",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"projects",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Project",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"paging",description:null,args:[],type:{kind:"OBJECT",name:"Paging",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetRelease",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"release",description:null,args:[],type:{kind:"OBJECT",name:"Release",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetReleases",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"releases",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Release",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"paging",description:null,args:[],type:{kind:"OBJECT",name:"Paging",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetRoutingProviders",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"providers",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"RoutingProvider",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetRoutingSites",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sites",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"RoutingSite",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetRoutingSnapshots",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"snapshots",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"RoutingSnapshot",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetSelectedResources",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"resources",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetSession",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"session",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetSnapshotSites",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sites",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"RoutingSite",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetTrafficInsights",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"list",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"TrafficInsight",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"paging",description:null,args:[],type:{kind:"OBJECT",name:"Paging",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetUsersCount",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"count",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseGetUsersCountPerRole",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"counts",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"KeyValue",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseIsDidDomain",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"value",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseNodeRuntimeHistory",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"history",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"NodeHistoryItem",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponsePermission",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"permission",description:null,args:[],type:{kind:"OBJECT",name:"Permission",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponsePermissions",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"permissions",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Permission",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseProject",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"project",description:null,args:[],type:{kind:"OBJECT",name:"Project",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponsePublishToStore",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"url",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseReadBlockletNotifications",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"numAffected",description:null,args:[],type:{kind:"SCALAR",name:"Int32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseReadNotifications",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"numAffected",description:null,args:[],type:{kind:"SCALAR",name:"Int32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseRelease",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"release",description:null,args:[],type:{kind:"OBJECT",name:"Release",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseResetNode",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseRestartServer",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sessionId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseRole",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"role",description:null,args:[],type:{kind:"OBJECT",name:"Role",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseRoles",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"roles",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Role",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseRoutingSite",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"site",description:null,args:[],type:{kind:"OBJECT",name:"RoutingSite",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseSendMsg",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseSenderList",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"senders",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"WebHookSender",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseTag",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"tag",description:null,args:[],type:{kind:"OBJECT",name:"Tag",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseTags",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"tags",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Tag",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"paging",description:null,args:[],type:{kind:"OBJECT",name:"Paging",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseTakeRoutingSnapshot",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"hash",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseUpdateAccessKey",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"data",description:null,args:[],type:{kind:"OBJECT",name:"AccessKey",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseUpdateNginxHttpsCert",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseUpgradeNodeVersion",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sessionId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseUser",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"user",description:null,args:[],type:{kind:"OBJECT",name:"UserInfo",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseUsers",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"users",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"UserInfo",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"paging",description:null,args:[],type:{kind:"OBJECT",name:"Paging",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"ResponseWebHooks",description:null,fields:[{name:"code",description:null,args:[],type:{kind:"ENUM",name:"StatusCode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"webhooks",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"WebHook",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Role",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"grants",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"title",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isProtected",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"extra",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"RoutingProvider",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"running",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"available",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"error",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"RoutingRule",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"from",description:null,args:[],type:{kind:"OBJECT",name:"RoutingRuleFrom",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"to",description:null,args:[],type:{kind:"OBJECT",name:"RoutingRuleTo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isProtected",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"RoutingRuleFrom",description:null,fields:[{name:"pathPrefix",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"header",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"RoutingRuleHeader",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"RoutingRuleHeader",description:null,fields:[{name:"key",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"value",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"type",description:null,args:[],type:{kind:"ENUM",name:"HeaderMatchType",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"RoutingRuleResponse",description:null,fields:[{name:"status",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"contentType",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"body",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"RoutingRuleTo",description:null,fields:[{name:"port",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"type",description:null,args:[],type:{kind:"ENUM",name:"BackendServiceType",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"url",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"redirectCode",description:null,args:[],type:{kind:"SCALAR",name:"Int32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"interfaceName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"componentId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pageGroup",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"response",description:null,args:[],type:{kind:"OBJECT",name:"RoutingRuleResponse",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"RoutingSite",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"domain",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"domainAliases",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Any",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"rules",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"RoutingRule",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"isProtected",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"corsAllowedOrigins",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"RoutingSnapshot",description:null,fields:[{name:"hash",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"tree",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"message",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"author",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"RuntimeInfo",description:null,fields:[{name:"pid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"port",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"uptime",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"memoryUsage",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cpuUsage",description:null,args:[],type:{kind:"SCALAR",name:"Float32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"SessionConfig",description:null,fields:[{name:"cacheTtl",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"ttl",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"email",description:null,args:[],type:{kind:"OBJECT",name:"LoginEmailSettings",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"phone",description:null,args:[],type:{kind:"OBJECT",name:"LoginPhoneSettings",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"SimpleBlockletMeta",description:null,fields:[{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"version",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"title",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"bundleDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"bundleName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"SimpleBlockletState",description:null,fields:[{name:"meta",description:null,args:[],type:{kind:"OBJECT",name:"SimpleBlockletMeta",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"status",description:null,args:[],type:{kind:"ENUM",name:"BlockletStatus",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deployedFrom",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"mountPoint",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deletedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"SpaceGateway",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"url",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"protected",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"endpoint",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Tag",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"title",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"color",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"TrafficInsight",description:null,fields:[{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"date",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"totalRequests",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"validRequests",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"failedRequests",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"generationTime",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"uniqueVisitors",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"uniqueFiles",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"excludedHits",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"uniqueReferrers",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"uniqueNotFound",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"uniqueStaticFiles",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"logSize",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"bandwidth",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"TrustedFactory",description:null,fields:[{name:"holderDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"issuerDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"factoryAddress",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"remark",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"passport",description:null,args:[],type:{kind:"OBJECT",name:"TrustedPassportMappingTo",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"TrustedPassport",description:null,fields:[{name:"issuerDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"remark",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"mappings",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"TrustedPassportMapping",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"TrustedPassportMapping",description:null,fields:[{name:"from",description:null,args:[],type:{kind:"OBJECT",name:"TrustedPassportMappingFrom",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"to",description:null,args:[],type:{kind:"OBJECT",name:"TrustedPassportMappingTo",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"TrustedPassportMappingFrom",description:null,fields:[{name:"passport",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"TrustedPassportMappingTo",description:null,fields:[{name:"role",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"ttl",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"ttlPolicy",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"UpdateList",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"meta",description:null,args:[],type:{kind:"OBJECT",name:"BlockletMeta",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"UserInfo",description:null,fields:[{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pk",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"role",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"avatar",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"fullName",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"email",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"approved",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"locale",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"passports",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Passport",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"firstLoginAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"lastLoginAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"remark",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"lastLoginIp",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sourceProvider",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sourceAppPid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"connectedAccounts",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"ConnectedAccount",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"extra",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"tags",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"Tag",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"didSpace",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"userSessions",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"UserSession",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"url",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"phone",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"inviter",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"generation",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"emailVerified",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"phoneVerified",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"UserSession",description:null,fields:[{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"visitorId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"appPid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"userDid",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"ua",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"passportId",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"status",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"lastLoginIp",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"extra",description:null,args:[],type:{kind:"SCALAR",name:"Any",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"WalletInfo",description:null,fields:[{name:"did",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"pk",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"WebHook",description:null,fields:[{name:"type",description:null,args:[],type:{kind:"ENUM",name:"SenderType",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"id",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"params",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"WebHookParam",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"createdAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatedAt",description:null,args:[],type:{kind:"SCALAR",name:"Uint32",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"WebHookParam",description:null,fields:[{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"required",description:null,args:[],type:{kind:"SCALAR",name:"Boolean",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"defaultValue",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"value",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"type",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"WebHookSender",description:null,fields:[{name:"type",description:null,args:[],type:{kind:"ENUM",name:"SenderType",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"title",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"params",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"WebHookParam",ofType:null}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"ENUM",name:"BackendServiceType",description:null,fields:null,inputFields:null,interfaces:null,enumValues:[{name:"daemon",description:null,isDeprecated:!1,deprecationReason:null},{name:"blocklet",description:null,isDeprecated:!1,deprecationReason:null},{name:"redirect",description:null,isDeprecated:!1,deprecationReason:null},{name:"none",description:null,isDeprecated:!1,deprecationReason:null},{name:"general_proxy",description:null,isDeprecated:!1,deprecationReason:null},{name:"direct_response",description:null,isDeprecated:!1,deprecationReason:null},{name:"rewrite",description:null,isDeprecated:!1,deprecationReason:null},{name:"component",description:null,isDeprecated:!1,deprecationReason:null}],possibleTypes:null},{kind:"ENUM",name:"BackupTo",description:null,fields:null,inputFields:null,interfaces:null,enumValues:[{name:"spaces",description:null,isDeprecated:!1,deprecationReason:null},{name:"disk",description:null,isDeprecated:!1,deprecationReason:null}],possibleTypes:null},{kind:"ENUM",name:"BlockletSource",description:null,fields:null,inputFields:null,interfaces:null,enumValues:[{name:"registry",description:null,isDeprecated:!1,deprecationReason:null},{name:"local",description:null,isDeprecated:!1,deprecationReason:null},{name:"upload",description:null,isDeprecated:!1,deprecationReason:null},{name:"url",description:null,isDeprecated:!1,deprecationReason:null},{name:"custom",description:null,isDeprecated:!1,deprecationReason:null}],possibleTypes:null},{kind:"ENUM",name:"BlockletStatus",description:null,fields:null,inputFields:null,interfaces:null,enumValues:[{name:"added",description:null,isDeprecated:!1,deprecationReason:null},{name:"downloading",description:null,isDeprecated:!1,deprecationReason:null},{name:"downloaded",description:null,isDeprecated:!1,deprecationReason:null},{name:"installing",description:null,isDeprecated:!1,deprecationReason:null},{name:"installed",description:null,isDeprecated:!1,deprecationReason:null},{name:"starting",description:null,isDeprecated:!1,deprecationReason:null},{name:"running",description:null,isDeprecated:!1,deprecationReason:null},{name:"stopping",description:null,isDeprecated:!1,deprecationReason:null},{name:"stopped",description:null,isDeprecated:!1,deprecationReason:null},{name:"error",description:null,isDeprecated:!1,deprecationReason:null},{name:"upgrading",description:null,isDeprecated:!1,deprecationReason:null},{name:"restarting",description:null,isDeprecated:!1,deprecationReason:null},{name:"corrupted",description:null,isDeprecated:!1,deprecationReason:null},{name:"waiting",description:null,isDeprecated:!1,deprecationReason:null},{name:"deleted",description:null,isDeprecated:!1,deprecationReason:null},{name:"unknown",description:null,isDeprecated:!1,deprecationReason:null}],possibleTypes:null},{kind:"ENUM",name:"HeaderMatchType",description:null,fields:null,inputFields:null,interfaces:null,enumValues:[{name:"exact",description:null,isDeprecated:!1,deprecationReason:null},{name:"partial",description:null,isDeprecated:!1,deprecationReason:null},{name:"regexp",description:null,isDeprecated:!1,deprecationReason:null}],possibleTypes:null},{kind:"ENUM",name:"PublishType",description:null,fields:null,inputFields:null,interfaces:null,enumValues:[{name:"resource",description:null,isDeprecated:!1,deprecationReason:null},{name:"pack",description:null,isDeprecated:!1,deprecationReason:null}],possibleTypes:null},{kind:"ENUM",name:"ReleaseStatus",description:null,fields:null,inputFields:null,interfaces:null,enumValues:[{name:"draft",description:null,isDeprecated:!1,deprecationReason:null},{name:"published",description:null,isDeprecated:!1,deprecationReason:null}],possibleTypes:null},{kind:"ENUM",name:"SenderType",description:null,fields:null,inputFields:null,interfaces:null,enumValues:[{name:"slack",description:null,isDeprecated:!1,deprecationReason:null},{name:"api",description:null,isDeprecated:!1,deprecationReason:null}],possibleTypes:null},{kind:"ENUM",name:"StatusCode",description:null,fields:null,inputFields:null,interfaces:null,enumValues:[{name:"ok",description:null,isDeprecated:!1,deprecationReason:null},{name:"blocklet_not_found",description:null,isDeprecated:!1,deprecationReason:null},{name:"blocklet_not_purchased",description:null,isDeprecated:!1,deprecationReason:null},{name:"forbidden",description:null,isDeprecated:!1,deprecationReason:null},{name:"internal",description:null,isDeprecated:!1,deprecationReason:null},{name:"timeout",description:null,isDeprecated:!1,deprecationReason:null}],possibleTypes:null},{kind:"SCALAR",name:"Upload",description:"The `Upload` scalar type represents a file upload.",fields:null,inputFields:null,interfaces:null,enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Mutation",description:null,fields:[{name:"installBlocklet",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestVersionedBlockletInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"installComponent",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestInstallComponentInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"startBlocklet",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestComponentsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"stopBlocklet",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestComponentsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"reloadBlocklet",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestComponentsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"restartBlocklet",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestComponentsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteBlocklet",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteComponent",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteComponentInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"cancelDownloadBlocklet",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestBlockletInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"checkComponentsForUpdates",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestBlockletInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseCheckComponentsForUpdates",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"upgradeComponents",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateComponentsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"configBlocklet",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestConfigBlockletInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"configPublicToStore",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestConfigPublicToStoreInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"configNavigations",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestConfigNavigationsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"configOAuth",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestConfigOAuthInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"configNotification",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestConfigNotificationInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sendEmail",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestSendEmailInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sendPush",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestSendPushInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"joinFederatedLogin",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestJoinFederatedLoginInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"quitFederatedLogin",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestQuitFederatedLoginInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"disbandFederatedLogin",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDisbandFederatedLoginInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"configFederated",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestConfigFederatedInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"auditFederatedLogin",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestAuditFederatedLoginInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateAppSessionConfig",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateAppSessionConfigInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateComponentTitle",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateComponentTitleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateComponentMountPoint",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateComponentMountPointInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"backupBlocklet",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestBackupBlockletInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"restoreBlocklet",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestRestoreBlockletInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"migrateApplicationToStructV2",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestMigrateApplicationToStructV2Input",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"addBlockletSpaceGateway",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestAddBlockletSpaceGatewayInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteBlockletSpaceGateway",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletSpaceGatewayInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateBlockletSpaceGateway",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateBlockletSpaceGatewayInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateAutoBackup",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateAutoBackupInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateAutoCheckUpdate",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateAutoCheckUpdateInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateInviteSettings",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateInviteSettingsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateNodeInfo",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"NodeInfoInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetNodeInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateNodeRouting",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestNodeRoutingInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetNodeInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"upgradeNodeVersion",description:null,args:[],type:{kind:"OBJECT",name:"ResponseUpgradeNodeVersion",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"restartServer",description:null,args:[],type:{kind:"OBJECT",name:"ResponseRestartServer",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"resetNode",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestResetNodeInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseResetNode",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateGateway",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGatewayInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGateway",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"clearCache",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestClearCacheInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseClearCache",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createMemberInvitation",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestCreateInvitationInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseCreateInvitation",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createTransferInvitation",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestCreateTransferNodeInvitationInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseCreateTransferNodeInvitation",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteInvitation",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteInvitationInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createPassportIssuance",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestCreatePassportIssuanceInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseCreatePassportIssuance",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deletePassportIssuance",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteTeamSessionInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"configTrustedPassports",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestConfigTrustedPassportsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"configTrustedFactories",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestConfigTrustedFactoriesInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"configPassportIssuance",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestConfigPassportIssuanceInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"removeUser",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTeamUserInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUser",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateUserTags",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateUserTagsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUser",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateUserProfile",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateUserProfileInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUser",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateUserExtra",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateUserExtraInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUser",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateUserApproval",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTeamUserInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUser",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"issuePassportToUser",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestIssuePassportToUserInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUser",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"revokeUserPassport",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestRevokeUserPassportInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUser",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"enableUserPassport",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestRevokeUserPassportInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUser",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"removeUserPassport",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestRevokeUserPassportInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"switchProfile",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestSwitchProfileInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUser",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createRole",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestCreateRoleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRole",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateRole",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTeamRoleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRole",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteRole",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteRoleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createPermission",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestCreatePermissionInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponsePermission",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatePermission",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTeamPermissionInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponsePermission",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deletePermission",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeletePermissionInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"grantPermissionForRole",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGrantPermissionForRoleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"revokePermissionFromRole",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestRevokePermissionFromRoleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updatePermissionsForRole",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdatePermissionsForRoleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRole",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"hasPermission",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestHasPermissionInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"BooleanResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"addBlockletStore",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestAddBlockletStoreInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteBlockletStore",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletStoreInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createTag",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTagInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseTag",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateTag",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTagInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseTag",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteTag",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTagInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseTag",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"readNotifications",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestReadNotificationsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseReadNotifications",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"unreadNotifications",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestReadNotificationsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseReadNotifications",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"readBlockletNotifications",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestReadBlockletNotificationsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseReadBlockletNotifications",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"unreadBlockletNotifications",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestReadBlockletNotificationsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseReadBlockletNotifications",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"addRoutingSite",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestAddRoutingSiteInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRoutingSite",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"addDomainAlias",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestAddDomainAliasInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRoutingSite",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteDomainAlias",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteDomainAliasInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRoutingSite",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteRoutingSite",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteRoutingSiteInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateRoutingSite",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateRoutingSiteInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRoutingSite",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"addRoutingRule",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestAddRoutingRuleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRoutingSite",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateRoutingRule",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateRoutingRuleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRoutingSite",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteRoutingRule",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteRoutingRuleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRoutingSite",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"takeRoutingSnapshot",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTakeRoutingSnapshotInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseTakeRoutingSnapshot",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateCertificate",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateNginxHttpsCertInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUpdateNginxHttpsCert",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"addCertificate",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestAddNginxHttpsCertInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseAddNginxHttpsCert",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteCertificate",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteNginxHttpsCertInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseDeleteNginxHttpsCert",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"issueLetsEncryptCert",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestAddLetsEncryptCertInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseAddLetsEncryptCert",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createAccessKey",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestCreateAccessKeyInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseCreateAccessKey",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateAccessKey",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateAccessKeyInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUpdateAccessKey",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteAccessKey",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteAccessKeyInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseDeleteAccessKey",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createWebHook",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestCreateWebHookInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseCreateWebHook",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteWebHook",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteWebHookInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseDeleteWebHook",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"startSession",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestStartSessionInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetSession",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateSession",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateSessionInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetSession",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"endSession",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestEndSessionInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetSession",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createProject",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestCreateProjectInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseProject",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateProject",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateProjectInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseProject",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteProject",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestProjectInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"createRelease",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestCreateReleaseInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRelease",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteRelease",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestReleaseInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateSelectedResources",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateSelectedResourcesInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"connectToStore",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestConnectToStoreInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseConnectToStore",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"disconnectFromStore",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDisconnectFromStoreInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseDisconnectFromStore",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"publishToStore",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestPublishToStoreInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponsePublishToStore",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"connectByStudio",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestConnectByStudioInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseConnectByStudio",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"addBlockletSecurityRule",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestAddBlockletSecurityRuleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletSecurityRule",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateBlockletSecurityRule",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateBlockletSecurityRuleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletSecurityRule",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteBlockletSecurityRule",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletSecurityRuleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"addBlockletResponseHeaderPolicy",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestAddBlockletResponseHeaderPolicyInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletResponseHeaderPolicy",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateBlockletResponseHeaderPolicy",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateBlockletResponseHeaderPolicyInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletResponseHeaderPolicy",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteBlockletResponseHeaderPolicy",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletResponseHeaderPolicyInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"addBlockletAccessPolicy",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestAddBlockletAccessPolicyInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletAccessPolicy",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"updateBlockletAccessPolicy",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUpdateBlockletAccessPolicyInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletAccessPolicy",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"deleteBlockletAccessPolicy",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestDeleteBlockletAccessPolicyInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"Query",description:null,fields:[{name:"getBlocklet",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestBlockletDetailInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlocklet",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletMetaFromUrl",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestBlockletMetaFromUrlInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletMetaFromUrl",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletDiff",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestBlockletDiffInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletDiff",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlocklets",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetBlockletsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetBlocklets",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletRuntimeHistory",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestBlockletRuntimeHistoryInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletRuntimeHistory",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletsFromBackup",description:null,args:[],type:{kind:"OBJECT",name:"ResponseBlockletsFromBackup",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getDynamicComponents",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetDynamicComponentsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetDynamicComponents",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getNodeInfo",description:null,args:[],type:{kind:"OBJECT",name:"ResponseGetNodeInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"resetNodeStatus",description:null,args:[],type:{kind:"OBJECT",name:"ResponseGetNodeInfo",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getNodeEnv",description:null,args:[],type:{kind:"OBJECT",name:"ResponseGetNodeEnv",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"checkNodeVersion",description:null,args:[],type:{kind:"OBJECT",name:"ResponseCheckNodeVersion",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getDelegationState",description:null,args:[],type:{kind:"OBJECT",name:"ResponseDelegationState",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getNodeRuntimeHistory",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestNodeRuntimeHistoryInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseNodeRuntimeHistory",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletMeta",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestBlockletMetaInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletMeta",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getNotifications",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetNotificationsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetNotifications",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletNotifications",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetBlockletNotificationsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetBlockletNotifications",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getRoutingSites",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetRoutingSitesInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetRoutingSites",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getRoutingSnapshots",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetRoutingSnapshotsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetRoutingSnapshots",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getSnapshotSites",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetSnapshotSitesInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetSnapshotSites",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getRoutingProviders",description:null,args:[],type:{kind:"OBJECT",name:"ResponseGetRoutingProviders",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isDidDomain",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestIsDidDomainInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseIsDidDomain",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getCertificates",description:null,args:[],type:{kind:"OBJECT",name:"ResponseGetCertificates",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"checkDomains",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestCheckDomainsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseCheckDomains",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"findCertificateByDomain",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestFindCertificateByDomainInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseFindCertificateByDomain",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getAccessKeys",description:null,args:[],type:{kind:"OBJECT",name:"ResponseAccessKeys",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getWebHooks",description:null,args:[],type:{kind:"OBJECT",name:"ResponseWebHooks",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getWebhookSenders",description:null,args:[],type:{kind:"OBJECT",name:"ResponseSenderList",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"sendTestMessage",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestSendMsgInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseSendMsg",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getSession",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetSessionInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetSession",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getRoles",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"TeamInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRoles",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getRole",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTeamRoleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseRole",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getPermissions",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"TeamInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponsePermissions",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getInvitations",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"TeamInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetInvitations",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getUsers",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestUsersInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUsers",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getUser",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTeamUserInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUser",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getUsersCount",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"TeamInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetUsersCount",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getUsersCountPerRole",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"TeamInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetUsersCountPerRole",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getOwner",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"TeamInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseUser",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getPermissionsByRole",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTeamRoleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponsePermissions",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getPassportIssuances",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetPassportIssuancesInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetPassportIssuances",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"logoutUser",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestLogoutUserInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"GeneralResponse",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getTags",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestTagsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseTags",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getAuditLogs",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetAuditLogsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetAuditLogs",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getLauncherSession",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetLauncherSessionInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetLauncherSession",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletBackups",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetBlockletBackupsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetBlockletBackups",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletSpaceGateways",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestBlockletInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetBlockletSpaceGateways",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getTrafficInsights",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetTrafficInsightsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetTrafficInsights",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getProjects",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetProjectsInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetProjects",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getProject",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestProjectInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetProject",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getReleases",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetReleasesInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetReleases",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getRelease",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestReleaseInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetRelease",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getSelectedResources",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetSelectedResourcesInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseGetSelectedResources",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletSecurityRule",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetBlockletSecurityRuleInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletSecurityRule",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletSecurityRules",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetBlockletSecurityRulesInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletSecurityRules",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletResponseHeaderPolicy",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetBlockletResponseHeaderPolicyInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletAccessPolicy",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletResponseHeaderPolicies",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetBlockletResponseHeaderPoliciesInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletResponseHeaderPolicies",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletAccessPolicy",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetBlockletAccessPolicyInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletAccessPolicy",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"getBlockletAccessPolicies",description:null,args:[{name:"input",description:null,type:{kind:"INPUT_OBJECT",name:"RequestGetBlockletAccessPoliciesInput",ofType:null},defaultValue:null}],type:{kind:"OBJECT",name:"ResponseBlockletAccessPolicies",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:[{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"types",description:"A list of all types supported by this server.",args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__Type",ofType:null}}}},isDeprecated:!1,deprecationReason:null},{name:"queryType",description:"The type that query operations will be rooted at.",args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__Type",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"mutationType",description:"If this server supports mutation, the type that mutation operations will be rooted at.",args:[],type:{kind:"OBJECT",name:"__Type",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"subscriptionType",description:"If this server support subscription, the type that subscription operations will be rooted at.",args:[],type:{kind:"OBJECT",name:"__Type",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"directives",description:"A list of all directives supported by this server.",args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__Directive",ofType:null}}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:[{name:"kind",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"ENUM",name:"__TypeKind",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"name",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"specifiedByURL",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"fields",description:null,args:[{name:"includeDeprecated",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:"false"}],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__Field",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"interfaces",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__Type",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"possibleTypes",description:null,args:[],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__Type",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"enumValues",description:null,args:[{name:"includeDeprecated",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:"false"}],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__EnumValue",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"inputFields",description:null,args:[{name:"includeDeprecated",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:"false"}],type:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__InputValue",ofType:null}}},isDeprecated:!1,deprecationReason:null},{name:"ofType",description:null,args:[],type:{kind:"OBJECT",name:"__Type",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"ENUM",name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",fields:null,inputFields:null,interfaces:null,enumValues:[{name:"SCALAR",description:"Indicates this type is a scalar.",isDeprecated:!1,deprecationReason:null},{name:"OBJECT",description:"Indicates this type is an object. `fields` and `interfaces` are valid fields.",isDeprecated:!1,deprecationReason:null},{name:"INTERFACE",description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.",isDeprecated:!1,deprecationReason:null},{name:"UNION",description:"Indicates this type is a union. `possibleTypes` is a valid field.",isDeprecated:!1,deprecationReason:null},{name:"ENUM",description:"Indicates this type is an enum. `enumValues` is a valid field.",isDeprecated:!1,deprecationReason:null},{name:"INPUT_OBJECT",description:"Indicates this type is an input object. `inputFields` is a valid field.",isDeprecated:!1,deprecationReason:null},{name:"LIST",description:"Indicates this type is a list. `ofType` is a valid field.",isDeprecated:!1,deprecationReason:null},{name:"NON_NULL",description:"Indicates this type is a non-null. `ofType` is a valid field.",isDeprecated:!1,deprecationReason:null}],possibleTypes:null},{kind:"OBJECT",name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:[{name:"name",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"args",description:null,args:[{name:"includeDeprecated",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:"false"}],type:{kind:"NON_NULL",name:null,ofType:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__InputValue",ofType:null}}}},isDeprecated:!1,deprecationReason:null},{name:"type",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__Type",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"isDeprecated",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Boolean",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"deprecationReason",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:[{name:"name",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"type",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__Type",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"defaultValue",description:"A GraphQL-formatted string representing the default value for this input value.",args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isDeprecated",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Boolean",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"deprecationReason",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:[{name:"name",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isDeprecated",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Boolean",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"deprecationReason",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"OBJECT",name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
1351
1351
 
1352
- In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:[{name:"name",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isRepeatable",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Boolean",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"locations",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"ENUM",name:"__DirectiveLocation",ofType:null}}}},isDeprecated:!1,deprecationReason:null},{name:"args",description:null,args:[{name:"includeDeprecated",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:"false"}],type:{kind:"NON_NULL",name:null,ofType:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__InputValue",ofType:null}}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"ENUM",name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",fields:null,inputFields:null,interfaces:null,enumValues:[{name:"QUERY",description:"Location adjacent to a query operation.",isDeprecated:!1,deprecationReason:null},{name:"MUTATION",description:"Location adjacent to a mutation operation.",isDeprecated:!1,deprecationReason:null},{name:"SUBSCRIPTION",description:"Location adjacent to a subscription operation.",isDeprecated:!1,deprecationReason:null},{name:"FIELD",description:"Location adjacent to a field.",isDeprecated:!1,deprecationReason:null},{name:"FRAGMENT_DEFINITION",description:"Location adjacent to a fragment definition.",isDeprecated:!1,deprecationReason:null},{name:"FRAGMENT_SPREAD",description:"Location adjacent to a fragment spread.",isDeprecated:!1,deprecationReason:null},{name:"INLINE_FRAGMENT",description:"Location adjacent to an inline fragment.",isDeprecated:!1,deprecationReason:null},{name:"VARIABLE_DEFINITION",description:"Location adjacent to a variable definition.",isDeprecated:!1,deprecationReason:null},{name:"SCHEMA",description:"Location adjacent to a schema definition.",isDeprecated:!1,deprecationReason:null},{name:"SCALAR",description:"Location adjacent to a scalar definition.",isDeprecated:!1,deprecationReason:null},{name:"OBJECT",description:"Location adjacent to an object type definition.",isDeprecated:!1,deprecationReason:null},{name:"FIELD_DEFINITION",description:"Location adjacent to a field definition.",isDeprecated:!1,deprecationReason:null},{name:"ARGUMENT_DEFINITION",description:"Location adjacent to an argument definition.",isDeprecated:!1,deprecationReason:null},{name:"INTERFACE",description:"Location adjacent to an interface definition.",isDeprecated:!1,deprecationReason:null},{name:"UNION",description:"Location adjacent to a union definition.",isDeprecated:!1,deprecationReason:null},{name:"ENUM",description:"Location adjacent to an enum definition.",isDeprecated:!1,deprecationReason:null},{name:"ENUM_VALUE",description:"Location adjacent to an enum value definition.",isDeprecated:!1,deprecationReason:null},{name:"INPUT_OBJECT",description:"Location adjacent to an input object type definition.",isDeprecated:!1,deprecationReason:null},{name:"INPUT_FIELD_DEFINITION",description:"Location adjacent to an input object field definition.",isDeprecated:!1,deprecationReason:null}],possibleTypes:null}],directives=[{name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],args:[{name:"if",description:"Included when true.",type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Boolean",ofType:null}},defaultValue:null}]},{name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],args:[{name:"if",description:"Skipped when true.",type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Boolean",ofType:null}},defaultValue:null}]},{name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:["FIELD_DEFINITION","ARGUMENT_DEFINITION","INPUT_FIELD_DEFINITION","ENUM_VALUE"],args:[{name:"reason",description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:'"No longer supported"'}]},{name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:["SCALAR"],args:[{name:"url",description:"The URL that specifies the behavior of this scalar.",type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}},defaultValue:null}]}],require$$4={queryType,mutationType,subscriptionType,types,directives},BaseClient=dist,schema=require$$4;let ABTNodeClient$1=class extends BaseClient{constructor(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"http://localhost:4000/api",_e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const et={dataSource:"forge",httpEndpoint:j,socketEndpoint:()=>this._getSocketEndpoint(j),enableQuery:!0,enableSubscription:!0,enableMutation:!0,maxQueryDepth:6};super(et),this._endpoint=j,this._authToken=null,this._userAgent=_e}setAuthToken(j){this._authToken=j}_getSocketEndpoint(j){let _e=j.replace(/https?:\/\//,"ws://");return j.indexOf("https://")===0&&(_e=_e.replace("ws://","wss://")),"".concat(_e,"/socket")}_getSchema(){return schema}_getIgnoreFields(j){return[]}_getAuthHeaders(){const j={},_e=this._authToken;if(_e){const et=typeof _e=="function"?_e():_e;j.Authorization="Bearer ".concat(encodeURIComponent(et))}if(typeof window<"u"&&typeof window.location<"u"){const{hostname:et,port:nt,protocol:tt}=window.location;j["x-real-hostname"]=et,j["x-real-port"]=nt,j["x-real-protocol"]=tt.endsWith(":")?tt.substring(0,tt.length-1):tt}return this._userAgent&&(j["User-Agent"]=this._userAgent),j}};var base=ABTNodeClient$1;const EventEmitter=eventemitter3Exports,ABTNodeClient=base;class BrowserABTNodeClient extends ABTNodeClient{_getSocketOptions(){return{}}_getEventImplementation(){return EventEmitter}}var browser=BrowserABTNodeClient;const NodeClient=getDefaultExportFromCjs$1(browser),prefix$1=(window.env?window.env.apiPrefix:"/")||"/",client$1=new NodeClient(()=>`${prefix$1}/api/gql?locale=${getLocale()}`.replace(/\/+/g,"/").trim());function useSubscription$1({wsClient:a,event:j,cb:_e=()=>{},deps:et=[]}){reactExports.useEffect(()=>{const nt=a&&(!et.length||et.every(Boolean));return nt&&a.on(j,_e),()=>{nt&&a.off(j,_e)}},et)}let client;function create(){const a=(window.env&&window.env.apiPrefix?window.env.apiPrefix:"/").replace(/\/$/,""),j=`//${window.location.host}${a}/admin`;return new browser$3.WsClient(j,{heartbeatIntervalMs:100*1e3,params:()=>({token:Cookie.get("login_token")})})}function getWsClient(){return client||(client=create()),client}const useSubscription=(a,j=()=>{},_e=[])=>{a=`${window.blocklet.did}/${a}`;const{session:et}=useSessionContext();!client&&et.user&&(client=getWsClient(),client.connect()),useSubscription$1({wsClient:client,event:a,cb:j,deps:_e})};let cache=null;const fetch$1=async()=>{try{return(await api.get(`/dns-resolve?hostname=${window.location.hostname}`)).data.address}catch{return null}},getIp=()=>(cache||(cache=fetch$1()),cache),{Provider:Provider$2,Consumer:Consumer$2}=BlockletContext,parseEndpoint=(a,j)=>{const _e=/^{env\.(.+)}$/.exec(a);if(_e&&_e[1]){const et=((j==null?void 0:j.configs)||[]).find(nt=>nt.key===_e[1]);return!et&&!et.value?"":et.value}return a},getChainConfig=(()=>{const a={endpoint:"",data:{}};return async j=>{if(a.endpoint===j)return a.data;const et=await getChainClient(j).getConfig();return a.endpoint=j,a.data=et,et}})(),{did,appId}=window.env;function BlockletProvider({children:a,mode:j}){var pt;const[_e,et]=reactExports.useState(null),[nt,tt]=reactExports.useState(!1),[ot,ct]=reactExports.useState({}),[ft,ht]=reactExports.useState(),[dt,yt]=reactExports.useState(),[Tt,St]=reactExports.useState(),At=j==="setup",{loading:Rt,loadingDiskInfo:It,loadingRuntimeInfo:Ct,error:kt,blocklet:Pt,recommendedDomain:Bt,runtimeHistory:Kt,actions:{refreshBlocklet:jt,refreshDomainStatus:zt,setBlocklet:Gt}}=useBlocklet({did,client:client$1,useSubscription,getIP:getIp,useLocaleContext,getOptionalComponents:!0}),tn=reactExports.useRef(void 0);tn.current=(pt=Pt==null?void 0:Pt.meta)==null?void 0:pt.did;const hn=async()=>{try{tt(!0),et(null);const{data:mt}=await api.get("/blocklet/meta");ct(mt),tt(!1)}catch(mt){tt(!1),et(mt),Toast$1.error(mt.message)}},wt=async({showError:mt=!0}={})=>{var Ht,Ot;if(!((Ot=(Ht=ot==null?void 0:ot.requirements)==null?void 0:Ht.fuels)!=null&&Ot.length))return null;const{endpoint:$t,value:xt,address:vt}=ot.requirements.fuels[0],it=parseEndpoint($t,Pt),bt=xt;let Mt=xt;const Lt={endpoint:it,symbol:"",need:bt,current:0,owe:Number(bt)>0};try{const Jt=getChainClient(it),{config:Ft}=await getChainConfig(it),Zt=JSON.parse(Ft).token;let nn=vt;nn||(nn=Zt.address),yt({address:Zt.address,symbol:Zt.symbol,decimal:Zt.decimal});const{getAccountState:{state:cn},getTokenState:{state:qt}}=await Jt.doBatchQuery({getAccountState:{address:appId},getTokenState:{address:nn}});qt&&(Lt.symbol=qt.symbol);const Dt=((cn==null?void 0:cn.tokens)||[]).find(Vt=>Vt.address===nn);if(Dt){const Vt=lib$4.fromTokenToUnit(bt,Dt.decimal||18);Lt.current=lib$4.fromUnitToToken(Dt.value,Dt.decimal||18),Lt.owe=Vt.gt(new lib$4.BN(Dt.value)),Mt=Math.max(0,lib$4.fromUnitToToken(Vt.sub(new lib$4.BN(Dt.value)),Dt.decimal||18))}}catch(Jt){mt&&Toast$1.error(Jt.message)}return ht({...Lt,deficiency:Mt}),Lt},rt=async({configs:mt,childDid:$t})=>(await client$1.configBlocklet({input:{did:[did].concat($t).filter(Boolean),configs:mt}}),jt()),st=async mt=>{const{blocklet:$t}=await client$1.configNavigations({input:{did,navigations:mt}});Gt($t)};reactExports.useEffect(()=>{At&&hn(),jt({showError:!1})},[]),reactExports.useEffect(()=>{var mt;(mt=Pt==null?void 0:Pt.controller)!=null&&mt.launcherSessionId&&client$1.getLauncherSession({input:{launcherSessionId:Pt.controller.launcherSessionId,launcherUrl:Pt.controller.launcherUrl}}).then($t=>{St($t.launcherSession)}).catch($t=>{console.error("get launcher session error",$t)})},[Pt==null?void 0:Pt.appPid]);const ut={loading:nt||Rt,loadingDiskInfo:It,loadingRuntimeInfo:Ct,error:_e||kt,blocklet:Pt,launcherSession:Tt,did,recommendedDomain:Bt,runtimeHistory:Kt,appIdList:Pt?util$2.getBlockletAppIdList(Pt):[],env:window.blocklet||{},meta:ot,gas:ft,tokenInfo:dt,client:client$1,mode:j,actions:{refreshBlocklet:jt,refreshDomainStatus:zt,setBlocklet:Gt,refreshMeta:hn,refreshFuel:wt,configBlocklet:rt,configNavigations:st}};return jsxRuntimeExports.jsx(Provider$2,{value:ut,children:a})}BlockletProvider.propTypes={children:PropTypes.any,mode:PropTypes.oneOf(["dashboard","setup"]).isRequired};BlockletProvider.defaultProps={children:null};function useBlockletContext(){return reactExports.useContext(BlockletContext)}const NodeContext=reactExports.createContext({});function useNodeContext$1(){const{node:a}=reactExports.useContext(NodeContext);return{...a,inService:a.type==="service",inDaemon:a.type==="daemon"}}const{Provider:Provider$1,Consumer:Consumer$1}=NodeContext,imgPrefix=`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images`;function NodeProvider({children:a}){const{serverDid:j,serverVersion:_e,mode:et,nftDomainUrl:nt,ownerNft:tt,launcher:ot}=window.env,ct={api:client$1,restApi:api,prefix:constant$3.WELLKNOWN_SERVICE_PATH_PREFIX,imgPrefix,getSessionInHeader:()=>({}),ws:{getWsClient,create,useSubscription},type:"service",info:{did:j,version:_e,mode:et,nftDomainUrl:nt,ownerNft:tt,launcher:ot}};return jsxRuntimeExports.jsx(Provider$1,{value:{node:ct},children:a})}function useNodeContext(){const{node:a}=reactExports.useContext(NodeContext);return a}const NotificationContext=reactExports.createContext({}),{Provider,Consumer}=NotificationContext;function NotificationProvider({children:a}){const{did:j}=window.env,[_e,et]=reactExports.useState([]),[nt,tt]=reactExports.useState({total:0,pageSize:10,pageCount:0,page:1}),[ot,ct]=reactExports.useState(!1),ft=async({page:dt=1}={})=>{if(!ot){ct(!0);try{const yt=await client$1.getBlockletNotifications({input:{paging:{page:dt},teamDid:j}});et(yt.list),tt(yt.paging),ct(!1)}catch(yt){Toast$1.error(yt.message),ct(!1)}}};reactExports.useEffect(()=>{ft()},[]),useSubscription(constant$3.EVENTS.NOTIFICATION_BLOCKLET_CREATE,dt=>{et(yt=>[dt,...yt||[]])});const ht={loading:ot,refresh:ft,data:_e||[],paging:nt,api:client$1};return jsxRuntimeExports.jsx(Provider,{value:{notifications:ht},children:a})}function useNotificationContext(){const{notifications:a}=reactExports.useContext(NotificationContext);return a}const UserLogin=reactExports.lazy(()=>__vitePreload(()=>import("./login-A7PX2tFz.js"),__vite__mapDeps([0,1,2]))),UserLoginOAuthCallback=reactExports.lazy(()=>__vitePreload(()=>import("./login-oauth-callback-tSgR97Kc.js"),__vite__mapDeps([3,4,5,6]))),Connect=reactExports.lazy(()=>__vitePreload(()=>import("./connect-jQHKzr5H.js"),__vite__mapDeps([7,8,1,9,10]))),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./exchange-passport-CO1jvKm4.js"),__vite__mapDeps([11,9,10,12]))),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./issue-passport-DmbXLVQf.js"),__vite__mapDeps([13,14,15,16,17,1,18,19,20,12,9,10]))),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./lost-passport-BXRSnuel.js"),__vite__mapDeps([21,20,22,23,15,16,24,10,12,1,25,6,26]))),Start=reactExports.lazy(()=>__vitePreload(()=>import("./start-DjIHXcxs.js"),__vite__mapDeps([27,28,29,24,10,30,31,32,33]))),Setup=reactExports.lazy(()=>__vitePreload(()=>import("./setup-RGwVXIHk.js"),__vite__mapDeps([34,35,36,37,8,38,39,40,41,31,32,33,30]))),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./invite-Bjxb62pa.js"),__vite__mapDeps([42,14,15,16,17,1,18,19,20,12,9,10]))),Transfer=reactExports.lazy(()=>__vitePreload(()=>import("./transfer-CTWNv1F7.js"),__vite__mapDeps([43,31,32,33,9,10,20]))),Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./dashboard-DoRd9UiU.js").then(a=>a.k),__vite__mapDeps([44,45,46,47,48,49,50,51,52,5,6,53,54,28,55,56,57,25,18,58,59,60,10,61,4,62,63,64,41,65,66,32,67]))),UserCenter=reactExports.lazy(()=>__vitePreload(()=>import("./user-center-BA9gCxef.js"),__vite__mapDeps([68,69,4,62,63,64,41,65,47,48,49,50,66,32,70,25,6,71,15,16,72,73,8,74,10,45,75,76,77,78,79,80,81,82,83,57,84,85,54,86,87,88,89,90,91,5,92]))),StudioHome=reactExports.lazy(()=>__vitePreload(()=>import("./home-BNWIh8sX.js"),__vite__mapDeps([93,94,62,63,64,41,4,50]))),StudioPreferences=reactExports.lazy(()=>__vitePreload(()=>import("./preferences-BDOT10Le.js"),__vite__mapDeps([95,96,94,62,63,64,41,4]))),StudioBranding=reactExports.lazy(()=>__vitePreload(()=>import("./branding-DHKpXd_g.js"),__vite__mapDeps([97,98,99,81,79,100,94,62,63,64,41,4,50,25,6]))),StudioLocalization=reactExports.lazy(()=>__vitePreload(()=>import("./localization-BIdgFoTP.js"),__vite__mapDeps([101,94,62,63,64,41,4]))),AddResource=reactExports.lazy(()=>__vitePreload(()=>import("./add-resource-DZqyElGv.js"),__vite__mapDeps([102,103,104,105,47,48,49,50,52,86,83,85,5,6,53,106,23,98,107,108,51,18,24,10,25,55,109,79,35,36,37,8,38,39,40,41,110,111,112,89,113,114,115,116,117,118,119,120,54,46,121,122,66,26,123,124,125,126,74,127,70,128,4,129,130,88,75,63,84,91,131]))),Publish=reactExports.lazy(()=>__vitePreload(()=>import("./publish-resource-mkxzOwvG.js"),__vite__mapDeps([132,133,105,54,29,77,78,79,16,80,81,47,48,49,50,82,83,57,84,85,86,45,87,64,88,75,60,51,52,5,6,53,18,24,10,99,100,134,25,108,135,33,61,114,136,38,8,70,130,72,137,98,104,106,23,107,55,109,128,91,90,117,118,138,139,26,56]))),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-BEnVwImy.js"),[])),EmailKyc=reactExports.lazy(()=>__vitePreload(()=>import("./email-xfatBnjM.js"),__vite__mapDeps([140,141,142,9,10,53,20,143,50,86,83,49,85]))),Unsubscribe=reactExports.lazy(()=>__vitePreload(()=>import("./unsubscribe-Bubftfpy.js"),[])),OpenWindow=reactExports.lazy(()=>__vitePreload(()=>import("./open-window-DC9u9zAW.js"),[]));function App(){var et;const a=useLocation(),{t:j}=useLocaleContext();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${a.pathname}${a.search}`)},[a]);const _e=jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HelmetExport,{children:jsxRuntimeExports.jsx("title",{children:j("pageTitle.dashboard")})}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:_e,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window`,element:jsxRuntimeExports.jsx(OpenWindow,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(LostPassport,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(IssuePassport,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/login`,element:jsxRuntimeExports.jsx(UserLogin,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/oauth/callback/:provider`,element:jsxRuntimeExports.jsx(UserLoginOAuthCallback,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/connect`,element:jsxRuntimeExports.jsx(Connect,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(ExchangePassport,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(Invite,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/transfer`,element:jsxRuntimeExports.jsx(Transfer,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/studio`,element:jsxRuntimeExports.jsx(StudioHome,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/home`,element:jsxRuntimeExports.jsx(StudioHome,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/preferences`,element:jsxRuntimeExports.jsx(StudioPreferences,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/branding`,element:jsxRuntimeExports.jsx(StudioBranding,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/localization`,element:jsxRuntimeExports.jsx(StudioLocalization,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/kyc/email`,element:jsxRuntimeExports.jsx(EmailKyc,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/start`,element:jsxRuntimeExports.jsx(AuthProvider,{children:jsxRuntimeExports.jsx(Start,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/setup/*`,element:jsxRuntimeExports.jsx(BlockletProvider,{mode:"setup",children:jsxRuntimeExports.jsx(Setup,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/user/unsubscribe`,element:jsxRuntimeExports.jsx(Unsubscribe,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/user/:tab`,element:jsxRuntimeExports.jsx(AuthProvider,{roles:["*"],children:jsxRuntimeExports.jsx(UserCenter,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/user`,element:jsxRuntimeExports.jsx(AuthProvider,{roles:["*"],children:jsxRuntimeExports.jsx(UserCenter,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/:tab/*`,element:jsxRuntimeExports.jsx(NodeProvider,{children:jsxRuntimeExports.jsx(NotificationProvider,{children:jsxRuntimeExports.jsx(AuthProvider,{roles:["owner","admin","member"],children:jsxRuntimeExports.jsx(BlockletProvider,{mode:"dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})})})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,element:jsxRuntimeExports.jsx(Navigate,{to:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/overview`,replace:!0})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/embed/resources/:componentDid/*`,element:jsxRuntimeExports.jsx(NodeProvider,{children:jsxRuntimeExports.jsx(AuthProvider,{roles:((et=window.blocklet)==null?void 0:et.tenantMode)===constant$2.BLOCKLET_TENANT_MODES.MULTIPLE?["owner","admin","guest"]:["owner","admin"],children:jsxRuntimeExports.jsx(BlockletProvider,{mode:"dashboard",children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"add",element:jsxRuntimeExports.jsx(AddResource,{})}),jsxRuntimeExports.jsx(Route,{path:"publish/*",element:jsxRuntimeExports.jsx(Publish,{})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})})})})]})})]})}function AppWrapper(){return jsxRuntimeExports.jsx(BrowserRouter,{basename:PREFIX,children:jsxRuntimeExports.jsx(Root$1,{children:jsxRuntimeExports.jsx(App,{})})})}const root=createRoot(document.getElementById("app"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=constant$3.WELLKNOWN_SERVICE_PATH_PREFIX;{async function a(){const{register:j}=await __vitePreload(async()=>{const{register:_e}=await import("./index-DTEEl-sV.js");return{register:_e}},[]);j(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(_e){console.error("Error during service worker registration:",_e)}})}a()}export{useMediaQuery as $,AvatarWithErrorBoundary as A,Box as B,Center as C,DID as D,default_1$3 as E,useSearchParams as F,constant$3 as G,HelmetExport as H,Container$1 as I,PoweredBy as J,DidConnect as K,Link as L,getWebWalletUrl$1 as M,useReactive as N,useRequest as O,PropTypes as P,createPassportSvg as Q,ResultWrapper as R,SessionContext as S,Typography as T,isNumber$2 as U,useLatest as V,defaultDayjs as W,requireCreateSvgIcon as X,interopRequireDefaultExports as Y,newStyled as Z,__read as _,Tooltip as a,_arrayMap as a$,LocaleContext as a0,ButtonComponent as a1,isFromWallet as a2,__vitePreload as a3,isFunction$8 as a4,api as a5,client$1 as a6,getManageSubscriptionURL as a7,util$2 as a8,Global as a9,LocaleProvider as aA,useLocation as aB,IconButton as aC,SessionUser as aD,generateUtilityClasses as aE,generateUtilityClass as aF,styled$1 as aG,capitalize$3 as aH,useDefaultProps as aI,_objectWithoutPropertiesLoose$1 as aJ,_extends$2 as aK,useSlotProps as aL,clsx$1 as aM,composeClasses as aN,ListContext as aO,useNodeContext$1 as aP,isDownloading as aQ,Menu as aR,Divider as aS,MenuItem as aT,getServerUrl as aU,sleep as aV,getLogoHash as aW,isInstalling as aX,useBlockletContext$1 as aY,getWalletType as aZ,_SetCache as a_,constant$2 as aa,isSuspended as ab,Img as ac,isSuspendedByExpired as ad,isSuspendedByTerminated as ae,formatToDatetime as af,calculateRetentionDate as ag,css as ah,Paper as ai,useTheme$1 as aj,useBlockletContext as ak,getFromQuery as al,saveServerUrl as am,hasRequiredEnvironments as an,PREFIX as ao,NodeProvider as ap,Routes as aq,Route as ar,Navigate as as,createSvgIcon$1 as at,Dialog as au,formatDateTime as av,getExplorerLink as aw,patchJsxToLocale as ax,ve as ay,en$1 as az,Button$1 as b,getQuery as b$,_baseUnary as b0,_arrayIncludes as b1,_arrayIncludesWith as b2,_cacheHas as b3,_baseFlatten as b4,_baseUniq as b5,_baseRest as b6,getDefaultExportFromCjs$1 as b7,_arrayFilter as b8,last_1 as b9,lib as bA,AUTH_SERVICE_PREFIX$1 as bB,SessionContext$1 as bC,noop$7 as bD,colors$1 as bE,Icon as bF,data$5 as bG,isEmpty$1 as bH,translate as bI,LOGIN_PROVIDER_NAME as bJ,data$j as bK,RelativeTime as bL,PASSPORT_STATUS as bM,data$a as bN,data$r as bO,getWalletDid$1 as bP,useConfirm as bQ,OAUTH_PROVIDER as bR,LOGIN_PROVIDER$1 as bS,data$f as bT,data$e as bU,data$d as bV,pick$2 as bW,useAsyncEffect as bX,getConnectedAccounts$1 as bY,getSourceProvider$1 as bZ,LinearProgress as b_,isArrayLikeObject_1 as ba,hasOwn$8 as bb,Emotion$1 as bc,createEmotionProps as bd,getSubscriptionUrlV2 as be,Chip as bf,dayjs$1 as bg,formatPrettyMsLocale as bh,Popover as bi,formatToDate as bj,List as bk,BlockletAdminRoles as bl,Popper as bm,ClickAwayListener as bn,useNotificationContext as bo,useNodeContext as bp,ErrorBoundary as bq,isServerless as br,colors$2 as bs,styled as bt,mergeProps as bu,useSubscription as bv,getWsClient as bw,useParams as bx,isFunction$3 as by,__assign as bz,joinURL as c,useTheme$2 as c$,pWaitFor$1 as c0,cloneDeep$1 as c1,useUpdateEffect as c2,Dialog$1 as c3,axios$4 as c4,useUnmount as c5,util$4 as c6,lib$4 as c7,getDIDColor as c8,Card as c9,MenuList as cA,getColor as cB,getBackground as cC,commonjsRequire as cD,default_1$5 as cE,create$3 as cF,isObject$p as cG,StyledEngineProvider as cH,ThemeProvider$1 as cI,ThemeProvider$4 as cJ,getThemeProps$1 as cK,useEnhancedEffect$1 as cL,keyframes as cM,getUnit as cN,toUnitless as cO,alpha$1 as cP,ButtonBase as cQ,debounce$5 as cR,ownerWindow as cS,useRtl as cT,useEventCallback$1 as cU,ownerDocument as cV,rootShouldForwardProp as cW,isMuiElement as cX,isHostComponent as cY,DialogContext as cZ,getDialogTitleUtilityClass as c_,CardHeader as ca,CardContent as cb,CardActions as cc,o as cd,red as ce,darken_1 as cf,lighten_1 as cg,resolveComponentProps as ch,mergeSlotProps as ci,useForkRef as cj,appendOwnerState as ck,getPath$1 as cl,alpha_1 as cm,useIsFocusVisible as cn,commonjsGlobal as co,propTypesExports as cp,reactDomExports as cq,adapter as cr,get$6 as cs,Buffer$1$1 as ct,base64 as cu,BlockletSDK as cv,getAugmentedNamespace as cw,emotionReact_browser_esm as cx,emotionCache_browser_esm as cy,SvgIcon as cz,useSessionContext as d,emphasize$1 as d$,DialogContent as d0,DialogActions as d1,getListItemIconUtilityClass as d2,listItemTextClasses as d3,getListItemTextUtilityClass as d4,ButtonGroupContext as d5,ButtonGroupButtonContext as d6,createChainedFunction$1 as d7,useControlled as d8,useId as d9,ThemeProvider as dA,withErrorBoundary as dB,omit$1 as dC,upperFirst$2 as dD,RELAY_SOCKET_PREFIX$1 as dE,formatMuiErrorMessage$1 as dF,GlobalStyles$2 as dG,ThemeProvider$2 as dH,createSpacing as dI,createBreakpoints as dJ,createTheme$1 as dK,private_safeDarken_1 as dL,private_safeLighten_1 as dM,private_safeEmphasize_1 as dN,private_safeAlpha_1 as dO,private_safeColorChannel_1 as dP,defaultSxConfig as dQ,styleFunctionSx$1 as dR,getOverlayAlpha as dS,hslToRgb_1 as dT,THEME_ID as dU,createTypography as dV,createMuiTheme as dW,darken$1 as dX,decomposeColor$1 as dY,duration$2 as dZ,easing as d_,throttle$4 as da,__spreadArray as db,useSize as dc,default_1$7 as dd,NavLink as de,matchPath as df,Fade as dg,getTranslation as dh,SessionPermission as di,NAVIGATION_URL as dj,createTheme$3 as dk,styled$2 as dl,handleBreakpoints as dm,resolveBreakpointValues as dn,createUnarySpacing as dp,deepmerge$1 as dq,mergeBreakpointsInOrder as dr,extendSxProp as ds,useThemeProps as dt,getValue$4 as du,tslib_es6$1 as dv,Modal as dw,Slide as dx,loadIcon as dy,createTheme as dz,useNavigate as e,lib$1 as e$,getContrastRatio$1 as e0,getLuminance$1 as e1,hexToRgb$1 as e2,hslToRgb$1 as e3,lighten$1 as e4,createMixins as e5,recomposeColor$1 as e6,responsiveFontSizes as e7,rgbToHex$1 as e8,getPaperUtilityClass as e9,_baseFindIndex as eA,toInteger_1 as eB,sortBy$1 as eC,global$2 as eD,hoistStatics as eE,GlobalStyles as eF,slotShouldForwardProp as eG,createAxios$2 as eH,flat as eI,defaultTheme$2 as eJ,objectAssign$1 as eK,React$2 as eL,_inheritsLoose$2 as eM,ReactDOM as eN,__awaiter as eO,__generator as eP,getTargetElement as eQ,useEventListener as eR,Buffer$3 as eS,browser$1 as eT,get_1 as eU,uniq_1 as eV,pLimit_1 as eW,require$$6 as eX,require$$0$3 as eY,process$1$1 as eZ,lib$5 as e_,paperClasses as ea,getIconButtonUtilityClass as eb,iconButtonClasses as ec,getTypographyUtilityClass as ed,typographyClasses as ee,chipClasses as ef,getChipUtilityClass as eg,buttonClasses as eh,getButtonUtilityClass as ei,Grow as ej,PopoverPaper as ek,PopoverRoot as el,getOffsetLeft as em,getOffsetTop as en,getPopoverUtilityClass as eo,popoverClasses as ep,getMenuItemUtilityClass as eq,menuItemClasses as er,getTooltipUtilityClass as es,tooltipClasses as et,emotionSerialize_esm as eu,emotionUtils_browser_esm as ev,Close as ew,_baseIteratee as ex,isArrayLike_1 as ey,keys_1 as ez,useBrowser as f,sortDomains as f$,urlPathFriendly$1 as f0,cloneDeep_1 as f1,getWebWalletUrl as f2,extractStatusUrlFromNextWorkflow as f3,hasRequiredSteps$1 as f4,getStoreList as f5,_baseOrderBy as f6,isArray_1 as f7,merge$2 as f8,omitBy$1 as f9,isString_1 as fA,isPlainObject_1 as fB,requireObjectWithoutPropertiesLoose as fC,setRef as fD,_assertThisInitialized$1 as fE,ClickToCopy as fF,emphasize_1 as fG,Collapse as fH,getCSRFToken as fI,axios$1 as fJ,isExtracting as fK,APP_PREFIX as fL,_baseIndexOf as fM,_baseToString as fN,_baseTrim as fO,_castSlice as fP,_charsEndIndex as fQ,_stringToArray as fR,toString_1 as fS,hasRequiredSteps as fT,urlEvaluation as fU,isDidDomainOrIpEchoDomain as fV,shouldCheckDomainStatus as fW,validateDomain as fX,axios_1 as fY,CopyButton as fZ,checkIsWildcardDomain as f_,parseURL as fa,parseQuery as fb,parseFilename as fc,stringifyParsedURL as fd,useDebounceFn as fe,Et as ff,semver$1 as fg,formatRegistryLogoPath as fh,getBlockletLogoUrl as fi,formatMountPoint as fj,isNil$1 as fk,flatten$3 as fl,_default as fm,getBlockletMetaUrl as fn,isNewStoreUrl as fo,nested as fp,Check$1 as fq,createPassportSvg$2 as fr,normalizePathPrefix_1 as fs,engine as ft,camelCase$1 as fu,Confirm as fv,getPathPrefix as fw,identity_1 as fx,_baseForOwn as fy,_baseMap as fz,getVisitorId$2 as g,columnGap as g$,getSystemDomains as g0,resolveProps as g1,Cookie as g2,getAccessUrl as g3,useUpdate as g4,tmp as g5,util$8 as g6,shams$1 as g7,callBound$3 as g8,objectKeys$3 as g9,useTimeout as gA,teardown as gB,DefaultPropsProvider as gC,useDefaultProps$1 as gD,createContainer as gE,useTheme$3 as gF,GlobalStyles$1 as gG,RtlProvider as gH,backgroundColor as gI,bgcolor as gJ,blend$1 as gK,border as gL,borderBottom as gM,borderBottomColor as gN,borderColor as gO,borderLeft as gP,borderLeftColor as gQ,borderRadius as gR,borderRight as gS,borderRightColor as gT,borderTop as gU,borderTopColor as gV,borderTransform as gW,boxSizing as gX,breakpoints as gY,color$1 as gZ,colorChannel$1 as g_,hasPropertyDescriptors_1 as ga,defineDataProperty as gb,callBindExports as gc,safeBufferExports as gd,requireBrowser$9 as ge,requireElliptic as gf,requireCryptoBrowserify as gg,ripemd160 as gh,getInviteLink as gi,getIssuePassportLink as gj,getTextColor_1 as gk,isProtectedRole as gl,ms$1 as gm,getChainClient as gn,compose as go,style$1 as gp,borders as gq,grid as gr,palette as gs,sizing as gt,spacing as gu,globalStateClasses as gv,isGlobalState as gw,createBox as gx,ClassNameGenerator as gy,Timeout as gz,useSecurity as h,data$b as h$,createStyled$2 as h0,createUnaryUnit as h1,gap as h2,getStyleFromPropValue as h3,getStyleValue as h4,gridArea as h5,gridAutoColumns as h6,gridAutoFlow as h7,gridAutoRows as h8,gridColumn as h9,sizingTransform as hA,systemDefaultTheme$1 as hB,unstable_createStyleFunctionSx as hC,useTheme$4 as hD,width as hE,TransitionGroup as hF,ENTERED as hG,ENTERING as hH,EXITING as hI,TransitionGroupContext as hJ,Transition$1 as hK,config$1 as hL,isRunning as hM,getTransferAppLink as hN,_copyArray as hO,DidAddressWrapper as hP,copy$1 as hQ,withTrailingSlash as hR,clsx$2 as hS,require$$1$4 as hT,require$$1$2 as hU,require$$4$3 as hV,colorManipulator as hW,require$$6$3 as hX,require$$6$2 as hY,createStyled$1 as hZ,require$$5 as h_,gridRow as ha,gridTemplateAreas as hb,gridTemplateColumns as hc,gridTemplateRows as hd,height as he,margin as hf,marginKeys as hg,maxHeight as hh,maxWidth as hi,minHeight as hj,minWidth as hk,outline as hl,outlineColor as hm,padding as hn,paddingKeys as ho,paletteTransform as hp,private_safeAlpha$1 as hq,private_safeColorChannel$1 as hr,private_safeDarken$1 as hs,private_safeEmphasize$1 as ht,private_safeLighten$1 as hu,rowGap as hv,shape as hw,shouldForwardProp$1 as hx,sizeHeight as hy,sizeWidth as hz,isUndefined$2 as i,clamp$1 as i0,extractEventHandlers as i1,forceReflow as i2,debounce_1 as i3,noop_1 as i4,formatTime as i5,hoistNonReactStatics_cjs as i6,isEqual$1 as i7,isEqual_1$1 as i8,pick_1$1 as i9,assertThisInitialized as iA,reactIsExports as iB,isValidClusterSize as iC,getBlockletUrlParams as iD,trimEnd$1 as iE,normalizePathPrefix$1 as iF,_isIndex as iG,dialogClasses as iH,FocusTrap as iI,localizedFormatPlugin as iJ,formatLocale as iK,_baseEach as iL,_baseAssignValue as iM,pTimeout$2 as iN,TimeoutError_1 as iO,debounce$3 as iP,uniq$1 as iQ,Backdrop as iR,createRoot as iS,isNil_1 as ia,omit_1 as ib,isAbsoluteUrl$1 as ic,withoutTrailingSlash as id,isString$2 as ie,isAbsoluteUrl$2 as ig,nanoid as ih,isEqual$3 as ii,useEffectWithTarget$1 as ij,__values as ik,isString$3 as il,_setPrototypeOf as im,filesize as io,Icon$1 as ip,CacheProvider as iq,createCache as ir,StyleSheet as is,ThemeContext$1 as it,React$3 as iu,isPlainObject$5 as iv,require$$2$1 as iw,require$$6$4 as ix,createPopper as iy,getScrollbarSize as iz,jsxRuntimeExports as j,useCreation as k,useMemoizedFn as l,useMount as m,CircularProgress as n,API_DID_PREFIX as o,AUTH_SERVICE_PREFIX as p,getMaster as q,reactExports as r,getFederatedEnabled as s,Toast$1 as t,useLocaleContext as u,setSessionToken as v,withQuery as w,setRefreshToken as x,setVisitorId as y,updateConnectedInfo as z};
1352
+ In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:[{name:"name",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"description",description:null,args:[],type:{kind:"SCALAR",name:"String",ofType:null},isDeprecated:!1,deprecationReason:null},{name:"isRepeatable",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Boolean",ofType:null}},isDeprecated:!1,deprecationReason:null},{name:"locations",description:null,args:[],type:{kind:"NON_NULL",name:null,ofType:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"ENUM",name:"__DirectiveLocation",ofType:null}}}},isDeprecated:!1,deprecationReason:null},{name:"args",description:null,args:[{name:"includeDeprecated",description:null,type:{kind:"SCALAR",name:"Boolean",ofType:null},defaultValue:"false"}],type:{kind:"NON_NULL",name:null,ofType:{kind:"LIST",name:null,ofType:{kind:"NON_NULL",name:null,ofType:{kind:"OBJECT",name:"__InputValue",ofType:null}}}},isDeprecated:!1,deprecationReason:null}],inputFields:null,interfaces:[],enumValues:null,possibleTypes:null},{kind:"ENUM",name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",fields:null,inputFields:null,interfaces:null,enumValues:[{name:"QUERY",description:"Location adjacent to a query operation.",isDeprecated:!1,deprecationReason:null},{name:"MUTATION",description:"Location adjacent to a mutation operation.",isDeprecated:!1,deprecationReason:null},{name:"SUBSCRIPTION",description:"Location adjacent to a subscription operation.",isDeprecated:!1,deprecationReason:null},{name:"FIELD",description:"Location adjacent to a field.",isDeprecated:!1,deprecationReason:null},{name:"FRAGMENT_DEFINITION",description:"Location adjacent to a fragment definition.",isDeprecated:!1,deprecationReason:null},{name:"FRAGMENT_SPREAD",description:"Location adjacent to a fragment spread.",isDeprecated:!1,deprecationReason:null},{name:"INLINE_FRAGMENT",description:"Location adjacent to an inline fragment.",isDeprecated:!1,deprecationReason:null},{name:"VARIABLE_DEFINITION",description:"Location adjacent to a variable definition.",isDeprecated:!1,deprecationReason:null},{name:"SCHEMA",description:"Location adjacent to a schema definition.",isDeprecated:!1,deprecationReason:null},{name:"SCALAR",description:"Location adjacent to a scalar definition.",isDeprecated:!1,deprecationReason:null},{name:"OBJECT",description:"Location adjacent to an object type definition.",isDeprecated:!1,deprecationReason:null},{name:"FIELD_DEFINITION",description:"Location adjacent to a field definition.",isDeprecated:!1,deprecationReason:null},{name:"ARGUMENT_DEFINITION",description:"Location adjacent to an argument definition.",isDeprecated:!1,deprecationReason:null},{name:"INTERFACE",description:"Location adjacent to an interface definition.",isDeprecated:!1,deprecationReason:null},{name:"UNION",description:"Location adjacent to a union definition.",isDeprecated:!1,deprecationReason:null},{name:"ENUM",description:"Location adjacent to an enum definition.",isDeprecated:!1,deprecationReason:null},{name:"ENUM_VALUE",description:"Location adjacent to an enum value definition.",isDeprecated:!1,deprecationReason:null},{name:"INPUT_OBJECT",description:"Location adjacent to an input object type definition.",isDeprecated:!1,deprecationReason:null},{name:"INPUT_FIELD_DEFINITION",description:"Location adjacent to an input object field definition.",isDeprecated:!1,deprecationReason:null}],possibleTypes:null}],directives=[{name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],args:[{name:"if",description:"Included when true.",type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Boolean",ofType:null}},defaultValue:null}]},{name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],args:[{name:"if",description:"Skipped when true.",type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"Boolean",ofType:null}},defaultValue:null}]},{name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:["FIELD_DEFINITION","ARGUMENT_DEFINITION","INPUT_FIELD_DEFINITION","ENUM_VALUE"],args:[{name:"reason",description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:'"No longer supported"'}]},{name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:["SCALAR"],args:[{name:"url",description:"The URL that specifies the behavior of this scalar.",type:{kind:"NON_NULL",name:null,ofType:{kind:"SCALAR",name:"String",ofType:null}},defaultValue:null}]}],require$$4={queryType,mutationType,subscriptionType,types,directives},BaseClient=dist,schema=require$$4;let ABTNodeClient$1=class extends BaseClient{constructor(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"http://localhost:4000/api",_e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const et={dataSource:"forge",httpEndpoint:j,socketEndpoint:()=>this._getSocketEndpoint(j),enableQuery:!0,enableSubscription:!0,enableMutation:!0,maxQueryDepth:6};super(et),this._endpoint=j,this._authToken=null,this._userAgent=_e}setAuthToken(j){this._authToken=j}_getSocketEndpoint(j){let _e=j.replace(/https?:\/\//,"ws://");return j.indexOf("https://")===0&&(_e=_e.replace("ws://","wss://")),"".concat(_e,"/socket")}_getSchema(){return schema}_getIgnoreFields(j){return[]}_getAuthHeaders(){const j={},_e=this._authToken;if(_e){const et=typeof _e=="function"?_e():_e;j.Authorization="Bearer ".concat(encodeURIComponent(et))}if(typeof window<"u"&&typeof window.location<"u"){const{hostname:et,port:nt,protocol:tt}=window.location;j["x-real-hostname"]=et,j["x-real-port"]=nt,j["x-real-protocol"]=tt.endsWith(":")?tt.substring(0,tt.length-1):tt}return this._userAgent&&(j["User-Agent"]=this._userAgent),j}};var base=ABTNodeClient$1;const EventEmitter=eventemitter3Exports,ABTNodeClient=base;class BrowserABTNodeClient extends ABTNodeClient{_getSocketOptions(){return{}}_getEventImplementation(){return EventEmitter}}var browser=BrowserABTNodeClient;const NodeClient=getDefaultExportFromCjs$1(browser),prefix$1=(window.env?window.env.apiPrefix:"/")||"/",client$1=new NodeClient(()=>`${prefix$1}/api/gql?locale=${getLocale()}`.replace(/\/+/g,"/").trim());function useSubscription$1({wsClient:a,event:j,cb:_e=()=>{},deps:et=[]}){reactExports.useEffect(()=>{const nt=a&&(!et.length||et.every(Boolean));return nt&&a.on(j,_e),()=>{nt&&a.off(j,_e)}},et)}let client;function create(){const a=(window.env&&window.env.apiPrefix?window.env.apiPrefix:"/").replace(/\/$/,""),j=`//${window.location.host}${a}/admin`;return new browser$3.WsClient(j,{heartbeatIntervalMs:100*1e3,params:()=>({token:Cookie.get("login_token")})})}function getWsClient(){return client||(client=create()),client}const useSubscription=(a,j=()=>{},_e=[])=>{a=`${window.blocklet.did}/${a}`;const{session:et}=useSessionContext();!client&&et.user&&(client=getWsClient(),client.connect()),useSubscription$1({wsClient:client,event:a,cb:j,deps:_e})};let cache=null;const fetch$1=async()=>{try{return(await api.get(`/dns-resolve?hostname=${window.location.hostname}`)).data.address}catch{return null}},getIp=()=>(cache||(cache=fetch$1()),cache),{Provider:Provider$2,Consumer:Consumer$2}=BlockletContext,parseEndpoint=(a,j)=>{const _e=/^{env\.(.+)}$/.exec(a);if(_e&&_e[1]){const et=((j==null?void 0:j.configs)||[]).find(nt=>nt.key===_e[1]);return!et&&!et.value?"":et.value}return a},getChainConfig=(()=>{const a={endpoint:"",data:{}};return async j=>{if(a.endpoint===j)return a.data;const et=await getChainClient(j).getConfig();return a.endpoint=j,a.data=et,et}})(),{did,appId}=window.env;function BlockletProvider({children:a,mode:j}){var pt;const[_e,et]=reactExports.useState(null),[nt,tt]=reactExports.useState(!1),[ot,ct]=reactExports.useState({}),[ft,ht]=reactExports.useState(),[dt,yt]=reactExports.useState(),[Tt,St]=reactExports.useState(),At=j==="setup",{loading:Rt,loadingDiskInfo:It,loadingRuntimeInfo:Ct,error:kt,blocklet:Pt,recommendedDomain:Bt,runtimeHistory:Kt,actions:{refreshBlocklet:jt,refreshDomainStatus:zt,setBlocklet:Gt}}=useBlocklet({did,client:client$1,useSubscription,getIP:getIp,useLocaleContext,getOptionalComponents:!0}),tn=reactExports.useRef(void 0);tn.current=(pt=Pt==null?void 0:Pt.meta)==null?void 0:pt.did;const hn=async()=>{try{tt(!0),et(null);const{data:mt}=await api.get("/blocklet/meta");ct(mt),tt(!1)}catch(mt){tt(!1),et(mt),Toast$1.error(mt.message)}},wt=async({showError:mt=!0}={})=>{var Ht,Ot;if(!((Ot=(Ht=ot==null?void 0:ot.requirements)==null?void 0:Ht.fuels)!=null&&Ot.length))return null;const{endpoint:$t,value:xt,address:vt}=ot.requirements.fuels[0],it=parseEndpoint($t,Pt),bt=xt;let Mt=xt;const Lt={endpoint:it,symbol:"",need:bt,current:0,owe:Number(bt)>0};try{const Jt=getChainClient(it),{config:Ft}=await getChainConfig(it),Zt=JSON.parse(Ft).token;let nn=vt;nn||(nn=Zt.address),yt({address:Zt.address,symbol:Zt.symbol,decimal:Zt.decimal});const{getAccountState:{state:cn},getTokenState:{state:qt}}=await Jt.doBatchQuery({getAccountState:{address:appId},getTokenState:{address:nn}});qt&&(Lt.symbol=qt.symbol);const Dt=((cn==null?void 0:cn.tokens)||[]).find(Vt=>Vt.address===nn);if(Dt){const Vt=lib$4.fromTokenToUnit(bt,Dt.decimal||18);Lt.current=lib$4.fromUnitToToken(Dt.value,Dt.decimal||18),Lt.owe=Vt.gt(new lib$4.BN(Dt.value)),Mt=Math.max(0,lib$4.fromUnitToToken(Vt.sub(new lib$4.BN(Dt.value)),Dt.decimal||18))}}catch(Jt){mt&&Toast$1.error(Jt.message)}return ht({...Lt,deficiency:Mt}),Lt},rt=async({configs:mt,childDid:$t})=>(await client$1.configBlocklet({input:{did:[did].concat($t).filter(Boolean),configs:mt}}),jt()),st=async mt=>{const{blocklet:$t}=await client$1.configNavigations({input:{did,navigations:mt}});Gt($t)};reactExports.useEffect(()=>{At&&hn(),jt({showError:!1})},[]),reactExports.useEffect(()=>{var mt;(mt=Pt==null?void 0:Pt.controller)!=null&&mt.launcherSessionId&&client$1.getLauncherSession({input:{launcherSessionId:Pt.controller.launcherSessionId,launcherUrl:Pt.controller.launcherUrl}}).then($t=>{St($t.launcherSession)}).catch($t=>{console.error("get launcher session error",$t)})},[Pt==null?void 0:Pt.appPid]);const ut={loading:nt||Rt,loadingDiskInfo:It,loadingRuntimeInfo:Ct,error:_e||kt,blocklet:Pt,launcherSession:Tt,did,recommendedDomain:Bt,runtimeHistory:Kt,appIdList:Pt?util$2.getBlockletAppIdList(Pt):[],env:window.blocklet||{},meta:ot,gas:ft,tokenInfo:dt,client:client$1,mode:j,actions:{refreshBlocklet:jt,refreshDomainStatus:zt,setBlocklet:Gt,refreshMeta:hn,refreshFuel:wt,configBlocklet:rt,configNavigations:st}};return jsxRuntimeExports.jsx(Provider$2,{value:ut,children:a})}BlockletProvider.propTypes={children:PropTypes.any,mode:PropTypes.oneOf(["dashboard","setup"]).isRequired};BlockletProvider.defaultProps={children:null};function useBlockletContext(){return reactExports.useContext(BlockletContext)}const NodeContext=reactExports.createContext({});function useNodeContext$1(){const{node:a}=reactExports.useContext(NodeContext);return{...a,inService:a.type==="service",inDaemon:a.type==="daemon"}}const{Provider:Provider$1,Consumer:Consumer$1}=NodeContext,imgPrefix=`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images`;function NodeProvider({children:a}){const{serverDid:j,serverVersion:_e,mode:et,nftDomainUrl:nt,ownerNft:tt,launcher:ot}=window.env,ct={api:client$1,restApi:api,prefix:constant$3.WELLKNOWN_SERVICE_PATH_PREFIX,imgPrefix,getSessionInHeader:()=>({}),ws:{getWsClient,create,useSubscription},type:"service",info:{did:j,version:_e,mode:et,nftDomainUrl:nt,ownerNft:tt,launcher:ot}};return jsxRuntimeExports.jsx(Provider$1,{value:{node:ct},children:a})}function useNodeContext(){const{node:a}=reactExports.useContext(NodeContext);return a}const NotificationContext=reactExports.createContext({}),{Provider,Consumer}=NotificationContext;function NotificationProvider({children:a}){const{did:j}=window.env,[_e,et]=reactExports.useState([]),[nt,tt]=reactExports.useState({total:0,pageSize:10,pageCount:0,page:1}),[ot,ct]=reactExports.useState(!1),ft=async({page:dt=1}={})=>{if(!ot){ct(!0);try{const yt=await client$1.getBlockletNotifications({input:{paging:{page:dt},teamDid:j}});et(yt.list),tt(yt.paging),ct(!1)}catch(yt){Toast$1.error(yt.message),ct(!1)}}};reactExports.useEffect(()=>{ft()},[]),useSubscription(constant$3.EVENTS.NOTIFICATION_BLOCKLET_CREATE,dt=>{et(yt=>[dt,...yt||[]])});const ht={loading:ot,refresh:ft,data:_e||[],paging:nt,api:client$1};return jsxRuntimeExports.jsx(Provider,{value:{notifications:ht},children:a})}function useNotificationContext(){const{notifications:a}=reactExports.useContext(NotificationContext);return a}const UserLogin=reactExports.lazy(()=>__vitePreload(()=>import("./login-DR3kcJtW.js"),__vite__mapDeps([0,1,2]))),UserLoginOAuthCallback=reactExports.lazy(()=>__vitePreload(()=>import("./login-oauth-callback-0EjAb9S0.js"),__vite__mapDeps([3,4,5,6]))),Connect=reactExports.lazy(()=>__vitePreload(()=>import("./connect-Cdtb7SHw.js"),__vite__mapDeps([7,8,1,9,10]))),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./exchange-passport-PFJEY5oF.js"),__vite__mapDeps([11,9,10,12]))),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./issue-passport-Bw_MHd9T.js"),__vite__mapDeps([13,14,15,16,17,1,18,19,20,12,9,10]))),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./lost-passport-CynXuP5y.js"),__vite__mapDeps([21,20,22,23,15,16,24,10,12,1,25,6,26]))),Start=reactExports.lazy(()=>__vitePreload(()=>import("./start-xeWBZiEu.js"),__vite__mapDeps([27,28,29,24,10,30,31,32,33]))),Setup=reactExports.lazy(()=>__vitePreload(()=>import("./setup-DdL2aJKn.js"),__vite__mapDeps([34,35,36,37,8,38,39,40,41,31,32,33,30]))),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./invite-B3LCoC_0.js"),__vite__mapDeps([42,14,15,16,17,1,18,19,20,12,9,10]))),Transfer=reactExports.lazy(()=>__vitePreload(()=>import("./transfer-DnYlCSpz.js"),__vite__mapDeps([43,31,32,33,9,10,20]))),Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./dashboard-DN-9-3gU.js").then(a=>a.k),__vite__mapDeps([44,45,46,47,48,49,50,51,52,5,6,53,54,28,55,56,57,25,18,58,59,60,10,61,4,62,63,64,41,65,66,32,67]))),UserCenter=reactExports.lazy(()=>__vitePreload(()=>import("./user-center-B0SlHHaj.js"),__vite__mapDeps([68,69,4,62,63,64,41,65,47,48,49,50,66,32,70,25,6,71,15,16,72,73,8,74,10,45,75,76,77,78,79,80,81,82,83,57,84,85,54,86,87,88,89,90,91,5,92]))),StudioHome=reactExports.lazy(()=>__vitePreload(()=>import("./home-DEHpnOzD.js"),__vite__mapDeps([93,94,62,63,64,41,4,50]))),StudioPreferences=reactExports.lazy(()=>__vitePreload(()=>import("./preferences-a3_XT82h.js"),__vite__mapDeps([95,96,94,62,63,64,41,4]))),StudioBranding=reactExports.lazy(()=>__vitePreload(()=>import("./branding-Cl9GX76R.js"),__vite__mapDeps([97,98,99,81,79,100,94,62,63,64,41,4,50,25,6]))),StudioLocalization=reactExports.lazy(()=>__vitePreload(()=>import("./localization-C4vP52vp.js"),__vite__mapDeps([101,94,62,63,64,41,4]))),AddResource=reactExports.lazy(()=>__vitePreload(()=>import("./add-resource-BfHXR_Y_.js"),__vite__mapDeps([102,103,104,105,47,48,49,50,52,86,83,85,5,6,53,106,23,98,107,108,51,18,24,10,25,55,109,79,35,36,37,8,38,39,40,41,110,111,112,89,113,114,115,116,117,118,119,120,54,46,121,122,66,26,123,124,125,126,74,127,70,128,4,129,130,88,75,63,84,91,131]))),Publish=reactExports.lazy(()=>__vitePreload(()=>import("./publish-resource-BwfmZpal.js"),__vite__mapDeps([132,133,105,54,29,77,78,79,16,80,81,47,48,49,50,82,83,57,84,85,86,45,87,64,88,75,60,51,52,5,6,53,18,24,10,99,100,134,25,108,135,33,61,114,136,38,8,70,130,72,137,98,104,106,23,107,55,109,128,91,90,117,118,138,139,26,56]))),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CmjfXrfq.js"),[])),EmailKyc=reactExports.lazy(()=>__vitePreload(()=>import("./email-DqijDSOa.js"),__vite__mapDeps([140,141,142,9,10,53,20,143,50,86,83,49,85]))),Unsubscribe=reactExports.lazy(()=>__vitePreload(()=>import("./unsubscribe-Bx_0kT2c.js"),[])),OpenWindow=reactExports.lazy(()=>__vitePreload(()=>import("./open-window-BKaZeE7I.js"),[]));function App(){var et;const a=useLocation(),{t:j}=useLocaleContext();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${a.pathname}${a.search}`)},[a]);const _e=jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HelmetExport,{children:jsxRuntimeExports.jsx("title",{children:j("pageTitle.dashboard")})}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:_e,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window`,element:jsxRuntimeExports.jsx(OpenWindow,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(LostPassport,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(IssuePassport,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/login`,element:jsxRuntimeExports.jsx(UserLogin,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/oauth/callback/:provider`,element:jsxRuntimeExports.jsx(UserLoginOAuthCallback,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/connect`,element:jsxRuntimeExports.jsx(Connect,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(ExchangePassport,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(Invite,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/transfer`,element:jsxRuntimeExports.jsx(Transfer,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/studio`,element:jsxRuntimeExports.jsx(StudioHome,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/home`,element:jsxRuntimeExports.jsx(StudioHome,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/preferences`,element:jsxRuntimeExports.jsx(StudioPreferences,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/branding`,element:jsxRuntimeExports.jsx(StudioBranding,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/localization`,element:jsxRuntimeExports.jsx(StudioLocalization,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/kyc/email`,element:jsxRuntimeExports.jsx(EmailKyc,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/start`,element:jsxRuntimeExports.jsx(AuthProvider,{children:jsxRuntimeExports.jsx(Start,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/setup/*`,element:jsxRuntimeExports.jsx(BlockletProvider,{mode:"setup",children:jsxRuntimeExports.jsx(Setup,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/user/unsubscribe`,element:jsxRuntimeExports.jsx(Unsubscribe,{})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/user/:tab`,element:jsxRuntimeExports.jsx(AuthProvider,{roles:["*"],children:jsxRuntimeExports.jsx(UserCenter,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/user`,element:jsxRuntimeExports.jsx(AuthProvider,{roles:["*"],children:jsxRuntimeExports.jsx(UserCenter,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/:tab/*`,element:jsxRuntimeExports.jsx(NodeProvider,{children:jsxRuntimeExports.jsx(NotificationProvider,{children:jsxRuntimeExports.jsx(AuthProvider,{roles:["owner","admin","member"],children:jsxRuntimeExports.jsx(BlockletProvider,{mode:"dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})})})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,element:jsxRuntimeExports.jsx(Navigate,{to:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/overview`,replace:!0})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/embed/resources/:componentDid/*`,element:jsxRuntimeExports.jsx(NodeProvider,{children:jsxRuntimeExports.jsx(AuthProvider,{roles:((et=window.blocklet)==null?void 0:et.tenantMode)===constant$2.BLOCKLET_TENANT_MODES.MULTIPLE?["owner","admin","guest"]:["owner","admin"],children:jsxRuntimeExports.jsx(BlockletProvider,{mode:"dashboard",children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"add",element:jsxRuntimeExports.jsx(AddResource,{})}),jsxRuntimeExports.jsx(Route,{path:"publish/*",element:jsxRuntimeExports.jsx(Publish,{})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})})})})]})})]})}function AppWrapper(){return jsxRuntimeExports.jsx(BrowserRouter,{basename:PREFIX,children:jsxRuntimeExports.jsx(Root$1,{children:jsxRuntimeExports.jsx(App,{})})})}const root=createRoot(document.getElementById("app"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=constant$3.WELLKNOWN_SERVICE_PATH_PREFIX;{async function a(){const{register:j}=await __vitePreload(async()=>{const{register:_e}=await import("./index-DTEEl-sV.js");return{register:_e}},[]);j(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(_e){console.error("Error during service worker registration:",_e)}})}a()}export{useMediaQuery as $,AvatarWithErrorBoundary as A,Box as B,Center as C,DID as D,default_1$4 as E,useSearchParams as F,constant$3 as G,HelmetExport as H,Container$1 as I,PoweredBy as J,DidConnect as K,Link as L,getWebWalletUrl$1 as M,useReactive as N,useRequest as O,PropTypes as P,createPassportSvg as Q,ResultWrapper as R,SessionContext as S,Typography as T,isNumber$2 as U,useLatest as V,defaultDayjs as W,requireCreateSvgIcon as X,interopRequireDefaultExports as Y,newStyled as Z,__read as _,Tooltip as a,_arrayMap as a$,LocaleContext as a0,ButtonComponent as a1,isFromWallet as a2,__vitePreload as a3,isFunction$8 as a4,api as a5,client$1 as a6,getManageSubscriptionURL as a7,util$2 as a8,Global as a9,LocaleProvider as aA,useLocation as aB,IconButton as aC,SessionUser as aD,generateUtilityClasses as aE,generateUtilityClass as aF,styled$1 as aG,capitalize$3 as aH,useDefaultProps as aI,_objectWithoutPropertiesLoose$1 as aJ,_extends$2 as aK,useSlotProps as aL,clsx$1 as aM,composeClasses as aN,ListContext as aO,useNodeContext$1 as aP,isDownloading as aQ,Menu as aR,Divider as aS,MenuItem as aT,getServerUrl as aU,sleep as aV,getLogoHash as aW,isInstalling as aX,useBlockletContext$1 as aY,getWalletType as aZ,_SetCache as a_,constant$2 as aa,isSuspended as ab,Img as ac,isSuspendedByExpired as ad,isSuspendedByTerminated as ae,formatToDatetime as af,calculateRetentionDate as ag,css as ah,Paper as ai,useTheme$1 as aj,useBlockletContext as ak,getFromQuery as al,saveServerUrl as am,hasRequiredEnvironments as an,PREFIX as ao,NodeProvider as ap,Routes as aq,Route as ar,Navigate as as,createSvgIcon$1 as at,Dialog as au,formatDateTime as av,getExplorerLink as aw,patchJsxToLocale as ax,ve as ay,en$1 as az,Button$1 as b,getQuery as b$,_baseUnary as b0,_arrayIncludes as b1,_arrayIncludesWith as b2,_cacheHas as b3,_baseFlatten as b4,_baseUniq as b5,_baseRest as b6,getDefaultExportFromCjs$1 as b7,_arrayFilter as b8,last_1 as b9,lib as bA,AUTH_SERVICE_PREFIX$1 as bB,SessionContext$1 as bC,noop$7 as bD,colors$1 as bE,Icon as bF,data$5 as bG,isEmpty$1 as bH,translate as bI,LOGIN_PROVIDER_NAME as bJ,data$j as bK,RelativeTime as bL,PASSPORT_STATUS as bM,data$a as bN,data$r as bO,getWalletDid$1 as bP,useConfirm as bQ,OAUTH_PROVIDER as bR,LOGIN_PROVIDER$1 as bS,data$f as bT,data$e as bU,data$d as bV,pick$2 as bW,useAsyncEffect as bX,getConnectedAccounts$1 as bY,getSourceProvider$1 as bZ,LinearProgress as b_,isArrayLikeObject_1 as ba,hasOwn$8 as bb,Emotion$1 as bc,createEmotionProps as bd,getSubscriptionUrlV2 as be,Chip as bf,dayjs$1 as bg,formatPrettyMsLocale as bh,Popover as bi,formatToDate as bj,List as bk,BlockletAdminRoles as bl,Popper as bm,ClickAwayListener as bn,useNotificationContext as bo,useNodeContext as bp,ErrorBoundary as bq,isServerless as br,colors$2 as bs,styled as bt,mergeProps as bu,useSubscription as bv,getWsClient as bw,useParams as bx,isFunction$3 as by,__assign as bz,joinURL as c,useTheme$2 as c$,pWaitFor$1 as c0,cloneDeep$1 as c1,useUpdateEffect as c2,Dialog$1 as c3,axios$4 as c4,useUnmount as c5,util$4 as c6,lib$4 as c7,getDIDColor as c8,Card as c9,MenuList as cA,getColor as cB,getBackground as cC,commonjsRequire as cD,default_1$5 as cE,create$3 as cF,isObject$p as cG,StyledEngineProvider as cH,ThemeProvider$1 as cI,ThemeProvider$4 as cJ,getThemeProps$1 as cK,useEnhancedEffect$1 as cL,keyframes as cM,getUnit as cN,toUnitless as cO,alpha$1 as cP,ButtonBase as cQ,debounce$5 as cR,ownerWindow as cS,useRtl as cT,useEventCallback$1 as cU,ownerDocument as cV,rootShouldForwardProp as cW,isMuiElement as cX,isHostComponent as cY,DialogContext as cZ,getDialogTitleUtilityClass as c_,CardHeader as ca,CardContent as cb,CardActions as cc,o as cd,red as ce,darken_1 as cf,lighten_1 as cg,resolveComponentProps as ch,mergeSlotProps as ci,useForkRef as cj,appendOwnerState as ck,getPath$1 as cl,alpha_1 as cm,useIsFocusVisible as cn,commonjsGlobal as co,propTypesExports as cp,reactDomExports as cq,adapter as cr,get$6 as cs,Buffer$1$1 as ct,base64 as cu,BlockletSDK as cv,getAugmentedNamespace as cw,emotionReact_browser_esm as cx,emotionCache_browser_esm as cy,SvgIcon as cz,useSessionContext as d,emphasize$1 as d$,DialogContent as d0,DialogActions as d1,getListItemIconUtilityClass as d2,listItemTextClasses as d3,getListItemTextUtilityClass as d4,ButtonGroupContext as d5,ButtonGroupButtonContext as d6,createChainedFunction$1 as d7,useControlled as d8,useId as d9,ThemeProvider as dA,withErrorBoundary as dB,omit$1 as dC,upperFirst$2 as dD,RELAY_SOCKET_PREFIX$1 as dE,formatMuiErrorMessage$1 as dF,GlobalStyles$2 as dG,ThemeProvider$2 as dH,createSpacing as dI,createBreakpoints as dJ,createTheme$1 as dK,private_safeDarken_1 as dL,private_safeLighten_1 as dM,private_safeEmphasize_1 as dN,private_safeAlpha_1 as dO,private_safeColorChannel_1 as dP,defaultSxConfig as dQ,styleFunctionSx$1 as dR,getOverlayAlpha as dS,hslToRgb_1 as dT,THEME_ID as dU,createTypography as dV,createMuiTheme as dW,darken$1 as dX,decomposeColor$1 as dY,duration$2 as dZ,easing as d_,throttle$4 as da,__spreadArray as db,useSize as dc,default_1$7 as dd,NavLink as de,matchPath as df,Fade as dg,getTranslation as dh,SessionPermission as di,NAVIGATION_URL as dj,createTheme$3 as dk,styled$2 as dl,handleBreakpoints as dm,resolveBreakpointValues as dn,createUnarySpacing as dp,deepmerge$1 as dq,mergeBreakpointsInOrder as dr,extendSxProp as ds,useThemeProps as dt,getValue$4 as du,tslib_es6$1 as dv,Modal as dw,Slide as dx,loadIcon as dy,createTheme as dz,useNavigate as e,lib$1 as e$,getContrastRatio$1 as e0,getLuminance$1 as e1,hexToRgb$1 as e2,hslToRgb$1 as e3,lighten$1 as e4,createMixins as e5,recomposeColor$1 as e6,responsiveFontSizes as e7,rgbToHex$1 as e8,getPaperUtilityClass as e9,_baseFindIndex as eA,toInteger_1 as eB,sortBy$1 as eC,global$2 as eD,hoistStatics as eE,GlobalStyles as eF,slotShouldForwardProp as eG,createAxios$2 as eH,flat as eI,defaultTheme$2 as eJ,objectAssign$1 as eK,React$2 as eL,_inheritsLoose$2 as eM,ReactDOM as eN,__awaiter as eO,__generator as eP,getTargetElement as eQ,useEventListener as eR,Buffer$3 as eS,browser$1 as eT,get_1 as eU,uniq_1 as eV,pLimit_1 as eW,require$$6 as eX,require$$0$3 as eY,process$1$1 as eZ,lib$5 as e_,paperClasses as ea,getIconButtonUtilityClass as eb,iconButtonClasses as ec,getTypographyUtilityClass as ed,typographyClasses as ee,chipClasses as ef,getChipUtilityClass as eg,buttonClasses as eh,getButtonUtilityClass as ei,Grow as ej,PopoverPaper as ek,PopoverRoot as el,getOffsetLeft as em,getOffsetTop as en,getPopoverUtilityClass as eo,popoverClasses as ep,getMenuItemUtilityClass as eq,menuItemClasses as er,getTooltipUtilityClass as es,tooltipClasses as et,emotionSerialize_esm as eu,emotionUtils_browser_esm as ev,Close as ew,_baseIteratee as ex,isArrayLike_1 as ey,keys_1 as ez,useBrowser as f,sortDomains as f$,urlPathFriendly$1 as f0,cloneDeep_1 as f1,getWebWalletUrl as f2,extractStatusUrlFromNextWorkflow as f3,hasRequiredSteps$1 as f4,getStoreList as f5,_baseOrderBy as f6,isArray_1 as f7,merge$2 as f8,omitBy$1 as f9,isString_1 as fA,isPlainObject_1 as fB,requireObjectWithoutPropertiesLoose as fC,setRef as fD,_assertThisInitialized$1 as fE,ClickToCopy as fF,emphasize_1 as fG,Collapse as fH,getCSRFToken as fI,axios$1 as fJ,isExtracting as fK,APP_PREFIX as fL,_baseIndexOf as fM,_baseToString as fN,_baseTrim as fO,_castSlice as fP,_charsEndIndex as fQ,_stringToArray as fR,toString_1 as fS,hasRequiredSteps as fT,urlEvaluation as fU,isDidDomainOrIpEchoDomain as fV,shouldCheckDomainStatus as fW,validateDomain as fX,axios_1 as fY,CopyButton as fZ,checkIsWildcardDomain as f_,parseURL as fa,parseQuery as fb,parseFilename as fc,stringifyParsedURL as fd,useDebounceFn as fe,Et as ff,semver$1 as fg,formatRegistryLogoPath as fh,getBlockletLogoUrl as fi,formatMountPoint as fj,isNil$1 as fk,flatten$3 as fl,_default as fm,getBlockletMetaUrl as fn,isNewStoreUrl as fo,nested as fp,Check$1 as fq,createPassportSvg$2 as fr,normalizePathPrefix_1 as fs,engine as ft,camelCase$1 as fu,Confirm as fv,getPathPrefix as fw,identity_1 as fx,_baseForOwn as fy,_baseMap as fz,getVisitorId$2 as g,columnGap as g$,getSystemDomains as g0,resolveProps as g1,Cookie as g2,getAccessUrl as g3,useUpdate as g4,tmp as g5,util$8 as g6,shams$1 as g7,callBound$3 as g8,objectKeys$3 as g9,useTimeout as gA,teardown as gB,DefaultPropsProvider as gC,useDefaultProps$1 as gD,createContainer as gE,useTheme$3 as gF,GlobalStyles$1 as gG,RtlProvider as gH,backgroundColor as gI,bgcolor as gJ,blend$1 as gK,border as gL,borderBottom as gM,borderBottomColor as gN,borderColor as gO,borderLeft as gP,borderLeftColor as gQ,borderRadius as gR,borderRight as gS,borderRightColor as gT,borderTop as gU,borderTopColor as gV,borderTransform as gW,boxSizing as gX,breakpoints as gY,color$1 as gZ,colorChannel$1 as g_,hasPropertyDescriptors_1 as ga,defineDataProperty as gb,callBindExports as gc,safeBufferExports as gd,requireBrowser$9 as ge,requireElliptic as gf,requireCryptoBrowserify as gg,ripemd160 as gh,getInviteLink as gi,getIssuePassportLink as gj,getTextColor_1 as gk,isProtectedRole as gl,ms$1 as gm,getChainClient as gn,compose as go,style$1 as gp,borders as gq,grid as gr,palette as gs,sizing as gt,spacing as gu,globalStateClasses as gv,isGlobalState as gw,createBox as gx,ClassNameGenerator as gy,Timeout as gz,useSecurity as h,data$b as h$,createStyled$2 as h0,createUnaryUnit as h1,gap as h2,getStyleFromPropValue as h3,getStyleValue as h4,gridArea as h5,gridAutoColumns as h6,gridAutoFlow as h7,gridAutoRows as h8,gridColumn as h9,sizingTransform as hA,systemDefaultTheme$1 as hB,unstable_createStyleFunctionSx as hC,useTheme$4 as hD,width as hE,TransitionGroup as hF,ENTERED as hG,ENTERING as hH,EXITING as hI,TransitionGroupContext as hJ,Transition$1 as hK,config$1 as hL,isRunning as hM,getTransferAppLink as hN,_copyArray as hO,DidAddressWrapper as hP,copy$1 as hQ,withTrailingSlash as hR,clsx$2 as hS,require$$1$4 as hT,require$$1$2 as hU,require$$4$3 as hV,colorManipulator as hW,require$$6$3 as hX,require$$6$2 as hY,createStyled$1 as hZ,require$$5 as h_,gridRow as ha,gridTemplateAreas as hb,gridTemplateColumns as hc,gridTemplateRows as hd,height as he,margin as hf,marginKeys as hg,maxHeight as hh,maxWidth as hi,minHeight as hj,minWidth as hk,outline as hl,outlineColor as hm,padding as hn,paddingKeys as ho,paletteTransform as hp,private_safeAlpha$1 as hq,private_safeColorChannel$1 as hr,private_safeDarken$1 as hs,private_safeEmphasize$1 as ht,private_safeLighten$1 as hu,rowGap as hv,shape as hw,shouldForwardProp$1 as hx,sizeHeight as hy,sizeWidth as hz,isUndefined$2 as i,clamp$1 as i0,extractEventHandlers as i1,forceReflow as i2,debounce_1 as i3,noop_1 as i4,formatTime as i5,hoistNonReactStatics_cjs as i6,isEqual$1 as i7,isEqual_1$1 as i8,pick_1$1 as i9,assertThisInitialized as iA,reactIsExports as iB,isValidClusterSize as iC,getBlockletUrlParams as iD,trimEnd$1 as iE,normalizePathPrefix$1 as iF,_isIndex as iG,dialogClasses as iH,FocusTrap as iI,localizedFormatPlugin as iJ,formatLocale as iK,_baseEach as iL,_baseAssignValue as iM,pTimeout$2 as iN,TimeoutError_1 as iO,debounce$3 as iP,uniq$1 as iQ,Backdrop as iR,createRoot as iS,isNil_1 as ia,omit_1 as ib,isAbsoluteUrl$1 as ic,withoutTrailingSlash as id,isString$2 as ie,isAbsoluteUrl$2 as ig,nanoid as ih,isEqual$3 as ii,useEffectWithTarget$1 as ij,__values as ik,isString$3 as il,_setPrototypeOf as im,filesize as io,Icon$1 as ip,CacheProvider as iq,createCache as ir,StyleSheet as is,ThemeContext$1 as it,React$3 as iu,isPlainObject$5 as iv,require$$2$1 as iw,require$$6$4 as ix,createPopper as iy,getScrollbarSize as iz,jsxRuntimeExports as j,useCreation as k,useMemoizedFn as l,useMount as m,CircularProgress as n,API_DID_PREFIX as o,AUTH_SERVICE_PREFIX as p,getMaster as q,reactExports as r,getFederatedEnabled as s,Toast$1 as t,useLocaleContext as u,setSessionToken as v,withQuery as w,setRefreshToken as x,setVisitorId as y,updateConnectedInfo as z};