@huyooo/ui 2.2.1 → 2.2.3

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 (45) hide show
  1. package/dist/{AuthkitAppSetting-CHVSyEY1.js → AuthkitAppSetting-DkkEPenO.js} +8 -8
  2. package/dist/{Contact-BTQf8tEx.js → Contact-CtfToLPT.js} +3 -3
  3. package/dist/{CustomTable-BY0oHLXc.js → CustomTable-B1KjkixL.js} +1 -1
  4. package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-FIZdBxIZ.js → FeedbackModal.vue_vue_type_script_setup_true_lang-DIIH9PCN.js} +5 -5
  5. package/dist/{LegalDocViewer-DiNoy_oj.js → LegalDocViewer-DZDBRGrC.js} +202 -200
  6. package/dist/{MessageHandle-DDGFSJMg.js → MessageHandle-BKMBtqZM.js} +3 -3
  7. package/dist/{MessageList-CE5E_5Uv.js → MessageList-BK4u5DCH.js} +1 -1
  8. package/dist/{PaySubscriptions-Du9QWvlH.js → PaySubscriptions-OZ6OFeQJ.js} +7 -7
  9. package/dist/{PricingPlans-BEhWsV2D.js → PricingPlans-BdG0qYFZ.js} +4 -4
  10. package/dist/{ReferrerReferees-t5s4LzbY.js → ReferrerReferees-d4JByWcG.js} +4 -4
  11. package/dist/{Upload.vue_vue_type_script_setup_true_lang-DsrqOACa.js → Upload.vue_vue_type_script_setup_true_lang-DtciAodp.js} +1 -1
  12. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BrauYUc_.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BpQa21qc.js} +10 -10
  13. package/dist/{WidthContainer-CiabzONI.js → WidthContainer-50pahbfe.js} +10 -10
  14. package/dist/apiClients-8_c5cDW5.js +276 -0
  15. package/dist/authkit.js +10 -10
  16. package/dist/common/globalConfig.d.ts +15 -0
  17. package/dist/common.js +2 -2
  18. package/dist/composables.js +13 -13
  19. package/dist/feedback.js +2 -2
  20. package/dist/fetchAuthPageAboutUs-B6ZZylgG.js +32 -0
  21. package/dist/{index-BYH7DaQf.js → index-D9YtlhTa.js} +1 -1
  22. package/dist/main.js +31 -31
  23. package/dist/message.js +5 -5
  24. package/dist/pay.js +5 -5
  25. package/dist/privateCom.js +1 -1
  26. package/dist/referrer.js +1 -1
  27. package/dist/{runtime-DDJRAtkv.js → runtime-B_xhJ3i8.js} +220 -212
  28. package/dist/style.css +1 -1
  29. package/dist/upload.js +2 -2
  30. package/dist/{useAuthkitAppsAuthPageInfo-2izIyMfu.js → useAuthkitAppsAuthPageInfo-DPCwzF7j.js} +17 -15
  31. package/dist/{useAuthkitAuth-CWHJs8zY.js → useAuthkitAuth-C6GGWqSb.js} +2 -2
  32. package/dist/{useAuthkitCreateAndUpdate-COI5KVPJ.js → useAuthkitCreateAndUpdate-CYIcEuub.js} +1 -1
  33. package/dist/{useAuthkitUsersProfile-D4H_Gxgd.js → useAuthkitUsersProfile-Bzr0IVmJ.js} +3 -3
  34. package/dist/{useBillingStatusOptions-C6edto7H.js → useBillingStatusOptions-C8fwW-AI.js} +1 -1
  35. package/dist/{useBillingSubscriptionSummary-BC3G0N4t.js → useBillingSubscriptionSummary-C2E3p68U.js} +1 -1
  36. package/dist/{useEnsureAuthenticated-RZ1DflLz.js → useEnsureAuthenticated-z30FlElo.js} +2 -2
  37. package/dist/{useLegalDocs-xXYvYpPC.js → useLegalDocs-CWBqi9Ce.js} +2 -2
  38. package/dist/{useMessageNotifications-pxa5LHjV.js → useMessageNotifications-BXimltcx.js} +1 -1
  39. package/dist/{usePageSEO-B3stKP3n.js → usePageSEO-D7eyLr8d.js} +2 -2
  40. package/dist/{useRoutePermission-CGq_LIZM.js → useRoutePermission-CZ7hHcZy.js} +3 -3
  41. package/dist/{useSubscriptionCheckout-CZZLk_1d.js → useSubscriptionCheckout-CnbX1bFi.js} +3 -3
  42. package/dist/user.js +1 -1
  43. package/package.json +1 -1
  44. package/dist/apiClients-CWSwNzGk.js +0 -272
  45. package/dist/fetchAuthPageAboutUs-CLQlGhQy.js +0 -25
package/dist/upload.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as o } from "./Upload.vue_vue_type_script_setup_true_lang-DsrqOACa.js";
2
- import { b as s, d as p } from "./runtime-DDJRAtkv.js";
1
+ import { _ as o } from "./Upload.vue_vue_type_script_setup_true_lang-DtciAodp.js";
2
+ import { b as s, d as p } from "./runtime-B_xhJ3i8.js";
3
3
  export {
4
4
  o as Upload,
5
5
  s as createBrowserCosTransport,
@@ -1,5 +1,6 @@
1
1
  import { ref as r } from "vue";
2
- import { g as s } from "./apiClients-CWSwNzGk.js";
2
+ import { g as u } from "./apiClients-8_c5cDW5.js";
3
+ import { g as s } from "./runtime-B_xhJ3i8.js";
3
4
  function i() {
4
5
  return {
5
6
  type: "doc",
@@ -8,13 +9,13 @@ function i() {
8
9
  }]
9
10
  };
10
11
  }
11
- function u(e) {
12
+ function p(e) {
12
13
  return e.type === "doc" && Array.isArray(e.content) && e.content.length > 0;
13
14
  }
14
15
  function a(e) {
15
- return typeof e == "string" || e == null ? i() : u(e) ? e : i();
16
+ return typeof e == "string" || e == null ? i() : p(e) ? e : i();
16
17
  }
17
- function p(e) {
18
+ function c(e) {
18
19
  return {
19
20
  personalInformationCollectionList: a(e.personalInformationCollectionList),
20
21
  thirdPartyInformationSharingList: a(e.thirdPartyInformationSharingList),
@@ -23,7 +24,7 @@ function p(e) {
23
24
  licenseInformation: a(e.licenseInformation)
24
25
  };
25
26
  }
26
- function c() {
27
+ function f() {
27
28
  const e = i();
28
29
  return {
29
30
  personalInformationCollectionList: e,
@@ -81,7 +82,7 @@ const o = r({
81
82
  }
82
83
  },
83
84
  authorizationCallback: "",
84
- aboutUs: c(),
85
+ aboutUs: f(),
85
86
  brand: {
86
87
  theme: "dark",
87
88
  logo: "",
@@ -92,24 +93,25 @@ const o = r({
92
93
  backgroundImage: "/66a0d5b35203890887f0e1a4/6714e2458fe86895bf3da8ae/1ef8ed72-1731-6e00-93d1-fa24165f1a3e.webp"
93
94
  }
94
95
  }), n = r(!1), t = r(!1);
95
- function f(e) {
96
- o.value.id = e.id, o.value.name = e.name, o.value.description = e.description, o.value.homePageUrl = e.homePageUrl, o.value.applicationLogo = e.applicationLogo, o.value.applicationLogoUrl = e.applicationLogoUrl, o.value.publicRoutes = e.publicRoutes || [], o.value.oauth = e.oauth, o.value.authMethods = e.authMethods || o.value.authMethods, o.value.signUpAuth = e.signUpAuth, o.value.registrationTerms = e.registrationTerms, o.value.authorizationCallback = e.authorizationCallback, o.value.aboutUs = p(e.aboutUs), o.value.brand = e.brand;
96
+ function g(e) {
97
+ o.value.id = e.id, o.value.name = e.name, o.value.description = e.description, o.value.homePageUrl = e.homePageUrl, o.value.applicationLogo = e.applicationLogo, o.value.applicationLogoUrl = e.applicationLogoUrl, o.value.publicRoutes = e.publicRoutes || [], o.value.oauth = e.oauth, o.value.authMethods = e.authMethods || o.value.authMethods, o.value.signUpAuth = e.signUpAuth, o.value.registrationTerms = e.registrationTerms, o.value.authorizationCallback = e.authorizationCallback, o.value.aboutUs = c(e.aboutUs), o.value.brand = e.brand;
97
98
  }
98
- async function g() {
99
+ async function h() {
99
100
  n.value = !0, t.value = !1;
100
101
  const {
101
102
  data: e,
102
103
  error: l
103
- } = await s().auth.apps.authPageInfo.post({
104
+ } = await u().auth.apps.authPageInfo.post({
105
+ clientKey: s().config.clientKey,
104
106
  meta: {
105
107
  silentError: !0
106
108
  }
107
109
  });
108
- n.value = !1, !(l || !e) && (f(e), t.value = !0);
110
+ n.value = !1, !(l || !e) && (g(e), t.value = !0);
109
111
  }
110
- function d() {
112
+ function v() {
111
113
  async function e() {
112
- t.value || n.value || await g();
114
+ t.value || n.value || await h();
113
115
  }
114
116
  return {
115
117
  appsData: o,
@@ -119,6 +121,6 @@ function d() {
119
121
  };
120
122
  }
121
123
  export {
122
- p as n,
123
- d as u
124
+ c as n,
125
+ v as u
124
126
  };
@@ -1,6 +1,6 @@
1
1
  import { ref as u, computed as h, nextTick as _, readonly as x } from "vue";
2
- import { o as M, g as m, r as $, s as F } from "./apiClients-CWSwNzGk.js";
3
- import { u as D } from "./useAuthkitAppsAuthPageInfo-2izIyMfu.js";
2
+ import { o as M, g as m, r as $, s as F } from "./apiClients-8_c5cDW5.js";
3
+ import { u as D } from "./useAuthkitAppsAuthPageInfo-DPCwzF7j.js";
4
4
  const g = u(!1), w = u(!1);
5
5
  let I;
6
6
  const G = "请先阅读并同意用户协议与隐私政策", K = {
@@ -1,5 +1,5 @@
1
1
  /* empty css */
2
- import "./apiClients-CWSwNzGk.js";
2
+ import "./apiClients-8_c5cDW5.js";
3
3
  import { Message as u } from "@arco-design/web-vue";
4
4
  import { ref as e } from "vue";
5
5
  function h(o) {
@@ -1,6 +1,6 @@
1
1
  import { ref as a, computed as i } from "vue";
2
- import { g as p } from "./apiClients-CWSwNzGk.js";
3
- import { u as l } from "./useAuthkitAuth-CWHJs8zY.js";
2
+ import { g as p } from "./apiClients-8_c5cDW5.js";
3
+ import { u as l } from "./useAuthkitAuth-C6GGWqSb.js";
4
4
  const e = a(null), n = a(!1), u = a(!1), s = a(!1);
5
5
  function v() {
6
6
  s.value = !0;
@@ -40,7 +40,7 @@ async function g() {
40
40
  if (e.value = r, r.subscription) {
41
41
  const {
42
42
  useBillingSubscriptionSummary: c
43
- } = await import("./useBillingSubscriptionSummary-BC3G0N4t.js");
43
+ } = await import("./useBillingSubscriptionSummary-C2E3p68U.js");
44
44
  c().hydrateFromProfile(r.subscription);
45
45
  }
46
46
  } else d(o == null ? void 0 : o.code) && (e.value = null, console.warn("认证已过期,清除认证状态"), f());
@@ -1,4 +1,4 @@
1
- import { g as s } from "./apiClients-CWSwNzGk.js";
1
+ import { g as s } from "./apiClients-8_c5cDW5.js";
2
2
  import { ref as c } from "vue";
3
3
  const v = {
4
4
  async productOptions() {
@@ -1,5 +1,5 @@
1
1
  import { ref as u, computed as t } from "vue";
2
- import { g as d } from "./apiClients-CWSwNzGk.js";
2
+ import { g as d } from "./apiClients-8_c5cDW5.js";
3
3
  function r() {
4
4
  return {
5
5
  syncedAt: "",
@@ -1,6 +1,6 @@
1
1
  import { computed as f } from "vue";
2
- import { u as r } from "./useAuthkitAuth-CWHJs8zY.js";
3
- import { u as d } from "./apiClients-CWSwNzGk.js";
2
+ import { u as r } from "./useAuthkitAuth-C6GGWqSb.js";
3
+ import { u as d } from "./apiClients-8_c5cDW5.js";
4
4
  const A = "jwtToken";
5
5
  let e = null, i = !1;
6
6
  async function h(n) {
@@ -1,6 +1,6 @@
1
1
  import { computed as f } from "vue";
2
- import { u as d } from "./useAuthkitAppsAuthPageInfo-2izIyMfu.js";
3
- import { g as L } from "./runtime-DDJRAtkv.js";
2
+ import { u as d } from "./useAuthkitAppsAuthPageInfo-DPCwzF7j.js";
3
+ import { g as L } from "./runtime-B_xhJ3i8.js";
4
4
  const c = {
5
5
  userServiceAgreement: "用户服务协议",
6
6
  privacyPolicy: "隐私协议",
@@ -1,5 +1,5 @@
1
1
  import { ref as a, computed as y } from "vue";
2
- import { g as f } from "./apiClients-CWSwNzGk.js";
2
+ import { g as f } from "./apiClients-8_c5cDW5.js";
3
3
  function z() {
4
4
  const n = a(!0), d = a(""), i = a(!1), g = a(!1), o = a([]), t = a({
5
5
  total: 0,
@@ -1,8 +1,8 @@
1
1
  /* empty css */
2
- import "./apiClients-CWSwNzGk.js";
2
+ import "./apiClients-8_c5cDW5.js";
3
3
  import { Message as y } from "@arco-design/web-vue";
4
4
  import { ref as a, computed as s, toValue as A } from "vue";
5
- import { u as N } from "./runtime-DDJRAtkv.js";
5
+ import { u as N } from "./runtime-B_xhJ3i8.js";
6
6
  import { useHead as g, useSeoMeta as w } from "@unhead/vue";
7
7
  import { useRoute as E } from "vue-router";
8
8
  function M(t) {
@@ -1,8 +1,8 @@
1
1
  import { computed as g, ref as L, watch as S } from "vue";
2
2
  import { useRouter as w, useRoute as C } from "vue-router";
3
- import { u as k } from "./useAuthkitAppsAuthPageInfo-2izIyMfu.js";
4
- import { u as M } from "./useAuthkitUsersProfile-D4H_Gxgd.js";
5
- import { u as K } from "./useAuthkitAuth-CWHJs8zY.js";
3
+ import { u as k } from "./useAuthkitAppsAuthPageInfo-DPCwzF7j.js";
4
+ import { u as M } from "./useAuthkitUsersProfile-Bzr0IVmJ.js";
5
+ import { u as K } from "./useAuthkitAuth-C6GGWqSb.js";
6
6
  function O(e, s = "default") {
7
7
  const n = document;
8
8
  if (n && typeof n.startViewTransition == "function") {
@@ -1,9 +1,9 @@
1
1
  import { ref as v, computed as S } from "vue";
2
- import { d as V } from "./useBillingStatusOptions-C6edto7H.js";
3
- import { g as $ } from "./apiClients-CWSwNzGk.js";
2
+ import { d as V } from "./useBillingStatusOptions-C8fwW-AI.js";
3
+ import { g as $ } from "./apiClients-8_c5cDW5.js";
4
4
  /* empty css */
5
5
  import { Message as b } from "@arco-design/web-vue";
6
- import { u as _ } from "./useEnsureAuthenticated-RZ1DflLz.js";
6
+ import { u as _ } from "./useEnsureAuthenticated-z30FlElo.js";
7
7
  function D(e) {
8
8
  var u;
9
9
  const i = (u = e == null ? void 0 : e.metadata) == null ? void 0 : u.originalPrice;
package/dist/user.js CHANGED
@@ -1,4 +1,4 @@
1
- import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BrauYUc_.js";
1
+ import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BpQa21qc.js";
2
2
  export {
3
3
  a as UserAccountMenu,
4
4
  n as UserAvatar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huyooo/ui",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
@@ -1,272 +0,0 @@
1
- import { eden as f, defineMiddleware as p, createClient as j } from "@vafast/api-client";
2
- /* empty css */
3
- import { Message as $ } from "@arco-design/web-vue";
4
- import { ref as M, computed as A } from "vue";
5
- function g(e, t = 3) {
6
- const n = e.indexOf("@");
7
- if (n > 1) {
8
- const o = e.slice(0, t), u = e.slice(n);
9
- return o + "***" + u;
10
- }
11
- return e;
12
- }
13
- function O(e) {
14
- const t = e.trim();
15
- return t.length < 7 ? t : `${t.slice(0, 3)}****${t.slice(-4)}`;
16
- }
17
- const z = {
18
- normal: "正常",
19
- pending: "待完善",
20
- forbidden: "已禁用",
21
- deleted: "已注销"
22
- };
23
- function se(e) {
24
- return e ? z[e] ?? e : "-";
25
- }
26
- function ue(e) {
27
- var n, o, u, h, m, w, i, a, r;
28
- const t = [];
29
- if ((n = e.email) != null && n.trim() && t.push(g(e.email.trim())), (o = e.phone) != null && o.trim() && t.push(O(e.phone.trim())), e.wechat) {
30
- const s = (u = e.wechat.nickname) == null ? void 0 : u.trim();
31
- t.push(s ? `微信(${s})` : "微信");
32
- }
33
- return (m = (h = e.github) == null ? void 0 : h.login) != null && m.trim() && t.push(`GitHub(${e.github.login.trim()})`), (i = (w = e.google) == null ? void 0 : w.email) != null && i.trim() && t.push(g(e.google.email.trim())), (r = (a = e.microsoft) == null ? void 0 : a.email) != null && r.trim() && t.push(g(e.microsoft.email.trim())), t.length > 0 ? t.join(" / ") : "-";
34
- }
35
- const k = /* @__PURE__ */ new Set();
36
- function le(e) {
37
- return k.add(e), () => {
38
- k.delete(e);
39
- };
40
- }
41
- function P() {
42
- try {
43
- localStorage.removeItem("jwtToken"), localStorage.removeItem("refreshToken");
44
- } catch (e) {
45
- console.warn("Failed to clear localStorage:", e);
46
- }
47
- k.forEach((e) => e());
48
- }
49
- function ce(e) {
50
- try {
51
- localStorage.setItem("jwtToken", e.jwtToken), localStorage.setItem("refreshToken", e.refreshToken);
52
- } catch (t) {
53
- console.warn("Failed to set localStorage:", t);
54
- }
55
- }
56
- function H() {
57
- try {
58
- return localStorage.getItem("refreshToken");
59
- } catch (e) {
60
- return console.warn("Failed to get refreshToken from localStorage:", e), null;
61
- }
62
- }
63
- function L(e) {
64
- try {
65
- localStorage.setItem("jwtToken", e);
66
- } catch (t) {
67
- console.warn("Failed to update jwtToken in localStorage:", t);
68
- }
69
- }
70
- function N(e) {
71
- return f(e);
72
- }
73
- function _(e) {
74
- return f(e);
75
- }
76
- function B(e) {
77
- return f(e);
78
- }
79
- function x(e) {
80
- return f(e);
81
- }
82
- function D(e) {
83
- return f(e);
84
- }
85
- function F(e) {
86
- return f(e);
87
- }
88
- const y = M(!1), S = M("signIn");
89
- function q(e) {
90
- e != null && e.view && (S.value = e.view), y.value = !0;
91
- }
92
- function J() {
93
- y.value = !1, S.value = "signIn";
94
- }
95
- function K() {
96
- return {
97
- open: q,
98
- close: J,
99
- isOpen: A(() => y.value),
100
- view: A(() => S.value)
101
- };
102
- }
103
- const T = 40101, E = 401, G = ["/apps/authPageInfo", "/users/profile"];
104
- function Q(e) {
105
- var t;
106
- return e.status === E || ((t = e.error) == null ? void 0 : t.code) === E;
107
- }
108
- function V(e) {
109
- var t;
110
- return Q(e) && ((t = e.error) == null ? void 0 : t.code) !== T;
111
- }
112
- function W() {
113
- const {
114
- open: e
115
- } = K();
116
- e();
117
- }
118
- function I() {
119
- P(), W();
120
- }
121
- function X() {
122
- P();
123
- }
124
- function b(e) {
125
- return G.some((t) => e.includes(t));
126
- }
127
- function R(e) {
128
- if (e.type === "network" || e.type === "timeout" || e.type === "abort")
129
- return !0;
130
- const t = e.message || "";
131
- return /failed to fetch|networkerror|load failed|network request failed|请求超时|请求已取消|network error/i.test(t);
132
- }
133
- function Z(e, t) {
134
- return !!(e.meta.get("silentError") === !0 || b(e.path) && R(t));
135
- }
136
- function Y(e) {
137
- return R(e) ? e.type === "timeout" || e.message.includes("超时") ? "请求超时,请稍后重试" : e.type === "abort" || e.message.includes("取消") ? "请求已取消" : "网络异常,请稍后重试" : e.message || "请求失败";
138
- }
139
- function ee(e, t, n) {
140
- console.warn(n ? "[api:silent]" : "[api]", e.method, e.path, t.type || "unknown", t.code, t.message);
141
- }
142
- async function te(e) {
143
- const t = H();
144
- if (!t)
145
- throw new Error("No refresh token available");
146
- try {
147
- const o = await (await fetch(`${e.authPrefixUrl}/auth/refresh`, {
148
- method: "POST",
149
- headers: {
150
- "Content-Type": "application/json",
151
- "app-id": e.appId
152
- },
153
- body: JSON.stringify({
154
- refreshToken: t
155
- })
156
- })).json();
157
- if (o.jwtToken)
158
- return L(o.jwtToken), o.refreshToken && localStorage.setItem("refreshToken", o.refreshToken), o.jwtToken;
159
- throw new Error(o.message || "Token refresh failed");
160
- } catch (n) {
161
- throw console.error("Token refresh failed:", n), n;
162
- }
163
- }
164
- function v(e) {
165
- let t = !1, n = [];
166
- function o(i, a = null) {
167
- n.forEach(({
168
- resolve: r,
169
- reject: s
170
- }) => {
171
- i ? s(i) : a && r(a);
172
- }), n = [];
173
- }
174
- const u = p(async (i, a) => (i.headers.set("app-id", e.appId), a()), {
175
- name: "app-id"
176
- }), h = p(async (i, a) => {
177
- const r = e.getAccessToken();
178
- return r && i.headers.set("authorization", `Bearer ${r}`), a();
179
- }, {
180
- name: "token"
181
- }), m = p(async (i, a) => {
182
- var s;
183
- const r = await a();
184
- if (((s = r.error) == null ? void 0 : s.code) !== T)
185
- return r;
186
- if (t)
187
- return new Promise((l, U) => {
188
- n.push({
189
- resolve: async (C) => {
190
- i.headers.set("authorization", `Bearer ${C}`), l(await a());
191
- },
192
- reject: () => U(r)
193
- });
194
- });
195
- t = !0;
196
- try {
197
- const l = await te(e);
198
- return o(null, l), i.headers.set("authorization", `Bearer ${l}`), await a();
199
- } catch (l) {
200
- return o(l, null), I(), r;
201
- } finally {
202
- t = !1;
203
- }
204
- }, {
205
- name: "token-refresh"
206
- }), w = p(async (i, a) => {
207
- const r = await a();
208
- if (V(r))
209
- return b(i.path) ? (X(), r) : (I(), r);
210
- if (r.error && r.error.code !== T) {
211
- const s = Z(i, r.error);
212
- ee(i, r.error, s), s || $.error(Y(r.error));
213
- }
214
- return r;
215
- }, {
216
- name: "error-message"
217
- });
218
- return {
219
- appIdMiddleware: u,
220
- tokenMiddleware: h,
221
- tokenRefreshMiddleware: m,
222
- errorMessageMiddleware: w
223
- };
224
- }
225
- function fe(e, t) {
226
- const {
227
- tokenRefreshMiddleware: n,
228
- errorMessageMiddleware: o
229
- } = v(t);
230
- return e.use(n).use(o);
231
- }
232
- function c(e, t) {
233
- return j({
234
- baseURL: e,
235
- timeout: 3e4
236
- }).use(t.appIdMiddleware).use(t.tokenMiddleware).use(t.tokenRefreshMiddleware).use(t.errorMessageMiddleware);
237
- }
238
- function re(e) {
239
- const t = v(e);
240
- return {
241
- auth: _(c(e.authPrefixUrl, t)),
242
- billing: B(c(e.billingPrefixUrl, t)),
243
- ones: D(c(e.onesPrefixUrl, t)),
244
- log: x(c(e.logPrefixUrl, t)),
245
- ai: N(c(e.aiPrefixUrl, t)),
246
- webhook: F(c(e.webhookPrefixUrl, t))
247
- };
248
- }
249
- let d = null;
250
- function he(e) {
251
- if (d)
252
- throw new Error("Huyooo UI Runtime 已初始化,不能重复创建");
253
- return d = re(e), d;
254
- }
255
- function de() {
256
- if (!d)
257
- throw new Error("请先在应用入口调用 app.use(createHuyoooUI(config))");
258
- return d;
259
- }
260
- export {
261
- ue as b,
262
- v as c,
263
- se as f,
264
- de as g,
265
- g as h,
266
- he as i,
267
- le as o,
268
- P as r,
269
- ce as s,
270
- K as u,
271
- fe as w
272
- };
@@ -1,25 +0,0 @@
1
- import { n as r } from "./useAuthkitAppsAuthPageInfo-2izIyMfu.js";
2
- import { g as u } from "./runtime-DDJRAtkv.js";
3
- async function i(n) {
4
- if (!n)
5
- return null;
6
- try {
7
- const e = await fetch(`${u().config.authPrefixUrl}/apps/authPageInfo`, {
8
- method: "POST",
9
- headers: {
10
- "Content-Type": "application/json",
11
- "app-id": n
12
- },
13
- body: "{}"
14
- });
15
- if (!e.ok)
16
- return null;
17
- const t = await e.json(), o = t == null ? void 0 : t.aboutUs;
18
- return !o || typeof o != "object" ? null : r(o);
19
- } catch {
20
- return null;
21
- }
22
- }
23
- export {
24
- i as f
25
- };