@huyooo/ui 0.5.36 → 0.5.38
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.
- package/dist/WidthContainer-CaG3ubDu.js +626 -0
- package/dist/common.js +1 -1
- package/dist/components/HeaderMenus.vue.d.ts +2 -0
- package/dist/composables/Authkit/useAuthMenu.d.ts +1 -0
- package/dist/composables.js +1 -1
- package/dist/index.js +3 -3
- package/dist/style.css +1 -1
- package/dist/{useSEO-Dtro0lLy.js → useSEO-BPLbTGu_.js} +142 -141
- package/package.json +1 -1
- package/dist/WidthContainer-DyuW6XVV.js +0 -516
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as I, computed as h, watch as C, toValue as
|
|
1
|
+
import { ref as I, computed as h, watch as C, toValue as G, isRef as W, hasInjectionContext as B, inject as F, watchEffect as J, getCurrentInstance as Q, onBeforeUnmount as Z, onDeactivated as X, onActivated as Y } from "vue";
|
|
2
2
|
import { useRouter as _, useRoute as x } from "vue-router";
|
|
3
3
|
import { u as R } from "./useAuthkitAppsAuthPageInfo-Ct-ElH04.js";
|
|
4
4
|
import { a as U } from "./useAuthkitUsersProfile-B1y2nleU.js";
|
|
@@ -6,7 +6,7 @@ const v = I({
|
|
|
6
6
|
key: "",
|
|
7
7
|
name: ""
|
|
8
8
|
});
|
|
9
|
-
function
|
|
9
|
+
function we() {
|
|
10
10
|
function e(t, n) {
|
|
11
11
|
v.value.key = t, v.value.name = n;
|
|
12
12
|
}
|
|
@@ -15,7 +15,7 @@ function be() {
|
|
|
15
15
|
setActiveDoc: e
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Se(e, t = "default") {
|
|
19
19
|
const n = document;
|
|
20
20
|
if (n && typeof n.startViewTransition == "function") {
|
|
21
21
|
const r = document.body;
|
|
@@ -30,65 +30,66 @@ function we(e, t = "default") {
|
|
|
30
30
|
} else
|
|
31
31
|
e();
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function D(e, t) {
|
|
34
34
|
return Array.isArray(e == null ? void 0 : e.menuTypes) ? e.menuTypes.includes(t) : !1;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Ae(e, t, n) {
|
|
37
37
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
38
38
|
const o = e[r];
|
|
39
|
-
if (
|
|
39
|
+
if (D(o.meta, t))
|
|
40
40
|
return o.path;
|
|
41
41
|
}
|
|
42
42
|
return n;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function $e(e) {
|
|
45
45
|
const t = _(), {
|
|
46
46
|
appsData: n
|
|
47
47
|
} = R(), {
|
|
48
48
|
isLoggedIn: r,
|
|
49
49
|
userProfile: o
|
|
50
50
|
} = U(), s = h(() => {
|
|
51
|
-
var
|
|
52
|
-
return !r.value || !o.value ? [] : ((
|
|
51
|
+
var f;
|
|
52
|
+
return !r.value || !o.value ? [] : ((f = o.value.permissions) == null ? void 0 : f.map((a) => a.permissionKey)) || [];
|
|
53
53
|
});
|
|
54
|
-
function i(
|
|
55
|
-
return (n.value.publicRoutes || []).some((d) => d.permissionKey ===
|
|
54
|
+
function i(f) {
|
|
55
|
+
return (n.value.publicRoutes || []).some((d) => d.permissionKey === f);
|
|
56
56
|
}
|
|
57
|
-
function c(
|
|
58
|
-
return r.value ? s.value.includes(
|
|
57
|
+
function c(f) {
|
|
58
|
+
return r.value ? s.value.includes(f) : !1;
|
|
59
59
|
}
|
|
60
|
-
function l(
|
|
60
|
+
function l(f) {
|
|
61
61
|
var a;
|
|
62
62
|
return {
|
|
63
|
-
path:
|
|
64
|
-
name:
|
|
65
|
-
meta:
|
|
66
|
-
children: (a =
|
|
63
|
+
path: f.path,
|
|
64
|
+
name: f.name,
|
|
65
|
+
meta: f.meta,
|
|
66
|
+
children: (a = f.children) == null ? void 0 : a.map((d) => l(d))
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function p(f, a) {
|
|
70
70
|
const d = [];
|
|
71
|
-
for (const
|
|
72
|
-
if (
|
|
71
|
+
for (const m of f) {
|
|
72
|
+
if (m.path === "/" || m.path === "/:catchAll(.*)")
|
|
73
73
|
continue;
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
const w =
|
|
74
|
+
const u = m.meta;
|
|
75
|
+
if (D(u, a)) {
|
|
76
|
+
const w = m.path;
|
|
77
77
|
if (i(w) || c(w)) {
|
|
78
|
-
const
|
|
79
|
-
name: (
|
|
80
|
-
path:
|
|
81
|
-
icon: (
|
|
82
|
-
|
|
78
|
+
const g = {
|
|
79
|
+
name: (u == null ? void 0 : u.menuName) || (u == null ? void 0 : u.title) || (typeof m.name == "string" ? m.name : m.path),
|
|
80
|
+
path: m.path,
|
|
81
|
+
icon: (u == null ? void 0 : u.menuIcon) || (u == null ? void 0 : u.icon),
|
|
82
|
+
description: (u == null ? void 0 : u.menuDescription) || (u == null ? void 0 : u.description),
|
|
83
|
+
hidden: u == null ? void 0 : u.hidden
|
|
83
84
|
};
|
|
84
|
-
if (
|
|
85
|
-
const
|
|
86
|
-
|
|
85
|
+
if (m.children && m.children.length > 0) {
|
|
86
|
+
const P = p(m.children, a);
|
|
87
|
+
P.length > 0 && (g.children = P);
|
|
87
88
|
}
|
|
88
|
-
d.push(
|
|
89
|
+
d.push(g);
|
|
89
90
|
}
|
|
90
|
-
} else if (
|
|
91
|
-
const w =
|
|
91
|
+
} else if (m.children && m.children.length > 0) {
|
|
92
|
+
const w = p(m.children, a);
|
|
92
93
|
d.push(...w);
|
|
93
94
|
}
|
|
94
95
|
}
|
|
@@ -98,15 +99,15 @@ function Ae(e) {
|
|
|
98
99
|
menus: h(() => {
|
|
99
100
|
if (!e)
|
|
100
101
|
return [];
|
|
101
|
-
const
|
|
102
|
-
return console.log(
|
|
102
|
+
const f = t.getRoutes(), a = f.find((g) => g.path === "/"), d = a != null && a.children ? a.children.map((g) => l(g)) : [], m = new Set(d.map((g) => g.path)), w = f.filter((g) => g.path === "/" || g.path === "/:catchAll(.*)" || m.has(g.path) ? !1 : g.path.split("/").filter((N) => N).length === 1).map(l), T = [...d, ...w];
|
|
103
|
+
return console.log(p(T, e), "过滤菜单"), p(T, e);
|
|
103
104
|
}),
|
|
104
105
|
isRoutePublic: i,
|
|
105
|
-
hasPermission: (
|
|
106
|
+
hasPermission: (f) => i(f) ? !0 : c(f),
|
|
106
107
|
isLoggedIn: r
|
|
107
108
|
};
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
+
function Te() {
|
|
110
111
|
const e = _(), t = x(), {
|
|
111
112
|
appsAuthPageInfoApi: n,
|
|
112
113
|
appsData: r,
|
|
@@ -116,20 +117,20 @@ function $e() {
|
|
|
116
117
|
isLoggedIn: i,
|
|
117
118
|
usersProfileSuccess: c
|
|
118
119
|
} = U(), l = I(!1);
|
|
119
|
-
function
|
|
120
|
-
return (r.value.publicRoutes || []).some((
|
|
120
|
+
function p(a) {
|
|
121
|
+
return (r.value.publicRoutes || []).some((m) => m.permissionKey === a);
|
|
121
122
|
}
|
|
122
123
|
function b(a) {
|
|
123
|
-
var
|
|
124
|
-
return !i.value || !s.value ? !1 : (((
|
|
124
|
+
var m;
|
|
125
|
+
return !i.value || !s.value ? !1 : (((m = s.value.permissions) == null ? void 0 : m.map((u) => u.permissionKey)) || []).includes(a);
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
-
var d,
|
|
127
|
+
function f(a) {
|
|
128
|
+
var d, m;
|
|
128
129
|
if (!o.value) {
|
|
129
130
|
console.log("权限检查跳过:appsAuthPageInfoSuccess 未加载完成", a);
|
|
130
131
|
return;
|
|
131
132
|
}
|
|
132
|
-
if (l.value = !0,
|
|
133
|
+
if (l.value = !0, p(a)) {
|
|
133
134
|
console.log("权限检查通过:公开路由", a), l.value = !1;
|
|
134
135
|
return;
|
|
135
136
|
}
|
|
@@ -142,27 +143,27 @@ function $e() {
|
|
|
142
143
|
return;
|
|
143
144
|
}
|
|
144
145
|
b(a) ? console.log("权限检查通过:有权限", a) : (console.log("权限检查失败:无权限,重定向到首页", a, {
|
|
145
|
-
permissions: (
|
|
146
|
+
permissions: (m = (d = s.value) == null ? void 0 : d.permissions) == null ? void 0 : m.map((u) => u.permissionKey)
|
|
146
147
|
}), e.replace("/")), l.value = !1;
|
|
147
148
|
}
|
|
148
149
|
return n(), C(() => t.path, (a) => {
|
|
149
|
-
|
|
150
|
+
f(a);
|
|
150
151
|
}), C([o, c], ([a]) => {
|
|
151
|
-
a &&
|
|
152
|
+
a && f(t.path);
|
|
152
153
|
}), {
|
|
153
154
|
isChecking: l,
|
|
154
|
-
isRoutePublic:
|
|
155
|
+
isRoutePublic: p,
|
|
155
156
|
hasPermission: b
|
|
156
157
|
};
|
|
157
158
|
}
|
|
158
|
-
const
|
|
159
|
+
const ee = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), te = /* @__PURE__ */ new Set(["title", "titleTemplate", "script", "style", "noscript"]), Pe = /* @__PURE__ */ new Set([
|
|
159
160
|
"base",
|
|
160
161
|
"meta",
|
|
161
162
|
"link",
|
|
162
163
|
"style",
|
|
163
164
|
"script",
|
|
164
165
|
"noscript"
|
|
165
|
-
]),
|
|
166
|
+
]), ve = /* @__PURE__ */ new Set([
|
|
166
167
|
"title",
|
|
167
168
|
"base",
|
|
168
169
|
"htmlAttrs",
|
|
@@ -172,7 +173,7 @@ const Y = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), ee =
|
|
|
172
173
|
"style",
|
|
173
174
|
"script",
|
|
174
175
|
"noscript"
|
|
175
|
-
]),
|
|
176
|
+
]), ne = /* @__PURE__ */ new Set(["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs", "templateParams"]), re = /* @__PURE__ */ new Set(["key", "tagPosition", "tagPriority", "tagDuplicateStrategy", "innerHTML", "textContent", "processTemplateParams"]), je = /* @__PURE__ */ new Set(["templateParams", "htmlAttrs", "bodyAttrs"]), E = /* @__PURE__ */ new Set([
|
|
176
177
|
"theme-color",
|
|
177
178
|
"google-site-verification",
|
|
178
179
|
"og",
|
|
@@ -186,7 +187,7 @@ const Y = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), ee =
|
|
|
186
187
|
OG: /* @__PURE__ */ new Set(["og", "book", "article", "profile", "fb"]),
|
|
187
188
|
MEDIA: /* @__PURE__ */ new Set(["ogImage", "ogVideo", "ogAudio", "twitterImage"]),
|
|
188
189
|
HTTP_EQUIV: /* @__PURE__ */ new Set(["contentType", "defaultStyle", "xUaCompatible"])
|
|
189
|
-
},
|
|
190
|
+
}, oe = {
|
|
190
191
|
articleExpirationTime: "article:expiration_time",
|
|
191
192
|
articleModifiedTime: "article:modified_time",
|
|
192
193
|
articlePublishedTime: "article:published_time",
|
|
@@ -205,12 +206,12 @@ const Y = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), ee =
|
|
|
205
206
|
msapplicationConfig: "msapplication-Config",
|
|
206
207
|
msapplicationTileColor: "msapplication-TileColor",
|
|
207
208
|
msapplicationTileImage: "msapplication-TileImage"
|
|
208
|
-
},
|
|
209
|
+
}, K = {
|
|
209
210
|
appleItunesApp: {
|
|
210
211
|
unpack: {
|
|
211
212
|
entrySeparator: ", ",
|
|
212
213
|
// @ts-expect-error untyped
|
|
213
|
-
resolve: ({ key: e, value: t }) => `${
|
|
214
|
+
resolve: ({ key: e, value: t }) => `${y(e)}=${t}`
|
|
214
215
|
}
|
|
215
216
|
},
|
|
216
217
|
refresh: {
|
|
@@ -225,7 +226,7 @@ const Y = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), ee =
|
|
|
225
226
|
unpack: {
|
|
226
227
|
entrySeparator: ", ",
|
|
227
228
|
// @ts-expect-error untyped
|
|
228
|
-
resolve: ({ key: e, value: t }) => typeof t == "boolean" ?
|
|
229
|
+
resolve: ({ key: e, value: t }) => typeof t == "boolean" ? y(e) : `${y(e)}:${t}`
|
|
229
230
|
}
|
|
230
231
|
},
|
|
231
232
|
contentSecurityPolicy: {
|
|
@@ -233,66 +234,66 @@ const Y = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), ee =
|
|
|
233
234
|
unpack: {
|
|
234
235
|
entrySeparator: "; ",
|
|
235
236
|
// @ts-expect-error untyped
|
|
236
|
-
resolve: ({ key: e, value: t }) => `${
|
|
237
|
+
resolve: ({ key: e, value: t }) => `${y(e)} ${t}`
|
|
237
238
|
}
|
|
238
239
|
},
|
|
239
240
|
charset: {}
|
|
240
241
|
};
|
|
241
|
-
function
|
|
242
|
+
function y(e) {
|
|
242
243
|
const t = e.replace(/([A-Z])/g, "-$1").toLowerCase(), n = t.indexOf("-");
|
|
243
244
|
return n === -1 ? t : S.META.has(t.slice(0, n)) || S.OG.has(t.slice(0, n)) ? e.replace(/([A-Z])/g, ":$1").toLowerCase() : t;
|
|
244
245
|
}
|
|
245
|
-
function
|
|
246
|
+
function L(e) {
|
|
246
247
|
return Object.fromEntries(Object.entries(e).filter(([t, n]) => String(n) !== "false" && t));
|
|
247
248
|
}
|
|
248
249
|
function j(e) {
|
|
249
|
-
return Array.isArray(e) ? e.map(j) : !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [
|
|
250
|
+
return Array.isArray(e) ? e.map(j) : !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [y(t), j(n)]));
|
|
250
251
|
}
|
|
251
252
|
function H(e, t = {}) {
|
|
252
253
|
const { entrySeparator: n = "", keyValueSeparator: r = "", wrapValue: o, resolve: s } = t;
|
|
253
254
|
return Object.entries(e).map(([i, c]) => {
|
|
254
255
|
if (s) {
|
|
255
|
-
const
|
|
256
|
-
if (
|
|
257
|
-
return
|
|
256
|
+
const p = s({ key: i, value: c });
|
|
257
|
+
if (p !== void 0)
|
|
258
|
+
return p;
|
|
258
259
|
}
|
|
259
260
|
const l = typeof c == "object" ? H(c, t) : typeof c == "number" ? c.toString() : typeof c == "string" && o ? `${o}${c.replace(new RegExp(o, "g"), `\\${o}`)}${o}` : c;
|
|
260
261
|
return `${i}${r}${l}`;
|
|
261
262
|
}).join(n);
|
|
262
263
|
}
|
|
263
264
|
function V(e, t) {
|
|
264
|
-
const n =
|
|
265
|
+
const n = L(t), r = y(e), o = k(r);
|
|
265
266
|
if (!E.has(r))
|
|
266
267
|
return [{ [o]: r, ...n }];
|
|
267
268
|
const s = Object.fromEntries(
|
|
268
269
|
Object.entries(n).map(([i, c]) => [`${e}${i === "url" ? "" : `${i[0].toUpperCase()}${i.slice(1)}`}`, c])
|
|
269
270
|
);
|
|
270
|
-
return
|
|
271
|
-
var l,
|
|
272
|
-
return (((l = i[o]) == null ? void 0 : l.length) || 0) - (((
|
|
271
|
+
return A(s || {}).sort((i, c) => {
|
|
272
|
+
var l, p;
|
|
273
|
+
return (((l = i[o]) == null ? void 0 : l.length) || 0) - (((p = c[o]) == null ? void 0 : p.length) || 0);
|
|
273
274
|
});
|
|
274
275
|
}
|
|
275
276
|
function k(e) {
|
|
276
277
|
var r;
|
|
277
|
-
if (((r =
|
|
278
|
+
if (((r = K[e]) == null ? void 0 : r.metaKey) === "http-equiv" || S.HTTP_EQUIV.has(e))
|
|
278
279
|
return "http-equiv";
|
|
279
|
-
const t =
|
|
280
|
+
const t = y(e), n = t.indexOf(":");
|
|
280
281
|
return n === -1 ? "name" : S.OG.has(t.slice(0, n)) ? "property" : "name";
|
|
281
282
|
}
|
|
282
|
-
function
|
|
283
|
-
return
|
|
283
|
+
function se(e) {
|
|
284
|
+
return oe[e] || y(e);
|
|
284
285
|
}
|
|
285
|
-
function
|
|
286
|
+
function ie(e, t) {
|
|
286
287
|
var n;
|
|
287
288
|
return t === "refresh" ? `${e.seconds};url=${e.url}` : H(j(e), {
|
|
288
289
|
keyValueSeparator: "=",
|
|
289
290
|
entrySeparator: ", ",
|
|
290
291
|
resolve: ({ value: r, key: o }) => r === null ? "" : typeof r == "boolean" ? o : void 0,
|
|
291
292
|
// @ts-expect-error untyped
|
|
292
|
-
...(n =
|
|
293
|
+
...(n = K[t]) == null ? void 0 : n.unpack
|
|
293
294
|
});
|
|
294
295
|
}
|
|
295
|
-
function
|
|
296
|
+
function A(e) {
|
|
296
297
|
const t = [], n = {};
|
|
297
298
|
for (const [o, s] of Object.entries(e)) {
|
|
298
299
|
if (Array.isArray(s)) {
|
|
@@ -305,13 +306,13 @@ function $(e) {
|
|
|
305
306
|
for (const i of s)
|
|
306
307
|
if (typeof i == "object" && i !== null) {
|
|
307
308
|
const c = [], l = [];
|
|
308
|
-
for (const [
|
|
309
|
-
const
|
|
310
|
-
(
|
|
309
|
+
for (const [p, b] of Object.entries(i)) {
|
|
310
|
+
const f = `${o}${p === "url" ? "" : `:${p}`}`, a = A({ [f]: b });
|
|
311
|
+
(p === "url" ? c : l).push(...a);
|
|
311
312
|
}
|
|
312
313
|
t.push(...c, ...l);
|
|
313
314
|
} else
|
|
314
|
-
t.push(...typeof i == "string" ?
|
|
315
|
+
t.push(...typeof i == "string" ? A({ [o]: i }) : V(o, i));
|
|
315
316
|
continue;
|
|
316
317
|
}
|
|
317
318
|
if (typeof s == "object" && s)
|
|
@@ -324,60 +325,60 @@ function $(e) {
|
|
|
324
325
|
[l]: `${i}:${c}:secure_url`,
|
|
325
326
|
content: s.secureUrl
|
|
326
327
|
});
|
|
327
|
-
for (const [
|
|
328
|
-
|
|
329
|
-
[l]: `${i}:${c}:${
|
|
328
|
+
for (const [p, b] of Object.entries(s))
|
|
329
|
+
p !== "url" && p !== "secureUrl" && t.push({
|
|
330
|
+
[l]: `${i}:${c}:${p}`,
|
|
330
331
|
// @ts-expect-error untyped
|
|
331
332
|
content: b
|
|
332
333
|
});
|
|
333
|
-
} else E.has(
|
|
334
|
+
} else E.has(y(o)) ? t.push(...V(o, s)) : n[o] = L(s);
|
|
334
335
|
else
|
|
335
336
|
n[o] = s;
|
|
336
337
|
}
|
|
337
338
|
const r = Object.entries(n).map(([o, s]) => {
|
|
338
339
|
if (o === "charset")
|
|
339
340
|
return { charset: s === null ? "_null" : s };
|
|
340
|
-
const i = k(o), c =
|
|
341
|
+
const i = k(o), c = se(o), l = s === null ? "_null" : typeof s == "object" ? ie(s, o) : typeof s == "number" ? s.toString() : s;
|
|
341
342
|
return i === "http-equiv" ? { "http-equiv": c, content: l } : { [i]: c, content: l };
|
|
342
343
|
});
|
|
343
344
|
return [...t, ...r].map(
|
|
344
345
|
(o) => "content" in o && o.content === "_null" ? { ...o, content: null } : o
|
|
345
346
|
);
|
|
346
347
|
}
|
|
347
|
-
const
|
|
348
|
+
const ce = {
|
|
348
349
|
key: "flatMeta",
|
|
349
350
|
hooks: {
|
|
350
351
|
"entries:normalize": (e) => {
|
|
351
352
|
const t = [];
|
|
352
|
-
e.tags = e.tags.map((n) => n.tag !== "_flatMeta" ? n : (t.push(
|
|
353
|
+
e.tags = e.tags.map((n) => n.tag !== "_flatMeta" ? n : (t.push(A(n.props).map((r) => ({
|
|
353
354
|
...n,
|
|
354
355
|
tag: "meta",
|
|
355
356
|
props: r
|
|
356
357
|
}))), !1)).filter(Boolean).concat(...t);
|
|
357
358
|
}
|
|
358
359
|
}
|
|
359
|
-
},
|
|
360
|
+
}, ae = ["name", "property", "http-equiv"], le = /* @__PURE__ */ new Set([
|
|
360
361
|
"viewport",
|
|
361
362
|
"description",
|
|
362
363
|
"keywords",
|
|
363
364
|
"robots"
|
|
364
365
|
]);
|
|
365
|
-
function
|
|
366
|
+
function Me(e) {
|
|
366
367
|
const t = e.split(":");
|
|
367
368
|
return t.length ? E.has(t[1]) : !1;
|
|
368
369
|
}
|
|
369
|
-
function
|
|
370
|
+
function Ie(e) {
|
|
370
371
|
const { props: t, tag: n } = e;
|
|
371
|
-
if (
|
|
372
|
+
if (ne.has(n))
|
|
372
373
|
return n;
|
|
373
374
|
if (n === "link" && t.rel === "canonical")
|
|
374
375
|
return "canonical";
|
|
375
376
|
if (t.charset)
|
|
376
377
|
return "charset";
|
|
377
378
|
if (e.tag === "meta") {
|
|
378
|
-
for (const r of
|
|
379
|
+
for (const r of ae)
|
|
379
380
|
if (t[r] !== void 0) {
|
|
380
|
-
const o = t[r], s = o.includes(":"), i =
|
|
381
|
+
const o = t[r], s = o.includes(":"), i = le.has(o), l = !(s || i) && e.key ? `:key:${e.key}` : "";
|
|
381
382
|
return `${n}:${o}${l}`;
|
|
382
383
|
}
|
|
383
384
|
}
|
|
@@ -385,33 +386,33 @@ function Me(e) {
|
|
|
385
386
|
return `${n}:key:${e.key}`;
|
|
386
387
|
if (t.id)
|
|
387
388
|
return `${n}:id:${t.id}`;
|
|
388
|
-
if (
|
|
389
|
+
if (te.has(n)) {
|
|
389
390
|
const r = e.textContent || e.innerHTML;
|
|
390
391
|
if (r)
|
|
391
392
|
return `${n}:content:${r}`;
|
|
392
393
|
}
|
|
393
394
|
}
|
|
394
|
-
function
|
|
395
|
+
function Ee(e) {
|
|
395
396
|
const t = e._h || e._d;
|
|
396
397
|
if (t)
|
|
397
398
|
return t;
|
|
398
399
|
const n = e.textContent || e.innerHTML;
|
|
399
400
|
return n || `${e.tag}:${Object.entries(e.props).map(([r, o]) => `${r}:${String(o)}`).join(",")}`;
|
|
400
401
|
}
|
|
401
|
-
function
|
|
402
|
+
function $(e, t, n) {
|
|
402
403
|
typeof e === "function" && (!n || n !== "titleTemplate" && !(n[0] === "o" && n[1] === "n")) && (e = e());
|
|
403
404
|
let o;
|
|
404
405
|
if (t && (o = t(n, e)), Array.isArray(o))
|
|
405
|
-
return o.map((s) =>
|
|
406
|
+
return o.map((s) => $(s, t));
|
|
406
407
|
if ((o == null ? void 0 : o.constructor) === Object) {
|
|
407
408
|
const s = {};
|
|
408
409
|
for (const i of Object.keys(o))
|
|
409
|
-
s[i] =
|
|
410
|
+
s[i] = $(o[i], t, i);
|
|
410
411
|
return s;
|
|
411
412
|
}
|
|
412
413
|
return o;
|
|
413
414
|
}
|
|
414
|
-
function
|
|
415
|
+
function ue(e, t) {
|
|
415
416
|
const n = e === "style" ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Set();
|
|
416
417
|
function r(o) {
|
|
417
418
|
const s = o.trim();
|
|
@@ -426,17 +427,17 @@ function le(e, t) {
|
|
|
426
427
|
s && s !== "false" && (e === "style" ? n.set(o.trim(), s) : r(o));
|
|
427
428
|
}), n;
|
|
428
429
|
}
|
|
429
|
-
function
|
|
430
|
+
function pe(e, t) {
|
|
430
431
|
return e.props = e.props || {}, t ? e.tag === "templateParams" ? (e.props = t, e) : (Object.entries(t).forEach(([n, r]) => {
|
|
431
432
|
if (r === null) {
|
|
432
433
|
e.props[n] = null;
|
|
433
434
|
return;
|
|
434
435
|
}
|
|
435
436
|
if (n === "class" || n === "style") {
|
|
436
|
-
e.props[n] =
|
|
437
|
+
e.props[n] = ue(n, r);
|
|
437
438
|
return;
|
|
438
439
|
}
|
|
439
|
-
if (
|
|
440
|
+
if (re.has(n)) {
|
|
440
441
|
if (["textContent", "innerHTML"].includes(n) && typeof r == "object") {
|
|
441
442
|
let i = t.type;
|
|
442
443
|
if (t.type || (i = "application/json"), !(i != null && i.endsWith("json")) && i !== "speculationrules")
|
|
@@ -450,11 +451,11 @@ function ue(e, t) {
|
|
|
450
451
|
o === "true" || o === "" ? e.props[n] = s ? o : !0 : !r && s && o === "false" ? e.props[n] = "false" : r !== void 0 && (e.props[n] = r);
|
|
451
452
|
}), e) : e;
|
|
452
453
|
}
|
|
453
|
-
function
|
|
454
|
-
const n = typeof t == "object" && typeof t != "function" ? t : { [e === "script" || e === "noscript" || e === "style" ? "innerHTML" : "textContent"]: t }, r =
|
|
455
|
-
return r.key &&
|
|
454
|
+
function fe(e, t) {
|
|
455
|
+
const n = typeof t == "object" && typeof t != "function" ? t : { [e === "script" || e === "noscript" || e === "style" ? "innerHTML" : "textContent"]: t }, r = pe({ tag: e, props: {} }, n);
|
|
456
|
+
return r.key && ee.has(r.tag) && (r.props["data-hid"] = r._h = r.key), r.tag === "script" && typeof r.innerHTML == "object" && (r.innerHTML = JSON.stringify(r.innerHTML), r.props.type = r.props.type || "application/json"), Array.isArray(r.props.content) ? r.props.content.map((o) => ({ ...r, props: { ...r.props, content: o } })) : r;
|
|
456
457
|
}
|
|
457
|
-
function
|
|
458
|
+
function Oe(e, t) {
|
|
458
459
|
if (!e)
|
|
459
460
|
return [];
|
|
460
461
|
typeof e == "function" && (e = e());
|
|
@@ -465,15 +466,15 @@ function Ee(e, t) {
|
|
|
465
466
|
};
|
|
466
467
|
e = n(void 0, e);
|
|
467
468
|
const r = [];
|
|
468
|
-
return e =
|
|
469
|
+
return e = $(e, n), Object.entries(e || {}).forEach(([o, s]) => {
|
|
469
470
|
if (s !== void 0)
|
|
470
471
|
for (const i of Array.isArray(s) ? s : [s])
|
|
471
|
-
r.push(
|
|
472
|
+
r.push(fe(o, i));
|
|
472
473
|
}), r.flat();
|
|
473
474
|
}
|
|
474
|
-
const
|
|
475
|
+
const me = (e, t) => W(t) ? G(t) : t, q = "usehead";
|
|
475
476
|
// @__NO_SIDE_EFFECTS__
|
|
476
|
-
function
|
|
477
|
+
function Ce(e) {
|
|
477
478
|
return {
|
|
478
479
|
install(n) {
|
|
479
480
|
n.config.globalProperties.$unhead = e, n.config.globalProperties.$head = e, n.provide(q, e);
|
|
@@ -482,8 +483,8 @@ function Oe(e) {
|
|
|
482
483
|
}
|
|
483
484
|
// @__NO_SIDE_EFFECTS__
|
|
484
485
|
function z() {
|
|
485
|
-
if (
|
|
486
|
-
const e =
|
|
486
|
+
if (B()) {
|
|
487
|
+
const e = F(q);
|
|
487
488
|
if (!e)
|
|
488
489
|
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
|
489
490
|
return e;
|
|
@@ -492,24 +493,24 @@ function z() {
|
|
|
492
493
|
}
|
|
493
494
|
function O(e, t = {}) {
|
|
494
495
|
const n = t.head || /* @__PURE__ */ z();
|
|
495
|
-
return n.ssr ? n.push(e || {}, t) :
|
|
496
|
+
return n.ssr ? n.push(e || {}, t) : de(n, e, t);
|
|
496
497
|
}
|
|
497
|
-
function
|
|
498
|
+
function de(e, t, n = {}) {
|
|
498
499
|
const r = I(!1);
|
|
499
500
|
let o;
|
|
500
|
-
return
|
|
501
|
-
const i = r.value ? {} :
|
|
501
|
+
return J(() => {
|
|
502
|
+
const i = r.value ? {} : $(t, me);
|
|
502
503
|
o ? o.patch(i) : o = e.push(i, n);
|
|
503
|
-
}),
|
|
504
|
+
}), Q() && (Z(() => {
|
|
504
505
|
o.dispose();
|
|
505
|
-
}), Z(() => {
|
|
506
|
-
r.value = !0;
|
|
507
506
|
}), X(() => {
|
|
507
|
+
r.value = !0;
|
|
508
|
+
}), Y(() => {
|
|
508
509
|
r.value = !1;
|
|
509
510
|
})), o;
|
|
510
511
|
}
|
|
511
512
|
function M(e = {}, t = {}) {
|
|
512
|
-
(t.head || /* @__PURE__ */ z()).use(
|
|
513
|
+
(t.head || /* @__PURE__ */ z()).use(ce);
|
|
513
514
|
const { title: r, titleTemplate: o, ...s } = e;
|
|
514
515
|
return O({
|
|
515
516
|
title: r,
|
|
@@ -517,7 +518,7 @@ function M(e = {}, t = {}) {
|
|
|
517
518
|
_flatMeta: s
|
|
518
519
|
}, t);
|
|
519
520
|
}
|
|
520
|
-
function
|
|
521
|
+
function Ve() {
|
|
521
522
|
function e(n) {
|
|
522
523
|
M({
|
|
523
524
|
ogSiteName: n.siteName,
|
|
@@ -532,7 +533,7 @@ function Ce() {
|
|
|
532
533
|
image: i,
|
|
533
534
|
url: c,
|
|
534
535
|
type: l = "website"
|
|
535
|
-
} = n,
|
|
536
|
+
} = n, p = o && o.length > 155 ? `${o.substring(0, 152)}...` : o;
|
|
536
537
|
O({
|
|
537
538
|
title: r,
|
|
538
539
|
link: c ? [{
|
|
@@ -540,17 +541,17 @@ function Ce() {
|
|
|
540
541
|
href: c
|
|
541
542
|
}] : []
|
|
542
543
|
}), M({
|
|
543
|
-
description:
|
|
544
|
+
description: p || o,
|
|
544
545
|
keywords: s,
|
|
545
546
|
ogTitle: r,
|
|
546
|
-
ogDescription:
|
|
547
|
+
ogDescription: p || o,
|
|
547
548
|
ogType: l === "product" ? void 0 : l,
|
|
548
549
|
// product 类型不被支持,跳过
|
|
549
550
|
ogUrl: c,
|
|
550
551
|
ogImage: i,
|
|
551
552
|
twitterCard: "summary_large_image",
|
|
552
553
|
twitterTitle: r,
|
|
553
|
-
twitterDescription:
|
|
554
|
+
twitterDescription: p || o,
|
|
554
555
|
twitterImage: i
|
|
555
556
|
});
|
|
556
557
|
}
|
|
@@ -559,7 +560,7 @@ function Ce() {
|
|
|
559
560
|
setPageSEO: t
|
|
560
561
|
};
|
|
561
562
|
}
|
|
562
|
-
function
|
|
563
|
+
function _e() {
|
|
563
564
|
const e = x(), t = () => e.meta;
|
|
564
565
|
O({
|
|
565
566
|
title: h(() => t().title || ""),
|
|
@@ -600,20 +601,20 @@ function Ve() {
|
|
|
600
601
|
});
|
|
601
602
|
}
|
|
602
603
|
export {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
604
|
+
Pe as H,
|
|
605
|
+
je as U,
|
|
606
|
+
ve as V,
|
|
607
|
+
$e as a,
|
|
608
|
+
Te as b,
|
|
609
|
+
Ve as c,
|
|
610
|
+
_e as d,
|
|
611
|
+
Ie as e,
|
|
612
|
+
Ae as f,
|
|
613
|
+
pe as g,
|
|
614
|
+
Ee as h,
|
|
615
|
+
Me as i,
|
|
616
|
+
Oe as n,
|
|
617
|
+
we as u,
|
|
618
|
+
Ce as v,
|
|
619
|
+
Se as w
|
|
619
620
|
};
|