@huyooo/ui 0.5.51 → 0.5.53

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