@huyooo/ui 0.14.4 → 0.14.8
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-DSxG-FRN.js +688 -0
- package/dist/analytics.d.ts +1 -0
- package/dist/analytics.js +1 -0
- package/dist/common.js +1 -1
- package/dist/composables.js +16 -16
- package/dist/head.d.ts +2 -5
- package/dist/main.d.ts +1 -1
- package/dist/main.js +549 -1007
- package/dist/style.css +1 -1
- package/dist/types/api/log.generated.d.ts +63 -0
- package/dist/types/api/ones.generated.d.ts +0 -63
- package/dist/types/api/webhook.generated.d.ts +14 -0
- package/dist/useRoutePermission-CxRJlooW.js +212 -0
- package/dist/useSEO-DFmbAH-7.js +153 -0
- package/package.json +9 -2
- package/dist/WidthContainer-B5gW9ACv.js +0 -691
- package/dist/useDownloads-BC0QyEFr.js +0 -67
- package/dist/useSEO-BWAREYk4.js +0 -669
package/dist/useSEO-BWAREYk4.js
DELETED
|
@@ -1,669 +0,0 @@
|
|
|
1
|
-
import { ref as O, computed as m, watch as B, isRef as G, toValue as F, hasInjectionContext as J, inject as Q, watchEffect as Z, getCurrentInstance as X, onBeforeUnmount as Y, onDeactivated as ee, onActivated as te } from "vue";
|
|
2
|
-
import { useRouter as _, useRoute as x } from "vue-router";
|
|
3
|
-
import { u as V } from "./useAuthkitAppsAuthPageInfo-nCjfAjiw.js";
|
|
4
|
-
import { u as U } from "./useAuthkitUsersProfile-BC5EsA2f.js";
|
|
5
|
-
const M = O({
|
|
6
|
-
key: "",
|
|
7
|
-
name: ""
|
|
8
|
-
});
|
|
9
|
-
function $e() {
|
|
10
|
-
function e(t, n) {
|
|
11
|
-
M.value.key = t, M.value.name = n;
|
|
12
|
-
}
|
|
13
|
-
return {
|
|
14
|
-
activeDoc: M,
|
|
15
|
-
setActiveDoc: e
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
function Pe(e, t = "default") {
|
|
19
|
-
const n = document;
|
|
20
|
-
if (n && typeof n.startViewTransition == "function") {
|
|
21
|
-
const r = document.body;
|
|
22
|
-
r.classList.add(`vt-${t}`), n.startViewTransition(() => {
|
|
23
|
-
try {
|
|
24
|
-
e();
|
|
25
|
-
} catch {
|
|
26
|
-
}
|
|
27
|
-
}).finished.finally(() => {
|
|
28
|
-
r.classList.remove(`vt-${t}`);
|
|
29
|
-
});
|
|
30
|
-
} else
|
|
31
|
-
e();
|
|
32
|
-
}
|
|
33
|
-
function ne(e) {
|
|
34
|
-
const t = /* @__PURE__ */ new Set();
|
|
35
|
-
t.add(e);
|
|
36
|
-
const n = e.split("/").filter(Boolean);
|
|
37
|
-
for (let r = n.length - 1; r > 0; r--)
|
|
38
|
-
t.add(`/${n.slice(0, r).join("/")}`);
|
|
39
|
-
return [...t];
|
|
40
|
-
}
|
|
41
|
-
function D(e, t) {
|
|
42
|
-
const n = new Set(t);
|
|
43
|
-
return ne(e).some((r) => n.has(r));
|
|
44
|
-
}
|
|
45
|
-
function K(e, t) {
|
|
46
|
-
return Array.isArray(e == null ? void 0 : e.menuTypes) ? e.menuTypes.includes(t) : !1;
|
|
47
|
-
}
|
|
48
|
-
function Te(e, t, n) {
|
|
49
|
-
for (let r = e.length - 1; r >= 0; r--) {
|
|
50
|
-
const o = e[r];
|
|
51
|
-
if (K(o.meta, t))
|
|
52
|
-
return o.path;
|
|
53
|
-
}
|
|
54
|
-
return n;
|
|
55
|
-
}
|
|
56
|
-
function A(e) {
|
|
57
|
-
return e.split("?")[0].split("#")[0];
|
|
58
|
-
}
|
|
59
|
-
function Me(e, t, n) {
|
|
60
|
-
const r = A(t), o = (n == null ? void 0 : n.returnParentOnChildMatch) ?? !1;
|
|
61
|
-
function s(a, c) {
|
|
62
|
-
for (const u of a) {
|
|
63
|
-
if (A(u.path) === c)
|
|
64
|
-
return u.path;
|
|
65
|
-
if (u.children && u.children.length > 0) {
|
|
66
|
-
const l = s(u.children, c);
|
|
67
|
-
if (l)
|
|
68
|
-
return o ? u.path : l;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
const i = s(e, r);
|
|
74
|
-
if (i)
|
|
75
|
-
return i;
|
|
76
|
-
for (const a of e) {
|
|
77
|
-
const c = A(a.path);
|
|
78
|
-
if (r.startsWith(c + "/") || r === c) {
|
|
79
|
-
if (a.children && a.children.length > 0)
|
|
80
|
-
for (const u of a.children) {
|
|
81
|
-
const y = A(u.path);
|
|
82
|
-
if (r.startsWith(y + "/") || r === y)
|
|
83
|
-
return o ? a.path : u.path;
|
|
84
|
-
}
|
|
85
|
-
return a.path;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return n != null && n.fallback ? n.fallback(r) : r;
|
|
89
|
-
}
|
|
90
|
-
function ve(e) {
|
|
91
|
-
const t = _(), {
|
|
92
|
-
appsData: n
|
|
93
|
-
} = V(), {
|
|
94
|
-
isLoggedIn: r,
|
|
95
|
-
userProfile: o
|
|
96
|
-
} = U(), s = m(() => {
|
|
97
|
-
var l;
|
|
98
|
-
return !r.value || !o.value ? [] : ((l = o.value.permissions) == null ? void 0 : l.map((f) => f.permissionKey)) || [];
|
|
99
|
-
});
|
|
100
|
-
function i(l) {
|
|
101
|
-
return (n.value.publicRoutes || []).some((d) => d.permissionKey === l);
|
|
102
|
-
}
|
|
103
|
-
function a(l) {
|
|
104
|
-
return r.value ? D(l, s.value) : !1;
|
|
105
|
-
}
|
|
106
|
-
function c(l) {
|
|
107
|
-
var f;
|
|
108
|
-
return {
|
|
109
|
-
path: l.path,
|
|
110
|
-
name: l.name,
|
|
111
|
-
meta: l.meta,
|
|
112
|
-
children: (f = l.children) == null ? void 0 : f.map((d) => c(d))
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
function u(l, f) {
|
|
116
|
-
const d = [];
|
|
117
|
-
for (const h of l) {
|
|
118
|
-
if (h.path === "/" || h.path === "/:catchAll(.*)")
|
|
119
|
-
continue;
|
|
120
|
-
const p = h.meta;
|
|
121
|
-
if (K(p, f)) {
|
|
122
|
-
const S = h.path;
|
|
123
|
-
if (i(S) || a(S)) {
|
|
124
|
-
const g = {
|
|
125
|
-
name: (p == null ? void 0 : p.menuName) || (p == null ? void 0 : p.title) || (typeof h.name == "string" ? h.name : h.path),
|
|
126
|
-
path: h.path,
|
|
127
|
-
icon: (p == null ? void 0 : p.menuIcon) || (p == null ? void 0 : p.icon),
|
|
128
|
-
description: (p == null ? void 0 : p.menuDescription) || (p == null ? void 0 : p.description),
|
|
129
|
-
hidden: p == null ? void 0 : p.hidden
|
|
130
|
-
};
|
|
131
|
-
if (h.children && h.children.length > 0) {
|
|
132
|
-
const T = u(h.children, f);
|
|
133
|
-
T.length > 0 && (g.children = T);
|
|
134
|
-
}
|
|
135
|
-
d.push(g);
|
|
136
|
-
}
|
|
137
|
-
} else if (h.children && h.children.length > 0) {
|
|
138
|
-
const S = u(h.children, f);
|
|
139
|
-
d.push(...S);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return d;
|
|
143
|
-
}
|
|
144
|
-
return {
|
|
145
|
-
menus: m(() => {
|
|
146
|
-
if (!e)
|
|
147
|
-
return [];
|
|
148
|
-
const l = t.getRoutes(), f = l.find((g) => g.path === "/"), d = f != null && f.children ? f.children.map((g) => c(g)) : [], h = new Set(d.map((g) => g.path)), S = l.filter((g) => g.path === "/" || g.path === "/:catchAll(.*)" || h.has(g.path) ? !1 : g.path.split("/").filter((W) => W).length === 1).map(c), C = [...d, ...S];
|
|
149
|
-
return u(C, e);
|
|
150
|
-
}),
|
|
151
|
-
isRoutePublic: i,
|
|
152
|
-
hasPermission: (l) => i(l) ? !0 : a(l),
|
|
153
|
-
isLoggedIn: r
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
function je() {
|
|
157
|
-
const e = _(), t = x(), {
|
|
158
|
-
appsData: n,
|
|
159
|
-
appsAuthPageInfoSuccess: r
|
|
160
|
-
} = V(), {
|
|
161
|
-
userProfile: o,
|
|
162
|
-
isLoggedIn: s,
|
|
163
|
-
usersProfileReady: i
|
|
164
|
-
} = U(), a = O(!1);
|
|
165
|
-
function c(l) {
|
|
166
|
-
return (n.value.publicRoutes || []).some((d) => d.permissionKey === l);
|
|
167
|
-
}
|
|
168
|
-
function u(l) {
|
|
169
|
-
var d;
|
|
170
|
-
if (!s.value || !o.value)
|
|
171
|
-
return !1;
|
|
172
|
-
const f = ((d = o.value.permissions) == null ? void 0 : d.map((h) => h.permissionKey)) || [];
|
|
173
|
-
return D(l, f);
|
|
174
|
-
}
|
|
175
|
-
function y(l) {
|
|
176
|
-
if (!r.value) {
|
|
177
|
-
a.value = !0;
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
if (a.value = !0, c(l)) {
|
|
181
|
-
a.value = !1;
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
if (!i.value) {
|
|
185
|
-
a.value = !0;
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
if (!s.value) {
|
|
189
|
-
e.replace("/"), a.value = !1;
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
u(l) || e.replace("/"), a.value = !1;
|
|
193
|
-
}
|
|
194
|
-
return B([() => t.path, r, i, s], () => {
|
|
195
|
-
y(t.path);
|
|
196
|
-
}, {
|
|
197
|
-
immediate: !0
|
|
198
|
-
}), {
|
|
199
|
-
isChecking: a,
|
|
200
|
-
isRoutePublic: c,
|
|
201
|
-
hasPermission: u
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
const re = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), oe = /* @__PURE__ */ new Set(["title", "titleTemplate", "script", "style", "noscript"]), Oe = /* @__PURE__ */ new Set([
|
|
205
|
-
"base",
|
|
206
|
-
"meta",
|
|
207
|
-
"link",
|
|
208
|
-
"style",
|
|
209
|
-
"script",
|
|
210
|
-
"noscript"
|
|
211
|
-
]), Ee = /* @__PURE__ */ new Set([
|
|
212
|
-
"title",
|
|
213
|
-
"base",
|
|
214
|
-
"htmlAttrs",
|
|
215
|
-
"bodyAttrs",
|
|
216
|
-
"meta",
|
|
217
|
-
"link",
|
|
218
|
-
"style",
|
|
219
|
-
"script",
|
|
220
|
-
"noscript"
|
|
221
|
-
]), se = /* @__PURE__ */ new Set(["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs", "templateParams"]), ie = /* @__PURE__ */ new Set(["key", "tagPosition", "tagPriority", "tagDuplicateStrategy", "innerHTML", "textContent", "processTemplateParams"]), Ie = /* @__PURE__ */ new Set(["templateParams", "htmlAttrs", "bodyAttrs"]), E = /* @__PURE__ */ new Set([
|
|
222
|
-
"theme-color",
|
|
223
|
-
"google-site-verification",
|
|
224
|
-
"og",
|
|
225
|
-
"article",
|
|
226
|
-
"book",
|
|
227
|
-
"profile",
|
|
228
|
-
"twitter",
|
|
229
|
-
"author"
|
|
230
|
-
]), w = {
|
|
231
|
-
META: /* @__PURE__ */ new Set(["twitter"]),
|
|
232
|
-
OG: /* @__PURE__ */ new Set(["og", "book", "article", "profile", "fb"]),
|
|
233
|
-
MEDIA: /* @__PURE__ */ new Set(["ogImage", "ogVideo", "ogAudio", "twitterImage"]),
|
|
234
|
-
HTTP_EQUIV: /* @__PURE__ */ new Set(["contentType", "defaultStyle", "xUaCompatible"])
|
|
235
|
-
}, ae = {
|
|
236
|
-
articleExpirationTime: "article:expiration_time",
|
|
237
|
-
articleModifiedTime: "article:modified_time",
|
|
238
|
-
articlePublishedTime: "article:published_time",
|
|
239
|
-
bookReleaseDate: "book:release_date",
|
|
240
|
-
fbAppId: "fb:app_id",
|
|
241
|
-
ogAudioSecureUrl: "og:audio:secure_url",
|
|
242
|
-
ogAudioUrl: "og:audio",
|
|
243
|
-
ogImageSecureUrl: "og:image:secure_url",
|
|
244
|
-
ogImageUrl: "og:image",
|
|
245
|
-
ogSiteName: "og:site_name",
|
|
246
|
-
ogVideoSecureUrl: "og:video:secure_url",
|
|
247
|
-
ogVideoUrl: "og:video",
|
|
248
|
-
profileFirstName: "profile:first_name",
|
|
249
|
-
profileLastName: "profile:last_name",
|
|
250
|
-
profileUsername: "profile:username",
|
|
251
|
-
msapplicationConfig: "msapplication-Config",
|
|
252
|
-
msapplicationTileColor: "msapplication-TileColor",
|
|
253
|
-
msapplicationTileImage: "msapplication-TileImage"
|
|
254
|
-
}, L = {
|
|
255
|
-
appleItunesApp: {
|
|
256
|
-
unpack: {
|
|
257
|
-
entrySeparator: ", ",
|
|
258
|
-
// @ts-expect-error untyped
|
|
259
|
-
resolve: ({ key: e, value: t }) => `${b(e)}=${t}`
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
refresh: {
|
|
263
|
-
metaKey: "http-equiv",
|
|
264
|
-
unpack: {
|
|
265
|
-
entrySeparator: ";",
|
|
266
|
-
// @ts-expect-error untyped
|
|
267
|
-
resolve: ({ key: e, value: t }) => e === "seconds" ? `${t}` : void 0
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
robots: {
|
|
271
|
-
unpack: {
|
|
272
|
-
entrySeparator: ", ",
|
|
273
|
-
// @ts-expect-error untyped
|
|
274
|
-
resolve: ({ key: e, value: t }) => typeof t == "boolean" ? b(e) : `${b(e)}:${t}`
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
contentSecurityPolicy: {
|
|
278
|
-
metaKey: "http-equiv",
|
|
279
|
-
unpack: {
|
|
280
|
-
entrySeparator: "; ",
|
|
281
|
-
// @ts-expect-error untyped
|
|
282
|
-
resolve: ({ key: e, value: t }) => `${b(e)} ${t}`
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
charset: {}
|
|
286
|
-
};
|
|
287
|
-
function b(e) {
|
|
288
|
-
const t = e.replace(/([A-Z])/g, "-$1").toLowerCase(), n = t.indexOf("-");
|
|
289
|
-
return n === -1 ? t : w.META.has(t.slice(0, n)) || w.OG.has(t.slice(0, n)) ? e.replace(/([A-Z])/g, ":$1").toLowerCase() : t;
|
|
290
|
-
}
|
|
291
|
-
function k(e) {
|
|
292
|
-
return Object.fromEntries(Object.entries(e).filter(([t, n]) => String(n) !== "false" && t));
|
|
293
|
-
}
|
|
294
|
-
function v(e) {
|
|
295
|
-
return Array.isArray(e) ? e.map(v) : !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [b(t), v(n)]));
|
|
296
|
-
}
|
|
297
|
-
function H(e, t = {}) {
|
|
298
|
-
const { entrySeparator: n = "", keyValueSeparator: r = "", wrapValue: o, resolve: s } = t;
|
|
299
|
-
return Object.entries(e).map(([i, a]) => {
|
|
300
|
-
if (s) {
|
|
301
|
-
const u = s({ key: i, value: a });
|
|
302
|
-
if (u !== void 0)
|
|
303
|
-
return u;
|
|
304
|
-
}
|
|
305
|
-
const c = typeof a == "object" ? H(a, t) : typeof a == "number" ? a.toString() : typeof a == "string" && o ? `${o}${a.replace(new RegExp(o, "g"), `\\${o}`)}${o}` : a;
|
|
306
|
-
return `${i}${r}${c}`;
|
|
307
|
-
}).join(n);
|
|
308
|
-
}
|
|
309
|
-
function R(e, t) {
|
|
310
|
-
const n = k(t), r = b(e), o = q(r);
|
|
311
|
-
if (!E.has(r))
|
|
312
|
-
return [{ [o]: r, ...n }];
|
|
313
|
-
const s = Object.fromEntries(
|
|
314
|
-
Object.entries(n).map(([i, a]) => [`${e}${i === "url" ? "" : `${i[0].toUpperCase()}${i.slice(1)}`}`, a])
|
|
315
|
-
);
|
|
316
|
-
return $(s || {}).sort((i, a) => {
|
|
317
|
-
var c, u;
|
|
318
|
-
return (((c = i[o]) == null ? void 0 : c.length) || 0) - (((u = a[o]) == null ? void 0 : u.length) || 0);
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
function q(e) {
|
|
322
|
-
var r;
|
|
323
|
-
if (((r = L[e]) == null ? void 0 : r.metaKey) === "http-equiv" || w.HTTP_EQUIV.has(e))
|
|
324
|
-
return "http-equiv";
|
|
325
|
-
const t = b(e), n = t.indexOf(":");
|
|
326
|
-
return n === -1 ? "name" : w.OG.has(t.slice(0, n)) ? "property" : "name";
|
|
327
|
-
}
|
|
328
|
-
function ce(e) {
|
|
329
|
-
return ae[e] || b(e);
|
|
330
|
-
}
|
|
331
|
-
function ue(e, t) {
|
|
332
|
-
var n;
|
|
333
|
-
return t === "refresh" ? `${e.seconds};url=${e.url}` : H(v(e), {
|
|
334
|
-
keyValueSeparator: "=",
|
|
335
|
-
entrySeparator: ", ",
|
|
336
|
-
resolve: ({ value: r, key: o }) => r === null ? "" : typeof r == "boolean" ? o : void 0,
|
|
337
|
-
// @ts-expect-error untyped
|
|
338
|
-
...(n = L[t]) == null ? void 0 : n.unpack
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
function $(e) {
|
|
342
|
-
const t = [], n = {};
|
|
343
|
-
for (const [o, s] of Object.entries(e)) {
|
|
344
|
-
if (Array.isArray(s)) {
|
|
345
|
-
if (o === "themeColor") {
|
|
346
|
-
s.forEach((i) => {
|
|
347
|
-
typeof i == "object" && i !== null && t.push({ name: "theme-color", ...i });
|
|
348
|
-
});
|
|
349
|
-
continue;
|
|
350
|
-
}
|
|
351
|
-
for (const i of s)
|
|
352
|
-
if (typeof i == "object" && i !== null) {
|
|
353
|
-
const a = [], c = [];
|
|
354
|
-
for (const [u, y] of Object.entries(i)) {
|
|
355
|
-
const l = `${o}${u === "url" ? "" : `:${u}`}`, f = $({ [l]: y });
|
|
356
|
-
(u === "url" ? a : c).push(...f);
|
|
357
|
-
}
|
|
358
|
-
t.push(...a, ...c);
|
|
359
|
-
} else
|
|
360
|
-
t.push(...typeof i == "string" ? $({ [o]: i }) : R(o, i));
|
|
361
|
-
continue;
|
|
362
|
-
}
|
|
363
|
-
if (typeof s == "object" && s)
|
|
364
|
-
if (w.MEDIA.has(o)) {
|
|
365
|
-
const i = o.startsWith("twitter") ? "twitter" : "og", a = o.replace(/^(og|twitter)/, "").toLowerCase(), c = i === "twitter" ? "name" : "property";
|
|
366
|
-
s.url && t.push({
|
|
367
|
-
[c]: `${i}:${a}`,
|
|
368
|
-
content: s.url
|
|
369
|
-
}), s.secureUrl && t.push({
|
|
370
|
-
[c]: `${i}:${a}:secure_url`,
|
|
371
|
-
content: s.secureUrl
|
|
372
|
-
});
|
|
373
|
-
for (const [u, y] of Object.entries(s))
|
|
374
|
-
u !== "url" && u !== "secureUrl" && t.push({
|
|
375
|
-
[c]: `${i}:${a}:${u}`,
|
|
376
|
-
// @ts-expect-error untyped
|
|
377
|
-
content: y
|
|
378
|
-
});
|
|
379
|
-
} else E.has(b(o)) ? t.push(...R(o, s)) : n[o] = k(s);
|
|
380
|
-
else
|
|
381
|
-
n[o] = s;
|
|
382
|
-
}
|
|
383
|
-
const r = Object.entries(n).map(([o, s]) => {
|
|
384
|
-
if (o === "charset")
|
|
385
|
-
return { charset: s === null ? "_null" : s };
|
|
386
|
-
const i = q(o), a = ce(o), c = s === null ? "_null" : typeof s == "object" ? ue(s, o) : typeof s == "number" ? s.toString() : s;
|
|
387
|
-
return i === "http-equiv" ? { "http-equiv": a, content: c } : { [i]: a, content: c };
|
|
388
|
-
});
|
|
389
|
-
return [...t, ...r].map(
|
|
390
|
-
(o) => "content" in o && o.content === "_null" ? { ...o, content: null } : o
|
|
391
|
-
);
|
|
392
|
-
}
|
|
393
|
-
const le = {
|
|
394
|
-
key: "flatMeta",
|
|
395
|
-
hooks: {
|
|
396
|
-
"entries:normalize": (e) => {
|
|
397
|
-
const t = [];
|
|
398
|
-
e.tags = e.tags.map((n) => n.tag !== "_flatMeta" ? n : (t.push($(n.props).map((r) => ({
|
|
399
|
-
...n,
|
|
400
|
-
tag: "meta",
|
|
401
|
-
props: r
|
|
402
|
-
}))), !1)).filter(Boolean).concat(...t);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}, pe = ["name", "property", "http-equiv"], fe = /* @__PURE__ */ new Set([
|
|
406
|
-
"viewport",
|
|
407
|
-
"description",
|
|
408
|
-
"keywords",
|
|
409
|
-
"robots"
|
|
410
|
-
]);
|
|
411
|
-
function Ce(e) {
|
|
412
|
-
const t = e.split(":");
|
|
413
|
-
return t.length ? E.has(t[1]) : !1;
|
|
414
|
-
}
|
|
415
|
-
function Re(e) {
|
|
416
|
-
const { props: t, tag: n } = e;
|
|
417
|
-
if (se.has(n))
|
|
418
|
-
return n;
|
|
419
|
-
if (n === "link" && t.rel === "canonical")
|
|
420
|
-
return "canonical";
|
|
421
|
-
if (t.charset)
|
|
422
|
-
return "charset";
|
|
423
|
-
if (e.tag === "meta") {
|
|
424
|
-
for (const r of pe)
|
|
425
|
-
if (t[r] !== void 0) {
|
|
426
|
-
const o = t[r], s = o && typeof o == "string" && o.includes(":"), i = o && fe.has(o), c = !(s || i) && e.key ? `:key:${e.key}` : "";
|
|
427
|
-
return `${n}:${o}${c}`;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
if (e.key)
|
|
431
|
-
return `${n}:key:${e.key}`;
|
|
432
|
-
if (t.id)
|
|
433
|
-
return `${n}:id:${t.id}`;
|
|
434
|
-
if (oe.has(n)) {
|
|
435
|
-
const r = e.textContent || e.innerHTML;
|
|
436
|
-
if (r)
|
|
437
|
-
return `${n}:content:${r}`;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
function _e(e) {
|
|
441
|
-
const t = e._h || e._d;
|
|
442
|
-
if (t)
|
|
443
|
-
return t;
|
|
444
|
-
const n = e.textContent || e.innerHTML;
|
|
445
|
-
return n || `${e.tag}:${Object.entries(e.props).map(([r, o]) => `${r}:${String(o)}`).join(",")}`;
|
|
446
|
-
}
|
|
447
|
-
function P(e, t, n) {
|
|
448
|
-
typeof e === "function" && (!n || n !== "titleTemplate" && !(n[0] === "o" && n[1] === "n")) && (e = e());
|
|
449
|
-
const o = t ? t(n, e) : e;
|
|
450
|
-
if (Array.isArray(o))
|
|
451
|
-
return o.map((s) => P(s, t));
|
|
452
|
-
if ((o == null ? void 0 : o.constructor) === Object) {
|
|
453
|
-
const s = {};
|
|
454
|
-
for (const i of Object.keys(o))
|
|
455
|
-
s[i] = P(o[i], t, i);
|
|
456
|
-
return s;
|
|
457
|
-
}
|
|
458
|
-
return o;
|
|
459
|
-
}
|
|
460
|
-
function he(e, t) {
|
|
461
|
-
const n = e === "style" ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Set();
|
|
462
|
-
function r(o) {
|
|
463
|
-
if (o == null || o === void 0)
|
|
464
|
-
return;
|
|
465
|
-
const s = String(o).trim();
|
|
466
|
-
if (s)
|
|
467
|
-
if (e === "style") {
|
|
468
|
-
const [i, ...a] = s.split(":").map((c) => c ? c.trim() : "");
|
|
469
|
-
i && a.length && n.set(i, a.join(":"));
|
|
470
|
-
} else
|
|
471
|
-
s.split(" ").filter(Boolean).forEach((i) => n.add(i));
|
|
472
|
-
}
|
|
473
|
-
return typeof t == "string" ? e === "style" ? t.split(";").forEach(r) : r(t) : Array.isArray(t) ? t.forEach((o) => r(o)) : t && typeof t == "object" && Object.entries(t).forEach(([o, s]) => {
|
|
474
|
-
s && s !== "false" && (e === "style" ? n.set(String(o).trim(), String(s)) : r(o));
|
|
475
|
-
}), n;
|
|
476
|
-
}
|
|
477
|
-
function de(e, t) {
|
|
478
|
-
return e.props = e.props || {}, t ? e.tag === "templateParams" ? (e.props = t, e) : (Object.entries(t).forEach(([n, r]) => {
|
|
479
|
-
if (r === null) {
|
|
480
|
-
e.props[n] = null;
|
|
481
|
-
return;
|
|
482
|
-
}
|
|
483
|
-
if (n === "class" || n === "style") {
|
|
484
|
-
e.props[n] = he(n, r);
|
|
485
|
-
return;
|
|
486
|
-
}
|
|
487
|
-
if (ie.has(n)) {
|
|
488
|
-
if (["textContent", "innerHTML"].includes(n) && typeof r == "object") {
|
|
489
|
-
let a = t.type;
|
|
490
|
-
if (t.type || (a = "application/json"), !(a != null && a.endsWith("json")) && a !== "speculationrules")
|
|
491
|
-
return;
|
|
492
|
-
t.type = a, e.props.type = a, e[n] = JSON.stringify(r);
|
|
493
|
-
} else
|
|
494
|
-
e[n] = r;
|
|
495
|
-
return;
|
|
496
|
-
}
|
|
497
|
-
const o = String(r), s = n.startsWith("data-"), i = e.tag === "meta" && n === "content";
|
|
498
|
-
o === "true" || o === "" ? e.props[n] = s || i ? o : !0 : !r && s && o === "false" ? e.props[n] = "false" : r !== void 0 && (e.props[n] = r);
|
|
499
|
-
}), e) : e;
|
|
500
|
-
}
|
|
501
|
-
function me(e, t) {
|
|
502
|
-
const n = typeof t == "object" && typeof t != "function" ? t : { [e === "script" || e === "noscript" || e === "style" ? "innerHTML" : "textContent"]: t }, r = de({ tag: e, props: {} }, n);
|
|
503
|
-
return r.key && re.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;
|
|
504
|
-
}
|
|
505
|
-
function xe(e, t) {
|
|
506
|
-
if (!e)
|
|
507
|
-
return [];
|
|
508
|
-
typeof e == "function" && (e = e());
|
|
509
|
-
const n = (o, s) => {
|
|
510
|
-
for (let i = 0; i < t.length; i++)
|
|
511
|
-
s = t[i](o, s);
|
|
512
|
-
return s;
|
|
513
|
-
};
|
|
514
|
-
e = n(void 0, e);
|
|
515
|
-
const r = [];
|
|
516
|
-
return e = P(e, n), Object.entries(e || {}).forEach(([o, s]) => {
|
|
517
|
-
if (s !== void 0)
|
|
518
|
-
for (const i of Array.isArray(s) ? s : [s])
|
|
519
|
-
r.push(me(o, i));
|
|
520
|
-
}), r.flat();
|
|
521
|
-
}
|
|
522
|
-
const ge = (e, t) => G(t) ? F(t) : t, z = "usehead";
|
|
523
|
-
// @__NO_SIDE_EFFECTS__
|
|
524
|
-
function Ve(e) {
|
|
525
|
-
return {
|
|
526
|
-
install(n) {
|
|
527
|
-
n.config.globalProperties.$unhead = e, n.config.globalProperties.$head = e, n.provide(z, e);
|
|
528
|
-
}
|
|
529
|
-
}.install;
|
|
530
|
-
}
|
|
531
|
-
// @__NO_SIDE_EFFECTS__
|
|
532
|
-
function N() {
|
|
533
|
-
if (J()) {
|
|
534
|
-
const e = Q(z);
|
|
535
|
-
if (!e)
|
|
536
|
-
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
|
537
|
-
return e;
|
|
538
|
-
}
|
|
539
|
-
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
|
540
|
-
}
|
|
541
|
-
function I(e, t = {}) {
|
|
542
|
-
const n = t.head || /* @__PURE__ */ N();
|
|
543
|
-
return n.ssr ? n.push(e || {}, t) : ye(n, e, t);
|
|
544
|
-
}
|
|
545
|
-
function ye(e, t, n = {}) {
|
|
546
|
-
const r = O(!1);
|
|
547
|
-
let o;
|
|
548
|
-
return Z(() => {
|
|
549
|
-
const i = r.value ? {} : P(t, ge);
|
|
550
|
-
o ? o.patch(i) : o = e.push(i, n);
|
|
551
|
-
}), X() && (Y(() => {
|
|
552
|
-
o.dispose();
|
|
553
|
-
}), ee(() => {
|
|
554
|
-
r.value = !0;
|
|
555
|
-
}), te(() => {
|
|
556
|
-
r.value = !1;
|
|
557
|
-
})), o;
|
|
558
|
-
}
|
|
559
|
-
function j(e = {}, t = {}) {
|
|
560
|
-
(t.head || /* @__PURE__ */ N()).use(le);
|
|
561
|
-
const { title: r, titleTemplate: o, ...s } = e;
|
|
562
|
-
return I({
|
|
563
|
-
title: r,
|
|
564
|
-
titleTemplate: o,
|
|
565
|
-
_flatMeta: s
|
|
566
|
-
}, t);
|
|
567
|
-
}
|
|
568
|
-
function Ue() {
|
|
569
|
-
function e(n) {
|
|
570
|
-
j({
|
|
571
|
-
ogSiteName: n.siteName,
|
|
572
|
-
ogLocale: n.locale
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
|
-
function t(n) {
|
|
576
|
-
const {
|
|
577
|
-
title: r,
|
|
578
|
-
description: o,
|
|
579
|
-
keywords: s,
|
|
580
|
-
image: i,
|
|
581
|
-
url: a,
|
|
582
|
-
type: c = "website"
|
|
583
|
-
} = n, u = o && o.length > 155 ? `${o.substring(0, 152)}...` : o;
|
|
584
|
-
I({
|
|
585
|
-
title: r,
|
|
586
|
-
link: a ? [{
|
|
587
|
-
rel: "canonical",
|
|
588
|
-
href: a
|
|
589
|
-
}] : []
|
|
590
|
-
}), j({
|
|
591
|
-
description: u || o,
|
|
592
|
-
keywords: s,
|
|
593
|
-
ogTitle: r,
|
|
594
|
-
ogDescription: u || o,
|
|
595
|
-
ogType: c === "product" ? void 0 : c,
|
|
596
|
-
// product 类型不被支持,跳过
|
|
597
|
-
ogUrl: a,
|
|
598
|
-
ogImage: i,
|
|
599
|
-
twitterCard: "summary_large_image",
|
|
600
|
-
twitterTitle: r,
|
|
601
|
-
twitterDescription: u || o,
|
|
602
|
-
twitterImage: i
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
return {
|
|
606
|
-
setGlobalSEO: e,
|
|
607
|
-
setPageSEO: t
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
|
-
function De() {
|
|
611
|
-
const e = x(), t = () => e.meta;
|
|
612
|
-
I({
|
|
613
|
-
title: m(() => t().title || ""),
|
|
614
|
-
link: m(() => {
|
|
615
|
-
const n = t();
|
|
616
|
-
return n.url ? [{
|
|
617
|
-
rel: "canonical",
|
|
618
|
-
href: n.url
|
|
619
|
-
}] : [];
|
|
620
|
-
})
|
|
621
|
-
}), j({
|
|
622
|
-
description: m(() => {
|
|
623
|
-
const r = t().description;
|
|
624
|
-
if (r)
|
|
625
|
-
return r.length > 155 ? `${r.substring(0, 152)}...` : r;
|
|
626
|
-
}),
|
|
627
|
-
keywords: m(() => t().keywords),
|
|
628
|
-
ogTitle: m(() => t().title),
|
|
629
|
-
ogDescription: m(() => {
|
|
630
|
-
const r = t().description;
|
|
631
|
-
if (r)
|
|
632
|
-
return r.length > 155 ? `${r.substring(0, 152)}...` : r;
|
|
633
|
-
}),
|
|
634
|
-
ogType: m(() => {
|
|
635
|
-
const r = t().type || "website";
|
|
636
|
-
return r === "product" ? void 0 : r;
|
|
637
|
-
}),
|
|
638
|
-
ogUrl: m(() => t().url),
|
|
639
|
-
ogImage: m(() => t().image),
|
|
640
|
-
twitterCard: "summary_large_image",
|
|
641
|
-
twitterTitle: m(() => t().title),
|
|
642
|
-
twitterDescription: m(() => {
|
|
643
|
-
const r = t().description;
|
|
644
|
-
if (r)
|
|
645
|
-
return r.length > 155 ? `${r.substring(0, 152)}...` : r;
|
|
646
|
-
}),
|
|
647
|
-
twitterImage: m(() => t().image)
|
|
648
|
-
});
|
|
649
|
-
}
|
|
650
|
-
export {
|
|
651
|
-
Oe as H,
|
|
652
|
-
Ie as U,
|
|
653
|
-
Ee as V,
|
|
654
|
-
Te as a,
|
|
655
|
-
ve as b,
|
|
656
|
-
je as c,
|
|
657
|
-
De as d,
|
|
658
|
-
Ue as e,
|
|
659
|
-
Me as f,
|
|
660
|
-
A as g,
|
|
661
|
-
Re as h,
|
|
662
|
-
Ce as i,
|
|
663
|
-
_e as j,
|
|
664
|
-
de as k,
|
|
665
|
-
xe as n,
|
|
666
|
-
$e as u,
|
|
667
|
-
Ve as v,
|
|
668
|
-
Pe as w
|
|
669
|
-
};
|