@arcblock/did-connect-react 3.5.2 → 4.0.0-beta.2

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 (171) hide show
  1. package/dist/ConnectContext.d.ts +13 -0
  2. package/dist/ConnectContext.d.ts.map +1 -0
  3. package/dist/ConnectContext.js +14 -0
  4. package/dist/ConnectContext.js.map +1 -0
  5. package/dist/ConnectProvider.d.ts +11 -0
  6. package/dist/ConnectProvider.d.ts.map +1 -0
  7. package/dist/ConnectProvider.js +23 -0
  8. package/dist/ConnectProvider.js.map +1 -0
  9. package/dist/compat/SessionProvider.d.ts +22 -0
  10. package/dist/compat/SessionProvider.d.ts.map +1 -0
  11. package/dist/compat/SessionProvider.js +17 -0
  12. package/dist/compat/SessionProvider.js.map +1 -0
  13. package/dist/compat/index.d.ts +4 -0
  14. package/dist/compat/index.d.ts.map +1 -0
  15. package/dist/compat/index.js +3 -0
  16. package/dist/compat/index.js.map +1 -0
  17. package/dist/compat/useSessionContext.d.ts +14 -0
  18. package/dist/compat/useSessionContext.d.ts.map +1 -0
  19. package/dist/compat/useSessionContext.js +20 -0
  20. package/dist/compat/useSessionContext.js.map +1 -0
  21. package/dist/components/LoginPage.d.ts +15 -0
  22. package/dist/components/LoginPage.d.ts.map +1 -0
  23. package/dist/components/LoginPage.js +33 -0
  24. package/dist/components/LoginPage.js.map +1 -0
  25. package/dist/components/UserAvatar.d.ts +19 -0
  26. package/dist/components/UserAvatar.d.ts.map +1 -0
  27. package/dist/components/UserAvatar.js +45 -0
  28. package/dist/components/UserAvatar.js.map +1 -0
  29. package/dist/hooks/index.d.ts +11 -0
  30. package/dist/hooks/index.d.ts.map +1 -0
  31. package/dist/hooks/index.js +6 -0
  32. package/dist/hooks/index.js.map +1 -0
  33. package/dist/hooks/useConnect.d.ts +15 -0
  34. package/dist/hooks/useConnect.d.ts.map +1 -0
  35. package/dist/hooks/useConnect.js +19 -0
  36. package/dist/hooks/useConnect.js.map +1 -0
  37. package/dist/hooks/useEmail.d.ts +11 -0
  38. package/dist/hooks/useEmail.d.ts.map +1 -0
  39. package/dist/hooks/useEmail.js +47 -0
  40. package/dist/hooks/useEmail.js.map +1 -0
  41. package/dist/hooks/useOAuth.d.ts +12 -0
  42. package/dist/hooks/useOAuth.d.ts.map +1 -0
  43. package/dist/hooks/useOAuth.js +75 -0
  44. package/dist/hooks/useOAuth.js.map +1 -0
  45. package/dist/hooks/usePasskey.d.ts +14 -0
  46. package/dist/hooks/usePasskey.d.ts.map +1 -0
  47. package/dist/hooks/usePasskey.js +35 -0
  48. package/dist/hooks/usePasskey.js.map +1 -0
  49. package/dist/hooks/useSession.d.ts +12 -0
  50. package/dist/hooks/useSession.d.ts.map +1 -0
  51. package/dist/hooks/useSession.js +30 -0
  52. package/dist/hooks/useSession.js.map +1 -0
  53. package/dist/index.d.ts +13 -0
  54. package/dist/index.d.ts.map +1 -0
  55. package/dist/index.js +11 -0
  56. package/dist/index.js.map +1 -0
  57. package/dist/internals/blocklet-config.d.ts +22 -0
  58. package/dist/internals/blocklet-config.d.ts.map +1 -0
  59. package/dist/internals/blocklet-config.js +26 -0
  60. package/dist/internals/blocklet-config.js.map +1 -0
  61. package/dist/internals/local-storage-adapter.d.ts +12 -0
  62. package/dist/internals/local-storage-adapter.d.ts.map +1 -0
  63. package/dist/internals/local-storage-adapter.js +32 -0
  64. package/dist/internals/local-storage-adapter.js.map +1 -0
  65. package/dist/internals/use-sync-state.d.ts +18 -0
  66. package/dist/internals/use-sync-state.d.ts.map +1 -0
  67. package/dist/internals/use-sync-state.js +38 -0
  68. package/dist/internals/use-sync-state.js.map +1 -0
  69. package/package.json +33 -79
  70. package/LICENSE +0 -13
  71. package/README.md +0 -134
  72. package/dist/standalone/did-connect-react.css +0 -1
  73. package/dist/standalone/index.js +0 -136774
  74. package/lib/Address/index.js +0 -4
  75. package/lib/Avatar/index.js +0 -4
  76. package/lib/Button/index.js +0 -17
  77. package/lib/Connect/assets/locale.js +0 -147
  78. package/lib/Connect/assets/login-bg.png +0 -0
  79. package/lib/Connect/assets/login-slogan.js +0 -9
  80. package/lib/Connect/components/action-button.js +0 -26
  81. package/lib/Connect/components/app-tips.js +0 -132
  82. package/lib/Connect/components/auto-height.js +0 -31
  83. package/lib/Connect/components/back-button.js +0 -25
  84. package/lib/Connect/components/connect-status.js +0 -263
  85. package/lib/Connect/components/did-connect-title.js +0 -127
  86. package/lib/Connect/components/download-tips.js +0 -52
  87. package/lib/Connect/components/loading.js +0 -26
  88. package/lib/Connect/components/login-item/connect-choose-list.js +0 -257
  89. package/lib/Connect/components/login-item/connect-provider-list.js +0 -345
  90. package/lib/Connect/components/login-item/login-method-item.js +0 -147
  91. package/lib/Connect/components/login-item/mobile-login-item.js +0 -116
  92. package/lib/Connect/components/login-item/passkey-login-item.js +0 -44
  93. package/lib/Connect/components/login-item/wallet-login-options.js +0 -114
  94. package/lib/Connect/components/login-item/web-login-item.js +0 -104
  95. package/lib/Connect/components/mask-overlay.js +0 -34
  96. package/lib/Connect/components/refresh-overlay.js +0 -57
  97. package/lib/Connect/components/switch-app.js +0 -70
  98. package/lib/Connect/connect.js +0 -505
  99. package/lib/Connect/contexts/state.js +0 -156
  100. package/lib/Connect/fallback-connect.js +0 -53
  101. package/lib/Connect/fullpage.js +0 -5
  102. package/lib/Connect/hooks/auth-url.js +0 -23
  103. package/lib/Connect/hooks/method-list.js +0 -46
  104. package/lib/Connect/hooks/page-show.js +0 -17
  105. package/lib/Connect/hooks/provider-list.js +0 -69
  106. package/lib/Connect/hooks/security.js +0 -27
  107. package/lib/Connect/hooks/token.js +0 -296
  108. package/lib/Connect/hooks/use-apps.js +0 -19
  109. package/lib/Connect/hooks/use-quick-connect.js +0 -86
  110. package/lib/Connect/index.js +0 -16
  111. package/lib/Connect/landing-page.js +0 -5
  112. package/lib/Connect/plugins/email/index.js +0 -65
  113. package/lib/Connect/plugins/email/list-item.js +0 -31
  114. package/lib/Connect/plugins/email/placeholder.js +0 -284
  115. package/lib/Connect/plugins/index.js +0 -4
  116. package/lib/Connect/use-connect.js +0 -164
  117. package/lib/Connect/with-blocklet.js +0 -15
  118. package/lib/Connect/with-bridge-call.js +0 -108
  119. package/lib/Federated/context.js +0 -61
  120. package/lib/Federated/index.js +0 -7
  121. package/lib/Logo/index.js +0 -4
  122. package/lib/OAuth/bind-conflict-alert.js +0 -29
  123. package/lib/OAuth/context.js +0 -277
  124. package/lib/OAuth/guest.svg.js +0 -5
  125. package/lib/OAuth/index.js +0 -7
  126. package/lib/OAuth/passport-switcher.js +0 -5
  127. package/lib/Passkey/actions.js +0 -170
  128. package/lib/Passkey/constants.js +0 -4
  129. package/lib/Passkey/context.js +0 -281
  130. package/lib/Passkey/dialog.js +0 -280
  131. package/lib/Passkey/icon.js +0 -13
  132. package/lib/Passkey/index.js +0 -9
  133. package/lib/Service/index.js +0 -62
  134. package/lib/Session/assets/did-spaces-guide-cover.svg.js +0 -111
  135. package/lib/Session/assets/did-spaces-guide-icon.svg.js +0 -9
  136. package/lib/Session/context.js +0 -5
  137. package/lib/Session/did-spaces-guide.js +0 -136
  138. package/lib/Session/handler.js +0 -55
  139. package/lib/Session/hooks/use-federated.js +0 -64
  140. package/lib/Session/hooks/use-mobile.js +0 -8
  141. package/lib/Session/hooks/use-protected-routes.js +0 -11
  142. package/lib/Session/hooks/use-session-token.js +0 -181
  143. package/lib/Session/hooks/use-verify.js +0 -45
  144. package/lib/Session/index.js +0 -941
  145. package/lib/Session/libs/constants.js +0 -18
  146. package/lib/Session/libs/did-spaces.js +0 -10
  147. package/lib/Session/libs/federated.js +0 -42
  148. package/lib/Session/libs/index.js +0 -15
  149. package/lib/Session/libs/locales.js +0 -161
  150. package/lib/Session/libs/login-mobile.js +0 -55
  151. package/lib/Session/window-focus-aware.js +0 -17
  152. package/lib/SessionManager/index.js +0 -4
  153. package/lib/Storage/engine/cookie.js +0 -22
  154. package/lib/Storage/engine/local-storage.js +0 -37
  155. package/lib/Storage/index.js +0 -23
  156. package/lib/User/index.js +0 -6
  157. package/lib/User/use-did.js +0 -59
  158. package/lib/User/wrap-did.js +0 -13
  159. package/lib/WebWalletSWKeeper/index.js +0 -5
  160. package/lib/components/PassportSwitcher.js +0 -128
  161. package/lib/constant.js +0 -23
  162. package/lib/error.js +0 -8
  163. package/lib/hooks/use-locale.js +0 -7
  164. package/lib/index.js +0 -111
  165. package/lib/locales/en.js +0 -17
  166. package/lib/locales/index.js +0 -10
  167. package/lib/locales/zh.js +0 -17
  168. package/lib/node_modules/@blocklet/js-sdk/dist/index.js +0 -512
  169. package/lib/packages/did-connect/package.json.js +0 -7
  170. package/lib/types.d.ts +0 -355
  171. package/lib/utils.js +0 -225
@@ -1,111 +0,0 @@
1
- import * as e from "react";
2
- const h = (m) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 440 167", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...m }, /* @__PURE__ */ e.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ e.createElement("rect", { width: 440, height: 167, rx: 8, fill: "url(#b)" }), /* @__PURE__ */ e.createElement("g", { style: {
3
- mixBlendMode: "overlay"
4
- }, opacity: 0.4, clipPath: "url(#c)" }, /* @__PURE__ */ e.createElement("mask", { id: "d", style: {
5
- maskType: "alpha"
6
- }, maskUnits: "userSpaceOnUse", x: 0, y: -183, width: 441, height: 395 }, /* @__PURE__ */ e.createElement("path", { d: "M220.481 167.765v-43.661h-43.808v43.661h43.808zm0 43.661v-43.661h-43.808v43.661h43.808zm-43.808-43.661v-43.661h-43.808v43.661h43.808zm-43.808 0v-43.661H89.057v43.661h43.808zm-43.808 0v-43.661H45.25v43.661h43.808zm-43.807 0v-43.661H1.442v43.661H45.25zm131.423 43.661v-43.661h-43.808v43.661h43.808zm-43.808 0v-43.661H89.057v43.661h43.808zm-43.808 0v-43.661H45.25v43.661h43.808zm-43.807 0v-43.661H1.442v43.661H45.25zm219.039-43.661v-43.661h-43.808v43.661h43.808zm0 43.661v-43.661h-43.808v43.661h43.808zm43.807-43.661v-43.661h-43.807v43.661h43.807zm0 43.661v-43.661h-43.807v43.661h43.807zm43.808-43.661v-43.661h-43.808v43.661h43.808zm0 43.661v-43.661h-43.808v43.661h43.808zm43.808-43.661v-43.661h-43.808v43.661h43.808zm0 43.661v-43.661h-43.808v43.661h43.808zm43.808-43.661v-43.661h-43.808v43.661h43.808zm0 43.661v-43.661h-43.808v43.661h43.808zm-219.039-87.322v-43.66h-43.808v43.66h43.808zm-43.808 0v-43.66h-43.808v43.66h43.808zm-43.808 0v-43.66H89.057v43.66h43.808zm-43.808 0v-43.66H45.25v43.66h43.808zm-43.807 0v-43.66H1.442v43.66H45.25zm219.039 0v-43.66h-43.808v43.66h43.808zm43.807 0v-43.66h-43.807v43.66h43.807zm43.808 0v-43.66h-43.808v43.66h43.808zm43.808 0v-43.66h-43.808v43.66h43.808zm43.808 0v-43.66h-43.808v43.66h43.808zm-219.039-43.66V36.781h-43.808v43.661h43.808zm-43.808 0V36.781h-43.808v43.661h43.808zm-43.808 0V36.781H89.057v43.661h43.808zm-43.808 0V36.781H45.25v43.661h43.808zm-43.807 0V36.781H1.442v43.661H45.25zm87.615-43.662v-43.66H89.057v43.66h43.808zm0-43.66V-50.54H89.057v43.66h43.808zm0-43.661v-43.66H89.057v43.66h43.808zm0-43.66v-43.662H89.057V-94.2h43.808zm0-43.662v-43.66H89.057v43.66h43.808zM176.673-6.878V-50.54h-43.808v43.66h43.808zm0-43.661v-43.66h-43.808v43.66h43.808zm0-43.66v-43.662h-43.808V-94.2h43.808zm0-43.662v-43.66h-43.808v43.66h43.808zM89.058 36.782v-43.66H45.25v43.66h43.808zm0-43.66V-50.54H45.25v43.66h43.808zm0-43.661v-43.66H45.25v43.66h43.808zm0-43.66v-43.662H45.25V-94.2h43.808zm0-43.662v-43.66H45.25v43.66h43.808zM45.25 36.782v-43.66H1.442v43.66H45.25zm0-43.66V-50.54H1.442v43.66H45.25zm0-43.661v-43.66H1.442v43.66H45.25zm0-43.66v-43.662H1.442V-94.2H45.25zm0-43.662v-43.66H1.442v43.66H45.25zM264.289 80.443v-43.66h-43.808v43.66h43.808zm43.807 0v-43.66h-43.807v43.66h43.807zm43.808 0v-43.66h-43.808v43.66h43.808zm43.808 0v-43.66h-43.808v43.66h43.808zm43.808 0v-43.66h-43.808v43.66h43.808zm-219.039-43.66V-6.879h-43.808v43.66h43.808zm0-43.661V-50.54h-43.808v43.66h43.808zm0-43.661v-43.66h-43.808v43.66h43.808zm0-43.66v-43.662h-43.808V-94.2h43.808zm0-43.662v-43.66h-43.808v43.66h43.808zM176.673 36.782v-43.66h-43.808v43.66h43.808zm87.616 0v-43.66h-43.808v43.66h43.808zm0-43.66V-50.54h-43.808v43.66h43.808zm0-43.661v-43.66h-43.808v43.66h43.808zm0-43.66v-43.662h-43.808V-94.2h43.808zm0-43.662v-43.66h-43.808v43.66h43.808zm43.807 174.643v-43.66h-43.807v43.66h43.807zm0-43.66V-50.54h-43.807v43.66h43.807zm0-43.661v-43.66h-43.807v43.66h43.807zm0-43.66v-43.662h-43.807V-94.2h43.807zm0-43.662v-43.66h-43.807v43.66h43.807zm43.808 174.643v-43.66h-43.808v43.66h43.808zm0-43.66V-50.54h-43.808v43.66h43.808zm0-43.661v-43.66h-43.808v43.66h43.808zm0-43.66v-43.662h-43.808V-94.2h43.808zm0-43.662v-43.66h-43.808v43.66h43.808zm43.808 174.643v-43.66h-43.808v43.66h43.808zm0-43.66V-50.54h-43.808v43.66h43.808zm0-43.661v-43.66h-43.808v43.66h43.808zm0-43.66v-43.662h-43.808V-94.2h43.808zm0-43.662v-43.66h-43.808v43.66h43.808zM439.52 36.782v-43.66h-43.808v43.66h43.808zm0-43.66V-50.54h-43.808v43.66h43.808zm0-43.661v-43.66h-43.808v43.66h43.808zm0-43.66v-43.662h-43.808V-94.2h43.808zm0-43.662v-43.66h-43.808v43.66h43.808z", fill: "#070707", fillOpacity: 0.4, style: {
7
- fill: "color(display-p3 .0275 .0275 .0275)",
8
- fillOpacity: 0.4
9
- } }), /* @__PURE__ */ e.createElement("path", { d: "M220.481 167.765v-43.661m0 43.661h-43.808m43.808 0v43.661m0-43.661h43.808m-43.808-43.661h-43.808m43.808 0h43.808m-43.808 0v-43.66m-43.808 87.321v-43.661m0 43.661v43.661m0-43.661h-43.808m87.616 43.661h-43.808m43.808 0h43.808m0-43.661v-43.661m0 43.661v43.661m0-43.661h43.807m-131.423-43.661h-43.808m43.808 0v-43.66m87.616 43.66h43.807m-43.807 0v-43.66m-43.808 0h-43.808m43.808 0h43.808m-43.808 0V36.781m-87.616 87.322v43.661m0-43.661H89.057m43.808 0v-43.66m43.808 0h-43.808m43.808 0V36.781m0 174.644h-43.808m0-43.661H89.057m43.808 0v43.661m131.424 0h43.807m-175.231 0H89.057m0-87.322v43.661m0-43.661H45.25m43.808 0v-43.66m43.807 0H89.057m43.808 0V36.781M89.057 167.766H45.25m43.808 0v43.661M45.25 124.104v43.661m0-43.661H1.442m43.808 0v-43.66m43.808 0H45.25m43.808 0V36.781M45.25 167.766H1.442m43.808 0v43.661m43.808 0H45.25M1.442 124.104v43.661m0-43.661v-43.66m43.808 0H1.442m43.808 0V36.781M1.442 167.766v43.661H45.25M1.442 80.443v-43.66m306.654 130.982v-43.661m0 43.661v43.661m0-43.661h43.808m-43.808-43.661h43.808m-43.808 0v-43.66m-43.807 0h43.807m-43.807 0V36.781m43.807 174.644h43.808m0-43.661v-43.661m0 43.661v43.661m0-43.661h43.808m-43.808-43.661h43.808m-43.808 0v-43.66m-43.808 0h43.808m-43.808 0V36.781m43.808 174.644h43.808m0-43.661v-43.661m0 43.661v43.661m0-43.661h43.808m-43.808-43.661h43.808m-43.808 0v-43.66m-43.808 0h43.808m-43.808 0V36.781m43.808 174.644h43.808v-43.661m0 0v-43.661m0 0v-43.66m-43.808 0h43.808m-43.808 0V36.781m43.808 43.661v-43.66m-219.039 0h-43.808m43.808 0h43.808m-43.808 0V-6.879m-43.808 43.66h-43.808m43.808 0v-43.66m-43.808 43.66H89.057m43.808 0v-43.66m-43.808 43.66H45.25m43.808 0v-43.66M45.25 36.782H1.442m43.808 0v-43.66M1.442 36.782v-43.66m262.847 43.66h43.807m-43.807 0v-43.66m43.807 43.66h43.808m-43.808 0v-43.66m43.808 43.66h43.808m-43.808 0v-43.66m43.808 43.66h43.808m-43.808 0v-43.66m43.808 43.66v-43.66m-219.039 0h-43.808m43.808 0V-50.54m0 43.66h43.808m-87.616 0h-43.808m43.808 0v-43.66M132.865-6.88H89.057m43.808 0v-43.66M89.057-6.879v-43.66m0 43.66H45.25m0 0v-43.66m0 43.66H1.442m0 0v-43.66m131.423 0H89.057m43.808 0v-43.66m0 43.66h43.808m-87.615 0v-43.66m0 43.66H45.25m87.615-43.66H89.057m43.808 0v-43.662m0 43.661h43.808m0 43.661v-43.66m0 43.66h43.808M89.058-94.199v-43.662m0 43.661H45.25m0 43.661v-43.66m0 43.66H1.442m131.423-87.322H89.057m43.808 0v-43.66m0 43.66h43.808m0 43.661v-43.661m0 43.661h43.808M89.058-137.86v-43.66m0 43.66H45.25m0 43.661v-43.661m0 43.661H1.442m131.423-87.321H89.057m43.808 0h43.808m0 43.66v-43.66m0 43.66h43.808M89.058-181.52H45.25m0 43.66v-43.66m0 43.66H1.442m175.231-43.66h43.808m-175.231 0H1.442v43.66M220.48-50.539v-43.66m0 43.66h43.808m-43.808-43.66v-43.662m0 43.661h43.808m-43.808-43.661v-43.66m0 43.66h43.808m-43.808-43.66h43.808M1.442-50.539v-43.66m0 0v-43.662M264.289-6.878V-50.54m0 43.66h43.807m0 0v-43.66m0 43.66h43.808m0 0v-43.66m0 43.66h43.808m0 0v-43.66m0 43.66h43.808m0 0v-43.66m-175.231 0V-94.2m0 43.66h43.807M264.289-94.2v-43.662m0 43.661h43.807m-43.807-43.661v-43.66m0 43.66h43.807m-43.807-43.66h43.807m0 130.982V-94.2m0 43.66h43.808M308.096-94.2v-43.662m0 43.661h43.808m-43.808-43.661v-43.66m0 43.66h43.808m-43.808-43.66h43.808m0 130.982V-94.2m0 43.66h43.808M351.904-94.2v-43.662m0 43.661h43.808m-43.808-43.661v-43.66m0 43.66h43.808m-43.808-43.66h43.808m0 130.982V-94.2m0 43.66h43.808M395.712-94.2v-43.662m0 43.661h43.808m-43.808-43.661v-43.66m0 43.66 43.808.001m-43.808-43.661h43.808v43.661m0 87.321V-94.2m0 0v-43.661", stroke: "#151515", style: {
10
- stroke: "color(display-p3 .0824 .0824 .0824)",
11
- strokeOpacity: 1
12
- } }), /* @__PURE__ */ e.createElement("path", { d: "M307.866 80.213V37.012H264.52v43.201h43.346zm-87.615 43.661V80.673h-43.347v43.201h43.347zm-43.808-87.322v-43.2h-43.347v43.2h43.347z", fill: "#070707", fillOpacity: 0.4, style: {
13
- fill: "color(display-p3 .0275 .0275 .0275)",
14
- fillOpacity: 0.4
15
- } })), /* @__PURE__ */ e.createElement("g", { mask: "url(#d)" }, /* @__PURE__ */ e.createElement("path", { d: "M-53.203-8.946c0-163.462 125.32-295.974 279.909-295.974 154.59 0 279.909 132.512 279.909 295.974S381.296 287.028 226.706 287.028c-154.589 0-279.909-132.512-279.909-295.974z", fill: "url(#e)" }))), /* @__PURE__ */ e.createElement("g", { filter: "url(#f)" }, /* @__PURE__ */ e.createElement("rect", { x: 32, y: 44, width: 101, height: 72, rx: 12, fill: "#fff", fillOpacity: 0.32, style: {
16
- fill: "#fff",
17
- fillOpacity: 0.32
18
- } }), /* @__PURE__ */ e.createElement("rect", { x: 32.5, y: 44.5, width: 100, height: 71, rx: 11.5, stroke: "#fff", style: {
19
- stroke: "#fff",
20
- strokeOpacity: 1
21
- } })), /* @__PURE__ */ e.createElement("g", { filter: "url(#g)" }, /* @__PURE__ */ e.createElement("rect", { x: 294, y: 44, width: 101, height: 72, rx: 12, fill: "#fff", fillOpacity: 0.32, style: {
22
- fill: "#fff",
23
- fillOpacity: 0.32
24
- } }), /* @__PURE__ */ e.createElement("rect", { x: 294.5, y: 44.5, width: 100, height: 71, rx: 11.5, stroke: "#fff", style: {
25
- stroke: "#fff",
26
- strokeOpacity: 1
27
- } })), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M313.2 74.671c0-.812.659-1.471 1.472-1.471h15.368a2.522 2.522 0 0 1 2.522 2.522v8.21a2.522 2.522 0 0 1-2.522 2.521h-15.435a1.405 1.405 0 0 1-1.405-1.404H312a2.605 2.605 0 0 0 2.605 2.604h15.435a3.722 3.722 0 0 0 3.722-3.722v-8.209A3.722 3.722 0 0 0 330.04 72h-15.368A2.672 2.672 0 0 0 312 74.671h1.2zm12.912 1.968c-.526-.303-1.148-.454-1.867-.454h-2.511v7.217h2.511c.719 0 1.341-.148 1.867-.443a3.113 3.113 0 0 0 1.241-1.248c.295-.536.443-1.168.443-1.897 0-.735-.148-1.374-.443-1.917a3.097 3.097 0 0 0-1.241-1.258zm-.231 4.959c-.391.426-.949.639-1.674.639h-1.174V77.35h1.174c.725 0 1.283.22 1.674.66.391.44.587 1.041.587 1.804 0 .756-.196 1.35-.587 1.784zm-6.76-5.413h1.299v7.217h-1.299v-7.217zm-2.669.454c-.526-.303-1.148-.454-1.867-.454h-2.511v7.217h2.511c.719 0 1.341-.148 1.867-.443a3.114 3.114 0 0 0 1.241-1.248c.295-.536.443-1.168.443-1.897 0-.735-.148-1.374-.443-1.917a3.096 3.096 0 0 0-1.241-1.258zm-.231 4.959c-.391.426-.949.639-1.674.639h-1.174V77.35h1.174c.725 0 1.283.22 1.674.66.391.44.587 1.041.587 1.804 0 .756-.196 1.35-.587 1.784zm13.538-2.7a.726.726 0 1 0 0-1.452.726.726 0 0 0 0 1.453zm0 3.392a.726.726 0 1 0 0-1.452.726.726 0 0 0 0 1.452zm13.014-6.236a.563.563 0 0 0 .141-.172l.351-.694a3.423 3.423 0 0 0-1.193-.756 4.048 4.048 0 0 0-1.496-.268c-.485 0-.916.078-1.294.234a2.869 2.869 0 0 0-.957.611 2.587 2.587 0 0 0-.586.873c-.135.33-.202.671-.202 1.024 0 .44.065.811.195 1.113.131.298.304.548.519.75.216.197.461.357.735.48.274.124.555.234.842.33l.842.269c.274.087.519.192.735.316.215.123.388.277.519.46.13.183.195.42.195.708 0 .257-.043.49-.128.701-.085.21-.209.392-.371.543a1.648 1.648 0 0 1-.586.344 2.502 2.502 0 0 1-.795.116 2.56 2.56 0 0 1-.93-.15 4.007 4.007 0 0 1-.653-.33 7.973 7.973 0 0 1-.459-.337c-.121-.101-.229-.152-.323-.152a.357.357 0 0 0-.195.055.571.571 0 0 0-.142.138l-.411.7c.18.198.382.377.606.537.23.156.474.29.735.405.26.11.537.195.829.255.292.064.593.096.903.096.516 0 .977-.08 1.381-.24.409-.166.752-.39 1.031-.674.278-.284.49-.616.633-.997.149-.38.223-.788.223-1.223 0-.408-.068-.751-.202-1.03a2.157 2.157 0 0 0-.519-.716 2.921 2.921 0 0 0-.735-.488 7.943 7.943 0 0 0-.842-.336 66.569 66.569 0 0 0-.842-.289 4.08 4.08 0 0 1-.735-.323 1.758 1.758 0 0 1-.525-.447c-.131-.174-.196-.394-.196-.66 0-.206.036-.396.108-.57a1.28 1.28 0 0 1 .33-.46c.144-.133.321-.236.533-.31a2.19 2.19 0 0 1 .747-.116c.301 0 .56.039.775.116.216.074.4.159.553.255.157.091.287.176.391.254.103.073.195.11.276.11a.312.312 0 0 0 .189-.055zm4.059 6.975c-.247-.114-.479-.316-.694-.604v-3.306c.238-.32.496-.568.775-.742.283-.174.615-.261.997-.261.261 0 .494.048.701.144.206.092.379.238.519.44.143.197.251.453.323.77.076.311.115.69.115 1.134 0 .847-.167 1.493-.499 1.938-.328.44-.793.66-1.395.66-.31 0-.591-.058-.842-.172zm-.303-5.298a4.13 4.13 0 0 0-.459.474l-.114-.776c-.045-.18-.16-.269-.344-.269h-.788v9.326h1.314v-3.03c.229.247.489.44.781.577.292.137.643.206 1.052.206.458 0 .869-.092 1.233-.275a2.73 2.73 0 0 0 .93-.77 3.49 3.49 0 0 0 .586-1.147c.139-.445.209-.926.209-1.443a5.63 5.63 0 0 0-.189-1.533 3.318 3.318 0 0 0-.519-1.12 2.218 2.218 0 0 0-.815-.688 2.353 2.353 0 0 0-1.058-.233c-.243 0-.472.03-.687.09a2.544 2.544 0 0 0-.6.24 2.76 2.76 0 0 0-.532.37zm9.555 3.312a9.45 9.45 0 0 0-1.362.131 3.601 3.601 0 0 0-.909.261c-.234.11-.402.24-.506.392a.84.84 0 0 0-.155.495c0 .174.027.325.081.453a.946.946 0 0 0 .229.31.98.98 0 0 0 .344.171c.13.037.272.055.425.055a2.292 2.292 0 0 0 1.03-.233c.149-.078.29-.172.425-.282.135-.11.267-.236.398-.378v-1.375zm-3.855-2.907a3.92 3.92 0 0 1 1.24-.831 3.869 3.869 0 0 1 1.476-.275c.391 0 .737.066 1.037.2.301.127.555.308.762.542.207.234.362.513.465.838.108.326.162.686.162 1.08v4.453h-.587a.572.572 0 0 1-.296-.062.47.47 0 0 1-.162-.247l-.141-.612a6.414 6.414 0 0 1-.519.44 3.635 3.635 0 0 1-.539.323 2.74 2.74 0 0 1-.593.2 3.313 3.313 0 0 1-.701.068c-.27 0-.523-.037-.761-.11a1.746 1.746 0 0 1-.614-.35 1.672 1.672 0 0 1-.417-.585 2.083 2.083 0 0 1-.149-.818c0-.275.072-.538.216-.79.148-.256.386-.486.714-.687.333-.202.764-.367 1.294-.495.535-.128 1.19-.202 1.968-.22v-.508c0-.527-.11-.921-.331-1.183-.22-.26-.543-.391-.97-.391-.287 0-.53.036-.728.11a2.775 2.775 0 0 0-.505.247c-.139.087-.263.167-.371.24a.55.55 0 0 1-.323.11.382.382 0 0 1-.236-.075.657.657 0 0 1-.155-.179l-.236-.433zm11.577.454a.776.776 0 0 0 .121-.124l.351-.495a3.16 3.16 0 0 0-.998-.68c-.372-.16-.804-.24-1.293-.24-.521 0-.984.091-1.388.274a2.878 2.878 0 0 0-1.025.75 3.235 3.235 0 0 0-.626 1.133c-.14.44-.209.92-.209 1.437 0 .568.078 1.077.236 1.526.157.444.37.82.64 1.127.274.306.595.54.963.7.373.16.773.241 1.2.241.247 0 .489-.02.727-.062.243-.041.474-.105.695-.192.22-.087.426-.2.619-.337.198-.137.376-.305.533-.502l-.378-.494a.286.286 0 0 0-.249-.124.37.37 0 0 0-.249.11 3.674 3.674 0 0 1-.303.227 2.41 2.41 0 0 1-.459.233 2.024 2.024 0 0 1-.7.103 1.88 1.88 0 0 1-.796-.165 1.674 1.674 0 0 1-.606-.494 2.42 2.42 0 0 1-.384-.805 4.049 4.049 0 0 1-.135-1.092c0-.394.043-.75.128-1.065.086-.317.209-.585.371-.805.166-.22.373-.389.62-.508.247-.12.532-.179.856-.179.247 0 .453.03.619.09.171.055.315.116.432.185.121.064.22.126.296.186a.412.412 0 0 0 .229.082.268.268 0 0 0 .162-.041zm6.189 1.285c0-.266-.038-.51-.115-.735a1.633 1.633 0 0 0-.323-.584 1.486 1.486 0 0 0-.526-.385 1.746 1.746 0 0 0-.714-.138c-.553 0-.988.163-1.307.488-.315.326-.515.777-.6 1.354h3.585zm1.085 3.271c-.162.193-.348.36-.56.502-.211.138-.435.25-.673.337a4.031 4.031 0 0 1-.742.192 4.607 4.607 0 0 1-.748.062c-.471 0-.909-.08-1.314-.24a3.012 3.012 0 0 1-1.044-.715 3.377 3.377 0 0 1-.687-1.169c-.162-.467-.243-1.003-.243-1.608 0-.485.074-.937.222-1.354a3.32 3.32 0 0 1 .634-1.1 2.973 2.973 0 0 1 1.017-.734c.4-.18.849-.269 1.348-.269.418 0 .802.072 1.152.213.355.138.661.34.917.605.256.266.456.594.599.983.149.39.223.834.223 1.333 0 .207-.023.346-.068.42-.045.068-.128.103-.249.103h-4.488c.014.417.072.78.176 1.092.103.307.244.564.424.77.184.206.402.36.654.46.251.101.532.152.842.152.292 0 .544-.035.755-.103a3.86 3.86 0 0 0 .552-.22 4.41 4.41 0 0 0 .391-.227.55.55 0 0 1 .283-.103c.108 0 .191.041.249.124l.378.494zm5.435-4.652a.416.416 0 0 0 .114-.13l.29-.489a2.8 2.8 0 0 0-.943-.605 3.26 3.26 0 0 0-1.227-.22c-.395 0-.748.058-1.058.172-.305.11-.563.26-.775.447a1.987 1.987 0 0 0-.478.653 1.92 1.92 0 0 0-.162.776c0 .303.05.56.149.77.103.211.235.39.397.536.166.147.355.268.566.365.211.096.427.18.647.254.22.073.436.142.647.206.211.064.397.14.559.227.166.087.299.192.398.316.103.119.155.27.155.453 0 .143-.027.278-.081.406a.963.963 0 0 1-.249.344 1.238 1.238 0 0 1-.411.233 1.877 1.877 0 0 1-.587.083 2.16 2.16 0 0 1-.674-.09 2.791 2.791 0 0 1-.458-.206 5.92 5.92 0 0 1-.323-.213.456.456 0 0 0-.263-.096.378.378 0 0 0-.216.055.383.383 0 0 0-.134.144l-.31.516c.269.247.604.45 1.004.611.399.16.835.24 1.307.24.422 0 .797-.056 1.125-.171a2.34 2.34 0 0 0 .822-.474 1.94 1.94 0 0 0 .506-.715c.116-.28.175-.582.175-.907 0-.284-.052-.525-.155-.722a1.532 1.532 0 0 0-.398-.501 2.11 2.11 0 0 0-.559-.35 6.066 6.066 0 0 0-.64-.255 20.592 20.592 0 0 0-.64-.206 4.374 4.374 0 0 1-.56-.227 1.363 1.363 0 0 1-.397-.296.638.638 0 0 1-.148-.433.851.851 0 0 1 .337-.674 1.13 1.13 0 0 1 .39-.198 1.7 1.7 0 0 1 .519-.076c.229 0 .427.025.593.076.166.05.31.105.431.164.126.06.232.115.317.165.09.05.171.076.243.076a.313.313 0 0 0 .155-.034z", fill: "#3B82F6", style: {
28
- fill: "color(display-p3 .2314 .5098 .9647)",
29
- fillOpacity: 1
30
- } }), /* @__PURE__ */ e.createElement("circle", { cx: 83, cy: 116, r: 12.5, fill: "#25C99B", stroke: "#fff", style: {
31
- fill: "color(display-p3 .1451 .7882 .6078)",
32
- fillOpacity: 1,
33
- stroke: "#fff",
34
- strokeOpacity: 1
35
- } }), /* @__PURE__ */ e.createElement("path", { d: "M89.486 115.191a6.552 6.552 0 0 0-5.654-5.599 6.555 6.555 0 0 0-6.889 3.98m-.404-3.236v3.236h3.236m-3.237 3.237a6.551 6.551 0 0 0 5.654 5.599 6.555 6.555 0 0 0 6.889-3.98m.404 3.236v-3.236H86.25", stroke: "#fff", style: {
36
- stroke: "#fff",
37
- strokeOpacity: 1
38
- }, strokeWidth: 1.4, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("circle", { cx: 345, cy: 116, r: 12.5, fill: "#25C99B", stroke: "#fff", style: {
39
- fill: "color(display-p3 .1451 .7882 .6078)",
40
- fillOpacity: 1,
41
- stroke: "#fff",
42
- strokeOpacity: 1
43
- } }), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M344.65 109.176a.699.699 0 0 0-.928 0 7.963 7.963 0 0 1-5.638 1.99.699.699 0 0 0-.704.502 9.35 9.35 0 0 0 .837 7.254 9.352 9.352 0 0 0 5.793 4.446c.116.03.237.03.353-.001.114-.029.229-.061.344-.096a.7.7 0 1 0-.402-1.341l-.119.035a7.976 7.976 0 0 1-2.672-1.342 7.974 7.974 0 0 1-3.062-5.404 7.974 7.974 0 0 1 .139-2.646 9.362 9.362 0 0 0 5.595-1.964 9.361 9.361 0 0 0 5.594 1.964 7.952 7.952 0 0 1-.054 3.697.7.7 0 1 0 1.357.345 9.365 9.365 0 0 0-.091-4.947.7.7 0 0 0-.704-.502 7.96 7.96 0 0 1-5.638-1.99zm3.887 11.595v2.64a.7.7 0 0 0 1.4 0v-2.64l.97.97a.699.699 0 1 0 .99-.99l-2.165-2.165a.7.7 0 0 0-.99 0l-2.165 2.165a.7.7 0 0 0 .99.99l.97-.97z", fill: "#fff", style: {
44
- fill: "#fff",
45
- fillOpacity: 1
46
- } }), /* @__PURE__ */ e.createElement("path", { d: "M59.725 80.496V84h-1.14v-3.504l-3.312-5.064h1.356l2.569 4.08 2.508-4.08H63l-3.276 5.064zm3.362.408c0 .376.048.712.144 1.008.104.288.244.532.42.732.176.192.38.34.612.444a1.881 1.881 0 0 0 1.5 0c.24-.104.448-.252.624-.444.176-.2.312-.444.408-.732a3.03 3.03 0 0 0 .156-1.008c0-.376-.052-.708-.156-.996a2.082 2.082 0 0 0-.408-.744 1.749 1.749 0 0 0-.624-.456 1.881 1.881 0 0 0-1.5 0 1.779 1.779 0 0 0-.612.456 2.23 2.23 0 0 0-.42.744c-.096.288-.144.62-.144.996zm-1.08 0c0-.456.064-.88.192-1.272.128-.4.32-.744.576-1.032.256-.296.572-.528.948-.696a3.148 3.148 0 0 1 1.296-.252c.496 0 .928.084 1.296.252.376.168.692.4.948.696.256.288.448.632.576 1.032.128.392.192.816.192 1.272 0 .456-.064.88-.192 1.272s-.32.736-.576 1.032a2.75 2.75 0 0 1-.948.684c-.368.16-.8.24-1.296.24-.488 0-.92-.08-1.296-.24a2.75 2.75 0 0 1-.948-.684 2.966 2.966 0 0 1-.576-1.032 4.075 4.075 0 0 1-.192-1.272zM74.249 84h-.96v-.984h-.023c-.217.384-.493.668-.829.852-.335.176-.731.264-1.188.264-.407 0-.748-.052-1.02-.156a1.677 1.677 0 0 1-.66-.468 1.8 1.8 0 0 1-.36-.708 4.149 4.149 0 0 1-.096-.924v-4.08h1.02v4.2c0 .384.113.688.337.912.224.224.531.336.924.336.311 0 .58-.048.803-.144a1.51 1.51 0 0 0 .576-.408c.153-.176.264-.38.337-.612.08-.24.12-.5.12-.78v-3.504h1.02V84zm1.376-6.204h.96v1.308h.024c.248-.504.552-.876.912-1.116.36-.24.816-.352 1.368-.336v1.08c-.408 0-.756.056-1.044.168-.288.112-.52.276-.696.492-.176.216-.304.48-.384.792a4.17 4.17 0 0 0-.12 1.056V84h-1.02v-6.204zm8.44 5.244h1.896c.128 0 .288-.008.48-.024.192-.024.396-.072.612-.144.216-.08.428-.192.636-.336.216-.144.408-.34.576-.588.168-.248.304-.556.408-.924.112-.376.168-.828.168-1.356 0-.512-.052-.968-.156-1.368a2.48 2.48 0 0 0-.492-1.032 2.049 2.049 0 0 0-.876-.648c-.36-.152-.804-.228-1.332-.228h-1.92v6.648zm-1.14-7.608h2.94c1.32 0 2.336.336 3.048 1.008.712.672 1.068 1.696 1.068 3.072 0 .72-.08 1.36-.24 1.92a3.634 3.634 0 0 1-.744 1.404 3.254 3.254 0 0 1-1.284.864c-.52.2-1.136.3-1.848.3h-2.94v-8.568zm13.658 8.544c-.176.104-.42.156-.732.156-.264 0-.476-.072-.636-.216-.152-.152-.228-.396-.228-.732-.28.336-.608.58-.984.732a3.265 3.265 0 0 1-1.2.216c-.28 0-.548-.032-.804-.096a1.859 1.859 0 0 1-.648-.3 1.508 1.508 0 0 1-.444-.528 1.897 1.897 0 0 1-.156-.804c0-.352.06-.64.18-.864a1.54 1.54 0 0 1 .468-.54c.2-.144.424-.252.672-.324.256-.072.516-.132.78-.18.28-.056.544-.096.792-.12.256-.032.48-.072.672-.12.192-.056.344-.132.456-.228.112-.104.168-.252.168-.444 0-.224-.044-.404-.132-.54a.81.81 0 0 0-.324-.312 1.261 1.261 0 0 0-.444-.144 3.232 3.232 0 0 0-.48-.036c-.432 0-.792.084-1.08.252-.288.16-.444.468-.468.924h-1.02c.016-.384.096-.708.24-.972s.336-.476.576-.636c.24-.168.512-.288.816-.36a4.42 4.42 0 0 1 .996-.108c.28 0 .556.02.828.06.28.04.532.124.756.252.224.12.404.292.54.516.136.224.204.516.204.876v3.192c0 .24.012.416.036.528.032.112.128.168.288.168.088 0 .192-.02.312-.06v.792zm-1.656-3.18a1.332 1.332 0 0 1-.504.216c-.208.04-.428.076-.66.108-.224.024-.452.056-.684.096-.232.032-.44.088-.624.168a1.16 1.16 0 0 0-.456.348c-.112.144-.168.344-.168.6 0 .168.032.312.096.432.072.112.16.204.264.276.112.072.24.124.384.156.144.032.296.048.456.048.336 0 .624-.044.864-.132.24-.096.436-.212.588-.348.152-.144.264-.296.336-.456.072-.168.108-.324.108-.468v-1.044zm2.52-3h1.02v.84h.025c.168-.344.432-.592.792-.744.36-.16.756-.24 1.188-.24.48 0 .896.088 1.248.264.36.176.656.416.888.72.24.296.42.64.54 1.032.12.392.18.808.18 1.248 0 .44-.06.856-.18 1.248a2.87 2.87 0 0 1-.528 1.032 2.45 2.45 0 0 1-.888.684c-.352.168-.764.252-1.236.252-.152 0-.324-.016-.516-.048a2.856 2.856 0 0 1-.552-.156 2.43 2.43 0 0 1-.528-.288 1.774 1.774 0 0 1-.408-.468h-.024v3.192h-1.02v-8.568zm4.801 3.048c0-.288-.04-.568-.12-.84a2.124 2.124 0 0 0-.348-.744 1.638 1.638 0 0 0-.6-.516 1.786 1.786 0 0 0-.852-.192c-.344 0-.636.068-.876.204-.24.136-.436.316-.588.54a2.256 2.256 0 0 0-.336.744c-.064.28-.096.564-.096.852 0 .304.036.6.108.888.072.28.184.528.336.744.16.216.364.392.612.528.248.128.548.192.9.192s.644-.068.876-.204c.24-.136.432-.316.576-.54a2.35 2.35 0 0 0 .312-.768c.064-.288.096-.584.096-.888zm2.193-3.048h1.02v.84h.024c.168-.344.432-.592.792-.744.36-.16.756-.24 1.188-.24.48 0 .896.088 1.248.264.36.176.656.416.888.72.24.296.42.64.54 1.032.12.392.18.808.18 1.248 0 .44-.06.856-.18 1.248a2.87 2.87 0 0 1-.528 1.032 2.45 2.45 0 0 1-.888.684c-.352.168-.764.252-1.236.252-.152 0-.324-.016-.516-.048a2.856 2.856 0 0 1-.552-.156 2.43 2.43 0 0 1-.528-.288 1.774 1.774 0 0 1-.408-.468h-.024v3.192h-1.02v-8.568zm4.8 3.048c0-.288-.04-.568-.12-.84a2.124 2.124 0 0 0-.348-.744 1.638 1.638 0 0 0-.6-.516 1.786 1.786 0 0 0-.852-.192c-.344 0-.636.068-.876.204-.24.136-.436.316-.588.54a2.256 2.256 0 0 0-.336.744c-.064.28-.096.564-.096.852 0 .304.036.6.108.888.072.28.184.528.336.744.16.216.364.392.612.528.248.128.548.192.9.192s.644-.068.876-.204c.24-.136.432-.316.576-.54a2.35 2.35 0 0 0 .312-.768c.064-.288.096-.584.096-.888z", fill: "#3B82F6", style: {
47
- fill: "color(display-p3 .2314 .5098 .9647)",
48
- fillOpacity: 1
49
- } }), /* @__PURE__ */ e.createElement("path", { d: "m290.5 83-5-2.887v5.774l5-2.887zm-151.5.5h1.01v-1H139v1zm5.05 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1zm6.06 0h2.02v-1h-2.02v1z", fill: "#030712", style: {
50
- fill: "color(display-p3 .0118 .0275 .0706)",
51
- fillOpacity: 1
52
- } }), /* @__PURE__ */ e.createElement("circle", { cx: 254, cy: 83, r: 15.5, fill: "#25C99B", stroke: "#fff", style: {
53
- fill: "color(display-p3 .1451 .7882 .6078)",
54
- fillOpacity: 1,
55
- stroke: "#fff",
56
- strokeOpacity: 1
57
- } }), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M249.8 82.6a1.4 1.4 0 1 1-2.8 0 1.4 1.4 0 0 1 2.8 0zm5.6 0a1.4 1.4 0 1 1-2.8 0 1.4 1.4 0 0 1 2.8 0zm4.2 1.4a1.4 1.4 0 1 0 0-2.8 1.4 1.4 0 0 0 0 2.8z", fill: "#fff", style: {
58
- fill: "#fff",
59
- fillOpacity: 1
60
- } }), /* @__PURE__ */ e.createElement("circle", { cx: 227, cy: 83, r: 15.5, fill: "#3B82F6", stroke: "#fff", style: {
61
- fill: "color(display-p3 .2314 .5098 .9647)",
62
- fillOpacity: 1,
63
- stroke: "#fff",
64
- strokeOpacity: 1
65
- } }), /* @__PURE__ */ e.createElement("path", { d: "m230 81 4.553-2.276a1 1 0 0 1 1.447.894v6.764a1 1 0 0 1-1.447.894L230 85v-4zm-12-2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2v-8z", fill: "#3B82F6", style: {
66
- fill: "color(display-p3 .2314 .5098 .9647)",
67
- fillOpacity: 1
68
- } }), /* @__PURE__ */ e.createElement("path", { d: "m230 81 4.553-2.276a1 1 0 0 1 1.447.894v6.764a1 1 0 0 1-1.447.894L230 85v-4zm-12-2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2v-8z", stroke: "#fff", style: {
69
- stroke: "#fff",
70
- strokeOpacity: 1
71
- }, strokeWidth: 1.4, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("circle", { cx: 200, cy: 83, r: 15.5, fill: "#25C99B", stroke: "#fff", style: {
72
- fill: "color(display-p3 .1451 .7882 .6078)",
73
- fillOpacity: 1,
74
- stroke: "#fff",
75
- strokeOpacity: 1
76
- } }), /* @__PURE__ */ e.createElement("path", { d: "M202 74v4a.998.998 0 0 0 1 1h4m-5-5h-7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V79m-5-5 5 5m-9 5-1 2 1 2m4-4 1 2-1 2", stroke: "#fff", style: {
77
- stroke: "#fff",
78
- strokeOpacity: 1
79
- }, strokeWidth: 1.4, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("circle", { cx: 173, cy: 83, r: 15.5, fill: "#3B82F6", stroke: "#fff", style: {
80
- fill: "color(display-p3 .2314 .5098 .9647)",
81
- fillOpacity: 1,
82
- stroke: "#fff",
83
- strokeOpacity: 1
84
- } }), /* @__PURE__ */ e.createElement("path", { d: "M175.667 79.444h.009M165 86.555l4.444-4.444c.825-.794 1.842-.794 2.667 0l4.445 4.444m-1.778-1.777.889-.89c.825-.793 1.841-.793 2.666 0L181 86.556m-16-8.888A2.667 2.667 0 0 1 167.667 75h10.666A2.666 2.666 0 0 1 181 77.667v10.666A2.667 2.667 0 0 1 178.333 91h-10.666A2.666 2.666 0 0 1 165 88.333V77.667z", stroke: "#fff", style: {
85
- stroke: "#fff",
86
- strokeOpacity: 1
87
- }, strokeWidth: 1.4, strokeLinecap: "round", strokeLinejoin: "round" })), /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("clipPath", { id: "a" }, /* @__PURE__ */ e.createElement("path", { fill: "#fff", style: {
88
- fill: "#fff",
89
- fillOpacity: 1
90
- }, d: "M0 0h440v167H0z" })), /* @__PURE__ */ e.createElement("clipPath", { id: "c" }, /* @__PURE__ */ e.createElement("path", { fill: "#fff", style: {
91
- fill: "#fff",
92
- fillOpacity: 1
93
- }, transform: "rotate(90 311 129)", d: "M0 0h394v439H0z" })), /* @__PURE__ */ e.createElement("filter", { id: "f", x: 28, y: 40, width: 109, height: 80, filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" }, /* @__PURE__ */ e.createElement("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }), /* @__PURE__ */ e.createElement("feGaussianBlur", { in: "BackgroundImageFix", stdDeviation: 2 }), /* @__PURE__ */ e.createElement("feComposite", { in2: "SourceAlpha", operator: "in", result: "effect1_backgroundBlur_6169_38" }), /* @__PURE__ */ e.createElement("feBlend", { in: "SourceGraphic", in2: "effect1_backgroundBlur_6169_38", result: "shape" })), /* @__PURE__ */ e.createElement("filter", { id: "g", x: 290, y: 40, width: 109, height: 80, filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" }, /* @__PURE__ */ e.createElement("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }), /* @__PURE__ */ e.createElement("feGaussianBlur", { in: "BackgroundImageFix", stdDeviation: 2 }), /* @__PURE__ */ e.createElement("feComposite", { in2: "SourceAlpha", operator: "in", result: "effect1_backgroundBlur_6169_38" }), /* @__PURE__ */ e.createElement("feBlend", { in: "SourceGraphic", in2: "effect1_backgroundBlur_6169_38", result: "shape" })), /* @__PURE__ */ e.createElement("radialGradient", { id: "e", cx: 0, cy: 0, r: 1, gradientUnits: "userSpaceOnUse", gradientTransform: "matrix(-279.909 0 0 -295.974 226.706 -8.946)" }, /* @__PURE__ */ e.createElement("stop", { stopColor: "#F6FAFF", style: {
94
- stopColor: "color(display-p3 .963 .9821 1)",
95
- stopOpacity: 1
96
- } }), /* @__PURE__ */ e.createElement("stop", { offset: 1, stopColor: "#8EC7FF", stopOpacity: 0, style: {
97
- stopColor: "none",
98
- stopOpacity: 0
99
- } })), /* @__PURE__ */ e.createElement("linearGradient", { id: "b", x1: 440, y1: 15, x2: 0, y2: 159.5, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ e.createElement("stop", { stopColor: "#A2B7FF", style: {
100
- stopColor: "color(display-p3 .6353 .7189 .9997)",
101
- stopOpacity: 1
102
- } }), /* @__PURE__ */ e.createElement("stop", { offset: 0.634, stopColor: "#E7F4FC", style: {
103
- stopColor: "color(display-p3 .9059 .9569 .9882)",
104
- stopOpacity: 1
105
- } }), /* @__PURE__ */ e.createElement("stop", { offset: 1, stopColor: "#8BC0FF", style: {
106
- stopColor: "color(display-p3 .5451 .7547 1)",
107
- stopOpacity: 1
108
- } }))));
109
- export {
110
- h as default
111
- };
@@ -1,9 +0,0 @@
1
- import * as e from "react";
2
- const i = (l) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("g", { id: "icon" }, /* @__PURE__ */ e.createElement("path", { id: "Union", fillRule: "evenodd", clipRule: "evenodd", d: "M14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8ZM15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM10.6585 6.75529C10.852 6.55827 10.8491 6.2417 10.6521 6.04821C10.4551 5.85472 10.1385 5.85759 9.94501 6.05461L7.16878 8.88151L5.95903 7.64968C5.76554 7.45266 5.44897 7.4498 5.25195 7.64329C5.05493 7.83678 5.05207 8.15335 5.24556 8.35037L6.81204 9.94545C6.90606 10.0412 7.0346 10.0951 7.16878 10.0951C7.30296 10.0951 7.4315 10.0412 7.52552 9.94545L10.6585 6.75529Z", fill: "#3B82F6", style: {
3
- fill: "#3B82F6",
4
- fill: "color(display-p3 0.2314 0.5098 0.9647)",
5
- fillOpacity: 1
6
- } })));
7
- export {
8
- i as default
9
- };
@@ -1,5 +0,0 @@
1
- import { createContext as t } from "react";
2
- const e = t();
3
- export {
4
- e as SessionContext
5
- };
@@ -1,136 +0,0 @@
1
- import { jsx as o, jsxs as r } from "react/jsx-runtime";
2
- import { useState as p } from "react";
3
- import { Dialog as S, DialogTitle as h, Typography as l, DialogContent as C, ImageListItem as b, Stack as y, Box as G, DialogActions as D, Button as v, CircularProgress as w } from "@mui/material";
4
- import { useReactive as k, useCreation as z } from "ahooks";
5
- import u from "prop-types";
6
- import f from "lodash/isUndefined";
7
- import I from "lodash/noop";
8
- import O from "./assets/did-spaces-guide-cover.svg.js";
9
- import j from "./assets/did-spaces-guide-icon.svg.js";
10
- import { useLocale as F } from "../hooks/use-locale.js";
11
- import { t as n } from "../locales/index.js";
12
- import T from "./hooks/use-mobile.js";
13
- function m({ ...d }) {
14
- const i = Object.assign({}, d);
15
- f(i.open) && (i.open = !1), f(i.onConnect) && (i.onConnect = I);
16
- const e = F(), s = T(), t = k({
17
- loading: !1
18
- }), c = z(() => [
19
- n("didSpacesGuide.feature.dataSecurity", e),
20
- n("didSpacesGuide.feature.dataSharing", e),
21
- n("didSpacesGuide.feature.dataSync", e),
22
- n("didSpacesGuide.feature.dataIntegration", e)
23
- ], []);
24
- return /* @__PURE__ */ r(
25
- S,
26
- {
27
- disableEscapeKeyDown: !0,
28
- "aria-labelledby": "alert-dialog-title",
29
- "aria-describedby": "alert-dialog-description",
30
- open: i.open,
31
- children: [
32
- /* @__PURE__ */ r(h, { id: "alert-dialog-title", children: [
33
- /* @__PURE__ */ o(
34
- l,
35
- {
36
- sx: {
37
- fontSize: "20px",
38
- fontWeight: "500"
39
- },
40
- children: n("didSpacesGuide.title", e)
41
- }
42
- ),
43
- /* @__PURE__ */ o(
44
- l,
45
- {
46
- sx: {
47
- fontSize: "14px",
48
- fontWeight: "300",
49
- color: "#9397A1"
50
- },
51
- children: n("didSpacesGuide.description", e)
52
- }
53
- )
54
- ] }),
55
- /* @__PURE__ */ r(C, { sx: { padding: "12px 20px !important" }, children: [
56
- /* @__PURE__ */ o(b, { sx: { width: "100%" }, children: /* @__PURE__ */ o(O, { style: { width: "100%", height: s ? "100%" : "167px" } }) }),
57
- /* @__PURE__ */ o(
58
- y,
59
- {
60
- direction: "row",
61
- sx: {
62
- justifyContent: "space-between",
63
- width: "100%",
64
- padding: "16px",
65
- mt: 1,
66
- backgroundColor: "#F6F6F6",
67
- borderRadius: "8px"
68
- },
69
- children: c.map((a) => /* @__PURE__ */ r(G, { sx: { display: "flex", flex: 1, padding: "auto 16px" }, children: [
70
- /* @__PURE__ */ o(j, { size: "16px" }),
71
- /* @__PURE__ */ o(
72
- l,
73
- {
74
- variant: "body1",
75
- sx: {
76
- marginLeft: "1.5px",
77
- color: "#030712",
78
- fontFamily: "Helvetica Neue",
79
- fontSize: "12px",
80
- fontStyle: "normal",
81
- fontWeight: "400",
82
- lineHeight: "normal",
83
- letterSpacing: "-0.12px"
84
- },
85
- children: a
86
- }
87
- )
88
- ] }, a))
89
- }
90
- )
91
- ] }),
92
- /* @__PURE__ */ o(D, { children: /* @__PURE__ */ r(
93
- v,
94
- {
95
- variant: "contained",
96
- size: "small",
97
- onClick: () => {
98
- t.loading = !0, i.onConnect(() => {
99
- t.loading = !1;
100
- });
101
- },
102
- sx: {
103
- boxShadow: "none"
104
- },
105
- disabled: t.loading,
106
- children: [
107
- t.loading ? /* @__PURE__ */ o(w, { color: "inherit", size: 12, sx: { mr: 1 } }) : null,
108
- n("didSpacesGuide.connectNow", e)
109
- ]
110
- }
111
- ) })
112
- ]
113
- }
114
- );
115
- }
116
- m.propTypes = {
117
- open: u.bool,
118
- onConnect: u.func
119
- };
120
- function U(d = {}) {
121
- const [i, e] = p(!1), [s, t] = p(() => {
122
- }), c = () => {
123
- e(!0);
124
- }, a = () => {
125
- e(!1);
126
- }, g = (x) => {
127
- t(() => x);
128
- };
129
- return {
130
- DidSpacesGuideView: /* @__PURE__ */ o(m, { ...d, open: i, onConnect: s }),
131
- didSpacesGuideApi: { open: c, close: a, onConnect: g }
132
- };
133
- }
134
- export {
135
- U as default
136
- };
@@ -1,55 +0,0 @@
1
- import { ReactGA as t } from "@arcblock/ux/lib/withTracker";
2
- import { GA_LAST_LOGIN_METHOD as n, GA_LAST_ROLE as l, GA_LAST_SOURCE_PROVIDER as i } from "@arcblock/ux/lib/withTracker/constant";
3
- const S = () => {
4
- const e = {
5
- action: "loginSuccess",
6
- provider: localStorage.getItem(n),
7
- success: !0
8
- };
9
- t.event(e.action, e);
10
- }, v = (e) => {
11
- const s = {
12
- action: "loginFailed",
13
- provider: localStorage.getItem(n),
14
- success: !1,
15
- errorMessage: e.message
16
- };
17
- t.event(s.action, s);
18
- }, p = (e, s, o) => {
19
- const c = localStorage.getItem(l), r = o?.user?.role, a = {
20
- action: "switchPassportSuccess",
21
- change: `${c} -> ${r}`,
22
- success: !0
23
- };
24
- t.event(a.action, a);
25
- }, m = (e) => {
26
- const s = {
27
- action: "switchPassportFailed",
28
- success: !1,
29
- errorMessage: e.message
30
- };
31
- t.event(s.action, s);
32
- }, _ = (e, s, o) => {
33
- const c = {
34
- action: "bindWalletSuccess",
35
- provider: o?.user?.sourceProvider,
36
- success: !0
37
- };
38
- t.event(c.action, c);
39
- }, E = (e) => {
40
- const s = {
41
- action: "bindWalletFailed",
42
- provider: localStorage.getItem(i),
43
- success: !1,
44
- errorMessage: e.message
45
- };
46
- t.event(s.action, s);
47
- };
48
- export {
49
- E as gaBindWalletFailedHandler,
50
- _ as gaBindWalletSuccessHandler,
51
- v as gaLoginFailedHandler,
52
- S as gaLoginSuccessHandler,
53
- m as gaSwitchPassportFailedHandler,
54
- p as gaSwitchPassportSuccessHandler
55
- };
@@ -1,64 +0,0 @@
1
- import { useReactive as y, useMemoizedFn as I } from "ahooks";
2
- import { getFederatedEnabled as w, getMaster as h, getConfig as L } from "@arcblock/ux/lib/Util/federated";
3
- import b from "lodash/noop";
4
- import { loginFederatedMaster as n } from "../libs/federated.js";
5
- const s = {
6
- zh: {
7
- notFoundFederatedInfo: "未发现统一登录的信息",
8
- autoLoginFederatedFailed: "自动登录统一登录账号失败",
9
- manualLoginFederatedFailed: "手动登录统一登录账号失败"
10
- },
11
- en: {
12
- notFoundFederatedInfo: "No federated login info detected",
13
- autoLoginFederatedFailed: "Auto login federated account failed",
14
- manualLoginFederatedFailed: "Manual login federated account failed"
15
- }
16
- };
17
- function k({ locale: a, handleLoginResult: i, login: f, handleRefreshUser: u }) {
18
- const F = y({
19
- federatedMaster: null
20
- }), g = w(), l = h(), m = L(), c = I(
21
- async (d = b, p = {}, t = {}) => {
22
- typeof t == "string" && (t = { origin: t });
23
- let { mode: r = "auto", ...M } = p;
24
- if (t.mode && (r = t.mode), r === "auto") {
25
- if (!g)
26
- throw new Error(s[a].notFoundFederatedInfo);
27
- try {
28
- const e = await n({ appId: globalThis.blocklet.appId }, { fetchToken: !1 });
29
- i({ ...e, encrypted: !1 }), await u({ showProgress: !0 }), d();
30
- } catch (e) {
31
- const o = e?.response ? e.response?.data : e?.message;
32
- d(o || s[a].autoLoginFederatedFailed);
33
- }
34
- } else if (r === "manual")
35
- try {
36
- f(
37
- async () => {
38
- await n(
39
- // FIXME: @zhanghan 当 connect 组件使用不同的 baseUrl 时,不应该直接从 window.blocklet 去取值
40
- { appId: globalThis.blocklet.appId, onlyWriteCookie: !0 }
41
- ), d();
42
- },
43
- { ...M },
44
- t
45
- );
46
- } catch (e) {
47
- const o = e?.response ? e.response?.data : e?.message;
48
- d(o || s[a].autoLoginFederatedFailed);
49
- }
50
- },
51
- [u, f, a, i]
52
- );
53
- return {
54
- master: l,
55
- config: m,
56
- federatedMaster: F.federatedMaster,
57
- federatedEnabled: g,
58
- loginFederated: c,
59
- loginFederatedMaster: n
60
- };
61
- }
62
- export {
63
- k as default
64
- };
@@ -1,8 +0,0 @@
1
- import { useTheme as t, useMediaQuery as r } from "@mui/material";
2
- function u(e = "sm") {
3
- const o = t();
4
- return r(o.breakpoints.down(e));
5
- }
6
- export {
7
- u as default
8
- };
@@ -1,11 +0,0 @@
1
- import { useCreation as n, useMemoizedFn as r } from "ahooks";
2
- import a from "path-to-regexp";
3
- function u({ protectedRoutes: t = [] }) {
4
- const o = n(() => t.map((e) => a(e, [])), [t]);
5
- return {
6
- checkMatch: r((e = window.location.pathname) => o.some((c) => c.exec(e)))
7
- };
8
- }
9
- export {
10
- u as default
11
- };
@@ -1,181 +0,0 @@
1
- import { useState as M } from "react";
2
- import { useCreation as N, useMemoizedFn as c, useInterval as se } from "ahooks";
3
- import { joinURL as O, withQuery as te } from "ufo";
4
- import T from "js-cookie";
5
- import { setVisitorId as ie, getCookieOptions as ce } from "@arcblock/ux/lib/Util";
6
- import fe from "jwt-decode";
7
- import le from "@arcblock/ux/lib/Toast";
8
- import ue from "p-retry";
9
- import ae from "lodash/noop";
10
- import { ReactGA as de } from "@arcblock/ux/lib/withTracker";
11
- import { GA_LAST_SOURCE_PROVIDER as ke } from "@arcblock/ux/lib/withTracker/constant";
12
- import Te from "../../Service/index.js";
13
- import { createAxios as he, debugTmp as C, getBrowserLang as me, logger as b, debug as u, sleep as pe, debugTmpInterval as z, decrypt as Re } from "../../utils.js";
14
- import { CHECK_INTERVAL_TIME as h, LANG_COOKIE_NAME as ye } from "../../constant.js";
15
- class m extends Error {
16
- }
17
- const ve = 10, p = (e) => Re(e, localStorage.getItem("__encKey"), localStorage.getItem("__decKey"));
18
- function qe({
19
- state: e,
20
- pageState: i,
21
- serviceHost: R,
22
- sessionTokenStorage: V,
23
- csrfTokenStorage: P,
24
- refreshTokenStorage: q,
25
- lazyRefreshToken: j,
26
- apiOptions: B = {},
27
- onRefresh: $ = ae
28
- }) {
29
- const [D, y] = M(0), [Q, d] = M(h), { getToken: v, setToken: g, removeToken: X } = V, { setToken: Y } = P, { getToken: w, setToken: S, removeToken: J } = q, W = N(() => he({
30
- baseURL: R,
31
- timeout: 10 * 1e3,
32
- secure: !0
33
- }), [R]), k = () => {
34
- C("[removeToken] useSessionToken -> removeToken"), X(), J();
35
- }, _ = N(() => Te(
36
- {
37
- sessionTokenStorage: V,
38
- refreshTokenStorage: q,
39
- serviceHost: R,
40
- authServicePrefix: i.prefix,
41
- onRefreshTokenError() {
42
- C("[removeToken] useSessionToken -> createService: onRefreshTokenError"), k(), e.user && (e.user = null);
43
- }
44
- },
45
- B
46
- ), [R, i.prefix]), I = () => {
47
- const r = ce({ returnDomain: !1 });
48
- T.remove("connected_did", r), T.remove("connected_pk", r), T.remove("connected_app", r), T.remove("connected_wallet_os", r), z("[removeToken] clearSession-interval"), k();
49
- }, Z = c(() => {
50
- const r = T.get(ye) || me();
51
- r !== i.currentLocale && (i.currentLocale = r);
52
- }), H = c(async () => {
53
- const r = () => _.get(O(i.notificationPrefix, "/unread-count"));
54
- try {
55
- const { data: n } = await r();
56
- return n.unReadCount;
57
- } catch (n) {
58
- return console.error("getUnreadCount error", n), 0;
59
- }
60
- }), F = c(
61
- async ({ showProgress: r = !1, requestFn: n = null, onlyRefreshToken: t = !1, type: s = "refreshToken" }) => {
62
- try {
63
- if (e.loading)
64
- return console.warn("SessionProvider.refresh is currently in progress, call it will be noop"), { loading: !0 };
65
- r && (e.loading = !0);
66
- const { data: o, status: f } = await n(), a = o?.user?.did;
67
- if (a && de.set({
68
- user_id: a
69
- }), o?.user?.sourceProvider && localStorage.setItem(ke, o.user.sourceProvider), f === 400 && (C("[removeToken] useSessionToken -> _refresh: status 400"), k(), e.user = null, e.error = ""), o.error)
70
- throw e.error = o.error, e.open = !1, e.unReadCount = 0, new Error(o.error);
71
- if (o.user) {
72
- try {
73
- const l = await H();
74
- e.unReadCount = l || 0;
75
- } catch (l) {
76
- b.error("getUnreadCount error", l), e.unReadCount = 0;
77
- }
78
- o.nextToken && (g(o.nextToken), $({
79
- type: s,
80
- sessionToken: o.nextToken,
81
- refreshToken: o.nextRefreshToken,
82
- user: o.user
83
- }), o.nextRefreshToken && S(o.nextRefreshToken)), t || (e.open = !1, e.user = o.user, e.provider = o.provider, e.walletOS = o.walletOS), v() || le.error("Can't write session token, please use https url to access this page");
84
- } else
85
- throw r && (e.loading = i.autoConnect), e.open = i.autoConnect, e.user = null, e.provider = "", e.walletOS = "", e.unReadCount = 0, new m("Invalid token");
86
- return { data: o, status: f };
87
- } catch (o) {
88
- throw b.error("SessionProvider.refresh error", o), e.open = !1, e.error = o.message, o?.response?.status === 400 ? new m("Invalid token") : o;
89
- } finally {
90
- r && (e.loading = !1);
91
- }
92
- }
93
- ), x = c(async (r = !1, n = !1) => {
94
- u("handleRefreshToken", { showProgress: r, onlyRefreshToken: n });
95
- const t = () => W.post(te(O(i.prefix, "/refreshSession")), null, {
96
- headers: {
97
- authorization: `Bearer ${encodeURIComponent(w())}`
98
- }
99
- });
100
- d(void 0);
101
- try {
102
- await F({ showProgress: r, requestFn: t, onlyRefreshToken: n, type: "refreshToken" }), y(0), d(h);
103
- } catch (s) {
104
- s instanceof m ? (console.warn("refresh token failed, remove all tokens"), y(0), C("[removeToken] useSessionToken -> handleRefreshToken: refresh token failed, remove all tokens"), k(), d(h)) : (b.error("refresh token failed, unexpected error:", s), y(D + 1), await pe(h), D >= ve ? (y(0), d(void 0)) : d(h));
105
- }
106
- }), G = c((r = !1) => {
107
- if (j)
108
- return;
109
- const n = v();
110
- let t = r;
111
- const s = (/* @__PURE__ */ new Date()).getTime();
112
- if (n)
113
- try {
114
- const { exp: o, iat: f } = fe(n);
115
- o * 1e3 - s < s - f * 1e3 && (t = !0);
116
- } catch {
117
- t = !0;
118
- }
119
- else
120
- t = !0;
121
- t && (w() ? x(!1, !0) : (z("[clearSession-interval] useSessionToken -> checkToken: empty refreshToken"), I(), e.user && (e.user = null)));
122
- }), K = c(async ({ showProgress: r = !1, forceRefreshToken: n = !1 } = {}) => {
123
- const t = () => ue(() => _.get(O(i.prefix, "/session"), { secure: !0 }), {
124
- retries: 2
125
- });
126
- u("handleRefreshUser", { showProgress: r, forceRefreshToken: n });
127
- try {
128
- if (n)
129
- throw new m("need force refresh token");
130
- await F({ showProgress: r, requestFn: t, type: "refreshUser" });
131
- } catch (s) {
132
- s instanceof m && (u("handleRefreshUser failed, try to refresh token", { err: s }), await x());
133
- }
134
- }), ee = c(async () => {
135
- const r = v(), n = w();
136
- e.user || (r || n ? await K() : (u("[clearSession] syncSessionSate: empty sessionToken and refreshToken"), I(), e.user && (e.user = null)));
137
- }), re = c(() => {
138
- if (e.initialized && e.user)
139
- try {
140
- G();
141
- } catch {
142
- }
143
- }), oe = c((r) => {
144
- const n = Array.isArray(r) ? r[0] : r;
145
- u("handleLoginResult", { loginResult: n, result: r });
146
- const { loginToken: t, csrfToken: s, sessionToken: o, refreshToken: f, visitorId: a, encrypted: l = !0 } = n, L = t || o;
147
- let E, U, A;
148
- if (L) {
149
- if (E = l ? p(L) : L, u("handleLoginResult: setSessionToken", { decryptSessionToken: E }), g(E), s) {
150
- const ne = l ? p(s) : s;
151
- Y(ne);
152
- }
153
- f && (U = l ? p(f) : f, u("handleLoginResult: setRefreshToken", { decryptRefreshToken: U }), S(U));
154
- }
155
- a && (A = l ? p(a) : a, u("handleLoginResult: setVisitorId", { decryptVisitorId: A }), ie(A));
156
- });
157
- return se(
158
- () => {
159
- Z(), G();
160
- },
161
- Q,
162
- { immediate: !0 }
163
- ), {
164
- renewToken: re,
165
- handleRefreshUser: K,
166
- handleRefreshToken: x,
167
- syncSessionSate: ee,
168
- handleLoginResult: oe,
169
- decrypt: p,
170
- removeToken: k,
171
- clearSession: I,
172
- getSessionToken: v,
173
- getRefreshToken: w,
174
- setRefreshToken: S,
175
- setSessionToken: g,
176
- service: _
177
- };
178
- }
179
- export {
180
- qe as default
181
- };