@huyooo/ui 2.2.0 → 2.2.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 (45) hide show
  1. package/dist/{AuthkitAppSetting-CHVSyEY1.js → AuthkitAppSetting-BuaqfKEv.js} +8 -8
  2. package/dist/{Contact-BTQf8tEx.js → Contact-D-NTKkWc.js} +3 -3
  3. package/dist/{CustomTable-BY0oHLXc.js → CustomTable-D9j5dgOH.js} +1 -1
  4. package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-FIZdBxIZ.js → FeedbackModal.vue_vue_type_script_setup_true_lang-CsgTdQQG.js} +5 -5
  5. package/dist/{LegalDocViewer-DiNoy_oj.js → LegalDocViewer-DLpvpTeA.js} +202 -200
  6. package/dist/{MessageHandle-DDGFSJMg.js → MessageHandle-BVqmtDDc.js} +3 -3
  7. package/dist/{MessageList-CE5E_5Uv.js → MessageList-CCUlHX_0.js} +1 -1
  8. package/dist/{PaySubscriptions-Du9QWvlH.js → PaySubscriptions-CwjgkL21.js} +7 -7
  9. package/dist/{PricingPlans-BEhWsV2D.js → PricingPlans-CjLXF7is.js} +4 -4
  10. package/dist/{ReferrerReferees-t5s4LzbY.js → ReferrerReferees-RKmCkAIi.js} +4 -4
  11. package/dist/{Upload.vue_vue_type_script_setup_true_lang-DsrqOACa.js → Upload.vue_vue_type_script_setup_true_lang-DX_PVh8A.js} +1 -1
  12. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BrauYUc_.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-RMTlKkD-.js} +10 -10
  13. package/dist/{WidthContainer-CiabzONI.js → WidthContainer-iRk3r61v.js} +10 -10
  14. package/dist/apiClients-cJElwYYN.js +275 -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-D-JEoE8N.js +34 -0
  21. package/dist/{index-BYH7DaQf.js → index-CHWVBunT.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-7yUdSOYv.js} +119 -116
  28. package/dist/style.css +1 -1
  29. package/dist/upload.js +2 -2
  30. package/dist/{useAuthkitAppsAuthPageInfo-2izIyMfu.js → useAuthkitAppsAuthPageInfo-2qQf2lJP.js} +17 -15
  31. package/dist/{useAuthkitAuth-CWHJs8zY.js → useAuthkitAuth-C6RUN1mU.js} +2 -2
  32. package/dist/{useAuthkitCreateAndUpdate-COI5KVPJ.js → useAuthkitCreateAndUpdate-piFGtY-A.js} +1 -1
  33. package/dist/{useAuthkitUsersProfile-D4H_Gxgd.js → useAuthkitUsersProfile-D_9ttX6H.js} +3 -3
  34. package/dist/{useBillingStatusOptions-C6edto7H.js → useBillingStatusOptions-Bo1wYzgB.js} +1 -1
  35. package/dist/{useBillingSubscriptionSummary-BC3G0N4t.js → useBillingSubscriptionSummary-BabqnJ7S.js} +1 -1
  36. package/dist/{useEnsureAuthenticated-RZ1DflLz.js → useEnsureAuthenticated-NADE0UVJ.js} +2 -2
  37. package/dist/{useLegalDocs-xXYvYpPC.js → useLegalDocs-CfIjSyik.js} +2 -2
  38. package/dist/{useMessageNotifications-pxa5LHjV.js → useMessageNotifications-SMRRA3Kl.js} +1 -1
  39. package/dist/{usePageSEO-B3stKP3n.js → usePageSEO-qRI2bful.js} +2 -2
  40. package/dist/{useRoutePermission-CGq_LIZM.js → useRoutePermission-CkCE6-C3.js} +3 -3
  41. package/dist/{useSubscriptionCheckout-CZZLk_1d.js → useSubscriptionCheckout-B1CyTY9V.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
@@ -3,13 +3,13 @@ import { defineComponent as $, computed as D, openBlock as p, createElementBlock
3
3
  /* empty css */
4
4
  import { U as re } from "./userMenuModal-D-nDaYqM.js";
5
5
  /* empty css */
6
- import { M as q, a as j, u as ue } from "./MessageList-CE5E_5Uv.js";
6
+ import { M as q, a as j, u as ue } from "./MessageList-CCUlHX_0.js";
7
7
  import { Descriptions as ce, Spin as ae, Breadcrumb as F, BreadcrumbItem as E, Tag as K, Modal as de } from "@arco-design/web-vue";
8
- import { g as A } from "./apiClients-CWSwNzGk.js";
8
+ import { g as A } from "./apiClients-cJElwYYN.js";
9
9
  import { TiptapEditor as pe, TiptapTitle as fe } from "@huyooo/vue-tiptap";
10
10
  import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
11
  import { Icon as ge } from "@iconify/vue";
12
- import { u as ve } from "./useAuthkitCreateAndUpdate-COI5KVPJ.js";
12
+ import { u as ve } from "./useAuthkitCreateAndUpdate-piFGtY-A.js";
13
13
  import { M as ye } from "./Menu-uCexrsKP.js";
14
14
  function P(a, t, u) {
15
15
  if (a == null || a === "")
@@ -1,5 +1,5 @@
1
1
  import { ref as z, computed as I, readonly as V, defineComponent as b, openBlock as i, createElementBlock as v, normalizeClass as M, createElementVNode as m, createCommentVNode as k, renderSlot as r, toDisplayString as B, createBlock as g, unref as f, withCtx as l, createTextVNode as c, createVNode as N, Fragment as S, renderList as L, createSlots as _, mergeProps as p } from "vue";
2
- import { g as C } from "./apiClients-CWSwNzGk.js";
2
+ import { g as C } from "./apiClients-cJElwYYN.js";
3
3
  /* empty css */
4
4
  import { I as E } from "./userMenuModal-D-nDaYqM.js";
5
5
  import { Tag as $, Button as P, Empty as U } from "@arco-design/web-vue";
@@ -6,15 +6,15 @@
6
6
  import { U as Ut } from "./userMenuModal-D-nDaYqM.js";
7
7
  /* empty css */
8
8
  /* empty css */
9
- import { g as I } from "./apiClients-CWSwNzGk.js";
10
- import { C as Be } from "./index-BYH7DaQf.js";
9
+ import { g as I } from "./apiClients-cJElwYYN.js";
10
+ import { C as Be } from "./index-CHWVBunT.js";
11
11
  import { ref as y, onUnmounted as je, defineComponent as Et, computed as $, openBlock as u, createElementBlock as d, Fragment as G, createVNode as p, unref as n, isRef as Rt, withCtx as s, createElementVNode as a, toDisplayString as o, createBlock as V, createTextVNode as m, createCommentVNode as O, renderList as Me, normalizeClass as $e } from "vue";
12
12
  import { Modal as He, Button as w, Popconfirm as ae, Tabs as Bt, TabPane as ie, Spin as ge, Empty as Ye, Progress as Mt, Tooltip as ye, Tag as J, InputNumber as $t, Message as H } from "@arco-design/web-vue";
13
- import { useBillingSubscriptionSummary as Ht } from "./useBillingSubscriptionSummary-BC3G0N4t.js";
14
- import { u as Yt, b as Dt, a as Vt } from "./useBillingStatusOptions-C6edto7H.js";
15
- import { u as qt } from "./useAuthkitCreateAndUpdate-COI5KVPJ.js";
16
- import { g as jt } from "./runtime-DDJRAtkv.js";
17
- import { C as be } from "./CustomTable-BY0oHLXc.js";
13
+ import { useBillingSubscriptionSummary as Ht } from "./useBillingSubscriptionSummary-BabqnJ7S.js";
14
+ import { u as Yt, b as Dt, a as Vt } from "./useBillingStatusOptions-Bo1wYzgB.js";
15
+ import { u as qt } from "./useAuthkitCreateAndUpdate-piFGtY-A.js";
16
+ import { g as jt } from "./runtime-7yUdSOYv.js";
17
+ import { C as be } from "./CustomTable-D9j5dgOH.js";
18
18
  import { _ as Kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
19
19
  function Gt(i, c) {
20
20
  return i ? i.acquiredBy === "subscribe" ? c > 0 ? "修改订阅" : "" : c > 0 ? "升级" : "" : c > 0 ? "订阅" : "查看价格方案";
@@ -1,16 +1,16 @@
1
1
  /* empty css */
2
2
  import "./userMenuModal-D-nDaYqM.js";
3
- import { g as ee } from "./apiClients-CWSwNzGk.js";
3
+ import { g as ee } from "./apiClients-cJElwYYN.js";
4
4
  /* empty css */
5
5
  import { defineComponent as O, computed as B, onMounted as se, onUnmounted as me, openBlock as n, createElementBlock as s, createElementVNode as i, unref as e, createBlock as U, toDisplayString as l, createVNode as m, withCtx as y, createTextVNode as R, ref as te, watch as ve, resolveDirective as pe, withDirectives as ye, normalizeClass as w, Fragment as T, renderList as I, createCommentVNode as p } from "vue";
6
6
  import { Spin as ie, Button as S, Message as ae } from "@arco-design/web-vue";
7
7
  import { useRoute as he, useRouter as ke } from "vue-router";
8
- import { a as be } from "./PaySubscriptions-Du9QWvlH.js";
8
+ import { a as be } from "./PaySubscriptions-CwjgkL21.js";
9
9
  import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  import { L as Ce, a as we, b as Te } from "./LandingPageSectionHeader-3hiuw6G0.js";
11
11
  import { Icon as ne } from "@iconify/vue";
12
- import { u as Ie, a as Be } from "./useSubscriptionCheckout-CZZLk_1d.js";
13
- import { u as Re } from "./useEnsureAuthenticated-RZ1DflLz.js";
12
+ import { u as Ie, a as Be } from "./useSubscriptionCheckout-B1CyTY9V.js";
13
+ import { u as Re } from "./useEnsureAuthenticated-NADE0UVJ.js";
14
14
  const ht = "/Pay/Return";
15
15
  function K(r) {
16
16
  const P = typeof r.scene == "string" ? r.scene : null, u = typeof r.orderId == "string" ? r.orderId : null, d = typeof r.returnTo == "string" ? r.returnTo.trim() : null, _ = d != null && d.startsWith("/") && !d.startsWith("//") ? d : null;
@@ -3,12 +3,12 @@
3
3
  import { U as V } from "./userMenuModal-D-nDaYqM.js";
4
4
  import { defineComponent as U, computed as k, openBlock as M, createElementBlock as R, createVNode as b, unref as o, withCtx as I, createTextVNode as A, toDisplayString as g, createElementVNode as m, createCommentVNode as w, ref as _, createBlock as x } from "vue";
5
5
  import { Avatar as W, Modal as z } from "@arco-design/web-vue";
6
- import { g as B } from "./apiClients-CWSwNzGk.js";
7
- import { C as P } from "./CustomTable-BY0oHLXc.js";
8
- import { C as G } from "./index-BYH7DaQf.js";
6
+ import { g as B } from "./apiClients-cJElwYYN.js";
7
+ import { C as P } from "./CustomTable-D9j5dgOH.js";
8
+ import { C as G } from "./index-CHWVBunT.js";
9
9
  /* empty css */
10
10
  import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- import { u as H } from "./useAuthkitUsersProfile-D4H_Gxgd.js";
11
+ import { u as H } from "./useAuthkitUsersProfile-D_9ttX6H.js";
12
12
  const j = {
13
13
  email: "邮箱",
14
14
  phone: "手机",
@@ -6,7 +6,7 @@
6
6
  /* empty css */
7
7
  import { defineComponent as k, openBlock as h, createBlock as y, unref as S, mergeProps as q, createSlots as v, withCtx as p, renderSlot as a } from "vue";
8
8
  import { Upload as I } from "@arco-design/web-vue";
9
- import { u as _ } from "./runtime-DDJRAtkv.js";
9
+ import { u as _ } from "./runtime-7yUdSOYv.js";
10
10
  const j = /* @__PURE__ */ k({
11
11
  __name: "Upload",
12
12
  props: {
@@ -1,21 +1,21 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
- import "./index-BYH7DaQf.js";
3
+ import "./index-CHWVBunT.js";
4
4
  import { defineComponent as m, computed as b, openBlock as r, createElementBlock as p, toDisplayString as M, createCommentVNode as U, createVNode as _, unref as n, createBlock as v, withCtx as g, createTextVNode as k, ref as x, createElementVNode as d, watch as A, onMounted as ee, Fragment as Y, normalizeClass as q, renderSlot as w } from "vue";
5
5
  import { Avatar as G, Button as N, Dropdown as te, Badge as ne } from "@arco-design/web-vue";
6
- import { u as R } from "./useAuthkitUsersProfile-D4H_Gxgd.js";
6
+ import { u as R } from "./useAuthkitUsersProfile-D_9ttX6H.js";
7
7
  import { u as y } from "./useUserMenu-ClPBlvaM.js";
8
8
  /* empty css */
9
- import { g as J, a as se, R as ae } from "./ReferrerReferees-t5s4LzbY.js";
9
+ import { g as J, a as se, R as ae } from "./ReferrerReferees-RKmCkAIi.js";
10
10
  import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
11
  /* empty css */
12
- import { u as oe } from "./apiClients-CWSwNzGk.js";
13
- import { useBillingSubscriptionSummary as ie } from "./useBillingSubscriptionSummary-BC3G0N4t.js";
14
- import { d as re } from "./useBillingStatusOptions-C6edto7H.js";
15
- import { f as ue, g as le, b as ce, s as de, P as pe } from "./PaySubscriptions-Du9QWvlH.js";
16
- import { A as me } from "./AuthkitAppSetting-CHVSyEY1.js";
17
- import { c as fe, u as K } from "./FeedbackModal.vue_vue_type_script_setup_true_lang-FIZdBxIZ.js";
18
- import { M as _e } from "./MessageHandle-DDGFSJMg.js";
12
+ import { u as oe } from "./apiClients-cJElwYYN.js";
13
+ import { useBillingSubscriptionSummary as ie } from "./useBillingSubscriptionSummary-BabqnJ7S.js";
14
+ import { d as re } from "./useBillingStatusOptions-Bo1wYzgB.js";
15
+ import { f as ue, g as le, b as ce, s as de, P as pe } from "./PaySubscriptions-CwjgkL21.js";
16
+ import { A as me } from "./AuthkitAppSetting-BuaqfKEv.js";
17
+ import { c as fe, u as K } from "./FeedbackModal.vue_vue_type_script_setup_true_lang-CsgTdQQG.js";
18
+ import { M as _e } from "./MessageHandle-BVqmtDDc.js";
19
19
  import "./Menu-uCexrsKP.js";
20
20
  import { Icon as ve } from "@iconify/vue";
21
21
  const ge = {
@@ -2,27 +2,27 @@
2
2
  import "./userMenuModal-D-nDaYqM.js";
3
3
  import { defineComponent as P, ref as A, watch as N, openBlock as n, createElementBlock as s, createElementVNode as a, createVNode as r, unref as u, withCtx as B, createTextVNode as H, renderSlot as W, toDisplayString as T, createCommentVNode as x, onMounted as F, onBeforeUnmount as J, normalizeClass as M, Fragment as L, renderList as D, createBlock as Q, Teleport as ge, nextTick as j, computed as U, normalizeStyle as O } from "vue";
4
4
  import { Spin as X } from "@arco-design/web-vue";
5
- import { u as Y } from "./useAuthkitAuth-CWHJs8zY.js";
6
- import "./apiClients-CWSwNzGk.js";
7
- import { u as ye } from "./useAuthkitAppsAuthPageInfo-2izIyMfu.js";
8
- import { s as be, a as ke } from "./runtime-DDJRAtkv.js";
5
+ import { u as Y } from "./useAuthkitAuth-C6RUN1mU.js";
6
+ import "./apiClients-cJElwYYN.js";
7
+ import { u as ye } from "./useAuthkitAppsAuthPageInfo-2qQf2lJP.js";
8
+ import { s as be, a as ke } from "./runtime-7yUdSOYv.js";
9
9
  import "@vafast/api-client";
10
- import "./useAuthkitUsersProfile-D4H_Gxgd.js";
10
+ import "./useAuthkitUsersProfile-D_9ttX6H.js";
11
11
  import { useRouter as Z, useRoute as ee } from "vue-router";
12
- import { b as te, c as ne, f as oe, w as se, a as ae, d as re } from "./useRoutePermission-CGq_LIZM.js";
12
+ import { b as te, c as ne, f as oe, w as se, a as ae, d as re } from "./useRoutePermission-CkCE6-C3.js";
13
13
  import "@unhead/vue";
14
14
  import "./useUserMenu-ClPBlvaM.js";
15
- import { c as ie, h as ue, k as le, _ as ce, f as de, j as me, d as pe, g as R, U as we, i as he } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BrauYUc_.js";
16
- import "./useBillingSubscriptionSummary-BC3G0N4t.js";
15
+ import { c as ie, h as ue, k as le, _ as ce, f as de, j as me, d as pe, g as R, U as we, i as he } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-RMTlKkD-.js";
16
+ import "./useBillingSubscriptionSummary-BabqnJ7S.js";
17
17
  /* empty css */
18
18
  /* empty css */
19
19
  import { M as $e } from "./Menu-uCexrsKP.js";
20
20
  import "./CollapseItem-DUzZA6tx.js";
21
21
  /* empty css */
22
22
  /* empty css */
23
- import "./index-BYH7DaQf.js";
23
+ import "./index-CHWVBunT.js";
24
24
  /* empty css */
25
- import "./CustomTable-BY0oHLXc.js";
25
+ import "./CustomTable-D9j5dgOH.js";
26
26
  import "@vueuse/core";
27
27
  import "./index-D56hUMeD.js";
28
28
  import { Icon as z } from "@iconify/vue";
@@ -0,0 +1,275 @@
1
+ import { eden as f, defineMiddleware as w, 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 k(e, r = 3) {
6
+ const n = e.indexOf("@");
7
+ if (n > 1) {
8
+ const s = e.slice(0, r), i = e.slice(n);
9
+ return s + "***" + i;
10
+ }
11
+ return e;
12
+ }
13
+ function O(e) {
14
+ const r = e.trim();
15
+ return r.length < 7 ? r : `${r.slice(0, 3)}****${r.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, s, i, h, p, m, o, a, t;
28
+ const r = [];
29
+ if ((n = e.email) != null && n.trim() && r.push(k(e.email.trim())), (s = e.phone) != null && s.trim() && r.push(O(e.phone.trim())), e.wechat) {
30
+ const u = (i = e.wechat.nickname) == null ? void 0 : i.trim();
31
+ r.push(u ? `微信(${u})` : "微信");
32
+ }
33
+ return (p = (h = e.github) == null ? void 0 : h.login) != null && p.trim() && r.push(`GitHub(${e.github.login.trim()})`), (o = (m = e.google) == null ? void 0 : m.email) != null && o.trim() && r.push(k(e.google.email.trim())), (t = (a = e.microsoft) == null ? void 0 : a.email) != null && t.trim() && r.push(k(e.microsoft.email.trim())), r.length > 0 ? r.join(" / ") : "-";
34
+ }
35
+ const g = /* @__PURE__ */ new Set();
36
+ function le(e) {
37
+ return g.add(e), () => {
38
+ g.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
+ g.forEach((e) => e());
48
+ }
49
+ function ce(e) {
50
+ try {
51
+ localStorage.setItem("jwtToken", e.jwtToken), localStorage.setItem("refreshToken", e.refreshToken);
52
+ } catch (r) {
53
+ console.warn("Failed to set localStorage:", r);
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 (r) {
67
+ console.warn("Failed to update jwtToken in localStorage:", r);
68
+ }
69
+ }
70
+ function N(e) {
71
+ return f(e);
72
+ }
73
+ function _(e) {
74
+ return f(e);
75
+ }
76
+ function x(e) {
77
+ return f(e);
78
+ }
79
+ function B(e) {
80
+ return f(e);
81
+ }
82
+ function V(e) {
83
+ return f(e);
84
+ }
85
+ function D(e) {
86
+ return f(e);
87
+ }
88
+ const y = M(!1), S = M("signIn");
89
+ function F(e) {
90
+ e != null && e.view && (S.value = e.view), y.value = !0;
91
+ }
92
+ function K() {
93
+ y.value = !1, S.value = "signIn";
94
+ }
95
+ function q() {
96
+ return {
97
+ open: F,
98
+ close: K,
99
+ isOpen: A(() => y.value),
100
+ view: A(() => S.value)
101
+ };
102
+ }
103
+ const T = 40101, E = 401, J = ["/apps/authPageInfo", "/users/profile"];
104
+ function G(e) {
105
+ var r;
106
+ return e.status === E || ((r = e.error) == null ? void 0 : r.code) === E;
107
+ }
108
+ function Q(e) {
109
+ var r;
110
+ return G(e) && ((r = e.error) == null ? void 0 : r.code) !== T;
111
+ }
112
+ function W() {
113
+ const {
114
+ open: e
115
+ } = q();
116
+ e();
117
+ }
118
+ function I() {
119
+ P(), W();
120
+ }
121
+ function X() {
122
+ P();
123
+ }
124
+ function b(e) {
125
+ return J.some((r) => e.includes(r));
126
+ }
127
+ function v(e) {
128
+ if (e.type === "network" || e.type === "timeout" || e.type === "abort")
129
+ return !0;
130
+ const r = e.message || "";
131
+ return /failed to fetch|networkerror|load failed|network request failed|请求超时|请求已取消|network error/i.test(r);
132
+ }
133
+ function Z(e, r) {
134
+ return !!(e.meta.get("silentError") === !0 || b(e.path) && v(r));
135
+ }
136
+ function Y(e) {
137
+ return v(e) ? e.type === "timeout" || e.message.includes("超时") ? "请求超时,请稍后重试" : e.type === "abort" || e.message.includes("取消") ? "请求已取消" : "网络异常,请稍后重试" : e.message || "请求失败";
138
+ }
139
+ function ee(e, r, n) {
140
+ console.warn(n ? "[api:silent]" : "[api]", e.method, e.path, r.type || "unknown", r.code, r.message);
141
+ }
142
+ async function re(e) {
143
+ const r = H();
144
+ if (!r)
145
+ throw new Error("No refresh token available");
146
+ try {
147
+ const n = {
148
+ "Content-Type": "application/json",
149
+ "app-id": e.appId,
150
+ "client-key": e.clientKey
151
+ };
152
+ e.platform && (n["x-platform"] = e.platform), e.appVersion && (n["x-app-version"] = e.appVersion);
153
+ const i = await (await fetch(`${e.authPrefixUrl}/auth/refresh`, {
154
+ method: "POST",
155
+ headers: n,
156
+ body: JSON.stringify({
157
+ refreshToken: r
158
+ })
159
+ })).json();
160
+ if (i.jwtToken)
161
+ return L(i.jwtToken), i.refreshToken && localStorage.setItem("refreshToken", i.refreshToken), i.jwtToken;
162
+ throw new Error(i.message || "Token refresh failed");
163
+ } catch (n) {
164
+ throw console.error("Token refresh failed:", n), n;
165
+ }
166
+ }
167
+ function R(e) {
168
+ let r = !1, n = [];
169
+ function s(o, a = null) {
170
+ n.forEach(({
171
+ resolve: t,
172
+ reject: u
173
+ }) => {
174
+ o ? u(o) : a && t(a);
175
+ }), n = [];
176
+ }
177
+ const i = w(async (o, a) => (o.headers.set("app-id", e.appId), o.headers.set("client-key", e.clientKey), e.platform && o.headers.set("x-platform", e.platform), e.appVersion && o.headers.set("x-app-version", e.appVersion), a()), {
178
+ name: "app-id"
179
+ }), h = w(async (o, a) => {
180
+ const t = e.getAccessToken();
181
+ return t && o.headers.set("authorization", `Bearer ${t}`), a();
182
+ }, {
183
+ name: "token"
184
+ }), p = w(async (o, a) => {
185
+ var u;
186
+ const t = await a();
187
+ if (((u = t.error) == null ? void 0 : u.code) !== T)
188
+ return t;
189
+ if (r)
190
+ return new Promise((l, U) => {
191
+ n.push({
192
+ resolve: async (C) => {
193
+ o.headers.set("authorization", `Bearer ${C}`), l(await a());
194
+ },
195
+ reject: () => U(t)
196
+ });
197
+ });
198
+ r = !0;
199
+ try {
200
+ const l = await re(e);
201
+ return s(null, l), o.headers.set("authorization", `Bearer ${l}`), await a();
202
+ } catch (l) {
203
+ return s(l, null), I(), t;
204
+ } finally {
205
+ r = !1;
206
+ }
207
+ }, {
208
+ name: "token-refresh"
209
+ }), m = w(async (o, a) => {
210
+ const t = await a();
211
+ if (Q(t))
212
+ return b(o.path) ? (X(), t) : (I(), t);
213
+ if (t.error && t.error.code !== T) {
214
+ const u = Z(o, t.error);
215
+ ee(o, t.error, u), u || $.error(Y(t.error));
216
+ }
217
+ return t;
218
+ }, {
219
+ name: "error-message"
220
+ });
221
+ return {
222
+ appIdMiddleware: i,
223
+ tokenMiddleware: h,
224
+ tokenRefreshMiddleware: p,
225
+ errorMessageMiddleware: m
226
+ };
227
+ }
228
+ function fe(e, r) {
229
+ const {
230
+ tokenRefreshMiddleware: n,
231
+ errorMessageMiddleware: s
232
+ } = R(r);
233
+ return e.use(n).use(s);
234
+ }
235
+ function c(e, r) {
236
+ return j({
237
+ baseURL: e,
238
+ timeout: 3e4
239
+ }).use(r.appIdMiddleware).use(r.tokenMiddleware).use(r.tokenRefreshMiddleware).use(r.errorMessageMiddleware);
240
+ }
241
+ function te(e) {
242
+ const r = R(e);
243
+ return {
244
+ auth: _(c(e.authPrefixUrl, r)),
245
+ billing: x(c(e.billingPrefixUrl, r)),
246
+ ones: V(c(e.onesPrefixUrl, r)),
247
+ log: B(c(e.logPrefixUrl, r)),
248
+ ai: N(c(e.aiPrefixUrl, r)),
249
+ webhook: D(c(e.webhookPrefixUrl, r))
250
+ };
251
+ }
252
+ let d = null;
253
+ function he(e) {
254
+ if (d)
255
+ throw new Error("Huyooo UI Runtime 已初始化,不能重复创建");
256
+ return d = te(e), d;
257
+ }
258
+ function de() {
259
+ if (!d)
260
+ throw new Error("请先在应用入口调用 app.use(createHuyoooUI(config))");
261
+ return d;
262
+ }
263
+ export {
264
+ ue as b,
265
+ R as c,
266
+ se as f,
267
+ de as g,
268
+ k as h,
269
+ he as i,
270
+ le as o,
271
+ P as r,
272
+ ce as s,
273
+ q as u,
274
+ fe as w
275
+ };
package/dist/authkit.js CHANGED
@@ -1,13 +1,13 @@
1
- import { A as s, B as i, a as e, _ as u, b as h, O as A, P as o, c as r, d as n, e as k, f as d, S as g, g as l, h as p, u as P, i as f } from "./AuthkitAppSetting-CHVSyEY1.js";
2
- import { A as m, a as S, b as L, c as O, d as U, E as w, e as x, f as B, g as D, O as E, h as b, P as y, i as C, j as I, _ as v, R as V, S as _, k as R, l as T, m as G, n as M, o as j, p as z, L as F } from "./LegalDocViewer-DiNoy_oj.js";
3
- import { u as Y } from "./useAuthkitAppsAuthPageInfo-2izIyMfu.js";
4
- import { u as H } from "./useAuthkitAuth-CWHJs8zY.js";
5
- import { u as N } from "./apiClients-CWSwNzGk.js";
6
- import { u as W } from "./useEnsureAuthenticated-RZ1DflLz.js";
7
- import { L as Z, a as $, b as tt, i as at, o as st, r as it, c as et, u as ut } from "./useLegalDocs-xXYvYpPC.js";
8
- import { f as At } from "./fetchAuthPageAboutUs-CLQlGhQy.js";
9
- import { u as rt } from "./useAuthkitUsersProfile-D4H_Gxgd.js";
10
- import { u as kt } from "./useAuthkitCreateAndUpdate-COI5KVPJ.js";
1
+ import { A as s, B as i, a as e, _ as u, b as h, O as A, P as o, c as r, d as n, e as k, f as d, S as g, g as l, h as p, u as P, i as f } from "./AuthkitAppSetting-BuaqfKEv.js";
2
+ import { A as m, a as S, b as L, c as O, d as U, E as w, e as x, f as B, g as D, O as E, h as b, P as y, i as C, j as I, _ as v, R as V, S as _, k as R, l as T, m as G, n as M, o as j, p as z, L as F } from "./LegalDocViewer-DLpvpTeA.js";
3
+ import { u as Y } from "./useAuthkitAppsAuthPageInfo-2qQf2lJP.js";
4
+ import { u as H } from "./useAuthkitAuth-C6RUN1mU.js";
5
+ import { u as N } from "./apiClients-cJElwYYN.js";
6
+ import { u as W } from "./useEnsureAuthenticated-NADE0UVJ.js";
7
+ import { L as Z, a as $, b as tt, i as at, o as st, r as it, c as et, u as ut } from "./useLegalDocs-CfIjSyik.js";
8
+ import { f as At } from "./fetchAuthPageAboutUs-D-JEoE8N.js";
9
+ import { u as rt } from "./useAuthkitUsersProfile-D_9ttX6H.js";
10
+ import { u as kt } from "./useAuthkitCreateAndUpdate-piFGtY-A.js";
11
11
  export {
12
12
  s as AuthkitAppSetting,
13
13
  m as AuthkitAuth,
@@ -7,6 +7,12 @@ export declare function setTheme(mode: GlobalTheme): void;
7
7
  export interface HuyoooUIConfig {
8
8
  /** 应用ID - 必填 */
9
9
  appId: string;
10
+ /** 端标识:web / desktop / ios / android */
11
+ clientKey: string;
12
+ /** 运行平台:browser / darwin / win32 / linux / ios / android */
13
+ platform?: string;
14
+ /** 应用版本(可选) */
15
+ appVersion?: string;
10
16
  /** ones-server API前缀 - 默认 '/onesRestfulApi' */
11
17
  onesPrefixUrl: string;
12
18
  /** auth-server API前缀 - 默认 '/authRestfulApi' */
@@ -48,6 +54,12 @@ export interface HuyoooUIEndpoints {
48
54
  export interface CreateHuyoooUIOptions {
49
55
  /** 应用ID - 必填 */
50
56
  appId: string;
57
+ /** 端标识:web / desktop / ios / android */
58
+ clientKey: string;
59
+ /** 运行平台:browser / darwin / win32 / linux / ios / android */
60
+ platform?: string;
61
+ /** 应用版本(可选) */
62
+ appVersion?: string;
51
63
  /** 各领域服务地址,在 Runtime 创建时固定 */
52
64
  endpoints: HuyoooUIEndpoints;
53
65
  /** 动态获取访问令牌 */
@@ -72,6 +84,9 @@ export interface CreateHuyoooUIOptions {
72
84
  /** 创建 Runtime 私有配置;应用运行期间不可修改。 */
73
85
  export declare function createHuyoooRuntimeConfig(options: CreateHuyoooUIOptions): Readonly<{
74
86
  appId: string;
87
+ clientKey: string;
88
+ platform: string | undefined;
89
+ appVersion: string | undefined;
75
90
  authPrefixUrl: string;
76
91
  onesPrefixUrl: string;
77
92
  billingPrefixUrl: string;
package/dist/common.js CHANGED
@@ -1,6 +1,6 @@
1
- import { A as s, a as o, C as r, D as t, G as p, H as n, b as l, S as m, W as u } from "./WidthContainer-CiabzONI.js";
1
+ import { A as s, a as o, C as r, D as t, G as p, H as n, b as l, S as m, W as u } from "./WidthContainer-iRk3r61v.js";
2
2
  import { C as d, a as f } from "./CollapseItem-DUzZA6tx.js";
3
- import { C as x, E as b } from "./CustomTable-BY0oHLXc.js";
3
+ import { C as x, E as b } from "./CustomTable-D9j5dgOH.js";
4
4
  import { L } from "./Logo-B9DFBxDU.js";
5
5
  import { M as g, a as A } from "./Menu-uCexrsKP.js";
6
6
  export {
@@ -1,17 +1,17 @@
1
- import { u as a } from "./useAuthkitAuth-CWHJs8zY.js";
2
- import { u as t } from "./apiClients-CWSwNzGk.js";
3
- import { L as r, a as i, b as n, i as p, o as f, r as l, c as m, u as c } from "./useLegalDocs-xXYvYpPC.js";
4
- import { f as A } from "./fetchAuthPageAboutUs-CLQlGhQy.js";
5
- import { u as d } from "./useAuthkitUsersProfile-D4H_Gxgd.js";
6
- import { u as L } from "./useAuthkitAppsAuthPageInfo-2izIyMfu.js";
7
- import { f as P, a as b, g as O, u as S, b as C, c as U, d as k, w as M } from "./useRoutePermission-CGq_LIZM.js";
8
- import { u as T } from "./useAuthkitCreateAndUpdate-COI5KVPJ.js";
9
- import { u as E } from "./useMessageNotifications-pxa5LHjV.js";
10
- import { c as y, g as B, a as H, s as I, u as _ } from "./runtime-DDJRAtkv.js";
11
- import { u as F, a as K, b as N, c as V, d as Y } from "./usePageSEO-B3stKP3n.js";
1
+ import { u as a } from "./useAuthkitAuth-C6RUN1mU.js";
2
+ import { u as t } from "./apiClients-cJElwYYN.js";
3
+ import { L as r, a as i, b as n, i as p, o as f, r as l, c as m, u as c } from "./useLegalDocs-CfIjSyik.js";
4
+ import { f as A } from "./fetchAuthPageAboutUs-D-JEoE8N.js";
5
+ import { u as d } from "./useAuthkitUsersProfile-D_9ttX6H.js";
6
+ import { u as L } from "./useAuthkitAppsAuthPageInfo-2qQf2lJP.js";
7
+ import { f as P, a as b, g as O, u as S, b as C, c as U, d as k, w as M } from "./useRoutePermission-CkCE6-C3.js";
8
+ import { u as T } from "./useAuthkitCreateAndUpdate-piFGtY-A.js";
9
+ import { u as E } from "./useMessageNotifications-SMRRA3Kl.js";
10
+ import { c as y, g as B, a as H, s as I, u as _ } from "./runtime-7yUdSOYv.js";
11
+ import { u as F, a as K, b as N, c as V, d as Y } from "./usePageSEO-qRI2bful.js";
12
12
  import { u as q } from "./useUserMenu-ClPBlvaM.js";
13
- import { u as J, a as Q } from "./useSubscriptionCheckout-CZZLk_1d.js";
14
- import { c as X, u as Z, a as $, b as ee } from "./useBillingStatusOptions-C6edto7H.js";
13
+ import { u as J, a as Q } from "./useSubscriptionCheckout-B1CyTY9V.js";
14
+ import { c as X, u as Z, a as $, b as ee } from "./useBillingStatusOptions-Bo1wYzgB.js";
15
15
  export {
16
16
  r as LEGAL_DOCS,
17
17
  i as LEGAL_DOC_KEYS,
package/dist/feedback.js CHANGED
@@ -1,5 +1,5 @@
1
- import { B as b, a as s, F as d, b as F, _ as o, c, R as t, V as r } from "./FeedbackModal.vue_vue_type_script_setup_true_lang-FIZdBxIZ.js";
2
- import { C as i } from "./index-BYH7DaQf.js";
1
+ import { B as b, a as s, F as d, b as F, _ as o, c, R as t, V as r } from "./FeedbackModal.vue_vue_type_script_setup_true_lang-CsgTdQQG.js";
2
+ import { C as i } from "./index-CHWVBunT.js";
3
3
  import { F as m, a as f, b as n, c as p } from "./FeedbackItem-BP-SiJ2u.js";
4
4
  export {
5
5
  i as Clipboard,
@@ -0,0 +1,34 @@
1
+ import { n as i } from "./useAuthkitAppsAuthPageInfo-2qQf2lJP.js";
2
+ import { g as a } from "./runtime-7yUdSOYv.js";
3
+ async function p(e) {
4
+ if (!e)
5
+ return null;
6
+ try {
7
+ const t = a().config, r = await fetch(`${t.authPrefixUrl}/apps/authPageInfo`, {
8
+ method: "POST",
9
+ headers: {
10
+ "Content-Type": "application/json",
11
+ "app-id": e,
12
+ "client-key": t.clientKey,
13
+ ...t.platform ? {
14
+ "x-platform": t.platform
15
+ } : {},
16
+ ...t.appVersion ? {
17
+ "x-app-version": t.appVersion
18
+ } : {}
19
+ },
20
+ body: JSON.stringify({
21
+ clientKey: t.clientKey
22
+ })
23
+ });
24
+ if (!r.ok)
25
+ return null;
26
+ const n = await r.json(), o = n == null ? void 0 : n.aboutUs;
27
+ return !o || typeof o != "object" ? null : i(o);
28
+ } catch {
29
+ return null;
30
+ }
31
+ }
32
+ export {
33
+ p as f
34
+ };
@@ -1,5 +1,5 @@
1
1
  /* empty css */
2
- import "./apiClients-CWSwNzGk.js";
2
+ import "./apiClients-cJElwYYN.js";
3
3
  import { defineComponent as X, ref as J, openBlock as K, createBlock as Q, unref as W } from "vue";
4
4
  import { Message as Z } from "@arco-design/web-vue";
5
5
  import { Icon as $ } from "@iconify/vue";