import { computed, createVNode, resolveDynamicComponent, unref, mergeProps, useSSRContext } from 'vue'; import { ssrRenderVNode } from 'vue/server-renderer'; import { D as withLeadingSlash, E as withTrailingSlash, F as joinURL } from '../nitro/nitro.mjs'; import { g as useRuntimeConfig } from './server.mjs'; import 'node:http'; import 'node:https'; import 'node:events'; import 'node:buffer'; import 'node:fs'; import 'node:path'; import 'node:crypto'; import 'node:url'; import 'better-sqlite3'; import 'vue-router'; import 'ant-design-vue'; import '@babel/runtime/helpers/esm/extends'; import 'stylis'; import 'dayjs'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'unhead/server'; import 'devalue'; import 'unhead/plugins'; import 'unhead/utils'; const ImageComponent = "img"; const _sfc_main = { __name: "ProseImg", __ssrInlineRender: true, props: { src: { type: String, default: "" }, alt: { type: String, default: "" }, width: { type: [String, Number], default: void 0 }, height: { type: [String, Number], default: void 0 } }, setup(__props) { const props = __props; const refinedSrc = computed(() => { if (props.src?.startsWith("/") && !props.src.startsWith("//")) { const _base = withLeadingSlash(withTrailingSlash(useRuntimeConfig().app.baseURL)); if (_base !== "/" && !props.src.startsWith(_base)) { return joinURL(_base, props.src); } } return props.src; }); return (_ctx, _push, _parent, _attrs) => { ssrRenderVNode(_push, createVNode(resolveDynamicComponent(unref(ImageComponent)), mergeProps({ src: unref(refinedSrc), alt: props.alt, width: props.width, height: props.height }, _attrs), null), _parent); }; } }; const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../node_modules/.pnpm/@nuxtjs+mdc@0.20.2_magicast@0.5.1/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseImg.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; export { _sfc_main as default }; //# sourceMappingURL=ProseImg-CQldQXCh.mjs.map