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
7.9 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/unist-util-stringify-position";
exports.ids = ["vendor-chunks/unist-util-stringify-position"];
exports.modules = {
/***/ "(ssr)/./node_modules/unist-util-stringify-position/lib/index.js":
/*!*****************************************************************!*\
!*** ./node_modules/unist-util-stringify-position/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 */ stringifyPosition: () => (/* binding */ stringifyPosition)\n/* harmony export */ });\n/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n */ /**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n */ /**\n * Serialize the positional info of a point, position (start and end points),\n * or node.\n *\n * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value]\n * Node, position, or point.\n * @returns {string}\n * Pretty printed positional info of a node (`string`).\n *\n * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)\n * or a point `l:c` (when given `point`), where `l` stands for line, `c` for\n * column, `s` for `start`, and `e` for end.\n * An empty string (`''`) is returned if the given value is neither `node`,\n * `position`, nor `point`.\n */ function stringifyPosition(value) {\n // Nothing.\n if (!value || typeof value !== \"object\") {\n return \"\";\n }\n // Node.\n if (\"position\" in value || \"type\" in value) {\n return position(value.position);\n }\n // Position.\n if (\"start\" in value || \"end\" in value) {\n return position(value);\n }\n // Point.\n if (\"line\" in value || \"column\" in value) {\n return point(value);\n }\n // ?\n return \"\";\n}\n/**\n * @param {Point | PointLike | null | undefined} point\n * @returns {string}\n */ function point(point) {\n return index(point && point.line) + \":\" + index(point && point.column);\n}\n/**\n * @param {Position | PositionLike | null | undefined} pos\n * @returns {string}\n */ function position(pos) {\n return point(pos && pos.start) + \"-\" + point(pos && pos.end);\n}\n/**\n * @param {number | null | undefined} value\n * @returns {number}\n */ function index(value) {\n return value && typeof value === \"number\" ? value : 1;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHNzcikvLi9ub2RlX21vZHVsZXMvdW5pc3QtdXRpbC1zdHJpbmdpZnktcG9zaXRpb24vbGliL2luZGV4LmpzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQTs7OztDQUlDLEdBRUQ7Ozs7Ozs7Ozs7Ozs7Q0FhQyxHQUVEOzs7Ozs7Ozs7Ozs7OztDQWNDLEdBQ00sU0FBU0Esa0JBQWtCQyxLQUFLO0lBQ3JDLFdBQVc7SUFDWCxJQUFJLENBQUNBLFNBQVMsT0FBT0EsVUFBVSxVQUFVO1FBQ3ZDLE9BQU87SUFDVDtJQUVBLFFBQVE7SUFDUixJQUFJLGNBQWNBLFNBQVMsVUFBVUEsT0FBTztRQUMxQyxPQUFPQyxTQUFTRCxNQUFNQyxRQUFRO0lBQ2hDO0lBRUEsWUFBWTtJQUNaLElBQUksV0FBV0QsU0FBUyxTQUFTQSxPQUFPO1FBQ3RDLE9BQU9DLFNBQVNEO0lBQ2xCO0lBRUEsU0FBUztJQUNULElBQUksVUFBVUEsU0FBUyxZQUFZQSxPQUFPO1FBQ3hDL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