UNPKG

@hot-updater/js

Version:

React Native OTA solution for self-hosted

1,218 lines (1,176 loc) 108 kB
import { NIL_UUID } from "@hot-updater/core"; //#region rolldown:runtime 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() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { key = keys[i]; if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: ((k) => from[k]).bind(null, key), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js var require_constants = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js": ((exports, module) => { const SEMVER_SPEC_VERSION = "2.0.0"; const MAX_LENGTH$2 = 256; const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991; const MAX_SAFE_COMPONENT_LENGTH$1 = 16; const MAX_SAFE_BUILD_LENGTH$1 = MAX_LENGTH$2 - 6; const RELEASE_TYPES = [ "major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease" ]; module.exports = { MAX_LENGTH: MAX_LENGTH$2, MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH$1, MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH$1, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1, RELEASE_TYPES, SEMVER_SPEC_VERSION, FLAG_INCLUDE_PRERELEASE: 1, FLAG_LOOSE: 2 }; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js": ((exports, module) => { const debug$4 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {}; module.exports = debug$4; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js var require_re = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js": ((exports, module) => { const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH: MAX_LENGTH$1 } = require_constants(); const debug$3 = require_debug(); exports = module.exports = {}; const re$4 = exports.re = []; const safeRe = exports.safeRe = []; const src = exports.src = []; const safeSrc = exports.safeSrc = []; const t$4 = exports.t = {}; let R = 0; const LETTERDASHNUMBER = "[a-zA-Z0-9-]"; const safeRegexReplacements = [ ["\\s", 1], ["\\d", MAX_LENGTH$1], [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] ]; const makeSafeRegex = (value) => { for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); return value; }; const createToken = (name, value, isGlobal) => { const safe = makeSafeRegex(value); const index = R++; debug$3(name, index, value); t$4[name] = index; src[index] = value; safeSrc[index] = safe; re$4[index] = new RegExp(value, isGlobal ? "g" : void 0); safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); }; createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); createToken("MAINVERSION", `(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})`); createToken("MAINVERSIONLOOSE", `(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})`); createToken("PRERELEASEIDENTIFIER", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIER]})`); createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIERLOOSE]})`); createToken("PRERELEASE", `(?:-(${src[t$4.PRERELEASEIDENTIFIER]}(?:\\.${src[t$4.PRERELEASEIDENTIFIER]})*))`); createToken("PRERELEASELOOSE", `(?:-?(${src[t$4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t$4.PRERELEASEIDENTIFIERLOOSE]})*))`); createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); createToken("BUILD", `(?:\\+(${src[t$4.BUILDIDENTIFIER]}(?:\\.${src[t$4.BUILDIDENTIFIER]})*))`); createToken("FULLPLAIN", `v?${src[t$4.MAINVERSION]}${src[t$4.PRERELEASE]}?${src[t$4.BUILD]}?`); createToken("FULL", `^${src[t$4.FULLPLAIN]}$`); createToken("LOOSEPLAIN", `[v=\\s]*${src[t$4.MAINVERSIONLOOSE]}${src[t$4.PRERELEASELOOSE]}?${src[t$4.BUILD]}?`); createToken("LOOSE", `^${src[t$4.LOOSEPLAIN]}$`); createToken("GTLT", "((?:<|>)?=?)"); createToken("XRANGEIDENTIFIERLOOSE", `${src[t$4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); createToken("XRANGEIDENTIFIER", `${src[t$4.NUMERICIDENTIFIER]}|x|X|\\*`); createToken("XRANGEPLAIN", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:${src[t$4.PRERELEASE]})?${src[t$4.BUILD]}?)?)?`); createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:${src[t$4.PRERELEASELOOSE]})?${src[t$4.BUILD]}?)?)?`); createToken("XRANGE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAIN]}$`); createToken("XRANGELOOSE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAINLOOSE]}$`); createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); createToken("COERCE", `${src[t$4.COERCEPLAIN]}(?:$|[^\\d])`); createToken("COERCEFULL", src[t$4.COERCEPLAIN] + `(?:${src[t$4.PRERELEASE]})?(?:${src[t$4.BUILD]})?(?:$|[^\\d])`); createToken("COERCERTL", src[t$4.COERCE], true); createToken("COERCERTLFULL", src[t$4.COERCEFULL], true); createToken("LONETILDE", "(?:~>?)"); createToken("TILDETRIM", `(\\s*)${src[t$4.LONETILDE]}\\s+`, true); exports.tildeTrimReplace = "$1~"; createToken("TILDE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAIN]}$`); createToken("TILDELOOSE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAINLOOSE]}$`); createToken("LONECARET", "(?:\\^)"); createToken("CARETTRIM", `(\\s*)${src[t$4.LONECARET]}\\s+`, true); exports.caretTrimReplace = "$1^"; createToken("CARET", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAIN]}$`); createToken("CARETLOOSE", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAINLOOSE]}$`); createToken("COMPARATORLOOSE", `^${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]})$|^$`); createToken("COMPARATOR", `^${src[t$4.GTLT]}\\s*(${src[t$4.FULLPLAIN]})$|^$`); createToken("COMPARATORTRIM", `(\\s*)${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]}|${src[t$4.XRANGEPLAIN]})`, true); exports.comparatorTrimReplace = "$1$2$3"; createToken("HYPHENRANGE", `^\\s*(${src[t$4.XRANGEPLAIN]})\\s+-\\s+(${src[t$4.XRANGEPLAIN]})\\s*$`); createToken("HYPHENRANGELOOSE", `^\\s*(${src[t$4.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t$4.XRANGEPLAINLOOSE]})\\s*$`); createToken("STAR", "(<|>)?=?\\s*\\*"); createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js var require_parse_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js": ((exports, module) => { const looseOption = Object.freeze({ loose: true }); const emptyOpts = Object.freeze({}); const parseOptions$3 = (options) => { if (!options) return emptyOpts; if (typeof options !== "object") return looseOption; return options; }; module.exports = parseOptions$3; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js var require_identifiers = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js": ((exports, module) => { const numeric = /^[0-9]+$/; const compareIdentifiers$1 = (a, b) => { const anum = numeric.test(a); const bnum = numeric.test(b); if (anum && bnum) { a = +a; b = +b; } return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; }; const rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a); module.exports = { compareIdentifiers: compareIdentifiers$1, rcompareIdentifiers }; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js": ((exports, module) => { const debug$2 = require_debug(); const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); const { safeRe: re$3, t: t$3 } = require_re(); const parseOptions$2 = require_parse_options(); const { compareIdentifiers } = require_identifiers(); var SemVer$15 = class SemVer$15 { constructor(version, options) { options = parseOptions$2(options); if (version instanceof SemVer$15) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version; else version = version.version; else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`); if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`); debug$2("SemVer", version, options); this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; const m = version.trim().match(options.loose ? re$3[t$3.LOOSE] : re$3[t$3.FULL]); if (!m) throw new TypeError(`Invalid Version: ${version}`); this.raw = version; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; if (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"); if (!m[4]) this.prerelease = []; else 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.build = m[5] ? m[5].split(".") : []; this.format(); } format() { this.version = `${this.major}.${this.minor}.${this.patch}`; if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`; return this.version; } toString() { return this.version; } compare(other) { debug$2("SemVer.compare", this.version, this.options, other); if (!(other instanceof SemVer$15)) { if (typeof other === "string" && other === this.version) return 0; other = new SemVer$15(other, this.options); } if (other.version === this.version) return 0; return this.compareMain(other) || this.comparePre(other); } compareMain(other) { if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options); return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); } comparePre(other) { if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options); if (this.prerelease.length && !other.prerelease.length) return -1; else if (!this.prerelease.length && other.prerelease.length) return 1; else if (!this.prerelease.length && !other.prerelease.length) return 0; let i = 0; do { const a = this.prerelease[i]; const b = other.prerelease[i]; debug$2("prerelease compare", i, a, b); if (a === void 0 && b === void 0) return 0; else if (b === void 0) return 1; else if (a === void 0) return -1; else if (a === b) continue; else return compareIdentifiers(a, b); } while (++i); } compareBuild(other) { if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options); let i = 0; do { const a = this.build[i]; const b = other.build[i]; debug$2("build compare", i, a, b); if (a === void 0 && b === void 0) return 0; else if (b === void 0) return 1; else if (a === void 0) return -1; else if (a === b) continue; else return compareIdentifiers(a, b); } while (++i); } inc(release, identifier, identifierBase) { if (release.startsWith("pre")) { if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty"); if (identifier) { const match = `-${identifier}`.match(this.options.loose ? re$3[t$3.PRERELEASELOOSE] : re$3[t$3.PRERELEASE]); if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`); } } 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": if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase); this.inc("pre", identifier, identifierBase); break; case "release": if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`); this.prerelease.length = 0; break; case "major": if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; this.minor = 0; this.patch = 0; this.prerelease = []; break; case "minor": if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; this.patch = 0; this.prerelease = []; break; case "patch": if (this.prerelease.length === 0) this.patch++; this.prerelease = []; break; case "pre": { const base = Number(identifierBase) ? 1 : 0; if (this.prerelease.length === 0) this.prerelease = [base]; else { let i = this.prerelease.length; while (--i >= 0) if (typeof this.prerelease[i] === "number") { this.prerelease[i]++; i = -2; } if (i === -1) { if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists"); this.prerelease.push(base); } } if (identifier) { let prerelease$2 = [identifier, base]; if (identifierBase === false) prerelease$2 = [identifier]; if (compareIdentifiers(this.prerelease[0], identifier) === 0) { if (isNaN(this.prerelease[1])) this.prerelease = prerelease$2; } else this.prerelease = prerelease$2; } break; } default: throw new Error(`invalid increment argument: ${release}`); } this.raw = this.format(); if (this.build.length) this.raw += `+${this.build.join(".")}`; return this; } }; module.exports = SemVer$15; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js": ((exports, module) => { const SemVer$14 = require_semver$1(); const parse$6 = (version, options, throwErrors = false) => { if (version instanceof SemVer$14) return version; try { return new SemVer$14(version, options); } catch (er) { if (!throwErrors) return null; throw er; } }; module.exports = parse$6; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js var require_valid$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js": ((exports, module) => { const parse$5 = require_parse(); const valid$1 = (version, options) => { const v = parse$5(version, options); return v ? v.version : null; }; module.exports = valid$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js var require_clean = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js": ((exports, module) => { const parse$4 = require_parse(); const clean$1 = (version, options) => { const s = parse$4(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; }; module.exports = clean$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js var require_inc = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js": ((exports, module) => { const SemVer$13 = require_semver$1(); const inc$1 = (version, release, options, identifier, identifierBase) => { if (typeof options === "string") { identifierBase = identifier; identifier = options; options = void 0; } try { return new SemVer$13(version instanceof SemVer$13 ? version.version : version, options).inc(release, identifier, identifierBase).version; } catch (er) { return null; } }; module.exports = inc$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js var require_diff = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js": ((exports, module) => { const parse$3 = require_parse(); const diff$1 = (version1, version2) => { const v1 = parse$3(version1, null, true); const v2 = parse$3(version2, null, true); const comparison = v1.compare(v2); if (comparison === 0) return null; const v1Higher = comparison > 0; const highVersion = v1Higher ? v1 : v2; const lowVersion = v1Higher ? v2 : v1; const highHasPre = !!highVersion.prerelease.length; const lowHasPre = !!lowVersion.prerelease.length; if (lowHasPre && !highHasPre) { if (!lowVersion.patch && !lowVersion.minor) return "major"; if (lowVersion.compareMain(highVersion) === 0) { if (lowVersion.minor && !lowVersion.patch) return "minor"; return "patch"; } } const prefix = highHasPre ? "pre" : ""; if (v1.major !== v2.major) return prefix + "major"; if (v1.minor !== v2.minor) return prefix + "minor"; if (v1.patch !== v2.patch) return prefix + "patch"; return "prerelease"; }; module.exports = diff$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js var require_major = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js": ((exports, module) => { const SemVer$12 = require_semver$1(); const major$1 = (a, loose) => new SemVer$12(a, loose).major; module.exports = major$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js var require_minor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js": ((exports, module) => { const SemVer$11 = require_semver$1(); const minor$1 = (a, loose) => new SemVer$11(a, loose).minor; module.exports = minor$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js var require_patch = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js": ((exports, module) => { const SemVer$10 = require_semver$1(); const patch$1 = (a, loose) => new SemVer$10(a, loose).patch; module.exports = patch$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js var require_prerelease = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js": ((exports, module) => { const parse$2 = require_parse(); const prerelease$1 = (version, options) => { const parsed = parse$2(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; }; module.exports = prerelease$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js var require_compare = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js": ((exports, module) => { const SemVer$9 = require_semver$1(); const compare$11 = (a, b, loose) => new SemVer$9(a, loose).compare(new SemVer$9(b, loose)); module.exports = compare$11; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js var require_rcompare = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js": ((exports, module) => { const compare$10 = require_compare(); const rcompare$1 = (a, b, loose) => compare$10(b, a, loose); module.exports = rcompare$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js var require_compare_loose = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js": ((exports, module) => { const compare$9 = require_compare(); const compareLoose$1 = (a, b) => compare$9(a, b, true); module.exports = compareLoose$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js var require_compare_build = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js": ((exports, module) => { const SemVer$8 = require_semver$1(); const compareBuild$3 = (a, b, loose) => { const versionA = new SemVer$8(a, loose); const versionB = new SemVer$8(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); }; module.exports = compareBuild$3; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js var require_sort = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js": ((exports, module) => { const compareBuild$2 = require_compare_build(); const sort$1 = (list, loose) => list.sort((a, b) => compareBuild$2(a, b, loose)); module.exports = sort$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js var require_rsort = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js": ((exports, module) => { const compareBuild$1 = require_compare_build(); const rsort$1 = (list, loose) => list.sort((a, b) => compareBuild$1(b, a, loose)); module.exports = rsort$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js var require_gt = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js": ((exports, module) => { const compare$8 = require_compare(); const gt$4 = (a, b, loose) => compare$8(a, b, loose) > 0; module.exports = gt$4; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js var require_lt = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js": ((exports, module) => { const compare$7 = require_compare(); const lt$3 = (a, b, loose) => compare$7(a, b, loose) < 0; module.exports = lt$3; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js var require_eq = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js": ((exports, module) => { const compare$6 = require_compare(); const eq$2 = (a, b, loose) => compare$6(a, b, loose) === 0; module.exports = eq$2; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js var require_neq = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js": ((exports, module) => { const compare$5 = require_compare(); const neq$2 = (a, b, loose) => compare$5(a, b, loose) !== 0; module.exports = neq$2; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js var require_gte = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js": ((exports, module) => { const compare$4 = require_compare(); const gte$3 = (a, b, loose) => compare$4(a, b, loose) >= 0; module.exports = gte$3; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js var require_lte = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js": ((exports, module) => { const compare$3 = require_compare(); const lte$3 = (a, b, loose) => compare$3(a, b, loose) <= 0; module.exports = lte$3; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js var require_cmp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js": ((exports, module) => { const eq$1 = require_eq(); const neq$1 = require_neq(); const gt$3 = require_gt(); const gte$2 = require_gte(); const lt$2 = require_lt(); const lte$2 = require_lte(); const cmp$2 = (a, op, b, loose) => { switch (op) { case "===": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a === b; case "!==": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a !== b; case "": case "=": case "==": return eq$1(a, b, loose); case "!=": return neq$1(a, b, loose); case ">": return gt$3(a, b, loose); case ">=": return gte$2(a, b, loose); case "<": return lt$2(a, b, loose); case "<=": return lte$2(a, b, loose); default: throw new TypeError(`Invalid operator: ${op}`); } }; module.exports = cmp$2; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js var require_coerce = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js": ((exports, module) => { const SemVer$7 = require_semver$1(); const parse$1 = require_parse(); const { safeRe: re$2, t: t$2 } = require_re(); const coerce$1 = (version, options) => { if (version instanceof SemVer$7) return version; if (typeof version === "number") version = String(version); if (typeof version !== "string") return null; options = options || {}; let match = null; if (!options.rtl) match = version.match(options.includePrerelease ? re$2[t$2.COERCEFULL] : re$2[t$2.COERCE]); else { const coerceRtlRegex = options.includePrerelease ? re$2[t$2.COERCERTLFULL] : re$2[t$2.COERCERTL]; let next; while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) match = next; coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; } coerceRtlRegex.lastIndex = -1; } if (match === null) return null; const major$2 = match[2]; const minor$2 = match[3] || "0"; const patch$2 = match[4] || "0"; const prerelease$2 = options.includePrerelease && match[5] ? `-${match[5]}` : ""; const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; return parse$1(`${major$2}.${minor$2}.${patch$2}${prerelease$2}${build}`, options); }; module.exports = coerce$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js var require_lrucache = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js": ((exports, module) => { var LRUCache = class { constructor() { this.max = 1e3; this.map = /* @__PURE__ */ new Map(); } get(key) { const value = this.map.get(key); if (value === void 0) return void 0; else { this.map.delete(key); this.map.set(key, value); return value; } } delete(key) { return this.map.delete(key); } set(key, value) { const deleted = this.delete(key); if (!deleted && value !== void 0) { if (this.map.size >= this.max) { const firstKey = this.map.keys().next().value; this.delete(firstKey); } this.map.set(key, value); } return this; } }; module.exports = LRUCache; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js": ((exports, module) => { const SPACE_CHARACTERS = /\s+/g; var Range$11 = class Range$11 { constructor(range, options) { options = parseOptions$1(options); if (range instanceof Range$11) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range; else return new Range$11(range.raw, options); if (range instanceof Comparator$4) { this.raw = range.value; this.set = [[range]]; this.formatted = void 0; return this; } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; this.raw = range.trim().replace(SPACE_CHARACTERS, " "); this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`); if (this.set.length > 1) { const first = this.set[0]; this.set = this.set.filter((c) => !isNullSet(c[0])); if (this.set.length === 0) this.set = [first]; else if (this.set.length > 1) { for (const c of this.set) if (c.length === 1 && isAny(c[0])) { this.set = [c]; break; } } } this.formatted = void 0; } get range() { if (this.formatted === void 0) { this.formatted = ""; for (let i = 0; i < this.set.length; i++) { if (i > 0) this.formatted += "||"; const comps = this.set[i]; for (let k = 0; k < comps.length; k++) { if (k > 0) this.formatted += " "; this.formatted += comps[k].toString().trim(); } } } return this.formatted; } format() { return this.range; } toString() { return this.range; } parseRange(range) { const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); const memoKey = memoOpts + ":" + range; const cached = cache$1.get(memoKey); if (cached) return cached; const loose = this.options.loose; const hr = loose ? re$1[t$1.HYPHENRANGELOOSE] : re$1[t$1.HYPHENRANGE]; range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); debug$1("hyphen replace", range); range = range.replace(re$1[t$1.COMPARATORTRIM], comparatorTrimReplace); debug$1("comparator trim", range); range = range.replace(re$1[t$1.TILDETRIM], tildeTrimReplace); debug$1("tilde trim", range); range = range.replace(re$1[t$1.CARETTRIM], caretTrimReplace); debug$1("caret trim", range); let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); if (loose) rangeList = rangeList.filter((comp) => { debug$1("loose invalid filter", comp, this.options); return !!comp.match(re$1[t$1.COMPARATORLOOSE]); }); debug$1("range list", rangeList); const rangeMap = /* @__PURE__ */ new Map(); const comparators = rangeList.map((comp) => new Comparator$4(comp, this.options)); for (const comp of comparators) { if (isNullSet(comp)) return [comp]; rangeMap.set(comp.value, comp); } if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete(""); const result = [...rangeMap.values()]; cache$1.set(memoKey, result); return result; } intersects(range, options) { if (!(range instanceof Range$11)) throw new TypeError("a Range is required"); return this.set.some((thisComparators) => { return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { return rangeComparators.every((rangeComparator) => { return thisComparator.intersects(rangeComparator, options); }); }); }); }); } test(version) { if (!version) return false; if (typeof version === "string") try { version = new SemVer$6(version, this.options); } catch (er) { return false; } for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true; return false; } }; module.exports = Range$11; const LRU = require_lrucache(); const cache$1 = new LRU(); const parseOptions$1 = require_parse_options(); const Comparator$4 = require_comparator(); const debug$1 = require_debug(); const SemVer$6 = require_semver$1(); const { safeRe: re$1, t: t$1, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re(); const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); const isNullSet = (c) => c.value === "<0.0.0-0"; const isAny = (c) => c.value === ""; const isSatisfiable = (comparators, options) => { let result = true; const remainingComparators = comparators.slice(); let testComparator = remainingComparators.pop(); while (result && remainingComparators.length) { result = remainingComparators.every((otherComparator) => { return testComparator.intersects(otherComparator, options); }); testComparator = remainingComparators.pop(); } return result; }; const parseComparator = (comp, options) => { debug$1("comp", comp, options); comp = replaceCarets(comp, options); debug$1("caret", comp); comp = replaceTildes(comp, options); debug$1("tildes", comp); comp = replaceXRanges(comp, options); debug$1("xrange", comp); comp = replaceStars(comp, options); debug$1("stars", comp); return comp; }; const isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; const replaceTildes = (comp, options) => { return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); }; const replaceTilde = (comp, options) => { const r = options.loose ? re$1[t$1.TILDELOOSE] : re$1[t$1.TILDE]; return comp.replace(r, (_, M, m, p, pr) => { debug$1("tilde", comp, _, M, m, p, pr); let ret; if (isX(M)) ret = ""; else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; else if (pr) { debug$1("replaceTilde pr", pr); ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; } else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; debug$1("tilde return", ret); return ret; }); }; const replaceCarets = (comp, options) => { return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); }; const replaceCaret = (comp, options) => { debug$1("caret", comp, options); const r = options.loose ? re$1[t$1.CARETLOOSE] : re$1[t$1.CARET]; const z = options.includePrerelease ? "-0" : ""; return comp.replace(r, (_, M, m, p, pr) => { debug$1("caret", comp, _, M, m, p, pr); let ret; if (isX(M)) ret = ""; else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; else if (pr) { debug$1("replaceCaret pr", pr); if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; } else { debug$1("no pr"); if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; } debug$1("caret return", ret); return ret; }); }; const replaceXRanges = (comp, options) => { debug$1("replaceXRanges", comp, options); return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); }; const replaceXRange = (comp, options) => { comp = comp.trim(); const r = options.loose ? re$1[t$1.XRANGELOOSE] : re$1[t$1.XRANGE]; return comp.replace(r, (ret, gtlt, M, m, p, pr) => { debug$1("xRange", comp, ret, gtlt, M, m, p, pr); const xM = isX(M); const xm = xM || isX(m); const xp = xm || isX(p); const anyX = xp; if (gtlt === "=" && anyX) gtlt = ""; pr = options.includePrerelease ? "-0" : ""; if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0"; else ret = "*"; else if (gtlt && anyX) { if (xm) m = 0; p = 0; if (gtlt === ">") { gtlt = ">="; if (xm) { M = +M + 1; m = 0; p = 0; } else { m = +m + 1; p = 0; } } else if (gtlt === "<=") { gtlt = "<"; if (xm) M = +M + 1; else m = +m + 1; } if (gtlt === "<") pr = "-0"; ret = `${gtlt + M}.${m}.${p}${pr}`; } else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; debug$1("xRange return", ret); return ret; }); }; const replaceStars = (comp, options) => { debug$1("replaceStars", comp, options); return comp.trim().replace(re$1[t$1.STAR], ""); }; const replaceGTE0 = (comp, options) => { debug$1("replaceGTE0", comp, options); return comp.trim().replace(re$1[options.includePrerelease ? t$1.GTE0PRE : t$1.GTE0], ""); }; const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { if (isX(fM)) from = ""; else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`; else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; else if (fpr) from = `>=${from}`; else from = `>=${from}${incPr ? "-0" : ""}`; if (isX(tM)) to = ""; else if (isX(tm)) to = `<${+tM + 1}.0.0-0`; else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`; else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`; else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`; else to = `<=${to}`; return `${from} ${to}`.trim(); }; const testSet = (set, version, options) => { for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false; if (version.prerelease.length && !options.includePrerelease) { for (let i = 0; i < set.length; i++) { debug$1(set[i].semver); if (set[i].semver === Comparator$4.ANY) continue; if (set[i].semver.prerelease.length > 0) { const allowed = set[i].semver; if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; } } return false; } return true; }; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js var require_comparator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js": ((exports, module) => { const ANY$2 = Symbol("SemVer ANY"); var Comparator$3 = class Comparator$3 { static get ANY() { return ANY$2; } constructor(comp, options) { options = parseOptions(options); if (comp instanceof Comparator$3) if (comp.loose === !!options.loose) return comp; else comp = comp.value; comp = comp.trim().split(/\s+/).join(" "); debug("comparator", comp, options); this.options = options; this.loose = !!options.loose; this.parse(comp); if (this.semver === ANY$2) this.value = ""; else this.value = this.operator + this.semver.version; debug("comp", this); } parse(comp) { const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; const m = comp.match(r); if (!m) throw new TypeError(`Invalid comparator: ${comp}`); this.operator = m[1] !== void 0 ? m[1] : ""; if (this.operator === "=") this.operator = ""; if (!m[2]) this.semver = ANY$2; else this.semver = new SemVer$5(m[2], this.options.loose); } toString() { return this.value; } test(version) { debug("Comparator.test", version, this.options.loose); if (this.semver === ANY$2 || version === ANY$2) return true; if (typeof version === "string") try { version = new SemVer$5(version, this.options); } catch (er) { return false; } return cmp$1(version, this.operator, this.semver, this.options); } intersects(comp, options) { if (!(comp instanceof Comparator$3)) throw new TypeError("a Comparator is required"); if (this.operator === "") { if (this.value === "") return true; return new Range$10(comp.value, options).test(this.value); } else if (comp.operator === "") { if (comp.value === "") return true; return new Range$10(this.value, options).test(comp.semver); } options = parseOptions(options); if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false; if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false; if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true; if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true; if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true; if (cmp$1(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true; if (cmp$1(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true; return false; } }; module.exports = Comparator$3; const parseOptions = require_parse_options(); const { safeRe: re, t } = require_re(); const cmp$1 = require_cmp(); const debug = require_debug(); const SemVer$5 = require_semver$1(); const Range$10 = require_range(); }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js var require_satisfies = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js": ((exports, module) => { const Range$9 = require_range(); const satisfies$4 = (version, range, options) => { try { range = new Range$9(range, options); } catch (er) { return false; } return range.test(version); }; module.exports = satisfies$4; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js var require_to_comparators = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js": ((exports, module) => { const Range$8 = require_range(); const toComparators$1 = (range, options) => new Range$8(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); module.exports = toComparators$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js var require_max_satisfying = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js": ((exports, module) => { const SemVer$4 = require_semver$1(); const Range$7 = require_range(); const maxSatisfying$1 = (versions, range, options) => { let max = null; let maxSV = null; let rangeObj = null; try { rangeObj = new Range$7(range, options); } catch (er) { return null; } versions.forEach((v) => { if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; maxSV = new SemVer$4(max, options); } } }); return max; }; module.exports = maxSatisfying$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js var require_min_satisfying = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js": ((exports, module) => { const SemVer$3 = require_semver$1(); const Range$6 = require_range(); const minSatisfying$1 = (versions, range, options) => { let min = null; let minSV = null; let rangeObj = null; try { rangeObj = new Range$6(range, options); } catch (er) { return null; } versions.forEach((v) => { if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; minSV = new SemVer$3(min, options); } } }); return min; }; module.exports = minSatisfying$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js var require_min_version = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js": ((exports, module) => { const SemVer$2 = require_semver$1(); const Range$5 = require_range(); const gt$2 = require_gt(); const minVersion$1 = (range, loose) => { range = new Range$5(range, loose); let minver = new SemVer$2("0.0.0"); if (range.test(minver)) return minver; minver = new SemVer$2("0.0.0-0"); if (range.test(minver)) return minver; minver = null; for (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i]; let setMin = null; comparators.forEach((comparator) => { const compver = new SemVer$2(comparator.semver.version); switch (comparator.operator) { case ">": if (compver.prerelease.length === 0) compver.patch++; else compver.prerelease.push(0); compver.raw = compver.format(); case "": case ">=": if (!setMin || gt$2(compver, setMin)) setMin = compver; break; case "<": case "<=": break; default: throw new Error(`Unexpected operation: ${comparator.operator}`); } }); if (setMin && (!minver || gt$2(minver, setMin))) minver = setMin; } if (minver && range.test(minver)) return minver; return null; }; module.exports = minVersion$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js var require_valid = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js": ((exports, module) => { const Range$4 = require_range(); const validRange$1 = (range, options) => { try { return new Range$4(range, options).range || "*"; } catch (er) { return null; } }; module.exports = validRange$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js var require_outside = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js": ((exports, module) => { const SemVer$1 = require_semver$1(); const Comparator$2 = require_comparator(); const { ANY: ANY$1 } = Comparator$2; const Range$3 = require_range(); const satisfies$3 = require_satisfies(); const gt$1 = require_gt(); const lt$1 = require_lt(); const lte$1 = require_lte(); const gte$1 = require_gte(); const outside$3 = (version, range, hilo, options) => { version = new SemVer$1(version, options); range = new Range$3(range, options); let gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt$1; ltefn = lte$1; ltfn = lt$1; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt$1; ltefn = gte$1; ltfn = gt$1; comp = "<"; ecomp = "<="; break; default: throw new TypeError("Must provide a hilo val of \"<\" or \">\""); } if (satisfies$3(version, range, options)) return false; for (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i]; let high = null; let low = null; comparators.forEach((comparator) => { if (comparator.semver === ANY$1) comparator = new Comparator$2(">=0.0.0"); high = high || comparator; low = low || comparator; if (gtfn(comparator.semver, high.semver, options)) high = comparator; else if (ltfn(comparator.semver, low.semver, options)) low = comparator; }); if (high.operator === comp || high.operator === ecomp) return false; if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false; else if (low.operator === ecomp && ltfn(version, low.semver)) return false; } return true; }; module.exports = outside$3; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js var require_gtr = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js": ((exports, module) => { const outside$2 = require_outside(); const gtr$1 = (version, range, options) => outside$2(version, range, ">", options); module.exports = gtr$1; }) }); //#endregion //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js var require_ltr = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js": ((exports, module) => { const outside$1 = require_outside(); con