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