118 lines
3.6 KiB
JavaScript
118 lines
3.6 KiB
JavaScript
import { u as useRuntimeConfig } from '../server.mjs';
|
|
import { defineComponent, mergeProps, unref, useSSRContext } from 'vue';
|
|
import { ssrRenderAttrs, ssrRenderAttr, ssrRenderSlot } from 'vue/server-renderer';
|
|
import 'ofetch';
|
|
import 'hookable';
|
|
import 'unctx';
|
|
import 'h3';
|
|
import '@unhead/ssr';
|
|
import 'unhead';
|
|
import '@unhead/shared';
|
|
import 'vue-router';
|
|
import 'ufo';
|
|
import '@intlify/core-base';
|
|
import 'cookie-es';
|
|
import 'is-https';
|
|
import 'anu-vue';
|
|
import 'defu';
|
|
import '../../nitro/node-server.mjs';
|
|
import 'node-fetch-native/polyfill';
|
|
import 'node:http';
|
|
import 'node:https';
|
|
import 'destr';
|
|
import 'unenv/runtime/fetch/index';
|
|
import 'scule';
|
|
import 'klona';
|
|
import 'ohash';
|
|
import 'unstorage';
|
|
import 'unstorage/drivers/fs';
|
|
import 'unstorage/drivers/overlay';
|
|
import 'unstorage/drivers/memory';
|
|
import 'radix3';
|
|
import 'node:fs';
|
|
import 'node:url';
|
|
import 'pathe';
|
|
import '@intlify/bundle-utils';
|
|
import 'unified';
|
|
import 'mdast-util-to-string';
|
|
import 'micromark/lib/preprocess.js';
|
|
import 'micromark/lib/postprocess.js';
|
|
import 'unist-util-stringify-position';
|
|
import 'micromark-util-character';
|
|
import 'micromark-util-chunked';
|
|
import 'micromark-util-resolve-all';
|
|
import 'remark-emoji';
|
|
import 'rehype-slug';
|
|
import 'remark-squeeze-paragraphs';
|
|
import 'rehype-external-links';
|
|
import 'remark-gfm';
|
|
import 'rehype-sort-attribute-values';
|
|
import 'rehype-sort-attributes';
|
|
import 'rehype-raw';
|
|
import 'remark-mdc';
|
|
import 'remark-parse';
|
|
import 'remark-rehype';
|
|
import 'mdast-util-to-hast';
|
|
import 'detab';
|
|
import 'unist-builder';
|
|
import 'mdurl';
|
|
import 'slugify';
|
|
import 'unist-util-position';
|
|
import 'unist-util-visit';
|
|
import 'shiki-es';
|
|
import 'unenv/runtime/npm/consola';
|
|
|
|
function _optionalChain(ops) {
|
|
let lastAccessLHS = void 0;
|
|
let value = ops[0];
|
|
let i = 1;
|
|
while (i < ops.length) {
|
|
const op = ops[i];
|
|
const fn = ops[i + 1];
|
|
i += 2;
|
|
if ((op === "optionalAccess" || op === "optionalCall") && value == null) {
|
|
return void 0;
|
|
}
|
|
if (op === "access" || op === "optionalAccess") {
|
|
lastAccessLHS = value;
|
|
value = fn(value);
|
|
} else if (op === "call" || op === "optionalCall") {
|
|
value = fn((...args) => value.call(lastAccessLHS, ...args));
|
|
lastAccessLHS = void 0;
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
const heading = 4;
|
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
__name: "ProseH4",
|
|
__ssrInlineRender: true,
|
|
props: {
|
|
"id": null
|
|
},
|
|
setup(__props) {
|
|
const { anchorLinks } = useRuntimeConfig().public.content;
|
|
const generate = _optionalChain([anchorLinks, "optionalAccess", (_) => _.depth]) >= heading && !_optionalChain([anchorLinks, "optionalAccess", (_2) => _2.exclude, "access", (_3) => _3.includes, "call", (_4) => _4(heading)]);
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
_push(`<h4${ssrRenderAttrs(mergeProps({ id: __props.id }, _attrs))}>`);
|
|
if (__props.id && unref(generate)) {
|
|
_push(`<a${ssrRenderAttr("href", `#${__props.id}`)}>`);
|
|
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
_push(`</a>`);
|
|
} else {
|
|
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
}
|
|
_push(`</h4>`);
|
|
};
|
|
}
|
|
});
|
|
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/@nuxt+content@2.6.0_rollup@2.79.1/node_modules/@nuxt/content/dist/runtime/components/Prose/ProseH4.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
|
|
export { _sfc_main as default };
|
|
//# sourceMappingURL=ProseH4-4cbcea3e.mjs.map
|