You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
48 KiB
JavaScript

9 months ago
"use strict";
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
exports.id = "vendor-chunks/unified";
exports.ids = ["vendor-chunks/unified"];
exports.modules = {
/***/ "(ssr)/./node_modules/unified/lib/index.js":
/*!*******************************************!*\
!*** ./node_modules/unified/lib/index.js ***!
\*******************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ unified: () => (/* binding */ unified)\n/* harmony export */ });\n/* harmony import */ var bail__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! bail */ \"(ssr)/./node_modules/bail/index.js\");\n/* harmony import */ var is_buffer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-buffer */ \"(ssr)/./node_modules/is-buffer/index.js\");\n/* harmony import */ var extend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! extend */ \"(ssr)/./node_modules/extend/index.js\");\n/* harmony import */ var is_plain_obj__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! is-plain-obj */ \"(ssr)/./node_modules/is-plain-obj/index.js\");\n/* harmony import */ var trough__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! trough */ \"(ssr)/./node_modules/trough/index.js\");\n/* harmony import */ var vfile__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vfile */ \"(ssr)/./node_modules/vfile/lib/index.js\");\n/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('vfile').VFileCompatible} VFileCompatible\n * @typedef {import('vfile').VFileValue} VFileValue\n * @typedef {import('..').Processor} Processor\n * @typedef {import('..').Plugin} Plugin\n * @typedef {import('..').Preset} Preset\n * @typedef {import('..').Pluggable} Pluggable\n * @typedef {import('..').PluggableList} PluggableList\n * @typedef {import('..').Transformer} Transformer\n * @typedef {import('..').Parser} Parser\n * @typedef {import('..').Compiler} Compiler\n * @typedef {import('..').RunCallback} RunCallback\n * @typedef {import('..').ProcessCallback} ProcessCallback\n *\n * @typedef Context\n * @property {Node} tree\n * @property {VFile} file\n */ \n\n\n\n\n\n// Expose a frozen processor.\nconst unified = base().freeze();\nconst own = {}.hasOwnProperty;\n// Function to create the first processor.\n/**\n * @returns {Processor}\n */ function base() {\n const transformers = (0,trough__WEBPACK_IMPORTED_MODULE_3__.trough)();\n /** @type {Processor['attachers']} */ const attachers = [];\n /** @type {Record<string, unknown>} */ let namespace = {};\n /** @type {boolean|undefined} */ let frozen;\n let freezeIndex = -1;\n // Data management.\n // @ts-expect-error: overloads are handled.\n processor.data = data;\n processor.Parser = undefined;\n processor.Compiler = undefined;\n // Lock.\n processor.freeze = freeze;\n // Plugins.\n processor.attachers = attachers;\n // @ts-expect-error: overloads are handled.\n processor.use = use;\n // API.\n processor.parse = parse;\n processor.stringify = stringify;\n // @ts-expect-error: overloads are handled.\n processor.run = run;\n processor.runSync = runSync;\n // @ts-expect-error: overloads are handled.\n processor.process = process;\n processor.processSync = processSync;\n // Expose.\n return processor;\n // Create a new processor based on the processor in the current scope.\n /** @type {Processor} */ function processor() {\n const destination = base();\n let index = -1;\n while(++index < attachers.length){\n destination.use(...attachers[index]);\n }\n destination.data(extend__WEBPACK_IMPORTED_MODULE_1__(true, {}, namespace));\n return destination;\n }\n /**\n * @param {string|Record<string, unknown>} [key]\n * @param {unknown} [value]\n * @returns {unknown}\n */ function data(key, value) {\n if (typeof key === \"string\") {\n // Set `key`.\n if (arguments.length === 2) {\n assertUnfrozen(\"data\", frozen);\n namespace[key] = value;\n return processor;\n }\n // Get `key`.\n return own.call(namespace, key) && namespace[key] || null;\n }\n // Set space.\n if (key) {\n assertUnfrozen(\"data\", frozen);\n namespace = key;\n return processor;\n }\n
/***/ })
};
;