5308 lines
614 KiB
JavaScript
5308 lines
614 KiB
JavaScript
|
/*
|
||
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||
|
if you want to view the source visit the plugins github repository
|
||
|
*/
|
||
|
|
||
|
"use strict";
|
||
|
var __create = Object.create;
|
||
|
var __defProp = Object.defineProperty;
|
||
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||
|
var __getProtoOf = Object.getPrototypeOf;
|
||
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||
|
var __commonJS = (cb, mod) => function __require() {
|
||
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||
|
};
|
||
|
var __export = (target, all) => {
|
||
|
for (var name in all)
|
||
|
__defProp(target, name, { get: all[name], enumerable: true });
|
||
|
};
|
||
|
var __copyProps = (to, from, except, desc) => {
|
||
|
if (from && typeof from === "object" || typeof from === "function") {
|
||
|
for (let key of __getOwnPropNames(from))
|
||
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
||
|
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||
|
}
|
||
|
return to;
|
||
|
};
|
||
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||
|
// If the importer is in node compatibility mode or this is not an ESM
|
||
|
// file that has been converted to a CommonJS file using a Babel-
|
||
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
||
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
||
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||
|
mod
|
||
|
));
|
||
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||
|
|
||
|
// node_modules/.pnpm/assert-never@1.2.1/node_modules/assert-never/index.js
|
||
|
var require_assert_never = __commonJS({
|
||
|
"node_modules/.pnpm/assert-never@1.2.1/node_modules/assert-never/index.js"(exports2) {
|
||
|
"use strict";
|
||
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
||
|
function assertNever2(value, noThrow) {
|
||
|
if (noThrow) {
|
||
|
return value;
|
||
|
}
|
||
|
throw new Error("Unhandled discriminated union member: " + JSON.stringify(value));
|
||
|
}
|
||
|
exports2.assertNever = assertNever2;
|
||
|
exports2.default = assertNever2;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js
|
||
|
var require_path_browserify = __commonJS({
|
||
|
"node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
function assertPath(path) {
|
||
|
if (typeof path !== "string") {
|
||
|
throw new TypeError("Path must be a string. Received " + JSON.stringify(path));
|
||
|
}
|
||
|
}
|
||
|
function normalizeStringPosix(path, allowAboveRoot) {
|
||
|
var res = "";
|
||
|
var lastSegmentLength = 0;
|
||
|
var lastSlash = -1;
|
||
|
var dots = 0;
|
||
|
var code;
|
||
|
for (var i = 0; i <= path.length; ++i) {
|
||
|
if (i < path.length)
|
||
|
code = path.charCodeAt(i);
|
||
|
else if (code === 47)
|
||
|
break;
|
||
|
else
|
||
|
code = 47;
|
||
|
if (code === 47) {
|
||
|
if (lastSlash === i - 1 || dots === 1) {
|
||
|
} else if (lastSlash !== i - 1 && dots === 2) {
|
||
|
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
|
||
|
if (res.length > 2) {
|
||
|
var lastSlashIndex = res.lastIndexOf("/");
|
||
|
if (lastSlashIndex !== res.length - 1) {
|
||
|
if (lastSlashIndex === -1) {
|
||
|
res = "";
|
||
|
lastSegmentLength = 0;
|
||
|
} else {
|
||
|
res = res.slice(0, lastSlashIndex);
|
||
|
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
||
|
}
|
||
|
lastSlash = i;
|
||
|
dots = 0;
|
||
|
continue;
|
||
|
}
|
||
|
} else if (res.length === 2 || res.length === 1) {
|
||
|
res = "";
|
||
|
lastSegmentLength = 0;
|
||
|
lastSlash = i;
|
||
|
dots = 0;
|
||
|
continue;
|
||
|
}
|
||
|
}
|
||
|
if (allowAboveRoot) {
|
||
|
if (res.length > 0)
|
||
|
res += "/..";
|
||
|
else
|
||
|
res = "..";
|
||
|
lastSegmentLength = 2;
|
||
|
}
|
||
|
} else {
|
||
|
if (res.length > 0)
|
||
|
res += "/" + path.slice(lastSlash + 1, i);
|
||
|
else
|
||
|
res = path.slice(lastSlash + 1, i);
|
||
|
lastSegmentLength = i - lastSlash - 1;
|
||
|
}
|
||
|
lastSlash = i;
|
||
|
dots = 0;
|
||
|
} else if (code === 46 && dots !== -1) {
|
||
|
++dots;
|
||
|
} else {
|
||
|
dots = -1;
|
||
|
}
|
||
|
}
|
||
|
return res;
|
||
|
}
|
||
|
function _format(sep, pathObject) {
|
||
|
var dir = pathObject.dir || pathObject.root;
|
||
|
var base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
|
||
|
if (!dir) {
|
||
|
return base;
|
||
|
}
|
||
|
if (dir === pathObject.root) {
|
||
|
return dir + base;
|
||
|
}
|
||
|
return dir + sep + base;
|
||
|
}
|
||
|
var posix = {
|
||
|
// path.resolve([from ...], to)
|
||
|
resolve: function resolve() {
|
||
|
var resolvedPath = "";
|
||
|
var resolvedAbsolute = false;
|
||
|
var cwd;
|
||
|
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
||
|
var path;
|
||
|
if (i >= 0)
|
||
|
path = arguments[i];
|
||
|
else {
|
||
|
if (cwd === void 0)
|
||
|
cwd = process.cwd();
|
||
|
path = cwd;
|
||
|
}
|
||
|
assertPath(path);
|
||
|
if (path.length === 0) {
|
||
|
continue;
|
||
|
}
|
||
|
resolvedPath = path + "/" + resolvedPath;
|
||
|
resolvedAbsolute = path.charCodeAt(0) === 47;
|
||
|
}
|
||
|
resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
|
||
|
if (resolvedAbsolute) {
|
||
|
if (resolvedPath.length > 0)
|
||
|
return "/" + resolvedPath;
|
||
|
else
|
||
|
return "/";
|
||
|
} else if (resolvedPath.length > 0) {
|
||
|
return resolvedPath;
|
||
|
} else {
|
||
|
return ".";
|
||
|
}
|
||
|
},
|
||
|
normalize: function normalize(path) {
|
||
|
assertPath(path);
|
||
|
if (path.length === 0)
|
||
|
return ".";
|
||
|
var isAbsolute = path.charCodeAt(0) === 47;
|
||
|
var trailingSeparator = path.charCodeAt(path.length - 1) === 47;
|
||
|
path = normalizeStringPosix(path, !isAbsolute);
|
||
|
if (path.length === 0 && !isAbsolute)
|
||
|
path = ".";
|
||
|
if (path.length > 0 && trailingSeparator)
|
||
|
path += "/";
|
||
|
if (isAbsolute)
|
||
|
return "/" + path;
|
||
|
return path;
|
||
|
},
|
||
|
isAbsolute: function isAbsolute(path) {
|
||
|
assertPath(path);
|
||
|
return path.length > 0 && path.charCodeAt(0) === 47;
|
||
|
},
|
||
|
join: function join2() {
|
||
|
if (arguments.length === 0)
|
||
|
return ".";
|
||
|
var joined;
|
||
|
for (var i = 0; i < arguments.length; ++i) {
|
||
|
var arg = arguments[i];
|
||
|
assertPath(arg);
|
||
|
if (arg.length > 0) {
|
||
|
if (joined === void 0)
|
||
|
joined = arg;
|
||
|
else
|
||
|
joined += "/" + arg;
|
||
|
}
|
||
|
}
|
||
|
if (joined === void 0)
|
||
|
return ".";
|
||
|
return posix.normalize(joined);
|
||
|
},
|
||
|
relative: function relative(from, to) {
|
||
|
assertPath(from);
|
||
|
assertPath(to);
|
||
|
if (from === to)
|
||
|
return "";
|
||
|
from = posix.resolve(from);
|
||
|
to = posix.resolve(to);
|
||
|
if (from === to)
|
||
|
return "";
|
||
|
var fromStart = 1;
|
||
|
for (; fromStart < from.length; ++fromStart) {
|
||
|
if (from.charCodeAt(fromStart) !== 47)
|
||
|
break;
|
||
|
}
|
||
|
var fromEnd = from.length;
|
||
|
var fromLen = fromEnd - fromStart;
|
||
|
var toStart = 1;
|
||
|
for (; toStart < to.length; ++toStart) {
|
||
|
if (to.charCodeAt(toStart) !== 47)
|
||
|
break;
|
||
|
}
|
||
|
var toEnd = to.length;
|
||
|
var toLen = toEnd - toStart;
|
||
|
var length = fromLen < toLen ? fromLen : toLen;
|
||
|
var lastCommonSep = -1;
|
||
|
var i = 0;
|
||
|
for (; i <= length; ++i) {
|
||
|
if (i === length) {
|
||
|
if (toLen > length) {
|
||
|
if (to.charCodeAt(toStart + i) === 47) {
|
||
|
return to.slice(toStart + i + 1);
|
||
|
} else if (i === 0) {
|
||
|
return to.slice(toStart + i);
|
||
|
}
|
||
|
} else if (fromLen > length) {
|
||
|
if (from.charCodeAt(fromStart + i) === 47) {
|
||
|
lastCommonSep = i;
|
||
|
} else if (i === 0) {
|
||
|
lastCommonSep = 0;
|
||
|
}
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
var fromCode = from.charCodeAt(fromStart + i);
|
||
|
var toCode = to.charCodeAt(toStart + i);
|
||
|
if (fromCode !== toCode)
|
||
|
break;
|
||
|
else if (fromCode === 47)
|
||
|
lastCommonSep = i;
|
||
|
}
|
||
|
var out = "";
|
||
|
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
|
||
|
if (i === fromEnd || from.charCodeAt(i) === 47) {
|
||
|
if (out.length === 0)
|
||
|
out += "..";
|
||
|
else
|
||
|
out += "/..";
|
||
|
}
|
||
|
}
|
||
|
if (out.length > 0)
|
||
|
return out + to.slice(toStart + lastCommonSep);
|
||
|
else {
|
||
|
toStart += lastCommonSep;
|
||
|
if (to.charCodeAt(toStart) === 47)
|
||
|
++toStart;
|
||
|
return to.slice(toStart);
|
||
|
}
|
||
|
},
|
||
|
_makeLong: function _makeLong(path) {
|
||
|
return path;
|
||
|
},
|
||
|
dirname: function dirname3(path) {
|
||
|
assertPath(path);
|
||
|
if (path.length === 0)
|
||
|
return ".";
|
||
|
var code = path.charCodeAt(0);
|
||
|
var hasRoot = code === 47;
|
||
|
var end = -1;
|
||
|
var matchedSlash = true;
|
||
|
for (var i = path.length - 1; i >= 1; --i) {
|
||
|
code = path.charCodeAt(i);
|
||
|
if (code === 47) {
|
||
|
if (!matchedSlash) {
|
||
|
end = i;
|
||
|
break;
|
||
|
}
|
||
|
} else {
|
||
|
matchedSlash = false;
|
||
|
}
|
||
|
}
|
||
|
if (end === -1)
|
||
|
return hasRoot ? "/" : ".";
|
||
|
if (hasRoot && end === 1)
|
||
|
return "//";
|
||
|
return path.slice(0, end);
|
||
|
},
|
||
|
basename: function basename(path, ext) {
|
||
|
if (ext !== void 0 && typeof ext !== "string")
|
||
|
throw new TypeError('"ext" argument must be a string');
|
||
|
assertPath(path);
|
||
|
var start = 0;
|
||
|
var end = -1;
|
||
|
var matchedSlash = true;
|
||
|
var i;
|
||
|
if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) {
|
||
|
if (ext.length === path.length && ext === path)
|
||
|
return "";
|
||
|
var extIdx = ext.length - 1;
|
||
|
var firstNonSlashEnd = -1;
|
||
|
for (i = path.length - 1; i >= 0; --i) {
|
||
|
var code = path.charCodeAt(i);
|
||
|
if (code === 47) {
|
||
|
if (!matchedSlash) {
|
||
|
start = i + 1;
|
||
|
break;
|
||
|
}
|
||
|
} else {
|
||
|
if (firstNonSlashEnd === -1) {
|
||
|
matchedSlash = false;
|
||
|
firstNonSlashEnd = i + 1;
|
||
|
}
|
||
|
if (extIdx >= 0) {
|
||
|
if (code === ext.charCodeAt(extIdx)) {
|
||
|
if (--extIdx === -1) {
|
||
|
end = i;
|
||
|
}
|
||
|
} else {
|
||
|
extIdx = -1;
|
||
|
end = firstNonSlashEnd;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (start === end)
|
||
|
end = firstNonSlashEnd;
|
||
|
else if (end === -1)
|
||
|
end = path.length;
|
||
|
return path.slice(start, end);
|
||
|
} else {
|
||
|
for (i = path.length - 1; i >= 0; --i) {
|
||
|
if (path.charCodeAt(i) === 47) {
|
||
|
if (!matchedSlash) {
|
||
|
start = i + 1;
|
||
|
break;
|
||
|
}
|
||
|
} else if (end === -1) {
|
||
|
matchedSlash = false;
|
||
|
end = i + 1;
|
||
|
}
|
||
|
}
|
||
|
if (end === -1)
|
||
|
return "";
|
||
|
return path.slice(start, end);
|
||
|
}
|
||
|
},
|
||
|
extname: function extname2(path) {
|
||
|
assertPath(path);
|
||
|
var startDot = -1;
|
||
|
var startPart = 0;
|
||
|
var end = -1;
|
||
|
var matchedSlash = true;
|
||
|
var preDotState = 0;
|
||
|
for (var i = path.length - 1; i >= 0; --i) {
|
||
|
var code = path.charCodeAt(i);
|
||
|
if (code === 47) {
|
||
|
if (!matchedSlash) {
|
||
|
startPart = i + 1;
|
||
|
break;
|
||
|
}
|
||
|
continue;
|
||
|
}
|
||
|
if (end === -1) {
|
||
|
matchedSlash = false;
|
||
|
end = i + 1;
|
||
|
}
|
||
|
if (code === 46) {
|
||
|
if (startDot === -1)
|
||
|
startDot = i;
|
||
|
else if (preDotState !== 1)
|
||
|
preDotState = 1;
|
||
|
} else if (startDot !== -1) {
|
||
|
preDotState = -1;
|
||
|
}
|
||
|
}
|
||
|
if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
|
||
|
preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
|
||
|
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
||
|
return "";
|
||
|
}
|
||
|
return path.slice(startDot, end);
|
||
|
},
|
||
|
format: function format(pathObject) {
|
||
|
if (pathObject === null || typeof pathObject !== "object") {
|
||
|
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
|
||
|
}
|
||
|
return _format("/", pathObject);
|
||
|
},
|
||
|
parse: function parse2(path) {
|
||
|
assertPath(path);
|
||
|
var ret = { root: "", dir: "", base: "", ext: "", name: "" };
|
||
|
if (path.length === 0)
|
||
|
return ret;
|
||
|
var code = path.charCodeAt(0);
|
||
|
var isAbsolute = code === 47;
|
||
|
var start;
|
||
|
if (isAbsolute) {
|
||
|
ret.root = "/";
|
||
|
start = 1;
|
||
|
} else {
|
||
|
start = 0;
|
||
|
}
|
||
|
var startDot = -1;
|
||
|
var startPart = 0;
|
||
|
var end = -1;
|
||
|
var matchedSlash = true;
|
||
|
var i = path.length - 1;
|
||
|
var preDotState = 0;
|
||
|
for (; i >= start; --i) {
|
||
|
code = path.charCodeAt(i);
|
||
|
if (code === 47) {
|
||
|
if (!matchedSlash) {
|
||
|
startPart = i + 1;
|
||
|
break;
|
||
|
}
|
||
|
continue;
|
||
|
}
|
||
|
if (end === -1) {
|
||
|
matchedSlash = false;
|
||
|
end = i + 1;
|
||
|
}
|
||
|
if (code === 46) {
|
||
|
if (startDot === -1)
|
||
|
startDot = i;
|
||
|
else if (preDotState !== 1)
|
||
|
preDotState = 1;
|
||
|
} else if (startDot !== -1) {
|
||
|
preDotState = -1;
|
||
|
}
|
||
|
}
|
||
|
if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
|
||
|
preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
|
||
|
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
||
|
if (end !== -1) {
|
||
|
if (startPart === 0 && isAbsolute)
|
||
|
ret.base = ret.name = path.slice(1, end);
|
||
|
else
|
||
|
ret.base = ret.name = path.slice(startPart, end);
|
||
|
}
|
||
|
} else {
|
||
|
if (startPart === 0 && isAbsolute) {
|
||
|
ret.name = path.slice(1, startDot);
|
||
|
ret.base = path.slice(1, end);
|
||
|
} else {
|
||
|
ret.name = path.slice(startPart, startDot);
|
||
|
ret.base = path.slice(startPart, end);
|
||
|
}
|
||
|
ret.ext = path.slice(startDot, end);
|
||
|
}
|
||
|
if (startPart > 0)
|
||
|
ret.dir = path.slice(0, startPart - 1);
|
||
|
else if (isAbsolute)
|
||
|
ret.dir = "/";
|
||
|
return ret;
|
||
|
},
|
||
|
sep: "/",
|
||
|
delimiter: ":",
|
||
|
win32: null,
|
||
|
posix: null
|
||
|
};
|
||
|
posix.posix = posix;
|
||
|
module2.exports = posix;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// (disabled):fs
|
||
|
var require_fs = __commonJS({
|
||
|
"(disabled):fs"() {
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js
|
||
|
var require_kind_of = __commonJS({
|
||
|
"node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js"(exports2, module2) {
|
||
|
var toString = Object.prototype.toString;
|
||
|
module2.exports = function kindOf(val) {
|
||
|
if (val === void 0)
|
||
|
return "undefined";
|
||
|
if (val === null)
|
||
|
return "null";
|
||
|
var type = typeof val;
|
||
|
if (type === "boolean")
|
||
|
return "boolean";
|
||
|
if (type === "string")
|
||
|
return "string";
|
||
|
if (type === "number")
|
||
|
return "number";
|
||
|
if (type === "symbol")
|
||
|
return "symbol";
|
||
|
if (type === "function") {
|
||
|
return isGeneratorFn(val) ? "generatorfunction" : "function";
|
||
|
}
|
||
|
if (isArray(val))
|
||
|
return "array";
|
||
|
if (isBuffer(val))
|
||
|
return "buffer";
|
||
|
if (isArguments(val))
|
||
|
return "arguments";
|
||
|
if (isDate(val))
|
||
|
return "date";
|
||
|
if (isError(val))
|
||
|
return "error";
|
||
|
if (isRegexp(val))
|
||
|
return "regexp";
|
||
|
switch (ctorName(val)) {
|
||
|
case "Symbol":
|
||
|
return "symbol";
|
||
|
case "Promise":
|
||
|
return "promise";
|
||
|
case "WeakMap":
|
||
|
return "weakmap";
|
||
|
case "WeakSet":
|
||
|
return "weakset";
|
||
|
case "Map":
|
||
|
return "map";
|
||
|
case "Set":
|
||
|
return "set";
|
||
|
case "Int8Array":
|
||
|
return "int8array";
|
||
|
case "Uint8Array":
|
||
|
return "uint8array";
|
||
|
case "Uint8ClampedArray":
|
||
|
return "uint8clampedarray";
|
||
|
case "Int16Array":
|
||
|
return "int16array";
|
||
|
case "Uint16Array":
|
||
|
return "uint16array";
|
||
|
case "Int32Array":
|
||
|
return "int32array";
|
||
|
case "Uint32Array":
|
||
|
return "uint32array";
|
||
|
case "Float32Array":
|
||
|
return "float32array";
|
||
|
case "Float64Array":
|
||
|
return "float64array";
|
||
|
}
|
||
|
if (isGeneratorObj(val)) {
|
||
|
return "generator";
|
||
|
}
|
||
|
type = toString.call(val);
|
||
|
switch (type) {
|
||
|
case "[object Object]":
|
||
|
return "object";
|
||
|
case "[object Map Iterator]":
|
||
|
return "mapiterator";
|
||
|
case "[object Set Iterator]":
|
||
|
return "setiterator";
|
||
|
case "[object String Iterator]":
|
||
|
return "stringiterator";
|
||
|
case "[object Array Iterator]":
|
||
|
return "arrayiterator";
|
||
|
}
|
||
|
return type.slice(8, -1).toLowerCase().replace(/\s/g, "");
|
||
|
};
|
||
|
function ctorName(val) {
|
||
|
return typeof val.constructor === "function" ? val.constructor.name : null;
|
||
|
}
|
||
|
function isArray(val) {
|
||
|
if (Array.isArray)
|
||
|
return Array.isArray(val);
|
||
|
return val instanceof Array;
|
||
|
}
|
||
|
function isError(val) {
|
||
|
return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
|
||
|
}
|
||
|
function isDate(val) {
|
||
|
if (val instanceof Date)
|
||
|
return true;
|
||
|
return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
|
||
|
}
|
||
|
function isRegexp(val) {
|
||
|
if (val instanceof RegExp)
|
||
|
return true;
|
||
|
return typeof val.flags === "string" && typeof val.ignoreCase === "boolean" && typeof val.multiline === "boolean" && typeof val.global === "boolean";
|
||
|
}
|
||
|
function isGeneratorFn(name, val) {
|
||
|
return ctorName(name) === "GeneratorFunction";
|
||
|
}
|
||
|
function isGeneratorObj(val) {
|
||
|
return typeof val.throw === "function" && typeof val.return === "function" && typeof val.next === "function";
|
||
|
}
|
||
|
function isArguments(val) {
|
||
|
try {
|
||
|
if (typeof val.length === "number" && typeof val.callee === "function") {
|
||
|
return true;
|
||
|
}
|
||
|
} catch (err) {
|
||
|
if (err.message.indexOf("callee") !== -1) {
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
function isBuffer(val) {
|
||
|
if (val.constructor && typeof val.constructor.isBuffer === "function") {
|
||
|
return val.constructor.isBuffer(val);
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/is-extendable@0.1.1/node_modules/is-extendable/index.js
|
||
|
var require_is_extendable = __commonJS({
|
||
|
"node_modules/.pnpm/is-extendable@0.1.1/node_modules/is-extendable/index.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
module2.exports = function isExtendable(val) {
|
||
|
return typeof val !== "undefined" && val !== null && (typeof val === "object" || typeof val === "function");
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/extend-shallow@2.0.1/node_modules/extend-shallow/index.js
|
||
|
var require_extend_shallow = __commonJS({
|
||
|
"node_modules/.pnpm/extend-shallow@2.0.1/node_modules/extend-shallow/index.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var isObject = require_is_extendable();
|
||
|
module2.exports = function extend(o) {
|
||
|
if (!isObject(o)) {
|
||
|
o = {};
|
||
|
}
|
||
|
var len = arguments.length;
|
||
|
for (var i = 1; i < len; i++) {
|
||
|
var obj = arguments[i];
|
||
|
if (isObject(obj)) {
|
||
|
assign(o, obj);
|
||
|
}
|
||
|
}
|
||
|
return o;
|
||
|
};
|
||
|
function assign(a, b) {
|
||
|
for (var key in b) {
|
||
|
if (hasOwn(b, key)) {
|
||
|
a[key] = b[key];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
function hasOwn(obj, key) {
|
||
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/section-matter@1.0.0/node_modules/section-matter/index.js
|
||
|
var require_section_matter = __commonJS({
|
||
|
"node_modules/.pnpm/section-matter@1.0.0/node_modules/section-matter/index.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var typeOf = require_kind_of();
|
||
|
var extend = require_extend_shallow();
|
||
|
module2.exports = function(input, options2) {
|
||
|
if (typeof options2 === "function") {
|
||
|
options2 = { parse: options2 };
|
||
|
}
|
||
|
var file = toObject(input);
|
||
|
var defaults = { section_delimiter: "---", parse: identity };
|
||
|
var opts = extend({}, defaults, options2);
|
||
|
var delim = opts.section_delimiter;
|
||
|
var lines = file.content.split(/\r?\n/);
|
||
|
var sections = null;
|
||
|
var section = createSection();
|
||
|
var content = [];
|
||
|
var stack = [];
|
||
|
function initSections(val) {
|
||
|
file.content = val;
|
||
|
sections = [];
|
||
|
content = [];
|
||
|
}
|
||
|
function closeSection(val) {
|
||
|
if (stack.length) {
|
||
|
section.key = getKey(stack[0], delim);
|
||
|
section.content = val;
|
||
|
opts.parse(section, sections);
|
||
|
sections.push(section);
|
||
|
section = createSection();
|
||
|
content = [];
|
||
|
stack = [];
|
||
|
}
|
||
|
}
|
||
|
for (var i = 0; i < lines.length; i++) {
|
||
|
var line = lines[i];
|
||
|
var len = stack.length;
|
||
|
var ln = line.trim();
|
||
|
if (isDelimiter(ln, delim)) {
|
||
|
if (ln.length === 3 && i !== 0) {
|
||
|
if (len === 0 || len === 2) {
|
||
|
content.push(line);
|
||
|
continue;
|
||
|
}
|
||
|
stack.push(ln);
|
||
|
section.data = content.join("\n");
|
||
|
content = [];
|
||
|
continue;
|
||
|
}
|
||
|
if (sections === null) {
|
||
|
initSections(content.join("\n"));
|
||
|
}
|
||
|
if (len === 2) {
|
||
|
closeSection(content.join("\n"));
|
||
|
}
|
||
|
stack.push(ln);
|
||
|
continue;
|
||
|
}
|
||
|
content.push(line);
|
||
|
}
|
||
|
if (sections === null) {
|
||
|
initSections(content.join("\n"));
|
||
|
} else {
|
||
|
closeSection(content.join("\n"));
|
||
|
}
|
||
|
file.sections = sections;
|
||
|
return file;
|
||
|
};
|
||
|
function isDelimiter(line, delim) {
|
||
|
if (line.slice(0, delim.length) !== delim) {
|
||
|
return false;
|
||
|
}
|
||
|
if (line.charAt(delim.length + 1) === delim.slice(-1)) {
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function toObject(input) {
|
||
|
if (typeOf(input) !== "object") {
|
||
|
input = { content: input };
|
||
|
}
|
||
|
if (typeof input.content !== "string" && !isBuffer(input.content)) {
|
||
|
throw new TypeError("expected a buffer or string");
|
||
|
}
|
||
|
input.content = input.content.toString();
|
||
|
input.sections = [];
|
||
|
return input;
|
||
|
}
|
||
|
function getKey(val, delim) {
|
||
|
return val ? val.slice(delim.length).trim() : "";
|
||
|
}
|
||
|
function createSection() {
|
||
|
return { key: "", data: "", content: "" };
|
||
|
}
|
||
|
function identity(val) {
|
||
|
return val;
|
||
|
}
|
||
|
function isBuffer(val) {
|
||
|
if (val && val.constructor && typeof val.constructor.isBuffer === "function") {
|
||
|
return val.constructor.isBuffer(val);
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/common.js
|
||
|
var require_common = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/common.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
function isNothing(subject) {
|
||
|
return typeof subject === "undefined" || subject === null;
|
||
|
}
|
||
|
function isObject(subject) {
|
||
|
return typeof subject === "object" && subject !== null;
|
||
|
}
|
||
|
function toArray(sequence) {
|
||
|
if (Array.isArray(sequence))
|
||
|
return sequence;
|
||
|
else if (isNothing(sequence))
|
||
|
return [];
|
||
|
return [sequence];
|
||
|
}
|
||
|
function extend(target, source) {
|
||
|
var index, length, key, sourceKeys;
|
||
|
if (source) {
|
||
|
sourceKeys = Object.keys(source);
|
||
|
for (index = 0, length = sourceKeys.length; index < length; index += 1) {
|
||
|
key = sourceKeys[index];
|
||
|
target[key] = source[key];
|
||
|
}
|
||
|
}
|
||
|
return target;
|
||
|
}
|
||
|
function repeat(string, count) {
|
||
|
var result = "", cycle;
|
||
|
for (cycle = 0; cycle < count; cycle += 1) {
|
||
|
result += string;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
function isNegativeZero(number) {
|
||
|
return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
|
||
|
}
|
||
|
module2.exports.isNothing = isNothing;
|
||
|
module2.exports.isObject = isObject;
|
||
|
module2.exports.toArray = toArray;
|
||
|
module2.exports.repeat = repeat;
|
||
|
module2.exports.isNegativeZero = isNegativeZero;
|
||
|
module2.exports.extend = extend;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/exception.js
|
||
|
var require_exception = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/exception.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
function YAMLException(reason, mark) {
|
||
|
Error.call(this);
|
||
|
this.name = "YAMLException";
|
||
|
this.reason = reason;
|
||
|
this.mark = mark;
|
||
|
this.message = (this.reason || "(unknown reason)") + (this.mark ? " " + this.mark.toString() : "");
|
||
|
if (Error.captureStackTrace) {
|
||
|
Error.captureStackTrace(this, this.constructor);
|
||
|
} else {
|
||
|
this.stack = new Error().stack || "";
|
||
|
}
|
||
|
}
|
||
|
YAMLException.prototype = Object.create(Error.prototype);
|
||
|
YAMLException.prototype.constructor = YAMLException;
|
||
|
YAMLException.prototype.toString = function toString(compact) {
|
||
|
var result = this.name + ": ";
|
||
|
result += this.reason || "(unknown reason)";
|
||
|
if (!compact && this.mark) {
|
||
|
result += " " + this.mark.toString();
|
||
|
}
|
||
|
return result;
|
||
|
};
|
||
|
module2.exports = YAMLException;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/mark.js
|
||
|
var require_mark = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/mark.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var common = require_common();
|
||
|
function Mark(name, buffer, position, line, column) {
|
||
|
this.name = name;
|
||
|
this.buffer = buffer;
|
||
|
this.position = position;
|
||
|
this.line = line;
|
||
|
this.column = column;
|
||
|
}
|
||
|
Mark.prototype.getSnippet = function getSnippet(indent, maxLength) {
|
||
|
var head, start, tail, end, snippet;
|
||
|
if (!this.buffer)
|
||
|
return null;
|
||
|
indent = indent || 4;
|
||
|
maxLength = maxLength || 75;
|
||
|
head = "";
|
||
|
start = this.position;
|
||
|
while (start > 0 && "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(start - 1)) === -1) {
|
||
|
start -= 1;
|
||
|
if (this.position - start > maxLength / 2 - 1) {
|
||
|
head = " ... ";
|
||
|
start += 5;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
tail = "";
|
||
|
end = this.position;
|
||
|
while (end < this.buffer.length && "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(end)) === -1) {
|
||
|
end += 1;
|
||
|
if (end - this.position > maxLength / 2 - 1) {
|
||
|
tail = " ... ";
|
||
|
end -= 5;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
snippet = this.buffer.slice(start, end);
|
||
|
return common.repeat(" ", indent) + head + snippet + tail + "\n" + common.repeat(" ", indent + this.position - start + head.length) + "^";
|
||
|
};
|
||
|
Mark.prototype.toString = function toString(compact) {
|
||
|
var snippet, where = "";
|
||
|
if (this.name) {
|
||
|
where += 'in "' + this.name + '" ';
|
||
|
}
|
||
|
where += "at line " + (this.line + 1) + ", column " + (this.column + 1);
|
||
|
if (!compact) {
|
||
|
snippet = this.getSnippet();
|
||
|
if (snippet) {
|
||
|
where += ":\n" + snippet;
|
||
|
}
|
||
|
}
|
||
|
return where;
|
||
|
};
|
||
|
module2.exports = Mark;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type.js
|
||
|
var require_type = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var YAMLException = require_exception();
|
||
|
var TYPE_CONSTRUCTOR_OPTIONS = [
|
||
|
"kind",
|
||
|
"resolve",
|
||
|
"construct",
|
||
|
"instanceOf",
|
||
|
"predicate",
|
||
|
"represent",
|
||
|
"defaultStyle",
|
||
|
"styleAliases"
|
||
|
];
|
||
|
var YAML_NODE_KINDS = [
|
||
|
"scalar",
|
||
|
"sequence",
|
||
|
"mapping"
|
||
|
];
|
||
|
function compileStyleAliases(map) {
|
||
|
var result = {};
|
||
|
if (map !== null) {
|
||
|
Object.keys(map).forEach(function(style) {
|
||
|
map[style].forEach(function(alias) {
|
||
|
result[String(alias)] = style;
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
function Type(tag, options2) {
|
||
|
options2 = options2 || {};
|
||
|
Object.keys(options2).forEach(function(name) {
|
||
|
if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
|
||
|
throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
|
||
|
}
|
||
|
});
|
||
|
this.tag = tag;
|
||
|
this.kind = options2["kind"] || null;
|
||
|
this.resolve = options2["resolve"] || function() {
|
||
|
return true;
|
||
|
};
|
||
|
this.construct = options2["construct"] || function(data) {
|
||
|
return data;
|
||
|
};
|
||
|
this.instanceOf = options2["instanceOf"] || null;
|
||
|
this.predicate = options2["predicate"] || null;
|
||
|
this.represent = options2["represent"] || null;
|
||
|
this.defaultStyle = options2["defaultStyle"] || null;
|
||
|
this.styleAliases = compileStyleAliases(options2["styleAliases"] || null);
|
||
|
if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
|
||
|
throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
|
||
|
}
|
||
|
}
|
||
|
module2.exports = Type;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema.js
|
||
|
var require_schema = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var common = require_common();
|
||
|
var YAMLException = require_exception();
|
||
|
var Type = require_type();
|
||
|
function compileList(schema, name, result) {
|
||
|
var exclude = [];
|
||
|
schema.include.forEach(function(includedSchema) {
|
||
|
result = compileList(includedSchema, name, result);
|
||
|
});
|
||
|
schema[name].forEach(function(currentType) {
|
||
|
result.forEach(function(previousType, previousIndex) {
|
||
|
if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {
|
||
|
exclude.push(previousIndex);
|
||
|
}
|
||
|
});
|
||
|
result.push(currentType);
|
||
|
});
|
||
|
return result.filter(function(type, index) {
|
||
|
return exclude.indexOf(index) === -1;
|
||
|
});
|
||
|
}
|
||
|
function compileMap() {
|
||
|
var result = {
|
||
|
scalar: {},
|
||
|
sequence: {},
|
||
|
mapping: {},
|
||
|
fallback: {}
|
||
|
}, index, length;
|
||
|
function collectType(type) {
|
||
|
result[type.kind][type.tag] = result["fallback"][type.tag] = type;
|
||
|
}
|
||
|
for (index = 0, length = arguments.length; index < length; index += 1) {
|
||
|
arguments[index].forEach(collectType);
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
function Schema(definition) {
|
||
|
this.include = definition.include || [];
|
||
|
this.implicit = definition.implicit || [];
|
||
|
this.explicit = definition.explicit || [];
|
||
|
this.implicit.forEach(function(type) {
|
||
|
if (type.loadKind && type.loadKind !== "scalar") {
|
||
|
throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
||
|
}
|
||
|
});
|
||
|
this.compiledImplicit = compileList(this, "implicit", []);
|
||
|
this.compiledExplicit = compileList(this, "explicit", []);
|
||
|
this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit);
|
||
|
}
|
||
|
Schema.DEFAULT = null;
|
||
|
Schema.create = function createSchema() {
|
||
|
var schemas, types;
|
||
|
switch (arguments.length) {
|
||
|
case 1:
|
||
|
schemas = Schema.DEFAULT;
|
||
|
types = arguments[0];
|
||
|
break;
|
||
|
case 2:
|
||
|
schemas = arguments[0];
|
||
|
types = arguments[1];
|
||
|
break;
|
||
|
default:
|
||
|
throw new YAMLException("Wrong number of arguments for Schema.create function");
|
||
|
}
|
||
|
schemas = common.toArray(schemas);
|
||
|
types = common.toArray(types);
|
||
|
if (!schemas.every(function(schema) {
|
||
|
return schema instanceof Schema;
|
||
|
})) {
|
||
|
throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");
|
||
|
}
|
||
|
if (!types.every(function(type) {
|
||
|
return type instanceof Type;
|
||
|
})) {
|
||
|
throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
||
|
}
|
||
|
return new Schema({
|
||
|
include: schemas,
|
||
|
explicit: types
|
||
|
});
|
||
|
};
|
||
|
module2.exports = Schema;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/str.js
|
||
|
var require_str = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/str.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
module2.exports = new Type("tag:yaml.org,2002:str", {
|
||
|
kind: "scalar",
|
||
|
construct: function(data) {
|
||
|
return data !== null ? data : "";
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/seq.js
|
||
|
var require_seq = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/seq.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
module2.exports = new Type("tag:yaml.org,2002:seq", {
|
||
|
kind: "sequence",
|
||
|
construct: function(data) {
|
||
|
return data !== null ? data : [];
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/map.js
|
||
|
var require_map = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/map.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
module2.exports = new Type("tag:yaml.org,2002:map", {
|
||
|
kind: "mapping",
|
||
|
construct: function(data) {
|
||
|
return data !== null ? data : {};
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js
|
||
|
var require_failsafe = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Schema = require_schema();
|
||
|
module2.exports = new Schema({
|
||
|
explicit: [
|
||
|
require_str(),
|
||
|
require_seq(),
|
||
|
require_map()
|
||
|
]
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/null.js
|
||
|
var require_null = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/null.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
function resolveYamlNull(data) {
|
||
|
if (data === null)
|
||
|
return true;
|
||
|
var max = data.length;
|
||
|
return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
|
||
|
}
|
||
|
function constructYamlNull() {
|
||
|
return null;
|
||
|
}
|
||
|
function isNull(object) {
|
||
|
return object === null;
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:null", {
|
||
|
kind: "scalar",
|
||
|
resolve: resolveYamlNull,
|
||
|
construct: constructYamlNull,
|
||
|
predicate: isNull,
|
||
|
represent: {
|
||
|
canonical: function() {
|
||
|
return "~";
|
||
|
},
|
||
|
lowercase: function() {
|
||
|
return "null";
|
||
|
},
|
||
|
uppercase: function() {
|
||
|
return "NULL";
|
||
|
},
|
||
|
camelcase: function() {
|
||
|
return "Null";
|
||
|
}
|
||
|
},
|
||
|
defaultStyle: "lowercase"
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/bool.js
|
||
|
var require_bool = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/bool.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
function resolveYamlBoolean(data) {
|
||
|
if (data === null)
|
||
|
return false;
|
||
|
var max = data.length;
|
||
|
return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
|
||
|
}
|
||
|
function constructYamlBoolean(data) {
|
||
|
return data === "true" || data === "True" || data === "TRUE";
|
||
|
}
|
||
|
function isBoolean(object) {
|
||
|
return Object.prototype.toString.call(object) === "[object Boolean]";
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:bool", {
|
||
|
kind: "scalar",
|
||
|
resolve: resolveYamlBoolean,
|
||
|
construct: constructYamlBoolean,
|
||
|
predicate: isBoolean,
|
||
|
represent: {
|
||
|
lowercase: function(object) {
|
||
|
return object ? "true" : "false";
|
||
|
},
|
||
|
uppercase: function(object) {
|
||
|
return object ? "TRUE" : "FALSE";
|
||
|
},
|
||
|
camelcase: function(object) {
|
||
|
return object ? "True" : "False";
|
||
|
}
|
||
|
},
|
||
|
defaultStyle: "lowercase"
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/int.js
|
||
|
var require_int = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/int.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var common = require_common();
|
||
|
var Type = require_type();
|
||
|
function isHexCode(c) {
|
||
|
return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
|
||
|
}
|
||
|
function isOctCode(c) {
|
||
|
return 48 <= c && c <= 55;
|
||
|
}
|
||
|
function isDecCode(c) {
|
||
|
return 48 <= c && c <= 57;
|
||
|
}
|
||
|
function resolveYamlInteger(data) {
|
||
|
if (data === null)
|
||
|
return false;
|
||
|
var max = data.length, index = 0, hasDigits = false, ch;
|
||
|
if (!max)
|
||
|
return false;
|
||
|
ch = data[index];
|
||
|
if (ch === "-" || ch === "+") {
|
||
|
ch = data[++index];
|
||
|
}
|
||
|
if (ch === "0") {
|
||
|
if (index + 1 === max)
|
||
|
return true;
|
||
|
ch = data[++index];
|
||
|
if (ch === "b") {
|
||
|
index++;
|
||
|
for (; index < max; index++) {
|
||
|
ch = data[index];
|
||
|
if (ch === "_")
|
||
|
continue;
|
||
|
if (ch !== "0" && ch !== "1")
|
||
|
return false;
|
||
|
hasDigits = true;
|
||
|
}
|
||
|
return hasDigits && ch !== "_";
|
||
|
}
|
||
|
if (ch === "x") {
|
||
|
index++;
|
||
|
for (; index < max; index++) {
|
||
|
ch = data[index];
|
||
|
if (ch === "_")
|
||
|
continue;
|
||
|
if (!isHexCode(data.charCodeAt(index)))
|
||
|
return false;
|
||
|
hasDigits = true;
|
||
|
}
|
||
|
return hasDigits && ch !== "_";
|
||
|
}
|
||
|
for (; index < max; index++) {
|
||
|
ch = data[index];
|
||
|
if (ch === "_")
|
||
|
continue;
|
||
|
if (!isOctCode(data.charCodeAt(index)))
|
||
|
return false;
|
||
|
hasDigits = true;
|
||
|
}
|
||
|
return hasDigits && ch !== "_";
|
||
|
}
|
||
|
if (ch === "_")
|
||
|
return false;
|
||
|
for (; index < max; index++) {
|
||
|
ch = data[index];
|
||
|
if (ch === "_")
|
||
|
continue;
|
||
|
if (ch === ":")
|
||
|
break;
|
||
|
if (!isDecCode(data.charCodeAt(index))) {
|
||
|
return false;
|
||
|
}
|
||
|
hasDigits = true;
|
||
|
}
|
||
|
if (!hasDigits || ch === "_")
|
||
|
return false;
|
||
|
if (ch !== ":")
|
||
|
return true;
|
||
|
return /^(:[0-5]?[0-9])+$/.test(data.slice(index));
|
||
|
}
|
||
|
function constructYamlInteger(data) {
|
||
|
var value = data, sign = 1, ch, base, digits = [];
|
||
|
if (value.indexOf("_") !== -1) {
|
||
|
value = value.replace(/_/g, "");
|
||
|
}
|
||
|
ch = value[0];
|
||
|
if (ch === "-" || ch === "+") {
|
||
|
if (ch === "-")
|
||
|
sign = -1;
|
||
|
value = value.slice(1);
|
||
|
ch = value[0];
|
||
|
}
|
||
|
if (value === "0")
|
||
|
return 0;
|
||
|
if (ch === "0") {
|
||
|
if (value[1] === "b")
|
||
|
return sign * parseInt(value.slice(2), 2);
|
||
|
if (value[1] === "x")
|
||
|
return sign * parseInt(value, 16);
|
||
|
return sign * parseInt(value, 8);
|
||
|
}
|
||
|
if (value.indexOf(":") !== -1) {
|
||
|
value.split(":").forEach(function(v) {
|
||
|
digits.unshift(parseInt(v, 10));
|
||
|
});
|
||
|
value = 0;
|
||
|
base = 1;
|
||
|
digits.forEach(function(d) {
|
||
|
value += d * base;
|
||
|
base *= 60;
|
||
|
});
|
||
|
return sign * value;
|
||
|
}
|
||
|
return sign * parseInt(value, 10);
|
||
|
}
|
||
|
function isInteger(object) {
|
||
|
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object));
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:int", {
|
||
|
kind: "scalar",
|
||
|
resolve: resolveYamlInteger,
|
||
|
construct: constructYamlInteger,
|
||
|
predicate: isInteger,
|
||
|
represent: {
|
||
|
binary: function(obj) {
|
||
|
return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1);
|
||
|
},
|
||
|
octal: function(obj) {
|
||
|
return obj >= 0 ? "0" + obj.toString(8) : "-0" + obj.toString(8).slice(1);
|
||
|
},
|
||
|
decimal: function(obj) {
|
||
|
return obj.toString(10);
|
||
|
},
|
||
|
/* eslint-disable max-len */
|
||
|
hexadecimal: function(obj) {
|
||
|
return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1);
|
||
|
}
|
||
|
},
|
||
|
defaultStyle: "decimal",
|
||
|
styleAliases: {
|
||
|
binary: [2, "bin"],
|
||
|
octal: [8, "oct"],
|
||
|
decimal: [10, "dec"],
|
||
|
hexadecimal: [16, "hex"]
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/float.js
|
||
|
var require_float = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/float.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var common = require_common();
|
||
|
var Type = require_type();
|
||
|
var YAML_FLOAT_PATTERN = new RegExp(
|
||
|
// 2.5e4, 2.5 and integers
|
||
|
"^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
||
|
);
|
||
|
function resolveYamlFloat(data) {
|
||
|
if (data === null)
|
||
|
return false;
|
||
|
if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_`
|
||
|
// Probably should update regexp & check speed
|
||
|
data[data.length - 1] === "_") {
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function constructYamlFloat(data) {
|
||
|
var value, sign, base, digits;
|
||
|
value = data.replace(/_/g, "").toLowerCase();
|
||
|
sign = value[0] === "-" ? -1 : 1;
|
||
|
digits = [];
|
||
|
if ("+-".indexOf(value[0]) >= 0) {
|
||
|
value = value.slice(1);
|
||
|
}
|
||
|
if (value === ".inf") {
|
||
|
return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
|
||
|
} else if (value === ".nan") {
|
||
|
return NaN;
|
||
|
} else if (value.indexOf(":") >= 0) {
|
||
|
value.split(":").forEach(function(v) {
|
||
|
digits.unshift(parseFloat(v, 10));
|
||
|
});
|
||
|
value = 0;
|
||
|
base = 1;
|
||
|
digits.forEach(function(d) {
|
||
|
value += d * base;
|
||
|
base *= 60;
|
||
|
});
|
||
|
return sign * value;
|
||
|
}
|
||
|
return sign * parseFloat(value, 10);
|
||
|
}
|
||
|
var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
|
||
|
function representYamlFloat(object, style) {
|
||
|
var res;
|
||
|
if (isNaN(object)) {
|
||
|
switch (style) {
|
||
|
case "lowercase":
|
||
|
return ".nan";
|
||
|
case "uppercase":
|
||
|
return ".NAN";
|
||
|
case "camelcase":
|
||
|
return ".NaN";
|
||
|
}
|
||
|
} else if (Number.POSITIVE_INFINITY === object) {
|
||
|
switch (style) {
|
||
|
case "lowercase":
|
||
|
return ".inf";
|
||
|
case "uppercase":
|
||
|
return ".INF";
|
||
|
case "camelcase":
|
||
|
return ".Inf";
|
||
|
}
|
||
|
} else if (Number.NEGATIVE_INFINITY === object) {
|
||
|
switch (style) {
|
||
|
case "lowercase":
|
||
|
return "-.inf";
|
||
|
case "uppercase":
|
||
|
return "-.INF";
|
||
|
case "camelcase":
|
||
|
return "-.Inf";
|
||
|
}
|
||
|
} else if (common.isNegativeZero(object)) {
|
||
|
return "-0.0";
|
||
|
}
|
||
|
res = object.toString(10);
|
||
|
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
|
||
|
}
|
||
|
function isFloat(object) {
|
||
|
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object));
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:float", {
|
||
|
kind: "scalar",
|
||
|
resolve: resolveYamlFloat,
|
||
|
construct: constructYamlFloat,
|
||
|
predicate: isFloat,
|
||
|
represent: representYamlFloat,
|
||
|
defaultStyle: "lowercase"
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/json.js
|
||
|
var require_json = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/json.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Schema = require_schema();
|
||
|
module2.exports = new Schema({
|
||
|
include: [
|
||
|
require_failsafe()
|
||
|
],
|
||
|
implicit: [
|
||
|
require_null(),
|
||
|
require_bool(),
|
||
|
require_int(),
|
||
|
require_float()
|
||
|
]
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/core.js
|
||
|
var require_core = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/core.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Schema = require_schema();
|
||
|
module2.exports = new Schema({
|
||
|
include: [
|
||
|
require_json()
|
||
|
]
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/timestamp.js
|
||
|
var require_timestamp = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/timestamp.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
var YAML_DATE_REGEXP = new RegExp(
|
||
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
||
|
);
|
||
|
var YAML_TIMESTAMP_REGEXP = new RegExp(
|
||
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
||
|
);
|
||
|
function resolveYamlTimestamp(data) {
|
||
|
if (data === null)
|
||
|
return false;
|
||
|
if (YAML_DATE_REGEXP.exec(data) !== null)
|
||
|
return true;
|
||
|
if (YAML_TIMESTAMP_REGEXP.exec(data) !== null)
|
||
|
return true;
|
||
|
return false;
|
||
|
}
|
||
|
function constructYamlTimestamp(data) {
|
||
|
var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
|
||
|
match = YAML_DATE_REGEXP.exec(data);
|
||
|
if (match === null)
|
||
|
match = YAML_TIMESTAMP_REGEXP.exec(data);
|
||
|
if (match === null)
|
||
|
throw new Error("Date resolve error");
|
||
|
year = +match[1];
|
||
|
month = +match[2] - 1;
|
||
|
day = +match[3];
|
||
|
if (!match[4]) {
|
||
|
return new Date(Date.UTC(year, month, day));
|
||
|
}
|
||
|
hour = +match[4];
|
||
|
minute = +match[5];
|
||
|
second = +match[6];
|
||
|
if (match[7]) {
|
||
|
fraction = match[7].slice(0, 3);
|
||
|
while (fraction.length < 3) {
|
||
|
fraction += "0";
|
||
|
}
|
||
|
fraction = +fraction;
|
||
|
}
|
||
|
if (match[9]) {
|
||
|
tz_hour = +match[10];
|
||
|
tz_minute = +(match[11] || 0);
|
||
|
delta = (tz_hour * 60 + tz_minute) * 6e4;
|
||
|
if (match[9] === "-")
|
||
|
delta = -delta;
|
||
|
}
|
||
|
date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
|
||
|
if (delta)
|
||
|
date.setTime(date.getTime() - delta);
|
||
|
return date;
|
||
|
}
|
||
|
function representYamlTimestamp(object) {
|
||
|
return object.toISOString();
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:timestamp", {
|
||
|
kind: "scalar",
|
||
|
resolve: resolveYamlTimestamp,
|
||
|
construct: constructYamlTimestamp,
|
||
|
instanceOf: Date,
|
||
|
represent: representYamlTimestamp
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/merge.js
|
||
|
var require_merge = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/merge.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
function resolveYamlMerge(data) {
|
||
|
return data === "<<" || data === null;
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:merge", {
|
||
|
kind: "scalar",
|
||
|
resolve: resolveYamlMerge
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/binary.js
|
||
|
var require_binary = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/binary.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var NodeBuffer;
|
||
|
try {
|
||
|
_require = require;
|
||
|
NodeBuffer = _require("buffer").Buffer;
|
||
|
} catch (__) {
|
||
|
}
|
||
|
var _require;
|
||
|
var Type = require_type();
|
||
|
var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
||
|
function resolveYamlBinary(data) {
|
||
|
if (data === null)
|
||
|
return false;
|
||
|
var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
|
||
|
for (idx = 0; idx < max; idx++) {
|
||
|
code = map.indexOf(data.charAt(idx));
|
||
|
if (code > 64)
|
||
|
continue;
|
||
|
if (code < 0)
|
||
|
return false;
|
||
|
bitlen += 6;
|
||
|
}
|
||
|
return bitlen % 8 === 0;
|
||
|
}
|
||
|
function constructYamlBinary(data) {
|
||
|
var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = [];
|
||
|
for (idx = 0; idx < max; idx++) {
|
||
|
if (idx % 4 === 0 && idx) {
|
||
|
result.push(bits >> 16 & 255);
|
||
|
result.push(bits >> 8 & 255);
|
||
|
result.push(bits & 255);
|
||
|
}
|
||
|
bits = bits << 6 | map.indexOf(input.charAt(idx));
|
||
|
}
|
||
|
tailbits = max % 4 * 6;
|
||
|
if (tailbits === 0) {
|
||
|
result.push(bits >> 16 & 255);
|
||
|
result.push(bits >> 8 & 255);
|
||
|
result.push(bits & 255);
|
||
|
} else if (tailbits === 18) {
|
||
|
result.push(bits >> 10 & 255);
|
||
|
result.push(bits >> 2 & 255);
|
||
|
} else if (tailbits === 12) {
|
||
|
result.push(bits >> 4 & 255);
|
||
|
}
|
||
|
if (NodeBuffer) {
|
||
|
return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result);
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
function representYamlBinary(object) {
|
||
|
var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP;
|
||
|
for (idx = 0; idx < max; idx++) {
|
||
|
if (idx % 3 === 0 && idx) {
|
||
|
result += map[bits >> 18 & 63];
|
||
|
result += map[bits >> 12 & 63];
|
||
|
result += map[bits >> 6 & 63];
|
||
|
result += map[bits & 63];
|
||
|
}
|
||
|
bits = (bits << 8) + object[idx];
|
||
|
}
|
||
|
tail = max % 3;
|
||
|
if (tail === 0) {
|
||
|
result += map[bits >> 18 & 63];
|
||
|
result += map[bits >> 12 & 63];
|
||
|
result += map[bits >> 6 & 63];
|
||
|
result += map[bits & 63];
|
||
|
} else if (tail === 2) {
|
||
|
result += map[bits >> 10 & 63];
|
||
|
result += map[bits >> 4 & 63];
|
||
|
result += map[bits << 2 & 63];
|
||
|
result += map[64];
|
||
|
} else if (tail === 1) {
|
||
|
result += map[bits >> 2 & 63];
|
||
|
result += map[bits << 4 & 63];
|
||
|
result += map[64];
|
||
|
result += map[64];
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
function isBinary(object) {
|
||
|
return NodeBuffer && NodeBuffer.isBuffer(object);
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:binary", {
|
||
|
kind: "scalar",
|
||
|
resolve: resolveYamlBinary,
|
||
|
construct: constructYamlBinary,
|
||
|
predicate: isBinary,
|
||
|
represent: representYamlBinary
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/omap.js
|
||
|
var require_omap = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/omap.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
|
var _toString = Object.prototype.toString;
|
||
|
function resolveYamlOmap(data) {
|
||
|
if (data === null)
|
||
|
return true;
|
||
|
var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;
|
||
|
for (index = 0, length = object.length; index < length; index += 1) {
|
||
|
pair = object[index];
|
||
|
pairHasKey = false;
|
||
|
if (_toString.call(pair) !== "[object Object]")
|
||
|
return false;
|
||
|
for (pairKey in pair) {
|
||
|
if (_hasOwnProperty.call(pair, pairKey)) {
|
||
|
if (!pairHasKey)
|
||
|
pairHasKey = true;
|
||
|
else
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
if (!pairHasKey)
|
||
|
return false;
|
||
|
if (objectKeys.indexOf(pairKey) === -1)
|
||
|
objectKeys.push(pairKey);
|
||
|
else
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function constructYamlOmap(data) {
|
||
|
return data !== null ? data : [];
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:omap", {
|
||
|
kind: "sequence",
|
||
|
resolve: resolveYamlOmap,
|
||
|
construct: constructYamlOmap
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/pairs.js
|
||
|
var require_pairs = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/pairs.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
var _toString = Object.prototype.toString;
|
||
|
function resolveYamlPairs(data) {
|
||
|
if (data === null)
|
||
|
return true;
|
||
|
var index, length, pair, keys, result, object = data;
|
||
|
result = new Array(object.length);
|
||
|
for (index = 0, length = object.length; index < length; index += 1) {
|
||
|
pair = object[index];
|
||
|
if (_toString.call(pair) !== "[object Object]")
|
||
|
return false;
|
||
|
keys = Object.keys(pair);
|
||
|
if (keys.length !== 1)
|
||
|
return false;
|
||
|
result[index] = [keys[0], pair[keys[0]]];
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function constructYamlPairs(data) {
|
||
|
if (data === null)
|
||
|
return [];
|
||
|
var index, length, pair, keys, result, object = data;
|
||
|
result = new Array(object.length);
|
||
|
for (index = 0, length = object.length; index < length; index += 1) {
|
||
|
pair = object[index];
|
||
|
keys = Object.keys(pair);
|
||
|
result[index] = [keys[0], pair[keys[0]]];
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:pairs", {
|
||
|
kind: "sequence",
|
||
|
resolve: resolveYamlPairs,
|
||
|
construct: constructYamlPairs
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/set.js
|
||
|
var require_set = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/set.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
|
function resolveYamlSet(data) {
|
||
|
if (data === null)
|
||
|
return true;
|
||
|
var key, object = data;
|
||
|
for (key in object) {
|
||
|
if (_hasOwnProperty.call(object, key)) {
|
||
|
if (object[key] !== null)
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function constructYamlSet(data) {
|
||
|
return data !== null ? data : {};
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:set", {
|
||
|
kind: "mapping",
|
||
|
resolve: resolveYamlSet,
|
||
|
construct: constructYamlSet
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js
|
||
|
var require_default_safe = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Schema = require_schema();
|
||
|
module2.exports = new Schema({
|
||
|
include: [
|
||
|
require_core()
|
||
|
],
|
||
|
implicit: [
|
||
|
require_timestamp(),
|
||
|
require_merge()
|
||
|
],
|
||
|
explicit: [
|
||
|
require_binary(),
|
||
|
require_omap(),
|
||
|
require_pairs(),
|
||
|
require_set()
|
||
|
]
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js
|
||
|
var require_undefined = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
function resolveJavascriptUndefined() {
|
||
|
return true;
|
||
|
}
|
||
|
function constructJavascriptUndefined() {
|
||
|
return void 0;
|
||
|
}
|
||
|
function representJavascriptUndefined() {
|
||
|
return "";
|
||
|
}
|
||
|
function isUndefined(object) {
|
||
|
return typeof object === "undefined";
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:js/undefined", {
|
||
|
kind: "scalar",
|
||
|
resolve: resolveJavascriptUndefined,
|
||
|
construct: constructJavascriptUndefined,
|
||
|
predicate: isUndefined,
|
||
|
represent: representJavascriptUndefined
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js
|
||
|
var require_regexp = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Type = require_type();
|
||
|
function resolveJavascriptRegExp(data) {
|
||
|
if (data === null)
|
||
|
return false;
|
||
|
if (data.length === 0)
|
||
|
return false;
|
||
|
var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = "";
|
||
|
if (regexp[0] === "/") {
|
||
|
if (tail)
|
||
|
modifiers = tail[1];
|
||
|
if (modifiers.length > 3)
|
||
|
return false;
|
||
|
if (regexp[regexp.length - modifiers.length - 1] !== "/")
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function constructJavascriptRegExp(data) {
|
||
|
var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = "";
|
||
|
if (regexp[0] === "/") {
|
||
|
if (tail)
|
||
|
modifiers = tail[1];
|
||
|
regexp = regexp.slice(1, regexp.length - modifiers.length - 1);
|
||
|
}
|
||
|
return new RegExp(regexp, modifiers);
|
||
|
}
|
||
|
function representJavascriptRegExp(object) {
|
||
|
var result = "/" + object.source + "/";
|
||
|
if (object.global)
|
||
|
result += "g";
|
||
|
if (object.multiline)
|
||
|
result += "m";
|
||
|
if (object.ignoreCase)
|
||
|
result += "i";
|
||
|
return result;
|
||
|
}
|
||
|
function isRegExp(object) {
|
||
|
return Object.prototype.toString.call(object) === "[object RegExp]";
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:js/regexp", {
|
||
|
kind: "scalar",
|
||
|
resolve: resolveJavascriptRegExp,
|
||
|
construct: constructJavascriptRegExp,
|
||
|
predicate: isRegExp,
|
||
|
represent: representJavascriptRegExp
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/function.js
|
||
|
var require_function = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/function.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var esprima;
|
||
|
try {
|
||
|
_require = require;
|
||
|
esprima = _require("esprima");
|
||
|
} catch (_) {
|
||
|
if (typeof window !== "undefined")
|
||
|
esprima = window.esprima;
|
||
|
}
|
||
|
var _require;
|
||
|
var Type = require_type();
|
||
|
function resolveJavascriptFunction(data) {
|
||
|
if (data === null)
|
||
|
return false;
|
||
|
try {
|
||
|
var source = "(" + data + ")", ast = esprima.parse(source, { range: true });
|
||
|
if (ast.type !== "Program" || ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement" || ast.body[0].expression.type !== "ArrowFunctionExpression" && ast.body[0].expression.type !== "FunctionExpression") {
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
} catch (err) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
function constructJavascriptFunction(data) {
|
||
|
var source = "(" + data + ")", ast = esprima.parse(source, { range: true }), params = [], body;
|
||
|
if (ast.type !== "Program" || ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement" || ast.body[0].expression.type !== "ArrowFunctionExpression" && ast.body[0].expression.type !== "FunctionExpression") {
|
||
|
throw new Error("Failed to resolve function");
|
||
|
}
|
||
|
ast.body[0].expression.params.forEach(function(param) {
|
||
|
params.push(param.name);
|
||
|
});
|
||
|
body = ast.body[0].expression.body.range;
|
||
|
if (ast.body[0].expression.body.type === "BlockStatement") {
|
||
|
return new Function(params, source.slice(body[0] + 1, body[1] - 1));
|
||
|
}
|
||
|
return new Function(params, "return " + source.slice(body[0], body[1]));
|
||
|
}
|
||
|
function representJavascriptFunction(object) {
|
||
|
return object.toString();
|
||
|
}
|
||
|
function isFunction(object) {
|
||
|
return Object.prototype.toString.call(object) === "[object Function]";
|
||
|
}
|
||
|
module2.exports = new Type("tag:yaml.org,2002:js/function", {
|
||
|
kind: "scalar",
|
||
|
resolve: resolveJavascriptFunction,
|
||
|
construct: constructJavascriptFunction,
|
||
|
predicate: isFunction,
|
||
|
represent: representJavascriptFunction
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_full.js
|
||
|
var require_default_full = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_full.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var Schema = require_schema();
|
||
|
module2.exports = Schema.DEFAULT = new Schema({
|
||
|
include: [
|
||
|
require_default_safe()
|
||
|
],
|
||
|
explicit: [
|
||
|
require_undefined(),
|
||
|
require_regexp(),
|
||
|
require_function()
|
||
|
]
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/loader.js
|
||
|
var require_loader = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/loader.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var common = require_common();
|
||
|
var YAMLException = require_exception();
|
||
|
var Mark = require_mark();
|
||
|
var DEFAULT_SAFE_SCHEMA = require_default_safe();
|
||
|
var DEFAULT_FULL_SCHEMA = require_default_full();
|
||
|
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
|
var CONTEXT_FLOW_IN = 1;
|
||
|
var CONTEXT_FLOW_OUT = 2;
|
||
|
var CONTEXT_BLOCK_IN = 3;
|
||
|
var CONTEXT_BLOCK_OUT = 4;
|
||
|
var CHOMPING_CLIP = 1;
|
||
|
var CHOMPING_STRIP = 2;
|
||
|
var CHOMPING_KEEP = 3;
|
||
|
var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
|
||
|
var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
|
||
|
var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
|
||
|
var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
|
||
|
var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
||
|
function _class(obj) {
|
||
|
return Object.prototype.toString.call(obj);
|
||
|
}
|
||
|
function is_EOL(c) {
|
||
|
return c === 10 || c === 13;
|
||
|
}
|
||
|
function is_WHITE_SPACE(c) {
|
||
|
return c === 9 || c === 32;
|
||
|
}
|
||
|
function is_WS_OR_EOL(c) {
|
||
|
return c === 9 || c === 32 || c === 10 || c === 13;
|
||
|
}
|
||
|
function is_FLOW_INDICATOR(c) {
|
||
|
return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
|
||
|
}
|
||
|
function fromHexCode(c) {
|
||
|
var lc;
|
||
|
if (48 <= c && c <= 57) {
|
||
|
return c - 48;
|
||
|
}
|
||
|
lc = c | 32;
|
||
|
if (97 <= lc && lc <= 102) {
|
||
|
return lc - 97 + 10;
|
||
|
}
|
||
|
return -1;
|
||
|
}
|
||
|
function escapedHexLen(c) {
|
||
|
if (c === 120) {
|
||
|
return 2;
|
||
|
}
|
||
|
if (c === 117) {
|
||
|
return 4;
|
||
|
}
|
||
|
if (c === 85) {
|
||
|
return 8;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|
||
|
function fromDecimalCode(c) {
|
||
|
if (48 <= c && c <= 57) {
|
||
|
return c - 48;
|
||
|
}
|
||
|
return -1;
|
||
|
}
|
||
|
function simpleEscapeSequence(c) {
|
||
|
return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : "";
|
||
|
}
|
||
|
function charFromCodepoint(c) {
|
||
|
if (c <= 65535) {
|
||
|
return String.fromCharCode(c);
|
||
|
}
|
||
|
return String.fromCharCode(
|
||
|
(c - 65536 >> 10) + 55296,
|
||
|
(c - 65536 & 1023) + 56320
|
||
|
);
|
||
|
}
|
||
|
var simpleEscapeCheck = new Array(256);
|
||
|
var simpleEscapeMap = new Array(256);
|
||
|
for (i = 0; i < 256; i++) {
|
||
|
simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
|
||
|
simpleEscapeMap[i] = simpleEscapeSequence(i);
|
||
|
}
|
||
|
var i;
|
||
|
function State(input, options2) {
|
||
|
this.input = input;
|
||
|
this.filename = options2["filename"] || null;
|
||
|
this.schema = options2["schema"] || DEFAULT_FULL_SCHEMA;
|
||
|
this.onWarning = options2["onWarning"] || null;
|
||
|
this.legacy = options2["legacy"] || false;
|
||
|
this.json = options2["json"] || false;
|
||
|
this.listener = options2["listener"] || null;
|
||
|
this.implicitTypes = this.schema.compiledImplicit;
|
||
|
this.typeMap = this.schema.compiledTypeMap;
|
||
|
this.length = input.length;
|
||
|
this.position = 0;
|
||
|
this.line = 0;
|
||
|
this.lineStart = 0;
|
||
|
this.lineIndent = 0;
|
||
|
this.documents = [];
|
||
|
}
|
||
|
function generateError(state, message) {
|
||
|
return new YAMLException(
|
||
|
message,
|
||
|
new Mark(state.filename, state.input, state.position, state.line, state.position - state.lineStart)
|
||
|
);
|
||
|
}
|
||
|
function throwError(state, message) {
|
||
|
throw generateError(state, message);
|
||
|
}
|
||
|
function throwWarning(state, message) {
|
||
|
if (state.onWarning) {
|
||
|
state.onWarning.call(null, generateError(state, message));
|
||
|
}
|
||
|
}
|
||
|
var directiveHandlers = {
|
||
|
YAML: function handleYamlDirective(state, name, args) {
|
||
|
var match, major, minor;
|
||
|
if (state.version !== null) {
|
||
|
throwError(state, "duplication of %YAML directive");
|
||
|
}
|
||
|
if (args.length !== 1) {
|
||
|
throwError(state, "YAML directive accepts exactly one argument");
|
||
|
}
|
||
|
match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
|
||
|
if (match === null) {
|
||
|
throwError(state, "ill-formed argument of the YAML directive");
|
||
|
}
|
||
|
major = parseInt(match[1], 10);
|
||
|
minor = parseInt(match[2], 10);
|
||
|
if (major !== 1) {
|
||
|
throwError(state, "unacceptable YAML version of the document");
|
||
|
}
|
||
|
state.version = args[0];
|
||
|
state.checkLineBreaks = minor < 2;
|
||
|
if (minor !== 1 && minor !== 2) {
|
||
|
throwWarning(state, "unsupported YAML version of the document");
|
||
|
}
|
||
|
},
|
||
|
TAG: function handleTagDirective(state, name, args) {
|
||
|
var handle, prefix;
|
||
|
if (args.length !== 2) {
|
||
|
throwError(state, "TAG directive accepts exactly two arguments");
|
||
|
}
|
||
|
handle = args[0];
|
||
|
prefix = args[1];
|
||
|
if (!PATTERN_TAG_HANDLE.test(handle)) {
|
||
|
throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
|
||
|
}
|
||
|
if (_hasOwnProperty.call(state.tagMap, handle)) {
|
||
|
throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
|
||
|
}
|
||
|
if (!PATTERN_TAG_URI.test(prefix)) {
|
||
|
throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
|
||
|
}
|
||
|
state.tagMap[handle] = prefix;
|
||
|
}
|
||
|
};
|
||
|
function captureSegment(state, start, end, checkJson) {
|
||
|
var _position, _length, _character, _result;
|
||
|
if (start < end) {
|
||
|
_result = state.input.slice(start, end);
|
||
|
if (checkJson) {
|
||
|
for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
|
||
|
_character = _result.charCodeAt(_position);
|
||
|
if (!(_character === 9 || 32 <= _character && _character <= 1114111)) {
|
||
|
throwError(state, "expected valid JSON character");
|
||
|
}
|
||
|
}
|
||
|
} else if (PATTERN_NON_PRINTABLE.test(_result)) {
|
||
|
throwError(state, "the stream contains non-printable characters");
|
||
|
}
|
||
|
state.result += _result;
|
||
|
}
|
||
|
}
|
||
|
function mergeMappings(state, destination, source, overridableKeys) {
|
||
|
var sourceKeys, key, index, quantity;
|
||
|
if (!common.isObject(source)) {
|
||
|
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
||
|
}
|
||
|
sourceKeys = Object.keys(source);
|
||
|
for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
||
|
key = sourceKeys[index];
|
||
|
if (!_hasOwnProperty.call(destination, key)) {
|
||
|
destination[key] = source[key];
|
||
|
overridableKeys[key] = true;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) {
|
||
|
var index, quantity;
|
||
|
if (Array.isArray(keyNode)) {
|
||
|
keyNode = Array.prototype.slice.call(keyNode);
|
||
|
for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
|
||
|
if (Array.isArray(keyNode[index])) {
|
||
|
throwError(state, "nested arrays are not supported inside keys");
|
||
|
}
|
||
|
if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") {
|
||
|
keyNode[index] = "[object Object]";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") {
|
||
|
keyNode = "[object Object]";
|
||
|
}
|
||
|
keyNode = String(keyNode);
|
||
|
if (_result === null) {
|
||
|
_result = {};
|
||
|
}
|
||
|
if (keyTag === "tag:yaml.org,2002:merge") {
|
||
|
if (Array.isArray(valueNode)) {
|
||
|
for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
|
||
|
mergeMappings(state, _result, valueNode[index], overridableKeys);
|
||
|
}
|
||
|
} else {
|
||
|
mergeMappings(state, _result, valueNode, overridableKeys);
|
||
|
}
|
||
|
} else {
|
||
|
if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) {
|
||
|
state.line = startLine || state.line;
|
||
|
state.position = startPos || state.position;
|
||
|
throwError(state, "duplicated mapping key");
|
||
|
}
|
||
|
_result[keyNode] = valueNode;
|
||
|
delete overridableKeys[keyNode];
|
||
|
}
|
||
|
return _result;
|
||
|
}
|
||
|
function readLineBreak(state) {
|
||
|
var ch;
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (ch === 10) {
|
||
|
state.position++;
|
||
|
} else if (ch === 13) {
|
||
|
state.position++;
|
||
|
if (state.input.charCodeAt(state.position) === 10) {
|
||
|
state.position++;
|
||
|
}
|
||
|
} else {
|
||
|
throwError(state, "a line break is expected");
|
||
|
}
|
||
|
state.line += 1;
|
||
|
state.lineStart = state.position;
|
||
|
}
|
||
|
function skipSeparationSpace(state, allowComments, checkIndent) {
|
||
|
var lineBreaks = 0, ch = state.input.charCodeAt(state.position);
|
||
|
while (ch !== 0) {
|
||
|
while (is_WHITE_SPACE(ch)) {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
if (allowComments && ch === 35) {
|
||
|
do {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
} while (ch !== 10 && ch !== 13 && ch !== 0);
|
||
|
}
|
||
|
if (is_EOL(ch)) {
|
||
|
readLineBreak(state);
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
lineBreaks++;
|
||
|
state.lineIndent = 0;
|
||
|
while (ch === 32) {
|
||
|
state.lineIndent++;
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
} else {
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
|
||
|
throwWarning(state, "deficient indentation");
|
||
|
}
|
||
|
return lineBreaks;
|
||
|
}
|
||
|
function testDocumentSeparator(state) {
|
||
|
var _position = state.position, ch;
|
||
|
ch = state.input.charCodeAt(_position);
|
||
|
if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
|
||
|
_position += 3;
|
||
|
ch = state.input.charCodeAt(_position);
|
||
|
if (ch === 0 || is_WS_OR_EOL(ch)) {
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
function writeFoldedLines(state, count) {
|
||
|
if (count === 1) {
|
||
|
state.result += " ";
|
||
|
} else if (count > 1) {
|
||
|
state.result += common.repeat("\n", count - 1);
|
||
|
}
|
||
|
}
|
||
|
function readPlainScalar(state, nodeIndent, withinFlowCollection) {
|
||
|
var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch;
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
|
||
|
return false;
|
||
|
}
|
||
|
if (ch === 63 || ch === 45) {
|
||
|
following = state.input.charCodeAt(state.position + 1);
|
||
|
if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
state.kind = "scalar";
|
||
|
state.result = "";
|
||
|
captureStart = captureEnd = state.position;
|
||
|
hasPendingContent = false;
|
||
|
while (ch !== 0) {
|
||
|
if (ch === 58) {
|
||
|
following = state.input.charCodeAt(state.position + 1);
|
||
|
if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
|
||
|
break;
|
||
|
}
|
||
|
} else if (ch === 35) {
|
||
|
preceding = state.input.charCodeAt(state.position - 1);
|
||
|
if (is_WS_OR_EOL(preceding)) {
|
||
|
break;
|
||
|
}
|
||
|
} else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) {
|
||
|
break;
|
||
|
} else if (is_EOL(ch)) {
|
||
|
_line = state.line;
|
||
|
_lineStart = state.lineStart;
|
||
|
_lineIndent = state.lineIndent;
|
||
|
skipSeparationSpace(state, false, -1);
|
||
|
if (state.lineIndent >= nodeIndent) {
|
||
|
hasPendingContent = true;
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
continue;
|
||
|
} else {
|
||
|
state.position = captureEnd;
|
||
|
state.line = _line;
|
||
|
state.lineStart = _lineStart;
|
||
|
state.lineIndent = _lineIndent;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if (hasPendingContent) {
|
||
|
captureSegment(state, captureStart, captureEnd, false);
|
||
|
writeFoldedLines(state, state.line - _line);
|
||
|
captureStart = captureEnd = state.position;
|
||
|
hasPendingContent = false;
|
||
|
}
|
||
|
if (!is_WHITE_SPACE(ch)) {
|
||
|
captureEnd = state.position + 1;
|
||
|
}
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
captureSegment(state, captureStart, captureEnd, false);
|
||
|
if (state.result) {
|
||
|
return true;
|
||
|
}
|
||
|
state.kind = _kind;
|
||
|
state.result = _result;
|
||
|
return false;
|
||
|
}
|
||
|
function readSingleQuotedScalar(state, nodeIndent) {
|
||
|
var ch, captureStart, captureEnd;
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (ch !== 39) {
|
||
|
return false;
|
||
|
}
|
||
|
state.kind = "scalar";
|
||
|
state.result = "";
|
||
|
state.position++;
|
||
|
captureStart = captureEnd = state.position;
|
||
|
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
||
|
if (ch === 39) {
|
||
|
captureSegment(state, captureStart, state.position, true);
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
if (ch === 39) {
|
||
|
captureStart = state.position;
|
||
|
state.position++;
|
||
|
captureEnd = state.position;
|
||
|
} else {
|
||
|
return true;
|
||
|
}
|
||
|
} else if (is_EOL(ch)) {
|
||
|
captureSegment(state, captureStart, captureEnd, true);
|
||
|
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
||
|
captureStart = captureEnd = state.position;
|
||
|
} else if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
||
|
throwError(state, "unexpected end of the document within a single quoted scalar");
|
||
|
} else {
|
||
|
state.position++;
|
||
|
captureEnd = state.position;
|
||
|
}
|
||
|
}
|
||
|
throwError(state, "unexpected end of the stream within a single quoted scalar");
|
||
|
}
|
||
|
function readDoubleQuotedScalar(state, nodeIndent) {
|
||
|
var captureStart, captureEnd, hexLength, hexResult, tmp, ch;
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (ch !== 34) {
|
||
|
return false;
|
||
|
}
|
||
|
state.kind = "scalar";
|
||
|
state.result = "";
|
||
|
state.position++;
|
||
|
captureStart = captureEnd = state.position;
|
||
|
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
||
|
if (ch === 34) {
|
||
|
captureSegment(state, captureStart, state.position, true);
|
||
|
state.position++;
|
||
|
return true;
|
||
|
} else if (ch === 92) {
|
||
|
captureSegment(state, captureStart, state.position, true);
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
if (is_EOL(ch)) {
|
||
|
skipSeparationSpace(state, false, nodeIndent);
|
||
|
} else if (ch < 256 && simpleEscapeCheck[ch]) {
|
||
|
state.result += simpleEscapeMap[ch];
|
||
|
state.position++;
|
||
|
} else if ((tmp = escapedHexLen(ch)) > 0) {
|
||
|
hexLength = tmp;
|
||
|
hexResult = 0;
|
||
|
for (; hexLength > 0; hexLength--) {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
if ((tmp = fromHexCode(ch)) >= 0) {
|
||
|
hexResult = (hexResult << 4) + tmp;
|
||
|
} else {
|
||
|
throwError(state, "expected hexadecimal character");
|
||
|
}
|
||
|
}
|
||
|
state.result += charFromCodepoint(hexResult);
|
||
|
state.position++;
|
||
|
} else {
|
||
|
throwError(state, "unknown escape sequence");
|
||
|
}
|
||
|
captureStart = captureEnd = state.position;
|
||
|
} else if (is_EOL(ch)) {
|
||
|
captureSegment(state, captureStart, captureEnd, true);
|
||
|
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
||
|
captureStart = captureEnd = state.position;
|
||
|
} else if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
||
|
throwError(state, "unexpected end of the document within a double quoted scalar");
|
||
|
} else {
|
||
|
state.position++;
|
||
|
captureEnd = state.position;
|
||
|
}
|
||
|
}
|
||
|
throwError(state, "unexpected end of the stream within a double quoted scalar");
|
||
|
}
|
||
|
function readFlowCollection(state, nodeIndent) {
|
||
|
var readNext = true, _line, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = {}, keyNode, keyTag, valueNode, ch;
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (ch === 91) {
|
||
|
terminator = 93;
|
||
|
isMapping = false;
|
||
|
_result = [];
|
||
|
} else if (ch === 123) {
|
||
|
terminator = 125;
|
||
|
isMapping = true;
|
||
|
_result = {};
|
||
|
} else {
|
||
|
return false;
|
||
|
}
|
||
|
if (state.anchor !== null) {
|
||
|
state.anchorMap[state.anchor] = _result;
|
||
|
}
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
while (ch !== 0) {
|
||
|
skipSeparationSpace(state, true, nodeIndent);
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (ch === terminator) {
|
||
|
state.position++;
|
||
|
state.tag = _tag;
|
||
|
state.anchor = _anchor;
|
||
|
state.kind = isMapping ? "mapping" : "sequence";
|
||
|
state.result = _result;
|
||
|
return true;
|
||
|
} else if (!readNext) {
|
||
|
throwError(state, "missed comma between flow collection entries");
|
||
|
}
|
||
|
keyTag = keyNode = valueNode = null;
|
||
|
isPair = isExplicitPair = false;
|
||
|
if (ch === 63) {
|
||
|
following = state.input.charCodeAt(state.position + 1);
|
||
|
if (is_WS_OR_EOL(following)) {
|
||
|
isPair = isExplicitPair = true;
|
||
|
state.position++;
|
||
|
skipSeparationSpace(state, true, nodeIndent);
|
||
|
}
|
||
|
}
|
||
|
_line = state.line;
|
||
|
composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
|
||
|
keyTag = state.tag;
|
||
|
keyNode = state.result;
|
||
|
skipSeparationSpace(state, true, nodeIndent);
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if ((isExplicitPair || state.line === _line) && ch === 58) {
|
||
|
isPair = true;
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
skipSeparationSpace(state, true, nodeIndent);
|
||
|
composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
|
||
|
valueNode = state.result;
|
||
|
}
|
||
|
if (isMapping) {
|
||
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode);
|
||
|
} else if (isPair) {
|
||
|
_result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode));
|
||
|
} else {
|
||
|
_result.push(keyNode);
|
||
|
}
|
||
|
skipSeparationSpace(state, true, nodeIndent);
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (ch === 44) {
|
||
|
readNext = true;
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
} else {
|
||
|
readNext = false;
|
||
|
}
|
||
|
}
|
||
|
throwError(state, "unexpected end of the stream within a flow collection");
|
||
|
}
|
||
|
function readBlockScalar(state, nodeIndent) {
|
||
|
var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch;
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (ch === 124) {
|
||
|
folding = false;
|
||
|
} else if (ch === 62) {
|
||
|
folding = true;
|
||
|
} else {
|
||
|
return false;
|
||
|
}
|
||
|
state.kind = "scalar";
|
||
|
state.result = "";
|
||
|
while (ch !== 0) {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
if (ch === 43 || ch === 45) {
|
||
|
if (CHOMPING_CLIP === chomping) {
|
||
|
chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
|
||
|
} else {
|
||
|
throwError(state, "repeat of a chomping mode identifier");
|
||
|
}
|
||
|
} else if ((tmp = fromDecimalCode(ch)) >= 0) {
|
||
|
if (tmp === 0) {
|
||
|
throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
||
|
} else if (!detectedIndent) {
|
||
|
textIndent = nodeIndent + tmp - 1;
|
||
|
detectedIndent = true;
|
||
|
} else {
|
||
|
throwError(state, "repeat of an indentation width identifier");
|
||
|
}
|
||
|
} else {
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if (is_WHITE_SPACE(ch)) {
|
||
|
do {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
} while (is_WHITE_SPACE(ch));
|
||
|
if (ch === 35) {
|
||
|
do {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
} while (!is_EOL(ch) && ch !== 0);
|
||
|
}
|
||
|
}
|
||
|
while (ch !== 0) {
|
||
|
readLineBreak(state);
|
||
|
state.lineIndent = 0;
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) {
|
||
|
state.lineIndent++;
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
if (!detectedIndent && state.lineIndent > textIndent) {
|
||
|
textIndent = state.lineIndent;
|
||
|
}
|
||
|
if (is_EOL(ch)) {
|
||
|
emptyLines++;
|
||
|
continue;
|
||
|
}
|
||
|
if (state.lineIndent < textIndent) {
|
||
|
if (chomping === CHOMPING_KEEP) {
|
||
|
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
||
|
} else if (chomping === CHOMPING_CLIP) {
|
||
|
if (didReadContent) {
|
||
|
state.result += "\n";
|
||
|
}
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
if (folding) {
|
||
|
if (is_WHITE_SPACE(ch)) {
|
||
|
atMoreIndented = true;
|
||
|
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
||
|
} else if (atMoreIndented) {
|
||
|
atMoreIndented = false;
|
||
|
state.result += common.repeat("\n", emptyLines + 1);
|
||
|
} else if (emptyLines === 0) {
|
||
|
if (didReadContent) {
|
||
|
state.result += " ";
|
||
|
}
|
||
|
} else {
|
||
|
state.result += common.repeat("\n", emptyLines);
|
||
|
}
|
||
|
} else {
|
||
|
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
||
|
}
|
||
|
didReadContent = true;
|
||
|
detectedIndent = true;
|
||
|
emptyLines = 0;
|
||
|
captureStart = state.position;
|
||
|
while (!is_EOL(ch) && ch !== 0) {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
captureSegment(state, captureStart, state.position, false);
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function readBlockSequence(state, nodeIndent) {
|
||
|
var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch;
|
||
|
if (state.anchor !== null) {
|
||
|
state.anchorMap[state.anchor] = _result;
|
||
|
}
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
while (ch !== 0) {
|
||
|
if (ch !== 45) {
|
||
|
break;
|
||
|
}
|
||
|
following = state.input.charCodeAt(state.position + 1);
|
||
|
if (!is_WS_OR_EOL(following)) {
|
||
|
break;
|
||
|
}
|
||
|
detected = true;
|
||
|
state.position++;
|
||
|
if (skipSeparationSpace(state, true, -1)) {
|
||
|
if (state.lineIndent <= nodeIndent) {
|
||
|
_result.push(null);
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
continue;
|
||
|
}
|
||
|
}
|
||
|
_line = state.line;
|
||
|
composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
|
||
|
_result.push(state.result);
|
||
|
skipSeparationSpace(state, true, -1);
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
|
||
|
throwError(state, "bad indentation of a sequence entry");
|
||
|
} else if (state.lineIndent < nodeIndent) {
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if (detected) {
|
||
|
state.tag = _tag;
|
||
|
state.anchor = _anchor;
|
||
|
state.kind = "sequence";
|
||
|
state.result = _result;
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
function readBlockMapping(state, nodeIndent, flowIndent) {
|
||
|
var following, allowCompact, _line, _pos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = {}, keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
|
||
|
if (state.anchor !== null) {
|
||
|
state.anchorMap[state.anchor] = _result;
|
||
|
}
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
while (ch !== 0) {
|
||
|
following = state.input.charCodeAt(state.position + 1);
|
||
|
_line = state.line;
|
||
|
_pos = state.position;
|
||
|
if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) {
|
||
|
if (ch === 63) {
|
||
|
if (atExplicitKey) {
|
||
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
|
||
|
keyTag = keyNode = valueNode = null;
|
||
|
}
|
||
|
detected = true;
|
||
|
atExplicitKey = true;
|
||
|
allowCompact = true;
|
||
|
} else if (atExplicitKey) {
|
||
|
atExplicitKey = false;
|
||
|
allowCompact = true;
|
||
|
} else {
|
||
|
throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
|
||
|
}
|
||
|
state.position += 1;
|
||
|
ch = following;
|
||
|
} else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
|
||
|
if (state.line === _line) {
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
while (is_WHITE_SPACE(ch)) {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
if (ch === 58) {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
if (!is_WS_OR_EOL(ch)) {
|
||
|
throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
|
||
|
}
|
||
|
if (atExplicitKey) {
|
||
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
|
||
|
keyTag = keyNode = valueNode = null;
|
||
|
}
|
||
|
detected = true;
|
||
|
atExplicitKey = false;
|
||
|
allowCompact = false;
|
||
|
keyTag = state.tag;
|
||
|
keyNode = state.result;
|
||
|
} else if (detected) {
|
||
|
throwError(state, "can not read an implicit mapping pair; a colon is missed");
|
||
|
} else {
|
||
|
state.tag = _tag;
|
||
|
state.anchor = _anchor;
|
||
|
return true;
|
||
|
}
|
||
|
} else if (detected) {
|
||
|
throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
||
|
} else {
|
||
|
state.tag = _tag;
|
||
|
state.anchor = _anchor;
|
||
|
return true;
|
||
|
}
|
||
|
} else {
|
||
|
break;
|
||
|
}
|
||
|
if (state.line === _line || state.lineIndent > nodeIndent) {
|
||
|
if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
|
||
|
if (atExplicitKey) {
|
||
|
keyNode = state.result;
|
||
|
} else {
|
||
|
valueNode = state.result;
|
||
|
}
|
||
|
}
|
||
|
if (!atExplicitKey) {
|
||
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos);
|
||
|
keyTag = keyNode = valueNode = null;
|
||
|
}
|
||
|
skipSeparationSpace(state, true, -1);
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
}
|
||
|
if (state.lineIndent > nodeIndent && ch !== 0) {
|
||
|
throwError(state, "bad indentation of a mapping entry");
|
||
|
} else if (state.lineIndent < nodeIndent) {
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if (atExplicitKey) {
|
||
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
|
||
|
}
|
||
|
if (detected) {
|
||
|
state.tag = _tag;
|
||
|
state.anchor = _anchor;
|
||
|
state.kind = "mapping";
|
||
|
state.result = _result;
|
||
|
}
|
||
|
return detected;
|
||
|
}
|
||
|
function readTagProperty(state) {
|
||
|
var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch;
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (ch !== 33)
|
||
|
return false;
|
||
|
if (state.tag !== null) {
|
||
|
throwError(state, "duplication of a tag property");
|
||
|
}
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
if (ch === 60) {
|
||
|
isVerbatim = true;
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
} else if (ch === 33) {
|
||
|
isNamed = true;
|
||
|
tagHandle = "!!";
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
} else {
|
||
|
tagHandle = "!";
|
||
|
}
|
||
|
_position = state.position;
|
||
|
if (isVerbatim) {
|
||
|
do {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
} while (ch !== 0 && ch !== 62);
|
||
|
if (state.position < state.length) {
|
||
|
tagName = state.input.slice(_position, state.position);
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
} else {
|
||
|
throwError(state, "unexpected end of the stream within a verbatim tag");
|
||
|
}
|
||
|
} else {
|
||
|
while (ch !== 0 && !is_WS_OR_EOL(ch)) {
|
||
|
if (ch === 33) {
|
||
|
if (!isNamed) {
|
||
|
tagHandle = state.input.slice(_position - 1, state.position + 1);
|
||
|
if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
|
||
|
throwError(state, "named tag handle cannot contain such characters");
|
||
|
}
|
||
|
isNamed = true;
|
||
|
_position = state.position + 1;
|
||
|
} else {
|
||
|
throwError(state, "tag suffix cannot contain exclamation marks");
|
||
|
}
|
||
|
}
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
tagName = state.input.slice(_position, state.position);
|
||
|
if (PATTERN_FLOW_INDICATORS.test(tagName)) {
|
||
|
throwError(state, "tag suffix cannot contain flow indicator characters");
|
||
|
}
|
||
|
}
|
||
|
if (tagName && !PATTERN_TAG_URI.test(tagName)) {
|
||
|
throwError(state, "tag name cannot contain such characters: " + tagName);
|
||
|
}
|
||
|
if (isVerbatim) {
|
||
|
state.tag = tagName;
|
||
|
} else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {
|
||
|
state.tag = state.tagMap[tagHandle] + tagName;
|
||
|
} else if (tagHandle === "!") {
|
||
|
state.tag = "!" + tagName;
|
||
|
} else if (tagHandle === "!!") {
|
||
|
state.tag = "tag:yaml.org,2002:" + tagName;
|
||
|
} else {
|
||
|
throwError(state, 'undeclared tag handle "' + tagHandle + '"');
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function readAnchorProperty(state) {
|
||
|
var _position, ch;
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (ch !== 38)
|
||
|
return false;
|
||
|
if (state.anchor !== null) {
|
||
|
throwError(state, "duplication of an anchor property");
|
||
|
}
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
_position = state.position;
|
||
|
while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
if (state.position === _position) {
|
||
|
throwError(state, "name of an anchor node must contain at least one character");
|
||
|
}
|
||
|
state.anchor = state.input.slice(_position, state.position);
|
||
|
return true;
|
||
|
}
|
||
|
function readAlias(state) {
|
||
|
var _position, alias, ch;
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (ch !== 42)
|
||
|
return false;
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
_position = state.position;
|
||
|
while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
if (state.position === _position) {
|
||
|
throwError(state, "name of an alias node must contain at least one character");
|
||
|
}
|
||
|
alias = state.input.slice(_position, state.position);
|
||
|
if (!_hasOwnProperty.call(state.anchorMap, alias)) {
|
||
|
throwError(state, 'unidentified alias "' + alias + '"');
|
||
|
}
|
||
|
state.result = state.anchorMap[alias];
|
||
|
skipSeparationSpace(state, true, -1);
|
||
|
return true;
|
||
|
}
|
||
|
function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
|
||
|
var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, type, flowIndent, blockIndent;
|
||
|
if (state.listener !== null) {
|
||
|
state.listener("open", state);
|
||
|
}
|
||
|
state.tag = null;
|
||
|
state.anchor = null;
|
||
|
state.kind = null;
|
||
|
state.result = null;
|
||
|
allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
|
||
|
if (allowToSeek) {
|
||
|
if (skipSeparationSpace(state, true, -1)) {
|
||
|
atNewLine = true;
|
||
|
if (state.lineIndent > parentIndent) {
|
||
|
indentStatus = 1;
|
||
|
} else if (state.lineIndent === parentIndent) {
|
||
|
indentStatus = 0;
|
||
|
} else if (state.lineIndent < parentIndent) {
|
||
|
indentStatus = -1;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (indentStatus === 1) {
|
||
|
while (readTagProperty(state) || readAnchorProperty(state)) {
|
||
|
if (skipSeparationSpace(state, true, -1)) {
|
||
|
atNewLine = true;
|
||
|
allowBlockCollections = allowBlockStyles;
|
||
|
if (state.lineIndent > parentIndent) {
|
||
|
indentStatus = 1;
|
||
|
} else if (state.lineIndent === parentIndent) {
|
||
|
indentStatus = 0;
|
||
|
} else if (state.lineIndent < parentIndent) {
|
||
|
indentStatus = -1;
|
||
|
}
|
||
|
} else {
|
||
|
allowBlockCollections = false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (allowBlockCollections) {
|
||
|
allowBlockCollections = atNewLine || allowCompact;
|
||
|
}
|
||
|
if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
|
||
|
if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
|
||
|
flowIndent = parentIndent;
|
||
|
} else {
|
||
|
flowIndent = parentIndent + 1;
|
||
|
}
|
||
|
blockIndent = state.position - state.lineStart;
|
||
|
if (indentStatus === 1) {
|
||
|
if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
|
||
|
hasContent = true;
|
||
|
} else {
|
||
|
if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
|
||
|
hasContent = true;
|
||
|
} else if (readAlias(state)) {
|
||
|
hasContent = true;
|
||
|
if (state.tag !== null || state.anchor !== null) {
|
||
|
throwError(state, "alias node should not have any properties");
|
||
|
}
|
||
|
} else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
|
||
|
hasContent = true;
|
||
|
if (state.tag === null) {
|
||
|
state.tag = "?";
|
||
|
}
|
||
|
}
|
||
|
if (state.anchor !== null) {
|
||
|
state.anchorMap[state.anchor] = state.result;
|
||
|
}
|
||
|
}
|
||
|
} else if (indentStatus === 0) {
|
||
|
hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
|
||
|
}
|
||
|
}
|
||
|
if (state.tag !== null && state.tag !== "!") {
|
||
|
if (state.tag === "?") {
|
||
|
if (state.result !== null && state.kind !== "scalar") {
|
||
|
throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
|
||
|
}
|
||
|
for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
|
||
|
type = state.implicitTypes[typeIndex];
|
||
|
if (type.resolve(state.result)) {
|
||
|
state.result = type.construct(state.result);
|
||
|
state.tag = type.tag;
|
||
|
if (state.anchor !== null) {
|
||
|
state.anchorMap[state.anchor] = state.result;
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
} else if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) {
|
||
|
type = state.typeMap[state.kind || "fallback"][state.tag];
|
||
|
if (state.result !== null && type.kind !== state.kind) {
|
||
|
throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
|
||
|
}
|
||
|
if (!type.resolve(state.result)) {
|
||
|
throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
|
||
|
} else {
|
||
|
state.result = type.construct(state.result);
|
||
|
if (state.anchor !== null) {
|
||
|
state.anchorMap[state.anchor] = state.result;
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
throwError(state, "unknown tag !<" + state.tag + ">");
|
||
|
}
|
||
|
}
|
||
|
if (state.listener !== null) {
|
||
|
state.listener("close", state);
|
||
|
}
|
||
|
return state.tag !== null || state.anchor !== null || hasContent;
|
||
|
}
|
||
|
function readDocument(state) {
|
||
|
var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;
|
||
|
state.version = null;
|
||
|
state.checkLineBreaks = state.legacy;
|
||
|
state.tagMap = {};
|
||
|
state.anchorMap = {};
|
||
|
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
||
|
skipSeparationSpace(state, true, -1);
|
||
|
ch = state.input.charCodeAt(state.position);
|
||
|
if (state.lineIndent > 0 || ch !== 37) {
|
||
|
break;
|
||
|
}
|
||
|
hasDirectives = true;
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
_position = state.position;
|
||
|
while (ch !== 0 && !is_WS_OR_EOL(ch)) {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
directiveName = state.input.slice(_position, state.position);
|
||
|
directiveArgs = [];
|
||
|
if (directiveName.length < 1) {
|
||
|
throwError(state, "directive name must not be less than one character in length");
|
||
|
}
|
||
|
while (ch !== 0) {
|
||
|
while (is_WHITE_SPACE(ch)) {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
if (ch === 35) {
|
||
|
do {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
} while (ch !== 0 && !is_EOL(ch));
|
||
|
break;
|
||
|
}
|
||
|
if (is_EOL(ch))
|
||
|
break;
|
||
|
_position = state.position;
|
||
|
while (ch !== 0 && !is_WS_OR_EOL(ch)) {
|
||
|
ch = state.input.charCodeAt(++state.position);
|
||
|
}
|
||
|
directiveArgs.push(state.input.slice(_position, state.position));
|
||
|
}
|
||
|
if (ch !== 0)
|
||
|
readLineBreak(state);
|
||
|
if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
|
||
|
directiveHandlers[directiveName](state, directiveName, directiveArgs);
|
||
|
} else {
|
||
|
throwWarning(state, 'unknown document directive "' + directiveName + '"');
|
||
|
}
|
||
|
}
|
||
|
skipSeparationSpace(state, true, -1);
|
||
|
if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) {
|
||
|
state.position += 3;
|
||
|
skipSeparationSpace(state, true, -1);
|
||
|
} else if (hasDirectives) {
|
||
|
throwError(state, "directives end mark is expected");
|
||
|
}
|
||
|
composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
|
||
|
skipSeparationSpace(state, true, -1);
|
||
|
if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
|
||
|
throwWarning(state, "non-ASCII line breaks are interpreted as content");
|
||
|
}
|
||
|
state.documents.push(state.result);
|
||
|
if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
||
|
if (state.input.charCodeAt(state.position) === 46) {
|
||
|
state.position += 3;
|
||
|
skipSeparationSpace(state, true, -1);
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
if (state.position < state.length - 1) {
|
||
|
throwError(state, "end of the stream or a document separator is expected");
|
||
|
} else {
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
function loadDocuments(input, options2) {
|
||
|
input = String(input);
|
||
|
options2 = options2 || {};
|
||
|
if (input.length !== 0) {
|
||
|
if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) {
|
||
|
input += "\n";
|
||
|
}
|
||
|
if (input.charCodeAt(0) === 65279) {
|
||
|
input = input.slice(1);
|
||
|
}
|
||
|
}
|
||
|
var state = new State(input, options2);
|
||
|
var nullpos = input.indexOf("\0");
|
||
|
if (nullpos !== -1) {
|
||
|
state.position = nullpos;
|
||
|
throwError(state, "null byte is not allowed in input");
|
||
|
}
|
||
|
state.input += "\0";
|
||
|
while (state.input.charCodeAt(state.position) === 32) {
|
||
|
state.lineIndent += 1;
|
||
|
state.position += 1;
|
||
|
}
|
||
|
while (state.position < state.length - 1) {
|
||
|
readDocument(state);
|
||
|
}
|
||
|
return state.documents;
|
||
|
}
|
||
|
function loadAll(input, iterator, options2) {
|
||
|
if (iterator !== null && typeof iterator === "object" && typeof options2 === "undefined") {
|
||
|
options2 = iterator;
|
||
|
iterator = null;
|
||
|
}
|
||
|
var documents = loadDocuments(input, options2);
|
||
|
if (typeof iterator !== "function") {
|
||
|
return documents;
|
||
|
}
|
||
|
for (var index = 0, length = documents.length; index < length; index += 1) {
|
||
|
iterator(documents[index]);
|
||
|
}
|
||
|
}
|
||
|
function load(input, options2) {
|
||
|
var documents = loadDocuments(input, options2);
|
||
|
if (documents.length === 0) {
|
||
|
return void 0;
|
||
|
} else if (documents.length === 1) {
|
||
|
return documents[0];
|
||
|
}
|
||
|
throw new YAMLException("expected a single document in the stream, but found more");
|
||
|
}
|
||
|
function safeLoadAll(input, iterator, options2) {
|
||
|
if (typeof iterator === "object" && iterator !== null && typeof options2 === "undefined") {
|
||
|
options2 = iterator;
|
||
|
iterator = null;
|
||
|
}
|
||
|
return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2));
|
||
|
}
|
||
|
function safeLoad(input, options2) {
|
||
|
return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2));
|
||
|
}
|
||
|
module2.exports.loadAll = loadAll;
|
||
|
module2.exports.load = load;
|
||
|
module2.exports.safeLoadAll = safeLoadAll;
|
||
|
module2.exports.safeLoad = safeLoad;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/dumper.js
|
||
|
var require_dumper = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/dumper.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var common = require_common();
|
||
|
var YAMLException = require_exception();
|
||
|
var DEFAULT_FULL_SCHEMA = require_default_full();
|
||
|
var DEFAULT_SAFE_SCHEMA = require_default_safe();
|
||
|
var _toString = Object.prototype.toString;
|
||
|
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
|
var CHAR_TAB = 9;
|
||
|
var CHAR_LINE_FEED = 10;
|
||
|
var CHAR_CARRIAGE_RETURN = 13;
|
||
|
var CHAR_SPACE = 32;
|
||
|
var CHAR_EXCLAMATION = 33;
|
||
|
var CHAR_DOUBLE_QUOTE = 34;
|
||
|
var CHAR_SHARP = 35;
|
||
|
var CHAR_PERCENT = 37;
|
||
|
var CHAR_AMPERSAND = 38;
|
||
|
var CHAR_SINGLE_QUOTE = 39;
|
||
|
var CHAR_ASTERISK = 42;
|
||
|
var CHAR_COMMA = 44;
|
||
|
var CHAR_MINUS = 45;
|
||
|
var CHAR_COLON = 58;
|
||
|
var CHAR_EQUALS = 61;
|
||
|
var CHAR_GREATER_THAN = 62;
|
||
|
var CHAR_QUESTION = 63;
|
||
|
var CHAR_COMMERCIAL_AT = 64;
|
||
|
var CHAR_LEFT_SQUARE_BRACKET = 91;
|
||
|
var CHAR_RIGHT_SQUARE_BRACKET = 93;
|
||
|
var CHAR_GRAVE_ACCENT = 96;
|
||
|
var CHAR_LEFT_CURLY_BRACKET = 123;
|
||
|
var CHAR_VERTICAL_LINE = 124;
|
||
|
var CHAR_RIGHT_CURLY_BRACKET = 125;
|
||
|
var ESCAPE_SEQUENCES = {};
|
||
|
ESCAPE_SEQUENCES[0] = "\\0";
|
||
|
ESCAPE_SEQUENCES[7] = "\\a";
|
||
|
ESCAPE_SEQUENCES[8] = "\\b";
|
||
|
ESCAPE_SEQUENCES[9] = "\\t";
|
||
|
ESCAPE_SEQUENCES[10] = "\\n";
|
||
|
ESCAPE_SEQUENCES[11] = "\\v";
|
||
|
ESCAPE_SEQUENCES[12] = "\\f";
|
||
|
ESCAPE_SEQUENCES[13] = "\\r";
|
||
|
ESCAPE_SEQUENCES[27] = "\\e";
|
||
|
ESCAPE_SEQUENCES[34] = '\\"';
|
||
|
ESCAPE_SEQUENCES[92] = "\\\\";
|
||
|
ESCAPE_SEQUENCES[133] = "\\N";
|
||
|
ESCAPE_SEQUENCES[160] = "\\_";
|
||
|
ESCAPE_SEQUENCES[8232] = "\\L";
|
||
|
ESCAPE_SEQUENCES[8233] = "\\P";
|
||
|
var DEPRECATED_BOOLEANS_SYNTAX = [
|
||
|
"y",
|
||
|
"Y",
|
||
|
"yes",
|
||
|
"Yes",
|
||
|
"YES",
|
||
|
"on",
|
||
|
"On",
|
||
|
"ON",
|
||
|
"n",
|
||
|
"N",
|
||
|
"no",
|
||
|
"No",
|
||
|
"NO",
|
||
|
"off",
|
||
|
"Off",
|
||
|
"OFF"
|
||
|
];
|
||
|
function compileStyleMap(schema, map) {
|
||
|
var result, keys, index, length, tag, style, type;
|
||
|
if (map === null)
|
||
|
return {};
|
||
|
result = {};
|
||
|
keys = Object.keys(map);
|
||
|
for (index = 0, length = keys.length; index < length; index += 1) {
|
||
|
tag = keys[index];
|
||
|
style = String(map[tag]);
|
||
|
if (tag.slice(0, 2) === "!!") {
|
||
|
tag = "tag:yaml.org,2002:" + tag.slice(2);
|
||
|
}
|
||
|
type = schema.compiledTypeMap["fallback"][tag];
|
||
|
if (type && _hasOwnProperty.call(type.styleAliases, style)) {
|
||
|
style = type.styleAliases[style];
|
||
|
}
|
||
|
result[tag] = style;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
function encodeHex(character) {
|
||
|
var string, handle, length;
|
||
|
string = character.toString(16).toUpperCase();
|
||
|
if (character <= 255) {
|
||
|
handle = "x";
|
||
|
length = 2;
|
||
|
} else if (character <= 65535) {
|
||
|
handle = "u";
|
||
|
length = 4;
|
||
|
} else if (character <= 4294967295) {
|
||
|
handle = "U";
|
||
|
length = 8;
|
||
|
} else {
|
||
|
throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");
|
||
|
}
|
||
|
return "\\" + handle + common.repeat("0", length - string.length) + string;
|
||
|
}
|
||
|
function State(options2) {
|
||
|
this.schema = options2["schema"] || DEFAULT_FULL_SCHEMA;
|
||
|
this.indent = Math.max(1, options2["indent"] || 2);
|
||
|
this.noArrayIndent = options2["noArrayIndent"] || false;
|
||
|
this.skipInvalid = options2["skipInvalid"] || false;
|
||
|
this.flowLevel = common.isNothing(options2["flowLevel"]) ? -1 : options2["flowLevel"];
|
||
|
this.styleMap = compileStyleMap(this.schema, options2["styles"] || null);
|
||
|
this.sortKeys = options2["sortKeys"] || false;
|
||
|
this.lineWidth = options2["lineWidth"] || 80;
|
||
|
this.noRefs = options2["noRefs"] || false;
|
||
|
this.noCompatMode = options2["noCompatMode"] || false;
|
||
|
this.condenseFlow = options2["condenseFlow"] || false;
|
||
|
this.implicitTypes = this.schema.compiledImplicit;
|
||
|
this.explicitTypes = this.schema.compiledExplicit;
|
||
|
this.tag = null;
|
||
|
this.result = "";
|
||
|
this.duplicates = [];
|
||
|
this.usedDuplicates = null;
|
||
|
}
|
||
|
function indentString(string, spaces) {
|
||
|
var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length;
|
||
|
while (position < length) {
|
||
|
next = string.indexOf("\n", position);
|
||
|
if (next === -1) {
|
||
|
line = string.slice(position);
|
||
|
position = length;
|
||
|
} else {
|
||
|
line = string.slice(position, next + 1);
|
||
|
position = next + 1;
|
||
|
}
|
||
|
if (line.length && line !== "\n")
|
||
|
result += ind;
|
||
|
result += line;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
function generateNextLine(state, level) {
|
||
|
return "\n" + common.repeat(" ", state.indent * level);
|
||
|
}
|
||
|
function testImplicitResolving(state, str2) {
|
||
|
var index, length, type;
|
||
|
for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
|
||
|
type = state.implicitTypes[index];
|
||
|
if (type.resolve(str2)) {
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
function isWhitespace(c) {
|
||
|
return c === CHAR_SPACE || c === CHAR_TAB;
|
||
|
}
|
||
|
function isPrintable(c) {
|
||
|
return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== 65279 || 65536 <= c && c <= 1114111;
|
||
|
}
|
||
|
function isNsChar(c) {
|
||
|
return isPrintable(c) && !isWhitespace(c) && c !== 65279 && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED;
|
||
|
}
|
||
|
function isPlainSafe(c, prev) {
|
||
|
return isPrintable(c) && c !== 65279 && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_COLON && (c !== CHAR_SHARP || prev && isNsChar(prev));
|
||
|
}
|
||
|
function isPlainSafeFirst(c) {
|
||
|
return isPrintable(c) && c !== 65279 && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;
|
||
|
}
|
||
|
function needIndentIndicator(string) {
|
||
|
var leadingSpaceRe = /^\n* /;
|
||
|
return leadingSpaceRe.test(string);
|
||
|
}
|
||
|
var STYLE_PLAIN = 1;
|
||
|
var STYLE_SINGLE = 2;
|
||
|
var STYLE_LITERAL = 3;
|
||
|
var STYLE_FOLDED = 4;
|
||
|
var STYLE_DOUBLE = 5;
|
||
|
function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) {
|
||
|
var i;
|
||
|
var char, prev_char;
|
||
|
var hasLineBreak = false;
|
||
|
var hasFoldableLine = false;
|
||
|
var shouldTrackWidth = lineWidth !== -1;
|
||
|
var previousLineBreak = -1;
|
||
|
var plain = isPlainSafeFirst(string.charCodeAt(0)) && !isWhitespace(string.charCodeAt(string.length - 1));
|
||
|
if (singleLineOnly) {
|
||
|
for (i = 0; i < string.length; i++) {
|
||
|
char = string.charCodeAt(i);
|
||
|
if (!isPrintable(char)) {
|
||
|
return STYLE_DOUBLE;
|
||
|
}
|
||
|
prev_char = i > 0 ? string.charCodeAt(i - 1) : null;
|
||
|
plain = plain && isPlainSafe(char, prev_char);
|
||
|
}
|
||
|
} else {
|
||
|
for (i = 0; i < string.length; i++) {
|
||
|
char = string.charCodeAt(i);
|
||
|
if (char === CHAR_LINE_FEED) {
|
||
|
hasLineBreak = true;
|
||
|
if (shouldTrackWidth) {
|
||
|
hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented.
|
||
|
i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
|
||
|
previousLineBreak = i;
|
||
|
}
|
||
|
} else if (!isPrintable(char)) {
|
||
|
return STYLE_DOUBLE;
|
||
|
}
|
||
|
prev_char = i > 0 ? string.charCodeAt(i - 1) : null;
|
||
|
plain = plain && isPlainSafe(char, prev_char);
|
||
|
}
|
||
|
hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ");
|
||
|
}
|
||
|
if (!hasLineBreak && !hasFoldableLine) {
|
||
|
return plain && !testAmbiguousType(string) ? STYLE_PLAIN : STYLE_SINGLE;
|
||
|
}
|
||
|
if (indentPerLevel > 9 && needIndentIndicator(string)) {
|
||
|
return STYLE_DOUBLE;
|
||
|
}
|
||
|
return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
|
||
|
}
|
||
|
function writeScalar(state, string, level, iskey) {
|
||
|
state.dump = function() {
|
||
|
if (string.length === 0) {
|
||
|
return "''";
|
||
|
}
|
||
|
if (!state.noCompatMode && DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) {
|
||
|
return "'" + string + "'";
|
||
|
}
|
||
|
var indent = state.indent * Math.max(1, level);
|
||
|
var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
|
||
|
var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel;
|
||
|
function testAmbiguity(string2) {
|
||
|
return testImplicitResolving(state, string2);
|
||
|
}
|
||
|
switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) {
|
||
|
case STYLE_PLAIN:
|
||
|
return string;
|
||
|
case STYLE_SINGLE:
|
||
|
return "'" + string.replace(/'/g, "''") + "'";
|
||
|
case STYLE_LITERAL:
|
||
|
return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent));
|
||
|
case STYLE_FOLDED:
|
||
|
return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
|
||
|
case STYLE_DOUBLE:
|
||
|
return '"' + escapeString(string, lineWidth) + '"';
|
||
|
default:
|
||
|
throw new YAMLException("impossible error: invalid scalar style");
|
||
|
}
|
||
|
}();
|
||
|
}
|
||
|
function blockHeader(string, indentPerLevel) {
|
||
|
var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
|
||
|
var clip = string[string.length - 1] === "\n";
|
||
|
var keep = clip && (string[string.length - 2] === "\n" || string === "\n");
|
||
|
var chomp = keep ? "+" : clip ? "" : "-";
|
||
|
return indentIndicator + chomp + "\n";
|
||
|
}
|
||
|
function dropEndingNewline(string) {
|
||
|
return string[string.length - 1] === "\n" ? string.slice(0, -1) : string;
|
||
|
}
|
||
|
function foldString(string, width) {
|
||
|
var lineRe = /(\n+)([^\n]*)/g;
|
||
|
var result = function() {
|
||
|
var nextLF = string.indexOf("\n");
|
||
|
nextLF = nextLF !== -1 ? nextLF : string.length;
|
||
|
lineRe.lastIndex = nextLF;
|
||
|
return foldLine(string.slice(0, nextLF), width);
|
||
|
}();
|
||
|
var prevMoreIndented = string[0] === "\n" || string[0] === " ";
|
||
|
var moreIndented;
|
||
|
var match;
|
||
|
while (match = lineRe.exec(string)) {
|
||
|
var prefix = match[1], line = match[2];
|
||
|
moreIndented = line[0] === " ";
|
||
|
result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
|
||
|
prevMoreIndented = moreIndented;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
function foldLine(line, width) {
|
||
|
if (line === "" || line[0] === " ")
|
||
|
return line;
|
||
|
var breakRe = / [^ ]/g;
|
||
|
var match;
|
||
|
var start = 0, end, curr = 0, next = 0;
|
||
|
var result = "";
|
||
|
while (match = breakRe.exec(line)) {
|
||
|
next = match.index;
|
||
|
if (next - start > width) {
|
||
|
end = curr > start ? curr : next;
|
||
|
result += "\n" + line.slice(start, end);
|
||
|
start = end + 1;
|
||
|
}
|
||
|
curr = next;
|
||
|
}
|
||
|
result += "\n";
|
||
|
if (line.length - start > width && curr > start) {
|
||
|
result += line.slice(start, curr) + "\n" + line.slice(curr + 1);
|
||
|
} else {
|
||
|
result += line.slice(start);
|
||
|
}
|
||
|
return result.slice(1);
|
||
|
}
|
||
|
function escapeString(string) {
|
||
|
var result = "";
|
||
|
var char, nextChar;
|
||
|
var escapeSeq;
|
||
|
for (var i = 0; i < string.length; i++) {
|
||
|
char = string.charCodeAt(i);
|
||
|
if (char >= 55296 && char <= 56319) {
|
||
|
nextChar = string.charCodeAt(i + 1);
|
||
|
if (nextChar >= 56320 && nextChar <= 57343) {
|
||
|
result += encodeHex((char - 55296) * 1024 + nextChar - 56320 + 65536);
|
||
|
i++;
|
||
|
continue;
|
||
|
}
|
||
|
}
|
||
|
escapeSeq = ESCAPE_SEQUENCES[char];
|
||
|
result += !escapeSeq && isPrintable(char) ? string[i] : escapeSeq || encodeHex(char);
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
function writeFlowSequence(state, level, object) {
|
||
|
var _result = "", _tag = state.tag, index, length;
|
||
|
for (index = 0, length = object.length; index < length; index += 1) {
|
||
|
if (writeNode(state, level, object[index], false, false)) {
|
||
|
if (index !== 0)
|
||
|
_result += "," + (!state.condenseFlow ? " " : "");
|
||
|
_result += state.dump;
|
||
|
}
|
||
|
}
|
||
|
state.tag = _tag;
|
||
|
state.dump = "[" + _result + "]";
|
||
|
}
|
||
|
function writeBlockSequence(state, level, object, compact) {
|
||
|
var _result = "", _tag = state.tag, index, length;
|
||
|
for (index = 0, length = object.length; index < length; index += 1) {
|
||
|
if (writeNode(state, level + 1, object[index], true, true)) {
|
||
|
if (!compact || index !== 0) {
|
||
|
_result += generateNextLine(state, level);
|
||
|
}
|
||
|
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
||
|
_result += "-";
|
||
|
} else {
|
||
|
_result += "- ";
|
||
|
}
|
||
|
_result += state.dump;
|
||
|
}
|
||
|
}
|
||
|
state.tag = _tag;
|
||
|
state.dump = _result || "[]";
|
||
|
}
|
||
|
function writeFlowMapping(state, level, object) {
|
||
|
var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;
|
||
|
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
|
||
|
pairBuffer = "";
|
||
|
if (index !== 0)
|
||
|
pairBuffer += ", ";
|
||
|
if (state.condenseFlow)
|
||
|
pairBuffer += '"';
|
||
|
objectKey = objectKeyList[index];
|
||
|
objectValue = object[objectKey];
|
||
|
if (!writeNode(state, level, objectKey, false, false)) {
|
||
|
continue;
|
||
|
}
|
||
|
if (state.dump.length > 1024)
|
||
|
pairBuffer += "? ";
|
||
|
pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " ");
|
||
|
if (!writeNode(state, level, objectValue, false, false)) {
|
||
|
continue;
|
||
|
}
|
||
|
pairBuffer += state.dump;
|
||
|
_result += pairBuffer;
|
||
|
}
|
||
|
state.tag = _tag;
|
||
|
state.dump = "{" + _result + "}";
|
||
|
}
|
||
|
function writeBlockMapping(state, level, object, compact) {
|
||
|
var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer;
|
||
|
if (state.sortKeys === true) {
|
||
|
objectKeyList.sort();
|
||
|
} else if (typeof state.sortKeys === "function") {
|
||
|
objectKeyList.sort(state.sortKeys);
|
||
|
} else if (state.sortKeys) {
|
||
|
throw new YAMLException("sortKeys must be a boolean or a function");
|
||
|
}
|
||
|
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
|
||
|
pairBuffer = "";
|
||
|
if (!compact || index !== 0) {
|
||
|
pairBuffer += generateNextLine(state, level);
|
||
|
}
|
||
|
objectKey = objectKeyList[index];
|
||
|
objectValue = object[objectKey];
|
||
|
if (!writeNode(state, level + 1, objectKey, true, true, true)) {
|
||
|
continue;
|
||
|
}
|
||
|
explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
|
||
|
if (explicitPair) {
|
||
|
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
||
|
pairBuffer += "?";
|
||
|
} else {
|
||
|
pairBuffer += "? ";
|
||
|
}
|
||
|
}
|
||
|
pairBuffer += state.dump;
|
||
|
if (explicitPair) {
|
||
|
pairBuffer += generateNextLine(state, level);
|
||
|
}
|
||
|
if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
|
||
|
continue;
|
||
|
}
|
||
|
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
||
|
pairBuffer += ":";
|
||
|
} else {
|
||
|
pairBuffer += ": ";
|
||
|
}
|
||
|
pairBuffer += state.dump;
|
||
|
_result += pairBuffer;
|
||
|
}
|
||
|
state.tag = _tag;
|
||
|
state.dump = _result || "{}";
|
||
|
}
|
||
|
function detectType(state, object, explicit) {
|
||
|
var _result, typeList, index, length, type, style;
|
||
|
typeList = explicit ? state.explicitTypes : state.implicitTypes;
|
||
|
for (index = 0, length = typeList.length; index < length; index += 1) {
|
||
|
type = typeList[index];
|
||
|
if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
|
||
|
state.tag = explicit ? type.tag : "?";
|
||
|
if (type.represent) {
|
||
|
style = state.styleMap[type.tag] || type.defaultStyle;
|
||
|
if (_toString.call(type.represent) === "[object Function]") {
|
||
|
_result = type.represent(object, style);
|
||
|
} else if (_hasOwnProperty.call(type.represent, style)) {
|
||
|
_result = type.represent[style](object, style);
|
||
|
} else {
|
||
|
throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style');
|
||
|
}
|
||
|
state.dump = _result;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
function writeNode(state, level, object, block, compact, iskey) {
|
||
|
state.tag = null;
|
||
|
state.dump = object;
|
||
|
if (!detectType(state, object, false)) {
|
||
|
detectType(state, object, true);
|
||
|
}
|
||
|
var type = _toString.call(state.dump);
|
||
|
if (block) {
|
||
|
block = state.flowLevel < 0 || state.flowLevel > level;
|
||
|
}
|
||
|
var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate;
|
||
|
if (objectOrArray) {
|
||
|
duplicateIndex = state.duplicates.indexOf(object);
|
||
|
duplicate = duplicateIndex !== -1;
|
||
|
}
|
||
|
if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) {
|
||
|
compact = false;
|
||
|
}
|
||
|
if (duplicate && state.usedDuplicates[duplicateIndex]) {
|
||
|
state.dump = "*ref_" + duplicateIndex;
|
||
|
} else {
|
||
|
if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
|
||
|
state.usedDuplicates[duplicateIndex] = true;
|
||
|
}
|
||
|
if (type === "[object Object]") {
|
||
|
if (block && Object.keys(state.dump).length !== 0) {
|
||
|
writeBlockMapping(state, level, state.dump, compact);
|
||
|
if (duplicate) {
|
||
|
state.dump = "&ref_" + duplicateIndex + state.dump;
|
||
|
}
|
||
|
} else {
|
||
|
writeFlowMapping(state, level, state.dump);
|
||
|
if (duplicate) {
|
||
|
state.dump = "&ref_" + duplicateIndex + " " + state.dump;
|
||
|
}
|
||
|
}
|
||
|
} else if (type === "[object Array]") {
|
||
|
var arrayLevel = state.noArrayIndent && level > 0 ? level - 1 : level;
|
||
|
if (block && state.dump.length !== 0) {
|
||
|
writeBlockSequence(state, arrayLevel, state.dump, compact);
|
||
|
if (duplicate) {
|
||
|
state.dump = "&ref_" + duplicateIndex + state.dump;
|
||
|
}
|
||
|
} else {
|
||
|
writeFlowSequence(state, arrayLevel, state.dump);
|
||
|
if (duplicate) {
|
||
|
state.dump = "&ref_" + duplicateIndex + " " + state.dump;
|
||
|
}
|
||
|
}
|
||
|
} else if (type === "[object String]") {
|
||
|
if (state.tag !== "?") {
|
||
|
writeScalar(state, state.dump, level, iskey);
|
||
|
}
|
||
|
} else {
|
||
|
if (state.skipInvalid)
|
||
|
return false;
|
||
|
throw new YAMLException("unacceptable kind of an object to dump " + type);
|
||
|
}
|
||
|
if (state.tag !== null && state.tag !== "?") {
|
||
|
state.dump = "!<" + state.tag + "> " + state.dump;
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function getDuplicateReferences(object, state) {
|
||
|
var objects = [], duplicatesIndexes = [], index, length;
|
||
|
inspectNode(object, objects, duplicatesIndexes);
|
||
|
for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
|
||
|
state.duplicates.push(objects[duplicatesIndexes[index]]);
|
||
|
}
|
||
|
state.usedDuplicates = new Array(length);
|
||
|
}
|
||
|
function inspectNode(object, objects, duplicatesIndexes) {
|
||
|
var objectKeyList, index, length;
|
||
|
if (object !== null && typeof object === "object") {
|
||
|
index = objects.indexOf(object);
|
||
|
if (index !== -1) {
|
||
|
if (duplicatesIndexes.indexOf(index) === -1) {
|
||
|
duplicatesIndexes.push(index);
|
||
|
}
|
||
|
} else {
|
||
|
objects.push(object);
|
||
|
if (Array.isArray(object)) {
|
||
|
for (index = 0, length = object.length; index < length; index += 1) {
|
||
|
inspectNode(object[index], objects, duplicatesIndexes);
|
||
|
}
|
||
|
} else {
|
||
|
objectKeyList = Object.keys(object);
|
||
|
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
|
||
|
inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
function dump(input, options2) {
|
||
|
options2 = options2 || {};
|
||
|
var state = new State(options2);
|
||
|
if (!state.noRefs)
|
||
|
getDuplicateReferences(input, state);
|
||
|
if (writeNode(state, 0, input, true, true))
|
||
|
return state.dump + "\n";
|
||
|
return "";
|
||
|
}
|
||
|
function safeDump(input, options2) {
|
||
|
return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2));
|
||
|
}
|
||
|
module2.exports.dump = dump;
|
||
|
module2.exports.safeDump = safeDump;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml.js
|
||
|
var require_js_yaml = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var loader = require_loader();
|
||
|
var dumper = require_dumper();
|
||
|
function deprecated(name) {
|
||
|
return function() {
|
||
|
throw new Error("Function " + name + " is deprecated and cannot be used.");
|
||
|
};
|
||
|
}
|
||
|
module2.exports.Type = require_type();
|
||
|
module2.exports.Schema = require_schema();
|
||
|
module2.exports.FAILSAFE_SCHEMA = require_failsafe();
|
||
|
module2.exports.JSON_SCHEMA = require_json();
|
||
|
module2.exports.CORE_SCHEMA = require_core();
|
||
|
module2.exports.DEFAULT_SAFE_SCHEMA = require_default_safe();
|
||
|
module2.exports.DEFAULT_FULL_SCHEMA = require_default_full();
|
||
|
module2.exports.load = loader.load;
|
||
|
module2.exports.loadAll = loader.loadAll;
|
||
|
module2.exports.safeLoad = loader.safeLoad;
|
||
|
module2.exports.safeLoadAll = loader.safeLoadAll;
|
||
|
module2.exports.dump = dumper.dump;
|
||
|
module2.exports.safeDump = dumper.safeDump;
|
||
|
module2.exports.YAMLException = require_exception();
|
||
|
module2.exports.MINIMAL_SCHEMA = require_failsafe();
|
||
|
module2.exports.SAFE_SCHEMA = require_default_safe();
|
||
|
module2.exports.DEFAULT_SCHEMA = require_default_full();
|
||
|
module2.exports.scan = deprecated("scan");
|
||
|
module2.exports.parse = deprecated("parse");
|
||
|
module2.exports.compose = deprecated("compose");
|
||
|
module2.exports.addConstructor = deprecated("addConstructor");
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/index.js
|
||
|
var require_js_yaml2 = __commonJS({
|
||
|
"node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/index.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var yaml2 = require_js_yaml();
|
||
|
module2.exports = yaml2;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engines.js
|
||
|
var require_engines = __commonJS({
|
||
|
"node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engines.js"(exports, module) {
|
||
|
"use strict";
|
||
|
var yaml = require_js_yaml2();
|
||
|
var engines = exports = module.exports;
|
||
|
engines.yaml = {
|
||
|
parse: yaml.safeLoad.bind(yaml),
|
||
|
stringify: yaml.safeDump.bind(yaml)
|
||
|
};
|
||
|
engines.json = {
|
||
|
parse: JSON.parse.bind(JSON),
|
||
|
stringify: function(obj, options2) {
|
||
|
const opts = Object.assign({ replacer: null, space: 2 }, options2);
|
||
|
return JSON.stringify(obj, opts.replacer, opts.space);
|
||
|
}
|
||
|
};
|
||
|
engines.javascript = {
|
||
|
parse: function parse(str, options, wrap) {
|
||
|
try {
|
||
|
if (wrap !== false) {
|
||
|
str = "(function() {\nreturn " + str.trim() + ";\n}());";
|
||
|
}
|
||
|
return eval(str) || {};
|
||
|
} catch (err) {
|
||
|
if (wrap !== false && /(unexpected|identifier)/i.test(err.message)) {
|
||
|
return parse(str, options, false);
|
||
|
}
|
||
|
throw new SyntaxError(err);
|
||
|
}
|
||
|
},
|
||
|
stringify: function() {
|
||
|
throw new Error("stringifying JavaScript is not supported");
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/strip-bom-string@1.0.0/node_modules/strip-bom-string/index.js
|
||
|
var require_strip_bom_string = __commonJS({
|
||
|
"node_modules/.pnpm/strip-bom-string@1.0.0/node_modules/strip-bom-string/index.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
module2.exports = function(str2) {
|
||
|
if (typeof str2 === "string" && str2.charAt(0) === "\uFEFF") {
|
||
|
return str2.slice(1);
|
||
|
}
|
||
|
return str2;
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/utils.js
|
||
|
var require_utils = __commonJS({
|
||
|
"node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/utils.js"(exports2) {
|
||
|
"use strict";
|
||
|
var stripBom = require_strip_bom_string();
|
||
|
var typeOf = require_kind_of();
|
||
|
exports2.define = function(obj, key, val) {
|
||
|
Reflect.defineProperty(obj, key, {
|
||
|
enumerable: false,
|
||
|
configurable: true,
|
||
|
writable: true,
|
||
|
value: val
|
||
|
});
|
||
|
};
|
||
|
exports2.isBuffer = function(val) {
|
||
|
return typeOf(val) === "buffer";
|
||
|
};
|
||
|
exports2.isObject = function(val) {
|
||
|
return typeOf(val) === "object";
|
||
|
};
|
||
|
exports2.toBuffer = function(input) {
|
||
|
return typeof input === "string" ? Buffer.from(input) : input;
|
||
|
};
|
||
|
exports2.toString = function(input) {
|
||
|
if (exports2.isBuffer(input))
|
||
|
return stripBom(String(input));
|
||
|
if (typeof input !== "string") {
|
||
|
throw new TypeError("expected input to be a string or buffer");
|
||
|
}
|
||
|
return stripBom(input);
|
||
|
};
|
||
|
exports2.arrayify = function(val) {
|
||
|
return val ? Array.isArray(val) ? val : [val] : [];
|
||
|
};
|
||
|
exports2.startsWith = function(str2, substr, len) {
|
||
|
if (typeof len !== "number")
|
||
|
len = substr.length;
|
||
|
return str2.slice(0, len) === substr;
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/defaults.js
|
||
|
var require_defaults = __commonJS({
|
||
|
"node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/defaults.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var engines2 = require_engines();
|
||
|
var utils = require_utils();
|
||
|
module2.exports = function(options2) {
|
||
|
const opts = Object.assign({}, options2);
|
||
|
opts.delimiters = utils.arrayify(opts.delims || opts.delimiters || "---");
|
||
|
if (opts.delimiters.length === 1) {
|
||
|
opts.delimiters.push(opts.delimiters[0]);
|
||
|
}
|
||
|
opts.language = (opts.language || opts.lang || "yaml").toLowerCase();
|
||
|
opts.engines = Object.assign({}, engines2, opts.parsers, opts.engines);
|
||
|
return opts;
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engine.js
|
||
|
var require_engine = __commonJS({
|
||
|
"node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engine.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
module2.exports = function(name, options2) {
|
||
|
let engine = options2.engines[name] || options2.engines[aliase(name)];
|
||
|
if (typeof engine === "undefined") {
|
||
|
throw new Error('gray-matter engine "' + name + '" is not registered');
|
||
|
}
|
||
|
if (typeof engine === "function") {
|
||
|
engine = { parse: engine };
|
||
|
}
|
||
|
return engine;
|
||
|
};
|
||
|
function aliase(name) {
|
||
|
switch (name.toLowerCase()) {
|
||
|
case "js":
|
||
|
case "javascript":
|
||
|
return "javascript";
|
||
|
case "coffee":
|
||
|
case "coffeescript":
|
||
|
case "cson":
|
||
|
return "coffee";
|
||
|
case "yaml":
|
||
|
case "yml":
|
||
|
return "yaml";
|
||
|
default: {
|
||
|
return name;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/stringify.js
|
||
|
var require_stringify = __commonJS({
|
||
|
"node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/stringify.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var typeOf = require_kind_of();
|
||
|
var getEngine = require_engine();
|
||
|
var defaults = require_defaults();
|
||
|
module2.exports = function(file, data, options2) {
|
||
|
if (data == null && options2 == null) {
|
||
|
switch (typeOf(file)) {
|
||
|
case "object":
|
||
|
data = file.data;
|
||
|
options2 = {};
|
||
|
break;
|
||
|
case "string":
|
||
|
return file;
|
||
|
default: {
|
||
|
throw new TypeError("expected file to be a string or object");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
const str2 = file.content;
|
||
|
const opts = defaults(options2);
|
||
|
if (data == null) {
|
||
|
if (!opts.data)
|
||
|
return file;
|
||
|
data = opts.data;
|
||
|
}
|
||
|
const language = file.language || opts.language;
|
||
|
const engine = getEngine(language, opts);
|
||
|
if (typeof engine.stringify !== "function") {
|
||
|
throw new TypeError('expected "' + language + '.stringify" to be a function');
|
||
|
}
|
||
|
data = Object.assign({}, file.data, data);
|
||
|
const open = opts.delimiters[0];
|
||
|
const close = opts.delimiters[1];
|
||
|
const matter2 = engine.stringify(data, options2).trim();
|
||
|
let buf = "";
|
||
|
if (matter2 !== "{}") {
|
||
|
buf = newline(open) + newline(matter2) + newline(close);
|
||
|
}
|
||
|
if (typeof file.excerpt === "string" && file.excerpt !== "") {
|
||
|
if (str2.indexOf(file.excerpt.trim()) === -1) {
|
||
|
buf += newline(file.excerpt) + newline(close);
|
||
|
}
|
||
|
}
|
||
|
return buf + newline(str2);
|
||
|
};
|
||
|
function newline(str2) {
|
||
|
return str2.slice(-1) !== "\n" ? str2 + "\n" : str2;
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/excerpt.js
|
||
|
var require_excerpt = __commonJS({
|
||
|
"node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/excerpt.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var defaults = require_defaults();
|
||
|
module2.exports = function(file, options2) {
|
||
|
const opts = defaults(options2);
|
||
|
if (file.data == null) {
|
||
|
file.data = {};
|
||
|
}
|
||
|
if (typeof opts.excerpt === "function") {
|
||
|
return opts.excerpt(file, opts);
|
||
|
}
|
||
|
const sep = file.data.excerpt_separator || opts.excerpt_separator;
|
||
|
if (sep == null && (opts.excerpt === false || opts.excerpt == null)) {
|
||
|
return file;
|
||
|
}
|
||
|
const delimiter = typeof opts.excerpt === "string" ? opts.excerpt : sep || opts.delimiters[0];
|
||
|
const idx = file.content.indexOf(delimiter);
|
||
|
if (idx !== -1) {
|
||
|
file.excerpt = file.content.slice(0, idx);
|
||
|
}
|
||
|
return file;
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/to-file.js
|
||
|
var require_to_file = __commonJS({
|
||
|
"node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/to-file.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var typeOf = require_kind_of();
|
||
|
var stringify = require_stringify();
|
||
|
var utils = require_utils();
|
||
|
module2.exports = function(file) {
|
||
|
if (typeOf(file) !== "object") {
|
||
|
file = { content: file };
|
||
|
}
|
||
|
if (typeOf(file.data) !== "object") {
|
||
|
file.data = {};
|
||
|
}
|
||
|
if (file.contents && file.content == null) {
|
||
|
file.content = file.contents;
|
||
|
}
|
||
|
utils.define(file, "orig", utils.toBuffer(file.content));
|
||
|
utils.define(file, "language", file.language || "");
|
||
|
utils.define(file, "matter", file.matter || "");
|
||
|
utils.define(file, "stringify", function(data, options2) {
|
||
|
if (options2 && options2.language) {
|
||
|
file.language = options2.language;
|
||
|
}
|
||
|
return stringify(file, data, options2);
|
||
|
});
|
||
|
file.content = utils.toString(file.content);
|
||
|
file.isEmpty = false;
|
||
|
file.excerpt = "";
|
||
|
return file;
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/parse.js
|
||
|
var require_parse = __commonJS({
|
||
|
"node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/parse.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var getEngine = require_engine();
|
||
|
var defaults = require_defaults();
|
||
|
module2.exports = function(language, str2, options2) {
|
||
|
const opts = defaults(options2);
|
||
|
const engine = getEngine(language, opts);
|
||
|
if (typeof engine.parse !== "function") {
|
||
|
throw new TypeError('expected "' + language + '.parse" to be a function');
|
||
|
}
|
||
|
return engine.parse(str2, opts);
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/index.js
|
||
|
var require_gray_matter = __commonJS({
|
||
|
"node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/index.js"(exports2, module2) {
|
||
|
"use strict";
|
||
|
var fs = require_fs();
|
||
|
var sections = require_section_matter();
|
||
|
var defaults = require_defaults();
|
||
|
var stringify = require_stringify();
|
||
|
var excerpt = require_excerpt();
|
||
|
var engines2 = require_engines();
|
||
|
var toFile = require_to_file();
|
||
|
var parse2 = require_parse();
|
||
|
var utils = require_utils();
|
||
|
function matter2(input, options2) {
|
||
|
if (input === "") {
|
||
|
return { data: {}, content: input, excerpt: "", orig: input };
|
||
|
}
|
||
|
let file = toFile(input);
|
||
|
const cached = matter2.cache[file.content];
|
||
|
if (!options2) {
|
||
|
if (cached) {
|
||
|
file = Object.assign({}, cached);
|
||
|
file.orig = cached.orig;
|
||
|
return file;
|
||
|
}
|
||
|
matter2.cache[file.content] = file;
|
||
|
}
|
||
|
return parseMatter(file, options2);
|
||
|
}
|
||
|
function parseMatter(file, options2) {
|
||
|
const opts = defaults(options2);
|
||
|
const open = opts.delimiters[0];
|
||
|
const close = "\n" + opts.delimiters[1];
|
||
|
let str2 = file.content;
|
||
|
if (opts.language) {
|
||
|
file.language = opts.language;
|
||
|
}
|
||
|
const openLen = open.length;
|
||
|
if (!utils.startsWith(str2, open, openLen)) {
|
||
|
excerpt(file, opts);
|
||
|
return file;
|
||
|
}
|
||
|
if (str2.charAt(openLen) === open.slice(-1)) {
|
||
|
return file;
|
||
|
}
|
||
|
str2 = str2.slice(openLen);
|
||
|
const len = str2.length;
|
||
|
const language = matter2.language(str2, opts);
|
||
|
if (language.name) {
|
||
|
file.language = language.name;
|
||
|
str2 = str2.slice(language.raw.length);
|
||
|
}
|
||
|
let closeIndex = str2.indexOf(close);
|
||
|
if (closeIndex === -1) {
|
||
|
closeIndex = len;
|
||
|
}
|
||
|
file.matter = str2.slice(0, closeIndex);
|
||
|
const block = file.matter.replace(/^\s*#[^\n]+/gm, "").trim();
|
||
|
if (block === "") {
|
||
|
file.isEmpty = true;
|
||
|
file.empty = file.content;
|
||
|
file.data = {};
|
||
|
} else {
|
||
|
file.data = parse2(file.language, file.matter, opts);
|
||
|
}
|
||
|
if (closeIndex === len) {
|
||
|
file.content = "";
|
||
|
} else {
|
||
|
file.content = str2.slice(closeIndex + close.length);
|
||
|
if (file.content[0] === "\r") {
|
||
|
file.content = file.content.slice(1);
|
||
|
}
|
||
|
if (file.content[0] === "\n") {
|
||
|
file.content = file.content.slice(1);
|
||
|
}
|
||
|
}
|
||
|
excerpt(file, opts);
|
||
|
if (opts.sections === true || typeof opts.section === "function") {
|
||
|
sections(file, opts.section);
|
||
|
}
|
||
|
return file;
|
||
|
}
|
||
|
matter2.engines = engines2;
|
||
|
matter2.stringify = function(file, data, options2) {
|
||
|
if (typeof file === "string")
|
||
|
file = matter2(file, options2);
|
||
|
return stringify(file, data, options2);
|
||
|
};
|
||
|
matter2.read = function(filepath, options2) {
|
||
|
const str2 = fs.readFileSync(filepath, "utf8");
|
||
|
const file = matter2(str2, options2);
|
||
|
file.path = filepath;
|
||
|
return file;
|
||
|
};
|
||
|
matter2.test = function(str2, options2) {
|
||
|
return utils.startsWith(str2, defaults(options2).delimiters[0]);
|
||
|
};
|
||
|
matter2.language = function(str2, options2) {
|
||
|
const opts = defaults(options2);
|
||
|
const open = opts.delimiters[0];
|
||
|
if (matter2.test(str2)) {
|
||
|
str2 = str2.slice(open.length);
|
||
|
}
|
||
|
const language = str2.slice(0, str2.search(/\r?\n/));
|
||
|
return {
|
||
|
raw: language,
|
||
|
name: language ? language.trim() : ""
|
||
|
};
|
||
|
};
|
||
|
matter2.cache = {};
|
||
|
matter2.clearCache = function() {
|
||
|
matter2.cache = {};
|
||
|
};
|
||
|
module2.exports = matter2;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// src/fn-main.ts
|
||
|
var fn_main_exports = {};
|
||
|
__export(fn_main_exports, {
|
||
|
default: () => ALxFolderNote
|
||
|
});
|
||
|
module.exports = __toCommonJS(fn_main_exports);
|
||
|
|
||
|
// node_modules/.pnpm/@aidenlx+folder-note-core@1.3.6/node_modules/@aidenlx/folder-note-core/lib/index.js
|
||
|
var import_obsidian = require("obsidian");
|
||
|
|
||
|
// node_modules/.pnpm/@aidenlx+folder-note-core@1.3.6/node_modules/@aidenlx/folder-note-core/lib/typings/api.js
|
||
|
var NoteLoc;
|
||
|
(function(NoteLoc2) {
|
||
|
NoteLoc2[NoteLoc2["Index"] = 0] = "Index";
|
||
|
NoteLoc2[NoteLoc2["Inside"] = 1] = "Inside";
|
||
|
NoteLoc2[NoteLoc2["Outside"] = 2] = "Outside";
|
||
|
})(NoteLoc || (NoteLoc = {}));
|
||
|
|
||
|
// node_modules/.pnpm/@aidenlx+folder-note-core@1.3.6/node_modules/@aidenlx/folder-note-core/lib/index.js
|
||
|
var getApi = (plugin) => {
|
||
|
var _a;
|
||
|
if (plugin)
|
||
|
return (_a = plugin.app.plugins.plugins["folder-note-core"]) === null || _a === void 0 ? void 0 : _a.api;
|
||
|
else
|
||
|
return window["FolderNoteAPIv0"];
|
||
|
};
|
||
|
|
||
|
// node_modules/.pnpm/@aidenlx+obsidian-icon-shortcodes@0.9.0/node_modules/@aidenlx/obsidian-icon-shortcodes/lib/index.js
|
||
|
var import_obsidian2 = require("obsidian");
|
||
|
var getApi2 = (plugin) => {
|
||
|
var _a;
|
||
|
if (plugin)
|
||
|
return (_a = plugin.app.plugins.plugins["obsidian-icon-shortcodes"]) === null || _a === void 0 ? void 0 : _a.api;
|
||
|
else
|
||
|
return window["IconSCAPIv0"];
|
||
|
};
|
||
|
|
||
|
// src/fn-main.ts
|
||
|
var import_obsidian16 = require("obsidian");
|
||
|
|
||
|
// src/drag-patch.ts
|
||
|
var import_obsidian3 = require("obsidian");
|
||
|
|
||
|
// node_modules/.pnpm/monkey-around@2.3.0/node_modules/monkey-around/mjs/index.js
|
||
|
function around(obj, factories) {
|
||
|
const removers = Object.keys(factories).map((key) => around1(obj, key, factories[key]));
|
||
|
return removers.length === 1 ? removers[0] : function() {
|
||
|
removers.forEach((r) => r());
|
||
|
};
|
||
|
}
|
||
|
function around1(obj, method, createWrapper) {
|
||
|
const original = obj[method], hadOwn = obj.hasOwnProperty(method);
|
||
|
let current = createWrapper(original);
|
||
|
if (original)
|
||
|
Object.setPrototypeOf(current, original);
|
||
|
Object.setPrototypeOf(wrapper, current);
|
||
|
obj[method] = wrapper;
|
||
|
return remove;
|
||
|
function wrapper(...args) {
|
||
|
if (current === original && obj[method] === wrapper)
|
||
|
remove();
|
||
|
return current.apply(this, args);
|
||
|
}
|
||
|
function remove() {
|
||
|
if (obj[method] === wrapper) {
|
||
|
if (hadOwn)
|
||
|
obj[method] = original;
|
||
|
else
|
||
|
delete obj[method];
|
||
|
}
|
||
|
if (current === original)
|
||
|
return;
|
||
|
current = original;
|
||
|
Object.setPrototypeOf(wrapper, original || Function);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// src/drag-patch.ts
|
||
|
var import_obsidian4 = require("obsidian");
|
||
|
var HD = {
|
||
|
none: [],
|
||
|
copy: ["copy"],
|
||
|
copyLink: ["copy", "link"],
|
||
|
copyMove: ["copy", "move"],
|
||
|
link: ["link"],
|
||
|
linkMove: ["link", "move"],
|
||
|
move: ["move"],
|
||
|
all: ["copy", "link", "move"],
|
||
|
uninitialized: []
|
||
|
};
|
||
|
function VD(e, t) {
|
||
|
t && function(e2, t2) {
|
||
|
if ("none" === t2)
|
||
|
return true;
|
||
|
let n = HD[e2.dataTransfer.effectAllowed];
|
||
|
return !!n && n.contains(t2);
|
||
|
}(e, t) && (e.dataTransfer.dropEffect = t);
|
||
|
}
|
||
|
var getMarkdownView = () => {
|
||
|
const leaves = app.workspace.getLeavesOfType("markdown");
|
||
|
if (leaves.length > 0) {
|
||
|
return leaves[0].view;
|
||
|
} else
|
||
|
return null;
|
||
|
};
|
||
|
var PatchDragManager = (plugin) => {
|
||
|
const { getFolderNote } = plugin.CoreApi;
|
||
|
const patchClipboardManager = () => {
|
||
|
const view = getMarkdownView();
|
||
|
if (!view)
|
||
|
return false;
|
||
|
const editMode = view.editMode ?? view.sourceMode;
|
||
|
if (!editMode)
|
||
|
throw new Error("Failed to patch clipboard manager: no edit view found");
|
||
|
plugin.register(
|
||
|
around(
|
||
|
editMode.clipboardManager.constructor.prototype,
|
||
|
{
|
||
|
handleDragOver: (next) => function(evt, ...args) {
|
||
|
const { draggable } = this.app.dragManager;
|
||
|
if (draggable && !(import_obsidian4.Platform.isMacOS ? evt.shiftKey : evt.altKey) && draggable.file instanceof import_obsidian4.TFolder && getFolderNote(draggable.file)) {
|
||
|
VD(evt, "link");
|
||
|
this.app.dragManager.setAction(
|
||
|
i18next.t("interface.drag-and-drop.insert-link-here")
|
||
|
);
|
||
|
} else {
|
||
|
next.call(this, evt, ...args);
|
||
|
}
|
||
|
},
|
||
|
handleDrop: (next) => function(evt, ...args) {
|
||
|
const fallback = () => next.call(this, evt, ...args);
|
||
|
const { draggable } = plugin.app.dragManager;
|
||
|
let note;
|
||
|
if (draggable?.type === "folder" && draggable.file instanceof import_obsidian4.TFolder && (note = getFolderNote(draggable.file))) {
|
||
|
draggable.file = note;
|
||
|
draggable.type = "file";
|
||
|
}
|
||
|
return fallback();
|
||
|
}
|
||
|
}
|
||
|
)
|
||
|
);
|
||
|
console.log("alx-folder-note: clipboard manager patched");
|
||
|
return true;
|
||
|
};
|
||
|
plugin.app.workspace.onLayoutReady(() => {
|
||
|
if (!patchClipboardManager()) {
|
||
|
const evt = app.workspace.on("layout-change", () => {
|
||
|
patchClipboardManager() && app.workspace.offref(evt);
|
||
|
});
|
||
|
plugin.registerEvent(evt);
|
||
|
}
|
||
|
});
|
||
|
plugin.register(
|
||
|
around(app.dragManager.constructor.prototype, {
|
||
|
dragFolder: (next) => function(evt, folder, source, ...args) {
|
||
|
let note;
|
||
|
if (note = getFolderNote(folder)) {
|
||
|
const url = app.getObsidianUrl(note);
|
||
|
evt.dataTransfer.setData("text/plain", url);
|
||
|
evt.dataTransfer.setData("text/uri-list", url);
|
||
|
}
|
||
|
return next.call(this, evt, folder, source, ...args);
|
||
|
}
|
||
|
})
|
||
|
);
|
||
|
};
|
||
|
var drag_patch_default = PatchDragManager;
|
||
|
|
||
|
// src/fe-patch.ts
|
||
|
var import_obsidian13 = require("obsidian");
|
||
|
|
||
|
// src/click-handler.ts
|
||
|
var import_obsidian7 = require("obsidian");
|
||
|
|
||
|
// src/misc.ts
|
||
|
var import_assert_never = __toESM(require_assert_never());
|
||
|
var import_obsidian5 = require("obsidian");
|
||
|
var import_obsidian6 = require("obsidian");
|
||
|
var import_path = __toESM(require_path_browserify());
|
||
|
var getViewOfType = (type, app2) => {
|
||
|
const vc = app2.viewRegistry.getViewCreatorByType(type);
|
||
|
return vc ? vc(new import_obsidian5.WorkspaceLeaf(app2)) : null;
|
||
|
};
|
||
|
var isFolder = (item) => item.file instanceof import_obsidian6.TFolder;
|
||
|
var isModifier = (evt, pref) => {
|
||
|
const { altKey, metaKey, ctrlKey, shiftKey } = evt;
|
||
|
switch (pref) {
|
||
|
case "Mod":
|
||
|
return import_obsidian6.Platform.isMacOS ? metaKey : ctrlKey;
|
||
|
case "Ctrl":
|
||
|
return ctrlKey;
|
||
|
case "Meta":
|
||
|
return metaKey;
|
||
|
case "Shift":
|
||
|
return shiftKey;
|
||
|
case "Alt":
|
||
|
return altKey;
|
||
|
default:
|
||
|
(0, import_assert_never.default)(pref);
|
||
|
}
|
||
|
};
|
||
|
var ClickNotice = class extends import_obsidian6.Notice {
|
||
|
constructor(message, action, timeout) {
|
||
|
super(typeof message === "string" ? message : "", timeout);
|
||
|
this.noticeEl.addEventListener("click", action);
|
||
|
if (typeof message === "function") {
|
||
|
this.noticeEl.empty();
|
||
|
let frag = new DocumentFragment();
|
||
|
message(frag);
|
||
|
this.noticeEl.append(frag);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
function getFileItemTitleEl(fileItem) {
|
||
|
return fileItem.titleEl ?? fileItem.selfEl;
|
||
|
}
|
||
|
function getFileItemInnerTitleEl(fileItem) {
|
||
|
return fileItem.titleInnerEl ?? fileItem.innerEl;
|
||
|
}
|
||
|
|
||
|
// src/click-handler.ts
|
||
|
var getClickHandler = (plugin) => {
|
||
|
const { getFolderNote, getFolderNotePath, getNewFolderNote } = plugin.CoreApi;
|
||
|
return async (item, evt) => {
|
||
|
if (!item || import_obsidian7.Platform.isMobile && !plugin.settings.mobileClickToOpen || // allow folder shift selection to work
|
||
|
evt.shiftKey || // triggered only when click on title
|
||
|
!(getFileItemInnerTitleEl(item) === evt.target || getFileItemInnerTitleEl(item).contains(evt.target)) || // ignore file being renamed
|
||
|
item.fileExplorer.fileBeingRenamed === item.file)
|
||
|
return false;
|
||
|
if (evt.type === "auxclick" && evt.button !== 1)
|
||
|
return false;
|
||
|
const folder = item.file;
|
||
|
const createNew = evt.type === "click" && isModifier(evt, plugin.settings.modifierForNewNote) || evt.type === "auxclick" && evt.button === 1;
|
||
|
try {
|
||
|
let folderNote = getFolderNote(folder), fnPath;
|
||
|
if (createNew && !folderNote && (fnPath = getFolderNotePath(folder))) {
|
||
|
folderNote = await plugin.app.vault.create(
|
||
|
fnPath.path,
|
||
|
getNewFolderNote(folder)
|
||
|
);
|
||
|
}
|
||
|
if (!folderNote)
|
||
|
return false;
|
||
|
await plugin.app.workspace.openLinkText(
|
||
|
folderNote.path,
|
||
|
"",
|
||
|
createNew || evt.type === "auxclick",
|
||
|
{ active: true }
|
||
|
);
|
||
|
if (plugin.settings.expandFolderOnClick && item.collapsed)
|
||
|
await item.setCollapsed(false);
|
||
|
return true;
|
||
|
} catch (error) {
|
||
|
console.error(error);
|
||
|
return false;
|
||
|
}
|
||
|
};
|
||
|
};
|
||
|
var pressHandler = (item, _evt) => {
|
||
|
if (!item || item.fileExplorer.fileBeingRenamed === item.file)
|
||
|
return false;
|
||
|
const folder = item.file;
|
||
|
item.fileExplorer.folderNoteUtils?.folderFocus.toggleFocusFolder(folder);
|
||
|
return true;
|
||
|
};
|
||
|
|
||
|
// src/fe-handler/active-folder.ts
|
||
|
var import_obsidian9 = require("obsidian");
|
||
|
|
||
|
// src/fe-handler/base.ts
|
||
|
var import_obsidian8 = require("obsidian");
|
||
|
var FEHandler_Base = class {
|
||
|
constructor(plugin, fileExplorer) {
|
||
|
this.plugin = plugin;
|
||
|
this.fileExplorer = fileExplorer;
|
||
|
}
|
||
|
longPressRegistered = /* @__PURE__ */ new WeakSet();
|
||
|
get fncApi() {
|
||
|
return this.plugin.CoreApi;
|
||
|
}
|
||
|
get app() {
|
||
|
return this.plugin.app;
|
||
|
}
|
||
|
get files() {
|
||
|
return this.fileExplorer.files;
|
||
|
}
|
||
|
getAfItem = (path) => this.fileExplorer.fileItems[path] ?? null;
|
||
|
iterateItems = (callback) => Object.values(this.fileExplorer.fileItems).forEach(callback);
|
||
|
debouncers = {};
|
||
|
_execQueue(queueName) {
|
||
|
const { action, queue } = this.queues[queueName];
|
||
|
if (queue.size <= 0)
|
||
|
return;
|
||
|
if (queue instanceof Set) {
|
||
|
queue.forEach((id) => action(id));
|
||
|
} else {
|
||
|
queue.forEach((args, id) => action(id, ...args));
|
||
|
}
|
||
|
queue.clear();
|
||
|
}
|
||
|
execQueue(queueName) {
|
||
|
if (!Object.keys(this.queues).includes(queueName))
|
||
|
return;
|
||
|
const debouncer = this.debouncers[queueName] ?? (this.debouncers[queueName] = (0, import_obsidian8.debounce)(
|
||
|
() => this._execQueue(queueName),
|
||
|
200,
|
||
|
true
|
||
|
));
|
||
|
debouncer();
|
||
|
}
|
||
|
};
|
||
|
|
||
|
// src/fe-handler/active-folder.ts
|
||
|
var isActiveClass = "is-active";
|
||
|
var ActiveFolder = class extends FEHandler_Base {
|
||
|
queues = {};
|
||
|
constructor(plugin, fileExplorer) {
|
||
|
super(plugin, fileExplorer);
|
||
|
const { workspace } = plugin.app;
|
||
|
this.handleActiveLeafChange(workspace.activeLeaf);
|
||
|
plugin.registerEvent(
|
||
|
workspace.on(
|
||
|
"active-leaf-change",
|
||
|
this.handleActiveLeafChange.bind(this)
|
||
|
)
|
||
|
);
|
||
|
this.plugin.register(() => this.activeFolder = null);
|
||
|
}
|
||
|
_activeFolder = null;
|
||
|
set activeFolder(folder) {
|
||
|
const getTitleEl = (folder2) => folder2 && this.fileExplorer.fileItems[folder2.path] ? getFileItemTitleEl(this.fileExplorer.fileItems[folder2.path]) : void 0;
|
||
|
if (!folder) {
|
||
|
getTitleEl(this._activeFolder)?.removeClass(isActiveClass);
|
||
|
} else if (folder !== this._activeFolder) {
|
||
|
getTitleEl(this._activeFolder)?.removeClass(isActiveClass);
|
||
|
getTitleEl(folder)?.addClass(isActiveClass);
|
||
|
}
|
||
|
this._activeFolder = folder;
|
||
|
}
|
||
|
get activeFolder() {
|
||
|
return this._activeFolder;
|
||
|
}
|
||
|
handleActiveLeafChange(leaf) {
|
||
|
let folder;
|
||
|
if (leaf && leaf.view instanceof import_obsidian9.MarkdownView && (folder = this.fncApi.getFolderFromNote(leaf.view.file))) {
|
||
|
this.activeFolder = folder;
|
||
|
} else {
|
||
|
this.activeFolder = null;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
|
||
|
// src/fe-handler/folder-focus.ts
|
||
|
var import_obsidian10 = require("obsidian");
|
||
|
var focusedFolderCls = "alx-focused-folder";
|
||
|
var focusModeCls = "alx-folder-focus";
|
||
|
var FolderFocus = class extends FEHandler_Base {
|
||
|
queues = {};
|
||
|
constructor(plugin, fileExplorer) {
|
||
|
super(plugin, fileExplorer);
|
||
|
const { workspace } = plugin.app;
|
||
|
this.plugin.register(
|
||
|
() => this.focusedFolder && this.toggleFocusFolder(null)
|
||
|
);
|
||
|
[
|
||
|
workspace.on("file-menu", (menu, af) => {
|
||
|
if (!(af instanceof import_obsidian10.TFolder) || af.isRoot())
|
||
|
return;
|
||
|
menu.addItem(
|
||
|
(item) => item.setTitle("Toggle Focus").setIcon("crossed-star").onClick(() => this.toggleFocusFolder(af))
|
||
|
);
|
||
|
})
|
||
|
].forEach(this.plugin.registerEvent.bind(this.plugin));
|
||
|
}
|
||
|
_focusedFolder = null;
|
||
|
get focusedFolder() {
|
||
|
return this._focusedFolder?.folder ?? null;
|
||
|
}
|
||
|
set focusedFolder(item) {
|
||
|
if (this._focusedFolder) {
|
||
|
const { folder, collapsedCache } = this._focusedFolder;
|
||
|
if (folder.collapsed !== collapsedCache)
|
||
|
folder.setCollapsed(collapsedCache);
|
||
|
}
|
||
|
this._focusedFolder = item ? { folder: item, collapsedCache: item.collapsed } : null;
|
||
|
if (item && item.collapsed) {
|
||
|
item.setCollapsed(false);
|
||
|
this.plugin.app.nextFrame(() => {
|
||
|
this.fileExplorer.dom.infinityScroll.computeSync();
|
||
|
this.fileExplorer.dom.infinityScroll.scrollIntoView(item);
|
||
|
});
|
||
|
}
|
||
|
this.fileExplorer.dom.navFileContainerEl.toggleClass(focusModeCls, !!item);
|
||
|
}
|
||
|
toggleFocusFolder(folder) {
|
||
|
const folderItem = folder ? this.getAfItem(folder.path) : null;
|
||
|
if (this.focusedFolder) {
|
||
|
this._focusFolder(this.focusedFolder, true);
|
||
|
}
|
||
|
if (folderItem && folderItem.file.path === this.focusedFolder?.file.path) {
|
||
|
this.focusedFolder = null;
|
||
|
} else {
|
||
|
folderItem && this._focusFolder(folderItem, false);
|
||
|
this.focusedFolder = folderItem;
|
||
|
}
|
||
|
}
|
||
|
_focusFolder(folder, revert = false) {
|
||
|
if (folder.file.isRoot())
|
||
|
throw new Error("Cannot focus on root dir");
|
||
|
folder.el.toggleClass(focusedFolderCls, !revert);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
// src/fe-handler/folder-mark.ts
|
||
|
var import_obsidian11 = require("obsidian");
|
||
|
var import_path2 = __toESM(require_path_browserify());
|
||
|
var folderIconMark = "alx-folder-icons";
|
||
|
var folderNoteClass = "alx-folder-note";
|
||
|
var folderClass = "alx-folder-with-note";
|
||
|
var emptyFolderClass = "alx-empty-folder";
|
||
|
var FolderMark = class extends FEHandler_Base {
|
||
|
constructor(plugin, fileExplorer) {
|
||
|
super(plugin, fileExplorer);
|
||
|
this.initFolderMark();
|
||
|
if (this.plugin.settings.folderIcon) {
|
||
|
this.initFolderIcon();
|
||
|
}
|
||
|
if (this.plugin.settings.hideCollapseIndicator) {
|
||
|
this.initHideCollapseIndicator();
|
||
|
}
|
||
|
}
|
||
|
queues = {
|
||
|
mark: {
|
||
|
queue: /* @__PURE__ */ new Map(),
|
||
|
action: (path, revert) => {
|
||
|
const item = this.getAfItem(path);
|
||
|
if (!item) {
|
||
|
console.warn("no afitem found for path %s, escaping...", path);
|
||
|
return;
|
||
|
}
|
||
|
if (isFolder(item)) {
|
||
|
if (revert === !!item.isFolderWithNote) {
|
||
|
item.el.toggleClass(folderClass, !revert);
|
||
|
item.isFolderWithNote = revert ? void 0 : true;
|
||
|
if (this.plugin.settings.hideCollapseIndicator)
|
||
|
item.el.toggleClass(
|
||
|
emptyFolderClass,
|
||
|
revert ? false : item.file.children.length === 1
|
||
|
);
|
||
|
}
|
||
|
this._updateIcon(path, revert, item);
|
||
|
} else if (revert === !!item.isFolderNote) {
|
||
|
item.el.toggleClass(folderNoteClass, !revert);
|
||
|
item.isFolderNote = revert ? void 0 : true;
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
changedFolder: {
|
||
|
queue: /* @__PURE__ */ new Set(),
|
||
|
action: (path) => {
|
||
|
let note = this.fncApi.getFolderNote(path);
|
||
|
if (note) {
|
||
|
this.getAfItem(path)?.el.toggleClass(
|
||
|
emptyFolderClass,
|
||
|
note.parent.children.length === 1
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
initFolderMark() {
|
||
|
const { vault, metadataCache } = this.app;
|
||
|
this.markAll();
|
||
|
[
|
||
|
vault.on("folder-note:create", (note, folder) => {
|
||
|
this.setMark(note);
|
||
|
this.setMark(folder);
|
||
|
}),
|
||
|
vault.on("folder-note:delete", (note, folder) => {
|
||
|
this.setMark(note, true);
|
||
|
this.setMark(folder, true);
|
||
|
}),
|
||
|
vault.on("folder-note:rename", () => {
|
||
|
}),
|
||
|
vault.on("folder-note:cfg-changed", () => {
|
||
|
this.markAll(true);
|
||
|
window.setTimeout(this.markAll, 200);
|
||
|
}),
|
||
|
metadataCache.on("changed", (file) => {
|
||
|
let folder;
|
||
|
if (folder = this.fncApi.getFolderFromNote(file)) {
|
||
|
this.setMark(folder);
|
||
|
}
|
||
|
})
|
||
|
].forEach(this.plugin.registerEvent.bind(this.plugin));
|
||
|
}
|
||
|
//#region set class mark for folder notes and folders
|
||
|
setMark = (target, revert = false) => {
|
||
|
if (!target)
|
||
|
return;
|
||
|
const { queue } = this.queues.mark;
|
||
|
let path;
|
||
|
if (target instanceof import_obsidian11.TAbstractFile) {
|
||
|
path = target.path;
|
||
|
} else if (typeof target === "string") {
|
||
|
path = target;
|
||
|
} else {
|
||
|
path = target.file.path;
|
||
|
}
|
||
|
queue.set(path, [revert]);
|
||
|
this.execQueue("mark");
|
||
|
};
|
||
|
markAll = (revert = false) => {
|
||
|
this.iterateItems((item) => {
|
||
|
if (isFolder(item) && !revert) {
|
||
|
this.markFolderNote(item.file);
|
||
|
} else if (revert) {
|
||
|
this.setMark(item, true);
|
||
|
}
|
||
|
});
|
||
|
};
|
||
|
markFolderNote = (af) => {
|
||
|
if (af instanceof import_obsidian11.TFolder && af.isRoot())
|
||
|
return false;
|
||
|
const { getFolderNote, getFolderFromNote } = this.fncApi;
|
||
|
let found = null;
|
||
|
if (af instanceof import_obsidian11.TFile)
|
||
|
found = getFolderFromNote(af);
|
||
|
else if (af instanceof import_obsidian11.TFolder)
|
||
|
found = getFolderNote(af);
|
||
|
if (found) {
|
||
|
this.setMark(found);
|
||
|
this.setMark(af);
|
||
|
} else {
|
||
|
this.setMark(af, true);
|
||
|
}
|
||
|
return !!found;
|
||
|
};
|
||
|
// #endregion
|
||
|
//#region folder icon setup
|
||
|
initFolderIcon() {
|
||
|
document.body.toggleClass(folderIconMark, this.plugin.settings.folderIcon);
|
||
|
const { vault } = this.app;
|
||
|
const updateIcon = () => {
|
||
|
for (const path of this.foldersWithIcon) {
|
||
|
this.setMark(path);
|
||
|
}
|
||
|
};
|
||
|
[
|
||
|
vault.on("iconsc:initialized", updateIcon),
|
||
|
vault.on("iconsc:changed", updateIcon)
|
||
|
].forEach(this.plugin.registerEvent.bind(this.plugin));
|
||
|
}
|
||
|
foldersWithIcon = /* @__PURE__ */ new Set();
|
||
|
_updateIcon(path, revert, item) {
|
||
|
const api = this.plugin.IconSCAPI;
|
||
|
if (!api)
|
||
|
return;
|
||
|
let folderNotePath, metadata;
|
||
|
const revertIcon = () => {
|
||
|
delete item.el.dataset.icon;
|
||
|
delete item.el.dataset["icon-type"];
|
||
|
this.foldersWithIcon.delete(path);
|
||
|
item.el.style.removeProperty("--alx-folder-icon-txt");
|
||
|
item.el.style.removeProperty("--alx-folder-icon-url");
|
||
|
};
|
||
|
if (revert) {
|
||
|
revertIcon();
|
||
|
} else if ((folderNotePath = this.fncApi.getFolderNotePath(path)?.path) && (metadata = this.plugin.app.metadataCache.getCache(folderNotePath))) {
|
||
|
let iconId = metadata.frontmatter?.icon, icon;
|
||
|
if (iconId && typeof iconId === "string" && (icon = api.getIcon(iconId, true))) {
|
||
|
this.foldersWithIcon.add(path);
|
||
|
item.el.dataset.icon = iconId.replace(/^:|:$/g, "");
|
||
|
if (!api.isEmoji(iconId)) {
|
||
|
item.el.dataset.iconType = "svg";
|
||
|
item.el.style.setProperty("--alx-folder-icon-url", `url("${icon}")`);
|
||
|
item.el.style.setProperty("--alx-folder-icon-txt", '" "');
|
||
|
} else {
|
||
|
item.el.dataset.iconType = "emoji";
|
||
|
item.el.style.setProperty("--alx-folder-icon-url", '""');
|
||
|
item.el.style.setProperty("--alx-folder-icon-txt", `"${icon}"`);
|
||
|
}
|
||
|
} else if (item.el.dataset.icon) {
|
||
|
revertIcon();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
//#endregion
|
||
|
//#region set hide collapse indicator
|
||
|
initHideCollapseIndicator() {
|
||
|
if (!this.plugin.settings.hideCollapseIndicator)
|
||
|
return;
|
||
|
const { vault } = this.app;
|
||
|
[
|
||
|
vault.on("create", (file) => this.setChangedFolder(file.parent.path)),
|
||
|
vault.on("delete", (file) => {
|
||
|
let parent = (0, import_path2.dirname)(file.path);
|
||
|
this.setChangedFolder(parent === "." ? "/" : parent);
|
||
|
}),
|
||
|
vault.on("rename", (file, oldPath) => {
|
||
|
this.setChangedFolder(file.parent.path);
|
||
|
let parent = (0, import_path2.dirname)(oldPath);
|
||
|
this.setChangedFolder(parent === "." ? "/" : parent);
|
||
|
})
|
||
|
].forEach(this.plugin.registerEvent.bind(this.plugin));
|
||
|
}
|
||
|
setChangedFolder = (folderPath) => {
|
||
|
if (!folderPath || folderPath === "/")
|
||
|
return;
|
||
|
this.queues.changedFolder.queue.add(folderPath);
|
||
|
this.execQueue("changedFolder");
|
||
|
};
|
||
|
//#endregion
|
||
|
};
|
||
|
|
||
|
// src/fe-handler/index.ts
|
||
|
var getFileExplorerHandlers = (plugin, fileExplorer) => ({
|
||
|
// initialized (mark folders, hook evt handlers...) when constructed
|
||
|
plugin,
|
||
|
folderFocus: new FolderFocus(plugin, fileExplorer),
|
||
|
folderMark: new FolderMark(plugin, fileExplorer),
|
||
|
activeFolder: new ActiveFolder(plugin, fileExplorer)
|
||
|
});
|
||
|
var fe_handler_default = getFileExplorerHandlers;
|
||
|
|
||
|
// src/modules/long-press.ts
|
||
|
var import_obsidian12 = require("obsidian");
|
||
|
var timer = null;
|
||
|
var startX = 0;
|
||
|
var startY = 0;
|
||
|
var requestTimeout = (fn, delay) => {
|
||
|
let start = (/* @__PURE__ */ new Date()).getTime();
|
||
|
let handle = {};
|
||
|
let loop = () => {
|
||
|
let current = (/* @__PURE__ */ new Date()).getTime();
|
||
|
let delta = current - start;
|
||
|
if (delta >= delay) {
|
||
|
fn();
|
||
|
} else {
|
||
|
handle.value = requestAnimationFrame(loop);
|
||
|
}
|
||
|
};
|
||
|
handle.value = requestAnimationFrame(loop);
|
||
|
return handle;
|
||
|
};
|
||
|
var clearRequestTimeout = (handle) => {
|
||
|
handle && cancelAnimationFrame(handle.value);
|
||
|
};
|
||
|
var clearLongPressTimer = () => {
|
||
|
clearRequestTimeout(timer);
|
||
|
timer = null;
|
||
|
};
|
||
|
var fireLongPressEvent = (originalEvent) => {
|
||
|
clearLongPressTimer();
|
||
|
let allowClickEvent = originalEvent.target?.dispatchEvent(
|
||
|
new CustomEvent("long-press", {
|
||
|
bubbles: true,
|
||
|
cancelable: true,
|
||
|
// custom event data (legacy)
|
||
|
detail: {
|
||
|
clientX: originalEvent.clientX,
|
||
|
clientY: originalEvent.clientY
|
||
|
},
|
||
|
// add coordinate data that would typically acompany a touch/click event
|
||
|
// @ts-ignore
|
||
|
clientX: originalEvent.clientX,
|
||
|
clientY: originalEvent.clientY,
|
||
|
offsetX: originalEvent.offsetX,
|
||
|
offsetY: originalEvent.offsetY,
|
||
|
pageX: originalEvent.pageX,
|
||
|
pageY: originalEvent.pageY,
|
||
|
screenX: originalEvent.screenX,
|
||
|
screenY: originalEvent.screenY
|
||
|
})
|
||
|
);
|
||
|
if (!allowClickEvent) {
|
||
|
const suppressEvent = (e) => {
|
||
|
moniterIn?.removeEventListener("click", suppressEvent, true);
|
||
|
cancelEvent(e);
|
||
|
};
|
||
|
moniterIn?.addEventListener("click", suppressEvent, true);
|
||
|
}
|
||
|
};
|
||
|
var startLongPressTimer = (e) => {
|
||
|
clearLongPressTimer();
|
||
|
let el = e.target;
|
||
|
let longPressDelayInMs = parseInt(
|
||
|
getNearestAttribute(el, "data-long-press-delay", "800"),
|
||
|
10
|
||
|
);
|
||
|
timer = requestTimeout(fireLongPressEvent.bind(el, e), longPressDelayInMs);
|
||
|
};
|
||
|
var cancelEvent = (e) => {
|
||
|
e.stopImmediatePropagation();
|
||
|
e.preventDefault();
|
||
|
e.stopPropagation();
|
||
|
};
|
||
|
var mouseDownHandler = (e) => {
|
||
|
startX = e.clientX;
|
||
|
startY = e.clientY;
|
||
|
startLongPressTimer(e);
|
||
|
};
|
||
|
var mouseMoveHandler = (e) => {
|
||
|
clearLongPressTimer();
|
||
|
};
|
||
|
var getNearestAttribute = (el, attributeName, defaultValue) => {
|
||
|
while (el instanceof Element && el !== document.documentElement) {
|
||
|
let attributeValue = el.getAttribute(attributeName);
|
||
|
if (attributeValue) {
|
||
|
return attributeValue;
|
||
|
}
|
||
|
el = el.parentNode;
|
||
|
}
|
||
|
return defaultValue;
|
||
|
};
|
||
|
var moniterIn;
|
||
|
var removeEvtListener = (el) => {
|
||
|
moniterIn = null;
|
||
|
el.removeEventListener("pointerup", clearLongPressTimer, true);
|
||
|
el.removeEventListener("drag", mouseMoveHandler, true);
|
||
|
el.removeEventListener("wheel", clearLongPressTimer, true);
|
||
|
el.removeEventListener("scroll", clearLongPressTimer, true);
|
||
|
el.removeEventListener("pointerdown", mouseDownHandler, true);
|
||
|
};
|
||
|
var AddLongPressEvt = (plugin, el) => {
|
||
|
if (!plugin.settings.longPressFocus || import_obsidian12.Platform.isMobile)
|
||
|
return;
|
||
|
if (moniterIn) {
|
||
|
removeEvtListener(moniterIn);
|
||
|
}
|
||
|
moniterIn = el;
|
||
|
el.addEventListener("pointerup", clearLongPressTimer, true);
|
||
|
el.addEventListener("drag", mouseMoveHandler, true);
|
||
|
el.addEventListener("wheel", clearLongPressTimer, true);
|
||
|
el.addEventListener("scroll", clearLongPressTimer, true);
|
||
|
el.addEventListener("pointerdown", mouseDownHandler, true);
|
||
|
plugin.register(() => removeEvtListener(el));
|
||
|
};
|
||
|
var long_press_default = AddLongPressEvt;
|
||
|
|
||
|
// src/fe-patch.ts
|
||
|
var getFolderItemFromEl = (navEl, view) => {
|
||
|
const folder = view.files.get(navEl);
|
||
|
return folder instanceof import_obsidian13.TFolder ? view.fileItems[folder.path] : null;
|
||
|
};
|
||
|
var Rt = (evt, target) => {
|
||
|
let n = evt.relatedTarget;
|
||
|
return !(n instanceof Node && target.contains(n));
|
||
|
};
|
||
|
var resetFileExplorer = async (plugin) => {
|
||
|
for (const leaf of plugin.app.workspace.getLeavesOfType("file-explorer")) {
|
||
|
let state = leaf.getViewState();
|
||
|
await leaf.setViewState({ type: "empty" });
|
||
|
leaf.setViewState(state);
|
||
|
}
|
||
|
};
|
||
|
var PatchFileExplorer = (plugin) => {
|
||
|
const { getFolderFromNote } = plugin.CoreApi, clickHandler = getClickHandler(plugin);
|
||
|
let FileExplorerViewInst = getViewOfType(
|
||
|
"file-explorer",
|
||
|
plugin.app
|
||
|
), FileExplorerPluginInst = plugin.app.internalPlugins.plugins["file-explorer"]?.instance;
|
||
|
if (!FileExplorerViewInst || !FileExplorerPluginInst)
|
||
|
return;
|
||
|
const FileExplorerView5 = FileExplorerViewInst.constructor, FileExplorerPlugin = FileExplorerPluginInst.constructor, FolderItem5 = FileExplorerViewInst.createFolderDom(
|
||
|
plugin.app.vault.getRoot()
|
||
|
).constructor;
|
||
|
FileExplorerViewInst = null;
|
||
|
const uninstallers = [
|
||
|
around(FileExplorerView5.prototype, {
|
||
|
load: (next) => function() {
|
||
|
const self = this;
|
||
|
next.call(self);
|
||
|
self.folderNoteUtils = fe_handler_default(plugin, self);
|
||
|
long_press_default(plugin, self.dom.navFileContainerEl);
|
||
|
self.containerEl.on(
|
||
|
"auxclick",
|
||
|
".nav-folder",
|
||
|
(evt, navEl) => {
|
||
|
const item = getFolderItemFromEl(navEl, self);
|
||
|
item && clickHandler(item, evt);
|
||
|
}
|
||
|
);
|
||
|
self.containerEl.on(
|
||
|
"long-press",
|
||
|
".nav-folder",
|
||
|
(evt, navEl) => {
|
||
|
const item = getFolderItemFromEl(navEl, self);
|
||
|
item && pressHandler(item, evt);
|
||
|
}
|
||
|
);
|
||
|
},
|
||
|
onFileMouseover: (next) => function(evt, navTitleEl) {
|
||
|
next.call(this, evt, navTitleEl);
|
||
|
if (!Rt(evt, navTitleEl))
|
||
|
return;
|
||
|
const af = this.currentHoverFile;
|
||
|
if (!af || // if event is triggered on same file, do nothing
|
||
|
this._AFN_HOVER && this._AFN_HOVER === af || !(af instanceof import_obsidian13.TFolder))
|
||
|
return;
|
||
|
const note = plugin.CoreApi.getFolderNote(af);
|
||
|
if (note) {
|
||
|
this.app.workspace.trigger("hover-link", {
|
||
|
event: evt,
|
||
|
source: "file-explorer",
|
||
|
hoverParent: this,
|
||
|
targetEl: navTitleEl,
|
||
|
linktext: note.path
|
||
|
});
|
||
|
}
|
||
|
this._AFN_HOVER = af;
|
||
|
},
|
||
|
onFileMouseout: (next) => function(evt, navTitleEl) {
|
||
|
next.call(this, evt, navTitleEl);
|
||
|
if (!Rt(evt, navTitleEl))
|
||
|
return;
|
||
|
delete this._AFN_HOVER;
|
||
|
}
|
||
|
}),
|
||
|
// patch reveal in folder to alter folder note target to linked folder
|
||
|
around(FileExplorerPlugin.prototype, {
|
||
|
revealInFolder: (next) => function(file) {
|
||
|
if (file instanceof import_obsidian13.TFile && plugin.settings.hideNoteInExplorer) {
|
||
|
const findResult = getFolderFromNote(file);
|
||
|
if (findResult)
|
||
|
file = findResult;
|
||
|
}
|
||
|
return next.call(this, file);
|
||
|
}
|
||
|
}),
|
||
|
around(FolderItem5.prototype, {
|
||
|
onTitleElClick: (next) => async function(evt) {
|
||
|
if (!await clickHandler(this, evt))
|
||
|
next.call(this, evt);
|
||
|
},
|
||
|
onSelfClick: (next) => async function(evt) {
|
||
|
if (!await clickHandler(this, evt))
|
||
|
next.call(this, evt);
|
||
|
}
|
||
|
})
|
||
|
];
|
||
|
resetFileExplorer(plugin);
|
||
|
plugin.register(() => {
|
||
|
uninstallers.forEach((revert) => revert());
|
||
|
resetFileExplorer(plugin);
|
||
|
});
|
||
|
};
|
||
|
var fe_patch_default = PatchFileExplorer;
|
||
|
|
||
|
// src/modules/set-folder-icon.ts
|
||
|
var import_gray_matter = __toESM(require_gray_matter());
|
||
|
var import_obsidian14 = require("obsidian");
|
||
|
var registerSetFolderIconCmd = (plugin) => {
|
||
|
const { workspace, vault } = plugin.app;
|
||
|
const setIconField = async (icon, file) => icon && vault.modify(
|
||
|
file,
|
||
|
(0, import_gray_matter.default)(await vault.read(file)).stringify(
|
||
|
{ icon: icon.id },
|
||
|
{ flowLevel: 3, indent: 4 }
|
||
|
)
|
||
|
);
|
||
|
plugin.addCommand({
|
||
|
id: "set-folder-icon",
|
||
|
name: "Set Folder Icon",
|
||
|
checkCallback: (checking) => {
|
||
|
const iscAPI = plugin.IconSCAPI;
|
||
|
if (!iscAPI)
|
||
|
return false;
|
||
|
const mdView = workspace.getActiveViewOfType(import_obsidian14.MarkdownView);
|
||
|
if (!mdView)
|
||
|
return false;
|
||
|
const folder = plugin.CoreApi.getFolderFromNote(mdView.file);
|
||
|
if (!folder)
|
||
|
return false;
|
||
|
if (checking)
|
||
|
return true;
|
||
|
iscAPI.getIconFromUser().then((icon) => setIconField(icon, mdView.file));
|
||
|
}
|
||
|
});
|
||
|
plugin.registerEvent(
|
||
|
workspace.on("file-menu", (menu, af, src) => {
|
||
|
const iscAPI = plugin.IconSCAPI;
|
||
|
if (!iscAPI)
|
||
|
return;
|
||
|
let note;
|
||
|
if (af instanceof import_obsidian14.TFolder && (note = plugin.CoreApi.getFolderNote(af)) || af instanceof import_obsidian14.TFile && (note = af, plugin.CoreApi.getFolderFromNote(af))) {
|
||
|
const folderNote = note;
|
||
|
menu.addItem(
|
||
|
(item) => item.setIcon("image-glyph").setTitle("Set Folder Icon").onClick(
|
||
|
async () => setIconField(await iscAPI.getIconFromUser(), folderNote)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
})
|
||
|
);
|
||
|
};
|
||
|
var set_folder_icon_default = registerSetFolderIconCmd;
|
||
|
|
||
|
// src/settings.ts
|
||
|
var import_obsidian15 = require("obsidian");
|
||
|
var noHideNoteMark = "alx-no-hide-note";
|
||
|
var MobileNoClickMark = "alx-no-click-on-mobile";
|
||
|
var DEFAULT_SETTINGS = {
|
||
|
modifierForNewNote: "Mod",
|
||
|
hideNoteInExplorer: true,
|
||
|
hideCollapseIndicator: false,
|
||
|
longPressFocus: false,
|
||
|
folderIcon: true,
|
||
|
folderNotePref: null,
|
||
|
deleteOutsideNoteWithFolder: null,
|
||
|
indexName: null,
|
||
|
autoRename: null,
|
||
|
folderNoteTemplate: null,
|
||
|
mobileClickToOpen: true,
|
||
|
longPressDelay: 800,
|
||
|
expandFolderOnClick: false
|
||
|
};
|
||
|
var old = [
|
||
|
"folderNotePref",
|
||
|
"deleteOutsideNoteWithFolder",
|
||
|
"indexName",
|
||
|
"autoRename",
|
||
|
"folderNoteTemplate"
|
||
|
];
|
||
|
var ALxFolderNoteSettingTab = class extends import_obsidian15.PluginSettingTab {
|
||
|
plugin;
|
||
|
constructor(app2, plugin) {
|
||
|
super(app2, plugin);
|
||
|
this.plugin = plugin;
|
||
|
}
|
||
|
checkMigrated() {
|
||
|
return old.every((key) => this.plugin.settings[key] === null);
|
||
|
}
|
||
|
getInitGuide(desc, targetPluginID, container) {
|
||
|
return new import_obsidian15.Setting(container).setDesc(
|
||
|
desc + "use the buttons to install & enable it then reload alx-folder-note to take effects"
|
||
|
).addButton(
|
||
|
(btn) => btn.setIcon("down-arrow-with-tail").setTooltip("Go to Plugin Page").onClick(
|
||
|
() => window.open(`obsidian://show-plugin?id=${targetPluginID}`)
|
||
|
)
|
||
|
).addButton(
|
||
|
(btn) => btn.setIcon("reset").setTooltip("Reload alx-folder-note").onClick(async () => {
|
||
|
await this.app.plugins.disablePlugin(this.plugin.manifest.id);
|
||
|
await this.app.plugins.enablePlugin(this.plugin.manifest.id);
|
||
|
this.app.setting.openTabById(this.plugin.manifest.id);
|
||
|
})
|
||
|
);
|
||
|
}
|
||
|
display() {
|
||
|
let { containerEl } = this;
|
||
|
containerEl.empty();
|
||
|
new import_obsidian15.Setting(containerEl).setHeading().setName("Core");
|
||
|
try {
|
||
|
this.plugin.CoreApi;
|
||
|
if (this.checkMigrated()) {
|
||
|
this.plugin.CoreApi.renderCoreSettings(containerEl);
|
||
|
} else
|
||
|
this.setMigrate();
|
||
|
} catch (error) {
|
||
|
this.getInitGuide(
|
||
|
"Seems like Folder Note Core is not enabled, ",
|
||
|
"folder-note-core",
|
||
|
containerEl
|
||
|
);
|
||
|
return;
|
||
|
}
|
||
|
this.setFolderIcon();
|
||
|
this.setModifier();
|
||
|
this.setHide();
|
||
|
this.addToggle(this.containerEl, "expandFolderOnClick").setName("Expand Folder on Click").setDesc(
|
||
|
"Expand collapsed folders with note while opening them by clicking on folder title"
|
||
|
);
|
||
|
this.setMobile();
|
||
|
this.setFocus();
|
||
|
new import_obsidian15.Setting(containerEl).setHeading().setName("Folder Overview");
|
||
|
const folderv = this.app.plugins.plugins["alx-folder-note-folderv"];
|
||
|
if (folderv?.renderFoldervSettings) {
|
||
|
folderv.renderFoldervSettings(containerEl);
|
||
|
} else {
|
||
|
this.getInitGuide(
|
||
|
"Folder Overview (folderv) is now an optional component, ",
|
||
|
"alx-folder-note-folderv",
|
||
|
containerEl
|
||
|
);
|
||
|
}
|
||
|
new import_obsidian15.Setting(containerEl).setHeading().setName("Debug");
|
||
|
this.plugin.CoreApi.renderLogLevel(containerEl);
|
||
|
}
|
||
|
setMigrate() {
|
||
|
new import_obsidian15.Setting(this.containerEl).setName("Migrate settings to Folder Note Core").setDesc(
|
||
|
"Some settings has not been migrated to Folder Note Core, click Migrate to migrate old config or Cancel to use config in Folder Note Core in favor of old config"
|
||
|
).addButton(
|
||
|
(cb) => cb.setButtonText("Migrate").onClick(async () => {
|
||
|
const toImport = old.reduce(
|
||
|
(obj, k) => (obj[k] = this.plugin.settings[k] ?? void 0, obj),
|
||
|
{}
|
||
|
);
|
||
|
this.plugin.CoreApi.importSettings(toImport);
|
||
|
old.forEach((k) => this.plugin.settings[k] = null);
|
||
|
await this.plugin.saveSettings();
|
||
|
this.display();
|
||
|
})
|
||
|
).addButton(
|
||
|
(cb) => cb.setButtonText("Cancel").onClick(async () => {
|
||
|
old.forEach((k) => this.plugin.settings[k] = null);
|
||
|
await this.plugin.saveSettings();
|
||
|
this.display();
|
||
|
})
|
||
|
);
|
||
|
}
|
||
|
setMobile() {
|
||
|
if (!import_obsidian15.Platform.isMobile)
|
||
|
return;
|
||
|
this.addToggle(
|
||
|
this.containerEl,
|
||
|
"mobileClickToOpen",
|
||
|
(value) => document.body.toggleClass(MobileNoClickMark, !value)
|
||
|
).setName("Click folder title to open folder note on mobile").setDesc(
|
||
|
"Disable this if you want to the default action. You can still use context menu to open folder note"
|
||
|
);
|
||
|
}
|
||
|
setModifier = () => {
|
||
|
new import_obsidian15.Setting(this.containerEl).setName("Modifier for New Note").setDesc("Choose a modifier to click folders with to create folder notes").addDropdown((dropDown) => {
|
||
|
const windowsOpts = {
|
||
|
Mod: "Ctrl (Cmd in macOS)",
|
||
|
Ctrl: "Ctrl (Ctrl in macOS)",
|
||
|
Meta: "\u229E Win",
|
||
|
// Shift: "Shift",
|
||
|
Alt: "Alt"
|
||
|
};
|
||
|
const macOSOpts = {
|
||
|
Mod: "\u2318 Cmd (Ctrl in Windows)",
|
||
|
Ctrl: "\u2303 Control",
|
||
|
Meta: "\u2318 Cmd (Win in Windows)",
|
||
|
// Shift: "⇧ Shift",
|
||
|
Alt: "\u2325 Option"
|
||
|
};
|
||
|
const options2 = import_obsidian15.Platform.isMacOS ? macOSOpts : windowsOpts;
|
||
|
dropDown.addOptions(options2).setValue(this.plugin.settings.modifierForNewNote).onChange(async (value) => {
|
||
|
this.plugin.settings.modifierForNewNote = value;
|
||
|
await this.plugin.saveSettings();
|
||
|
});
|
||
|
});
|
||
|
};
|
||
|
setHide() {
|
||
|
this.addToggle(
|
||
|
this.containerEl,
|
||
|
"hideNoteInExplorer",
|
||
|
(value) => document.body.toggleClass(noHideNoteMark, !value)
|
||
|
).setName("Hide Folder Note").setDesc("Hide folder note files from file explorer");
|
||
|
this.addToggle(this.containerEl, "hideCollapseIndicator").setName("Hide Collapse Indicator").setDesc(
|
||
|
"Hide collapse indicator when folder contains only folder note, reload obsidian to take effects"
|
||
|
);
|
||
|
}
|
||
|
setFolderIcon() {
|
||
|
this.addToggle(
|
||
|
this.containerEl,
|
||
|
"folderIcon",
|
||
|
(value) => document.body.toggleClass(folderIconMark, value)
|
||
|
).setName("Set Folder Icon in Folder Notes").setDesc(
|
||
|
createFragment((el) => {
|
||
|
el.appendText(
|
||
|
"Set `icon` field with icon shortcode in frontmatter of foler note to specify linked folder's icon"
|
||
|
);
|
||
|
el.createEl("br");
|
||
|
el.createEl("a", {
|
||
|
href: "https://github.com/aidenlx/obsidian-icon-shortcodes",
|
||
|
text: "Icon Shortcodes v0.5.1+"
|
||
|
});
|
||
|
el.appendText(" Required. ");
|
||
|
if (!getApi2(this.plugin))
|
||
|
el.appendText("(Currently not enabled)");
|
||
|
el.createEl("br");
|
||
|
el.appendText("Restart obsidian to take effects");
|
||
|
})
|
||
|
);
|
||
|
}
|
||
|
setFocus() {
|
||
|
new import_obsidian15.Setting(this.containerEl).setHeading().setName("Focus").setDesc(
|
||
|
`You can use "Toggle Focus" option in folder context menu${import_obsidian15.Platform.isMobile ? "" : " or long press on folder title"} to focus on a specific folder`
|
||
|
);
|
||
|
if (!import_obsidian15.Platform.isMobile)
|
||
|
this.addToggle(this.containerEl, "longPressFocus").setName("Long Press on Folder to Focus").setDesc(
|
||
|
"Long press with mouse on folder name inside file explorer to focus the folder. Only work on Desktop, reload obsidian to take effects"
|
||
|
);
|
||
|
new import_obsidian15.Setting(this.containerEl).addText((text) => {
|
||
|
Object.assign(text.inputEl, {
|
||
|
type: "number",
|
||
|
min: "0.2",
|
||
|
step: "0.1",
|
||
|
required: true
|
||
|
});
|
||
|
text.inputEl.addClass("input-short");
|
||
|
text.inputEl.insertAdjacentElement(
|
||
|
"afterend",
|
||
|
createSpan({ cls: ["validity", "unit"], text: "second(s)" })
|
||
|
);
|
||
|
text.setValue(`${this.plugin.longPressDelay / 1e3}`).onChange(async (val) => {
|
||
|
const delay = +val * 1e3;
|
||
|
this.plugin.longPressDelay = delay;
|
||
|
await this.plugin.saveSettings();
|
||
|
});
|
||
|
}).setName("Long Press Delay");
|
||
|
}
|
||
|
addToggle(addTo, key, onSet) {
|
||
|
return new import_obsidian15.Setting(addTo).addToggle((toggle) => {
|
||
|
toggle.setValue(this.plugin.settings[key]).onChange(
|
||
|
(value) => (this.plugin.settings[key] = value, onSet && onSet(value), this.plugin.saveSettings())
|
||
|
);
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
|
||
|
// src/fn-main.ts
|
||
|
var foldervNotifiedKey = "foldervNotified";
|
||
|
var ALxFolderNote = class extends import_obsidian16.Plugin {
|
||
|
settings = DEFAULT_SETTINGS;
|
||
|
get CoreApi() {
|
||
|
let message;
|
||
|
let api = getApi(this) || getApi();
|
||
|
if (api) {
|
||
|
return api;
|
||
|
} else {
|
||
|
message = "Failed to initialize alx-folder-note";
|
||
|
new ClickNotice(
|
||
|
message + ": Click here for more details",
|
||
|
() => this.app.setting.openTabById(this.manifest.id)
|
||
|
);
|
||
|
throw new Error(message + ": folder-note-core not available");
|
||
|
}
|
||
|
}
|
||
|
get IconSCAPI() {
|
||
|
if (this.settings.folderIcon) {
|
||
|
return getApi2(this);
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
noticeFoldervChange() {
|
||
|
if (!this.app.plugins.plugins["alx-folder-note-folderv"] && // not installed
|
||
|
!Number(localStorage.getItem(foldervNotifiedKey))) {
|
||
|
new ClickNotice(
|
||
|
(frag) => {
|
||
|
frag.appendText(
|
||
|
"Since v0.13.0, folder overview (folderv) has become an optional component that requires a dedicated plugin, "
|
||
|
);
|
||
|
frag.createEl("button", {
|
||
|
text: "Go to Folder Overview Section of the Setting Tab to Install"
|
||
|
}).addEventListener(
|
||
|
"click",
|
||
|
() => this.app.setting.openTabById(this.manifest.id)
|
||
|
);
|
||
|
frag.createEl("button", {
|
||
|
text: "Don't show this again"
|
||
|
});
|
||
|
},
|
||
|
() => localStorage.setItem(foldervNotifiedKey, "1"),
|
||
|
5e3
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
initialized = false;
|
||
|
initialize() {
|
||
|
if (this.initialized)
|
||
|
return;
|
||
|
fe_patch_default(this);
|
||
|
document.body.toggleClass(
|
||
|
MobileNoClickMark,
|
||
|
!this.settings.mobileClickToOpen
|
||
|
);
|
||
|
document.body.toggleClass(
|
||
|
noHideNoteMark,
|
||
|
!this.settings.hideNoteInExplorer
|
||
|
);
|
||
|
this.initialized = true;
|
||
|
}
|
||
|
async onload() {
|
||
|
console.log("loading alx-folder-note");
|
||
|
await this.loadSettings();
|
||
|
let tab = new ALxFolderNoteSettingTab(this.app, this);
|
||
|
if (!tab.checkMigrated())
|
||
|
new import_obsidian16.Notice(
|
||
|
"Old config not yet migrated, \nOpen Settings Tab of ALx Folder Note for details"
|
||
|
);
|
||
|
this.addSettingTab(tab);
|
||
|
let initCalled = false;
|
||
|
const init = () => {
|
||
|
initCalled = true;
|
||
|
set_folder_icon_default(this);
|
||
|
this.app.workspace.onLayoutReady(this.initialize.bind(this));
|
||
|
drag_patch_default(this);
|
||
|
this.noticeFoldervChange();
|
||
|
};
|
||
|
if (getApi(this)) {
|
||
|
init();
|
||
|
} else {
|
||
|
if (this.app.plugins.enabledPlugins.has("folder-note-core")) {
|
||
|
const timeoutId = window.setTimeout(() => {
|
||
|
if (!initCalled) {
|
||
|
this.app.vault.offref(evtRef);
|
||
|
throw new Error(
|
||
|
"folder-note-core enabled but fail to load within 5s"
|
||
|
);
|
||
|
}
|
||
|
}, 5e3);
|
||
|
const evtRef = this.app.vault.on("folder-note:api-ready", () => {
|
||
|
init();
|
||
|
if (timeoutId)
|
||
|
window.clearTimeout(timeoutId);
|
||
|
this.app.vault.offref(evtRef);
|
||
|
});
|
||
|
} else {
|
||
|
this.CoreApi;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
async loadSettings() {
|
||
|
this.settings = { ...this.settings, ...await this.loadData() };
|
||
|
this.setupLongPressDelay();
|
||
|
}
|
||
|
async saveSettings() {
|
||
|
await this.saveData(this.settings);
|
||
|
}
|
||
|
get longPressDelay() {
|
||
|
return this.settings.longPressDelay;
|
||
|
}
|
||
|
set longPressDelay(delay) {
|
||
|
this.settings.longPressDelay = delay;
|
||
|
document.body.dataset[longPressDelayDataKey] = `${delay}`;
|
||
|
}
|
||
|
setupLongPressDelay() {
|
||
|
this.longPressDelay = this.longPressDelay;
|
||
|
this.register(() => delete document.body.dataset[longPressDelayDataKey]);
|
||
|
}
|
||
|
};
|
||
|
var longPressDelayDataKey = "longPressDelay";
|
||
|
/*!
|
||
|
* long-press-event
|
||
|
* Pure JavaScript long-press-event
|
||
|
* https://github.com/john-doherty/long-press-event
|
||
|
* @author John Doherty <www.johndoherty.info>
|
||
|
* @license MIT
|
||
|
*/
|
||
|
/*! Bundled license information:
|
||
|
|
||
|
is-extendable/index.js:
|
||
|
(*!
|
||
|
* is-extendable <https://github.com/jonschlinkert/is-extendable>
|
||
|
*
|
||
|
* Copyright (c) 2015, Jon Schlinkert.
|
||
|
* Licensed under the MIT License.
|
||
|
*)
|
||
|
|
||
|
strip-bom-string/index.js:
|
||
|
(*!
|
||
|
* strip-bom-string <https://github.com/jonschlinkert/strip-bom-string>
|
||
|
*
|
||
|
* Copyright (c) 2015, 2017, Jon Schlinkert.
|
||
|
* Released under the MIT License.
|
||
|
*)
|
||
|
*/
|
||
|
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vbm9kZV9tb2R1bGVzLy5wbnBtL2Fzc2VydC1uZXZlckAxLjIuMS9ub2RlX21vZHVsZXMvYXNzZXJ0LW5ldmVyL2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9wYXRoLWJyb3dzZXJpZnlAMS4wLjEvbm9kZV9tb2R1bGVzL3BhdGgtYnJvd3NlcmlmeS9pbmRleC5qcyIsICIuLi9ub2RlX21vZHVsZXMvLnBucG0va2luZC1vZkA2LjAuMy9ub2RlX21vZHVsZXMva2luZC1vZi9pbmRleC5qcyIsICIuLi9ub2RlX21vZHVsZXMvLnBucG0vaXMtZXh0ZW5kYWJsZUAwLjEuMS9ub2RlX21vZHVsZXMvaXMtZXh0ZW5kYWJsZS9pbmRleC5qcyIsICIuLi9ub2RlX21vZHVsZXMvLnBucG0vZXh0ZW5kLXNoYWxsb3dAMi4wLjEvbm9kZV9tb2R1bGVzL2V4dGVuZC1zaGFsbG93L2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9zZWN0aW9uLW1hdHRlckAxLjAuMC9ub2RlX21vZHVsZXMvc2VjdGlvbi1tYXR0ZXIvaW5kZXguanMiLCAiLi4vbm9kZV9tb2R1bGVzLy5wbnBtL2pzLXlhbWxAMy4xNC4xL25vZGVfbW9kdWxlcy9qcy15YW1sL2xpYi9qcy15YW1sL2NvbW1vbi5qcyIsICIuLi9ub2RlX21vZHVsZXMvLnBucG0vanMteWFtbEAzLjE0LjEvbm9kZV9tb2R1bGVzL2pzLXlhbWwvbGliL2pzLXlhbWwvZXhjZXB0aW9uLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC9tYXJrLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC90eXBlLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC9zY2hlbWEuanMiLCAiLi4vbm9kZV9tb2R1bGVzLy5wbnBtL2pzLXlhbWxAMy4xNC4xL25vZGVfbW9kdWxlcy9qcy15YW1sL2xpYi9qcy15YW1sL3R5cGUvc3RyLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC90eXBlL3NlcS5qcyIsICIuLi9ub2RlX21vZHVsZXMvLnBucG0vanMteWFtbEAzLjE0LjEvbm9kZV9tb2R1bGVzL2pzLXlhbWwvbGliL2pzLXlhbWwvdHlwZS9tYXAuanMiLCAiLi4vbm9kZV9tb2R1bGVzLy5wbnBtL2pzLXlhbWxAMy4xNC4xL25vZGVfbW9kdWxlcy9qcy15YW1sL2xpYi9qcy15YW1sL3NjaGVtYS9mYWlsc2FmZS5qcyIsICIuLi9ub2RlX21vZHVsZXMvLnBucG0vanMteWFtbEAzLjE0LjEvbm9kZV9tb2R1bGVzL2pzLXlhbWwvbGliL2pzLXlhbWwvdHlwZS9udWxsLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC90eXBlL2Jvb2wuanMiLCAiLi4vbm9kZV9tb2R1bGVzLy5wbnBtL2pzLXlhbWxAMy4xNC4xL25vZGVfbW9kdWxlcy9qcy15YW1sL2xpYi9qcy15YW1sL3R5cGUvaW50LmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC90eXBlL2Zsb2F0LmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC9zY2hlbWEvanNvbi5qcyIsICIuLi9ub2RlX21vZHVsZXMvLnBucG0vanMteWFtbEAzLjE0LjEvbm9kZV9tb2R1bGVzL2pzLXlhbWwvbGliL2pzLXlhbWwvc2NoZW1hL2NvcmUuanMiLCAiLi4vbm9kZV9tb2R1bGVzLy5wbnBtL2pzLXlhbWxAMy4xNC4xL25vZGVfbW9kdWxlcy9qcy15YW1sL2xpYi9qcy15YW1sL3R5cGUvdGltZXN0YW1wLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC90eXBlL21lcmdlLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC90eXBlL2JpbmFyeS5qcyIsICIuLi9ub2RlX21vZHVsZXMvLnBucG0vanMteWFtbEAzLjE0LjEvbm9kZV9tb2R1bGVzL2pzLXlhbWwvbGliL2pzLXlhbWwvdHlwZS9vbWFwLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC90eXBlL3BhaXJzLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC90eXBlL3NldC5qcyIsICIuLi9ub2RlX21vZHVsZXMvLnBucG0vanMteWFtbEAzLjE0LjEvbm9kZV9tb2R1bGVzL2pzLXlhbWwvbGliL2pzLXlhbWwvc2NoZW1hL2RlZmF1bHRfc2FmZS5qcyIsICIuLi9ub2RlX21vZHVsZXMvLnBucG0vanMteWFtbEAzLjE0LjEvbm9kZV9tb2R1bGVzL2pzLXlhbWwvbGliL2pzLXlhbWwvdHlwZS9qcy91bmRlZmluZWQuanMiLCAiLi4vbm9kZV9tb2R1bGVzLy5wbnBtL2pzLXlhbWxAMy4xNC4xL25vZGVfbW9kdWxlcy9qcy15YW1sL2xpYi9qcy15YW1sL3R5cGUvanMvcmVnZXhwLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC90eXBlL2pzL2Z1bmN0aW9uLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC9zY2hlbWEvZGVmYXVsdF9mdWxsLmpzIiwgIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9qcy15YW1sQDMuMTQuMS9ub2RlX21vZHVsZXMvanMteWFtbC9saWIvanMteWFtbC9sb2FkZXIuanMiLCAiLi4vbm9kZV9tb2R1bGVzLy5wbnBtL2pzLXlhbWxAMy4xNC4xL25vZGVfbW9kdWxlcy9qcy15YW1sL2xpYi9qcy15YW1sL2R1bXBlci5qcyIsICIuLi9ub2RlX21vZHVsZXMvLnBucG0vanMteWFtbEAzLjE0LjEvbm9kZV9tb2R1bGVzL2pzLXlhbWwvbGliL2pzLXlhbWwuanMiLCAiLi4vb
|