2025-03-11 13:57:38 +08:00
|
|
|
import { hasInjectionContext, inject } from 'vue';
|
2025-07-08 17:03:08 +08:00
|
|
|
import { L as tryUseNuxtApp } from './server.mjs';
|
2025-03-11 13:57:38 +08:00
|
|
|
import { u as useHead$1, h as headSymbol } from '../routes/renderer.mjs';
|
|
|
|
|
|
|
|
function injectHead(nuxtApp) {
|
|
|
|
var _a;
|
|
|
|
const nuxt = nuxtApp || tryUseNuxtApp();
|
|
|
|
return ((_a = nuxt == null ? void 0 : nuxt.ssrContext) == null ? void 0 : _a.head) || (nuxt == null ? void 0 : nuxt.runWithContext(() => {
|
|
|
|
if (hasInjectionContext()) {
|
|
|
|
return inject(headSymbol);
|
|
|
|
}
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
function useHead(input, options = {}) {
|
|
|
|
const head = injectHead(options.nuxt);
|
|
|
|
if (head) {
|
|
|
|
return useHead$1(input, { head, ...options });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export { useHead as u };
|
2025-07-08 17:03:08 +08:00
|
|
|
//# sourceMappingURL=v3-CKwuViaV.mjs.map
|