@huyooo/ui 1.0.2 → 1.0.4

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 (182) hide show
  1. package/dist/AuthkitAppSetting-BN8-xgNq.js +2674 -0
  2. package/dist/{Contact-M6iyuyNL.js → Contact-DBH8CyKp.js} +105 -113
  3. package/dist/CustomTable-BzGfaAVH.js +276 -0
  4. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-B9BqGWm8.js +1480 -0
  5. package/dist/LandingPageDescription-BczWZHKy.js +12 -0
  6. package/dist/{LandingPageLinkGroup-DDNRivMt.js → LandingPageLinkGroup-r-t3H1X0.js} +87 -88
  7. package/dist/LandingPageSectionHeader-CVAqc7bx.js +137 -0
  8. package/dist/{LandingPageSectionTabs-Ce3_Rc2L.js → LandingPageSectionTabs-DhKpOj5F.js} +300 -309
  9. package/dist/LegalDocViewer-DlaLKGyX.js +2501 -0
  10. package/dist/Menu-uCexrsKP.js +199 -0
  11. package/dist/MessageHandle-mEkCsv9e.js +1173 -0
  12. package/dist/MessageList-Ce-_LNTk.js +244 -0
  13. package/dist/PaySubscriptions-CXkEjqr2.js +1326 -0
  14. package/dist/PricingPlans-DoWP5aX7.js +427 -0
  15. package/dist/ReferrerReferees-DgygiIiE.js +237 -0
  16. package/dist/{Upload.vue_vue_type_script_setup_true_lang-B6NOZjK0.js → Upload.vue_vue_type_script_setup_true_lang-VGh2V4o0.js} +1 -1
  17. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-zgjpFVln.js +592 -0
  18. package/dist/WidthContainer-PeWkCK0p.js +721 -0
  19. package/dist/{apiClients-DrGX2iJy.js → apiClients-BcXOLuYu.js} +131 -98
  20. package/dist/authkit.d.ts +6 -2
  21. package/dist/authkit.js +53 -44
  22. package/dist/common/authProviderIcons.d.ts +12 -0
  23. package/dist/common/globalConfig.d.ts +5 -0
  24. package/dist/common/tableColumnWidths.d.ts +11 -0
  25. package/dist/common.js +3 -3
  26. package/dist/components/AuthProviderIcon.vue.d.ts +12 -0
  27. package/dist/components/Authkit/AppSetting/AuthkitEmailVerify.vue.d.ts +2 -2
  28. package/dist/components/Authkit/AppSetting/AuthkitOAuthBinding.vue.d.ts +2 -1
  29. package/dist/components/Authkit/AppSetting/AuthkitPasskeyBinding.vue.d.ts +14 -0
  30. package/dist/components/Authkit/AppSetting/AuthkitPasswordUpdate.vue.d.ts +11 -1
  31. package/dist/components/Authkit/AppSetting/AuthkitPersonalInformation.vue.d.ts +1 -3
  32. package/dist/components/Authkit/AppSetting/AuthkitPhoneVerify.vue.d.ts +13 -3
  33. package/dist/components/Authkit/Auth/AuthkitBindEmail.vue.d.ts +29 -2
  34. package/dist/components/Authkit/Auth/AuthkitBindPhone.vue.d.ts +2 -2
  35. package/dist/components/Authkit/Auth/AuthkitEmailUpdate.vue.d.ts +2 -2
  36. package/dist/components/Authkit/Auth/AuthkitOauthItem.vue.d.ts +37 -9
  37. package/dist/components/Authkit/Auth/AuthkitOauthList.vue.d.ts +7 -11
  38. package/dist/components/Authkit/Auth/AuthkitPasswordUpdateAndVerify.vue.d.ts +2 -2
  39. package/dist/components/Authkit/Auth/AuthkitPhonePasswordUpdateAndVerify.vue.d.ts +2 -2
  40. package/dist/components/Authkit/Auth/AuthkitServiceAgreementAndPrivacyProtection.vue.d.ts +11 -7
  41. package/dist/components/Authkit/Auth/AuthkitSignInEmailCode.vue.d.ts +2 -2
  42. package/dist/components/Authkit/Auth/AuthkitSignInPhone.vue.d.ts +3 -62
  43. package/dist/components/Authkit/Auth/AuthkitSignUpPhone.vue.d.ts +2 -2
  44. package/dist/components/Authkit/Auth/AuthkitSwitchSignUpOrResetPassword.vue.d.ts +9 -0
  45. package/dist/components/Authkit/AuthkitAuth.vue.d.ts +2 -8
  46. package/dist/components/Authkit/AuthkitAuthModal.vue.d.ts +0 -4
  47. package/dist/components/Authkit/AuthkitProvider.vue.d.ts +5 -2
  48. package/dist/components/Authkit/AuthkitSendVerifyCode.vue.d.ts +2 -1
  49. package/dist/components/CustomTable.vue.d.ts +27 -1
  50. package/dist/components/Ellipsis.vue.d.ts +2 -6
  51. package/dist/components/Feedback/FeedbackList.vue.d.ts +4 -1
  52. package/dist/components/Gradientbackground.vue.d.ts +2 -2
  53. package/dist/components/HeaderMenus.vue.d.ts +4 -1
  54. package/dist/components/InfiniteLoading.vue.d.ts +1 -1
  55. package/dist/components/LandingPage/LandingPageContainer.vue.d.ts +2 -2
  56. package/dist/components/LandingPage/LandingPagePageContent.vue.d.ts +2 -2
  57. package/dist/components/LegalDoc/LegalDocViewer.vue.d.ts +7 -0
  58. package/dist/components/Menu.vue.d.ts +2 -1
  59. package/dist/components/MenuItem.vue.d.ts +3 -1
  60. package/dist/components/Message/MessageAppMessage.vue.d.ts +12 -2
  61. package/dist/components/Message/MessageDetails.vue.d.ts +9 -161
  62. package/dist/components/Message/MessageHandle.vue.d.ts +16 -4
  63. package/dist/components/Message/MessageList.vue.d.ts +4 -3
  64. package/dist/components/Message/MessageNotificationDetails.vue.d.ts +13 -0
  65. package/dist/components/Message/messageBody/DescriptionsMessageBody.vue.d.ts +3 -0
  66. package/dist/components/Message/messageBody/JsonMessageBodyFallback.vue.d.ts +3 -0
  67. package/dist/components/Message/messageBody/TextMessageBody.vue.d.ts +3 -0
  68. package/dist/components/Message/messageBody/descriptionRows.d.ts +14 -0
  69. package/dist/components/Message/messageBody/descriptionsMessageBody.d.ts +32 -0
  70. package/dist/components/Message/messageBody/descriptionsValueRender.d.ts +4 -0
  71. package/dist/components/Message/messageBody/messageBodyRegistry.d.ts +9 -0
  72. package/dist/components/Message/messageBody/registerBuiltinMessageBodies.d.ts +2 -0
  73. package/dist/components/Message/messageBody/types.d.ts +7 -0
  74. package/dist/components/Referrer/ReferrerRefereeCell.vue.d.ts +7 -0
  75. package/dist/components/Referrer/ReferrerReferees.vue.d.ts +1 -0
  76. package/dist/components/UserMenu/UserAccountMenu.vue.d.ts +1 -16
  77. package/dist/components/UserMenu/UserMenuItem.vue.d.ts +4 -0
  78. package/dist/components/UserMenu/UserMenuModals.vue.d.ts +18 -4
  79. package/dist/components/UserMenu/parts/UserAvatar.vue.d.ts +6 -0
  80. package/dist/components/UserMenu/parts/UserBasicInformation.vue.d.ts +7 -2
  81. package/dist/composables/Authkit/fetchAuthPageAboutUs.d.ts +3 -0
  82. package/dist/composables/Authkit/resolveRoutePermission.d.ts +2 -0
  83. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +16 -0
  84. package/dist/composables/Authkit/useAuthkitAuth.d.ts +2 -0
  85. package/dist/composables/Authkit/useAuthkitPasskey.d.ts +10 -0
  86. package/dist/composables/Authkit/useLegalDocHostActions.d.ts +6 -0
  87. package/dist/composables/Authkit/useLegalDocs.d.ts +19 -0
  88. package/dist/composables/Authkit/useOauth.d.ts +17 -4
  89. package/dist/composables/Authkit/useRegistrationTerms.d.ts +24 -0
  90. package/dist/composables/Authkit/verifyCodeCooldown.d.ts +19 -0
  91. package/dist/composables/Billing/useBillingPlans.d.ts +0 -4
  92. package/dist/composables/Billing/useBillingStatusOptions.d.ts +2 -6
  93. package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +16 -0
  94. package/dist/composables/Billing/usePaidProductOptions.d.ts +5 -0
  95. package/dist/composables/Message/messageCenterBadgeCounts.d.ts +28 -0
  96. package/dist/composables/UserMenu/useUserMenuBadgeCounts.d.ts +9 -0
  97. package/dist/composables/useInfiniteList.d.ts +19 -0
  98. package/dist/composables/useMessageNotifications.d.ts +3 -6
  99. package/dist/composables.d.ts +4 -2
  100. package/dist/composables.js +50 -45
  101. package/dist/feedback.d.ts +1 -0
  102. package/dist/feedback.js +12 -11
  103. package/dist/fetchAuthPageAboutUs-dzTSwRsB.js +25 -0
  104. package/dist/{Clipboard-Bo7gdpR6.js → index-BkLvw1PU.js} +1 -1
  105. package/dist/landingPage.js +21 -21
  106. package/dist/legalDocs/buildBuiltinUrl.d.ts +3 -0
  107. package/dist/{utils/legalLinks.d.ts → legalDocs/constants.d.ts} +0 -10
  108. package/dist/legalDocs/index.d.ts +7 -0
  109. package/dist/legalDocs/isConfigured.d.ts +7 -0
  110. package/dist/legalDocs/open.d.ts +3 -0
  111. package/dist/legalDocs/resolveAppId.d.ts +8 -0
  112. package/dist/legalDocs/resolveTarget.d.ts +4 -0
  113. package/dist/legalDocs/types.d.ts +12 -0
  114. package/dist/main.js +320 -308
  115. package/dist/message.d.ts +3 -0
  116. package/dist/message.js +301 -21
  117. package/dist/pay.d.ts +1 -1
  118. package/dist/pay.js +14 -17
  119. package/dist/privateCom.js +1 -1
  120. package/dist/referrer.js +1 -1
  121. package/dist/style.css +1 -1
  122. package/dist/types/api/auth.generated.d.ts +1385 -328
  123. package/dist/types/api/billing.generated.d.ts +907 -76
  124. package/dist/types/api/ones.generated.d.ts +131 -2
  125. package/dist/types/api.d.ts +1 -0
  126. package/dist/types/app.d.ts +10 -0
  127. package/dist/types/user.d.ts +1 -0
  128. package/dist/upload.js +2 -2
  129. package/dist/{useAuthkitAppsAuthPageInfo-C2yKgl8t.js → useAuthkitAppsAuthPageInfo-CNudJd04.js} +18 -17
  130. package/dist/useAuthkitAuth-3m0yW6uP.js +267 -0
  131. package/dist/{useAuthkitCreateAndUpdate-oo9517Gj.js → useAuthkitCreateAndUpdate-BsINsI-E.js} +1 -1
  132. package/dist/{useAuthkitUsersProfile-BZDk21c8.js → useAuthkitUsersProfile-DJlMsftY.js} +3 -3
  133. package/dist/useBillingStatusOptions-CfHQOFNw.js +71 -0
  134. package/dist/{useEnsureAuthenticated-BuIbxqsO.js → useEnsureAuthenticated-DNkCCy_Y.js} +2 -2
  135. package/dist/useLegalDocs-DQP_Yq6B.js +106 -0
  136. package/dist/{useMessageNotifications-D85_-mDq.js → useMessageNotifications-CAphguOm.js} +21 -24
  137. package/dist/useRoutePermission-CEiya9AM.js +218 -0
  138. package/dist/useSEO-CDWxbk8B.js +221 -0
  139. package/dist/useSubscriptionCheckout-d_M_rKRa.js +368 -0
  140. package/dist/{useUploadCos-BRKRzSy3.js → useUploadCos-C8BqFPkx.js} +1 -1
  141. package/dist/user.js +1 -1
  142. package/dist/userMenuModal-D-nDaYqM.js +66 -0
  143. package/dist/utils/apiMiddlewares.d.ts +5 -5
  144. package/dist/utils/apiResponse.d.ts +11 -0
  145. package/dist/utils/authProviderIcon.d.ts +3 -0
  146. package/dist/utils/authkit.d.ts +20 -7
  147. package/dist/utils/formatPoints.d.ts +8 -0
  148. package/dist/utils/messageNotificationContent.d.ts +4 -0
  149. package/dist/utils/messageTextLink.d.ts +9 -0
  150. package/dist/utils/passkeySupport.d.ts +8 -0
  151. package/dist/utils/pointsFlowTypes.d.ts +10 -0
  152. package/dist/utils/pointsHistoryDisplay.d.ts +8 -0
  153. package/dist/utils/refundStatusDisplay.d.ts +1 -0
  154. package/dist/utils/subscriptionDisplay.d.ts +7 -0
  155. package/dist/utils/userDisplay.d.ts +41 -0
  156. package/package.json +11 -3
  157. package/dist/AuthkitAppSetting-C-0uuLSg.js +0 -1921
  158. package/dist/AuthkitGithubBinding-C5zEy9zN.js +0 -2207
  159. package/dist/CustomTable-CCOQxfxr.js +0 -279
  160. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-M1NQ-rx-.js +0 -1396
  161. package/dist/LandingPageFAQ-CZJXvor9.js +0 -80
  162. package/dist/LandingPageSectionHeader-D_74W4My.js +0 -69
  163. package/dist/Menu-Cy2ZPeaz.js +0 -170
  164. package/dist/MessageHandle-BG12aX0i.js +0 -924
  165. package/dist/MessageList-CrCF8mU6.js +0 -233
  166. package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-gsjL6yAe.js +0 -142
  167. package/dist/PaySubscriptions-C3KiTsQS.js +0 -1241
  168. package/dist/PricingPlans-uwlFiiJx.js +0 -404
  169. package/dist/ReferrerReferees-Zb5Bd-_e.js +0 -106
  170. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-QWUNRjGh.js +0 -520
  171. package/dist/WidthContainer-BVBk0kJN.js +0 -688
  172. package/dist/components/Feedback/FeedbackDetails.vue.d.ts +0 -178
  173. package/dist/composables/Authkit/useLegalLinks.d.ts +0 -34
  174. package/dist/index-D3Kp6R4z.js +0 -4
  175. package/dist/useAuthkitAuth-DmS-H7M2.js +0 -175
  176. package/dist/useBillingStatusOptions-B7xLU3fs.js +0 -145
  177. package/dist/useLegalLinks-Cwr45PBT.js +0 -60
  178. package/dist/useRoutePermission-CaWtjLRA.js +0 -212
  179. package/dist/useSEO-BSMQdBR9.js +0 -158
  180. package/dist/useSubscriptionCheckout-BRk5h9aC.js +0 -365
  181. package/dist/useTableHandle-BdujaiNX.js +0 -69
  182. /package/dist/components/{Feedback/FeedbackVideoPreview.vue.d.ts → VideoPreview.vue.d.ts} +0 -0
@@ -0,0 +1,721 @@
1
+ /* empty css */
2
+ import "./userMenuModal-D-nDaYqM.js";
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 l, withCtx as U, createTextVNode as K, renderSlot as V, toDisplayString as T, createCommentVNode as x, onMounted as Q, onBeforeUnmount as X, normalizeClass as C, Fragment as B, renderList as E, createBlock as Y, Teleport as ye, nextTick as J, computed as L, normalizeStyle as O } from "vue";
4
+ import { Spin as Z } from "@arco-design/web-vue";
5
+ import { u as ee } from "./useAuthkitAuth-3m0yW6uP.js";
6
+ import { d as be, b as ke } from "./apiClients-BcXOLuYu.js";
7
+ import { u as q } from "./useAuthkitAppsAuthPageInfo-CNudJd04.js";
8
+ import { u as te } from "./useAuthkitUsersProfile-DJlMsftY.js";
9
+ import { b as ne, f as oe, w as W, a as se, c as ae } from "./useRoutePermission-CEiya9AM.js";
10
+ import "./useUploadCos-C8BqFPkx.js";
11
+ import { useRouter as re, useRoute as ie } from "vue-router";
12
+ import "@unhead/vue";
13
+ import "./useUserMenu-ClPBlvaM.js";
14
+ import "./useBillingStatusOptions-CfHQOFNw.js";
15
+ import { c as ue, h as le, k as ce, _ as de, f as me, j as pe, d as he, g as R, U as we, i as fe } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-zgjpFVln.js";
16
+ import "./PaySubscriptions-CXkEjqr2.js";
17
+ /* empty css */
18
+ /* empty css */
19
+ import { M as $e } from "./Menu-uCexrsKP.js";
20
+ import "./CollapseItem-DUzZA6tx.js";
21
+ /* empty css */
22
+ /* empty css */
23
+ import "./index-BkLvw1PU.js";
24
+ /* empty css */
25
+ import "./CustomTable-BzGfaAVH.js";
26
+ import "@vueuse/core";
27
+ import "./index-D56hUMeD.js";
28
+ import { Icon as z } from "@iconify/vue";
29
+ import { L as _e } from "./Logo-D7fyXyB-.js";
30
+ import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
31
+ const Me = {
32
+ class: "SidebarCom"
33
+ }, Ce = {
34
+ class: "LogoContent"
35
+ }, Te = {
36
+ class: "MenuContent"
37
+ }, Se = {
38
+ class: "sidebar-footer"
39
+ }, Ie = /* @__PURE__ */ P({
40
+ __name: "AppSidebar",
41
+ props: {
42
+ menuType: {
43
+ default: "system"
44
+ },
45
+ showUserPanel: {
46
+ type: Boolean,
47
+ default: !0
48
+ }
49
+ },
50
+ setup(h) {
51
+ const e = h, {
52
+ appsData: m
53
+ } = q(), {
54
+ clearAuth: f
55
+ } = ee(), {
56
+ clearUserProfile: c
57
+ } = te(), {
58
+ menus: p
59
+ } = ne(e.menuType), g = re();
60
+ function y() {
61
+ g.push({
62
+ path: "/"
63
+ });
64
+ }
65
+ function k() {
66
+ c(), f(), y();
67
+ }
68
+ const b = ie(), $ = A([""]);
69
+ function M(t) {
70
+ const i = t.path;
71
+ W(() => {
72
+ g.push({
73
+ path: i,
74
+ query: b.query
75
+ }), $.value = [i], window.scrollTo({
76
+ top: 0,
77
+ behavior: "smooth"
78
+ });
79
+ });
80
+ }
81
+ return N(() => [b.path, p.value], () => {
82
+ const t = oe(p.value, b.path, {
83
+ // Sidebar 中,子路由应该选中子菜单项
84
+ returnParentOnChildMatch: !1,
85
+ // 后备查找函数
86
+ fallback: (i) => se(b.matched, e.menuType, i)
87
+ });
88
+ t && ($.value = [t]);
89
+ }, {
90
+ immediate: !0,
91
+ deep: !0
92
+ }), (t, i) => (n(), s("div", Me, [a("div", Ce, [r(l(_e), {
93
+ icon: l(m).applicationLogoUrl,
94
+ name: l(m).name,
95
+ onTo: y
96
+ }, null, 8, ["icon", "name"])]), a("div", Te, [r($e, {
97
+ "selected-keys": $.value,
98
+ "onUpdate:selectedKeys": i[0] || (i[0] = (d) => $.value = d),
99
+ menus: l(p),
100
+ onChange: M
101
+ }, null, 8, ["selected-keys", "menus"])]), a("div", Se, [r(l(ue), {
102
+ position: "tr",
103
+ "dropdown-offset-y": "30px"
104
+ }, {
105
+ trigger: U(() => [r(l(we))]),
106
+ items: U(() => [r(l(le)), r(l(ce)), r(l(de)), r(l(me)), r(l(pe)), r(l(he)), r(l(R), {
107
+ icon: "lucide:home",
108
+ onClick: y
109
+ }, {
110
+ default: U(() => [...i[1] || (i[1] = [K("主页", -1)])]),
111
+ _: 1
112
+ }), r(l(R), {
113
+ icon: "lucide:log-out",
114
+ danger: "",
115
+ onClick: k
116
+ }, {
117
+ default: U(() => [...i[2] || (i[2] = [K("退出登陆", -1)])]),
118
+ _: 1
119
+ })]),
120
+ _: 1
121
+ }), r(l(fe))])]));
122
+ }
123
+ }), xe = /* @__PURE__ */ S(Ie, [["__scopeId", "data-v-643d615f"]]), Ae = {
124
+ class: "layout"
125
+ }, Pe = {
126
+ class: "leftContent"
127
+ }, Ue = {
128
+ class: "content"
129
+ }, Be = {
130
+ class: "contentCenter"
131
+ }, Le = {
132
+ class: "pages"
133
+ }, Ke = {
134
+ key: 0,
135
+ class: "loading"
136
+ }, He = /* @__PURE__ */ P({
137
+ __name: "AppLayout",
138
+ props: {
139
+ menuType: {
140
+ default: "system"
141
+ },
142
+ showUserPanel: {
143
+ type: Boolean,
144
+ default: !0
145
+ }
146
+ },
147
+ setup(h) {
148
+ const e = h, {
149
+ isChecking: m
150
+ } = ae();
151
+ return (f, c) => (n(), s("div", Ae, [a("div", Pe, [r(xe, {
152
+ "menu-type": e.menuType,
153
+ "show-user-panel": e.showUserPanel
154
+ }, null, 8, ["menu-type", "show-user-panel"])]), a("div", Ue, [a("div", Be, [a("div", Le, [l(m) ? (n(), s("div", Ke, [r(l(Z), {
155
+ size: 40
156
+ })])) : V(f.$slots, "default", {
157
+ key: 1
158
+ }, void 0, !0)])])])]));
159
+ }
160
+ }), sn = /* @__PURE__ */ S(He, [["__scopeId", "data-v-410ad52b"]]), De = {
161
+ class: "ContentHead"
162
+ }, Ee = {
163
+ class: "title"
164
+ }, Re = {
165
+ key: 0,
166
+ class: "description"
167
+ }, ze = /* @__PURE__ */ P({
168
+ __name: "ContentHead",
169
+ props: {
170
+ title: {
171
+ type: String,
172
+ required: !0,
173
+ default: () => ""
174
+ },
175
+ description: {
176
+ type: String,
177
+ required: !0,
178
+ default: () => ""
179
+ }
180
+ },
181
+ setup(h) {
182
+ const e = h;
183
+ return (m, f) => (n(), s("div", De, [a("h1", Ee, T(e.title), 1), e.description ? (n(), s("p", Re, T(e.description), 1)) : x("", !0)]));
184
+ }
185
+ }), an = /* @__PURE__ */ S(ze, [["__scopeId", "data-v-209a7bef"]]), Oe = {
186
+ class: "desktop-menus"
187
+ }, We = {
188
+ key: 0,
189
+ class: "header-menu-item"
190
+ }, Ne = {
191
+ class: "submenu-popup"
192
+ }, Ve = {
193
+ class: "submenu-content"
194
+ }, qe = ["onClick"], Ge = {
195
+ key: 0,
196
+ class: "submenu-item-icon"
197
+ }, je = {
198
+ class: "submenu-item-content"
199
+ }, Fe = {
200
+ class: "submenu-item-title"
201
+ }, Je = {
202
+ key: 0,
203
+ class: "submenu-item-description"
204
+ }, Qe = ["onClick"], Xe = ["aria-expanded", "aria-label"], Ye = {
205
+ class: "mobile-menu-content",
206
+ "aria-label": "主导航"
207
+ }, Ze = {
208
+ key: 0,
209
+ class: "mobile-menu-group"
210
+ }, et = ["aria-expanded", "onClick"], tt = {
211
+ key: 0,
212
+ class: "mobile-submenu"
213
+ }, nt = ["onClick"], ot = ["onClick"], st = /* @__PURE__ */ P({
214
+ __name: "HeaderMenus",
215
+ props: {
216
+ menus: {
217
+ type: Array,
218
+ required: !0
219
+ },
220
+ activateKey: {
221
+ type: String,
222
+ required: !0
223
+ },
224
+ theme: {
225
+ type: String,
226
+ default: "light"
227
+ }
228
+ },
229
+ emits: ["change"],
230
+ setup(h, {
231
+ emit: e
232
+ }) {
233
+ const m = h, f = e, c = A(!1), p = A({}), g = A(null), y = A(null);
234
+ let k = "";
235
+ function b(o) {
236
+ return Array.from(o.querySelectorAll('button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'));
237
+ }
238
+ function $() {
239
+ c.value || (k = document.body.style.overflow, document.body.style.overflow = "hidden", c.value = !0, J(() => {
240
+ var o;
241
+ return (o = b(y.value ?? document.body)[0]) == null ? void 0 : o.focus();
242
+ }));
243
+ }
244
+ function M() {
245
+ c.value && (c.value = !1, document.body.style.overflow = k, J(() => {
246
+ var o;
247
+ return (o = g.value) == null ? void 0 : o.focus();
248
+ }));
249
+ }
250
+ function t() {
251
+ c.value && (c.value = !1, document.body.style.overflow = k);
252
+ }
253
+ function i() {
254
+ c.value ? M() : $();
255
+ }
256
+ function d(o) {
257
+ f("change", o);
258
+ }
259
+ function I(o) {
260
+ f("change", o), t();
261
+ }
262
+ function H(o) {
263
+ p.value[o] = !p.value[o];
264
+ }
265
+ function D(o) {
266
+ const _ = m.activateKey, u = o.path;
267
+ if (_ === u || _.startsWith(u + "/"))
268
+ return !0;
269
+ if (o.children && o.children.length > 0) {
270
+ for (const w of o.children)
271
+ if (_ === w.path || _.startsWith(w.path + "/"))
272
+ return !0;
273
+ }
274
+ return !1;
275
+ }
276
+ function G(o) {
277
+ const _ = m.activateKey, u = o.path;
278
+ return !!(_ === u || _.startsWith(u + "/"));
279
+ }
280
+ function ve(o) {
281
+ f("change", o);
282
+ }
283
+ function j(o) {
284
+ o.key === "Escape" && c.value && M();
285
+ }
286
+ function ge(o) {
287
+ if (o.key !== "Tab" || !y.value) return;
288
+ const _ = b(y.value);
289
+ if (_.length === 0) return;
290
+ const u = _[0], w = _[_.length - 1];
291
+ o.shiftKey && document.activeElement === u ? (o.preventDefault(), w.focus()) : !o.shiftKey && document.activeElement === w && (o.preventDefault(), u.focus());
292
+ }
293
+ return Q(() => document.addEventListener("keydown", j)), X(() => {
294
+ document.removeEventListener("keydown", j), document.body.style.overflow = k;
295
+ }), (o, _) => (n(), s("div", {
296
+ class: C(["HeaderMenus", {
297
+ "HeaderMenus--dark": m.theme === "dark"
298
+ }])
299
+ }, [a("div", Oe, [(n(!0), s(B, null, E(m.menus, (u, w) => (n(), s(B, {
300
+ key: w
301
+ }, [u.children && u.children.length > 0 ? (n(), s("div", We, [a("div", {
302
+ class: C(["headerLink hasChildren", {
303
+ activate: D(u)
304
+ }])
305
+ }, [K(T(u.name) + " ", 1), r(l(z), {
306
+ icon: "mingcute:down-line",
307
+ class: "dropdown-arrow"
308
+ })], 2), a("div", Ne, [a("div", Ve, [(n(!0), s(B, null, E(u.children, (v, F) => (n(), s("div", {
309
+ key: F,
310
+ class: C(["submenu-item", {
311
+ active: G(v)
312
+ }]),
313
+ onClick: (St) => d(v)
314
+ }, [v.icon ? (n(), s("div", Ge, [r(l(z), {
315
+ icon: v.icon
316
+ }, null, 8, ["icon"])])) : x("", !0), a("div", je, [a("div", Fe, T(v.name), 1), v.description ? (n(), s("div", Je, T(v.description), 1)) : x("", !0)])], 10, qe))), 128))])])])) : (n(), s("div", {
317
+ key: 1,
318
+ class: C(["headerLink", {
319
+ activate: D(u)
320
+ }]),
321
+ onClick: (v) => ve(u)
322
+ }, T(u.name), 11, Qe))], 64))), 128))]), a("button", {
323
+ ref_key: "menuToggleRef",
324
+ ref: g,
325
+ type: "button",
326
+ class: C(["mobile-menu-toggle", {
327
+ active: c.value
328
+ }]),
329
+ "aria-expanded": c.value,
330
+ "aria-controls": "site-mobile-menu",
331
+ "aria-label": c.value ? "关闭导航菜单" : "打开导航菜单",
332
+ onClick: i
333
+ }, [..._[0] || (_[0] = [a("span", {
334
+ class: "hamburger-line"
335
+ }, null, -1), a("span", {
336
+ class: "hamburger-line"
337
+ }, null, -1), a("span", {
338
+ class: "hamburger-line"
339
+ }, null, -1)])], 10, Xe), (n(), Y(ye, {
340
+ to: "body"
341
+ }, [c.value ? (n(), s("div", {
342
+ key: 0,
343
+ class: "mobile-menu-overlay",
344
+ "aria-hidden": "true",
345
+ onClick: M
346
+ })) : x("", !0), c.value ? (n(), s("div", {
347
+ key: 1,
348
+ id: "site-mobile-menu",
349
+ ref_key: "mobileMenuRef",
350
+ ref: y,
351
+ class: "mobile-menu",
352
+ role: "dialog",
353
+ "aria-label": "移动导航",
354
+ "aria-modal": "true",
355
+ onKeydown: ge
356
+ }, [a("nav", Ye, [(n(!0), s(B, null, E(m.menus, (u, w) => (n(), s(B, {
357
+ key: u.path
358
+ }, [u.children && u.children.length > 0 ? (n(), s("div", Ze, [a("button", {
359
+ type: "button",
360
+ class: C(["mobile-menu-item mobile-menu-item-header", {
361
+ activate: D(u)
362
+ }]),
363
+ "aria-expanded": p.value[w] ?? !1,
364
+ onClick: (v) => H(w)
365
+ }, [a("span", null, T(u.name), 1), r(l(z), {
366
+ icon: p.value[w] ? "mingcute:up-line" : "mingcute:down-line",
367
+ class: "mobile-submenu-arrow"
368
+ }, null, 8, ["icon"])], 10, et), p.value[w] ? (n(), s("div", tt, [(n(!0), s(B, null, E(u.children, (v) => (n(), s("button", {
369
+ key: v.path,
370
+ type: "button",
371
+ class: C(["mobile-submenu-item", {
372
+ active: G(v)
373
+ }]),
374
+ onClick: (F) => I(v)
375
+ }, T(v.name), 11, nt))), 128))])) : x("", !0)])) : (n(), s("button", {
376
+ key: 1,
377
+ type: "button",
378
+ class: C(["mobile-menu-item", {
379
+ activate: D(u)
380
+ }]),
381
+ onClick: (v) => I(u)
382
+ }, T(u.name), 11, ot))], 64))), 128))])], 544)) : x("", !0)]))], 2));
383
+ }
384
+ }), at = /* @__PURE__ */ S(st, [["__scopeId", "data-v-884ca88b"]]), rt = {
385
+ class: "HeaderCom"
386
+ }, it = {
387
+ class: "HeaderCom-inner"
388
+ }, ut = {
389
+ class: "left"
390
+ }, lt = {
391
+ class: "right"
392
+ }, ct = ["aria-label"], dt = {
393
+ key: 0,
394
+ class: "theme-icon",
395
+ "aria-hidden": "true"
396
+ }, mt = {
397
+ key: 1,
398
+ class: "theme-icon",
399
+ "aria-hidden": "true"
400
+ }, pt = /* @__PURE__ */ P({
401
+ __name: "Header",
402
+ props: {
403
+ menuType: {
404
+ default: "header"
405
+ },
406
+ showUserPanel: {
407
+ type: Boolean,
408
+ default: !0
409
+ },
410
+ showThemeToggle: {
411
+ type: Boolean,
412
+ default: !0
413
+ },
414
+ theme: {
415
+ default: "light"
416
+ }
417
+ },
418
+ setup(h) {
419
+ const e = h, {
420
+ appsData: m
421
+ } = q(), {
422
+ clearAuth: f
423
+ } = ee(), {
424
+ clearUserProfile: c
425
+ } = te(), {
426
+ menus: p
427
+ } = ne(e.menuType), g = A(""), y = re(), k = ie();
428
+ function b() {
429
+ W(() => {
430
+ y.push({
431
+ path: "/"
432
+ }), window.scrollTo({
433
+ top: 0,
434
+ behavior: "smooth"
435
+ });
436
+ });
437
+ }
438
+ function $() {
439
+ c(), f(), b();
440
+ }
441
+ function M(i) {
442
+ const d = i.path;
443
+ W(() => {
444
+ y.push(d), g.value = d, window.scrollTo({
445
+ top: 0,
446
+ behavior: "smooth"
447
+ });
448
+ });
449
+ }
450
+ function t() {
451
+ be(e.theme === "dark" ? "light" : "dark");
452
+ }
453
+ return N(() => [k.path, p.value], () => {
454
+ g.value = oe(p.value, k.path, {
455
+ // Header 中,子菜单匹配时返回父菜单路径
456
+ returnParentOnChildMatch: !0,
457
+ // 后备查找函数
458
+ fallback: (i) => se(k.matched, e.menuType, i)
459
+ });
460
+ }, {
461
+ immediate: !0,
462
+ deep: !0
463
+ }), (i, d) => (n(), s("header", rt, [a("div", it, [a("div", ut, [r(_e, {
464
+ icon: l(m).applicationLogoUrl,
465
+ name: l(m).name,
466
+ onTo: b
467
+ }, null, 8, ["icon", "name"])]), a("div", lt, [r(at, {
468
+ menus: l(p),
469
+ activateKey: g.value,
470
+ theme: e.theme,
471
+ onChange: M
472
+ }, null, 8, ["menus", "activateKey", "theme"]), e.showThemeToggle ? (n(), s("button", {
473
+ key: 0,
474
+ type: "button",
475
+ class: "theme-toggle",
476
+ "aria-label": e.theme === "dark" ? "切换为浅色" : "切换为深色",
477
+ onClick: t
478
+ }, [e.theme === "dark" ? (n(), s("span", dt, [...d[0] || (d[0] = [a("svg", {
479
+ xmlns: "http://www.w3.org/2000/svg",
480
+ width: "20",
481
+ height: "20",
482
+ viewBox: "0 0 24 24",
483
+ fill: "none",
484
+ stroke: "currentColor",
485
+ "stroke-width": "2",
486
+ "stroke-linecap": "round",
487
+ "stroke-linejoin": "round"
488
+ }, [a("circle", {
489
+ cx: "12",
490
+ cy: "12",
491
+ r: "4"
492
+ }), a("path", {
493
+ d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"
494
+ })], -1)])])) : (n(), s("span", mt, [...d[1] || (d[1] = [a("svg", {
495
+ xmlns: "http://www.w3.org/2000/svg",
496
+ width: "20",
497
+ height: "20",
498
+ viewBox: "0 0 24 24",
499
+ fill: "none",
500
+ stroke: "currentColor",
501
+ "stroke-width": "2",
502
+ "stroke-linecap": "round",
503
+ "stroke-linejoin": "round"
504
+ }, [a("path", {
505
+ d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"
506
+ })], -1)])]))], 8, ct)) : x("", !0), e.showUserPanel ? (n(), Y(ue, {
507
+ key: 1
508
+ }, {
509
+ items: U(() => [r(le), r(ce), r(de), r(me), r(pe), r(he), r(R, {
510
+ icon: "lucide:home",
511
+ onClick: b
512
+ }, {
513
+ default: U(() => [...d[2] || (d[2] = [K("主页", -1)])]),
514
+ _: 1
515
+ }), r(R, {
516
+ icon: "lucide:log-out",
517
+ danger: "",
518
+ onClick: $
519
+ }, {
520
+ default: U(() => [...d[3] || (d[3] = [K("退出登陆", -1)])]),
521
+ _: 1
522
+ })]),
523
+ _: 1
524
+ })) : x("", !0), r(fe)])])]));
525
+ }
526
+ }), ht = /* @__PURE__ */ S(pt, [["__scopeId", "data-v-50a6a214"]]), ft = {
527
+ class: "layout-inner"
528
+ }, _t = {
529
+ key: 0,
530
+ class: "loading"
531
+ }, vt = "none", gt = "var(--huyooo-layout-dark-background)", yt = /* @__PURE__ */ P({
532
+ __name: "DefaultLayout",
533
+ props: {
534
+ menuType: {
535
+ default: "header"
536
+ },
537
+ showUserPanel: {
538
+ type: Boolean,
539
+ default: !0
540
+ },
541
+ showThemeToggle: {
542
+ type: Boolean,
543
+ default: !0
544
+ },
545
+ enableRoutePermission: {
546
+ type: Boolean,
547
+ default: !0
548
+ },
549
+ backgroundImage: {
550
+ default: ""
551
+ },
552
+ theme: {
553
+ default: void 0
554
+ }
555
+ },
556
+ setup(h) {
557
+ var $, M;
558
+ const e = h, {
559
+ appsData: m
560
+ } = q(), f = A(typeof window < "u" && ((M = ($ = window.matchMedia) == null ? void 0 : $.call(window, "(prefers-color-scheme: dark)")) == null ? void 0 : M.matches));
561
+ function c() {
562
+ var t, i;
563
+ typeof window > "u" || (f.value = ((i = (t = window.matchMedia) == null ? void 0 : t.call(window, "(prefers-color-scheme: dark)")) == null ? void 0 : i.matches) ?? !1);
564
+ }
565
+ let p;
566
+ Q(() => {
567
+ var i, d;
568
+ c();
569
+ const t = (i = window.matchMedia) == null ? void 0 : i.call(window, "(prefers-color-scheme: dark)");
570
+ (d = t == null ? void 0 : t.addEventListener) == null || d.call(t, "change", c), p = () => {
571
+ var I;
572
+ return (I = t == null ? void 0 : t.removeEventListener) == null ? void 0 : I.call(t, "change", c);
573
+ };
574
+ });
575
+ const g = L(() => {
576
+ var I, H;
577
+ const t = e.theme;
578
+ if (t && t !== "system") return t;
579
+ if (t === "system") return f.value ? "dark" : "light";
580
+ const i = ke.value;
581
+ if (i === "dark" || i === "light") return i;
582
+ if (i === "system") return f.value ? "dark" : "light";
583
+ const d = (H = (I = m.value) == null ? void 0 : I.brand) == null ? void 0 : H.theme;
584
+ return d === "dark" || d === "light" ? d : "light";
585
+ }), y = L(() => e.backgroundImage ? e.backgroundImage : g.value === "dark" ? gt : vt), k = L(() => {
586
+ const t = y.value;
587
+ return !t || t === "none" ? {
588
+ backgroundImage: "none",
589
+ backgroundColor: "transparent"
590
+ } : {
591
+ backgroundImage: t,
592
+ backgroundAttachment: "fixed"
593
+ };
594
+ });
595
+ N(g, (t) => {
596
+ typeof document > "u" || (t === "dark" ? (document.body.setAttribute("arco-theme", "dark"), document.body.classList.add("dark")) : (document.body.removeAttribute("arco-theme"), document.body.classList.remove("dark")));
597
+ }, {
598
+ immediate: !0
599
+ }), X(() => {
600
+ p == null || p();
601
+ });
602
+ const b = e.enableRoutePermission ? ae().isChecking : A(!1);
603
+ return (t, i) => (n(), s("div", {
604
+ class: C(["layout", {
605
+ "layout--dark": g.value === "dark"
606
+ }]),
607
+ style: O(k.value)
608
+ }, [r(ht, {
609
+ "menu-type": e.menuType,
610
+ "show-user-panel": e.showUserPanel,
611
+ "show-theme-toggle": e.showThemeToggle,
612
+ theme: g.value
613
+ }, null, 8, ["menu-type", "show-user-panel", "show-theme-toggle", "theme"]), a("main", ft, [l(b) ? (n(), s("div", _t, [r(l(Z), {
614
+ size: 40
615
+ })])) : V(t.$slots, "default", {
616
+ key: 1
617
+ }, void 0, !0)])], 6));
618
+ }
619
+ }), rn = /* @__PURE__ */ S(yt, [["__scopeId", "data-v-e5f20fa1"]]), bt = /* @__PURE__ */ P({
620
+ __name: "Gradientbackground",
621
+ props: {
622
+ width: {
623
+ type: String,
624
+ default: "100%"
625
+ },
626
+ height: {
627
+ type: String,
628
+ default: "100%"
629
+ },
630
+ zIndex: {
631
+ type: String,
632
+ default: "-1"
633
+ },
634
+ top: {
635
+ type: String,
636
+ default: "10%"
637
+ },
638
+ left: {
639
+ type: String,
640
+ default: "0%"
641
+ },
642
+ right: {
643
+ type: String,
644
+ default: "auto"
645
+ },
646
+ blur: {
647
+ type: String,
648
+ default: "0px"
649
+ },
650
+ background: {
651
+ type: String,
652
+ required: !1,
653
+ default: () => "var(--huyooo-gradient-background)"
654
+ }
655
+ },
656
+ setup(h) {
657
+ const e = h, m = L(() => ({
658
+ pointerEvents: "none",
659
+ position: "absolute",
660
+ zIndex: e.zIndex,
661
+ width: e.width,
662
+ height: e.height,
663
+ filter: `blur(${e.blur})`
664
+ })), f = L(() => ({
665
+ width: "100%",
666
+ height: "100%",
667
+ background: e.background
668
+ }));
669
+ return (c, p) => (n(), s("div", {
670
+ class: "ellipsis",
671
+ style: O(m.value)
672
+ }, [a("div", {
673
+ class: "ellipsis-item",
674
+ style: O(f.value)
675
+ }, null, 4)], 4));
676
+ }
677
+ }), un = /* @__PURE__ */ S(bt, [["__scopeId", "data-v-64c41f65"]]), kt = {
678
+ class: "SvgIcon"
679
+ }, wt = ["href", "fill"], $t = /* @__PURE__ */ P({
680
+ __name: "SvgIcon",
681
+ props: {
682
+ prefix: {
683
+ type: String,
684
+ required: !1,
685
+ default: "icon"
686
+ },
687
+ name: {
688
+ type: String,
689
+ required: !0
690
+ },
691
+ color: {
692
+ type: String,
693
+ required: !1,
694
+ default: "currentColor"
695
+ }
696
+ },
697
+ setup(h) {
698
+ const e = h, m = L(() => `#${e.prefix ?? "icon"}-${e.name}`);
699
+ return (f, c) => (n(), s("svg", kt, [a("use", {
700
+ href: m.value,
701
+ fill: e.color
702
+ }, null, 8, wt)]));
703
+ }
704
+ }), ln = /* @__PURE__ */ S($t, [["__scopeId", "data-v-9d0b08a0"]]), Mt = {}, Ct = {
705
+ class: "WidthContainer"
706
+ };
707
+ function Tt(h, e) {
708
+ return n(), s("div", Ct, [V(h.$slots, "default", {}, void 0, !0)]);
709
+ }
710
+ const cn = /* @__PURE__ */ S(Mt, [["render", Tt], ["__scopeId", "data-v-d06aac1f"]]);
711
+ export {
712
+ sn as A,
713
+ an as C,
714
+ rn as D,
715
+ un as G,
716
+ ht as H,
717
+ ln as S,
718
+ cn as W,
719
+ xe as a,
720
+ at as b
721
+ };