xto-fronted 0.4.102 → 0.4.104

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 (145) hide show
  1. package/dist/{index-CJSTBnGF.js → index-C2zTmROz.js} +1072 -1062
  2. package/dist/{index-BKj-34y6.js → index-Ci9SM-gg.js} +2 -2
  3. package/dist/{index-BK4Mut6H.js → index-HtulbTHk.js} +2 -2
  4. package/dist/{index-3ekBp4iW.js → index-j1GPEQjY.js} +2 -2
  5. package/dist/{index-B5DLfOYb.js → index-x7bKZmey.js} +23 -23
  6. package/dist/index.js +1 -1
  7. package/dist/stores/app.d.ts +8 -2
  8. package/dist/stores/auth.d.ts +2 -2
  9. package/dist/style.css +1 -1
  10. package/package.json +94 -94
  11. package/src/App.vue +48 -48
  12. package/src/api/index.ts +7 -7
  13. package/src/assets/styles/_dark.scss +639 -639
  14. package/src/assets/styles/_root.scss +183 -183
  15. package/src/assets/styles/_variables.scss +69 -69
  16. package/src/assets/styles/index.scss +460 -460
  17. package/src/components/Layout/Header.vue +2 -2
  18. package/src/components/Layout/MixTopMenu.vue +1185 -1185
  19. package/src/components/Layout/Sidebar.vue +229 -229
  20. package/src/components/Layout/SidebarMenuItem.vue +163 -163
  21. package/src/components/Layout/TopMenu.vue +1177 -1177
  22. package/src/components/Layout/index.vue +199 -199
  23. package/src/composables/useI18n.ts +43 -43
  24. package/src/index.ts +114 -100
  25. package/src/router/guards.ts +129 -127
  26. package/src/router/layoutRoute.ts +70 -70
  27. package/src/stores/app.ts +9 -0
  28. package/src/stores/index.ts +15 -15
  29. package/src/stores/locale.ts +66 -66
  30. package/src/stores/user.ts +0 -2
  31. package/src/types/api.d.ts +0 -1
  32. package/src/types/json-bigint.d.ts +18 -18
  33. package/src/types/xto.d.ts +172 -172
  34. package/src/utils/request.ts +184 -184
  35. package/src/views/dashboard/index.vue +545 -545
  36. package/src/views/error/403.vue +251 -251
  37. package/src/views/error/404.vue +253 -253
  38. package/src/views/login/index.vue +586 -586
  39. package/src/views/system/menu/index.vue +690 -690
  40. package/src/views/system/role/index.vue +583 -583
  41. package/src/views/system/user/index.vue +655 -655
  42. package/vite.config.ts +139 -139
  43. package/dist/assets/404-C9Uh6Uu-.css +0 -1
  44. package/dist/assets/404-fVB40gfP.js +0 -1
  45. package/dist/assets/404-zjGLLssH.js +0 -1
  46. package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +0 -1
  47. package/dist/assets/index-B2Y_ySNp.js +0 -2
  48. package/dist/assets/index-B5xc4gQB.css +0 -1
  49. package/dist/assets/index-B75sburk.js +0 -1
  50. package/dist/assets/index-BBdRdMfs.js +0 -1
  51. package/dist/assets/index-BDgOY6Rp.js +0 -1
  52. package/dist/assets/index-BIoRANs0.js +0 -1
  53. package/dist/assets/index-BRR97dc6.js +0 -1
  54. package/dist/assets/index-Bz0BgZQ1.js +0 -1
  55. package/dist/assets/index-CAdztNsv.css +0 -1
  56. package/dist/assets/index-CCXrcISf.css +0 -1
  57. package/dist/assets/index-CDPHn9Pd.js +0 -1
  58. package/dist/assets/index-CfpZmcpk.css +0 -1
  59. package/dist/assets/index-Cpew6d-v.css +0 -1
  60. package/dist/assets/index-CwJSA85U.js +0 -1
  61. package/dist/assets/index-CwRA10ac.js +0 -1
  62. package/dist/assets/index-D8NDxq9d.js +0 -1
  63. package/dist/assets/index-DEB6-Iv_.js +0 -2
  64. package/dist/assets/index-DM4Ezclc.css +0 -1
  65. package/dist/assets/index-DYv7nImj.css +0 -1
  66. package/dist/assets/index-Dm3Gq6SY.js +0 -1
  67. package/dist/assets/index-DxbgF-OR.js +0 -1
  68. package/dist/assets/index-RUdXk1fA.css +0 -1
  69. package/dist/assets/index-_xB0udHf.js +0 -1
  70. package/dist/assets/index-t-2Y0KhA.css +0 -1
  71. package/dist/assets/vendor-CUVPinTg.js +0 -13
  72. package/dist/assets/vue-vendor-Bpie-0gH.js +0 -29
  73. package/dist/assets/vue-vendor-DeJXJVbN.js +0 -29
  74. package/dist/assets/xto-base-C3XNcx7i.js +0 -1
  75. package/dist/assets/xto-base-CL2NKZJJ.css +0 -1
  76. package/dist/assets/xto-base-PwLGsxxb.js +0 -1
  77. package/dist/assets/xto-business--V1F5Gwb.css +0 -1
  78. package/dist/assets/xto-core-B1Ho_Ytu.js +0 -1
  79. package/dist/assets/xto-core-CtL4zKiV.js +0 -1
  80. package/dist/assets/xto-data-Coeo_ZYH.js +0 -1
  81. package/dist/assets/xto-data-MxZsiJgi.css +0 -1
  82. package/dist/assets/xto-data-bCXQa7fT.js +0 -1
  83. package/dist/assets/xto-feedback-Bxx38c3P.css +0 -1
  84. package/dist/assets/xto-feedback-CFysasJi.js +0 -1
  85. package/dist/assets/xto-feedback-CPydp0kn.js +0 -1
  86. package/dist/assets/xto-form-Cu6q3VLG.css +0 -1
  87. package/dist/assets/xto-form-DBlhgyXp.js +0 -1
  88. package/dist/assets/xto-form-bywohdAf.js +0 -1
  89. package/dist/assets/xto-layout-BDD6sSlM.css +0 -1
  90. package/dist/assets/xto-navigation-Bbdpine9.js +0 -1
  91. package/dist/assets/xto-navigation-I2o1CycT.js +0 -1
  92. package/dist/assets/xto-navigation-XfpyMpEo.css +0 -1
  93. package/dist/index-58aI1w0v.js +0 -515
  94. package/dist/index-A_B_Ap_A.js +0 -4240
  95. package/dist/index-B-lMqzxZ.js +0 -479
  96. package/dist/index-B6s_uLJE.js +0 -189
  97. package/dist/index-BAmYUT0G.js +0 -189
  98. package/dist/index-BJlOXgu5.js +0 -515
  99. package/dist/index-BMQao91y.js +0 -189
  100. package/dist/index-BRvi9qW-.js +0 -515
  101. package/dist/index-BVGW4DDQ.js +0 -189
  102. package/dist/index-BXg94yA2.js +0 -515
  103. package/dist/index-BYAkZ2gD.js +0 -641
  104. package/dist/index-BfXnrw05.js +0 -515
  105. package/dist/index-Bmb0rt9C.js +0 -641
  106. package/dist/index-Bmf0YbVq.js +0 -189
  107. package/dist/index-C1BnOFy7.js +0 -3145
  108. package/dist/index-C1j4f3mM.js +0 -479
  109. package/dist/index-C2-a5KSQ.js +0 -4233
  110. package/dist/index-C3K89jzC.js +0 -515
  111. package/dist/index-C92NkXAn.js +0 -479
  112. package/dist/index-CAHSv7LK.js +0 -4285
  113. package/dist/index-CVH7bDsl.js +0 -4285
  114. package/dist/index-Ccp6zfq-.js +0 -4290
  115. package/dist/index-CeZ0CSSs.js +0 -641
  116. package/dist/index-Cf8E7FM1.js +0 -4270
  117. package/dist/index-CgyQqbdx.js +0 -189
  118. package/dist/index-ChowNrlU.js +0 -641
  119. package/dist/index-CvQgEgUM.js +0 -641
  120. package/dist/index-D25KzR0I.js +0 -479
  121. package/dist/index-D4LWXVnG.js +0 -515
  122. package/dist/index-DCApv1oX.js +0 -641
  123. package/dist/index-DCBIjLHy.js +0 -515
  124. package/dist/index-DEYOivza.js +0 -641
  125. package/dist/index-DHH8Os_2.js +0 -189
  126. package/dist/index-DReodgBw.js +0 -4233
  127. package/dist/index-DTRJONCd.js +0 -515
  128. package/dist/index-DgffG7KK.js +0 -641
  129. package/dist/index-DjERNRXX.js +0 -515
  130. package/dist/index-DjXyzwL0.js +0 -479
  131. package/dist/index-DkOqM4e2.js +0 -3147
  132. package/dist/index-Ds8IV04t.js +0 -189
  133. package/dist/index-LSdsO2Ox.js +0 -479
  134. package/dist/index-UJixTdep.js +0 -479
  135. package/dist/index-WPRGF_GX.js +0 -189
  136. package/dist/index-WPWzllES.js +0 -641
  137. package/dist/index-Wl2Qg26t.js +0 -3147
  138. package/dist/index-dk0diNwi.js +0 -479
  139. package/dist/index-gBlRG4kk.js +0 -479
  140. package/dist/index-mVol7F2K.js +0 -479
  141. package/dist/index-xWU3J3OH.js +0 -641
  142. package/dist/index-zKJLxthI.js +0 -189
  143. package/dist/index.es.js +0 -95
  144. package/dist/index.html +0 -28
  145. package/dist/index.umd.js +0 -8
@@ -1,4270 +0,0 @@
1
- import { ref as P, computed as j, watch as Xe, defineComponent as Ae, resolveComponent as Pt, openBlock as y, createBlock as ie, unref as k, withCtx as Y, createElementBlock as $, Fragment as me, renderList as we, createElementVNode as s, toDisplayString as K, createCommentVNode as le, normalizeClass as ye, withDirectives as lt, vShow as es, createVNode as R, createTextVNode as Fe, onMounted as wt, onUnmounted as yt, vModelText as kt, Transition as Ve, withModifiers as it, normalizeStyle as Ye, reactive as bt, createStaticVNode as nt, withKeys as ts } from "vue";
2
- import { defineStore as Je } from "pinia";
3
- import { useRoute as qe, useRouter as ze, createRouter as xt, createWebHistory as Ct } from "vue-router";
4
- import { SubMenu as gt, MenuItem as He, Menu as Nt, Tabs as ss, TabPane as ns } from "@xto/navigation";
5
- import { Icon as ee, Button as je } from "@xto/base";
6
- import { Drawer as Et, Message as Ie } from "@xto/feedback";
7
- import { Form as os, FormItem as mt, Input as Ot, Checkbox as rs } from "@xto/form";
8
- import as from "axios";
9
- import { createLocaleProvider as ls, getSupportedLocales as is, useLocale as cs } from "@xto/core/locale";
10
- const ot = P(""), rt = P(""), at = P("");
11
- function us(n) {
12
- n.appId && (ot.value = n.appId), n.clientId && (rt.value = n.clientId), n.apiBaseUrl && (at.value = n.apiBaseUrl);
13
- }
14
- function ct() {
15
- if (ot.value)
16
- return ot.value;
17
- try {
18
- return "";
19
- } catch {
20
- return "";
21
- }
22
- }
23
- function Rt() {
24
- if (rt.value)
25
- return rt.value;
26
- try {
27
- return "";
28
- } catch {
29
- return "";
30
- }
31
- }
32
- function ds() {
33
- if (at.value)
34
- return at.value;
35
- try {
36
- return "";
37
- } catch {
38
- return "";
39
- }
40
- }
41
- const Ka = {
42
- appId: ot,
43
- clientId: rt,
44
- apiBaseUrl: at
45
- }, Ke = "xto_", zt = (n) => ({
46
- get(d) {
47
- const v = n.getItem(Ke + d);
48
- if (!v) return null;
49
- try {
50
- return JSON.parse(v);
51
- } catch {
52
- return v;
53
- }
54
- },
55
- set(d, v) {
56
- if (v == null) {
57
- n.removeItem(Ke + d);
58
- return;
59
- }
60
- const p = typeof v == "string" ? v : JSON.stringify(v);
61
- n.setItem(Ke + d, p);
62
- },
63
- remove(d) {
64
- n.removeItem(Ke + d);
65
- },
66
- clear() {
67
- Object.keys(n).forEach((v) => {
68
- v.startsWith(Ke) && n.removeItem(v);
69
- });
70
- }
71
- }), et = zt(window.localStorage), tt = zt(window.sessionStorage), q = {
72
- get: et.get,
73
- set: et.set,
74
- remove: et.remove,
75
- clear: et.clear
76
- }, Ha = {
77
- get: tt.get,
78
- set: tt.set,
79
- remove: tt.remove,
80
- clear: tt.clear
81
- }, De = Je("app", () => {
82
- const n = P(q.get("appName") || "XTO App"), d = P(q.get("indexPath") || "/dashboard"), v = P(q.get("isDark") || !1), p = P(q.get("theme") || "light"), h = P(q.get("layout") || "sidebar"), w = P(q.get("isCollapsed") || !1), N = P(q.get("showTabs") ?? !0), _ = P(q.get("showFooter") ?? !0), M = P(q.get("showBreadcrumb") ?? !0), g = P(q.get("primaryColor") || "#409eff"), x = P([]), L = P([]), C = j(() => v.value ? "dark" : "light"), H = (z) => {
83
- n.value = z, q.set("appName", z);
84
- }, Z = (z) => {
85
- d.value = z, q.set("indexPath", z);
86
- }, T = () => {
87
- v.value = !v.value, p.value = v.value ? "dark" : "light", V();
88
- }, O = (z) => {
89
- p.value = z, v.value = z === "dark", V();
90
- }, V = () => {
91
- const z = document.documentElement;
92
- v.value ? z.classList.add("dark") : z.classList.remove("dark"), q.set("isDark", v.value), q.set("theme", p.value);
93
- }, I = () => {
94
- w.value = !w.value, q.set("isCollapsed", w.value);
95
- }, Q = (z) => {
96
- h.value = z, q.set("layout", z);
97
- }, J = () => {
98
- N.value = !N.value, q.set("showTabs", N.value);
99
- }, X = () => {
100
- _.value = !_.value, q.set("showFooter", _.value);
101
- }, U = () => {
102
- M.value = !M.value, q.set("showBreadcrumb", M.value);
103
- }, A = (z) => {
104
- g.value = z, document.documentElement.style.setProperty("--color-primary", z), q.set("primaryColor", z);
105
- }, G = (z) => {
106
- x.value.includes(z) || x.value.push(z);
107
- }, te = (z) => {
108
- const ce = x.value.indexOf(z);
109
- ce > -1 && x.value.splice(ce, 1);
110
- }, S = () => {
111
- x.value = [];
112
- }, re = (z) => {
113
- L.value = z;
114
- }, se = () => {
115
- V(), g.value !== "#409eff" && document.documentElement.style.setProperty("--color-primary", g.value);
116
- };
117
- return Xe(v, V), {
118
- appName: n,
119
- indexPath: d,
120
- isDark: v,
121
- theme: p,
122
- layout: h,
123
- isCollapsed: w,
124
- showTabs: N,
125
- showFooter: _,
126
- showBreadcrumb: M,
127
- primaryColor: g,
128
- cachedViews: x,
129
- mixSubMenus: L,
130
- themeClass: C,
131
- setAppName: H,
132
- setIndexPath: Z,
133
- toggleTheme: T,
134
- toggleCollapse: I,
135
- setTheme: O,
136
- setLayout: Q,
137
- toggleTabs: J,
138
- toggleFooter: X,
139
- toggleBreadcrumb: U,
140
- setPrimaryColor: A,
141
- addCachedView: G,
142
- removeCachedView: te,
143
- clearCachedViews: S,
144
- setMixSubMenus: re,
145
- initTheme: se
146
- };
147
- }), ht = "menu_list", vt = "permission_list", fs = {
148
- menuCode: "home",
149
- menuName: "首页",
150
- menuUrl: "/dashboard",
151
- icon: "home",
152
- closable: !1,
153
- isDefault: !1,
154
- isOut: !1
155
- };
156
- function Dt(n) {
157
- return n.filter((d) => d.type !== 1).map((d) => ({
158
- ...d,
159
- children: d.children ? Dt(d.children) : void 0
160
- }));
161
- }
162
- function ps(n) {
163
- const d = [];
164
- function v(p) {
165
- p.forEach((h) => {
166
- h.type === 1 && h.menuCode && d.push(h.menuCode), h.children && v(h.children);
167
- });
168
- }
169
- return v(n), d;
170
- }
171
- const Pe = Je("menu", () => {
172
- const n = P(q.get(ht) || []), d = P(q.get(vt) || []), v = j(() => n.value.length > 0);
173
- return {
174
- menuList: n,
175
- permissions: d,
176
- hasMenu: v,
177
- setMenuList: (N) => {
178
- d.value = ps(N), q.set(vt, d.value);
179
- const _ = Dt(N);
180
- n.value = [fs, ..._], q.set(ht, n.value);
181
- },
182
- clearMenu: () => {
183
- n.value = [], d.value = [], q.remove(ht), q.remove(vt);
184
- },
185
- hasPermission: (N) => Array.isArray(N) ? N.some((_) => d.value.includes(_)) : d.value.includes(N)
186
- };
187
- }), _t = "user_info", $e = Je("user", () => {
188
- const n = P(q.get(_t)), d = j(() => !!n.value), v = j(() => {
189
- var L;
190
- return ((L = n.value) == null ? void 0 : L.userId) || "";
191
- }), p = j(() => {
192
- var L;
193
- return ((L = n.value) == null ? void 0 : L.userName) || "";
194
- }), h = j(() => {
195
- var L;
196
- return ((L = n.value) == null ? void 0 : L.departmentName) || "";
197
- }), w = j(() => {
198
- var L;
199
- return ((L = n.value) == null ? void 0 : L.email) || "";
200
- }), N = j(() => {
201
- var L;
202
- return ((L = n.value) == null ? void 0 : L.mobilePhone) || "";
203
- }), _ = j(() => {
204
- var L;
205
- return ((L = n.value) == null ? void 0 : L.positionName) || "";
206
- }), M = j(() => {
207
- var L;
208
- return ((L = n.value) == null ? void 0 : L.avatar) || "";
209
- });
210
- return {
211
- userInfo: n,
212
- isLoggedIn: d,
213
- userId: v,
214
- userName: p,
215
- departmentName: h,
216
- email: w,
217
- mobilePhone: N,
218
- positionName: _,
219
- avatar: M,
220
- setUserInfo: (L) => {
221
- n.value = L, q.set(_t, L);
222
- },
223
- clearUserInfo: () => {
224
- n.value = null, q.remove(_t);
225
- }
226
- };
227
- }), $t = "token", St = "token_type", Mt = "refresh_token", Lt = "expires_time", It = "refresh_time", At = "code", ut = () => q.get($t), ms = (n) => {
228
- q.set($t, n);
229
- }, hs = () => q.get(St), vs = (n) => {
230
- q.set(St, n);
231
- }, Wa = () => q.get(Mt), _s = (n) => {
232
- q.set(Mt, n);
233
- }, gs = () => q.get(Lt), ws = (n) => {
234
- q.set(Lt, n);
235
- }, Xa = () => q.get(It), ys = (n) => {
236
- q.set(It, n);
237
- }, Ya = () => q.get(At), ks = (n) => {
238
- q.set(At, n);
239
- }, Ft = (n) => {
240
- ms(n.access_token), vs(n.token_type || "Bearer"), _s(n.refresh_token), ws(n.expires_time), ys(n.refresh_time), n.code && ks(n.code);
241
- }, We = () => {
242
- q.remove($t), q.remove(St), q.remove(Mt), q.remove(Lt), q.remove(It), q.remove(At);
243
- }, bs = () => {
244
- const n = gs();
245
- return n ? Date.now() > n : !0;
246
- }, Vt = () => !!ut() && !bs(), Ze = Je("auth", () => {
247
- const n = P(ut()), d = j(() => Vt()), v = P(""), p = P(""), h = P(""), w = P("/login");
248
- return {
249
- token: n,
250
- isLoggedIn: d,
251
- baseUrl: v,
252
- appId: p,
253
- clientId: h,
254
- loginPath: w,
255
- login: (C) => {
256
- n.value = C.access_token, Ft(C);
257
- },
258
- logout: () => {
259
- n.value = null, We();
260
- },
261
- setBaseUrl: (C) => {
262
- v.value = C;
263
- },
264
- setAppId: (C) => {
265
- p.value = C;
266
- },
267
- setClientId: (C) => {
268
- h.value = C;
269
- },
270
- setLoginPath: (C) => {
271
- w.value = C;
272
- }
273
- };
274
- }), xs = { class: "menu-item__content" }, Cs = { class: "menu-item__icon" }, Ns = {
275
- key: 1,
276
- class: "menu-item__char"
277
- }, Es = { class: "menu-item__text" }, $s = { class: "menu-item__content" }, Ss = {
278
- key: 0,
279
- class: "menu-item__icon"
280
- }, Ms = {
281
- key: 1,
282
- class: "menu-item__char"
283
- }, Ls = { class: "menu-item__text" }, Is = /* @__PURE__ */ Ae({
284
- __name: "SidebarMenuItem",
285
- props: {
286
- menu: {}
287
- },
288
- setup(n) {
289
- const d = n, v = /* @__PURE__ */ new Set([
290
- "arrow-up",
291
- "arrow-down",
292
- "arrow-left",
293
- "arrow-right",
294
- "caret-down",
295
- "caret-right",
296
- "plus",
297
- "minus",
298
- "close",
299
- "check",
300
- "edit",
301
- "delete",
302
- "copy",
303
- "download",
304
- "upload",
305
- "refresh",
306
- "search",
307
- "filter",
308
- "more",
309
- "setting",
310
- "share",
311
- "loading",
312
- "info",
313
- "success",
314
- "warning",
315
- "error",
316
- "question",
317
- "user",
318
- "user-add",
319
- "user-group",
320
- "logout",
321
- "login",
322
- "file",
323
- "folder",
324
- "folder-open",
325
- "document",
326
- "image",
327
- "video",
328
- "music",
329
- "camera",
330
- "mail",
331
- "phone",
332
- "chat",
333
- "bell",
334
- "message",
335
- "eye",
336
- "eye-off",
337
- "calendar",
338
- "clock",
339
- "history",
340
- "timer",
341
- "location",
342
- "map",
343
- "globe",
344
- "star",
345
- "heart",
346
- "thumb-up",
347
- "link",
348
- "external-link",
349
- "lock",
350
- "unlock",
351
- "key",
352
- "home",
353
- "menu",
354
- "menu-fold",
355
- "menu-unfold",
356
- "sidebar-fold",
357
- "sidebar-expand",
358
- "sidebar-left",
359
- "dashboard",
360
- "chart",
361
- "chart-pie",
362
- "chart-line",
363
- "report",
364
- "analytics",
365
- "system",
366
- "permission",
367
- "role",
368
- "user-manage",
369
- "log",
370
- "notification",
371
- "app",
372
- "list",
373
- "grid",
374
- "fullscreen",
375
- "fullscreen-exit",
376
- "zoom-in",
377
- "zoom-out",
378
- "print",
379
- "bookmark",
380
- "tag",
381
- "code",
382
- "terminal",
383
- "database",
384
- "server",
385
- "cloud",
386
- "gift",
387
- "moon",
388
- "sun",
389
- "theme",
390
- "skin"
391
- ]), p = (_) => {
392
- if (!_ || _ === "") return "";
393
- if (_.startsWith("tineco-icon-")) {
394
- const g = _.replace("tineco-icon-", "");
395
- return {
396
- home: "home",
397
- dashboard: "dashboard",
398
- system: "system",
399
- user: "user",
400
- role: "role",
401
- menu: "list",
402
- setting: "setting",
403
- file: "file",
404
- folder: "folder",
405
- chart: "chart",
406
- report: "report",
407
- analytics: "analytics"
408
- }[g] || g;
409
- }
410
- return {
411
- dashboard: "dashboard",
412
- system: "system",
413
- user: "user",
414
- role: "role",
415
- menu: "list",
416
- setting: "setting",
417
- home: "home",
418
- chart: "chart",
419
- report: "report",
420
- analytics: "analytics",
421
- permission: "permission",
422
- log: "log",
423
- notification: "notification",
424
- app: "app",
425
- list: "list",
426
- grid: "grid"
427
- }[_] || _;
428
- }, h = (_) => _ ? _.charAt(0) : "", w = (_) => v.has(_), N = j(() => d.menu.children && d.menu.children.length > 0);
429
- return (_, M) => {
430
- const g = Pt("SidebarMenuItem", !0);
431
- return N.value ? (y(), ie(k(gt), {
432
- key: 0,
433
- index: n.menu.menuUrl
434
- }, {
435
- title: Y(() => [
436
- s("span", xs, [
437
- s("span", Cs, [
438
- w(p(n.menu.icon)) ? (y(), ie(k(ee), {
439
- key: 0,
440
- name: p(n.menu.icon),
441
- size: 16
442
- }, null, 8, ["name"])) : (y(), $("span", Ns, K(h(n.menu.menuName)), 1))
443
- ]),
444
- s("span", Es, K(n.menu.menuName), 1)
445
- ])
446
- ]),
447
- default: Y(() => [
448
- (y(!0), $(me, null, we(n.menu.children, (x) => (y(), ie(g, {
449
- key: x.menuUrl,
450
- menu: x
451
- }, null, 8, ["menu"]))), 128))
452
- ]),
453
- _: 1
454
- }, 8, ["index"])) : (y(), ie(k(He), {
455
- key: 1,
456
- index: n.menu.menuUrl
457
- }, {
458
- default: Y(() => [
459
- s("span", $s, [
460
- n.menu.menuName !== "首页" ? (y(), $("span", Ss, [
461
- w(p(n.menu.icon)) ? (y(), ie(k(ee), {
462
- key: 0,
463
- name: p(n.menu.icon),
464
- size: 16
465
- }, null, 8, ["name"])) : (y(), $("span", Ms, K(h(n.menu.menuName)), 1))
466
- ])) : le("", !0),
467
- s("span", Ls, K(n.menu.menuName), 1)
468
- ])
469
- ]),
470
- _: 1
471
- }, 8, ["index"]));
472
- };
473
- }
474
- }), Se = (n, d) => {
475
- const v = n.__vccOpts || n;
476
- for (const [p, h] of d)
477
- v[p] = h;
478
- return v;
479
- }, As = /* @__PURE__ */ Se(Is, [["__scopeId", "data-v-27c9479b"]]), Ts = {
480
- key: 0,
481
- class: "sidebar__logo"
482
- }, Os = ["src"], Us = {
483
- key: 1,
484
- class: "sidebar__user"
485
- }, Bs = { class: "sidebar__user-info" }, Ps = { class: "sidebar__user-name" }, Rs = { class: "sidebar__user-role" }, Ut = "sidebar_opened_menus", zs = /* @__PURE__ */ Ae({
486
- __name: "Sidebar",
487
- props: {
488
- menuList: { default: () => [] },
489
- showLogo: { type: Boolean, default: !0 },
490
- showUser: { type: Boolean, default: !0 }
491
- },
492
- setup(n) {
493
- const d = "/", v = n, p = qe(), h = ze(), w = Pe(), N = $e(), _ = Ze(), M = De(), g = j(() => v.menuList.length > 0 ? v.menuList : w.menuList), x = j(() => M.isCollapsed), L = j(() => p.path), C = P(q.get(Ut) || []);
494
- Xe(C, (Q) => {
495
- q.set(Ut, Q);
496
- }, { deep: !0 });
497
- const H = (Q, J, X = []) => {
498
- var U;
499
- for (const A of Q) {
500
- if (J === A.menuUrl || J.startsWith(A.menuUrl + "/"))
501
- return [...X, A.menuUrl];
502
- if ((U = A.children) != null && U.length) {
503
- const G = H(A.children, J, [...X, A.menuUrl]);
504
- if (G) return G;
505
- }
506
- }
507
- return null;
508
- };
509
- Xe([() => p.path, g], ([Q, J]) => {
510
- if (J.length > 0) {
511
- const X = H(J, Q);
512
- if (X) {
513
- const U = X.slice(0, -1), A = /* @__PURE__ */ new Set([...C.value, ...U]);
514
- C.value = Array.from(A);
515
- }
516
- }
517
- }, { immediate: !0 });
518
- const Z = j(() => M.isDark ? "#1d1e1f" : "#fff"), T = j(() => M.isDark ? "#cfd3dc" : "#303133"), O = j(() => "#409eff"), V = (Q) => {
519
- Q && Q !== p.path && h.push(Q);
520
- }, I = () => {
521
- _.logout(), N.clearUserInfo(), w.clearMenu(), h.push("/login");
522
- };
523
- return (Q, J) => (y(), $("div", {
524
- class: ye(["sidebar", { "sidebar--collapsed": x.value }])
525
- }, [
526
- v.showLogo ? (y(), $("div", Ts, [
527
- s("img", {
528
- src: `${k(d)}vite.svg`,
529
- alt: "Logo",
530
- class: "sidebar__logo-img"
531
- }, null, 8, Os),
532
- lt(s("span", { class: "sidebar__logo-text" }, K(k(M).appName), 513), [
533
- [es, !x.value]
534
- ])
535
- ])) : le("", !0),
536
- R(k(Nt), {
537
- modelValue: L.value,
538
- "onUpdate:modelValue": J[0] || (J[0] = (X) => L.value = X),
539
- openeds: C.value,
540
- "onUpdate:openeds": J[1] || (J[1] = (X) => C.value = X),
541
- mode: "vertical",
542
- collapse: x.value,
543
- "collapse-transition": !1,
544
- "background-color": Z.value,
545
- "text-color": T.value,
546
- "active-text-color": O.value,
547
- class: "sidebar__menu",
548
- onSelect: V
549
- }, {
550
- default: Y(() => [
551
- (y(!0), $(me, null, we(g.value, (X) => (y(), ie(As, {
552
- key: X.menuUrl,
553
- menu: X
554
- }, null, 8, ["menu"]))), 128))
555
- ]),
556
- _: 1
557
- }, 8, ["modelValue", "openeds", "collapse", "background-color", "text-color", "active-text-color"]),
558
- v.showUser && !x.value ? (y(), $("div", Us, [
559
- s("div", Bs, [
560
- s("span", Ps, K(k(N).userName), 1),
561
- s("span", Rs, K(k(N).departmentName), 1)
562
- ]),
563
- R(k(je), {
564
- type: "text",
565
- size: "small",
566
- onClick: I
567
- }, {
568
- default: Y(() => [...J[2] || (J[2] = [
569
- Fe("退出", -1)
570
- ])]),
571
- _: 1
572
- })
573
- ])) : le("", !0)
574
- ], 2));
575
- }
576
- }), Bt = /* @__PURE__ */ Se(zs, [["__scopeId", "data-v-26e612d1"]]), Ds = { class: "header" }, Fs = { class: "header__left" }, Vs = {
577
- key: 0,
578
- class: "header__breadcrumb"
579
- }, js = {
580
- key: 0,
581
- class: "breadcrumb-separator"
582
- }, qs = { class: "header__right" }, Gs = {
583
- key: 0,
584
- class: "header__search-dropdown"
585
- }, Ks = {
586
- key: 0,
587
- class: "header__search-results"
588
- }, Hs = ["onClick"], Ws = {
589
- key: 0,
590
- class: "header__search-icon"
591
- }, Xs = {
592
- key: 1,
593
- class: "header__search-char"
594
- }, Ys = { class: "header__search-item-title" }, Js = {
595
- key: 1,
596
- class: "header__search-item-parent"
597
- }, Zs = {
598
- key: 1,
599
- class: "header__search-empty"
600
- }, Qs = ["title"], en = { class: "header__avatar" }, tn = { class: "header__user-name" }, sn = {
601
- key: 0,
602
- class: "header__dropdown"
603
- }, nn = { class: "header__dropdown-header" }, on = { class: "header__dropdown-avatar" }, rn = { class: "header__dropdown-info" }, an = { class: "header__dropdown-name" }, ln = { class: "header__dropdown-role" }, cn = { class: "header__dropdown-menu" }, un = { class: "settings-drawer" }, dn = { class: "settings-section" }, fn = { class: "settings-layout-options" }, pn = ["onClick"], mn = { class: "layout-option__preview" }, hn = {
604
- key: 0,
605
- class: "layout-preview-sidebar"
606
- }, vn = {
607
- key: 1,
608
- class: "layout-preview-top"
609
- }, _n = {
610
- key: 2,
611
- class: "layout-preview-mix"
612
- }, gn = { class: "layout-option__label" }, wn = { class: "settings-section" }, yn = { class: "settings-color-options" }, kn = ["title", "onClick"], bn = { class: "settings-section" }, xn = { class: "settings-switch-list" }, Cn = { class: "settings-switch-item" }, Nn = { class: "settings-switch-item" }, En = /* @__PURE__ */ Ae({
613
- __name: "Header",
614
- setup(n) {
615
- const d = qe(), v = ze(), p = De(), h = $e(), w = Ze(), N = Pe(), _ = P(!1), M = P(!1), g = P(null), x = P(!1), L = P(!1), C = P(""), H = P(null), Z = P(!1), T = [
616
- { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
617
- { value: "top", label: "顶部菜单", icon: "menu" },
618
- { value: "mix", label: "混合菜单", icon: "grid" }
619
- ], O = [
620
- { value: "#409eff", label: "默认蓝" },
621
- { value: "#1890ff", label: "科技蓝" },
622
- { value: "#52c41a", label: "极光绿" },
623
- { value: "#faad14", label: "日落橙" },
624
- { value: "#f5222d", label: "薄暮红" },
625
- { value: "#722ed1", label: "酱紫" }
626
- ], V = j(() => d.matched.filter((B) => B.meta && B.meta.title).map((B) => ({
627
- title: B.meta.title,
628
- path: B.path
629
- }))), I = (W, B = "") => {
630
- const e = [];
631
- return W.forEach((t) => {
632
- t.children && t.children.length > 0 ? e.push(...I(t.children, t.menuName)) : e.push({ ...t, parentTitle: B, title: t.menuName, path: t.menuUrl });
633
- }), e;
634
- }, Q = /* @__PURE__ */ new Set([
635
- "arrow-up",
636
- "arrow-down",
637
- "arrow-left",
638
- "arrow-right",
639
- "caret-down",
640
- "caret-right",
641
- "plus",
642
- "minus",
643
- "close",
644
- "check",
645
- "edit",
646
- "delete",
647
- "copy",
648
- "download",
649
- "upload",
650
- "refresh",
651
- "search",
652
- "filter",
653
- "more",
654
- "setting",
655
- "share",
656
- "loading",
657
- "info",
658
- "success",
659
- "warning",
660
- "error",
661
- "question",
662
- "user",
663
- "user-add",
664
- "user-group",
665
- "logout",
666
- "login",
667
- "file",
668
- "folder",
669
- "folder-open",
670
- "document",
671
- "image",
672
- "video",
673
- "music",
674
- "camera",
675
- "mail",
676
- "phone",
677
- "chat",
678
- "bell",
679
- "message",
680
- "eye",
681
- "eye-off",
682
- "calendar",
683
- "clock",
684
- "history",
685
- "timer",
686
- "location",
687
- "map",
688
- "globe",
689
- "star",
690
- "heart",
691
- "thumb-up",
692
- "link",
693
- "external-link",
694
- "lock",
695
- "unlock",
696
- "key",
697
- "home",
698
- "menu",
699
- "menu-fold",
700
- "menu-unfold",
701
- "sidebar-fold",
702
- "sidebar-expand",
703
- "sidebar-left",
704
- "dashboard",
705
- "chart",
706
- "chart-pie",
707
- "chart-line",
708
- "report",
709
- "analytics",
710
- "system",
711
- "permission",
712
- "role",
713
- "user-manage",
714
- "log",
715
- "notification",
716
- "app",
717
- "list",
718
- "grid",
719
- "fullscreen",
720
- "fullscreen-exit",
721
- "zoom-in",
722
- "zoom-out",
723
- "print",
724
- "bookmark",
725
- "tag",
726
- "code",
727
- "terminal",
728
- "database",
729
- "server",
730
- "cloud",
731
- "gift",
732
- "moon",
733
- "sun",
734
- "theme",
735
- "skin"
736
- ]), J = (W) => {
737
- if (!W || W === "") return "";
738
- if (W.startsWith("tineco-icon-")) {
739
- const e = W.replace("tineco-icon-", "");
740
- return {
741
- home: "home",
742
- dashboard: "dashboard",
743
- system: "system",
744
- user: "user",
745
- role: "role",
746
- menu: "list",
747
- setting: "setting",
748
- file: "file",
749
- folder: "folder",
750
- chart: "chart",
751
- report: "report",
752
- analytics: "analytics"
753
- }[e] || e;
754
- }
755
- return {
756
- dashboard: "dashboard",
757
- system: "system",
758
- user: "user",
759
- role: "role",
760
- menu: "list",
761
- setting: "setting",
762
- home: "home",
763
- chart: "chart",
764
- report: "report",
765
- analytics: "analytics",
766
- permission: "permission",
767
- log: "log",
768
- notification: "notification",
769
- app: "app",
770
- list: "list",
771
- grid: "grid"
772
- }[W] || W;
773
- }, X = (W) => W ? W.charAt(0) : "", U = (W) => Q.has(W), A = j(() => C.value.trim() ? I(N.menuList).filter(
774
- (B) => B.title.toLowerCase().includes(C.value.toLowerCase())
775
- ) : []), G = j(() => p.layout), te = () => {
776
- p.toggleCollapse();
777
- }, S = () => {
778
- p.toggleTheme();
779
- }, re = () => {
780
- M.value = !0;
781
- }, se = (W) => {
782
- p.setLayout(W), M.value = !1;
783
- }, z = (W) => {
784
- Z.value = W;
785
- const B = document.documentElement;
786
- W ? B.classList.add("grey-mode") : B.classList.remove("grey-mode");
787
- }, ce = () => {
788
- z(!Z.value), M.value = !1;
789
- }, ue = () => {
790
- p.toggleTheme(), M.value = !1;
791
- }, ke = () => {
792
- document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
793
- }, ve = () => {
794
- x.value = !!document.fullscreenElement;
795
- }, _e = () => {
796
- _.value = !_.value;
797
- }, ge = () => {
798
- _.value = !1;
799
- }, be = () => {
800
- L.value = !1, C.value = "";
801
- }, Te = (W) => {
802
- v.push(W), be();
803
- }, Ne = (W) => {
804
- p.setPrimaryColor(W), M.value = !1;
805
- }, Oe = () => {
806
- ge(), v.push("/profile");
807
- }, E = () => {
808
- ge(), v.push("/change-password");
809
- }, Ue = () => {
810
- ge(), w.logout(), h.clearUserInfo(), N.clearMenu(), v.push("/login");
811
- }, Be = (W) => {
812
- g.value && !g.value.contains(W.target) && ge(), H.value && !H.value.contains(W.target) && be();
813
- }, Me = (W) => {
814
- W.key === "Escape" && (be(), ge());
815
- };
816
- return wt(() => {
817
- document.addEventListener("click", Be), document.addEventListener("fullscreenchange", ve), document.addEventListener("keydown", Me), p.initTheme(), Z.value = document.documentElement.classList.contains("grey-mode");
818
- }), yt(() => {
819
- document.removeEventListener("click", Be), document.removeEventListener("fullscreenchange", ve), document.removeEventListener("keydown", Me);
820
- }), (W, B) => {
821
- var e;
822
- return y(), $("div", Ds, [
823
- s("div", Fs, [
824
- s("div", {
825
- class: "header__collapse",
826
- onClick: te
827
- }, [
828
- R(k(ee), {
829
- name: k(p).isCollapsed ? "menu-unfold" : "menu-fold",
830
- size: 18
831
- }, null, 8, ["name"])
832
- ]),
833
- k(p).showBreadcrumb ? (y(), $("div", Vs, [
834
- (y(!0), $(me, null, we(V.value, (t, r) => (y(), $("span", {
835
- key: t.path
836
- }, [
837
- r > 0 ? (y(), $("span", js, "/")) : le("", !0),
838
- s("span", {
839
- class: ye({ "is-current": r === V.value.length - 1 })
840
- }, K(t.title), 3)
841
- ]))), 128))
842
- ])) : le("", !0)
843
- ]),
844
- s("div", qs, [
845
- s("div", {
846
- class: "header__search",
847
- ref_key: "searchRef",
848
- ref: H
849
- }, [
850
- R(k(ee), {
851
- name: "search",
852
- size: 14,
853
- class: "header__search-icon"
854
- }),
855
- lt(s("input", {
856
- "onUpdate:modelValue": B[0] || (B[0] = (t) => C.value = t),
857
- type: "text",
858
- class: "header__search-input",
859
- placeholder: "搜索菜单...",
860
- onFocus: B[1] || (B[1] = (t) => L.value = !0)
861
- }, null, 544), [
862
- [kt, C.value]
863
- ]),
864
- R(Ve, { name: "search-dropdown" }, {
865
- default: Y(() => [
866
- L.value && (A.value.length > 0 || C.value) ? (y(), $("div", Gs, [
867
- A.value.length > 0 ? (y(), $("div", Ks, [
868
- (y(!0), $(me, null, we(A.value, (t) => (y(), $("div", {
869
- key: t.path,
870
- class: "header__search-item",
871
- onClick: (r) => Te(t.path)
872
- }, [
873
- t.title !== "首页" ? (y(), $("span", Ws, [
874
- U(J(t.icon)) ? (y(), ie(k(ee), {
875
- key: 0,
876
- name: J(t.icon),
877
- size: 16
878
- }, null, 8, ["name"])) : (y(), $("span", Xs, K(X(t.title)), 1))
879
- ])) : le("", !0),
880
- s("span", Ys, K(t.title), 1),
881
- t.parentTitle ? (y(), $("span", Js, K(t.parentTitle), 1)) : le("", !0)
882
- ], 8, Hs))), 128))
883
- ])) : (y(), $("div", Zs, " 未找到匹配的菜单 "))
884
- ])) : le("", !0)
885
- ]),
886
- _: 1
887
- })
888
- ], 512),
889
- s("div", {
890
- class: "header__action",
891
- onClick: ke,
892
- title: x.value ? "退出全屏" : "全屏"
893
- }, [
894
- R(k(ee), {
895
- name: x.value ? "fullscreen-exit" : "fullscreen",
896
- size: 16
897
- }, null, 8, ["name"])
898
- ], 8, Qs),
899
- s("div", {
900
- class: "header__action",
901
- onClick: re,
902
- title: "换肤设置"
903
- }, [
904
- R(k(ee), {
905
- name: "skin",
906
- size: 16
907
- })
908
- ]),
909
- s("div", {
910
- class: "header__action",
911
- onClick: S,
912
- title: "切换主题"
913
- }, [
914
- R(k(ee), {
915
- name: k(p).isDark ? "sun" : "moon",
916
- size: 16
917
- }, null, 8, ["name"])
918
- ]),
919
- s("div", {
920
- class: "header__user",
921
- ref_key: "dropdownRef",
922
- ref: g
923
- }, [
924
- s("div", {
925
- class: "header__user-trigger",
926
- onClick: it(_e, ["stop"])
927
- }, [
928
- s("div", en, [
929
- s("span", null, K(((e = k(h).userName) == null ? void 0 : e.charAt(0)) || "U"), 1)
930
- ]),
931
- s("span", tn, K(k(h).userName), 1),
932
- s("span", {
933
- class: ye(["header__user-arrow", { "is-active": _.value }])
934
- }, "▼", 2)
935
- ]),
936
- R(Ve, { name: "dropdown" }, {
937
- default: Y(() => {
938
- var t;
939
- return [
940
- _.value ? (y(), $("div", sn, [
941
- s("div", nn, [
942
- s("div", on, [
943
- s("span", null, K(((t = k(h).userName) == null ? void 0 : t.charAt(0)) || "U"), 1)
944
- ]),
945
- s("div", rn, [
946
- s("div", an, K(k(h).userName), 1),
947
- s("div", ln, K(k(h).departmentName), 1)
948
- ])
949
- ]),
950
- B[7] || (B[7] = s("div", { class: "header__dropdown-divider" }, null, -1)),
951
- s("div", cn, [
952
- s("div", {
953
- class: "header__dropdown-item",
954
- onClick: Oe
955
- }, [
956
- R(k(ee), {
957
- name: "user",
958
- size: 16
959
- }),
960
- B[3] || (B[3] = s("span", null, "个人信息", -1))
961
- ]),
962
- s("div", {
963
- class: "header__dropdown-item",
964
- onClick: E
965
- }, [
966
- R(k(ee), {
967
- name: "lock",
968
- size: 16
969
- }),
970
- B[4] || (B[4] = s("span", null, "修改密码", -1))
971
- ]),
972
- B[6] || (B[6] = s("div", { class: "header__dropdown-divider" }, null, -1)),
973
- s("div", {
974
- class: "header__dropdown-item header__dropdown-item--danger",
975
- onClick: Ue
976
- }, [
977
- R(k(ee), {
978
- name: "logout",
979
- size: 16
980
- }),
981
- B[5] || (B[5] = s("span", null, "退出登录", -1))
982
- ])
983
- ])
984
- ])) : le("", !0)
985
- ];
986
- }),
987
- _: 1
988
- })
989
- ], 512)
990
- ]),
991
- R(k(Et), {
992
- modelValue: M.value,
993
- "onUpdate:modelValue": B[2] || (B[2] = (t) => M.value = t),
994
- title: "换肤设置",
995
- direction: "rtl",
996
- size: "320px"
997
- }, {
998
- default: Y(() => [
999
- s("div", un, [
1000
- s("div", dn, [
1001
- B[11] || (B[11] = s("div", { class: "settings-title" }, "布局模式", -1)),
1002
- s("div", fn, [
1003
- (y(), $(me, null, we(T, (t) => s("div", {
1004
- key: t.value,
1005
- class: ye(["layout-option", { "is-active": G.value === t.value }]),
1006
- onClick: (r) => se(t.value)
1007
- }, [
1008
- s("div", mn, [
1009
- t.value === "sidebar" ? (y(), $("div", hn, [...B[8] || (B[8] = [
1010
- s("div", { class: "preview-aside" }, null, -1),
1011
- s("div", { class: "preview-main" }, [
1012
- s("div", { class: "preview-header" }),
1013
- s("div", { class: "preview-content" })
1014
- ], -1)
1015
- ])])) : t.value === "top" ? (y(), $("div", vn, [...B[9] || (B[9] = [
1016
- s("div", { class: "preview-header-full" }, null, -1),
1017
- s("div", { class: "preview-content-full" }, null, -1)
1018
- ])])) : (y(), $("div", _n, [...B[10] || (B[10] = [
1019
- s("div", { class: "preview-header-mix" }, [
1020
- s("div", { class: "preview-mix-left" })
1021
- ], -1),
1022
- s("div", { class: "preview-mix-body" }, [
1023
- s("div", { class: "preview-mix-aside" }),
1024
- s("div", { class: "preview-mix-content" })
1025
- ], -1)
1026
- ])]))
1027
- ]),
1028
- s("span", gn, K(t.label), 1)
1029
- ], 10, pn)), 64))
1030
- ])
1031
- ]),
1032
- s("div", wn, [
1033
- B[12] || (B[12] = s("div", { class: "settings-title" }, "主题色", -1)),
1034
- s("div", yn, [
1035
- (y(), $(me, null, we(O, (t) => s("div", {
1036
- key: t.value,
1037
- class: ye(["color-option", { "is-active": k(p).primaryColor === t.value }]),
1038
- style: Ye({ backgroundColor: t.value }),
1039
- title: t.label,
1040
- onClick: (r) => Ne(t.value)
1041
- }, [
1042
- k(p).primaryColor === t.value ? (y(), ie(k(ee), {
1043
- key: 0,
1044
- name: "check",
1045
- size: 12,
1046
- color: "#fff"
1047
- })) : le("", !0)
1048
- ], 14, kn)), 64))
1049
- ])
1050
- ]),
1051
- s("div", bn, [
1052
- B[17] || (B[17] = s("div", { class: "settings-title" }, "功能设置", -1)),
1053
- s("div", xn, [
1054
- s("div", Cn, [
1055
- B[14] || (B[14] = s("span", null, "灰色模式", -1)),
1056
- s("div", {
1057
- class: ye(["switch-wrapper", { "is-checked": Z.value }]),
1058
- onClick: ce
1059
- }, [...B[13] || (B[13] = [
1060
- s("span", { class: "switch-core" }, null, -1)
1061
- ])], 2)
1062
- ]),
1063
- s("div", Nn, [
1064
- B[16] || (B[16] = s("span", null, "暗黑模式", -1)),
1065
- s("div", {
1066
- class: ye(["switch-wrapper", { "is-checked": k(p).isDark }]),
1067
- onClick: ue
1068
- }, [...B[15] || (B[15] = [
1069
- s("span", { class: "switch-core" }, null, -1)
1070
- ])], 2)
1071
- ])
1072
- ])
1073
- ])
1074
- ])
1075
- ]),
1076
- _: 1
1077
- }, 8, ["modelValue"])
1078
- ]);
1079
- };
1080
- }
1081
- }), $n = /* @__PURE__ */ Se(En, [["__scopeId", "data-v-89179947"]]), Sn = { class: "top-menu" }, Mn = { class: "top-menu__logo" }, Ln = ["src"], In = { class: "top-menu__logo-text" }, An = { class: "top-menu__menu-content" }, Tn = {
1082
- key: 0,
1083
- class: "top-menu__menu-icon"
1084
- }, On = {
1085
- key: 1,
1086
- class: "top-menu__menu-char"
1087
- }, Un = { class: "top-menu__menu-text" }, Bn = { class: "top-menu__menu-content" }, Pn = { class: "top-menu__menu-icon" }, Rn = {
1088
- key: 1,
1089
- class: "top-menu__menu-char"
1090
- }, zn = { class: "top-menu__menu-text" }, Dn = { class: "top-menu__menu-content" }, Fn = { class: "top-menu__menu-icon" }, Vn = {
1091
- key: 1,
1092
- class: "top-menu__menu-char"
1093
- }, jn = { class: "top-menu__menu-text" }, qn = { class: "top-menu__menu-content" }, Gn = { class: "top-menu__menu-icon" }, Kn = {
1094
- key: 1,
1095
- class: "top-menu__menu-char"
1096
- }, Hn = { class: "top-menu__menu-text" }, Wn = { class: "top-menu__menu-content" }, Xn = {
1097
- key: 0,
1098
- class: "top-menu__menu-icon"
1099
- }, Yn = {
1100
- key: 1,
1101
- class: "top-menu__menu-char"
1102
- }, Jn = { class: "top-menu__menu-text" }, Zn = { class: "top-menu__actions" }, Qn = {
1103
- key: 0,
1104
- class: "top-menu__search-dropdown"
1105
- }, eo = {
1106
- key: 0,
1107
- class: "top-menu__search-results"
1108
- }, to = ["onClick"], so = {
1109
- key: 0,
1110
- class: "top-menu__search-icon-item"
1111
- }, no = {
1112
- key: 1,
1113
- class: "top-menu__search-char"
1114
- }, oo = { class: "top-menu__search-item-title" }, ro = {
1115
- key: 1,
1116
- class: "top-menu__search-item-parent"
1117
- }, ao = {
1118
- key: 1,
1119
- class: "top-menu__search-empty"
1120
- }, lo = ["title"], io = { class: "top-menu__avatar" }, co = { class: "top-menu__user-name" }, uo = {
1121
- key: 0,
1122
- class: "top-menu__dropdown"
1123
- }, fo = { class: "top-menu__dropdown-header" }, po = { class: "top-menu__dropdown-avatar" }, mo = { class: "top-menu__dropdown-info" }, ho = { class: "top-menu__dropdown-name" }, vo = { class: "top-menu__dropdown-role" }, _o = { class: "top-menu__dropdown-menu" }, go = { class: "settings-drawer" }, wo = { class: "settings-section" }, yo = { class: "settings-layout-options" }, ko = ["onClick"], bo = { class: "layout-option__preview" }, xo = {
1124
- key: 0,
1125
- class: "layout-preview-sidebar"
1126
- }, Co = {
1127
- key: 1,
1128
- class: "layout-preview-top"
1129
- }, No = {
1130
- key: 2,
1131
- class: "layout-preview-mix"
1132
- }, Eo = { class: "layout-option__label" }, $o = { class: "settings-section" }, So = { class: "settings-color-options" }, Mo = ["title", "onClick"], Lo = { class: "settings-section" }, Io = { class: "settings-switch-list" }, Ao = { class: "settings-switch-item" }, To = { class: "settings-switch-item" }, Oo = /* @__PURE__ */ Ae({
1133
- __name: "TopMenu",
1134
- setup(n) {
1135
- const d = "/", v = qe(), p = ze(), h = Pe(), w = De(), N = $e(), _ = Ze(), M = j(() => v.path), g = (r, c = "") => {
1136
- const u = [];
1137
- return r.forEach((o) => {
1138
- o.children && o.children.length > 0 ? u.push(...g(o.children, o.menuName)) : u.push({ ...o, parentTitle: c, title: o.menuName, path: o.menuUrl });
1139
- }), u;
1140
- }, x = j(() => J.value.trim() ? g(h.menuList).filter(
1141
- (c) => c.title.toLowerCase().includes(J.value.toLowerCase())
1142
- ) : []), L = j(() => w.isDark ? "#1d1e1f" : "#fff"), C = j(() => w.isDark ? "#cfd3dc" : "#303133"), H = j(() => "#409eff"), Z = P(!1), T = P(null), O = P(!1), V = P(!1), I = P(!1), Q = P(!1), J = P(""), X = P(null), U = (r) => {
1143
- r && r !== v.path && p.push(r);
1144
- }, A = /* @__PURE__ */ new Set([
1145
- "arrow-up",
1146
- "arrow-down",
1147
- "arrow-left",
1148
- "arrow-right",
1149
- "caret-down",
1150
- "caret-right",
1151
- "plus",
1152
- "minus",
1153
- "close",
1154
- "check",
1155
- "edit",
1156
- "delete",
1157
- "copy",
1158
- "download",
1159
- "upload",
1160
- "refresh",
1161
- "search",
1162
- "filter",
1163
- "more",
1164
- "setting",
1165
- "share",
1166
- "loading",
1167
- "info",
1168
- "success",
1169
- "warning",
1170
- "error",
1171
- "question",
1172
- "user",
1173
- "user-add",
1174
- "user-group",
1175
- "logout",
1176
- "login",
1177
- "file",
1178
- "folder",
1179
- "folder-open",
1180
- "document",
1181
- "image",
1182
- "video",
1183
- "music",
1184
- "camera",
1185
- "mail",
1186
- "phone",
1187
- "chat",
1188
- "bell",
1189
- "message",
1190
- "eye",
1191
- "eye-off",
1192
- "calendar",
1193
- "clock",
1194
- "history",
1195
- "timer",
1196
- "location",
1197
- "map",
1198
- "globe",
1199
- "star",
1200
- "heart",
1201
- "thumb-up",
1202
- "link",
1203
- "external-link",
1204
- "lock",
1205
- "unlock",
1206
- "key",
1207
- "home",
1208
- "menu",
1209
- "menu-fold",
1210
- "menu-unfold",
1211
- "sidebar-fold",
1212
- "sidebar-expand",
1213
- "sidebar-left",
1214
- "dashboard",
1215
- "chart",
1216
- "chart-pie",
1217
- "chart-line",
1218
- "report",
1219
- "analytics",
1220
- "system",
1221
- "permission",
1222
- "role",
1223
- "user-manage",
1224
- "log",
1225
- "notification",
1226
- "app",
1227
- "list",
1228
- "grid",
1229
- "fullscreen",
1230
- "fullscreen-exit",
1231
- "zoom-in",
1232
- "zoom-out",
1233
- "print",
1234
- "bookmark",
1235
- "tag",
1236
- "code",
1237
- "terminal",
1238
- "database",
1239
- "server",
1240
- "cloud",
1241
- "gift",
1242
- "moon",
1243
- "sun",
1244
- "theme",
1245
- "skin"
1246
- ]), G = (r) => {
1247
- if (!r || r === "") return "";
1248
- if (r.startsWith("tineco-icon-")) {
1249
- const u = r.replace("tineco-icon-", "");
1250
- return {
1251
- home: "home",
1252
- dashboard: "dashboard",
1253
- system: "system",
1254
- user: "user",
1255
- role: "role",
1256
- menu: "list",
1257
- setting: "setting",
1258
- file: "file",
1259
- folder: "folder",
1260
- chart: "chart",
1261
- report: "report",
1262
- analytics: "analytics"
1263
- }[u] || u;
1264
- }
1265
- return {
1266
- dashboard: "dashboard",
1267
- system: "system",
1268
- user: "user",
1269
- role: "role",
1270
- menu: "list",
1271
- setting: "setting",
1272
- home: "home",
1273
- chart: "chart",
1274
- report: "report",
1275
- analytics: "analytics",
1276
- permission: "permission",
1277
- log: "log",
1278
- notification: "notification",
1279
- app: "app",
1280
- list: "list",
1281
- grid: "grid"
1282
- }[r] || r;
1283
- }, te = (r) => r ? r.charAt(0) : "", S = (r) => A.has(r), re = () => {
1284
- w.toggleTheme(), V.value = !1;
1285
- }, se = () => {
1286
- document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1287
- }, z = () => {
1288
- O.value = !!document.fullscreenElement;
1289
- }, ce = () => {
1290
- Z.value = !Z.value;
1291
- }, ue = () => {
1292
- Z.value = !1;
1293
- }, ke = () => {
1294
- Q.value = !1, J.value = "";
1295
- }, ve = (r) => {
1296
- p.push(r), ke();
1297
- }, _e = () => {
1298
- V.value = !0;
1299
- }, ge = (r) => {
1300
- I.value = r;
1301
- const c = document.documentElement;
1302
- r ? c.classList.add("grey-mode") : c.classList.remove("grey-mode");
1303
- }, be = () => {
1304
- ge(!I.value), V.value = !1;
1305
- }, Te = () => {
1306
- w.toggleTheme(), V.value = !1;
1307
- }, Ne = [
1308
- { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1309
- { value: "top", label: "顶部菜单", icon: "menu" },
1310
- { value: "mix", label: "混合菜单", icon: "grid" }
1311
- ], Oe = j(() => w.layout), E = (r) => {
1312
- w.setLayout(r), V.value = !1;
1313
- }, Ue = [
1314
- { value: "#409eff", label: "默认蓝" },
1315
- { value: "#1890ff", label: "科技蓝" },
1316
- { value: "#52c41a", label: "极光绿" },
1317
- { value: "#faad14", label: "日落橙" },
1318
- { value: "#f5222d", label: "薄暮红" },
1319
- { value: "#722ed1", label: "酱紫" }
1320
- ], Be = (r) => {
1321
- w.setPrimaryColor(r), V.value = !1;
1322
- }, Me = () => {
1323
- ue(), p.push("/profile");
1324
- }, W = () => {
1325
- ue(), p.push("/change-password");
1326
- }, B = () => {
1327
- ue(), _.logout(), N.clearUserInfo(), h.clearMenu(), p.push("/login");
1328
- }, e = (r) => {
1329
- T.value && !T.value.contains(r.target) && ue(), X.value && !X.value.contains(r.target) && ke();
1330
- }, t = (r) => {
1331
- r.key === "Escape" && (ke(), ue());
1332
- };
1333
- return wt(() => {
1334
- document.addEventListener("click", e), document.addEventListener("fullscreenchange", z), document.addEventListener("keydown", t), I.value = document.documentElement.classList.contains("grey-mode");
1335
- }), yt(() => {
1336
- document.removeEventListener("click", e), document.removeEventListener("fullscreenchange", z), document.removeEventListener("keydown", t);
1337
- }), (r, c) => {
1338
- var u;
1339
- return y(), $("div", Sn, [
1340
- s("div", Mn, [
1341
- s("img", {
1342
- src: `${k(d)}vite.svg`,
1343
- alt: "Logo",
1344
- class: "top-menu__logo-img"
1345
- }, null, 8, Ln),
1346
- s("span", In, K(k(w).appName), 1)
1347
- ]),
1348
- R(k(Nt), {
1349
- "model-value": M.value,
1350
- mode: "horizontal",
1351
- "background-color": L.value,
1352
- "text-color": C.value,
1353
- "active-text-color": H.value,
1354
- class: "top-menu__menu",
1355
- onSelect: U
1356
- }, {
1357
- default: Y(() => [
1358
- (y(!0), $(me, null, we(k(h).menuList, (o) => (y(), $(me, {
1359
- key: o.menuUrl
1360
- }, [
1361
- o.children && o.children.length > 0 ? (y(), ie(k(gt), {
1362
- key: 0,
1363
- index: o.menuUrl
1364
- }, {
1365
- title: Y(() => [
1366
- s("span", An, [
1367
- o.menuName !== "首页" ? (y(), $("span", Tn, [
1368
- S(G(o.icon)) ? (y(), ie(k(ee), {
1369
- key: 0,
1370
- name: G(o.icon),
1371
- size: 16
1372
- }, null, 8, ["name"])) : (y(), $("span", On, K(te(o.menuName)), 1))
1373
- ])) : le("", !0),
1374
- s("span", Un, K(o.menuName), 1)
1375
- ])
1376
- ]),
1377
- default: Y(() => [
1378
- (y(!0), $(me, null, we(o.children, (l) => (y(), $(me, {
1379
- key: l.menuUrl
1380
- }, [
1381
- l.children && l.children.length > 0 ? (y(), ie(k(gt), {
1382
- key: 0,
1383
- index: l.menuUrl
1384
- }, {
1385
- title: Y(() => [
1386
- s("span", Bn, [
1387
- s("span", Pn, [
1388
- S(G(l.icon)) ? (y(), ie(k(ee), {
1389
- key: 0,
1390
- name: G(l.icon),
1391
- size: 16
1392
- }, null, 8, ["name"])) : (y(), $("span", Rn, K(te(l.menuName)), 1))
1393
- ]),
1394
- s("span", zn, K(l.menuName), 1)
1395
- ])
1396
- ]),
1397
- default: Y(() => [
1398
- (y(!0), $(me, null, we(l.children, (i) => (y(), ie(k(He), {
1399
- key: i.menuUrl,
1400
- index: i.menuUrl
1401
- }, {
1402
- default: Y(() => [
1403
- s("span", Dn, [
1404
- s("span", Fn, [
1405
- S(G(i.icon)) ? (y(), ie(k(ee), {
1406
- key: 0,
1407
- name: G(i.icon),
1408
- size: 16
1409
- }, null, 8, ["name"])) : (y(), $("span", Vn, K(te(i.menuName)), 1))
1410
- ]),
1411
- s("span", jn, K(i.menuName), 1)
1412
- ])
1413
- ]),
1414
- _: 2
1415
- }, 1032, ["index"]))), 128))
1416
- ]),
1417
- _: 2
1418
- }, 1032, ["index"])) : (y(), ie(k(He), {
1419
- key: 1,
1420
- index: l.menuUrl
1421
- }, {
1422
- default: Y(() => [
1423
- s("span", qn, [
1424
- s("span", Gn, [
1425
- S(G(l.icon)) ? (y(), ie(k(ee), {
1426
- key: 0,
1427
- name: G(l.icon),
1428
- size: 16
1429
- }, null, 8, ["name"])) : (y(), $("span", Kn, K(te(l.menuName)), 1))
1430
- ]),
1431
- s("span", Hn, K(l.menuName), 1)
1432
- ])
1433
- ]),
1434
- _: 2
1435
- }, 1032, ["index"]))
1436
- ], 64))), 128))
1437
- ]),
1438
- _: 2
1439
- }, 1032, ["index"])) : (y(), ie(k(He), {
1440
- key: 1,
1441
- index: o.menuUrl
1442
- }, {
1443
- default: Y(() => [
1444
- s("span", Wn, [
1445
- o.menuName !== "首页" ? (y(), $("span", Xn, [
1446
- S(G(o.icon)) ? (y(), ie(k(ee), {
1447
- key: 0,
1448
- name: G(o.icon),
1449
- size: 16
1450
- }, null, 8, ["name"])) : (y(), $("span", Yn, K(te(o.menuName)), 1))
1451
- ])) : le("", !0),
1452
- s("span", Jn, K(o.menuName), 1)
1453
- ])
1454
- ]),
1455
- _: 2
1456
- }, 1032, ["index"]))
1457
- ], 64))), 128))
1458
- ]),
1459
- _: 1
1460
- }, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
1461
- s("div", Zn, [
1462
- s("div", {
1463
- class: "top-menu__search",
1464
- ref_key: "searchRef",
1465
- ref: X
1466
- }, [
1467
- R(k(ee), {
1468
- name: "search",
1469
- size: 14,
1470
- class: "top-menu__search-icon"
1471
- }),
1472
- lt(s("input", {
1473
- "onUpdate:modelValue": c[0] || (c[0] = (o) => J.value = o),
1474
- type: "text",
1475
- class: "top-menu__search-input",
1476
- placeholder: "搜索菜单...",
1477
- onFocus: c[1] || (c[1] = (o) => Q.value = !0)
1478
- }, null, 544), [
1479
- [kt, J.value]
1480
- ]),
1481
- R(Ve, { name: "search-dropdown" }, {
1482
- default: Y(() => [
1483
- Q.value && (x.value.length > 0 || J.value) ? (y(), $("div", Qn, [
1484
- x.value.length > 0 ? (y(), $("div", eo, [
1485
- (y(!0), $(me, null, we(x.value, (o) => (y(), $("div", {
1486
- key: o.path,
1487
- class: "top-menu__search-item",
1488
- onClick: (l) => ve(o.path)
1489
- }, [
1490
- o.title !== "首页" ? (y(), $("span", so, [
1491
- S(G(o.icon)) ? (y(), ie(k(ee), {
1492
- key: 0,
1493
- name: G(o.icon),
1494
- size: 16
1495
- }, null, 8, ["name"])) : (y(), $("span", no, K(te(o.title)), 1))
1496
- ])) : le("", !0),
1497
- s("span", oo, K(o.title), 1),
1498
- o.parentTitle ? (y(), $("span", ro, K(o.parentTitle), 1)) : le("", !0)
1499
- ], 8, to))), 128))
1500
- ])) : (y(), $("div", ao, " 未找到匹配的菜单 "))
1501
- ])) : le("", !0)
1502
- ]),
1503
- _: 1
1504
- })
1505
- ], 512),
1506
- s("div", {
1507
- class: "top-menu__action",
1508
- onClick: se,
1509
- title: O.value ? "退出全屏" : "全屏"
1510
- }, [
1511
- R(k(ee), {
1512
- name: O.value ? "fullscreen-exit" : "fullscreen",
1513
- size: 16
1514
- }, null, 8, ["name"])
1515
- ], 8, lo),
1516
- s("div", {
1517
- class: "top-menu__action",
1518
- onClick: _e,
1519
- title: "换肤设置"
1520
- }, [
1521
- R(k(ee), {
1522
- name: "skin",
1523
- size: 16
1524
- })
1525
- ]),
1526
- s("div", {
1527
- class: "top-menu__action",
1528
- onClick: re,
1529
- title: "切换主题"
1530
- }, [
1531
- R(k(ee), {
1532
- name: k(w).isDark ? "sun" : "moon",
1533
- size: 16
1534
- }, null, 8, ["name"])
1535
- ]),
1536
- s("div", {
1537
- class: "top-menu__user",
1538
- ref_key: "dropdownRef",
1539
- ref: T
1540
- }, [
1541
- s("div", {
1542
- class: "top-menu__user-trigger",
1543
- onClick: it(ce, ["stop"])
1544
- }, [
1545
- s("div", io, [
1546
- s("span", null, K(((u = k(N).userName) == null ? void 0 : u.charAt(0)) || "U"), 1)
1547
- ]),
1548
- s("span", co, K(k(N).userName), 1),
1549
- s("span", {
1550
- class: ye(["top-menu__user-arrow", { "is-active": Z.value }])
1551
- }, "▼", 2)
1552
- ]),
1553
- R(Ve, { name: "dropdown" }, {
1554
- default: Y(() => {
1555
- var o;
1556
- return [
1557
- Z.value ? (y(), $("div", uo, [
1558
- s("div", fo, [
1559
- s("div", po, [
1560
- s("span", null, K(((o = k(N).userName) == null ? void 0 : o.charAt(0)) || "U"), 1)
1561
- ]),
1562
- s("div", mo, [
1563
- s("div", ho, K(k(N).userName), 1),
1564
- s("div", vo, K(k(N).departmentName), 1)
1565
- ])
1566
- ]),
1567
- c[7] || (c[7] = s("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1568
- s("div", _o, [
1569
- s("div", {
1570
- class: "top-menu__dropdown-item",
1571
- onClick: Me
1572
- }, [
1573
- R(k(ee), {
1574
- name: "user",
1575
- size: 16
1576
- }),
1577
- c[3] || (c[3] = s("span", null, "个人信息", -1))
1578
- ]),
1579
- s("div", {
1580
- class: "top-menu__dropdown-item",
1581
- onClick: W
1582
- }, [
1583
- R(k(ee), {
1584
- name: "lock",
1585
- size: 16
1586
- }),
1587
- c[4] || (c[4] = s("span", null, "修改密码", -1))
1588
- ]),
1589
- c[6] || (c[6] = s("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1590
- s("div", {
1591
- class: "top-menu__dropdown-item top-menu__dropdown-item--danger",
1592
- onClick: B
1593
- }, [
1594
- R(k(ee), {
1595
- name: "logout",
1596
- size: 16
1597
- }),
1598
- c[5] || (c[5] = s("span", null, "退出登录", -1))
1599
- ])
1600
- ])
1601
- ])) : le("", !0)
1602
- ];
1603
- }),
1604
- _: 1
1605
- })
1606
- ], 512)
1607
- ]),
1608
- R(k(Et), {
1609
- modelValue: V.value,
1610
- "onUpdate:modelValue": c[2] || (c[2] = (o) => V.value = o),
1611
- title: "换肤设置",
1612
- direction: "rtl",
1613
- size: "320px"
1614
- }, {
1615
- default: Y(() => [
1616
- s("div", go, [
1617
- s("div", wo, [
1618
- c[11] || (c[11] = s("div", { class: "settings-title" }, "布局模式", -1)),
1619
- s("div", yo, [
1620
- (y(), $(me, null, we(Ne, (o) => s("div", {
1621
- key: o.value,
1622
- class: ye(["layout-option", { "is-active": Oe.value === o.value }]),
1623
- onClick: (l) => E(o.value)
1624
- }, [
1625
- s("div", bo, [
1626
- o.value === "sidebar" ? (y(), $("div", xo, [...c[8] || (c[8] = [
1627
- s("div", { class: "preview-aside" }, null, -1),
1628
- s("div", { class: "preview-main" }, [
1629
- s("div", { class: "preview-header" }),
1630
- s("div", { class: "preview-content" })
1631
- ], -1)
1632
- ])])) : o.value === "top" ? (y(), $("div", Co, [...c[9] || (c[9] = [
1633
- s("div", { class: "preview-header-full" }, null, -1),
1634
- s("div", { class: "preview-content-full" }, null, -1)
1635
- ])])) : (y(), $("div", No, [...c[10] || (c[10] = [
1636
- s("div", { class: "preview-header-mix" }, [
1637
- s("div", { class: "preview-mix-left" })
1638
- ], -1),
1639
- s("div", { class: "preview-mix-body" }, [
1640
- s("div", { class: "preview-mix-aside" }),
1641
- s("div", { class: "preview-mix-content" })
1642
- ], -1)
1643
- ])]))
1644
- ]),
1645
- s("span", Eo, K(o.label), 1)
1646
- ], 10, ko)), 64))
1647
- ])
1648
- ]),
1649
- s("div", $o, [
1650
- c[12] || (c[12] = s("div", { class: "settings-title" }, "主题色", -1)),
1651
- s("div", So, [
1652
- (y(), $(me, null, we(Ue, (o) => s("div", {
1653
- key: o.value,
1654
- class: ye(["color-option", { "is-active": k(w).primaryColor === o.value }]),
1655
- style: Ye({ backgroundColor: o.value }),
1656
- title: o.label,
1657
- onClick: (l) => Be(o.value)
1658
- }, [
1659
- k(w).primaryColor === o.value ? (y(), ie(k(ee), {
1660
- key: 0,
1661
- name: "check",
1662
- size: 12,
1663
- color: "#fff"
1664
- })) : le("", !0)
1665
- ], 14, Mo)), 64))
1666
- ])
1667
- ]),
1668
- s("div", Lo, [
1669
- c[17] || (c[17] = s("div", { class: "settings-title" }, "功能设置", -1)),
1670
- s("div", Io, [
1671
- s("div", Ao, [
1672
- c[14] || (c[14] = s("span", null, "灰色模式", -1)),
1673
- s("div", {
1674
- class: ye(["switch-wrapper", { "is-checked": I.value }]),
1675
- onClick: be
1676
- }, [...c[13] || (c[13] = [
1677
- s("span", { class: "switch-core" }, null, -1)
1678
- ])], 2)
1679
- ]),
1680
- s("div", To, [
1681
- c[16] || (c[16] = s("span", null, "暗黑模式", -1)),
1682
- s("div", {
1683
- class: ye(["switch-wrapper", { "is-checked": k(w).isDark }]),
1684
- onClick: Te
1685
- }, [...c[15] || (c[15] = [
1686
- s("span", { class: "switch-core" }, null, -1)
1687
- ])], 2)
1688
- ])
1689
- ])
1690
- ])
1691
- ])
1692
- ]),
1693
- _: 1
1694
- }, 8, ["modelValue"])
1695
- ]);
1696
- };
1697
- }
1698
- }), Uo = /* @__PURE__ */ Se(Oo, [["__scopeId", "data-v-d167d518"]]), Bo = { class: "mix-top-menu" }, Po = { class: "mix-top-menu__logo" }, Ro = ["src"], zo = { class: "mix-top-menu__logo-text" }, Do = { class: "mix-top-menu__menu-content" }, Fo = {
1699
- key: 0,
1700
- class: "mix-top-menu__menu-icon"
1701
- }, Vo = {
1702
- key: 1,
1703
- class: "mix-top-menu__menu-char"
1704
- }, jo = { class: "mix-top-menu__menu-text" }, qo = { class: "mix-top-menu__actions" }, Go = {
1705
- key: 0,
1706
- class: "mix-top-menu__search-dropdown"
1707
- }, Ko = {
1708
- key: 0,
1709
- class: "mix-top-menu__search-results"
1710
- }, Ho = ["onClick"], Wo = {
1711
- key: 0,
1712
- class: "mix-top-menu__search-icon-item"
1713
- }, Xo = {
1714
- key: 1,
1715
- class: "mix-top-menu__search-char"
1716
- }, Yo = { class: "mix-top-menu__search-item-title" }, Jo = {
1717
- key: 1,
1718
- class: "mix-top-menu__search-item-parent"
1719
- }, Zo = {
1720
- key: 1,
1721
- class: "mix-top-menu__search-empty"
1722
- }, Qo = ["title"], er = { class: "mix-top-menu__avatar" }, tr = { class: "mix-top-menu__user-name" }, sr = {
1723
- key: 0,
1724
- class: "mix-top-menu__dropdown"
1725
- }, nr = { class: "mix-top-menu__dropdown-header" }, or = { class: "mix-top-menu__dropdown-avatar" }, rr = { class: "mix-top-menu__dropdown-info" }, ar = { class: "mix-top-menu__dropdown-name" }, lr = { class: "mix-top-menu__dropdown-role" }, ir = { class: "mix-top-menu__dropdown-menu" }, cr = { class: "settings-drawer" }, ur = { class: "settings-section" }, dr = { class: "settings-layout-options" }, fr = ["onClick"], pr = { class: "layout-option__preview" }, mr = {
1726
- key: 0,
1727
- class: "layout-preview-sidebar"
1728
- }, hr = {
1729
- key: 1,
1730
- class: "layout-preview-top"
1731
- }, vr = {
1732
- key: 2,
1733
- class: "layout-preview-mix"
1734
- }, _r = { class: "layout-option__label" }, gr = { class: "settings-section" }, wr = { class: "settings-color-options" }, yr = ["title", "onClick"], kr = { class: "settings-section" }, br = { class: "settings-switch-list" }, xr = { class: "settings-switch-item" }, Cr = { class: "settings-switch-item" }, Nr = /* @__PURE__ */ Ae({
1735
- __name: "MixTopMenu",
1736
- setup(n) {
1737
- const d = "/", v = qe(), p = ze(), h = Pe(), w = De(), N = $e(), _ = Ze(), M = P(""), g = (o, l = "") => {
1738
- const i = [];
1739
- return o.forEach((a) => {
1740
- a.children && a.children.length > 0 ? i.push(...g(a.children, a.menuName)) : i.push({ ...a, parentTitle: l, title: a.menuName, path: a.menuUrl });
1741
- }), i;
1742
- }, x = j(() => G.value.trim() ? g(h.menuList).filter(
1743
- (l) => l.title.toLowerCase().includes(G.value.toLowerCase())
1744
- ) : []), L = j(() => {
1745
- const o = h.menuList.find((l) => l.menuUrl === M.value);
1746
- return (o == null ? void 0 : o.children) || [];
1747
- }), C = j(() => h.menuList.find((o) => !!(v.path === o.menuUrl || o.children && o.children.some((l) => v.path.startsWith(l.menuUrl) || v.path === l.menuUrl)))), H = () => {
1748
- C.value ? M.value = C.value.menuUrl : h.menuList.length > 0 && (M.value = h.menuList[0].menuUrl);
1749
- }, Z = (o) => {
1750
- M.value = o;
1751
- const l = h.menuList.find((i) => i.menuUrl === o);
1752
- if (l)
1753
- if (l.children && l.children.length > 0) {
1754
- const i = l.children[0].menuUrl;
1755
- v.path !== i && p.push(i);
1756
- } else
1757
- v.path !== o && p.push(o);
1758
- }, T = j(() => w.isDark ? "#1d1e1f" : "#fff"), O = j(() => w.isDark ? "#cfd3dc" : "#303133"), V = j(() => "#409eff"), I = P(!1), Q = P(null), J = P(!1), X = P(!1), U = P(!1), A = P(!1), G = P(""), te = P(null);
1759
- Xe(() => v.path, () => {
1760
- H(), w.setMixSubMenus(L.value);
1761
- }), Xe(() => h.menuList, (o) => {
1762
- o && o.length > 0 && (H(), w.setMixSubMenus(L.value));
1763
- }, { immediate: !0 });
1764
- const S = /* @__PURE__ */ new Set([
1765
- "arrow-up",
1766
- "arrow-down",
1767
- "arrow-left",
1768
- "arrow-right",
1769
- "caret-down",
1770
- "caret-right",
1771
- "plus",
1772
- "minus",
1773
- "close",
1774
- "check",
1775
- "edit",
1776
- "delete",
1777
- "copy",
1778
- "download",
1779
- "upload",
1780
- "refresh",
1781
- "search",
1782
- "filter",
1783
- "more",
1784
- "setting",
1785
- "share",
1786
- "loading",
1787
- "info",
1788
- "success",
1789
- "warning",
1790
- "error",
1791
- "question",
1792
- "user",
1793
- "user-add",
1794
- "user-group",
1795
- "logout",
1796
- "login",
1797
- "file",
1798
- "folder",
1799
- "folder-open",
1800
- "document",
1801
- "image",
1802
- "video",
1803
- "music",
1804
- "camera",
1805
- "mail",
1806
- "phone",
1807
- "chat",
1808
- "bell",
1809
- "message",
1810
- "eye",
1811
- "eye-off",
1812
- "calendar",
1813
- "clock",
1814
- "history",
1815
- "timer",
1816
- "location",
1817
- "map",
1818
- "globe",
1819
- "star",
1820
- "heart",
1821
- "thumb-up",
1822
- "link",
1823
- "external-link",
1824
- "lock",
1825
- "unlock",
1826
- "key",
1827
- "home",
1828
- "menu",
1829
- "menu-fold",
1830
- "menu-unfold",
1831
- "sidebar-fold",
1832
- "sidebar-expand",
1833
- "sidebar-left",
1834
- "dashboard",
1835
- "chart",
1836
- "chart-pie",
1837
- "chart-line",
1838
- "report",
1839
- "analytics",
1840
- "system",
1841
- "permission",
1842
- "role",
1843
- "user-manage",
1844
- "log",
1845
- "notification",
1846
- "app",
1847
- "list",
1848
- "grid",
1849
- "fullscreen",
1850
- "fullscreen-exit",
1851
- "zoom-in",
1852
- "zoom-out",
1853
- "print",
1854
- "bookmark",
1855
- "tag",
1856
- "code",
1857
- "terminal",
1858
- "database",
1859
- "server",
1860
- "cloud",
1861
- "gift",
1862
- "moon",
1863
- "sun",
1864
- "theme",
1865
- "skin"
1866
- ]), re = (o) => {
1867
- if (!o || o === "") return "";
1868
- if (o.startsWith("tineco-icon-")) {
1869
- const i = o.replace("tineco-icon-", "");
1870
- return {
1871
- home: "home",
1872
- dashboard: "dashboard",
1873
- system: "system",
1874
- user: "user",
1875
- role: "role",
1876
- menu: "list",
1877
- setting: "setting",
1878
- file: "file",
1879
- folder: "folder",
1880
- chart: "chart",
1881
- report: "report",
1882
- analytics: "analytics"
1883
- }[i] || i;
1884
- }
1885
- return {
1886
- dashboard: "dashboard",
1887
- system: "system",
1888
- user: "user",
1889
- role: "role",
1890
- menu: "list",
1891
- setting: "setting",
1892
- home: "home",
1893
- chart: "chart",
1894
- report: "report",
1895
- analytics: "analytics",
1896
- permission: "permission",
1897
- log: "log",
1898
- notification: "notification",
1899
- app: "app",
1900
- list: "list",
1901
- grid: "grid"
1902
- }[o] || o;
1903
- }, se = (o) => o ? o.charAt(0) : "", z = (o) => S.has(o), ce = () => {
1904
- w.toggleTheme(), X.value = !1;
1905
- }, ue = () => {
1906
- document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1907
- }, ke = () => {
1908
- J.value = !!document.fullscreenElement;
1909
- }, ve = () => {
1910
- I.value = !I.value;
1911
- }, _e = () => {
1912
- I.value = !1;
1913
- }, ge = () => {
1914
- A.value = !1, G.value = "";
1915
- }, be = (o) => {
1916
- p.push(o), ge();
1917
- }, Te = () => {
1918
- X.value = !0;
1919
- }, Ne = (o) => {
1920
- U.value = o;
1921
- const l = document.documentElement;
1922
- o ? l.classList.add("grey-mode") : l.classList.remove("grey-mode");
1923
- }, Oe = () => {
1924
- Ne(!U.value), X.value = !1;
1925
- }, E = () => {
1926
- w.toggleTheme(), X.value = !1;
1927
- }, Ue = [
1928
- { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1929
- { value: "top", label: "顶部菜单", icon: "menu" },
1930
- { value: "mix", label: "混合菜单", icon: "grid" }
1931
- ], Be = j(() => w.layout), Me = (o) => {
1932
- w.setLayout(o), X.value = !1;
1933
- }, W = [
1934
- { value: "#409eff", label: "默认蓝" },
1935
- { value: "#1890ff", label: "科技蓝" },
1936
- { value: "#52c41a", label: "极光绿" },
1937
- { value: "#faad14", label: "日落橙" },
1938
- { value: "#f5222d", label: "薄暮红" },
1939
- { value: "#722ed1", label: "酱紫" }
1940
- ], B = (o) => {
1941
- w.setPrimaryColor(o), X.value = !1;
1942
- }, e = () => {
1943
- _e(), p.push("/profile");
1944
- }, t = () => {
1945
- _e(), p.push("/change-password");
1946
- }, r = () => {
1947
- _e(), _.logout(), N.clearUserInfo(), h.clearMenu(), p.push("/login");
1948
- }, c = (o) => {
1949
- Q.value && !Q.value.contains(o.target) && _e(), te.value && !te.value.contains(o.target) && ge();
1950
- }, u = (o) => {
1951
- o.key === "Escape" && (ge(), _e());
1952
- };
1953
- return wt(() => {
1954
- document.addEventListener("click", c), document.addEventListener("fullscreenchange", ke), document.addEventListener("keydown", u), U.value = document.documentElement.classList.contains("grey-mode"), H();
1955
- }), yt(() => {
1956
- document.removeEventListener("click", c), document.removeEventListener("fullscreenchange", ke), document.removeEventListener("keydown", u);
1957
- }), (o, l) => {
1958
- var i;
1959
- return y(), $("div", Bo, [
1960
- s("div", Po, [
1961
- s("img", {
1962
- src: `${k(d)}vite.svg`,
1963
- alt: "Logo",
1964
- class: "mix-top-menu__logo-img"
1965
- }, null, 8, Ro),
1966
- s("span", zo, K(k(w).appName), 1)
1967
- ]),
1968
- R(k(Nt), {
1969
- "model-value": M.value,
1970
- mode: "horizontal",
1971
- "background-color": T.value,
1972
- "text-color": O.value,
1973
- "active-text-color": V.value,
1974
- class: "mix-top-menu__menu",
1975
- onSelect: Z
1976
- }, {
1977
- default: Y(() => [
1978
- (y(!0), $(me, null, we(k(h).menuList, (a) => (y(), ie(k(He), {
1979
- key: a.menuUrl,
1980
- index: a.menuUrl
1981
- }, {
1982
- default: Y(() => [
1983
- s("span", Do, [
1984
- a.menuName !== "首页" ? (y(), $("span", Fo, [
1985
- z(re(a.icon)) ? (y(), ie(k(ee), {
1986
- key: 0,
1987
- name: re(a.icon),
1988
- size: 16
1989
- }, null, 8, ["name"])) : (y(), $("span", Vo, K(se(a.menuName)), 1))
1990
- ])) : le("", !0),
1991
- s("span", jo, K(a.menuName), 1)
1992
- ])
1993
- ]),
1994
- _: 2
1995
- }, 1032, ["index"]))), 128))
1996
- ]),
1997
- _: 1
1998
- }, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
1999
- s("div", qo, [
2000
- s("div", {
2001
- class: "mix-top-menu__search",
2002
- ref_key: "searchRef",
2003
- ref: te
2004
- }, [
2005
- R(k(ee), {
2006
- name: "search",
2007
- size: 14,
2008
- class: "mix-top-menu__search-icon"
2009
- }),
2010
- lt(s("input", {
2011
- "onUpdate:modelValue": l[0] || (l[0] = (a) => G.value = a),
2012
- type: "text",
2013
- class: "mix-top-menu__search-input",
2014
- placeholder: "搜索菜单...",
2015
- onFocus: l[1] || (l[1] = (a) => A.value = !0)
2016
- }, null, 544), [
2017
- [kt, G.value]
2018
- ]),
2019
- R(Ve, { name: "search-dropdown" }, {
2020
- default: Y(() => [
2021
- A.value && (x.value.length > 0 || G.value) ? (y(), $("div", Go, [
2022
- x.value.length > 0 ? (y(), $("div", Ko, [
2023
- (y(!0), $(me, null, we(x.value, (a) => (y(), $("div", {
2024
- key: a.path,
2025
- class: "mix-top-menu__search-item",
2026
- onClick: (m) => be(a.path)
2027
- }, [
2028
- a.title !== "首页" ? (y(), $("span", Wo, [
2029
- z(re(a.icon)) ? (y(), ie(k(ee), {
2030
- key: 0,
2031
- name: re(a.icon),
2032
- size: 16
2033
- }, null, 8, ["name"])) : (y(), $("span", Xo, K(se(a.title)), 1))
2034
- ])) : le("", !0),
2035
- s("span", Yo, K(a.title), 1),
2036
- a.parentTitle ? (y(), $("span", Jo, K(a.parentTitle), 1)) : le("", !0)
2037
- ], 8, Ho))), 128))
2038
- ])) : (y(), $("div", Zo, " 未找到匹配的菜单 "))
2039
- ])) : le("", !0)
2040
- ]),
2041
- _: 1
2042
- })
2043
- ], 512),
2044
- s("div", {
2045
- class: "mix-top-menu__action",
2046
- onClick: ue,
2047
- title: J.value ? "退出全屏" : "全屏"
2048
- }, [
2049
- R(k(ee), {
2050
- name: J.value ? "fullscreen-exit" : "fullscreen",
2051
- size: 16
2052
- }, null, 8, ["name"])
2053
- ], 8, Qo),
2054
- s("div", {
2055
- class: "mix-top-menu__action",
2056
- onClick: Te,
2057
- title: "换肤设置"
2058
- }, [
2059
- R(k(ee), {
2060
- name: "skin",
2061
- size: 16
2062
- })
2063
- ]),
2064
- s("div", {
2065
- class: "mix-top-menu__action",
2066
- onClick: ce,
2067
- title: "切换主题"
2068
- }, [
2069
- R(k(ee), {
2070
- name: k(w).isDark ? "sun" : "moon",
2071
- size: 16
2072
- }, null, 8, ["name"])
2073
- ]),
2074
- s("div", {
2075
- class: "mix-top-menu__user",
2076
- ref_key: "dropdownRef",
2077
- ref: Q
2078
- }, [
2079
- s("div", {
2080
- class: "mix-top-menu__user-trigger",
2081
- onClick: it(ve, ["stop"])
2082
- }, [
2083
- s("div", er, [
2084
- s("span", null, K(((i = k(N).userName) == null ? void 0 : i.charAt(0)) || "U"), 1)
2085
- ]),
2086
- s("span", tr, K(k(N).userName), 1),
2087
- s("span", {
2088
- class: ye(["mix-top-menu__user-arrow", { "is-active": I.value }])
2089
- }, "▼", 2)
2090
- ]),
2091
- R(Ve, { name: "dropdown" }, {
2092
- default: Y(() => {
2093
- var a;
2094
- return [
2095
- I.value ? (y(), $("div", sr, [
2096
- s("div", nr, [
2097
- s("div", or, [
2098
- s("span", null, K(((a = k(N).userName) == null ? void 0 : a.charAt(0)) || "U"), 1)
2099
- ]),
2100
- s("div", rr, [
2101
- s("div", ar, K(k(N).userName), 1),
2102
- s("div", lr, K(k(N).departmentName), 1)
2103
- ])
2104
- ]),
2105
- l[7] || (l[7] = s("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
2106
- s("div", ir, [
2107
- s("div", {
2108
- class: "mix-top-menu__dropdown-item",
2109
- onClick: e
2110
- }, [
2111
- R(k(ee), {
2112
- name: "user",
2113
- size: 16
2114
- }),
2115
- l[3] || (l[3] = s("span", null, "个人信息", -1))
2116
- ]),
2117
- s("div", {
2118
- class: "mix-top-menu__dropdown-item",
2119
- onClick: t
2120
- }, [
2121
- R(k(ee), {
2122
- name: "lock",
2123
- size: 16
2124
- }),
2125
- l[4] || (l[4] = s("span", null, "修改密码", -1))
2126
- ]),
2127
- l[6] || (l[6] = s("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
2128
- s("div", {
2129
- class: "mix-top-menu__dropdown-item mix-top-menu__dropdown-item--danger",
2130
- onClick: r
2131
- }, [
2132
- R(k(ee), {
2133
- name: "logout",
2134
- size: 16
2135
- }),
2136
- l[5] || (l[5] = s("span", null, "退出登录", -1))
2137
- ])
2138
- ])
2139
- ])) : le("", !0)
2140
- ];
2141
- }),
2142
- _: 1
2143
- })
2144
- ], 512)
2145
- ]),
2146
- R(k(Et), {
2147
- modelValue: X.value,
2148
- "onUpdate:modelValue": l[2] || (l[2] = (a) => X.value = a),
2149
- title: "换肤设置",
2150
- direction: "rtl",
2151
- size: "320px"
2152
- }, {
2153
- default: Y(() => [
2154
- s("div", cr, [
2155
- s("div", ur, [
2156
- l[11] || (l[11] = s("div", { class: "settings-title" }, "布局模式", -1)),
2157
- s("div", dr, [
2158
- (y(), $(me, null, we(Ue, (a) => s("div", {
2159
- key: a.value,
2160
- class: ye(["layout-option", { "is-active": Be.value === a.value }]),
2161
- onClick: (m) => Me(a.value)
2162
- }, [
2163
- s("div", pr, [
2164
- a.value === "sidebar" ? (y(), $("div", mr, [...l[8] || (l[8] = [
2165
- s("div", { class: "preview-aside" }, null, -1),
2166
- s("div", { class: "preview-main" }, [
2167
- s("div", { class: "preview-header" }),
2168
- s("div", { class: "preview-content" })
2169
- ], -1)
2170
- ])])) : a.value === "top" ? (y(), $("div", hr, [...l[9] || (l[9] = [
2171
- s("div", { class: "preview-header-full" }, null, -1),
2172
- s("div", { class: "preview-content-full" }, null, -1)
2173
- ])])) : (y(), $("div", vr, [...l[10] || (l[10] = [
2174
- s("div", { class: "preview-header-mix" }, [
2175
- s("div", { class: "preview-mix-left" })
2176
- ], -1),
2177
- s("div", { class: "preview-mix-body" }, [
2178
- s("div", { class: "preview-mix-aside" }),
2179
- s("div", { class: "preview-mix-content" })
2180
- ], -1)
2181
- ])]))
2182
- ]),
2183
- s("span", _r, K(a.label), 1)
2184
- ], 10, fr)), 64))
2185
- ])
2186
- ]),
2187
- s("div", gr, [
2188
- l[12] || (l[12] = s("div", { class: "settings-title" }, "主题色", -1)),
2189
- s("div", wr, [
2190
- (y(), $(me, null, we(W, (a) => s("div", {
2191
- key: a.value,
2192
- class: ye(["color-option", { "is-active": k(w).primaryColor === a.value }]),
2193
- style: Ye({ backgroundColor: a.value }),
2194
- title: a.label,
2195
- onClick: (m) => B(a.value)
2196
- }, [
2197
- k(w).primaryColor === a.value ? (y(), ie(k(ee), {
2198
- key: 0,
2199
- name: "check",
2200
- size: 12,
2201
- color: "#fff"
2202
- })) : le("", !0)
2203
- ], 14, yr)), 64))
2204
- ])
2205
- ]),
2206
- s("div", kr, [
2207
- l[17] || (l[17] = s("div", { class: "settings-title" }, "功能设置", -1)),
2208
- s("div", br, [
2209
- s("div", xr, [
2210
- l[14] || (l[14] = s("span", null, "灰色模式", -1)),
2211
- s("div", {
2212
- class: ye(["switch-wrapper", { "is-checked": U.value }]),
2213
- onClick: Oe
2214
- }, [...l[13] || (l[13] = [
2215
- s("span", { class: "switch-core" }, null, -1)
2216
- ])], 2)
2217
- ]),
2218
- s("div", Cr, [
2219
- l[16] || (l[16] = s("span", null, "暗黑模式", -1)),
2220
- s("div", {
2221
- class: ye(["switch-wrapper", { "is-checked": k(w).isDark }]),
2222
- onClick: E
2223
- }, [...l[15] || (l[15] = [
2224
- s("span", { class: "switch-core" }, null, -1)
2225
- ])], 2)
2226
- ])
2227
- ])
2228
- ])
2229
- ])
2230
- ]),
2231
- _: 1
2232
- }, 8, ["modelValue"])
2233
- ]);
2234
- };
2235
- }
2236
- }), Er = /* @__PURE__ */ Se(Nr, [["__scopeId", "data-v-4c1ab09d"]]), $r = {
2237
- key: 0,
2238
- class: "layout layout--sidebar"
2239
- }, Sr = { class: "layout__main" }, Mr = { class: "layout__header" }, Lr = { class: "layout__content" }, Ir = {
2240
- key: 1,
2241
- class: "layout layout--top"
2242
- }, Ar = { class: "layout__top-menu" }, Tr = { class: "layout__main" }, Or = { class: "layout__content" }, Ur = {
2243
- key: 2,
2244
- class: "layout layout--mix"
2245
- }, Br = { class: "layout__mix-top-menu" }, Pr = { class: "layout__mix-body" }, Rr = { class: "layout__content" }, zr = /* @__PURE__ */ Ae({
2246
- __name: "index",
2247
- setup(n) {
2248
- const d = De(), v = Pe(), p = j(
2249
- () => d.isCollapsed ? "64px" : "210px"
2250
- ), h = j(() => d.layout), w = j(() => h.value === "mix"), N = j(() => h.value === "sidebar" ? v.menuList : h.value === "mix" ? d.mixSubMenus : []), _ = j(() => w.value ? N.value.length > 0 : !1);
2251
- return (M, g) => {
2252
- const x = Pt("router-view");
2253
- return y(), $(me, null, [
2254
- h.value === "sidebar" ? (y(), $("div", $r, [
2255
- s("aside", {
2256
- class: "layout__aside",
2257
- style: Ye({ width: p.value })
2258
- }, [
2259
- R(Bt, {
2260
- "menu-list": N.value,
2261
- "show-logo": !0,
2262
- "show-user": !0
2263
- }, null, 8, ["menu-list"])
2264
- ], 4),
2265
- s("div", Sr, [
2266
- s("header", Mr, [
2267
- R($n)
2268
- ]),
2269
- s("main", Lr, [
2270
- R(x)
2271
- ])
2272
- ])
2273
- ])) : le("", !0),
2274
- h.value === "top" ? (y(), $("div", Ir, [
2275
- s("div", Ar, [
2276
- R(Uo)
2277
- ]),
2278
- s("div", Tr, [
2279
- s("main", Or, [
2280
- R(x)
2281
- ])
2282
- ])
2283
- ])) : le("", !0),
2284
- h.value === "mix" ? (y(), $("div", Ur, [
2285
- s("div", Br, [
2286
- R(Er)
2287
- ]),
2288
- s("div", Pr, [
2289
- _.value ? (y(), $("aside", {
2290
- key: 0,
2291
- class: "layout__aside",
2292
- style: Ye({ width: p.value })
2293
- }, [
2294
- R(Bt, {
2295
- "menu-list": N.value,
2296
- "show-logo": !1,
2297
- "show-user": !1
2298
- }, null, 8, ["menu-list"])
2299
- ], 4)) : le("", !0),
2300
- s("main", Rr, [
2301
- R(x)
2302
- ])
2303
- ])
2304
- ])) : le("", !0)
2305
- ], 64);
2306
- };
2307
- }
2308
- }), jt = /* @__PURE__ */ Se(zr, [["__scopeId", "data-v-fb6a0b14"]]), Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2309
- __proto__: null,
2310
- default: jt
2311
- }, Symbol.toStringTag, { value: "Module" })), Fr = { class: "tabs-wrapper" }, Vr = { class: "tab-label" }, jr = ["onClick"], qr = /* @__PURE__ */ Ae({
2312
- __name: "Tabs",
2313
- setup(n) {
2314
- const d = qe(), v = ze(), p = j(() => {
2315
- const _ = [];
2316
- return d.matched.forEach((M) => {
2317
- var g;
2318
- (g = M.meta) != null && g.affix && _.push({
2319
- name: M.name,
2320
- title: M.meta.title,
2321
- path: M.path,
2322
- affix: !0
2323
- });
2324
- }), _;
2325
- }), h = j(() => d.path), w = (_) => {
2326
- v.push(_);
2327
- }, N = (_) => {
2328
- const M = p.value.find((g) => g.path === _);
2329
- if (!(M != null && M.affix) && _ === h.value) {
2330
- const g = p.value.findIndex((L) => L.path === _), x = p.value[g - 1] || p.value[g + 1];
2331
- x && v.push(x.path);
2332
- }
2333
- };
2334
- return (_, M) => (y(), $("div", Fr, [
2335
- R(k(ss), {
2336
- modelValue: h.value,
2337
- "onUpdate:modelValue": M[0] || (M[0] = (g) => h.value = g),
2338
- type: "card",
2339
- onTabClick: w
2340
- }, {
2341
- default: Y(() => [
2342
- (y(!0), $(me, null, we(p.value, (g) => (y(), ie(k(ns), {
2343
- key: g.path,
2344
- name: g.path,
2345
- label: g.title,
2346
- closable: !g.affix
2347
- }, {
2348
- label: Y(() => [
2349
- s("span", Vr, [
2350
- Fe(K(g.title) + " ", 1),
2351
- g.affix ? le("", !0) : (y(), $("span", {
2352
- key: 0,
2353
- class: "tab-close",
2354
- onClick: it((x) => N(g.path), ["stop"])
2355
- }, " ✕ ", 8, jr))
2356
- ])
2357
- ]),
2358
- _: 2
2359
- }, 1032, ["name", "label", "closable"]))), 128))
2360
- ]),
2361
- _: 1
2362
- }, 8, ["modelValue"])
2363
- ]));
2364
- }
2365
- }), Ja = /* @__PURE__ */ Se(qr, [["__scopeId", "data-v-9156d8cd"]]), Gr = {}, Kr = { class: "footer" };
2366
- function Hr(n, d) {
2367
- return y(), $("div", Kr, [...d[0] || (d[0] = [
2368
- s("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
2369
- ])]);
2370
- }
2371
- const Za = /* @__PURE__ */ Se(Gr, [["render", Hr], ["__scopeId", "data-v-4852826a"]]);
2372
- var Wr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2373
- function Xr(n) {
2374
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
2375
- }
2376
- var dt = { exports: {} }, qt = { exports: {} }, Gt = { exports: {} };
2377
- (function(n) {
2378
- (function(d) {
2379
- var v, p = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, h = Math.ceil, w = Math.floor, N = "[BigNumber Error] ", _ = N + "Number primitive has more than 15 significant digits: ", M = 1e14, g = 14, x = 9007199254740991, L = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], C = 1e7, H = 1e9;
2380
- function Z(U) {
2381
- var A, G, te, S = E.prototype = { constructor: E, toString: null, valueOf: null }, re = new E(1), se = 20, z = 4, ce = -7, ue = 21, ke = -1e7, ve = 1e7, _e = !1, ge = 1, be = 0, Te = {
2382
- prefix: "",
2383
- groupSize: 3,
2384
- secondaryGroupSize: 0,
2385
- groupSeparator: ",",
2386
- decimalSeparator: ".",
2387
- fractionGroupSize: 0,
2388
- fractionGroupSeparator: " ",
2389
- // non-breaking space
2390
- suffix: ""
2391
- }, Ne = "0123456789abcdefghijklmnopqrstuvwxyz", Oe = !0;
2392
- function E(e, t) {
2393
- var r, c, u, o, l, i, a, m, f = this;
2394
- if (!(f instanceof E)) return new E(e, t);
2395
- if (t == null) {
2396
- if (e && e._isBigNumber === !0) {
2397
- f.s = e.s, !e.c || e.e > ve ? f.c = f.e = null : e.e < ke ? f.c = [f.e = 0] : (f.e = e.e, f.c = e.c.slice());
2398
- return;
2399
- }
2400
- if ((i = typeof e == "number") && e * 0 == 0) {
2401
- if (f.s = 1 / e < 0 ? (e = -e, -1) : 1, e === ~~e) {
2402
- for (o = 0, l = e; l >= 10; l /= 10, o++) ;
2403
- o > ve ? f.c = f.e = null : (f.e = o, f.c = [e]);
2404
- return;
2405
- }
2406
- m = String(e);
2407
- } else {
2408
- if (!p.test(m = String(e))) return te(f, m, i);
2409
- f.s = m.charCodeAt(0) == 45 ? (m = m.slice(1), -1) : 1;
2410
- }
2411
- (o = m.indexOf(".")) > -1 && (m = m.replace(".", "")), (l = m.search(/e/i)) > 0 ? (o < 0 && (o = l), o += +m.slice(l + 1), m = m.substring(0, l)) : o < 0 && (o = m.length);
2412
- } else {
2413
- if (I(t, 2, Ne.length, "Base"), t == 10 && Oe)
2414
- return f = new E(e), W(f, se + f.e + 1, z);
2415
- if (m = String(e), i = typeof e == "number") {
2416
- if (e * 0 != 0) return te(f, m, i, t);
2417
- if (f.s = 1 / e < 0 ? (m = m.slice(1), -1) : 1, E.DEBUG && m.replace(/^0\.0*|\./, "").length > 15)
2418
- throw Error(_ + e);
2419
- } else
2420
- f.s = m.charCodeAt(0) === 45 ? (m = m.slice(1), -1) : 1;
2421
- for (r = Ne.slice(0, t), o = l = 0, a = m.length; l < a; l++)
2422
- if (r.indexOf(c = m.charAt(l)) < 0) {
2423
- if (c == ".") {
2424
- if (l > o) {
2425
- o = a;
2426
- continue;
2427
- }
2428
- } else if (!u && (m == m.toUpperCase() && (m = m.toLowerCase()) || m == m.toLowerCase() && (m = m.toUpperCase()))) {
2429
- u = !0, l = -1, o = 0;
2430
- continue;
2431
- }
2432
- return te(f, String(e), i, t);
2433
- }
2434
- i = !1, m = G(m, t, 10, f.s), (o = m.indexOf(".")) > -1 ? m = m.replace(".", "") : o = m.length;
2435
- }
2436
- for (l = 0; m.charCodeAt(l) === 48; l++) ;
2437
- for (a = m.length; m.charCodeAt(--a) === 48; ) ;
2438
- if (m = m.slice(l, ++a)) {
2439
- if (a -= l, i && E.DEBUG && a > 15 && (e > x || e !== w(e)))
2440
- throw Error(_ + f.s * e);
2441
- if ((o = o - l - 1) > ve)
2442
- f.c = f.e = null;
2443
- else if (o < ke)
2444
- f.c = [f.e = 0];
2445
- else {
2446
- if (f.e = o, f.c = [], l = (o + 1) % g, o < 0 && (l += g), l < a) {
2447
- for (l && f.c.push(+m.slice(0, l)), a -= g; l < a; )
2448
- f.c.push(+m.slice(l, l += g));
2449
- l = g - (m = m.slice(l)).length;
2450
- } else
2451
- l -= a;
2452
- for (; l--; m += "0") ;
2453
- f.c.push(+m);
2454
- }
2455
- } else
2456
- f.c = [f.e = 0];
2457
- }
2458
- E.clone = Z, E.ROUND_UP = 0, E.ROUND_DOWN = 1, E.ROUND_CEIL = 2, E.ROUND_FLOOR = 3, E.ROUND_HALF_UP = 4, E.ROUND_HALF_DOWN = 5, E.ROUND_HALF_EVEN = 6, E.ROUND_HALF_CEIL = 7, E.ROUND_HALF_FLOOR = 8, E.EUCLID = 9, E.config = E.set = function(e) {
2459
- var t, r;
2460
- if (e != null)
2461
- if (typeof e == "object") {
2462
- if (e.hasOwnProperty(t = "DECIMAL_PLACES") && (r = e[t], I(r, 0, H, t), se = r), e.hasOwnProperty(t = "ROUNDING_MODE") && (r = e[t], I(r, 0, 8, t), z = r), e.hasOwnProperty(t = "EXPONENTIAL_AT") && (r = e[t], r && r.pop ? (I(r[0], -H, 0, t), I(r[1], 0, H, t), ce = r[0], ue = r[1]) : (I(r, -H, H, t), ce = -(ue = r < 0 ? -r : r))), e.hasOwnProperty(t = "RANGE"))
2463
- if (r = e[t], r && r.pop)
2464
- I(r[0], -H, -1, t), I(r[1], 1, H, t), ke = r[0], ve = r[1];
2465
- else if (I(r, -H, H, t), r)
2466
- ke = -(ve = r < 0 ? -r : r);
2467
- else
2468
- throw Error(N + t + " cannot be zero: " + r);
2469
- if (e.hasOwnProperty(t = "CRYPTO"))
2470
- if (r = e[t], r === !!r)
2471
- if (r)
2472
- if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
2473
- _e = r;
2474
- else
2475
- throw _e = !r, Error(N + "crypto unavailable");
2476
- else
2477
- _e = r;
2478
- else
2479
- throw Error(N + t + " not true or false: " + r);
2480
- if (e.hasOwnProperty(t = "MODULO_MODE") && (r = e[t], I(r, 0, 9, t), ge = r), e.hasOwnProperty(t = "POW_PRECISION") && (r = e[t], I(r, 0, H, t), be = r), e.hasOwnProperty(t = "FORMAT"))
2481
- if (r = e[t], typeof r == "object") Te = r;
2482
- else throw Error(N + t + " not an object: " + r);
2483
- if (e.hasOwnProperty(t = "ALPHABET"))
2484
- if (r = e[t], typeof r == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(r))
2485
- Oe = r.slice(0, 10) == "0123456789", Ne = r;
2486
- else
2487
- throw Error(N + t + " invalid: " + r);
2488
- } else
2489
- throw Error(N + "Object expected: " + e);
2490
- return {
2491
- DECIMAL_PLACES: se,
2492
- ROUNDING_MODE: z,
2493
- EXPONENTIAL_AT: [ce, ue],
2494
- RANGE: [ke, ve],
2495
- CRYPTO: _e,
2496
- MODULO_MODE: ge,
2497
- POW_PRECISION: be,
2498
- FORMAT: Te,
2499
- ALPHABET: Ne
2500
- };
2501
- }, E.isBigNumber = function(e) {
2502
- if (!e || e._isBigNumber !== !0) return !1;
2503
- if (!E.DEBUG) return !0;
2504
- var t, r, c = e.c, u = e.e, o = e.s;
2505
- e: if ({}.toString.call(c) == "[object Array]") {
2506
- if ((o === 1 || o === -1) && u >= -H && u <= H && u === w(u)) {
2507
- if (c[0] === 0) {
2508
- if (u === 0 && c.length === 1) return !0;
2509
- break e;
2510
- }
2511
- if (t = (u + 1) % g, t < 1 && (t += g), String(c[0]).length == t) {
2512
- for (t = 0; t < c.length; t++)
2513
- if (r = c[t], r < 0 || r >= M || r !== w(r)) break e;
2514
- if (r !== 0) return !0;
2515
- }
2516
- }
2517
- } else if (c === null && u === null && (o === null || o === 1 || o === -1))
2518
- return !0;
2519
- throw Error(N + "Invalid BigNumber: " + e);
2520
- }, E.maximum = E.max = function() {
2521
- return Be(arguments, -1);
2522
- }, E.minimum = E.min = function() {
2523
- return Be(arguments, 1);
2524
- }, E.random = function() {
2525
- var e = 9007199254740992, t = Math.random() * e & 2097151 ? function() {
2526
- return w(Math.random() * e);
2527
- } : function() {
2528
- return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
2529
- };
2530
- return function(r) {
2531
- var c, u, o, l, i, a = 0, m = [], f = new E(re);
2532
- if (r == null ? r = se : I(r, 0, H), l = h(r / g), _e)
2533
- if (crypto.getRandomValues) {
2534
- for (c = crypto.getRandomValues(new Uint32Array(l *= 2)); a < l; )
2535
- i = c[a] * 131072 + (c[a + 1] >>> 11), i >= 9e15 ? (u = crypto.getRandomValues(new Uint32Array(2)), c[a] = u[0], c[a + 1] = u[1]) : (m.push(i % 1e14), a += 2);
2536
- a = l / 2;
2537
- } else if (crypto.randomBytes) {
2538
- for (c = crypto.randomBytes(l *= 7); a < l; )
2539
- i = (c[a] & 31) * 281474976710656 + c[a + 1] * 1099511627776 + c[a + 2] * 4294967296 + c[a + 3] * 16777216 + (c[a + 4] << 16) + (c[a + 5] << 8) + c[a + 6], i >= 9e15 ? crypto.randomBytes(7).copy(c, a) : (m.push(i % 1e14), a += 7);
2540
- a = l / 7;
2541
- } else
2542
- throw _e = !1, Error(N + "crypto unavailable");
2543
- if (!_e)
2544
- for (; a < l; )
2545
- i = t(), i < 9e15 && (m[a++] = i % 1e14);
2546
- for (l = m[--a], r %= g, l && r && (i = L[g - r], m[a] = w(l / i) * i); m[a] === 0; m.pop(), a--) ;
2547
- if (a < 0)
2548
- m = [o = 0];
2549
- else {
2550
- for (o = -1; m[0] === 0; m.splice(0, 1), o -= g) ;
2551
- for (a = 1, i = m[0]; i >= 10; i /= 10, a++) ;
2552
- a < g && (o -= g - a);
2553
- }
2554
- return f.e = o, f.c = m, f;
2555
- };
2556
- }(), E.sum = function() {
2557
- for (var e = 1, t = arguments, r = new E(t[0]); e < t.length; ) r = r.plus(t[e++]);
2558
- return r;
2559
- }, G = /* @__PURE__ */ function() {
2560
- var e = "0123456789";
2561
- function t(r, c, u, o) {
2562
- for (var l, i = [0], a, m = 0, f = r.length; m < f; ) {
2563
- for (a = i.length; a--; i[a] *= c) ;
2564
- for (i[0] += o.indexOf(r.charAt(m++)), l = 0; l < i.length; l++)
2565
- i[l] > u - 1 && (i[l + 1] == null && (i[l + 1] = 0), i[l + 1] += i[l] / u | 0, i[l] %= u);
2566
- }
2567
- return i.reverse();
2568
- }
2569
- return function(r, c, u, o, l) {
2570
- var i, a, m, f, b, D, F, oe, fe = r.indexOf("."), he = se, ne = z;
2571
- for (fe >= 0 && (f = be, be = 0, r = r.replace(".", ""), oe = new E(c), D = oe.pow(r.length - fe), be = f, oe.c = t(
2572
- X(O(D.c), D.e, "0"),
2573
- 10,
2574
- u,
2575
- e
2576
- ), oe.e = oe.c.length), F = t(r, c, u, l ? (i = Ne, e) : (i = e, Ne)), m = f = F.length; F[--f] == 0; F.pop()) ;
2577
- if (!F[0]) return i.charAt(0);
2578
- if (fe < 0 ? --m : (D.c = F, D.e = m, D.s = o, D = A(D, oe, he, ne, u), F = D.c, b = D.r, m = D.e), a = m + he + 1, fe = F[a], f = u / 2, b = b || a < 0 || F[a + 1] != null, b = ne < 4 ? (fe != null || b) && (ne == 0 || ne == (D.s < 0 ? 3 : 2)) : fe > f || fe == f && (ne == 4 || b || ne == 6 && F[a - 1] & 1 || ne == (D.s < 0 ? 8 : 7)), a < 1 || !F[0])
2579
- r = b ? X(i.charAt(1), -he, i.charAt(0)) : i.charAt(0);
2580
- else {
2581
- if (F.length = a, b)
2582
- for (--u; ++F[--a] > u; )
2583
- F[a] = 0, a || (++m, F = [1].concat(F));
2584
- for (f = F.length; !F[--f]; ) ;
2585
- for (fe = 0, r = ""; fe <= f; r += i.charAt(F[fe++])) ;
2586
- r = X(r, m, i.charAt(0));
2587
- }
2588
- return r;
2589
- };
2590
- }(), A = /* @__PURE__ */ function() {
2591
- function e(c, u, o) {
2592
- var l, i, a, m, f = 0, b = c.length, D = u % C, F = u / C | 0;
2593
- for (c = c.slice(); b--; )
2594
- a = c[b] % C, m = c[b] / C | 0, l = F * a + m * D, i = D * a + l % C * C + f, f = (i / o | 0) + (l / C | 0) + F * m, c[b] = i % o;
2595
- return f && (c = [f].concat(c)), c;
2596
- }
2597
- function t(c, u, o, l) {
2598
- var i, a;
2599
- if (o != l)
2600
- a = o > l ? 1 : -1;
2601
- else
2602
- for (i = a = 0; i < o; i++)
2603
- if (c[i] != u[i]) {
2604
- a = c[i] > u[i] ? 1 : -1;
2605
- break;
2606
- }
2607
- return a;
2608
- }
2609
- function r(c, u, o, l) {
2610
- for (var i = 0; o--; )
2611
- c[o] -= i, i = c[o] < u[o] ? 1 : 0, c[o] = i * l + c[o] - u[o];
2612
- for (; !c[0] && c.length > 1; c.splice(0, 1)) ;
2613
- }
2614
- return function(c, u, o, l, i) {
2615
- var a, m, f, b, D, F, oe, fe, he, ne, ae, xe, Qe, ft, pt, Le, Ge, Ee = c.s == u.s ? 1 : -1, Ce = c.c, pe = u.c;
2616
- if (!Ce || !Ce[0] || !pe || !pe[0])
2617
- return new E(
2618
- // Return NaN if either NaN, or both Infinity or 0.
2619
- !c.s || !u.s || (Ce ? pe && Ce[0] == pe[0] : !pe) ? NaN : (
2620
- // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
2621
- Ce && Ce[0] == 0 || !pe ? Ee * 0 : Ee / 0
2622
- )
2623
- );
2624
- for (fe = new E(Ee), he = fe.c = [], m = c.e - u.e, Ee = o + m + 1, i || (i = M, m = T(c.e / g) - T(u.e / g), Ee = Ee / g | 0), f = 0; pe[f] == (Ce[f] || 0); f++) ;
2625
- if (pe[f] > (Ce[f] || 0) && m--, Ee < 0)
2626
- he.push(1), b = !0;
2627
- else {
2628
- for (ft = Ce.length, Le = pe.length, f = 0, Ee += 2, D = w(i / (pe[0] + 1)), D > 1 && (pe = e(pe, D, i), Ce = e(Ce, D, i), Le = pe.length, ft = Ce.length), Qe = Le, ne = Ce.slice(0, Le), ae = ne.length; ae < Le; ne[ae++] = 0) ;
2629
- Ge = pe.slice(), Ge = [0].concat(Ge), pt = pe[0], pe[1] >= i / 2 && pt++;
2630
- do {
2631
- if (D = 0, a = t(pe, ne, Le, ae), a < 0) {
2632
- if (xe = ne[0], Le != ae && (xe = xe * i + (ne[1] || 0)), D = w(xe / pt), D > 1)
2633
- for (D >= i && (D = i - 1), F = e(pe, D, i), oe = F.length, ae = ne.length; t(F, ne, oe, ae) == 1; )
2634
- D--, r(F, Le < oe ? Ge : pe, oe, i), oe = F.length, a = 1;
2635
- else
2636
- D == 0 && (a = D = 1), F = pe.slice(), oe = F.length;
2637
- if (oe < ae && (F = [0].concat(F)), r(ne, F, ae, i), ae = ne.length, a == -1)
2638
- for (; t(pe, ne, Le, ae) < 1; )
2639
- D++, r(ne, Le < ae ? Ge : pe, ae, i), ae = ne.length;
2640
- } else a === 0 && (D++, ne = [0]);
2641
- he[f++] = D, ne[0] ? ne[ae++] = Ce[Qe] || 0 : (ne = [Ce[Qe]], ae = 1);
2642
- } while ((Qe++ < ft || ne[0] != null) && Ee--);
2643
- b = ne[0] != null, he[0] || he.splice(0, 1);
2644
- }
2645
- if (i == M) {
2646
- for (f = 1, Ee = he[0]; Ee >= 10; Ee /= 10, f++) ;
2647
- W(fe, o + (fe.e = f + m * g - 1) + 1, l, b);
2648
- } else
2649
- fe.e = m, fe.r = +b;
2650
- return fe;
2651
- };
2652
- }();
2653
- function Ue(e, t, r, c) {
2654
- var u, o, l, i, a;
2655
- if (r == null ? r = z : I(r, 0, 8), !e.c) return e.toString();
2656
- if (u = e.c[0], l = e.e, t == null)
2657
- a = O(e.c), a = c == 1 || c == 2 && (l <= ce || l >= ue) ? J(a, l) : X(a, l, "0");
2658
- else if (e = W(new E(e), t, r), o = e.e, a = O(e.c), i = a.length, c == 1 || c == 2 && (t <= o || o <= ce)) {
2659
- for (; i < t; a += "0", i++) ;
2660
- a = J(a, o);
2661
- } else if (t -= l + (c === 2 && o > l), a = X(a, o, "0"), o + 1 > i) {
2662
- if (--t > 0) for (a += "."; t--; a += "0") ;
2663
- } else if (t += o - i, t > 0)
2664
- for (o + 1 == i && (a += "."); t--; a += "0") ;
2665
- return e.s < 0 && u ? "-" + a : a;
2666
- }
2667
- function Be(e, t) {
2668
- for (var r, c, u = 1, o = new E(e[0]); u < e.length; u++)
2669
- c = new E(e[u]), (!c.s || (r = V(o, c)) === t || r === 0 && o.s === t) && (o = c);
2670
- return o;
2671
- }
2672
- function Me(e, t, r) {
2673
- for (var c = 1, u = t.length; !t[--u]; t.pop()) ;
2674
- for (u = t[0]; u >= 10; u /= 10, c++) ;
2675
- return (r = c + r * g - 1) > ve ? e.c = e.e = null : r < ke ? e.c = [e.e = 0] : (e.e = r, e.c = t), e;
2676
- }
2677
- te = /* @__PURE__ */ function() {
2678
- var e = /^(-?)0([xbo])(?=\w[\w.]*$)/i, t = /^([^.]+)\.$/, r = /^\.([^.]+)$/, c = /^-?(Infinity|NaN)$/, u = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
2679
- return function(o, l, i, a) {
2680
- var m, f = i ? l : l.replace(u, "");
2681
- if (c.test(f))
2682
- o.s = isNaN(f) ? null : f < 0 ? -1 : 1;
2683
- else {
2684
- if (!i && (f = f.replace(e, function(b, D, F) {
2685
- return m = (F = F.toLowerCase()) == "x" ? 16 : F == "b" ? 2 : 8, !a || a == m ? D : b;
2686
- }), a && (m = a, f = f.replace(t, "$1").replace(r, "0.$1")), l != f))
2687
- return new E(f, m);
2688
- if (E.DEBUG)
2689
- throw Error(N + "Not a" + (a ? " base " + a : "") + " number: " + l);
2690
- o.s = null;
2691
- }
2692
- o.c = o.e = null;
2693
- };
2694
- }();
2695
- function W(e, t, r, c) {
2696
- var u, o, l, i, a, m, f, b = e.c, D = L;
2697
- if (b) {
2698
- e: {
2699
- for (u = 1, i = b[0]; i >= 10; i /= 10, u++) ;
2700
- if (o = t - u, o < 0)
2701
- o += g, l = t, a = b[m = 0], f = w(a / D[u - l - 1] % 10);
2702
- else if (m = h((o + 1) / g), m >= b.length)
2703
- if (c) {
2704
- for (; b.length <= m; b.push(0)) ;
2705
- a = f = 0, u = 1, o %= g, l = o - g + 1;
2706
- } else
2707
- break e;
2708
- else {
2709
- for (a = i = b[m], u = 1; i >= 10; i /= 10, u++) ;
2710
- o %= g, l = o - g + u, f = l < 0 ? 0 : w(a / D[u - l - 1] % 10);
2711
- }
2712
- if (c = c || t < 0 || // Are there any non-zero digits after the rounding digit?
2713
- // The expression n % pows10[d - j - 1] returns all digits of n to the right
2714
- // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
2715
- b[m + 1] != null || (l < 0 ? a : a % D[u - l - 1]), c = r < 4 ? (f || c) && (r == 0 || r == (e.s < 0 ? 3 : 2)) : f > 5 || f == 5 && (r == 4 || c || r == 6 && // Check whether the digit to the left of the rounding digit is odd.
2716
- (o > 0 ? l > 0 ? a / D[u - l] : 0 : b[m - 1]) % 10 & 1 || r == (e.s < 0 ? 8 : 7)), t < 1 || !b[0])
2717
- return b.length = 0, c ? (t -= e.e + 1, b[0] = D[(g - t % g) % g], e.e = -t || 0) : b[0] = e.e = 0, e;
2718
- if (o == 0 ? (b.length = m, i = 1, m--) : (b.length = m + 1, i = D[g - o], b[m] = l > 0 ? w(a / D[u - l] % D[l]) * i : 0), c)
2719
- for (; ; )
2720
- if (m == 0) {
2721
- for (o = 1, l = b[0]; l >= 10; l /= 10, o++) ;
2722
- for (l = b[0] += i, i = 1; l >= 10; l /= 10, i++) ;
2723
- o != i && (e.e++, b[0] == M && (b[0] = 1));
2724
- break;
2725
- } else {
2726
- if (b[m] += i, b[m] != M) break;
2727
- b[m--] = 0, i = 1;
2728
- }
2729
- for (o = b.length; b[--o] === 0; b.pop()) ;
2730
- }
2731
- e.e > ve ? e.c = e.e = null : e.e < ke && (e.c = [e.e = 0]);
2732
- }
2733
- return e;
2734
- }
2735
- function B(e) {
2736
- var t, r = e.e;
2737
- return r === null ? e.toString() : (t = O(e.c), t = r <= ce || r >= ue ? J(t, r) : X(t, r, "0"), e.s < 0 ? "-" + t : t);
2738
- }
2739
- return S.absoluteValue = S.abs = function() {
2740
- var e = new E(this);
2741
- return e.s < 0 && (e.s = 1), e;
2742
- }, S.comparedTo = function(e, t) {
2743
- return V(this, new E(e, t));
2744
- }, S.decimalPlaces = S.dp = function(e, t) {
2745
- var r, c, u, o = this;
2746
- if (e != null)
2747
- return I(e, 0, H), t == null ? t = z : I(t, 0, 8), W(new E(o), e + o.e + 1, t);
2748
- if (!(r = o.c)) return null;
2749
- if (c = ((u = r.length - 1) - T(this.e / g)) * g, u = r[u]) for (; u % 10 == 0; u /= 10, c--) ;
2750
- return c < 0 && (c = 0), c;
2751
- }, S.dividedBy = S.div = function(e, t) {
2752
- return A(this, new E(e, t), se, z);
2753
- }, S.dividedToIntegerBy = S.idiv = function(e, t) {
2754
- return A(this, new E(e, t), 0, 1);
2755
- }, S.exponentiatedBy = S.pow = function(e, t) {
2756
- var r, c, u, o, l, i, a, m, f, b = this;
2757
- if (e = new E(e), e.c && !e.isInteger())
2758
- throw Error(N + "Exponent not an integer: " + B(e));
2759
- if (t != null && (t = new E(t)), i = e.e > 14, !b.c || !b.c[0] || b.c[0] == 1 && !b.e && b.c.length == 1 || !e.c || !e.c[0])
2760
- return f = new E(Math.pow(+B(b), i ? e.s * (2 - Q(e)) : +B(e))), t ? f.mod(t) : f;
2761
- if (a = e.s < 0, t) {
2762
- if (t.c ? !t.c[0] : !t.s) return new E(NaN);
2763
- c = !a && b.isInteger() && t.isInteger(), c && (b = b.mod(t));
2764
- } else {
2765
- if (e.e > 9 && (b.e > 0 || b.e < -1 || (b.e == 0 ? b.c[0] > 1 || i && b.c[1] >= 24e7 : b.c[0] < 8e13 || i && b.c[0] <= 9999975e7)))
2766
- return o = b.s < 0 && Q(e) ? -0 : 0, b.e > -1 && (o = 1 / o), new E(a ? 1 / o : o);
2767
- be && (o = h(be / g + 2));
2768
- }
2769
- for (i ? (r = new E(0.5), a && (e.s = 1), m = Q(e)) : (u = Math.abs(+B(e)), m = u % 2), f = new E(re); ; ) {
2770
- if (m) {
2771
- if (f = f.times(b), !f.c) break;
2772
- o ? f.c.length > o && (f.c.length = o) : c && (f = f.mod(t));
2773
- }
2774
- if (u) {
2775
- if (u = w(u / 2), u === 0) break;
2776
- m = u % 2;
2777
- } else if (e = e.times(r), W(e, e.e + 1, 1), e.e > 14)
2778
- m = Q(e);
2779
- else {
2780
- if (u = +B(e), u === 0) break;
2781
- m = u % 2;
2782
- }
2783
- b = b.times(b), o ? b.c && b.c.length > o && (b.c.length = o) : c && (b = b.mod(t));
2784
- }
2785
- return c ? f : (a && (f = re.div(f)), t ? f.mod(t) : o ? W(f, be, z, l) : f);
2786
- }, S.integerValue = function(e) {
2787
- var t = new E(this);
2788
- return e == null ? e = z : I(e, 0, 8), W(t, t.e + 1, e);
2789
- }, S.isEqualTo = S.eq = function(e, t) {
2790
- return V(this, new E(e, t)) === 0;
2791
- }, S.isFinite = function() {
2792
- return !!this.c;
2793
- }, S.isGreaterThan = S.gt = function(e, t) {
2794
- return V(this, new E(e, t)) > 0;
2795
- }, S.isGreaterThanOrEqualTo = S.gte = function(e, t) {
2796
- return (t = V(this, new E(e, t))) === 1 || t === 0;
2797
- }, S.isInteger = function() {
2798
- return !!this.c && T(this.e / g) > this.c.length - 2;
2799
- }, S.isLessThan = S.lt = function(e, t) {
2800
- return V(this, new E(e, t)) < 0;
2801
- }, S.isLessThanOrEqualTo = S.lte = function(e, t) {
2802
- return (t = V(this, new E(e, t))) === -1 || t === 0;
2803
- }, S.isNaN = function() {
2804
- return !this.s;
2805
- }, S.isNegative = function() {
2806
- return this.s < 0;
2807
- }, S.isPositive = function() {
2808
- return this.s > 0;
2809
- }, S.isZero = function() {
2810
- return !!this.c && this.c[0] == 0;
2811
- }, S.minus = function(e, t) {
2812
- var r, c, u, o, l = this, i = l.s;
2813
- if (e = new E(e, t), t = e.s, !i || !t) return new E(NaN);
2814
- if (i != t)
2815
- return e.s = -t, l.plus(e);
2816
- var a = l.e / g, m = e.e / g, f = l.c, b = e.c;
2817
- if (!a || !m) {
2818
- if (!f || !b) return f ? (e.s = -t, e) : new E(b ? l : NaN);
2819
- if (!f[0] || !b[0])
2820
- return b[0] ? (e.s = -t, e) : new E(f[0] ? l : (
2821
- // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
2822
- z == 3 ? -0 : 0
2823
- ));
2824
- }
2825
- if (a = T(a), m = T(m), f = f.slice(), i = a - m) {
2826
- for ((o = i < 0) ? (i = -i, u = f) : (m = a, u = b), u.reverse(), t = i; t--; u.push(0)) ;
2827
- u.reverse();
2828
- } else
2829
- for (c = (o = (i = f.length) < (t = b.length)) ? i : t, i = t = 0; t < c; t++)
2830
- if (f[t] != b[t]) {
2831
- o = f[t] < b[t];
2832
- break;
2833
- }
2834
- if (o && (u = f, f = b, b = u, e.s = -e.s), t = (c = b.length) - (r = f.length), t > 0) for (; t--; f[r++] = 0) ;
2835
- for (t = M - 1; c > i; ) {
2836
- if (f[--c] < b[c]) {
2837
- for (r = c; r && !f[--r]; f[r] = t) ;
2838
- --f[r], f[c] += M;
2839
- }
2840
- f[c] -= b[c];
2841
- }
2842
- for (; f[0] == 0; f.splice(0, 1), --m) ;
2843
- return f[0] ? Me(e, f, m) : (e.s = z == 3 ? -1 : 1, e.c = [e.e = 0], e);
2844
- }, S.modulo = S.mod = function(e, t) {
2845
- var r, c, u = this;
2846
- return e = new E(e, t), !u.c || !e.s || e.c && !e.c[0] ? new E(NaN) : !e.c || u.c && !u.c[0] ? new E(u) : (ge == 9 ? (c = e.s, e.s = 1, r = A(u, e, 0, 3), e.s = c, r.s *= c) : r = A(u, e, 0, ge), e = u.minus(r.times(e)), !e.c[0] && ge == 1 && (e.s = u.s), e);
2847
- }, S.multipliedBy = S.times = function(e, t) {
2848
- var r, c, u, o, l, i, a, m, f, b, D, F, oe, fe, he, ne = this, ae = ne.c, xe = (e = new E(e, t)).c;
2849
- if (!ae || !xe || !ae[0] || !xe[0])
2850
- return !ne.s || !e.s || ae && !ae[0] && !xe || xe && !xe[0] && !ae ? e.c = e.e = e.s = null : (e.s *= ne.s, !ae || !xe ? e.c = e.e = null : (e.c = [0], e.e = 0)), e;
2851
- for (c = T(ne.e / g) + T(e.e / g), e.s *= ne.s, a = ae.length, b = xe.length, a < b && (oe = ae, ae = xe, xe = oe, u = a, a = b, b = u), u = a + b, oe = []; u--; oe.push(0)) ;
2852
- for (fe = M, he = C, u = b; --u >= 0; ) {
2853
- for (r = 0, D = xe[u] % he, F = xe[u] / he | 0, l = a, o = u + l; o > u; )
2854
- m = ae[--l] % he, f = ae[l] / he | 0, i = F * m + f * D, m = D * m + i % he * he + oe[o] + r, r = (m / fe | 0) + (i / he | 0) + F * f, oe[o--] = m % fe;
2855
- oe[o] = r;
2856
- }
2857
- return r ? ++c : oe.splice(0, 1), Me(e, oe, c);
2858
- }, S.negated = function() {
2859
- var e = new E(this);
2860
- return e.s = -e.s || null, e;
2861
- }, S.plus = function(e, t) {
2862
- var r, c = this, u = c.s;
2863
- if (e = new E(e, t), t = e.s, !u || !t) return new E(NaN);
2864
- if (u != t)
2865
- return e.s = -t, c.minus(e);
2866
- var o = c.e / g, l = e.e / g, i = c.c, a = e.c;
2867
- if (!o || !l) {
2868
- if (!i || !a) return new E(u / 0);
2869
- if (!i[0] || !a[0]) return a[0] ? e : new E(i[0] ? c : u * 0);
2870
- }
2871
- if (o = T(o), l = T(l), i = i.slice(), u = o - l) {
2872
- for (u > 0 ? (l = o, r = a) : (u = -u, r = i), r.reverse(); u--; r.push(0)) ;
2873
- r.reverse();
2874
- }
2875
- for (u = i.length, t = a.length, u - t < 0 && (r = a, a = i, i = r, t = u), u = 0; t; )
2876
- u = (i[--t] = i[t] + a[t] + u) / M | 0, i[t] = M === i[t] ? 0 : i[t] % M;
2877
- return u && (i = [u].concat(i), ++l), Me(e, i, l);
2878
- }, S.precision = S.sd = function(e, t) {
2879
- var r, c, u, o = this;
2880
- if (e != null && e !== !!e)
2881
- return I(e, 1, H), t == null ? t = z : I(t, 0, 8), W(new E(o), e, t);
2882
- if (!(r = o.c)) return null;
2883
- if (u = r.length - 1, c = u * g + 1, u = r[u]) {
2884
- for (; u % 10 == 0; u /= 10, c--) ;
2885
- for (u = r[0]; u >= 10; u /= 10, c++) ;
2886
- }
2887
- return e && o.e + 1 > c && (c = o.e + 1), c;
2888
- }, S.shiftedBy = function(e) {
2889
- return I(e, -x, x), this.times("1e" + e);
2890
- }, S.squareRoot = S.sqrt = function() {
2891
- var e, t, r, c, u, o = this, l = o.c, i = o.s, a = o.e, m = se + 4, f = new E("0.5");
2892
- if (i !== 1 || !l || !l[0])
2893
- return new E(!i || i < 0 && (!l || l[0]) ? NaN : l ? o : 1 / 0);
2894
- if (i = Math.sqrt(+B(o)), i == 0 || i == 1 / 0 ? (t = O(l), (t.length + a) % 2 == 0 && (t += "0"), i = Math.sqrt(+t), a = T((a + 1) / 2) - (a < 0 || a % 2), i == 1 / 0 ? t = "5e" + a : (t = i.toExponential(), t = t.slice(0, t.indexOf("e") + 1) + a), r = new E(t)) : r = new E(i + ""), r.c[0]) {
2895
- for (a = r.e, i = a + m, i < 3 && (i = 0); ; )
2896
- if (u = r, r = f.times(u.plus(A(o, u, m, 1))), O(u.c).slice(0, i) === (t = O(r.c)).slice(0, i))
2897
- if (r.e < a && --i, t = t.slice(i - 3, i + 1), t == "9999" || !c && t == "4999") {
2898
- if (!c && (W(u, u.e + se + 2, 0), u.times(u).eq(o))) {
2899
- r = u;
2900
- break;
2901
- }
2902
- m += 4, i += 4, c = 1;
2903
- } else {
2904
- (!+t || !+t.slice(1) && t.charAt(0) == "5") && (W(r, r.e + se + 2, 1), e = !r.times(r).eq(o));
2905
- break;
2906
- }
2907
- }
2908
- return W(r, r.e + se + 1, z, e);
2909
- }, S.toExponential = function(e, t) {
2910
- return e != null && (I(e, 0, H), e++), Ue(this, e, t, 1);
2911
- }, S.toFixed = function(e, t) {
2912
- return e != null && (I(e, 0, H), e = e + this.e + 1), Ue(this, e, t);
2913
- }, S.toFormat = function(e, t, r) {
2914
- var c, u = this;
2915
- if (r == null)
2916
- e != null && t && typeof t == "object" ? (r = t, t = null) : e && typeof e == "object" ? (r = e, e = t = null) : r = Te;
2917
- else if (typeof r != "object")
2918
- throw Error(N + "Argument not an object: " + r);
2919
- if (c = u.toFixed(e, t), u.c) {
2920
- var o, l = c.split("."), i = +r.groupSize, a = +r.secondaryGroupSize, m = r.groupSeparator || "", f = l[0], b = l[1], D = u.s < 0, F = D ? f.slice(1) : f, oe = F.length;
2921
- if (a && (o = i, i = a, a = o, oe -= o), i > 0 && oe > 0) {
2922
- for (o = oe % i || i, f = F.substr(0, o); o < oe; o += i) f += m + F.substr(o, i);
2923
- a > 0 && (f += m + F.slice(o)), D && (f = "-" + f);
2924
- }
2925
- c = b ? f + (r.decimalSeparator || "") + ((a = +r.fractionGroupSize) ? b.replace(
2926
- new RegExp("\\d{" + a + "}\\B", "g"),
2927
- "$&" + (r.fractionGroupSeparator || "")
2928
- ) : b) : f;
2929
- }
2930
- return (r.prefix || "") + c + (r.suffix || "");
2931
- }, S.toFraction = function(e) {
2932
- var t, r, c, u, o, l, i, a, m, f, b, D, F = this, oe = F.c;
2933
- if (e != null && (i = new E(e), !i.isInteger() && (i.c || i.s !== 1) || i.lt(re)))
2934
- throw Error(N + "Argument " + (i.isInteger() ? "out of range: " : "not an integer: ") + B(i));
2935
- if (!oe) return new E(F);
2936
- for (t = new E(re), m = r = new E(re), c = a = new E(re), D = O(oe), o = t.e = D.length - F.e - 1, t.c[0] = L[(l = o % g) < 0 ? g + l : l], e = !e || i.comparedTo(t) > 0 ? o > 0 ? t : m : i, l = ve, ve = 1 / 0, i = new E(D), a.c[0] = 0; f = A(i, t, 0, 1), u = r.plus(f.times(c)), u.comparedTo(e) != 1; )
2937
- r = c, c = u, m = a.plus(f.times(u = m)), a = u, t = i.minus(f.times(u = t)), i = u;
2938
- return u = A(e.minus(r), c, 0, 1), a = a.plus(u.times(m)), r = r.plus(u.times(c)), a.s = m.s = F.s, o = o * 2, b = A(m, c, o, z).minus(F).abs().comparedTo(
2939
- A(a, r, o, z).minus(F).abs()
2940
- ) < 1 ? [m, c] : [a, r], ve = l, b;
2941
- }, S.toNumber = function() {
2942
- return +B(this);
2943
- }, S.toPrecision = function(e, t) {
2944
- return e != null && I(e, 1, H), Ue(this, e, t, 2);
2945
- }, S.toString = function(e) {
2946
- var t, r = this, c = r.s, u = r.e;
2947
- return u === null ? c ? (t = "Infinity", c < 0 && (t = "-" + t)) : t = "NaN" : (e == null ? t = u <= ce || u >= ue ? J(O(r.c), u) : X(O(r.c), u, "0") : e === 10 && Oe ? (r = W(new E(r), se + u + 1, z), t = X(O(r.c), r.e, "0")) : (I(e, 2, Ne.length, "Base"), t = G(X(O(r.c), u, "0"), 10, e, c, !0)), c < 0 && r.c[0] && (t = "-" + t)), t;
2948
- }, S.valueOf = S.toJSON = function() {
2949
- return B(this);
2950
- }, S._isBigNumber = !0, U != null && E.set(U), E;
2951
- }
2952
- function T(U) {
2953
- var A = U | 0;
2954
- return U > 0 || U === A ? A : A - 1;
2955
- }
2956
- function O(U) {
2957
- for (var A, G, te = 1, S = U.length, re = U[0] + ""; te < S; ) {
2958
- for (A = U[te++] + "", G = g - A.length; G--; A = "0" + A) ;
2959
- re += A;
2960
- }
2961
- for (S = re.length; re.charCodeAt(--S) === 48; ) ;
2962
- return re.slice(0, S + 1 || 1);
2963
- }
2964
- function V(U, A) {
2965
- var G, te, S = U.c, re = A.c, se = U.s, z = A.s, ce = U.e, ue = A.e;
2966
- if (!se || !z) return null;
2967
- if (G = S && !S[0], te = re && !re[0], G || te) return G ? te ? 0 : -z : se;
2968
- if (se != z) return se;
2969
- if (G = se < 0, te = ce == ue, !S || !re) return te ? 0 : !S ^ G ? 1 : -1;
2970
- if (!te) return ce > ue ^ G ? 1 : -1;
2971
- for (z = (ce = S.length) < (ue = re.length) ? ce : ue, se = 0; se < z; se++) if (S[se] != re[se]) return S[se] > re[se] ^ G ? 1 : -1;
2972
- return ce == ue ? 0 : ce > ue ^ G ? 1 : -1;
2973
- }
2974
- function I(U, A, G, te) {
2975
- if (U < A || U > G || U !== w(U))
2976
- throw Error(N + (te || "Argument") + (typeof U == "number" ? U < A || U > G ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(U));
2977
- }
2978
- function Q(U) {
2979
- var A = U.c.length - 1;
2980
- return T(U.e / g) == A && U.c[A] % 2 != 0;
2981
- }
2982
- function J(U, A) {
2983
- return (U.length > 1 ? U.charAt(0) + "." + U.slice(1) : U) + (A < 0 ? "e" : "e+") + A;
2984
- }
2985
- function X(U, A, G) {
2986
- var te, S;
2987
- if (A < 0) {
2988
- for (S = G + "."; ++A; S += G) ;
2989
- U = S + U;
2990
- } else if (te = U.length, ++A > te) {
2991
- for (S = G, A -= te; --A; S += G) ;
2992
- U += S;
2993
- } else A < te && (U = U.slice(0, A) + "." + U.slice(A));
2994
- return U;
2995
- }
2996
- v = Z(), v.default = v.BigNumber = v, n.exports ? n.exports = v : (d || (d = typeof self < "u" && self ? self : window), d.BigNumber = v);
2997
- })(Wr);
2998
- })(Gt);
2999
- var Kt = Gt.exports;
3000
- (function(n) {
3001
- var d = Kt, v = n.exports;
3002
- (function() {
3003
- var p = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, h, w, N = {
3004
- // table of character substitutions
3005
- "\b": "\\b",
3006
- " ": "\\t",
3007
- "\n": "\\n",
3008
- "\f": "\\f",
3009
- "\r": "\\r",
3010
- '"': '\\"',
3011
- "\\": "\\\\"
3012
- }, _;
3013
- function M(x) {
3014
- return p.lastIndex = 0, p.test(x) ? '"' + x.replace(p, function(L) {
3015
- var C = N[L];
3016
- return typeof C == "string" ? C : "\\u" + ("0000" + L.charCodeAt(0).toString(16)).slice(-4);
3017
- }) + '"' : '"' + x + '"';
3018
- }
3019
- function g(x, L) {
3020
- var C, H, Z, T, O = h, V, I = L[x], Q = I != null && (I instanceof d || d.isBigNumber(I));
3021
- switch (I && typeof I == "object" && typeof I.toJSON == "function" && (I = I.toJSON(x)), typeof _ == "function" && (I = _.call(L, x, I)), typeof I) {
3022
- case "string":
3023
- return Q ? I : M(I);
3024
- case "number":
3025
- return isFinite(I) ? String(I) : "null";
3026
- case "boolean":
3027
- case "null":
3028
- case "bigint":
3029
- return String(I);
3030
- case "object":
3031
- if (!I)
3032
- return "null";
3033
- if (h += w, V = [], Object.prototype.toString.apply(I) === "[object Array]") {
3034
- for (T = I.length, C = 0; C < T; C += 1)
3035
- V[C] = g(C, I) || "null";
3036
- return Z = V.length === 0 ? "[]" : h ? `[
3037
- ` + h + V.join(`,
3038
- ` + h) + `
3039
- ` + O + "]" : "[" + V.join(",") + "]", h = O, Z;
3040
- }
3041
- if (_ && typeof _ == "object")
3042
- for (T = _.length, C = 0; C < T; C += 1)
3043
- typeof _[C] == "string" && (H = _[C], Z = g(H, I), Z && V.push(M(H) + (h ? ": " : ":") + Z));
3044
- else
3045
- Object.keys(I).forEach(function(J) {
3046
- var X = g(J, I);
3047
- X && V.push(M(J) + (h ? ": " : ":") + X);
3048
- });
3049
- return Z = V.length === 0 ? "{}" : h ? `{
3050
- ` + h + V.join(`,
3051
- ` + h) + `
3052
- ` + O + "}" : "{" + V.join(",") + "}", h = O, Z;
3053
- }
3054
- }
3055
- typeof v.stringify != "function" && (v.stringify = function(x, L, C) {
3056
- var H;
3057
- if (h = "", w = "", typeof C == "number")
3058
- for (H = 0; H < C; H += 1)
3059
- w += " ";
3060
- else typeof C == "string" && (w = C);
3061
- if (_ = L, L && typeof L != "function" && (typeof L != "object" || typeof L.length != "number"))
3062
- throw new Error("JSON.stringify");
3063
- return g("", { "": x });
3064
- });
3065
- })();
3066
- })(qt);
3067
- var Yr = qt.exports, st = null;
3068
- const Jr = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/, Zr = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;
3069
- var Qr = function(n) {
3070
- var d = {
3071
- strict: !1,
3072
- // not being strict means do not generate syntax errors for "duplicate key"
3073
- storeAsString: !1,
3074
- // toggles whether the values should be stored as BigNumber (default) or a string
3075
- alwaysParseAsBig: !1,
3076
- // toggles whether all numbers should be Big
3077
- useNativeBigInt: !1,
3078
- // toggles whether to use native BigInt instead of bignumber.js
3079
- protoAction: "error",
3080
- constructorAction: "error"
3081
- };
3082
- if (n != null) {
3083
- if (n.strict === !0 && (d.strict = !0), n.storeAsString === !0 && (d.storeAsString = !0), d.alwaysParseAsBig = n.alwaysParseAsBig === !0 ? n.alwaysParseAsBig : !1, d.useNativeBigInt = n.useNativeBigInt === !0 ? n.useNativeBigInt : !1, typeof n.constructorAction < "u")
3084
- if (n.constructorAction === "error" || n.constructorAction === "ignore" || n.constructorAction === "preserve")
3085
- d.constructorAction = n.constructorAction;
3086
- else
3087
- throw new Error(
3088
- `Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${n.constructorAction}`
3089
- );
3090
- if (typeof n.protoAction < "u")
3091
- if (n.protoAction === "error" || n.protoAction === "ignore" || n.protoAction === "preserve")
3092
- d.protoAction = n.protoAction;
3093
- else
3094
- throw new Error(
3095
- `Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${n.protoAction}`
3096
- );
3097
- }
3098
- var v, p, h = {
3099
- '"': '"',
3100
- "\\": "\\",
3101
- "/": "/",
3102
- b: "\b",
3103
- f: "\f",
3104
- n: `
3105
- `,
3106
- r: "\r",
3107
- t: " "
3108
- }, w, N = function(T) {
3109
- throw {
3110
- name: "SyntaxError",
3111
- message: T,
3112
- at: v,
3113
- text: w
3114
- };
3115
- }, _ = function(T) {
3116
- return T && T !== p && N("Expected '" + T + "' instead of '" + p + "'"), p = w.charAt(v), v += 1, p;
3117
- }, M = function() {
3118
- var T, O = "";
3119
- for (p === "-" && (O = "-", _("-")); p >= "0" && p <= "9"; )
3120
- O += p, _();
3121
- if (p === ".")
3122
- for (O += "."; _() && p >= "0" && p <= "9"; )
3123
- O += p;
3124
- if (p === "e" || p === "E")
3125
- for (O += p, _(), (p === "-" || p === "+") && (O += p, _()); p >= "0" && p <= "9"; )
3126
- O += p, _();
3127
- if (T = +O, !isFinite(T))
3128
- N("Bad number");
3129
- else
3130
- return st == null && (st = Kt), O.length > 15 ? d.storeAsString ? O : d.useNativeBigInt ? BigInt(O) : new st(O) : d.alwaysParseAsBig ? d.useNativeBigInt ? BigInt(T) : new st(T) : T;
3131
- }, g = function() {
3132
- var T, O, V = "", I;
3133
- if (p === '"')
3134
- for (var Q = v; _(); ) {
3135
- if (p === '"')
3136
- return v - 1 > Q && (V += w.substring(Q, v - 1)), _(), V;
3137
- if (p === "\\") {
3138
- if (v - 1 > Q && (V += w.substring(Q, v - 1)), _(), p === "u") {
3139
- for (I = 0, O = 0; O < 4 && (T = parseInt(_(), 16), !!isFinite(T)); O += 1)
3140
- I = I * 16 + T;
3141
- V += String.fromCharCode(I);
3142
- } else if (typeof h[p] == "string")
3143
- V += h[p];
3144
- else
3145
- break;
3146
- Q = v;
3147
- }
3148
- }
3149
- N("Bad string");
3150
- }, x = function() {
3151
- for (; p && p <= " "; )
3152
- _();
3153
- }, L = function() {
3154
- switch (p) {
3155
- case "t":
3156
- return _("t"), _("r"), _("u"), _("e"), !0;
3157
- case "f":
3158
- return _("f"), _("a"), _("l"), _("s"), _("e"), !1;
3159
- case "n":
3160
- return _("n"), _("u"), _("l"), _("l"), null;
3161
- }
3162
- N("Unexpected '" + p + "'");
3163
- }, C, H = function() {
3164
- var T = [];
3165
- if (p === "[") {
3166
- if (_("["), x(), p === "]")
3167
- return _("]"), T;
3168
- for (; p; ) {
3169
- if (T.push(C()), x(), p === "]")
3170
- return _("]"), T;
3171
- _(","), x();
3172
- }
3173
- }
3174
- N("Bad array");
3175
- }, Z = function() {
3176
- var T, O = /* @__PURE__ */ Object.create(null);
3177
- if (p === "{") {
3178
- if (_("{"), x(), p === "}")
3179
- return _("}"), O;
3180
- for (; p; ) {
3181
- if (T = g(), x(), _(":"), d.strict === !0 && Object.hasOwnProperty.call(O, T) && N('Duplicate key "' + T + '"'), Jr.test(T) === !0 ? d.protoAction === "error" ? N("Object contains forbidden prototype property") : d.protoAction === "ignore" ? C() : O[T] = C() : Zr.test(T) === !0 ? d.constructorAction === "error" ? N("Object contains forbidden constructor property") : d.constructorAction === "ignore" ? C() : O[T] = C() : O[T] = C(), x(), p === "}")
3182
- return _("}"), O;
3183
- _(","), x();
3184
- }
3185
- }
3186
- N("Bad object");
3187
- };
3188
- return C = function() {
3189
- switch (x(), p) {
3190
- case "{":
3191
- return Z();
3192
- case "[":
3193
- return H();
3194
- case '"':
3195
- return g();
3196
- case "-":
3197
- return M();
3198
- default:
3199
- return p >= "0" && p <= "9" ? M() : L();
3200
- }
3201
- }, function(T, O) {
3202
- var V;
3203
- return w = T + "", v = 0, p = " ", V = C(), x(), p && N("Syntax error"), typeof O == "function" ? function I(Q, J) {
3204
- var X, U = Q[J];
3205
- return U && typeof U == "object" && Object.keys(U).forEach(function(A) {
3206
- X = I(U, A), X !== void 0 ? U[A] = X : delete U[A];
3207
- }), O.call(Q, J, U);
3208
- }({ "": V }, "") : V;
3209
- };
3210
- }, ea = Qr, Ht = Yr.stringify, Wt = ea;
3211
- dt.exports = function(n) {
3212
- return {
3213
- parse: Wt(n),
3214
- stringify: Ht
3215
- };
3216
- };
3217
- dt.exports.parse = Wt();
3218
- dt.exports.stringify = Ht;
3219
- var ta = dt.exports;
3220
- const sa = /* @__PURE__ */ Xr(ta), na = sa({ storeAsString: !0 });
3221
- let Xt;
3222
- function Qa(n) {
3223
- Xt = n, Re && (Re.defaults.baseURL = n);
3224
- }
3225
- const oa = () => {
3226
- const n = as.create({
3227
- timeout: 3e4,
3228
- headers: {
3229
- "Content-Type": "application/json"
3230
- },
3231
- // 使用 json-bigint 解析响应数据,避免大整数精度丢失
3232
- transformResponse: [
3233
- (d) => {
3234
- if (typeof d == "string")
3235
- try {
3236
- return na.parse(d);
3237
- } catch {
3238
- return d;
3239
- }
3240
- return d;
3241
- }
3242
- ]
3243
- });
3244
- return n.interceptors.request.use(
3245
- (d) => {
3246
- const v = Xt || void 0;
3247
- v && !d.baseURL && (d.baseURL = v);
3248
- const p = ut(), h = hs() || "Bearer";
3249
- return p && (d.headers.Authorization = `${h} ${p}`), d;
3250
- },
3251
- (d) => Promise.reject(d)
3252
- ), n.interceptors.response.use(
3253
- (d) => {
3254
- const { data: v } = d;
3255
- return v.code === 200 || v.code === 0 ? v.data : v.code === 9121 ? (Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login", Promise.reject(new Error(v.message || "EXPIRED OR INVALID TOKEN"))) : (Ie.error(v.message || "请求失败"), Promise.reject(new Error(v.message || "请求失败")));
3256
- },
3257
- (d) => {
3258
- var p;
3259
- const { response: v } = d;
3260
- if (v) {
3261
- const { data: h } = v;
3262
- if ((h == null ? void 0 : h.code) === 9121)
3263
- return Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login", Promise.reject(d);
3264
- switch (v.status) {
3265
- case 401:
3266
- Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login";
3267
- break;
3268
- case 403:
3269
- Ie.error("没有权限访问");
3270
- break;
3271
- case 404:
3272
- Ie.error("请求资源不存在");
3273
- break;
3274
- case 500:
3275
- Ie.error("服务器错误");
3276
- break;
3277
- default:
3278
- Ie.error(((p = v.data) == null ? void 0 : p.message) || "请求失败");
3279
- }
3280
- } else
3281
- Ie.error("网络连接失败");
3282
- return Promise.reject(d);
3283
- }
3284
- ), n;
3285
- }, Re = oa(), de = {
3286
- get(n, d) {
3287
- return Re.get(n, d);
3288
- },
3289
- post(n, d, v) {
3290
- return Re.post(n, d, v);
3291
- },
3292
- put(n, d, v) {
3293
- return Re.put(n, d, v);
3294
- },
3295
- patch(n, d, v) {
3296
- return Re.patch(n, d, v);
3297
- },
3298
- delete(n, d) {
3299
- return Re.delete(n, d);
3300
- },
3301
- // 文件下载 - 返回 Blob 对象
3302
- download(n, d) {
3303
- return Re.get(n, { ...d, responseType: "blob" });
3304
- }
3305
- };
3306
- function ra(n) {
3307
- return de.post("/user/v1.0/login/by-domain", n);
3308
- }
3309
- function el() {
3310
- return de.put("/user/v1.0/user/logout");
3311
- }
3312
- function aa() {
3313
- return de.get("/user/v1.0/user/get-me");
3314
- }
3315
- function tl(n) {
3316
- return de.post("/user/v1.0/refresh", { refreshToken: n });
3317
- }
3318
- const la = { class: "login-page" }, ia = { class: "login-form-section" }, ca = { class: "form-container" }, ua = { class: "input-wrapper" }, da = { class: "input-wrapper" }, fa = { class: "form-options" }, pa = { key: 0 }, ma = { key: 1 }, ha = /* @__PURE__ */ Ae({
3319
- __name: "index",
3320
- setup(n) {
3321
- const d = ze(), v = qe(), p = P(!1), h = P(!1), w = bt({
3322
- uid: "",
3323
- password: ""
3324
- }), N = {
3325
- uid: [
3326
- { required: !0, message: "请输入用户名", trigger: "blur" }
3327
- ],
3328
- password: [
3329
- { required: !0, message: "请输入密码", trigger: "blur" },
3330
- { min: 6, message: "密码长度至少6位", trigger: "blur" }
3331
- ]
3332
- }, _ = P(), M = async () => {
3333
- var g;
3334
- try {
3335
- await ((g = _.value) == null ? void 0 : g.validate()), p.value = !0;
3336
- const x = await ra({
3337
- appId: ct(),
3338
- clientId: Rt(),
3339
- uid: w.uid,
3340
- password: w.password,
3341
- code: !0
3342
- });
3343
- Ft(x), Ie.success("登录成功");
3344
- const L = v.query.redirect || "/";
3345
- d.push(L);
3346
- } catch (x) {
3347
- console.error("登录失败:", x);
3348
- } finally {
3349
- p.value = !1;
3350
- }
3351
- };
3352
- return (g, x) => (y(), $("div", la, [
3353
- x[10] || (x[10] = nt('<div class="login-brand" data-v-15fc7de5><div class="brand-content" data-v-15fc7de5><div class="brand-logo" data-v-15fc7de5><div class="logo-icon" data-v-15fc7de5><svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-15fc7de5><rect width="48" height="48" rx="12" fill="currentColor" data-v-15fc7de5></rect><path d="M14 24L20 30L34 16" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" data-v-15fc7de5></path></svg></div><span class="logo-text" data-v-15fc7de5>XTO</span></div><div class="brand-slogan" data-v-15fc7de5><h1 data-v-15fc7de5>企业级后台管理解决方案</h1><p data-v-15fc7de5>开箱即用的中后台前端/设计解决方案</p></div><div class="brand-features" data-v-15fc7de5><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>高性能</h4><p data-v-15fc7de5>极致的渲染性能与响应速度</p></div></div><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><rect x="3" y="3" width="18" height="18" rx="2" data-v-15fc7de5></rect><path d="M9 9h6M9 12h6M9 15h4" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>丰富组件</h4><p data-v-15fc7de5>60+ 高质量业务组件</p></div></div><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><circle cx="12" cy="12" r="10" data-v-15fc7de5></circle><path d="M12 6v6l4 2" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>持续更新</h4><p data-v-15fc7de5>活跃的社区与快速迭代</p></div></div></div><div class="brand-decoration" data-v-15fc7de5><div class="decoration-line" data-v-15fc7de5></div><div class="decoration-dots" data-v-15fc7de5><span data-v-15fc7de5></span><span data-v-15fc7de5></span><span data-v-15fc7de5></span></div></div></div><div class="brand-bg" data-v-15fc7de5><div class="bg-grid" data-v-15fc7de5></div><div class="bg-glow" data-v-15fc7de5></div><div class="bg-pattern" data-v-15fc7de5></div></div></div>', 1)),
3354
- s("div", ia, [
3355
- s("div", ca, [
3356
- x[7] || (x[7] = s("div", { class: "form-header" }, [
3357
- s("h2", null, "欢迎登录"),
3358
- s("p", null, "请输入您的账户信息")
3359
- ], -1)),
3360
- R(k(os), {
3361
- ref_key: "formRef",
3362
- ref: _,
3363
- model: w,
3364
- rules: N,
3365
- class: "login-form",
3366
- "label-width": "0"
3367
- }, {
3368
- default: Y(() => [
3369
- R(k(mt), { prop: "uid" }, {
3370
- default: Y(() => [
3371
- s("div", ua, [
3372
- x[3] || (x[3] = s("label", { class: "input-label" }, "用户名", -1)),
3373
- R(k(Ot), {
3374
- modelValue: w.uid,
3375
- "onUpdate:modelValue": x[0] || (x[0] = (L) => w.uid = L),
3376
- placeholder: "请输入用户名",
3377
- size: "large"
3378
- }, {
3379
- prefix: Y(() => [
3380
- R(k(ee), {
3381
- name: "user",
3382
- size: 18
3383
- })
3384
- ]),
3385
- _: 1
3386
- }, 8, ["modelValue"])
3387
- ])
3388
- ]),
3389
- _: 1
3390
- }),
3391
- R(k(mt), { prop: "password" }, {
3392
- default: Y(() => [
3393
- s("div", da, [
3394
- x[4] || (x[4] = s("label", { class: "input-label" }, "密码", -1)),
3395
- R(k(Ot), {
3396
- modelValue: w.password,
3397
- "onUpdate:modelValue": x[1] || (x[1] = (L) => w.password = L),
3398
- type: "password",
3399
- placeholder: "请输入密码",
3400
- size: "large",
3401
- "show-password": "",
3402
- onKeyup: ts(M, ["enter"])
3403
- }, {
3404
- prefix: Y(() => [
3405
- R(k(ee), {
3406
- name: "lock",
3407
- size: 18
3408
- })
3409
- ]),
3410
- _: 1
3411
- }, 8, ["modelValue"])
3412
- ])
3413
- ]),
3414
- _: 1
3415
- }),
3416
- s("div", fa, [
3417
- R(k(rs), {
3418
- modelValue: h.value,
3419
- "onUpdate:modelValue": x[2] || (x[2] = (L) => h.value = L)
3420
- }, {
3421
- default: Y(() => [...x[5] || (x[5] = [
3422
- Fe("记住我", -1)
3423
- ])]),
3424
- _: 1
3425
- }, 8, ["modelValue"]),
3426
- x[6] || (x[6] = s("a", {
3427
- href: "#",
3428
- class: "forgot-link"
3429
- }, "忘记密码?", -1))
3430
- ]),
3431
- R(k(mt), null, {
3432
- default: Y(() => [
3433
- R(k(je), {
3434
- type: "primary",
3435
- size: "large",
3436
- loading: p.value,
3437
- class: "login-btn",
3438
- onClick: M
3439
- }, {
3440
- default: Y(() => [
3441
- p.value ? (y(), $("span", ma, "登录中...")) : (y(), $("span", pa, "登 录"))
3442
- ]),
3443
- _: 1
3444
- }, 8, ["loading"])
3445
- ]),
3446
- _: 1
3447
- })
3448
- ]),
3449
- _: 1
3450
- }, 8, ["model"]),
3451
- x[8] || (x[8] = nt('<div class="form-footer" data-v-15fc7de5><p data-v-15fc7de5>其他登录方式</p><div class="social-login" data-v-15fc7de5><button class="social-btn" title="企业微信" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" data-v-15fc7de5></path></svg></button><button class="social-btn" title="钉钉" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 00-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z" data-v-15fc7de5></path></svg></button><button class="social-btn" title="飞书" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" data-v-15fc7de5></path></svg></button></div></div>', 1))
3452
- ]),
3453
- x[9] || (x[9] = s("div", { class: "copyright" }, [
3454
- s("p", null, "© 2024 XTO Team. All rights reserved.")
3455
- ], -1))
3456
- ])
3457
- ]));
3458
- }
3459
- }), va = /* @__PURE__ */ Se(ha, [["__scopeId", "data-v-15fc7de5"]]), _a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3460
- __proto__: null,
3461
- default: va
3462
- }, Symbol.toStringTag, { value: "Module" })), ga = { class: "error-page" }, wa = { class: "error-container" }, ya = { class: "error-content" }, ka = { class: "error-actions" }, ba = /* @__PURE__ */ Ae({
3463
- __name: "404",
3464
- setup(n) {
3465
- const d = ze(), v = () => {
3466
- d.push("/");
3467
- };
3468
- return (p, h) => (y(), $("div", ga, [
3469
- s("div", wa, [
3470
- h[7] || (h[7] = s("div", { class: "error-bg" }, [
3471
- s("div", { class: "bg-circle circle-1" }),
3472
- s("div", { class: "bg-circle circle-2" }),
3473
- s("div", { class: "bg-circle circle-3" })
3474
- ], -1)),
3475
- s("div", ya, [
3476
- h[5] || (h[5] = nt('<div class="error-code" data-v-3a9e61ae><span class="code-digit" data-v-3a9e61ae>4</span><span class="code-zero" data-v-3a9e61ae><span class="zero-inner" data-v-3a9e61ae>0</span></span><span class="code-digit" data-v-3a9e61ae>4</span></div><div class="error-illustration" data-v-3a9e61ae><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-3a9e61ae><rect x="40" y="20" width="120" height="80" rx="8" fill="var(--color-fill)" stroke="var(--color-border)" stroke-width="2" data-v-3a9e61ae></rect><rect x="50" y="30" width="100" height="60" rx="4" fill="var(--bg-color)" data-v-3a9e61ae></rect><line x1="60" y1="45" x2="140" y2="45" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><line x1="60" y1="55" x2="120" y2="55" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><line x1="60" y1="65" x2="100" y2="65" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><text x="100" y="75" text-anchor="middle" fill="var(--color-primary)" font-size="24" font-weight="600" data-v-3a9e61ae>?</text><circle cx="150" cy="35" r="12" stroke="var(--color-primary)" stroke-width="2" fill="none" data-v-3a9e61ae></circle><line x1="158" y1="43" x2="168" y2="53" stroke="var(--color-primary)" stroke-width="2" stroke-linecap="round" data-v-3a9e61ae></line></svg></div><h1 class="error-title" data-v-3a9e61ae>页面不存在</h1><p class="error-desc" data-v-3a9e61ae>抱歉,您访问的页面不存在或已被删除</p>', 4)),
3477
- s("div", ka, [
3478
- R(k(je), {
3479
- type: "primary",
3480
- size: "large",
3481
- onClick: v
3482
- }, {
3483
- icon: Y(() => [...h[1] || (h[1] = [
3484
- s("svg", {
3485
- viewBox: "0 0 24 24",
3486
- fill: "none",
3487
- stroke: "currentColor",
3488
- "stroke-width": "2"
3489
- }, [
3490
- s("path", { d: "M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" }),
3491
- s("polyline", { points: "9,22 9,12 15,12 15,22" })
3492
- ], -1)
3493
- ])]),
3494
- default: Y(() => [
3495
- h[2] || (h[2] = Fe(" 返回首页 ", -1))
3496
- ]),
3497
- _: 1
3498
- }),
3499
- R(k(je), {
3500
- size: "large",
3501
- onClick: h[0] || (h[0] = (w) => k(d).go(-1))
3502
- }, {
3503
- icon: Y(() => [...h[3] || (h[3] = [
3504
- s("svg", {
3505
- viewBox: "0 0 24 24",
3506
- fill: "none",
3507
- stroke: "currentColor",
3508
- "stroke-width": "2"
3509
- }, [
3510
- s("path", { d: "M19 12H5M12 19l-7-7 7-7" })
3511
- ], -1)
3512
- ])]),
3513
- default: Y(() => [
3514
- h[4] || (h[4] = Fe(" 返回上一页 ", -1))
3515
- ]),
3516
- _: 1
3517
- })
3518
- ]),
3519
- h[6] || (h[6] = s("div", { class: "error-tip" }, [
3520
- s("p", null, "您可以尝试:"),
3521
- s("ul", null, [
3522
- s("li", null, "检查您输入的网址是否正确"),
3523
- s("li", null, "返回首页重新浏览"),
3524
- s("li", null, "联系管理员反馈问题")
3525
- ])
3526
- ], -1))
3527
- ])
3528
- ])
3529
- ]));
3530
- }
3531
- }), xa = /* @__PURE__ */ Se(ba, [["__scopeId", "data-v-3a9e61ae"]]), Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3532
- __proto__: null,
3533
- default: xa
3534
- }, Symbol.toStringTag, { value: "Module" })), Ca = { class: "error-page" }, Na = { class: "error-container" }, Ea = { class: "error-content" }, $a = { class: "error-actions" }, Sa = /* @__PURE__ */ Ae({
3535
- __name: "403",
3536
- setup(n) {
3537
- const d = ze(), v = () => {
3538
- d.push("/");
3539
- };
3540
- return (p, h) => (y(), $("div", Ca, [
3541
- s("div", Na, [
3542
- h[7] || (h[7] = s("div", { class: "error-bg" }, [
3543
- s("div", { class: "bg-circle circle-1" }),
3544
- s("div", { class: "bg-circle circle-2" }),
3545
- s("div", { class: "bg-circle circle-3" })
3546
- ], -1)),
3547
- s("div", Ea, [
3548
- h[5] || (h[5] = nt('<div class="error-code" data-v-c733ebac><span class="code-digit" data-v-c733ebac>4</span><span class="code-zero warning" data-v-c733ebac><span class="zero-inner" data-v-c733ebac>0</span></span><span class="code-digit" data-v-c733ebac>3</span></div><div class="error-illustration" data-v-c733ebac><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c733ebac><path d="M100 15 L150 35 L150 70 C150 95 100 110 100 110 C100 110 50 95 50 70 L50 35 Z" fill="var(--color-warning-lighter)" stroke="var(--color-warning)" stroke-width="2" data-v-c733ebac></path><rect x="85" y="55" width="30" height="25" rx="4" fill="var(--color-warning)" data-v-c733ebac></rect><path d="M92 55 V48 A8 8 0 0 1 108 48 V55" fill="none" stroke="var(--color-warning)" stroke-width="3" data-v-c733ebac></path><circle cx="100" cy="67" r="6" fill="none" stroke="#fff" stroke-width="2" data-v-c733ebac></circle><line x1="96" y1="63" x2="104" y2="71" stroke="#fff" stroke-width="2" data-v-c733ebac></line></svg></div><h1 class="error-title" data-v-c733ebac>无访问权限</h1><p class="error-desc" data-v-c733ebac>抱歉,您没有权限访问此页面,请联系管理员获取权限</p>', 4)),
3549
- s("div", $a, [
3550
- R(k(je), {
3551
- type: "primary",
3552
- size: "large",
3553
- onClick: v
3554
- }, {
3555
- icon: Y(() => [...h[1] || (h[1] = [
3556
- s("svg", {
3557
- viewBox: "0 0 24 24",
3558
- fill: "none",
3559
- stroke: "currentColor",
3560
- "stroke-width": "2"
3561
- }, [
3562
- s("path", { d: "M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" }),
3563
- s("polyline", { points: "9,22 9,12 15,12 15,22" })
3564
- ], -1)
3565
- ])]),
3566
- default: Y(() => [
3567
- h[2] || (h[2] = Fe(" 返回首页 ", -1))
3568
- ]),
3569
- _: 1
3570
- }),
3571
- R(k(je), {
3572
- size: "large",
3573
- onClick: h[0] || (h[0] = (w) => k(d).go(-1))
3574
- }, {
3575
- icon: Y(() => [...h[3] || (h[3] = [
3576
- s("svg", {
3577
- viewBox: "0 0 24 24",
3578
- fill: "none",
3579
- stroke: "currentColor",
3580
- "stroke-width": "2"
3581
- }, [
3582
- s("path", { d: "M19 12H5M12 19l-7-7 7-7" })
3583
- ], -1)
3584
- ])]),
3585
- default: Y(() => [
3586
- h[4] || (h[4] = Fe(" 返回上一页 ", -1))
3587
- ]),
3588
- _: 1
3589
- })
3590
- ]),
3591
- h[6] || (h[6] = s("div", { class: "error-tip" }, [
3592
- s("p", null, "可能的原因:"),
3593
- s("ul", null, [
3594
- s("li", null, "您的账号权限不足"),
3595
- s("li", null, "该页面需要特定角色才能访问"),
3596
- s("li", null, "您的登录状态已过期")
3597
- ])
3598
- ], -1))
3599
- ])
3600
- ])
3601
- ]));
3602
- }
3603
- }), sl = /* @__PURE__ */ Se(Sa, [["__scopeId", "data-v-c733ebac"]]);
3604
- function nl() {
3605
- const n = De(), d = $e(), v = Ze(), p = j(() => d.userName || ""), h = j(() => d.userInfo), w = j(() => n.appName), N = j(() => v.isLoggedIn), _ = j(() => n.isDark), M = j(() => n.theme), g = j(() => n.isCollapsed), x = j(() => n.layout);
3606
- return {
3607
- userName: p,
3608
- userInfo: h,
3609
- appName: w,
3610
- isLoggedIn: N,
3611
- isDark: _,
3612
- theme: M,
3613
- isCollapsed: g,
3614
- layout: x,
3615
- toggleTheme: () => {
3616
- n.toggleTheme();
3617
- },
3618
- toggleCollapse: () => {
3619
- n.toggleCollapse();
3620
- }
3621
- };
3622
- }
3623
- function ol() {
3624
- const n = $e();
3625
- return {
3626
- isLoggedIn: j(() => n.isLoggedIn)
3627
- };
3628
- }
3629
- function rl(n, d = {}) {
3630
- const { rules: v, onSubmit: p } = d, h = P(), w = bt({ ...n }), N = P(!1), _ = P(!1), M = P(!1), g = () => {
3631
- C(), M.value = !1, _.value = !0;
3632
- }, x = (Z) => {
3633
- Object.assign(w, Z), M.value = !0, _.value = !0;
3634
- }, L = () => {
3635
- _.value = !1, C();
3636
- }, C = () => {
3637
- var Z;
3638
- Object.keys(n).forEach((T) => {
3639
- w[T] = n[T];
3640
- }), (Z = h.value) == null || Z.resetFields();
3641
- };
3642
- return {
3643
- formRef: h,
3644
- formData: w,
3645
- rules: v,
3646
- loading: N,
3647
- visible: _,
3648
- isEdit: M,
3649
- openAdd: g,
3650
- openEdit: x,
3651
- close: L,
3652
- resetForm: C,
3653
- handleSubmit: async () => {
3654
- var Z;
3655
- try {
3656
- await ((Z = h.value) == null ? void 0 : Z.validate()), N.value = !0, await (p == null ? void 0 : p(w)), L();
3657
- } catch (T) {
3658
- console.error(T);
3659
- } finally {
3660
- N.value = !1;
3661
- }
3662
- }
3663
- };
3664
- }
3665
- function al(n) {
3666
- const { fetchData: d, defaultPageSize: v = 10 } = n, p = P(!1), h = P([]), w = P(0), N = P(1), _ = P(v), M = bt({}), g = async () => {
3667
- p.value = !0;
3668
- try {
3669
- const O = {
3670
- ...M,
3671
- page: N.value,
3672
- pageSize: _.value
3673
- }, V = await d(O);
3674
- h.value = V.list, w.value = V.total;
3675
- } catch (O) {
3676
- console.error(O);
3677
- } finally {
3678
- p.value = !1;
3679
- }
3680
- }, x = () => {
3681
- N.value = 1, g();
3682
- }, L = () => {
3683
- Object.keys(M).forEach((O) => {
3684
- M[O] = void 0;
3685
- }), N.value = 1, g();
3686
- }, C = (O) => {
3687
- N.value = O, g();
3688
- }, H = (O) => {
3689
- _.value = O, N.value = 1, g();
3690
- }, Z = () => {
3691
- g();
3692
- }, T = j(() => ({
3693
- current: N.value,
3694
- pageSize: _.value,
3695
- total: w.value
3696
- }));
3697
- return {
3698
- loading: p,
3699
- data: h,
3700
- total: w,
3701
- currentPage: N,
3702
- pageSize: _,
3703
- searchParams: M,
3704
- pagination: T,
3705
- getData: g,
3706
- handleSearch: x,
3707
- handleReset: L,
3708
- handlePageChange: C,
3709
- handleSizeChange: H,
3710
- refresh: Z
3711
- };
3712
- }
3713
- const Tt = Je("locale", () => {
3714
- const n = q.get("locale") || "zh-CN", d = ls(n), v = P(n), p = is(), { t: h, messages: w, setLocale: N, mergeMessages: _ } = cs(), M = j(() => {
3715
- const C = p.find((H) => H.code === v.value);
3716
- return (C == null ? void 0 : C.name) || v.value;
3717
- });
3718
- return {
3719
- locale: v,
3720
- localeName: M,
3721
- locales: p,
3722
- messages: w,
3723
- t: h,
3724
- changeLocale: (C) => {
3725
- v.value = C, N(C), q.set("locale", C), d.setLocale(C);
3726
- },
3727
- addMessages: (C) => {
3728
- _(C);
3729
- },
3730
- initLocale: () => {
3731
- N(n);
3732
- },
3733
- provider: d
3734
- };
3735
- }), Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3736
- __proto__: null,
3737
- useLocaleStore: Tt
3738
- }, Symbol.toStringTag, { value: "Module" }));
3739
- function ll() {
3740
- const n = Tt();
3741
- return {
3742
- /** 当前语言代码 */
3743
- locale: n.locale,
3744
- /** 当前语言名称 */
3745
- localeName: n.localeName,
3746
- /** 支持的语言列表 */
3747
- locales: n.locales,
3748
- /** 翻译函数 */
3749
- t: n.t,
3750
- /** 当前语言包 */
3751
- messages: n.messages,
3752
- /** 切换语言 */
3753
- setLocale: n.changeLocale,
3754
- /** 添加自定义翻译 */
3755
- addMessages: n.addMessages
3756
- };
3757
- }
3758
- function il() {
3759
- return Tt().t;
3760
- }
3761
- function cl(n) {
3762
- const d = $e(), v = Pe();
3763
- return d.isLoggedIn ? v.hasPermission(n) : !1;
3764
- }
3765
- function ul(n) {
3766
- return $e().isLoggedIn;
3767
- }
3768
- function dl() {
3769
- return !0;
3770
- }
3771
- const Jt = [
3772
- {
3773
- path: "/login",
3774
- name: "Login",
3775
- component: () => Promise.resolve().then(() => _a),
3776
- meta: {
3777
- title: "登录",
3778
- hidden: !0
3779
- }
3780
- }
3781
- ], Zt = {
3782
- path: "/",
3783
- name: "Layout",
3784
- component: () => Promise.resolve().then(() => Dr),
3785
- redirect: "/dashboard",
3786
- children: [
3787
- {
3788
- path: "/dashboard",
3789
- name: "Dashboard",
3790
- component: () => import("./index-B5DLfOYb.js"),
3791
- meta: {
3792
- title: "仪表盘",
3793
- icon: "dashboard",
3794
- keepAlive: !0,
3795
- affix: !0
3796
- }
3797
- },
3798
- {
3799
- path: "/system/user",
3800
- name: "SystemUser",
3801
- component: () => import("./index-DCBIjLHy.js"),
3802
- meta: {
3803
- title: "用户管理",
3804
- icon: "user",
3805
- keepAlive: !0
3806
- }
3807
- },
3808
- {
3809
- path: "/system/role",
3810
- name: "SystemRole",
3811
- component: () => import("./index-3ekBp4iW.js"),
3812
- meta: {
3813
- title: "角色管理",
3814
- icon: "role",
3815
- keepAlive: !0
3816
- }
3817
- },
3818
- {
3819
- path: "/system/menu",
3820
- name: "SystemMenu",
3821
- component: () => import("./index-ChowNrlU.js"),
3822
- meta: {
3823
- title: "菜单管理",
3824
- icon: "menu",
3825
- keepAlive: !0
3826
- }
3827
- },
3828
- // catch-all 路由:让 404 在 Layout 内部渲染,保持左侧菜单显示
3829
- {
3830
- path: "/:pathMatch(.*)*",
3831
- name: "CatchAll",
3832
- component: () => Promise.resolve().then(() => Yt),
3833
- meta: {
3834
- title: "404",
3835
- hidden: !0
3836
- }
3837
- }
3838
- ]
3839
- }, fl = [
3840
- {
3841
- path: "/dashboard",
3842
- name: "Dashboard",
3843
- component: () => import("./index-B5DLfOYb.js"),
3844
- meta: {
3845
- title: "仪表盘",
3846
- icon: "dashboard",
3847
- keepAlive: !0,
3848
- affix: !0
3849
- }
3850
- },
3851
- {
3852
- path: "/system",
3853
- name: "System",
3854
- redirect: "/system/user",
3855
- meta: {
3856
- title: "系统管理",
3857
- icon: "setting"
3858
- },
3859
- children: [
3860
- {
3861
- path: "user",
3862
- name: "SystemUser",
3863
- component: () => import("./index-DCBIjLHy.js"),
3864
- meta: {
3865
- title: "用户管理",
3866
- icon: "user",
3867
- keepAlive: !0
3868
- }
3869
- },
3870
- {
3871
- path: "role",
3872
- name: "SystemRole",
3873
- component: () => import("./index-3ekBp4iW.js"),
3874
- meta: {
3875
- title: "角色管理",
3876
- icon: "role",
3877
- keepAlive: !0
3878
- }
3879
- },
3880
- {
3881
- path: "menu",
3882
- name: "SystemMenu",
3883
- component: () => import("./index-ChowNrlU.js"),
3884
- meta: {
3885
- title: "菜单管理",
3886
- icon: "menu",
3887
- keepAlive: !0
3888
- }
3889
- }
3890
- ]
3891
- }
3892
- ], La = [
3893
- {
3894
- menuCode: "dashboard",
3895
- menuName: "仪表盘",
3896
- menuUrl: "/dashboard",
3897
- icon: "dashboard",
3898
- closable: !0,
3899
- isDefault: !0,
3900
- isOut: !1
3901
- },
3902
- {
3903
- menuCode: "system",
3904
- menuName: "系统管理",
3905
- menuUrl: "/system",
3906
- icon: "setting",
3907
- closable: !1,
3908
- isDefault: !1,
3909
- isOut: !1,
3910
- children: [
3911
- {
3912
- menuCode: "system_user",
3913
- menuName: "用户管理",
3914
- menuUrl: "/system/user",
3915
- icon: "user",
3916
- closable: !0,
3917
- isDefault: !1,
3918
- isOut: !1
3919
- },
3920
- {
3921
- menuCode: "system_role",
3922
- menuName: "角色管理",
3923
- menuUrl: "/system/role",
3924
- icon: "role",
3925
- closable: !0,
3926
- isDefault: !1,
3927
- isOut: !1
3928
- },
3929
- {
3930
- menuCode: "system_menu",
3931
- menuName: "菜单管理",
3932
- menuUrl: "/system/menu",
3933
- icon: "menu",
3934
- closable: !0,
3935
- isDefault: !1,
3936
- isOut: !1
3937
- }
3938
- ]
3939
- }
3940
- ], Qt = xt({
3941
- history: Ct(),
3942
- routes: [...Jt, Zt],
3943
- scrollBehavior: () => ({ left: 0, top: 0 })
3944
- }), Ia = ["/login"];
3945
- Qt.beforeEach(async (n, d, v) => {
3946
- const p = De();
3947
- if (p.initTheme(), Vt())
3948
- if (n.path === "/login")
3949
- v({ path: "/" });
3950
- else {
3951
- const h = $e();
3952
- h.isLoggedIn || (h.setUserInfo({
3953
- appId: ct(),
3954
- userId: "1",
3955
- userName: "管理员",
3956
- departmentName: "技术部",
3957
- email: "admin@example.com",
3958
- mobilePhone: "13800138000",
3959
- positionName: "管理员",
3960
- avatar: ""
3961
- }), Pe().setMenuList(La)), n.name && n.meta.keepAlive && p.addCachedView(n.name), v();
3962
- }
3963
- else
3964
- Ia.includes(n.path) ? v() : v("/login");
3965
- });
3966
- function pl() {
3967
- const n = xt({
3968
- history: Ct(),
3969
- routes: [...Jt, Zt]
3970
- });
3971
- Qt.matcher = n.matcher;
3972
- }
3973
- function ml(n, d = {}) {
3974
- const v = d.indexPath || "/dashboard", p = {
3975
- path: "/:pathMatch(.*)*",
3976
- name: "CatchAll",
3977
- component: () => Promise.resolve().then(() => Yt),
3978
- meta: {
3979
- title: "404"
3980
- }
3981
- };
3982
- return {
3983
- path: "/",
3984
- name: "Layout",
3985
- component: jt,
3986
- redirect: v,
3987
- children: [...n, p]
3988
- };
3989
- }
3990
- function hl(n, d = {}) {
3991
- return xt({
3992
- history: Ct(d.base),
3993
- routes: n,
3994
- scrollBehavior: () => ({ left: 0, top: 0 })
3995
- });
3996
- }
3997
- function vl(n) {
3998
- return de.get("/role/list", { params: n });
3999
- }
4000
- function _l(n) {
4001
- return de.get(`/role/${n}`);
4002
- }
4003
- function gl(n) {
4004
- return de.post("/role", n);
4005
- }
4006
- function wl(n, d) {
4007
- return de.put(`/role/${n}`, d);
4008
- }
4009
- function yl(n) {
4010
- return de.delete(`/role/${n}`);
4011
- }
4012
- function kl(n, d) {
4013
- return de.patch(`/role/${n}/status`, { status: d });
4014
- }
4015
- function bl() {
4016
- return de.get("/user/v1.0/menu/list");
4017
- }
4018
- function Aa(n) {
4019
- const d = n || ct();
4020
- return de.get(`/user/v1.0/menu/get-menu?appId=${d}`);
4021
- }
4022
- function xl(n) {
4023
- return de.post("/menu", n);
4024
- }
4025
- function Cl(n, d) {
4026
- return de.put(`/menu/${n}`, d);
4027
- }
4028
- function Nl(n) {
4029
- return de.delete(`/menu/${n}`);
4030
- }
4031
- const Ta = ["/login", "/404", "/403"];
4032
- function El(n, d = {}) {
4033
- const v = d.whiteList || Ta, p = d.loginPath || "/login", h = d.homePath || "/";
4034
- n.beforeEach(async (w, N, _) => {
4035
- const M = De(), g = $e(), x = Pe();
4036
- if (M.initTheme(), ut())
4037
- if (w.path === p)
4038
- _({ path: h });
4039
- else if (g.isLoggedIn)
4040
- w.name && w.meta.keepAlive && M.addCachedView(w.name), _();
4041
- else
4042
- try {
4043
- if (d.fetchUserInfo) {
4044
- const C = await d.fetchUserInfo();
4045
- g.setUserInfo(C);
4046
- } else {
4047
- const C = await aa();
4048
- g.setUserInfo(C);
4049
- }
4050
- if (d.fetchMenu) {
4051
- const C = await d.fetchMenu();
4052
- x.setMenuList(C);
4053
- } else {
4054
- const C = await Aa(d.appId);
4055
- x.setMenuList(C);
4056
- }
4057
- d.onLoginSuccess && d.onLoginSuccess(), w.name && w.meta.keepAlive && M.addCachedView(w.name), _({ ...w, replace: !0 });
4058
- } catch (C) {
4059
- console.error("获取用户信息失败:", C), g.clearUserInfo(), x.clearMenu(), We(), _({ path: p, query: { redirect: w.fullPath } });
4060
- }
4061
- else
4062
- v.includes(w.path) ? _() : _({ path: p, query: { redirect: w.fullPath } });
4063
- }), n.afterEach(() => {
4064
- });
4065
- }
4066
- function $l(n) {
4067
- return de.get("/user/list", { params: n });
4068
- }
4069
- function Sl(n) {
4070
- return de.get(`/user/${n}`);
4071
- }
4072
- function Ml(n) {
4073
- return de.post("/user", n);
4074
- }
4075
- function Ll(n, d) {
4076
- return de.put(`/user/${n}`, d);
4077
- }
4078
- function Il(n) {
4079
- return de.delete(`/user/${n}`);
4080
- }
4081
- function Al(n) {
4082
- return de.post("/user/batch-delete", { ids: n });
4083
- }
4084
- function Tl(n, d) {
4085
- return de.patch(`/user/${n}/status`, { status: d });
4086
- }
4087
- function Ol(n) {
4088
- return de.post(`/user/${n}/reset-password`);
4089
- }
4090
- var Oa = /* @__PURE__ */ ((n) => (n[n.ENABLED = 1] = "ENABLED", n[n.DISABLED = 0] = "DISABLED", n))(Oa || {}), Ua = /* @__PURE__ */ ((n) => (n[n.UNKNOWN = 0] = "UNKNOWN", n[n.MALE = 1] = "MALE", n[n.FEMALE = 2] = "FEMALE", n))(Ua || {}), Ba = /* @__PURE__ */ ((n) => (n[n.DIRECTORY = 0] = "DIRECTORY", n[n.MENU = 1] = "MENU", n[n.BUTTON = 2] = "BUTTON", n))(Ba || {});
4091
- const Ul = {
4092
- 1: "启用",
4093
- 0: "禁用"
4094
- }, Bl = {
4095
- 0: "未知",
4096
- 1: "男",
4097
- 2: "女"
4098
- }, Pl = {
4099
- 0: "目录",
4100
- 1: "菜单",
4101
- 2: "按钮"
4102
- }, Rl = [
4103
- {
4104
- label: "启用",
4105
- value: 1
4106
- /* ENABLED */
4107
- },
4108
- {
4109
- label: "禁用",
4110
- value: 0
4111
- /* DISABLED */
4112
- }
4113
- ], zl = [
4114
- {
4115
- label: "未知",
4116
- value: 0
4117
- /* UNKNOWN */
4118
- },
4119
- {
4120
- label: "男",
4121
- value: 1
4122
- /* MALE */
4123
- },
4124
- {
4125
- label: "女",
4126
- value: 2
4127
- /* FEMALE */
4128
- }
4129
- ], Dl = [
4130
- {
4131
- label: "目录",
4132
- value: 0
4133
- /* DIRECTORY */
4134
- },
4135
- {
4136
- label: "菜单",
4137
- value: 1
4138
- /* MENU */
4139
- },
4140
- {
4141
- label: "按钮",
4142
- value: 2
4143
- /* BUTTON */
4144
- }
4145
- ], Fl = {
4146
- mounted(n, d) {
4147
- var N, _;
4148
- const v = $e(), p = Pe();
4149
- if (!v.isLoggedIn) {
4150
- (N = n.parentNode) == null || N.removeChild(n);
4151
- return;
4152
- }
4153
- const h = d.value, w = Array.isArray(h) ? h : [h];
4154
- p.hasPermission(w) || (_ = n.parentNode) == null || _.removeChild(n);
4155
- }
4156
- };
4157
- function Vl(n) {
4158
- return us({
4159
- appId: n.appId,
4160
- clientId: n.clientId,
4161
- apiBaseUrl: n.apiBaseUrl
4162
- }), n.locale && Promise.resolve().then(() => Ma).then(({ useLocaleStore: d }) => {
4163
- d().changeLocale(n.locale);
4164
- }), {
4165
- config: {
4166
- appName: n.appName || "XTO App",
4167
- appId: ct(),
4168
- clientId: Rt(),
4169
- apiBaseUrl: ds(),
4170
- indexPath: n.indexPath || "/dashboard",
4171
- loginPath: n.loginPath || "/login",
4172
- locale: n.locale || "zh-CN"
4173
- }
4174
- };
4175
- }
4176
- export {
4177
- dl as $,
4178
- Rt as A,
4179
- Ya as B,
4180
- bl as C,
4181
- Aa as D,
4182
- Xa as E,
4183
- Za as F,
4184
- Ua as G,
4185
- $n as H,
4186
- Wa as I,
4187
- _l as J,
4188
- vl as K,
4189
- jt as L,
4190
- Ba as M,
4191
- ut as N,
4192
- gs as O,
4193
- hs as P,
4194
- Sl as Q,
4195
- aa as R,
4196
- Oa as S,
4197
- Ja as T,
4198
- $l as U,
4199
- cl as V,
4200
- ul as W,
4201
- Vt as X,
4202
- de as Y,
4203
- us as Z,
4204
- Se as _,
4205
- Rl as a,
4206
- bs as a0,
4207
- Zt as a1,
4208
- q as a2,
4209
- et as a3,
4210
- ra as a4,
4211
- el as a5,
4212
- La as a6,
4213
- Fl as a7,
4214
- tl as a8,
4215
- Ol as a9,
4216
- Pe as aA,
4217
- al as aB,
4218
- $e as aC,
4219
- pl as aa,
4220
- Qt as ab,
4221
- Ha as ac,
4222
- tt as ad,
4223
- Qa as ae,
4224
- ks as af,
4225
- ys as ag,
4226
- _s as ah,
4227
- ms as ai,
4228
- ws as aj,
4229
- Ft as ak,
4230
- vs as al,
4231
- El as am,
4232
- Jt as an,
4233
- Cl as ao,
4234
- wl as ap,
4235
- kl as aq,
4236
- Ll as ar,
4237
- Tl as as,
4238
- nl as at,
4239
- De as au,
4240
- ol as av,
4241
- Ze as aw,
4242
- rl as ax,
4243
- ll as ay,
4244
- Tt as az,
4245
- Dl as b,
4246
- sl as c,
4247
- zl as d,
4248
- Bl as e,
4249
- Pl as f,
4250
- xa as g,
4251
- Bt as h,
4252
- va as i,
4253
- Ul as j,
4254
- Ka as k,
4255
- Al as l,
4256
- We as m,
4257
- ml as n,
4258
- xl as o,
4259
- gl as p,
4260
- hl as q,
4261
- il as r,
4262
- Ml as s,
4263
- Vl as t,
4264
- fl as u,
4265
- Nl as v,
4266
- yl as w,
4267
- Il as x,
4268
- ds as y,
4269
- ct as z
4270
- };