unplugin-unocss-config
Version:
Use uno config in run-time
783 lines (781 loc) • 2.72 MB
JavaScript
"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 __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
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/tsup@8.0.1_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js
var init_cjs_shims = __esm({
"../../node_modules/.pnpm/tsup@8.0.1_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js"() {
"use strict";
}
});
// ../../node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/dist/jiti.js
var require_jiti = __commonJS({
"../../node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/dist/jiti.js"(exports2, module2) {
"use strict";
init_cjs_shims();
(() => {
var __webpack_modules__ = { "./node_modules/.pnpm/create-require@1.1.1/node_modules/create-require/create-require.js": (module3, __unused_webpack_exports, __webpack_require__2) => {
const nativeModule = __webpack_require__2("module"), path2 = __webpack_require__2("path"), fs4 = __webpack_require__2("fs");
module3.exports = function(filename) {
return filename || (filename = process.cwd()), function(path3) {
try {
return fs4.lstatSync(path3).isDirectory();
} catch (e2) {
return false;
}
}(filename) && (filename = path2.join(filename, "index.js")), nativeModule.createRequire ? nativeModule.createRequire(filename) : nativeModule.createRequireFromPath ? nativeModule.createRequireFromPath(filename) : function(filename2) {
const mod = new nativeModule.Module(filename2, null);
return mod.filename = filename2, mod.paths = nativeModule.Module._nodeModulePaths(path2.dirname(filename2)), mod._compile("module.exports = require;", filename2), mod.exports;
}(filename);
};
}, "./node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js": (module3, __unused_webpack_exports, __webpack_require__2) => {
"use strict";
const Yallist = __webpack_require__2("./node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js"), MAX = Symbol("max"), LENGTH = Symbol("length"), LENGTH_CALCULATOR = Symbol("lengthCalculator"), ALLOW_STALE = Symbol("allowStale"), MAX_AGE = Symbol("maxAge"), DISPOSE = Symbol("dispose"), NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet"), LRU_LIST = Symbol("lruList"), CACHE = Symbol("cache"), UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet"), naiveLength = () => 1;
const get = (self, key, doUse) => {
const node = self[CACHE].get(key);
if (node) {
const hit = node.value;
if (isStale(self, hit)) {
if (del(self, node), !self[ALLOW_STALE])
return;
} else
doUse && (self[UPDATE_AGE_ON_GET] && (node.value.now = Date.now()), self[LRU_LIST].unshiftNode(node));
return hit.value;
}
}, isStale = (self, hit) => {
if (!hit || !hit.maxAge && !self[MAX_AGE])
return false;
const diff = Date.now() - hit.now;
return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE];
}, trim = (self) => {
if (self[LENGTH] > self[MAX])
for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && null !== walker; ) {
const prev = walker.prev;
del(self, walker), walker = prev;
}
}, del = (self, node) => {
if (node) {
const hit = node.value;
self[DISPOSE] && self[DISPOSE](hit.key, hit.value), self[LENGTH] -= hit.length, self[CACHE].delete(hit.key), self[LRU_LIST].removeNode(node);
}
};
class Entry {
constructor(key, value2, length, now, maxAge) {
this.key = key, this.value = value2, this.length = length, this.now = now, this.maxAge = maxAge || 0;
}
}
const forEachStep = (self, fn, node, thisp) => {
let hit = node.value;
isStale(self, hit) && (del(self, node), self[ALLOW_STALE] || (hit = void 0)), hit && fn.call(thisp, hit.value, hit.key, self);
};
module3.exports = class {
constructor(options) {
if ("number" == typeof options && (options = { max: options }), options || (options = {}), options.max && ("number" != typeof options.max || options.max < 0))
throw new TypeError("max must be a non-negative number");
this[MAX] = options.max || 1 / 0;
const lc = options.length || naiveLength;
if (this[LENGTH_CALCULATOR] = "function" != typeof lc ? naiveLength : lc, this[ALLOW_STALE] = options.stale || false, options.maxAge && "number" != typeof options.maxAge)
throw new TypeError("maxAge must be a number");
this[MAX_AGE] = options.maxAge || 0, this[DISPOSE] = options.dispose, this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false, this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false, this.reset();
}
set max(mL) {
if ("number" != typeof mL || mL < 0)
throw new TypeError("max must be a non-negative number");
this[MAX] = mL || 1 / 0, trim(this);
}
get max() {
return this[MAX];
}
set allowStale(allowStale) {
this[ALLOW_STALE] = !!allowStale;
}
get allowStale() {
return this[ALLOW_STALE];
}
set maxAge(mA) {
if ("number" != typeof mA)
throw new TypeError("maxAge must be a non-negative number");
this[MAX_AGE] = mA, trim(this);
}
get maxAge() {
return this[MAX_AGE];
}
set lengthCalculator(lC) {
"function" != typeof lC && (lC = naiveLength), lC !== this[LENGTH_CALCULATOR] && (this[LENGTH_CALCULATOR] = lC, this[LENGTH] = 0, this[LRU_LIST].forEach((hit) => {
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key), this[LENGTH] += hit.length;
})), trim(this);
}
get lengthCalculator() {
return this[LENGTH_CALCULATOR];
}
get length() {
return this[LENGTH];
}
get itemCount() {
return this[LRU_LIST].length;
}
rforEach(fn, thisp) {
thisp = thisp || this;
for (let walker = this[LRU_LIST].tail; null !== walker; ) {
const prev = walker.prev;
forEachStep(this, fn, walker, thisp), walker = prev;
}
}
forEach(fn, thisp) {
thisp = thisp || this;
for (let walker = this[LRU_LIST].head; null !== walker; ) {
const next = walker.next;
forEachStep(this, fn, walker, thisp), walker = next;
}
}
keys() {
return this[LRU_LIST].toArray().map((k) => k.key);
}
values() {
return this[LRU_LIST].toArray().map((k) => k.value);
}
reset() {
this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length && this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value)), this[CACHE] = /* @__PURE__ */ new Map(), this[LRU_LIST] = new Yallist(), this[LENGTH] = 0;
}
dump() {
return this[LRU_LIST].map((hit) => !isStale(this, hit) && { k: hit.key, v: hit.value, e: hit.now + (hit.maxAge || 0) }).toArray().filter((h) => h);
}
dumpLru() {
return this[LRU_LIST];
}
set(key, value2, maxAge) {
if ((maxAge = maxAge || this[MAX_AGE]) && "number" != typeof maxAge)
throw new TypeError("maxAge must be a number");
const now = maxAge ? Date.now() : 0, len = this[LENGTH_CALCULATOR](value2, key);
if (this[CACHE].has(key)) {
if (len > this[MAX])
return del(this, this[CACHE].get(key)), false;
const item = this[CACHE].get(key).value;
return this[DISPOSE] && (this[NO_DISPOSE_ON_SET] || this[DISPOSE](key, item.value)), item.now = now, item.maxAge = maxAge, item.value = value2, this[LENGTH] += len - item.length, item.length = len, this.get(key), trim(this), true;
}
const hit = new Entry(key, value2, len, now, maxAge);
return hit.length > this[MAX] ? (this[DISPOSE] && this[DISPOSE](key, value2), false) : (this[LENGTH] += hit.length, this[LRU_LIST].unshift(hit), this[CACHE].set(key, this[LRU_LIST].head), trim(this), true);
}
has(key) {
if (!this[CACHE].has(key))
return false;
const hit = this[CACHE].get(key).value;
return !isStale(this, hit);
}
get(key) {
return get(this, key, true);
}
peek(key) {
return get(this, key, false);
}
pop() {
const node = this[LRU_LIST].tail;
return node ? (del(this, node), node.value) : null;
}
del(key) {
del(this, this[CACHE].get(key));
}
load(arr) {
this.reset();
const now = Date.now();
for (let l = arr.length - 1; l >= 0; l--) {
const hit = arr[l], expiresAt = hit.e || 0;
if (0 === expiresAt)
this.set(hit.k, hit.v);
else {
const maxAge = expiresAt - now;
maxAge > 0 && this.set(hit.k, hit.v, maxAge);
}
}
}
prune() {
this[CACHE].forEach((value2, key) => get(this, key, false));
}
};
}, "./node_modules/.pnpm/mlly@1.4.2/node_modules/mlly/dist lazy recursive": (module3) => {
function webpackEmptyAsyncContext(req) {
return Promise.resolve().then(() => {
var e2 = new Error("Cannot find module '" + req + "'");
throw e2.code = "MODULE_NOT_FOUND", e2;
});
}
webpackEmptyAsyncContext.keys = () => [], webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext, webpackEmptyAsyncContext.id = "./node_modules/.pnpm/mlly@1.4.2/node_modules/mlly/dist lazy recursive", module3.exports = webpackEmptyAsyncContext;
}, "./node_modules/.pnpm/object-hash@3.0.0/node_modules/object-hash/index.js": (module3, exports3, __webpack_require__2) => {
"use strict";
var crypto = __webpack_require__2("crypto");
function objectHash(object, options) {
return function(object2, options2) {
var hashingStream;
hashingStream = "passthrough" !== options2.algorithm ? crypto.createHash(options2.algorithm) : new PassThrough();
void 0 === hashingStream.write && (hashingStream.write = hashingStream.update, hashingStream.end = hashingStream.update);
var hasher = typeHasher(options2, hashingStream);
hasher.dispatch(object2), hashingStream.update || hashingStream.end("");
if (hashingStream.digest)
return hashingStream.digest("buffer" === options2.encoding ? void 0 : options2.encoding);
var buf = hashingStream.read();
if ("buffer" === options2.encoding)
return buf;
return buf.toString(options2.encoding);
}(object, options = applyDefaults(object, options));
}
(exports3 = module3.exports = objectHash).sha1 = function(object) {
return objectHash(object);
}, exports3.keys = function(object) {
return objectHash(object, { excludeValues: true, algorithm: "sha1", encoding: "hex" });
}, exports3.MD5 = function(object) {
return objectHash(object, { algorithm: "md5", encoding: "hex" });
}, exports3.keysMD5 = function(object) {
return objectHash(object, { algorithm: "md5", encoding: "hex", excludeValues: true });
};
var hashes = crypto.getHashes ? crypto.getHashes().slice() : ["sha1", "md5"];
hashes.push("passthrough");
var encodings = ["buffer", "hex", "binary", "base64"];
function applyDefaults(object, sourceOptions) {
sourceOptions = sourceOptions || {};
var options = {};
if (options.algorithm = sourceOptions.algorithm || "sha1", options.encoding = sourceOptions.encoding || "hex", options.excludeValues = !!sourceOptions.excludeValues, options.algorithm = options.algorithm.toLowerCase(), options.encoding = options.encoding.toLowerCase(), options.ignoreUnknown = true === sourceOptions.ignoreUnknown, options.respectType = false !== sourceOptions.respectType, options.respectFunctionNames = false !== sourceOptions.respectFunctionNames, options.respectFunctionProperties = false !== sourceOptions.respectFunctionProperties, options.unorderedArrays = true === sourceOptions.unorderedArrays, options.unorderedSets = false !== sourceOptions.unorderedSets, options.unorderedObjects = false !== sourceOptions.unorderedObjects, options.replacer = sourceOptions.replacer || void 0, options.excludeKeys = sourceOptions.excludeKeys || void 0, void 0 === object)
throw new Error("Object argument required.");
for (var i = 0; i < hashes.length; ++i)
hashes[i].toLowerCase() === options.algorithm.toLowerCase() && (options.algorithm = hashes[i]);
if (-1 === hashes.indexOf(options.algorithm))
throw new Error('Algorithm "' + options.algorithm + '" not supported. supported values: ' + hashes.join(", "));
if (-1 === encodings.indexOf(options.encoding) && "passthrough" !== options.algorithm)
throw new Error('Encoding "' + options.encoding + '" not supported. supported values: ' + encodings.join(", "));
return options;
}
function isNativeFunction(f) {
if ("function" != typeof f)
return false;
return null != /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(f));
}
function typeHasher(options, writeTo, context) {
context = context || [];
var write = function(str) {
return writeTo.update ? writeTo.update(str, "utf8") : writeTo.write(str, "utf8");
};
return { dispatch: function(value2) {
options.replacer && (value2 = options.replacer(value2));
var type = typeof value2;
return null === value2 && (type = "null"), this["_" + type](value2);
}, _object: function(object) {
var objString = Object.prototype.toString.call(object), objType = /\[object (.*)\]/i.exec(objString);
objType = (objType = objType ? objType[1] : "unknown:[" + objString + "]").toLowerCase();
var objectNumber;
if ((objectNumber = context.indexOf(object)) >= 0)
return this.dispatch("[CIRCULAR:" + objectNumber + "]");
if (context.push(object), "undefined" != typeof Buffer && Buffer.isBuffer && Buffer.isBuffer(object))
return write("buffer:"), write(object);
if ("object" === objType || "function" === objType || "asyncfunction" === objType) {
var keys = Object.keys(object);
options.unorderedObjects && (keys = keys.sort()), false === options.respectType || isNativeFunction(object) || keys.splice(0, 0, "prototype", "__proto__", "constructor"), options.excludeKeys && (keys = keys.filter(function(key) {
return !options.excludeKeys(key);
})), write("object:" + keys.length + ":");
var self = this;
return keys.forEach(function(key) {
self.dispatch(key), write(":"), options.excludeValues || self.dispatch(object[key]), write(",");
});
}
if (!this["_" + objType]) {
if (options.ignoreUnknown)
return write("[" + objType + "]");
throw new Error('Unknown object type "' + objType + '"');
}
this["_" + objType](object);
}, _array: function(arr, unordered) {
unordered = void 0 !== unordered ? unordered : false !== options.unorderedArrays;
var self = this;
if (write("array:" + arr.length + ":"), !unordered || arr.length <= 1)
return arr.forEach(function(entry) {
return self.dispatch(entry);
});
var contextAdditions = [], entries = arr.map(function(entry) {
var strm = new PassThrough(), localContext = context.slice();
return typeHasher(options, strm, localContext).dispatch(entry), contextAdditions = contextAdditions.concat(localContext.slice(context.length)), strm.read().toString();
});
return context = context.concat(contextAdditions), entries.sort(), this._array(entries, false);
}, _date: function(date) {
return write("date:" + date.toJSON());
}, _symbol: function(sym) {
return write("symbol:" + sym.toString());
}, _error: function(err) {
return write("error:" + err.toString());
}, _boolean: function(bool) {
return write("bool:" + bool.toString());
}, _string: function(string) {
write("string:" + string.length + ":"), write(string.toString());
}, _function: function(fn) {
write("fn:"), isNativeFunction(fn) ? this.dispatch("[native]") : this.dispatch(fn.toString()), false !== options.respectFunctionNames && this.dispatch("function-name:" + String(fn.name)), options.respectFunctionProperties && this._object(fn);
}, _number: function(number) {
return write("number:" + number.toString());
}, _xml: function(xml) {
return write("xml:" + xml.toString());
}, _null: function() {
return write("Null");
}, _undefined: function() {
return write("Undefined");
}, _regexp: function(regex) {
return write("regex:" + regex.toString());
}, _uint8array: function(arr) {
return write("uint8array:"), this.dispatch(Array.prototype.slice.call(arr));
}, _uint8clampedarray: function(arr) {
return write("uint8clampedarray:"), this.dispatch(Array.prototype.slice.call(arr));
}, _int8array: function(arr) {
return write("int8array:"), this.dispatch(Array.prototype.slice.call(arr));
}, _uint16array: function(arr) {
return write("uint16array:"), this.dispatch(Array.prototype.slice.call(arr));
}, _int16array: function(arr) {
return write("int16array:"), this.dispatch(Array.prototype.slice.call(arr));
}, _uint32array: function(arr) {
return write("uint32array:"), this.dispatch(Array.prototype.slice.call(arr));
}, _int32array: function(arr) {
return write("int32array:"), this.dispatch(Array.prototype.slice.call(arr));
}, _float32array: function(arr) {
return write("float32array:"), this.dispatch(Array.prototype.slice.call(arr));
}, _float64array: function(arr) {
return write("float64array:"), this.dispatch(Array.prototype.slice.call(arr));
}, _arraybuffer: function(arr) {
return write("arraybuffer:"), this.dispatch(new Uint8Array(arr));
}, _url: function(url) {
return write("url:" + url.toString());
}, _map: function(map) {
write("map:");
var arr = Array.from(map);
return this._array(arr, false !== options.unorderedSets);
}, _set: function(set) {
write("set:");
var arr = Array.from(set);
return this._array(arr, false !== options.unorderedSets);
}, _file: function(file) {
return write("file:"), this.dispatch([file.name, file.size, file.type, file.lastModfied]);
}, _blob: function() {
if (options.ignoreUnknown)
return write("[blob]");
throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n');
}, _domwindow: function() {
return write("domwindow");
}, _bigint: function(number) {
return write("bigint:" + number.toString());
}, _process: function() {
return write("process");
}, _timer: function() {
return write("timer");
}, _pipe: function() {
return write("pipe");
}, _tcp: function() {
return write("tcp");
}, _udp: function() {
return write("udp");
}, _tty: function() {
return write("tty");
}, _statwatcher: function() {
return write("statwatcher");
}, _securecontext: function() {
return write("securecontext");
}, _connection: function() {
return write("connection");
}, _zlib: function() {
return write("zlib");
}, _context: function() {
return write("context");
}, _nodescript: function() {
return write("nodescript");
}, _httpparser: function() {
return write("httpparser");
}, _dataview: function() {
return write("dataview");
}, _signal: function() {
return write("signal");
}, _fsevent: function() {
return write("fsevent");
}, _tlswrap: function() {
return write("tlswrap");
} };
}
function PassThrough() {
return { buf: "", write: function(b) {
this.buf += b;
}, end: function(b) {
this.buf += b;
}, read: function() {
return this.buf;
} };
}
exports3.writeToStream = function(object, options, stream) {
return void 0 === stream && (stream = options, options = {}), typeHasher(options = applyDefaults(object, options), stream).dispatch(object);
};
}, "./node_modules/.pnpm/pirates@4.0.6/node_modules/pirates/lib/index.js": (module3, exports3, __webpack_require__2) => {
"use strict";
module3 = __webpack_require__2.nmd(module3), Object.defineProperty(exports3, "__esModule", { value: true }), exports3.addHook = function(hook, opts = {}) {
let reverted = false;
const loaders = [], oldLoaders = [];
let exts;
const originalJSLoader = Module._extensions[".js"], matcher = opts.matcher || null, ignoreNodeModules = false !== opts.ignoreNodeModules;
exts = opts.extensions || opts.exts || opts.extension || opts.ext || [".js"], Array.isArray(exts) || (exts = [exts]);
return exts.forEach((ext) => {
if ("string" != typeof ext)
throw new TypeError(`Invalid Extension: ${ext}`);
const oldLoader = Module._extensions[ext] || originalJSLoader;
oldLoaders[ext] = Module._extensions[ext], loaders[ext] = Module._extensions[ext] = function(mod, filename) {
let compile;
reverted || function(filename2, exts2, matcher2, ignoreNodeModules2) {
if ("string" != typeof filename2)
return false;
if (-1 === exts2.indexOf(_path.default.extname(filename2)))
return false;
const resolvedFilename = _path.default.resolve(filename2);
if (ignoreNodeModules2 && nodeModulesRegex.test(resolvedFilename))
return false;
if (matcher2 && "function" == typeof matcher2)
return !!matcher2(resolvedFilename);
return true;
}(filename, exts, matcher, ignoreNodeModules) && (compile = mod._compile, mod._compile = function(code) {
mod._compile = compile;
const newCode = hook(code, filename);
if ("string" != typeof newCode)
throw new Error(HOOK_RETURNED_NOTHING_ERROR_MESSAGE);
return mod._compile(newCode, filename);
}), oldLoader(mod, filename);
};
}), function() {
reverted || (reverted = true, exts.forEach((ext) => {
Module._extensions[ext] === loaders[ext] && (oldLoaders[ext] ? Module._extensions[ext] = oldLoaders[ext] : delete Module._extensions[ext]);
}));
};
};
var _module = _interopRequireDefault(__webpack_require__2("module")), _path = _interopRequireDefault(__webpack_require__2("path"));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
const nodeModulesRegex = /^(?:.*[\\/])?node_modules(?:[\\/].*)?$/, Module = module3.constructor.length > 1 ? module3.constructor : _module.default, HOOK_RETURNED_NOTHING_ERROR_MESSAGE = "[Pirates] A hook returned a non-string, or nothing at all! This is a violation of intergalactic law!\n--------------------\nIf you have no idea what this means or what Pirates is, let me explain: Pirates is a module that makes is easy to implement require hooks. One of the require hooks you're using uses it. One of these require hooks didn't return anything from it's handler, so we don't know what to do. You might want to debug this.";
}, "./node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/comparator.js": (module3, __unused_webpack_exports, __webpack_require__2) => {
const ANY = Symbol("SemVer ANY");
class Comparator {
static get ANY() {
return ANY;
}
constructor(comp, options) {
if (options = parseOptions(options), comp instanceof Comparator) {
if (comp.loose === !!options.loose)
return comp;
comp = comp.value;
}
comp = comp.trim().split(/\s+/).join(" "), debug("comparator", comp, options), this.options = options, this.loose = !!options.loose, this.parse(comp), this.semver === ANY ? this.value = "" : this.value = this.operator + this.semver.version, debug("comp", this);
}
parse(comp) {
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR], m = comp.match(r);
if (!m)
throw new TypeError(`Invalid comparator: ${comp}`);
this.operator = void 0 !== m[1] ? m[1] : "", "=" === this.operator && (this.operator = ""), m[2] ? this.semver = new SemVer(m[2], this.options.loose) : this.semver = ANY;
}
toString() {
return this.value;
}
test(version3) {
if (debug("Comparator.test", version3, this.options.loose), this.semver === ANY || version3 === ANY)
return true;
if ("string" == typeof version3)
try {
version3 = new SemVer(version3, this.options);
} catch (er) {
return false;
}
return cmp(version3, this.operator, this.semver, this.options);
}
intersects(comp, options) {
if (!(comp instanceof Comparator))
throw new TypeError("a Comparator is required");
return "" === this.operator ? "" === this.value || new Range(comp.value, options).test(this.value) : "" === comp.operator ? "" === comp.value || new Range(this.value, options).test(comp.semver) : (!(options = parseOptions(options)).includePrerelease || "<0.0.0-0" !== this.value && "<0.0.0-0" !== comp.value) && (!(!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) && (!(!this.operator.startsWith(">") || !comp.operator.startsWith(">")) || (!(!this.operator.startsWith("<") || !comp.operator.startsWith("<")) || (!(this.semver.version !== comp.semver.version || !this.operator.includes("=") || !comp.operator.includes("=")) || (!!(cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) || !!(cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")))))));
}
}
module3.exports = Comparator;
const parseOptions = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/parse-options.js"), { safeRe: re, t } = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/re.js"), cmp = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/cmp.js"), debug = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/debug.js"), SemVer = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/semver.js"), Range = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/range.js");
}, "./node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/range.js": (module3, __unused_webpack_exports, __webpack_require__2) => {
class Range {
constructor(range, options) {
if (options = parseOptions(options), range instanceof Range)
return range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease ? range : new Range(range.raw, options);
if (range instanceof Comparator)
return this.raw = range.value, this.set = [[range]], this.format(), this;
if (this.options = options, this.loose = !!options.loose, this.includePrerelease = !!options.includePrerelease, this.raw = range.trim().split(/\s+/).join(" "), this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length), !this.set.length)
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
if (this.set.length > 1) {
const first = this.set[0];
if (this.set = this.set.filter((c) => !isNullSet(c[0])), 0 === this.set.length)
this.set = [first];
else if (this.set.length > 1) {
for (const c of this.set)
if (1 === c.length && isAny(c[0])) {
this.set = [c];
break;
}
}
}
this.format();
}
format() {
return this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim(), this.range;
}
toString() {
return this.range;
}
parseRange(range) {
const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range, cached = cache.get(memoKey);
if (cached)
return cached;
const loose = this.options.loose, hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
range = range.replace(hr, hyphenReplace(this.options.includePrerelease)), debug("hyphen replace", range), range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace), debug("comparator trim", range), range = range.replace(re[t.TILDETRIM], tildeTrimReplace), debug("tilde trim", range), range = range.replace(re[t.CARETTRIM], caretTrimReplace), debug("caret trim", range);
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
loose && (rangeList = rangeList.filter((comp) => (debug("loose invalid filter", comp, this.options), !!comp.match(re[t.COMPARATORLOOSE])))), debug("range list", rangeList);
const rangeMap = /* @__PURE__ */ new Map(), comparators = rangeList.map((comp) => new Comparator(comp, this.options));
for (const comp of comparators) {
if (isNullSet(comp))
return [comp];
rangeMap.set(comp.value, comp);
}
rangeMap.size > 1 && rangeMap.has("") && rangeMap.delete("");
const result = [...rangeMap.values()];
return cache.set(memoKey, result), result;
}
intersects(range, options) {
if (!(range instanceof Range))
throw new TypeError("a Range is required");
return this.set.some((thisComparators) => isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => rangeComparators.every((rangeComparator) => thisComparator.intersects(rangeComparator, options)))));
}
test(version3) {
if (!version3)
return false;
if ("string" == typeof version3)
try {
version3 = new SemVer(version3, this.options);
} catch (er) {
return false;
}
for (let i = 0; i < this.set.length; i++)
if (testSet(this.set[i], version3, this.options))
return true;
return false;
}
}
module3.exports = Range;
const cache = new (__webpack_require__2("./node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js"))({ max: 1e3 }), parseOptions = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/parse-options.js"), Comparator = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/comparator.js"), debug = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/debug.js"), SemVer = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/semver.js"), { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/re.js"), { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js"), isNullSet = (c) => "<0.0.0-0" === c.value, isAny = (c) => "" === c.value, isSatisfiable = (comparators, options) => {
let result = true;
const remainingComparators = comparators.slice();
let testComparator = remainingComparators.pop();
for (; result && remainingComparators.length; )
result = remainingComparators.every((otherComparator) => testComparator.intersects(otherComparator, options)), testComparator = remainingComparators.pop();
return result;
}, parseComparator = (comp, options) => (debug("comp", comp, options), comp = replaceCarets(comp, options), debug("caret", comp), comp = replaceTildes(comp, options), debug("tildes", comp), comp = replaceXRanges(comp, options), debug("xrange", comp), comp = replaceStars(comp, options), debug("stars", comp), comp), isX = (id) => !id || "x" === id.toLowerCase() || "*" === id, replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "), replaceTilde = (comp, options) => {
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
return comp.replace(r, (_, M, m, p, pr) => {
let ret;
return debug("tilde", comp, _, M, m, p, pr), isX(M) ? ret = "" : isX(m) ? ret = `>=${M}.0.0 <${+M + 1}.0.0-0` : isX(p) ? ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` : pr ? (debug("replaceTilde pr", pr), ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`) : ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`, debug("tilde return", ret), ret;
});
}, replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "), replaceCaret = (comp, options) => {
debug("caret", comp, options);
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET], z = options.includePrerelease ? "-0" : "";
return comp.replace(r, (_, M, m, p, pr) => {
let ret;
return debug("caret", comp, _, M, m, p, pr), isX(M) ? ret = "" : isX(m) ? ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` : isX(p) ? ret = "0" === M ? `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` : `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` : pr ? (debug("replaceCaret pr", pr), ret = "0" === M ? "0" === m ? `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0` : `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0` : `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`) : (debug("no pr"), ret = "0" === M ? "0" === m ? `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0` : `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0` : `>=${M}.${m}.${p} <${+M + 1}.0.0-0`), debug("caret return", ret), ret;
});
}, replaceXRanges = (comp, options) => (debug("replaceXRanges", comp, options), comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ")), replaceXRange = (comp, options) => {
comp = comp.trim();
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
debug("xRange", comp, ret, gtlt, M, m, p, pr);
const xM = isX(M), xm = xM || isX(m), xp = xm || isX(p), anyX = xp;
return "=" === gtlt && anyX && (gtlt = ""), pr = options.includePrerelease ? "-0" : "", xM ? ret = ">" === gtlt || "<" === gtlt ? "<0.0.0-0" : "*" : gtlt && anyX ? (xm && (m = 0), p = 0, ">" === gtlt ? (gtlt = ">=", xm ? (M = +M + 1, m = 0, p = 0) : (m = +m + 1, p = 0)) : "<=" === gtlt && (gtlt = "<", xm ? M = +M + 1 : m = +m + 1), "<" === gtlt && (pr = "-0"), ret = `${gtlt + M}.${m}.${p}${pr}`) : xm ? ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` : xp && (ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`), debug("xRange return", ret), ret;
});
}, replaceStars = (comp, options) => (debug("replaceStars", comp, options), comp.trim().replace(re[t.STAR], "")), replaceGTE0 = (comp, options) => (debug("replaceGTE0", comp, options), comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "")), hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => `${from = isX(fM) ? "" : isX(fm) ? `>=${fM}.0.0${incPr ? "-0" : ""}` : isX(fp) ? `>=${fM}.${fm}.0${incPr ? "-0" : ""}` : fpr ? `>=${from}` : `>=${from}${incPr ? "-0" : ""}`} ${to = isX(tM) ? "" : isX(tm) ? `<${+tM + 1}.0.0-0` : isX(tp) ? `<${tM}.${+tm + 1}.0-0` : tpr ? `<=${tM}.${tm}.${tp}-${tpr}` : incPr ? `<${tM}.${tm}.${+tp + 1}-0` : `<=${to}`}`.trim(), testSet = (set, version3, options) => {
for (let i = 0; i < set.length; i++)
if (!set[i].test(version3))
return false;
if (version3.prerelease.length && !options.includePrerelease) {
for (let i = 0; i < set.length; i++)
if (debug(set[i].semver), set[i].semver !== Comparator.ANY && set[i].semver.prerelease.length > 0) {
const allowed = set[i].semver;
if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch)
return true;
}
return false;
}
return true;
};
}, "./node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/semver.js": (module3, __unused_webpack_exports, __webpack_require__2) => {
const debug = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/debug.js"), { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js"), { safeRe: re, t } = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/re.js"), parseOptions = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/parse-options.js"), { compareIdentifiers } = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/identifiers.js");
class SemVer {
constructor(version3, options) {
if (options = parseOptions(options), version3 instanceof SemVer) {
if (version3.loose === !!options.loose && version3.includePrerelease === !!options.includePrerelease)
return version3;
version3 = version3.version;
} else if ("string" != typeof version3)
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version3}".`);
if (version3.length > MAX_LENGTH)
throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
debug("SemVer", version3, options), this.options = options, this.loose = !!options.loose, this.includePrerelease = !!options.includePrerelease;
const m = version3.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
if (!m)
throw new TypeError(`Invalid Version: ${version3}`);
if (this.raw = version3, this.major = +m[1], this.minor = +m[2], this.patch = +m[3], this.major > MAX_SAFE_INTEGER || this.major < 0)
throw new TypeError("Invalid major version");
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
throw new TypeError("Invalid minor version");
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
throw new TypeError("Invalid patch version");
m[4] ? this.prerelease = m[4].split(".").map((id) => {
if (/^[0-9]+$/.test(id)) {
const num = +id;
if (num >= 0 && num < MAX_SAFE_INTEGER)
return num;
}
return id;
}) : this.prerelease = [], this.build = m[5] ? m[5].split(".") : [], this.format();
}
format() {
return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
}
toString() {
return this.version;
}
compare(other) {
if (debug("SemVer.compare", this.version, this.options, other), !(other instanceof SemVer)) {
if ("string" == typeof other && other === this.version)
return 0;
other = new SemVer(other, this.options);
}
return other.version === this.version ? 0 : this.compareMain(other) || this.comparePre(other);
}
compareMain(other) {
return other instanceof SemVer || (other = new SemVer(other, this.options)), compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
}
comparePre(other) {
if (other instanceof SemVer || (other = new SemVer(other, this.options)), this.prerelease.length && !other.prerelease.length)
return -1;
if (!this.prerelease.length && other.prerelease.length)
return 1;
if (!this.prerelease.length && !other.prerelease.length)
return 0;
let i = 0;
do {
const a = this.prerelease[i], b = other.prerelease[i];
if (debug("prerelease compare", i, a, b), void 0 === a && void 0 === b)
return 0;
if (void 0 === b)
return 1;
if (void 0 === a)
return -1;
if (a !== b)
return compareIdentifiers(a, b);
} while (++i);
}
compareBuild(other) {
other instanceof SemVer || (other = new SemVer(other, this.options));
let i = 0;
do {
const a = this.build[i], b = other.build[i];
if (debug("prerelease compare", i, a, b), void 0 === a && void 0 === b)
return 0;
if (void 0 === b)
return 1;
if (void 0 === a)
return -1;
if (a !== b)
return compareIdentifiers(a, b);
} while (++i);
}
inc(release, identifier, identifierBase) {
switch (release) {
case "premajor":
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", identifier, identifierBase);
break;
case "preminor":
this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", identifier, identifierBase);
break;
case "prepatch":
this.prerelease.length = 0, this.inc("patch", identifier, identifierBase), this.inc("pre", identifier, identifierBase);
break;
case "prerelease":
0 === this.prerelease.length && this.inc("patch", identifier, identifierBase), this.inc("pre", identifier, identifierBase);
break;
case "major":
0 === this.minor && 0 === this.patch && 0 !== this.prerelease.length || this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
break;
case "minor":
0 === this.patch && 0 !== this.prerelease.length || this.minor++, this.patch = 0, this.prerelease = [];
break;
case "patch":
0 === this.prerelease.length && this.patch++, this.prerelease = [];
break;
case "pre": {
const base = Number(identifierBase) ? 1 : 0;
if (!identifier && false === identifierBase)
throw new Error("invalid increment argument: identifier is empty");
if (0 === this.prerelease.length)
this.prerelease = [base];
else {
let i = this.prerelease.length;
for (; --i >= 0; )
"number" == typeof this.prerelease[i] && (this.prerelease[i]++, i = -2);
if (-1 === i) {
if (identifier === this.prerelease.join(".") && false === identifierBase)
throw new Error("invalid increment argument: identifier already exists");
this.prerelease.push(base);
}
}
if (identifier) {
let prerelease = [identifier, base];
false === identifierBase && (prerelease = [identifier]), 0 === compareIdentifiers(this.prerelease[0], identifier) ? isNaN(this.prerelease[1]) && (this.prerelease = prerelease) : this.prerelease = prerelease;
}
break;
}
default:
throw new Error(`invalid increment argument: ${release}`);
}
return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
}
}
module3.exports = SemVer;
}, "./node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js": (module3, __unused_webpack_exports, __webpack_require__2) => {
const parse4 = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/parse.js");
module3.exports = (version3, options) => {
const s = parse4(version3.trim().replace(/^[=v]+/, ""), options);
return s ? s.version : null;
};
}, "./node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/cmp.js": (module3, __unused_webpack_exports, __webpack_require__2) => {
const eq = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/eq.js"), neq = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/neq.js"), gt = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gt.js"), gte = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gte.js"), lt = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lt.js"), lte = __webpack_require__2("./node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lte.js");
module3.exports = (a, op, b, loose) => {
switch (op) {
case "===":
return "object" == typeof a && (a = a.version), "object" == typeof b && (b = b.version), a === b;
case "!==":
return "object" ==