"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 __name = (target, value) => __defProp(target, "name", { value, configurable: true }); 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/semver/internal/constants.js var require_constants = __commonJS({ "node_modules/semver/internal/constants.js"(exports, module2) { var SEMVER_SPEC_VERSION = "2.0.0"; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991; var MAX_SAFE_COMPONENT_LENGTH = 16; var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; var RELEASE_TYPES = [ "major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease" ]; module2.exports = { MAX_LENGTH, MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_SAFE_INTEGER, RELEASE_TYPES, SEMVER_SPEC_VERSION, FLAG_INCLUDE_PRERELEASE: 1, FLAG_LOOSE: 2 }; } }); // node_modules/semver/internal/debug.js var require_debug = __commonJS({ "node_modules/semver/internal/debug.js"(exports, module2) { var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { }; module2.exports = debug; } }); // node_modules/semver/internal/re.js var require_re = __commonJS({ "node_modules/semver/internal/re.js"(exports, module2) { var { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants(); var debug = require_debug(); exports = module2.exports = {}; var re = exports.re = []; var safeRe = exports.safeRe = []; var src = exports.src = []; var t = exports.t = {}; var R = 0; var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; var safeRegexReplacements = [ ["\\s", 1], ["\\d", MAX_LENGTH], [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] ]; var makeSafeRegex = /* @__PURE__ */ __name((value) => { for (const [token, max] of safeRegexReplacements) { value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); } return value; }, "makeSafeRegex"); var createToken = /* @__PURE__ */ __name((name, value, isGlobal) => { const safe = makeSafeRegex(value); const index = R++; debug(name, index, value); t[name] = index; src[index] = value; re[index] = new RegExp(value, isGlobal ? "g" : void 0); safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); }, "createToken"); createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); createToken("FULL", `^${src[t.FULLPLAIN]}$`); createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); createToken("GTLT", "((?:<|>)?=?)"); createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`); createToken("COERCERTL", src[t.COERCE], true); createToken("LONETILDE", "(?:~>?)"); createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); exports.tildeTrimReplace = "$1~"; createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); createToken("LONECARET", "(?:\\^)"); createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); exports.caretTrimReplace = "$1^"; createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); exports.comparatorTrimReplace = "$1$2$3"; createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); createToken("STAR", "(<|>)?=?\\s*\\*"); createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); } }); // node_modules/semver/internal/parse-options.js var require_parse_options = __commonJS({ "node_modules/semver/internal/parse-options.js"(exports, module2) { var looseOption = Object.freeze({ loose: true }); var emptyOpts = Object.freeze({}); var parseOptions = /* @__PURE__ */ __name((options) => { if (!options) { return emptyOpts; } if (typeof options !== "object") { return looseOption; } return options; }, "parseOptions"); module2.exports = parseOptions; } }); // node_modules/semver/internal/identifiers.js var require_identifiers = __commonJS({ "node_modules/semver/internal/identifiers.js"(exports, module2) { var numeric = /^[0-9]+$/; var compareIdentifiers = /* @__PURE__ */ __name((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; }, "compareIdentifiers"); var rcompareIdentifiers = /* @__PURE__ */ __name((a, b) => compareIdentifiers(b, a), "rcompareIdentifiers"); module2.exports = { compareIdentifiers, rcompareIdentifiers }; } }); // node_modules/semver/classes/semver.js var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports, module2) { var debug = require_debug(); var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); var { safeRe: re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); var _SemVer = class _SemVer { constructor(version3, options) { options = parseOptions(options); if (version3 instanceof _SemVer) { if (version3.loose === !!options.loose && version3.includePrerelease === !!options.includePrerelease) { return version3; } else { version3 = version3.version; } } else if (typeof version3 !== "string") { 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}`); } this.raw = version3; 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("SemVer.compare", this.version, this.options, other); if (!(other instanceof _SemVer)) { if (typeof other === "string" && other === this.version) { return 0; } other = new _SemVer(other, this.options); } if (other.version === this.version) { return 0; } return this.compareMain(other) || this.comparePre(other); } compareMain(other) { if (!(other instanceof _SemVer)) { other = new _SemVer(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)) { other = new _SemVer(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("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)) { other = new _SemVer(other, this.options); } let i = 0; do { const a = this.build[i]; const b = other.build[i]; debug("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); } // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. 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": if (this.prerelease.length === 0) { this.inc("patch", identifier, identifierBase); } this.inc("pre", identifier, identifierBase); 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 (!identifier && identifierBase === false) { throw new Error("invalid increment argument: identifier is empty"); } 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 = [identifier, base]; if (identifierBase === false) { prerelease = [identifier]; } if (compareIdentifiers(this.prerelease[0], identifier) === 0) { if (isNaN(this.prerelease[1])) { this.prerelease = prerelease; } } else { this.prerelease = prerelease; } } break; } default: throw new Error(`invalid increment argument: ${release}`); } this.raw = this.format(); if (this.build.length) { this.raw += `+${this.build.join(".")}`; } return this; } }; __name(_SemVer, "SemVer"); var SemVer = _SemVer; module2.exports = SemVer; } }); // node_modules/semver/functions/parse.js var require_parse = __commonJS({ "node_modules/semver/functions/parse.js"(exports, module2) { var SemVer = require_semver(); var parse3 = /* @__PURE__ */ __name((version3, options, throwErrors = false) => { if (version3 instanceof SemVer) { return version3; } try { return new SemVer(version3, options); } catch (er) { if (!throwErrors) { return null; } throw er; } }, "parse"); module2.exports = parse3; } }); // node_modules/semver/functions/valid.js var require_valid = __commonJS({ "node_modules/semver/functions/valid.js"(exports, module2) { var parse3 = require_parse(); var valid = /* @__PURE__ */ __name((version3, options) => { const v = parse3(version3, options); return v ? v.version : null; }, "valid"); module2.exports = valid; } }); // node_modules/semver/functions/clean.js var require_clean = __commonJS({ "node_modules/semver/functions/clean.js"(exports, module2) { var parse3 = require_parse(); var clean = /* @__PURE__ */ __name((version3, options) => { const s = parse3(version3.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; }, "clean"); module2.exports = clean; } }); // node_modules/semver/functions/inc.js var require_inc = __commonJS({ "node_modules/semver/functions/inc.js"(exports, module2) { var SemVer = require_semver(); var inc = /* @__PURE__ */ __name((version3, release, options, identifier, identifierBase) => { if (typeof options === "string") { identifierBase = identifier; identifier = options; options = void 0; } try { return new SemVer( version3 instanceof SemVer ? version3.version : version3, options ).inc(release, identifier, identifierBase).version; } catch (er) { return null; } }, "inc"); module2.exports = inc; } }); // node_modules/semver/functions/diff.js var require_diff = __commonJS({ "node_modules/semver/functions/diff.js"(exports, module2) { var parse3 = require_parse(); var diff = /* @__PURE__ */ __name((version1, version22) => { const v13 = parse3(version1, null, true); const v2 = parse3(version22, null, true); const comparison = v13.compare(v2); if (comparison === 0) { return null; } const v1Higher = comparison > 0; const highVersion = v1Higher ? v13 : v2; const lowVersion = v1Higher ? v2 : v13; const highHasPre = !!highVersion.prerelease.length; const lowHasPre = !!lowVersion.prerelease.length; if (lowHasPre && !highHasPre) { if (!lowVersion.patch && !lowVersion.minor) { return "major"; } if (highVersion.patch) { return "patch"; } if (highVersion.minor) { return "minor"; } return "major"; } const prefix = highHasPre ? "pre" : ""; if (v13.major !== v2.major) { return prefix + "major"; } if (v13.minor !== v2.minor) { return prefix + "minor"; } if (v13.patch !== v2.patch) { return prefix + "patch"; } return "prerelease"; }, "diff"); module2.exports = diff; } }); // node_modules/semver/functions/major.js var require_major = __commonJS({ "node_modules/semver/functions/major.js"(exports, module2) { var SemVer = require_semver(); var major = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).major, "major"); module2.exports = major; } }); // node_modules/semver/functions/minor.js var require_minor = __commonJS({ "node_modules/semver/functions/minor.js"(exports, module2) { var SemVer = require_semver(); var minor = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).minor, "minor"); module2.exports = minor; } }); // node_modules/semver/functions/patch.js var require_patch = __commonJS({ "node_modules/semver/functions/patch.js"(exports, module2) { var SemVer = require_semver(); var patch = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).patch, "patch"); module2.exports = patch; } }); // node_modules/semver/functions/prerelease.js var require_prerelease = __commonJS({ "node_modules/semver/functions/prerelease.js"(exports, module2) { var parse3 = require_parse(); var prerelease = /* @__PURE__ */ __name((version3, options) => { const parsed = parse3(version3, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; }, "prerelease"); module2.exports = prerelease; } }); // node_modules/semver/functions/compare.js var require_compare = __commonJS({ "node_modules/semver/functions/compare.js"(exports, module2) { var SemVer = require_semver(); var compare = /* @__PURE__ */ __name((a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)), "compare"); module2.exports = compare; } }); // node_modules/semver/functions/rcompare.js var require_rcompare = __commonJS({ "node_modules/semver/functions/rcompare.js"(exports, module2) { var compare = require_compare(); var rcompare = /* @__PURE__ */ __name((a, b, loose) => compare(b, a, loose), "rcompare"); module2.exports = rcompare; } }); // node_modules/semver/functions/compare-loose.js var require_compare_loose = __commonJS({ "node_modules/semver/functions/compare-loose.js"(exports, module2) { var compare = require_compare(); var compareLoose = /* @__PURE__ */ __name((a, b) => compare(a, b, true), "compareLoose"); module2.exports = compareLoose; } }); // node_modules/semver/functions/compare-build.js var require_compare_build = __commonJS({ "node_modules/semver/functions/compare-build.js"(exports, module2) { var SemVer = require_semver(); var compareBuild = /* @__PURE__ */ __name((a, b, loose) => { const versionA = new SemVer(a, loose); const versionB = new SemVer(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); }, "compareBuild"); module2.exports = compareBuild; } }); // node_modules/semver/functions/sort.js var require_sort = __commonJS({ "node_modules/semver/functions/sort.js"(exports, module2) { var compareBuild = require_compare_build(); var sort = /* @__PURE__ */ __name((list, loose) => list.sort((a, b) => compareBuild(a, b, loose)), "sort"); module2.exports = sort; } }); // node_modules/semver/functions/rsort.js var require_rsort = __commonJS({ "node_modules/semver/functions/rsort.js"(exports, module2) { var compareBuild = require_compare_build(); var rsort = /* @__PURE__ */ __name((list, loose) => list.sort((a, b) => compareBuild(b, a, loose)), "rsort"); module2.exports = rsort; } }); // node_modules/semver/functions/gt.js var require_gt = __commonJS({ "node_modules/semver/functions/gt.js"(exports, module2) { var compare = require_compare(); var gt = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) > 0, "gt"); module2.exports = gt; } }); // node_modules/semver/functions/lt.js var require_lt = __commonJS({ "node_modules/semver/functions/lt.js"(exports, module2) { var compare = require_compare(); var lt = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) < 0, "lt"); module2.exports = lt; } }); // node_modules/semver/functions/eq.js var require_eq = __commonJS({ "node_modules/semver/functions/eq.js"(exports, module2) { var compare = require_compare(); var eq = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) === 0, "eq"); module2.exports = eq; } }); // node_modules/semver/functions/neq.js var require_neq = __commonJS({ "node_modules/semver/functions/neq.js"(exports, module2) { var compare = require_compare(); var neq = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) !== 0, "neq"); module2.exports = neq; } }); // node_modules/semver/functions/gte.js var require_gte = __commonJS({ "node_modules/semver/functions/gte.js"(exports, module2) { var compare = require_compare(); var gte = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) >= 0, "gte"); module2.exports = gte; } }); // node_modules/semver/functions/lte.js var require_lte = __commonJS({ "node_modules/semver/functions/lte.js"(exports, module2) { var compare = require_compare(); var lte = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) <= 0, "lte"); module2.exports = lte; } }); // node_modules/semver/functions/cmp.js var require_cmp = __commonJS({ "node_modules/semver/functions/cmp.js"(exports, module2) { var eq = require_eq(); var neq = require_neq(); var gt = require_gt(); var gte = require_gte(); var lt = require_lt(); var lte = require_lte(); var cmp = /* @__PURE__ */ __name((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(a, b, loose); case "!=": return neq(a, b, loose); case ">": return gt(a, b, loose); case ">=": return gte(a, b, loose); case "<": return lt(a, b, loose); case "<=": return lte(a, b, loose); default: throw new TypeError(`Invalid operator: ${op}`); } }, "cmp"); module2.exports = cmp; } }); // node_modules/semver/functions/coerce.js var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports, module2) { var SemVer = require_semver(); var parse3 = require_parse(); var { safeRe: re, t } = require_re(); var coerce = /* @__PURE__ */ __name((version3, options) => { if (version3 instanceof SemVer) { return version3; } if (typeof version3 === "number") { version3 = String(version3); } if (typeof version3 !== "string") { return null; } options = options || {}; let match = null; if (!options.rtl) { match = version3.match(re[t.COERCE]); } else { let next; while ((next = re[t.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; } re[t.COERCERTL].lastIndex = -1; } if (match === null) { return null; } return parse3(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options); }, "coerce"); module2.exports = coerce; } }); // node_modules/yallist/iterator.js var require_iterator = __commonJS({ "node_modules/yallist/iterator.js"(exports, module2) { "use strict"; module2.exports = function(Yallist) { Yallist.prototype[Symbol.iterator] = function* () { for (let walker = this.head; walker; walker = walker.next) { yield walker.value; } }; }; } }); // node_modules/yallist/yallist.js var require_yallist = __commonJS({ "node_modules/yallist/yallist.js"(exports, module2) { "use strict"; module2.exports = Yallist; Yallist.Node = Node; Yallist.create = Yallist; function Yallist(list) { var self = this; if (!(self instanceof Yallist)) { self = new Yallist(); } self.tail = null; self.head = null; self.length = 0; if (list && typeof list.forEach === "function") { list.forEach(function(item) { self.push(item); }); } else if (arguments.length > 0) { for (var i = 0, l = arguments.length; i < l; i++) { self.push(arguments[i]); } } return self; } __name(Yallist, "Yallist"); Yallist.prototype.removeNode = function(node) { if (node.list !== this) { throw new Error("removing node which does not belong to this list"); } var next = node.next; var prev = node.prev; if (next) { next.prev = prev; } if (prev) { prev.next = next; } if (node === this.head) { this.head = next; } if (node === this.tail) { this.tail = prev; } node.list.length--; node.next = null; node.prev = null; node.list = null; return next; }; Yallist.prototype.unshiftNode = function(node) { if (node === this.head) { return; } if (node.list) { node.list.removeNode(node); } var head = this.head; node.list = this; node.next = head; if (head) { head.prev = node; } this.head = node; if (!this.tail) { this.tail = node; } this.length++; }; Yallist.prototype.pushNode = function(node) { if (node === this.tail) { return; } if (node.list) { node.list.removeNode(node); } var tail = this.tail; node.list = this; node.prev = tail; if (tail) { tail.next = node; } this.tail = node; if (!this.head) { this.head = node; } this.length++; }; Yallist.prototype.push = function() { for (var i = 0, l = arguments.length; i < l; i++) { push(this, arguments[i]); } return this.length; }; Yallist.prototype.unshift = function() { for (var i = 0, l = arguments.length; i < l; i++) { unshift(this, arguments[i]); } return this.length; }; Yallist.prototype.pop = function() { if (!this.tail) { return void 0; } var res = this.tail.value; this.tail = this.tail.prev; if (this.tail) { this.tail.next = null; } else { this.head = null; } this.length--; return res; }; Yallist.prototype.shift = function() { if (!this.head) { return void 0; } var res = this.head.value; this.head = this.head.next; if (this.head) { this.head.prev = null; } else { this.tail = null; } this.length--; return res; }; Yallist.prototype.forEach = function(fn, thisp) { thisp = thisp || this; for (var walker = this.head, i = 0; walker !== null; i++) { fn.call(thisp, walker.value, i, this); walker = walker.next; } }; Yallist.prototype.forEachReverse = function(fn, thisp) { thisp = thisp || this; for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { fn.call(thisp, walker.value, i, this); walker = walker.prev; } }; Yallist.prototype.get = function(n) { for (var i = 0, walker = this.head; walker !== null && i < n; i++) { walker = walker.next; } if (i === n && walker !== null) { return walker.value; } }; Yallist.prototype.getReverse = function(n) { for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { walker = walker.prev; } if (i === n && walker !== null) { return walker.value; } }; Yallist.prototype.map = function(fn, thisp) { thisp = thisp || this; var res = new Yallist(); for (var walker = this.head; walker !== null; ) { res.push(fn.call(thisp, walker.value, this)); walker = walker.next; } return res; }; Yallist.prototype.mapReverse = function(fn, thisp) { thisp = thisp || this; var res = new Yallist(); for (var walker = this.tail; walker !== null; ) { res.push(fn.call(thisp, walker.value, this)); walker = walker.prev; } return res; }; Yallist.prototype.reduce = function(fn, initial) { var acc; var walker = this.head; if (arguments.length > 1) { acc = initial; } else if (this.head) { walker = this.head.next; acc = this.head.value; } else { throw new TypeError("Reduce of empty list with no initial value"); } for (var i = 0; walker !== null; i++) { acc = fn(acc, walker.value, i); walker = walker.next; } return acc; }; Yallist.prototype.reduceReverse = function(fn, initial) { var acc; var walker = this.tail; if (arguments.length > 1) { acc = initial; } else if (this.tail) { walker = this.tail.prev; acc = this.tail.value; } else { throw new TypeError("Reduce of empty list with no initial value"); } for (var i = this.length - 1; walker !== null; i--) { acc = fn(acc, walker.value, i); walker = walker.prev; } return acc; }; Yallist.prototype.toArray = function() { var arr = new Array(this.length); for (var i = 0, walker = this.head; walker !== null; i++) { arr[i] = walker.value; walker = walker.next; } return arr; }; Yallist.prototype.toArrayReverse = function() { var arr = new Array(this.length); for (var i = 0, walker = this.tail; walker !== null; i++) { arr[i] = walker.value; walker = walker.prev; } return arr; }; Yallist.prototype.slice = function(from, to) { to = to || this.length; if (to < 0) { to += this.length; } from = from || 0; if (from < 0) { from += this.length; } var ret = new Yallist(); if (to < from || to < 0) { return ret; } if (from < 0) { from = 0; } if (to > this.length) { to = this.length; } for (var i = 0, walker = this.head; walker !== null && i < from; i++) { walker = walker.next; } for (; walker !== null && i < to; i++, walker = walker.next) { ret.push(walker.value); } return ret; }; Yallist.prototype.sliceReverse = function(from, to) { to = to || this.length; if (to < 0) { to += this.length; } from = from || 0; if (from < 0) { from += this.length; } var ret = new Yallist(); if (to < from || to < 0) { return ret; } if (from < 0) { from = 0; } if (to > this.length) { to = this.length; } for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { walker = walker.prev; } for (; walker !== null && i > from; i--, walker = walker.prev) { ret.push(walker.value); } return ret; }; Yallist.prototype.splice = function(start, deleteCount, ...nodes) { if (start > this.length) { start = this.length - 1; } if (start < 0) { start = this.length + start; } for (var i = 0, walker = this.head; walker !== null && i < start; i++) { walker = walker.next; } var ret = []; for (var i = 0; walker && i < deleteCount; i++) { ret.push(walker.value); walker = this.removeNode(walker); } if (walker === null) { walker = this.tail; } if (walker !== this.head && walker !== this.tail) { walker = walker.prev; } for (var i = 0; i < nodes.length; i++) { walker = insert(this, walker, nodes[i]); } return ret; }; Yallist.prototype.reverse = function() { var head = this.head; var tail = this.tail; for (var walker = head; walker !== null; walker = walker.prev) { var p = walker.prev; walker.prev = walker.next; walker.next = p; } this.head = tail; this.tail = head; return this; }; function insert(self, node, value) { var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self); if (inserted.next === null) { self.tail = inserted; } if (inserted.prev === null) { self.head = inserted; } self.length++; return inserted; } __name(insert, "insert"); function push(self, item) { self.tail = new Node(item, self.tail, null, self); if (!self.head) { self.head = self.tail; } self.length++; } __name(push, "push"); function unshift(self, item) { self.head = new Node(item, null, self.head, self); if (!self.tail) { self.tail = self.head; } self.length++; } __name(unshift, "unshift"); function Node(value, prev, next, list) { if (!(this instanceof Node)) { return new Node(value, prev, next, list); } this.list = list; this.value = value; if (prev) { prev.next = this; this.prev = prev; } else { this.prev = null; } if (next) { next.prev = this; this.next = next; } else { this.next = null; } } __name(Node, "Node"); try { require_iterator()(Yallist); } catch (er) { } } }); // node_modules/lru-cache/index.js var require_lru_cache = __commonJS({ "node_modules/lru-cache/index.js"(exports, module2) { "use strict"; var Yallist = require_yallist(); var MAX = Symbol("max"); var LENGTH = Symbol("length"); var LENGTH_CALCULATOR = Symbol("lengthCalculator"); var ALLOW_STALE = Symbol("allowStale"); var MAX_AGE = Symbol("maxAge"); var DISPOSE = Symbol("dispose"); var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet"); var LRU_LIST = Symbol("lruList"); var CACHE = Symbol("cache"); var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet"); var naiveLength = /* @__PURE__ */ __name(() => 1, "naiveLength"); var _LRUCache = class _LRUCache { constructor(options) { if (typeof options === "number") options = { max: options }; if (!options) options = {}; if (options.max && (typeof options.max !== "number" || options.max < 0)) throw new TypeError("max must be a non-negative number"); const max = this[MAX] = options.max || Infinity; const lc = options.length || naiveLength; this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc; this[ALLOW_STALE] = options.stale || false; if (options.maxAge && typeof options.maxAge !== "number") 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(); } // resize the cache when the max changes. set max(mL) { if (typeof mL !== "number" || mL < 0) throw new TypeError("max must be a non-negative number"); this[MAX] = mL || Infinity; trim(this); } get max() { return this[MAX]; } set allowStale(allowStale) { this[ALLOW_STALE] = !!allowStale; } get allowStale() { return this[ALLOW_STALE]; } set maxAge(mA) { if (typeof mA !== "number") throw new TypeError("maxAge must be a non-negative number"); this[MAX_AGE] = mA; trim(this); } get maxAge() { return this[MAX_AGE]; } // resize the cache when the lengthCalculator changes. set lengthCalculator(lC) { if (typeof lC !== "function") lC = naiveLength; if (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; walker !== null; ) { const prev = walker.prev; forEachStep(this, fn, walker, thisp); walker = prev; } } forEach(fn, thisp) { thisp = thisp || this; for (let walker = this[LRU_LIST].head; walker !== null; ) { 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() { if (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) ? false : { k: hit.key, v: hit.value, e: hit.now + (hit.maxAge || 0) }).toArray().filter((h) => h); } dumpLru() { return this[LRU_LIST]; } set(key, value, maxAge) { maxAge = maxAge || this[MAX_AGE]; if (maxAge && typeof maxAge !== "number") throw new TypeError("maxAge must be a number"); const now = maxAge ? Date.now() : 0; const len = this[LENGTH_CALCULATOR](value, key); if (this[CACHE].has(key)) { if (len > this[MAX]) { del(this, this[CACHE].get(key)); return false; } const node = this[CACHE].get(key); const item = node.value; if (this[DISPOSE]) { if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value); } item.now = now; item.maxAge = maxAge; item.value = value; this[LENGTH] += len - item.length; item.length = len; this.get(key); trim(this); return true; } const hit = new Entry(key, value, len, now, maxAge); if (hit.length > this[MAX]) { if (this[DISPOSE]) this[DISPOSE](key, value); return false; } this[LENGTH] += hit.length; this[LRU_LIST].unshift(hit); this[CACHE].set(key, this[LRU_LIST].head); trim(this); return 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; if (!node) return null; del(this, node); return node.value; } 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]; const expiresAt = hit.e || 0; if (expiresAt === 0) this.set(hit.k, hit.v); else { const maxAge = expiresAt - now; if (maxAge > 0) { this.set(hit.k, hit.v, maxAge); } } } } prune() { this[CACHE].forEach((value, key) => get(this, key, false)); } }; __name(_LRUCache, "LRUCache"); var LRUCache = _LRUCache; var get = /* @__PURE__ */ __name((self, key, doUse) => { const node = self[CACHE].get(key); if (node) { const hit = node.value; if (isStale(self, hit)) { del(self, node); if (!self[ALLOW_STALE]) return void 0; } else { if (doUse) { if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now(); self[LRU_LIST].unshiftNode(node); } } return hit.value; } }, "get"); var isStale = /* @__PURE__ */ __name((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]; }, "isStale"); var trim = /* @__PURE__ */ __name((self) => { if (self[LENGTH] > self[MAX]) { for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) { const prev = walker.prev; del(self, walker); walker = prev; } } }, "trim"); var del = /* @__PURE__ */ __name((self, node) => { if (node) { const hit = node.value; if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value); self[LENGTH] -= hit.length; self[CACHE].delete(hit.key); self[LRU_LIST].removeNode(node); } }, "del"); var _Entry = class _Entry { constructor(key, value, length, now, maxAge) { this.key = key; this.value = value; this.length = length; this.now = now; this.maxAge = maxAge || 0; } }; __name(_Entry, "Entry"); var Entry = _Entry; var forEachStep = /* @__PURE__ */ __name((self, fn, node, thisp) => { let hit = node.value; if (isStale(self, hit)) { del(self, node); if (!self[ALLOW_STALE]) hit = void 0; } if (hit) fn.call(thisp, hit.value, hit.key, self); }, "forEachStep"); module2.exports = LRUCache; } }); // node_modules/semver/classes/range.js var require_range = __commonJS({ "node_modules/semver/classes/range.js"(exports, module2) { var _Range = class _Range { constructor(range, options) { options = parseOptions(options); if (range instanceof _Range) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { return range; } else { return new _Range(range.raw, options); } } if (range instanceof Comparator) { this.raw = range.value; this.set = [[range]]; this.format(); return this; } 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); 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.format(); } format() { this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim(); 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 = cache2.get(memoKey); if (cached) { return cached; } const loose = this.options.loose; const 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)); if (loose) { rangeList = rangeList.filter((comp) => { debug("loose invalid filter", comp, this.options); return !!comp.match(re[t.COMPARATORLOOSE]); }); } debug("range list", rangeList); const rangeMap = /* @__PURE__ */ new Map(); const comparators = rangeList.map((comp) => new Comparator(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()]; cache2.set(memoKey, result); return result; } intersects(range, options) { if (!(range instanceof _Range)) { 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); }); }); }); }); } // if ANY of the sets match ALL of its comparators, then pass test(version3) { if (!version3) { return false; } if (typeof version3 === "string") { 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; } }; __name(_Range, "Range"); var Range = _Range; module2.exports = Range; var LRU = require_lru_cache(); var cache2 = new LRU({ max: 1e3 }); var parseOptions = require_parse_options(); var Comparator = require_comparator(); var debug = require_debug(); var SemVer = require_semver(); var { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re(); var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); var isNullSet = /* @__PURE__ */ __name((c) => c.value === "<0.0.0-0", "isNullSet"); var isAny = /* @__PURE__ */ __name((c) => c.value === "", "isAny"); var isSatisfiable = /* @__PURE__ */ __name((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; }, "isSatisfiable"); var parseComparator = /* @__PURE__ */ __name((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); return comp; }, "parseComparator"); var isX = /* @__PURE__ */ __name((id) => !id || id.toLowerCase() === "x" || id === "*", "isX"); var replaceTildes = /* @__PURE__ */ __name((comp, options) => { return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); }, "replaceTildes"); var replaceTilde = /* @__PURE__ */ __name((comp, options) => { const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; return comp.replace(r, (_, M, m, p, pr) => { debug("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("replaceTilde pr", pr); ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; } else { ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; } debug("tilde return", ret); return ret; }); }, "replaceTilde"); var replaceCarets = /* @__PURE__ */ __name((comp, options) => { return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); }, "replaceCarets"); var replaceCaret = /* @__PURE__ */ __name((comp, options) => { debug("caret", comp, options); const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; const z = options.includePrerelease ? "-0" : ""; return comp.replace(r, (_, M, m, p, pr) => { debug("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("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("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("caret return", ret); return ret; }); }, "replaceCaret"); var replaceXRanges = /* @__PURE__ */ __name((comp, options) => { debug("replaceXRanges", comp, options); return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); }, "replaceXRanges"); var replaceXRange = /* @__PURE__ */ __name((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); 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("xRange return", ret); return ret; }); }, "replaceXRange"); var replaceStars = /* @__PURE__ */ __name((comp, options) => { debug("replaceStars", comp, options); return comp.trim().replace(re[t.STAR], ""); }, "replaceStars"); var replaceGTE0 = /* @__PURE__ */ __name((comp, options) => { debug("replaceGTE0", comp, options); return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); }, "replaceGTE0"); var hyphenReplace = /* @__PURE__ */ __name((incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => { 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(); }, "hyphenReplace"); var testSet = /* @__PURE__ */ __name((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++) { debug(set[i].semver); if (set[i].semver === Comparator.ANY) { continue; } if (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; }, "testSet"); } }); // node_modules/semver/classes/comparator.js var require_comparator = __commonJS({ "node_modules/semver/classes/comparator.js"(exports, module2) { var ANY = Symbol("SemVer ANY"); var _Comparator = class _Comparator { static get ANY() { return ANY; } constructor(comp, options) { options = parseOptions(options); if (comp instanceof _Comparator) { 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) { 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; } else { this.semver = new SemVer(m[2], this.options.loose); } } toString() { return this.value; } test(version3) { debug("Comparator.test", version3, this.options.loose); if (this.semver === ANY || version3 === ANY) { return true; } if (typeof version3 === "string") { 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"); } if (this.operator === "") { if (this.value === "") { return true; } return new Range(comp.value, options).test(this.value); } else if (comp.operator === "") { if (comp.value === "") { return true; } return new Range(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(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { return true; } if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { return true; } return false; } }; __name(_Comparator, "Comparator"); var Comparator = _Comparator; module2.exports = Comparator; var parseOptions = require_parse_options(); var { safeRe: re, t } = require_re(); var cmp = require_cmp(); var debug = require_debug(); var SemVer = require_semver(); var Range = require_range(); } }); // node_modules/semver/functions/satisfies.js var require_satisfies = __commonJS({ "node_modules/semver/functions/satisfies.js"(exports, module2) { var Range = require_range(); var satisfies = /* @__PURE__ */ __name((version3, range, options) => { try { range = new Range(range, options); } catch (er) { return false; } return range.test(version3); }, "satisfies"); module2.exports = satisfies; } }); // node_modules/semver/ranges/to-comparators.js var require_to_comparators = __commonJS({ "node_modules/semver/ranges/to-comparators.js"(exports, module2) { var Range = require_range(); var toComparators = /* @__PURE__ */ __name((range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")), "toComparators"); module2.exports = toComparators; } }); // node_modules/semver/ranges/max-satisfying.js var require_max_satisfying = __commonJS({ "node_modules/semver/ranges/max-satisfying.js"(exports, module2) { var SemVer = require_semver(); var Range = require_range(); var maxSatisfying = /* @__PURE__ */ __name((versions, range, options) => { let max = null; let maxSV = null; let rangeObj = null; try { rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach((v) => { if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; maxSV = new SemVer(max, options); } } }); return max; }, "maxSatisfying"); module2.exports = maxSatisfying; } }); // node_modules/semver/ranges/min-satisfying.js var require_min_satisfying = __commonJS({ "node_modules/semver/ranges/min-satisfying.js"(exports, module2) { var SemVer = require_semver(); var Range = require_range(); var minSatisfying = /* @__PURE__ */ __name((versions, range, options) => { let min = null; let minSV = null; let rangeObj = null; try { rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach((v) => { if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; minSV = new SemVer(min, options); } } }); return min; }, "minSatisfying"); module2.exports = minSatisfying; } }); // node_modules/semver/ranges/min-version.js var require_min_version = __commonJS({ "node_modules/semver/ranges/min-version.js"(exports, module2) { var SemVer = require_semver(); var Range = require_range(); var gt = require_gt(); var minVersion = /* @__PURE__ */ __name((range, loose) => { range = new Range(range, loose); let minver = new SemVer("0.0.0"); if (range.test(minver)) { return minver; } minver = new SemVer("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(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(compver, setMin)) { setMin = compver; } break; case "<": case "<=": break; default: throw new Error(`Unexpected operation: ${comparator.operator}`); } }); if (setMin && (!minver || gt(minver, setMin))) { minver = setMin; } } if (minver && range.test(minver)) { return minver; } return null; }, "minVersion"); module2.exports = minVersion; } }); // node_modules/semver/ranges/valid.js var require_valid2 = __commonJS({ "node_modules/semver/ranges/valid.js"(exports, module2) { var Range = require_range(); var validRange = /* @__PURE__ */ __name((range, options) => { try { return new Range(range, options).range || "*"; } catch (er) { return null; } }, "validRange"); module2.exports = validRange; } }); // node_modules/semver/ranges/outside.js var require_outside = __commonJS({ "node_modules/semver/ranges/outside.js"(exports, module2) { var SemVer = require_semver(); var Comparator = require_comparator(); var { ANY } = Comparator; var Range = require_range(); var satisfies = require_satisfies(); var gt = require_gt(); var lt = require_lt(); var lte = require_lte(); var gte = require_gte(); var outside = /* @__PURE__ */ __name((version3, range, hilo, options) => { version3 = new SemVer(version3, options); range = new Range(range, options); let gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt; ltefn = lte; ltfn = lt; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt; ltefn = gte; ltfn = gt; comp = "<"; ecomp = "<="; break; default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } if (satisfies(version3, 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) { comparator = new Comparator(">=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(version3, low.semver)) { return false; } else if (low.operator === ecomp && ltfn(version3, low.semver)) { return false; } } return true; }, "outside"); module2.exports = outside; } }); // node_modules/semver/ranges/gtr.js var require_gtr = __commonJS({ "node_modules/semver/ranges/gtr.js"(exports, module2) { var outside = require_outside(); var gtr = /* @__PURE__ */ __name((version3, range, options) => outside(version3, range, ">", options), "gtr"); module2.exports = gtr; } }); // node_modules/semver/ranges/ltr.js var require_ltr = __commonJS({ "node_modules/semver/ranges/ltr.js"(exports, module2) { var outside = require_outside(); var ltr = /* @__PURE__ */ __name((version3, range, options) => outside(version3, range, "<", options), "ltr"); module2.exports = ltr; } }); // node_modules/semver/ranges/intersects.js var require_intersects = __commonJS({ "node_modules/semver/ranges/intersects.js"(exports, module2) { var Range = require_range(); var intersects = /* @__PURE__ */ __name((r1, r2, options) => { r1 = new Range(r1, options); r2 = new Range(r2, options); return r1.intersects(r2, options); }, "intersects"); module2.exports = intersects; } }); // node_modules/semver/ranges/simplify.js var require_simplify = __commonJS({ "node_modules/semver/ranges/simplify.js"(exports, module2) { var satisfies = require_satisfies(); var compare = require_compare(); module2.exports = (versions, range, options) => { const set = []; let first = null; let prev = null; const v = versions.sort((a, b) => compare(a, b, options)); for (const version3 of v) { const included = satisfies(version3, range, options); if (included) { prev = version3; if (!first) { first = version3; } } else { if (prev) { set.push([first, prev]); } prev = null; first = null; } } if (first) { set.push([first, null]); } const ranges = []; for (const [min, max] of set) { if (min === max) { ranges.push(min); } else if (!max && min === v[0]) { ranges.push("*"); } else if (!max) { ranges.push(`>=${min}`); } else if (min === v[0]) { ranges.push(`<=${max}`); } else { ranges.push(`${min} - ${max}`); } } const simplified = ranges.join(" || "); const original = typeof range.raw === "string" ? range.raw : String(range); return simplified.length < original.length ? simplified : range; }; } }); // node_modules/semver/ranges/subset.js var require_subset = __commonJS({ "node_modules/semver/ranges/subset.js"(exports, module2) { var Range = require_range(); var Comparator = require_comparator(); var { ANY } = Comparator; var satisfies = require_satisfies(); var compare = require_compare(); var subset = /* @__PURE__ */ __name((sub, dom, options = {}) => { if (sub === dom) { return true; } sub = new Range(sub, options); dom = new Range(dom, options); let sawNonNull = false; OUTER: for (const simpleSub of sub.set) { for (const simpleDom of dom.set) { const isSub = simpleSubset(simpleSub, simpleDom, options); sawNonNull = sawNonNull || isSub !== null; if (isSub) { continue OUTER; } } if (sawNonNull) { return false; } } return true; }, "subset"); var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; var minimumVersion = [new Comparator(">=0.0.0")]; var simpleSubset = /* @__PURE__ */ __name((sub, dom, options) => { if (sub === dom) { return true; } if (sub.length === 1 && sub[0].semver === ANY) { if (dom.length === 1 && dom[0].semver === ANY) { return true; } else if (options.includePrerelease) { sub = minimumVersionWithPreRelease; } else { sub = minimumVersion; } } if (dom.length === 1 && dom[0].semver === ANY) { if (options.includePrerelease) { return true; } else { dom = minimumVersion; } } const eqSet = /* @__PURE__ */ new Set(); let gt, lt; for (const c of sub) { if (c.operator === ">" || c.operator === ">=") { gt = higherGT(gt, c, options); } else if (c.operator === "<" || c.operator === "<=") { lt = lowerLT(lt, c, options); } else { eqSet.add(c.semver); } } if (eqSet.size > 1) { return null; } let gtltComp; if (gt && lt) { gtltComp = compare(gt.semver, lt.semver, options); if (gtltComp > 0) { return null; } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) { return null; } } for (const eq of eqSet) { if (gt && !satisfies(eq, String(gt), options)) { return null; } if (lt && !satisfies(eq, String(lt), options)) { return null; } for (const c of dom) { if (!satisfies(eq, String(c), options)) { return false; } } return true; } let higher, lower; let hasDomLT, hasDomGT; let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { needDomLTPre = false; } for (const c of dom) { hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; if (gt) { if (needDomGTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { needDomGTPre = false; } } if (c.operator === ">" || c.operator === ">=") { higher = higherGT(gt, c, options); if (higher === c && higher !== gt) { return false; } } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) { return false; } } if (lt) { if (needDomLTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { needDomLTPre = false; } } if (c.operator === "<" || c.operator === "<=") { lower = lowerLT(lt, c, options); if (lower === c && lower !== lt) { return false; } } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) { return false; } } if (!c.operator && (lt || gt) && gtltComp !== 0) { return false; } } if (gt && hasDomLT && !lt && gtltComp !== 0) { return false; } if (lt && hasDomGT && !gt && gtltComp !== 0) { return false; } if (needDomGTPre || needDomLTPre) { return false; } return true; }, "simpleSubset"); var higherGT = /* @__PURE__ */ __name((a, b, options) => { if (!a) { return b; } const comp = compare(a.semver, b.semver, options); return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; }, "higherGT"); var lowerLT = /* @__PURE__ */ __name((a, b, options) => { if (!a) { return b; } const comp = compare(a.semver, b.semver, options); return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; }, "lowerLT"); module2.exports = subset; } }); // node_modules/semver/index.js var require_semver2 = __commonJS({ "node_modules/semver/index.js"(exports, module2) { var internalRe = require_re(); var constants = require_constants(); var SemVer = require_semver(); var identifiers = require_identifiers(); var parse3 = require_parse(); var valid = require_valid(); var clean = require_clean(); var inc = require_inc(); var diff = require_diff(); var major = require_major(); var minor = require_minor(); var patch = require_patch(); var prerelease = require_prerelease(); var compare = require_compare(); var rcompare = require_rcompare(); var compareLoose = require_compare_loose(); var compareBuild = require_compare_build(); var sort = require_sort(); var rsort = require_rsort(); var gt = require_gt(); var lt = require_lt(); var eq = require_eq(); var neq = require_neq(); var gte = require_gte(); var lte = require_lte(); var cmp = require_cmp(); var coerce = require_coerce(); var Comparator = require_comparator(); var Range = require_range(); var satisfies = require_satisfies(); var toComparators = require_to_comparators(); var maxSatisfying = require_max_satisfying(); var minSatisfying = require_min_satisfying(); var minVersion = require_min_version(); var validRange = require_valid2(); var outside = require_outside(); var gtr = require_gtr(); var ltr = require_ltr(); var intersects = require_intersects(); var simplifyRange = require_simplify(); var subset = require_subset(); module2.exports = { parse: parse3, valid, clean, inc, diff, major, minor, patch, prerelease, compare, rcompare, compareLoose, compareBuild, sort, rsort, gt, lt, eq, neq, gte, lte, cmp, coerce, Comparator, Range, satisfies, toComparators, maxSatisfying, minSatisfying, minVersion, validRange, outside, gtr, ltr, intersects, simplifyRange, subset, SemVer, re: internalRe.re, src: internalRe.src, tokens: internalRe.t, SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, RELEASE_TYPES: constants.RELEASE_TYPES, compareIdentifiers: identifiers.compareIdentifiers, rcompareIdentifiers: identifiers.rcompareIdentifiers }; } }); // node_modules/@actions/core/lib/utils.js var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toCommandProperties = exports.toCommandValue = void 0; function toCommandValue(input) { if (input === null || input === void 0) { return ""; } else if (typeof input === "string" || input instanceof String) { return input; } return JSON.stringify(input); } __name(toCommandValue, "toCommandValue"); exports.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; } return { title: annotationProperties.title, file: annotationProperties.file, line: annotationProperties.startLine, endLine: annotationProperties.endLine, col: annotationProperties.startColumn, endColumn: annotationProperties.endColumn }; } __name(toCommandProperties, "toCommandProperties"); exports.toCommandProperties = toCommandProperties; } }); // node_modules/@actions/core/lib/command.js var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.issue = exports.issueCommand = void 0; var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os2.EOL); } __name(issueCommand, "issueCommand"); exports.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } __name(issue, "issue"); exports.issue = issue; var CMD_STRING = "::"; var _Command = class _Command { constructor(command, properties, message) { if (!command) { command = "missing.command"; } this.command = command; this.properties = properties; this.message = message; } toString() { let cmdStr = CMD_STRING + this.command; if (this.properties && Object.keys(this.properties).length > 0) { cmdStr += " "; let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { const val = this.properties[key]; if (val) { if (first) { first = false; } else { cmdStr += ","; } cmdStr += `${key}=${escapeProperty(val)}`; } } } } cmdStr += `${CMD_STRING}${escapeData(this.message)}`; return cmdStr; } }; __name(_Command, "Command"); var Command = _Command; function escapeData(s) { return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); } __name(escapeData, "escapeData"); function escapeProperty(s) { return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); } __name(escapeProperty, "escapeProperty"); } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js function rng() { if (poolPtr > rnds8Pool.length - 16) { import_crypto.default.randomFillSync(rnds8Pool); poolPtr = 0; } return rnds8Pool.slice(poolPtr, poolPtr += 16); } var import_crypto, rnds8Pool, poolPtr; var init_rng = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js"() { import_crypto = __toESM(require("crypto")); rnds8Pool = new Uint8Array(256); poolPtr = rnds8Pool.length; __name(rng, "rng"); } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js var regex_default; var init_regex = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js"() { regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js function validate(uuid) { return typeof uuid === "string" && regex_default.test(uuid); } var validate_default; var init_validate = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js"() { init_regex(); __name(validate, "validate"); validate_default = validate; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js function stringify(arr, offset = 0) { const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); if (!validate_default(uuid)) { throw TypeError("Stringified UUID is invalid"); } return uuid; } var byteToHex, stringify_default; var init_stringify = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js"() { init_validate(); byteToHex = []; for (let i = 0; i < 256; ++i) { byteToHex.push((i + 256).toString(16).substr(1)); } __name(stringify, "stringify"); stringify_default = stringify; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js function v1(options, buf, offset) { let i = buf && offset || 0; const b = buf || new Array(16); options = options || {}; let node = options.node || _nodeId; let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; if (node == null || clockseq == null) { const seedBytes = options.random || (options.rng || rng)(); if (node == null) { node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; } if (clockseq == null) { clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; } } let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; if (dt < 0 && options.clockseq === void 0) { clockseq = clockseq + 1 & 16383; } if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { nsecs = 0; } if (nsecs >= 1e4) { throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } _lastMSecs = msecs; _lastNSecs = nsecs; _clockseq = clockseq; msecs += 122192928e5; const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; b[i++] = tl >>> 24 & 255; b[i++] = tl >>> 16 & 255; b[i++] = tl >>> 8 & 255; b[i++] = tl & 255; const tmh = msecs / 4294967296 * 1e4 & 268435455; b[i++] = tmh >>> 8 & 255; b[i++] = tmh & 255; b[i++] = tmh >>> 24 & 15 | 16; b[i++] = tmh >>> 16 & 255; b[i++] = clockseq >>> 8 | 128; b[i++] = clockseq & 255; for (let n = 0; n < 6; ++n) { b[i + n] = node[n]; } return buf || stringify_default(b); } var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; var init_v1 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js"() { init_rng(); init_stringify(); _lastMSecs = 0; _lastNSecs = 0; __name(v1, "v1"); v1_default = v1; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js function parse(uuid) { if (!validate_default(uuid)) { throw TypeError("Invalid UUID"); } let v; const arr = new Uint8Array(16); arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; arr[1] = v >>> 16 & 255; arr[2] = v >>> 8 & 255; arr[3] = v & 255; arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; arr[5] = v & 255; arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; arr[7] = v & 255; arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; arr[9] = v & 255; arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; arr[11] = v / 4294967296 & 255; arr[12] = v >>> 24 & 255; arr[13] = v >>> 16 & 255; arr[14] = v >>> 8 & 255; arr[15] = v & 255; return arr; } var parse_default; var init_parse = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js"() { init_validate(); __name(parse, "parse"); parse_default = parse; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js function stringToBytes(str) { str = unescape(encodeURIComponent(str)); const bytes = []; for (let i = 0; i < str.length; ++i) { bytes.push(str.charCodeAt(i)); } return bytes; } function v35_default(name, version3, hashfunc) { function generateUUID(value, namespace, buf, offset) { if (typeof value === "string") { value = stringToBytes(value); } if (typeof namespace === "string") { namespace = parse_default(namespace); } if (namespace.length !== 16) { throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); } let bytes = new Uint8Array(16 + value.length); bytes.set(namespace); bytes.set(value, namespace.length); bytes = hashfunc(bytes); bytes[6] = bytes[6] & 15 | version3; bytes[8] = bytes[8] & 63 | 128; if (buf) { offset = offset || 0; for (let i = 0; i < 16; ++i) { buf[offset + i] = bytes[i]; } return buf; } return stringify_default(bytes); } __name(generateUUID, "generateUUID"); try { generateUUID.name = name; } catch (err) { } generateUUID.DNS = DNS; generateUUID.URL = URL2; return generateUUID; } var DNS, URL2; var init_v35 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js"() { init_stringify(); init_parse(); __name(stringToBytes, "stringToBytes"); DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; __name(v35_default, "default"); } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js function md5(bytes) { if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === "string") { bytes = Buffer.from(bytes, "utf8"); } return import_crypto2.default.createHash("md5").update(bytes).digest(); } var import_crypto2, md5_default; var init_md5 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js"() { import_crypto2 = __toESM(require("crypto")); __name(md5, "md5"); md5_default = md5; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js var v3, v3_default; var init_v3 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js"() { init_v35(); init_md5(); v3 = v35_default("v3", 48, md5_default); v3_default = v3; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js function v4(options, buf, offset) { options = options || {}; const rnds = options.random || (options.rng || rng)(); rnds[6] = rnds[6] & 15 | 64; rnds[8] = rnds[8] & 63 | 128; if (buf) { offset = offset || 0; for (let i = 0; i < 16; ++i) { buf[offset + i] = rnds[i]; } return buf; } return stringify_default(rnds); } var v4_default; var init_v4 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js"() { init_rng(); init_stringify(); __name(v4, "v4"); v4_default = v4; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js function sha1(bytes) { if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === "string") { bytes = Buffer.from(bytes, "utf8"); } return import_crypto3.default.createHash("sha1").update(bytes).digest(); } var import_crypto3, sha1_default; var init_sha1 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js"() { import_crypto3 = __toESM(require("crypto")); __name(sha1, "sha1"); sha1_default = sha1; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js var v5, v5_default; var init_v5 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js"() { init_v35(); init_sha1(); v5 = v35_default("v5", 80, sha1_default); v5_default = v5; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js var nil_default; var init_nil = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js"() { nil_default = "00000000-0000-0000-0000-000000000000"; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js function version(uuid) { if (!validate_default(uuid)) { throw TypeError("Invalid UUID"); } return parseInt(uuid.substr(14, 1), 16); } var version_default; var init_version = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js"() { init_validate(); __name(version, "version"); version_default = version; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js var esm_node_exports = {}; __export(esm_node_exports, { NIL: () => nil_default, parse: () => parse_default, stringify: () => stringify_default, v1: () => v1_default, v3: () => v3_default, v4: () => v4_default, v5: () => v5_default, validate: () => validate_default, version: () => version_default }); var init_esm_node = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js"() { init_v1(); init_v3(); init_v4(); init_v5(); init_nil(); init_version(); init_validate(); init_stringify(); init_parse(); } }); // node_modules/@actions/core/lib/file-command.js var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; var fs = __importStar2(require("fs")); var os2 = __importStar2(require("os")); var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } if (!fs.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os2.EOL}`, { encoding: "utf8" }); } __name(issueFileCommand, "issueFileCommand"); exports.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { const delimiter = `ghadelimiter_${uuid_1.v4()}`; const convertedValue = utils_1.toCommandValue(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } __name(prepareKeyValueMessage, "prepareKeyValueMessage"); exports.prepareKeyValueMessage = prepareKeyValueMessage; } }); // node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ "node_modules/@actions/http-client/lib/proxy.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkBypass = exports.getProxyUrl = void 0; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { return void 0; } const proxyVar = (() => { if (usingSsl) { return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; } else { return process.env["http_proxy"] || process.env["HTTP_PROXY"]; } })(); if (proxyVar) { return new URL(proxyVar); } else { return void 0; } } __name(getProxyUrl, "getProxyUrl"); exports.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; } const reqHost = reqUrl.hostname; if (isLoopbackAddress(reqHost)) { return true; } const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; if (!noProxy) { return false; } let reqPort; if (reqUrl.port) { reqPort = Number(reqUrl.port); } else if (reqUrl.protocol === "http:") { reqPort = 80; } else if (reqUrl.protocol === "https:") { reqPort = 443; } const upperReqHosts = [reqUrl.hostname.toUpperCase()]; if (typeof reqPort === "number") { upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); } for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { return true; } } return false; } __name(checkBypass, "checkBypass"); exports.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } __name(isLoopbackAddress, "isLoopbackAddress"); } }); // node_modules/tunnel/lib/tunnel.js var require_tunnel = __commonJS({ "node_modules/tunnel/lib/tunnel.js"(exports) { "use strict"; var net = require("net"); var tls = require("tls"); var http = require("http"); var https = require("https"); var events = require("events"); var assert = require("assert"); var util = require("util"); exports.httpOverHttp = httpOverHttp; exports.httpsOverHttp = httpsOverHttp; exports.httpOverHttps = httpOverHttps; exports.httpsOverHttps = httpsOverHttps; function httpOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; return agent; } __name(httpOverHttp, "httpOverHttp"); function httpsOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; } __name(httpsOverHttp, "httpsOverHttp"); function httpOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; return agent; } __name(httpOverHttps, "httpOverHttps"); function httpsOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; } __name(httpsOverHttps, "httpsOverHttps"); function TunnelingAgent(options) { var self = this; self.options = options || {}; self.proxyOptions = self.options.proxy || {}; self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; self.requests = []; self.sockets = []; self.on("free", /* @__PURE__ */ __name(function onFree(socket, host, port, localAddress) { var options2 = toOptions(host, port, localAddress); for (var i = 0, len = self.requests.length; i < len; ++i) { var pending = self.requests[i]; if (pending.host === options2.host && pending.port === options2.port) { self.requests.splice(i, 1); pending.request.onSocket(socket); return; } } socket.destroy(); self.removeSocket(socket); }, "onFree")); } __name(TunnelingAgent, "TunnelingAgent"); util.inherits(TunnelingAgent, events.EventEmitter); TunnelingAgent.prototype.addRequest = /* @__PURE__ */ __name(function addRequest(req, host, port, localAddress) { var self = this; var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); if (self.sockets.length >= this.maxSockets) { self.requests.push(options); return; } self.createSocket(options, function(socket) { socket.on("free", onFree); socket.on("close", onCloseOrRemove); socket.on("agentRemove", onCloseOrRemove); req.onSocket(socket); function onFree() { self.emit("free", socket, options); } __name(onFree, "onFree"); function onCloseOrRemove(err) { self.removeSocket(socket); socket.removeListener("free", onFree); socket.removeListener("close", onCloseOrRemove); socket.removeListener("agentRemove", onCloseOrRemove); } __name(onCloseOrRemove, "onCloseOrRemove"); }); }, "addRequest"); TunnelingAgent.prototype.createSocket = /* @__PURE__ */ __name(function createSocket(options, cb) { var self = this; var placeholder = {}; self.sockets.push(placeholder); var connectOptions = mergeOptions({}, self.proxyOptions, { method: "CONNECT", path: options.host + ":" + options.port, agent: false, headers: { host: options.host + ":" + options.port } }); if (options.localAddress) { connectOptions.localAddress = options.localAddress; } if (connectOptions.proxyAuth) { connectOptions.headers = connectOptions.headers || {}; connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } debug("making CONNECT request"); var connectReq = self.request(connectOptions); connectReq.useChunkedEncodingByDefault = false; connectReq.once("response", onResponse); connectReq.once("upgrade", onUpgrade); connectReq.once("connect", onConnect); connectReq.once("error", onError); connectReq.end(); function onResponse(res) { res.upgrade = true; } __name(onResponse, "onResponse"); function onUpgrade(res, socket, head) { process.nextTick(function() { onConnect(res, socket, head); }); } __name(onUpgrade, "onUpgrade"); function onConnect(res, socket, head) { connectReq.removeAllListeners(); socket.removeAllListeners(); if (res.statusCode !== 200) { debug( "tunneling socket could not be established, statusCode=%d", res.statusCode ); socket.destroy(); var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); error.code = "ECONNRESET"; options.request.emit("error", error); self.removeSocket(placeholder); return; } if (head.length > 0) { debug("got illegal response body from proxy"); socket.destroy(); var error = new Error("got illegal response body from proxy"); error.code = "ECONNRESET"; options.request.emit("error", error); self.removeSocket(placeholder); return; } debug("tunneling connection has established"); self.sockets[self.sockets.indexOf(placeholder)] = socket; return cb(socket); } __name(onConnect, "onConnect"); function onError(cause) { connectReq.removeAllListeners(); debug( "tunneling socket could not be established, cause=%s\n", cause.message, cause.stack ); var error = new Error("tunneling socket could not be established, cause=" + cause.message); error.code = "ECONNRESET"; options.request.emit("error", error); self.removeSocket(placeholder); } __name(onError, "onError"); }, "createSocket"); TunnelingAgent.prototype.removeSocket = /* @__PURE__ */ __name(function removeSocket(socket) { var pos = this.sockets.indexOf(socket); if (pos === -1) { return; } this.sockets.splice(pos, 1); var pending = this.requests.shift(); if (pending) { this.createSocket(pending, function(socket2) { pending.request.onSocket(socket2); }); } }, "removeSocket"); function createSecureSocket(options, cb) { var self = this; TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { var hostHeader = options.request.getHeader("host"); var tlsOptions = mergeOptions({}, self.options, { socket, servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host }); var secureSocket = tls.connect(0, tlsOptions); self.sockets[self.sockets.indexOf(socket)] = secureSocket; cb(secureSocket); }); } __name(createSecureSocket, "createSecureSocket"); function toOptions(host, port, localAddress) { if (typeof host === "string") { return { host, port, localAddress }; } return host; } __name(toOptions, "toOptions"); function mergeOptions(target) { for (var i = 1, len = arguments.length; i < len; ++i) { var overrides = arguments[i]; if (typeof overrides === "object") { var keys = Object.keys(overrides); for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { var k = keys[j]; if (overrides[k] !== void 0) { target[k] = overrides[k]; } } } } return target; } __name(mergeOptions, "mergeOptions"); var debug; if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { debug = /* @__PURE__ */ __name(function() { var args = Array.prototype.slice.call(arguments); if (typeof args[0] === "string") { args[0] = "TUNNEL: " + args[0]; } else { args.unshift("TUNNEL:"); } console.error.apply(console, args); }, "debug"); } else { debug = /* @__PURE__ */ __name(function() { }, "debug"); } exports.debug = debug; } }); // node_modules/tunnel/index.js var require_tunnel2 = __commonJS({ "node_modules/tunnel/index.js"(exports, module2) { module2.exports = require_tunnel(); } }); // node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ "node_modules/@actions/http-client/lib/index.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; var http = __importStar2(require("http")); var https = __importStar2(require("https")); var pm = __importStar2(require_proxy()); var tunnel = __importStar2(require_tunnel2()); var HttpCodes; (function(HttpCodes2) { HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); var Headers; (function(Headers2) { Headers2["Accept"] = "accept"; Headers2["ContentType"] = "content-type"; })(Headers = exports.Headers || (exports.Headers = {})); var MediaTypes; (function(MediaTypes2) { MediaTypes2["ApplicationJson"] = "application/json"; })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); function getProxyUrl(serverUrl) { const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } __name(getProxyUrl, "getProxyUrl"); exports.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect ]; var HttpResponseRetryCodes = [ HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout ]; var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; var ExponentialBackoffCeiling = 10; var ExponentialBackoffTimeSlice = 5; var _HttpClientError = class _HttpClientError extends Error { constructor(message, statusCode) { super(message); this.name = "HttpClientError"; this.statusCode = statusCode; Object.setPrototypeOf(this, _HttpClientError.prototype); } }; __name(_HttpClientError, "HttpClientError"); var HttpClientError = _HttpClientError; exports.HttpClientError = HttpClientError; var _HttpClientResponse = class _HttpClientResponse { constructor(message) { this.message = message; } readBody() { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { resolve(output.toString()); }); })); }); } }; __name(_HttpClientResponse, "HttpClientResponse"); var HttpClientResponse = _HttpClientResponse; exports.HttpClientResponse = HttpClientResponse; function isHttps(requestUrl) { const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } __name(isHttps, "isHttps"); exports.isHttps = isHttps; var _HttpClient = class _HttpClient { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; this._allowRedirects = true; this._allowRedirectDowngrade = false; this._maxRedirects = 50; this._allowRetries = false; this._maxRetries = 1; this._keepAlive = false; this._disposed = false; this.userAgent = userAgent; this.handlers = handlers || []; this.requestOptions = requestOptions; if (requestOptions) { if (requestOptions.ignoreSslError != null) { this._ignoreSslError = requestOptions.ignoreSslError; } this._socketTimeout = requestOptions.socketTimeout; if (requestOptions.allowRedirects != null) { this._allowRedirects = requestOptions.allowRedirects; } if (requestOptions.allowRedirectDowngrade != null) { this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; } if (requestOptions.maxRedirects != null) { this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); } if (requestOptions.keepAlive != null) { this._keepAlive = requestOptions.keepAlive; } if (requestOptions.allowRetries != null) { this._allowRetries = requestOptions.allowRetries; } if (requestOptions.maxRetries != null) { this._maxRetries = requestOptions.maxRetries; } } } options(requestUrl, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } /** * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } putJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } patchJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } /** * Makes a raw http request. * All other methods such as get, post, patch, and request ultimately call this. * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } const parsedUrl = new URL(requestUrl); let info = this._prepareRequest(verb, parsedUrl, headers); const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; let numTries = 0; let response; do { response = yield this.requestRaw(info, data); if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { let authenticationHandler; for (const handler of this.handlers) { if (handler.canHandleAuthentication(response)) { authenticationHandler = handler; break; } } if (authenticationHandler) { return authenticationHandler.handleAuthentication(this, info, data); } else { return response; } } let redirectsRemaining = this._maxRedirects; while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { const redirectUrl = response.message.headers["location"]; if (!redirectUrl) { break; } const parsedRedirectUrl = new URL(redirectUrl); if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); } yield response.readBody(); if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { for (const header in headers) { if (header.toLowerCase() === "authorization") { delete headers[header]; } } } info = this._prepareRequest(verb, parsedRedirectUrl, headers); response = yield this.requestRaw(info, data); redirectsRemaining--; } if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { return response; } numTries += 1; if (numTries < maxTries) { yield response.readBody(); yield this._performExponentialBackoff(numTries); } } while (numTries < maxTries); return response; }); } /** * Needs to be called if keepAlive is set to true in request options. */ dispose() { if (this._agent) { this._agent.destroy(); } this._disposed = true; } /** * Raw request. * @param info * @param data */ requestRaw(info, data) { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { resolve(res); } } __name(callbackForResult, "callbackForResult"); this.requestRawWithCallback(info, data, callbackForResult); }); }); } /** * Raw request with callback. * @param info * @param data * @param onResult */ requestRawWithCallback(info, data, onResult) { if (typeof data === "string") { if (!info.options.headers) { info.options.headers = {}; } info.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); } let callbackCalled = false; function handleResult(err, res) { if (!callbackCalled) { callbackCalled = true; onResult(err, res); } } __name(handleResult, "handleResult"); const req = info.httpModule.request(info.options, (msg) => { const res = new HttpClientResponse(msg); handleResult(void 0, res); }); let socket; req.on("socket", (sock) => { socket = sock; }); req.setTimeout(this._socketTimeout || 3 * 6e4, () => { if (socket) { socket.end(); } handleResult(new Error(`Request timeout: ${info.options.path}`)); }); req.on("error", function(err) { handleResult(err); }); if (data && typeof data === "string") { req.write(data, "utf8"); } if (data && typeof data !== "string") { data.on("close", function() { req.end(); }); data.pipe(req); } else { req.end(); } } /** * Gets an http agent. This function is useful when you need an http agent that handles * routing through a proxy server - depending upon the url and proxy environment variables. * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com */ getAgent(serverUrl) { const parsedUrl = new URL(serverUrl); return this._getAgent(parsedUrl); } _prepareRequest(method, requestUrl, headers) { const info = {}; info.parsedUrl = requestUrl; const usingSsl = info.parsedUrl.protocol === "https:"; info.httpModule = usingSsl ? https : http; const defaultPort = usingSsl ? 443 : 80; info.options = {}; info.options.host = info.parsedUrl.hostname; info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; info.options.path = (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); info.options.method = method; info.options.headers = this._mergeHeaders(headers); if (this.userAgent != null) { info.options.headers["user-agent"] = this.userAgent; } info.options.agent = this._getAgent(info.parsedUrl); if (this.handlers) { for (const handler of this.handlers) { handler.prepareRequest(info.options); } } return info; } _mergeHeaders(headers) { if (this.requestOptions && this.requestOptions.headers) { return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); } return lowercaseKeys(headers || {}); } _getExistingOrDefaultHeader(additionalHeaders, header, _default) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; } return additionalHeaders[header] || clientHeader || _default; } _getAgent(parsedUrl) { let agent; const proxyUrl = pm.getProxyUrl(parsedUrl); const useProxy = proxyUrl && proxyUrl.hostname; if (this._keepAlive && useProxy) { agent = this._proxyAgent; } if (this._keepAlive && !useProxy) { agent = this._agent; } if (agent) { return agent; } const usingSsl = parsedUrl.protocol === "https:"; let maxSockets = 100; if (this.requestOptions) { maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; } if (proxyUrl && proxyUrl.hostname) { const agentOptions = { maxSockets, keepAlive: this._keepAlive, proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` }), { host: proxyUrl.hostname, port: proxyUrl.port }) }; let tunnelAgent; const overHttps = proxyUrl.protocol === "https:"; if (usingSsl) { tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; } else { tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; } agent = tunnelAgent(agentOptions); this._proxyAgent = agent; } if (this._keepAlive && !agent) { const options = { keepAlive: this._keepAlive, maxSockets }; agent = usingSsl ? new https.Agent(options) : new http.Agent(options); this._agent = agent; } if (!agent) { agent = usingSsl ? https.globalAgent : http.globalAgent; } if (usingSsl && this._ignoreSslError) { agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); } return agent; } _performExponentialBackoff(retryNumber) { return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve) => setTimeout(() => resolve(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, result: null, headers: {} }; if (statusCode === HttpCodes.NotFound) { resolve(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { const a = new Date(value); if (!isNaN(a.valueOf())) { return a; } } return value; } __name(dateTimeDeserializer, "dateTimeDeserializer"); let obj; let contents; try { contents = yield res.readBody(); if (contents && contents.length > 0) { if (options && options.deserializeDates) { obj = JSON.parse(contents, dateTimeDeserializer); } else { obj = JSON.parse(contents); } response.result = obj; } response.headers = res.message.headers; } catch (err) { } if (statusCode > 299) { let msg; if (obj && obj.message) { msg = obj.message; } else if (contents && contents.length > 0) { msg = contents; } else { msg = `Failed request: (${statusCode})`; } const err = new HttpClientError(msg, statusCode); err.result = response.result; reject(err); } else { resolve(response); } })); }); } }; __name(_HttpClient, "HttpClient"); var HttpClient = _HttpClient; exports.HttpClient = HttpClient; var lowercaseKeys = /* @__PURE__ */ __name((obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}), "lowercaseKeys"); } }); // node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ "node_modules/@actions/http-client/lib/auth.js"(exports) { "use strict"; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; var _BasicCredentialHandler = class _BasicCredentialHandler { constructor(username, password) { this.username = username; this.password = password; } prepareRequest(options) { if (!options.headers) { throw Error("The request has no headers"); } options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; } // This handler cannot handle 401 canHandleAuthentication() { return false; } handleAuthentication() { return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } }; __name(_BasicCredentialHandler, "BasicCredentialHandler"); var BasicCredentialHandler = _BasicCredentialHandler; exports.BasicCredentialHandler = BasicCredentialHandler; var _BearerCredentialHandler = class _BearerCredentialHandler { constructor(token) { this.token = token; } // currently implements pre-authorization // TODO: support preAuth = false where it hooks on 401 prepareRequest(options) { if (!options.headers) { throw Error("The request has no headers"); } options.headers["Authorization"] = `Bearer ${this.token}`; } // This handler cannot handle 401 canHandleAuthentication() { return false; } handleAuthentication() { return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } }; __name(_BearerCredentialHandler, "BearerCredentialHandler"); var BearerCredentialHandler = _BearerCredentialHandler; exports.BearerCredentialHandler = BearerCredentialHandler; var _PersonalAccessTokenCredentialHandler = class _PersonalAccessTokenCredentialHandler { constructor(token) { this.token = token; } // currently implements pre-authorization // TODO: support preAuth = false where it hooks on 401 prepareRequest(options) { if (!options.headers) { throw Error("The request has no headers"); } options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; } // This handler cannot handle 401 canHandleAuthentication() { return false; } handleAuthentication() { return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } }; __name(_PersonalAccessTokenCredentialHandler, "PersonalAccessTokenCredentialHandler"); var PersonalAccessTokenCredentialHandler = _PersonalAccessTokenCredentialHandler; exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; } }); // node_modules/@actions/core/lib/oidc-utils.js var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports) { "use strict"; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.OidcClient = void 0; var http_client_1 = require_lib(); var auth_1 = require_auth(); var core_1 = require_core(); var _OidcClient = class _OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { allowRetries: allowRetry, maxRetries: maxRetry }; return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); } static getRequestToken() { const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; if (!token) { throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); } return token; } static getIDTokenUrl() { const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; if (!runtimeUrl) { throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); } return runtimeUrl; } static getCall(id_token_url) { var _a; return __awaiter2(this, void 0, void 0, function* () { const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error) => { throw new Error(`Failed to get ID Token. Error Code : ${error.statusCode} Error Message: ${error.result.message}`); }); const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; if (!id_token) { throw new Error("Response json body do not have ID Token field"); } return id_token; }); } static getIDToken(audience) { return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { const encodedAudience = encodeURIComponent(audience); id_token_url = `${id_token_url}&audience=${encodedAudience}`; } core_1.debug(`ID token url is ${id_token_url}`); const id_token = yield _OidcClient.getCall(id_token_url); core_1.setSecret(id_token); return id_token; } catch (error) { throw new Error(`Error message: ${error.message}`); } }); } }; __name(_OidcClient, "OidcClient"); var OidcClient = _OidcClient; exports.OidcClient = OidcClient; } }); // node_modules/@actions/core/lib/summary.js var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports) { "use strict"; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; var os_1 = require("os"); var fs_1 = require("fs"); var { access, appendFile, writeFile } = fs_1.promises; exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; var _Summary = class _Summary { constructor() { this._buffer = ""; } /** * Finds the summary file path from the environment, rejects if env var is not found or file does not exist * Also checks r/w permissions. * * @returns step summary file path */ filePath() { return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; if (!pathFromEnv) { throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); } try { yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); } catch (_a) { throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); } this._filePath = pathFromEnv; return this._filePath; }); } /** * Wraps content in an HTML tag, adding any HTML attributes * * @param {string} tag HTML tag to wrap * @param {string | null} content content within the tag * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add * * @returns {string} content wrapped in HTML element */ wrap(tag, content, attrs = {}) { const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); if (!content) { return `<${tag}${htmlAttrs}>`; } return `<${tag}${htmlAttrs}>${content}`; } /** * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. * * @param {SummaryWriteOptions} [options] (optional) options for write operation * * @returns {Promise} summary instance */ write(options) { return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); return this.emptyBuffer(); }); } /** * Clears the summary buffer and wipes the summary file * * @returns {Summary} summary instance */ clear() { return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } /** * Returns the current summary buffer as a string * * @returns {string} string of summary buffer */ stringify() { return this._buffer; } /** * If the summary buffer is empty * * @returns {boolen} true if the buffer is empty */ isEmptyBuffer() { return this._buffer.length === 0; } /** * Resets the summary buffer without writing to summary file * * @returns {Summary} summary instance */ emptyBuffer() { this._buffer = ""; return this; } /** * Adds raw text to the summary buffer * * @param {string} text content to add * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) * * @returns {Summary} summary instance */ addRaw(text, addEOL = false) { this._buffer += text; return addEOL ? this.addEOL() : this; } /** * Adds the operating system-specific end-of-line marker to the buffer * * @returns {Summary} summary instance */ addEOL() { return this.addRaw(os_1.EOL); } /** * Adds an HTML codeblock to the summary buffer * * @param {string} code content to render within fenced code block * @param {string} lang (optional) language to syntax highlight code * * @returns {Summary} summary instance */ addCodeBlock(code, lang) { const attrs = Object.assign({}, lang && { lang }); const element = this.wrap("pre", this.wrap("code", code), attrs); return this.addRaw(element).addEOL(); } /** * Adds an HTML list to the summary buffer * * @param {string[]} items list of items to render * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) * * @returns {Summary} summary instance */ addList(items, ordered = false) { const tag = ordered ? "ol" : "ul"; const listItems = items.map((item) => this.wrap("li", item)).join(""); const element = this.wrap(tag, listItems); return this.addRaw(element).addEOL(); } /** * Adds an HTML table to the summary buffer * * @param {SummaryTableCell[]} rows table rows * * @returns {Summary} summary instance */ addTable(rows) { const tableBody = rows.map((row) => { const cells = row.map((cell) => { if (typeof cell === "string") { return this.wrap("td", cell); } const { header, data, colspan, rowspan } = cell; const tag = header ? "th" : "td"; const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); return this.wrap(tag, data, attrs); }).join(""); return this.wrap("tr", cells); }).join(""); const element = this.wrap("table", tableBody); return this.addRaw(element).addEOL(); } /** * Adds a collapsable HTML details element to the summary buffer * * @param {string} label text for the closed state * @param {string} content collapsable content * * @returns {Summary} summary instance */ addDetails(label, content) { const element = this.wrap("details", this.wrap("summary", label) + content); return this.addRaw(element).addEOL(); } /** * Adds an HTML image tag to the summary buffer * * @param {string} src path to the image you to embed * @param {string} alt text description of the image * @param {SummaryImageOptions} options (optional) addition image attributes * * @returns {Summary} summary instance */ addImage(src, alt, options) { const { width, height } = options || {}; const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); return this.addRaw(element).addEOL(); } /** * Adds an HTML section heading element * * @param {string} text heading text * @param {number | string} [level=1] (optional) the heading level, default: 1 * * @returns {Summary} summary instance */ addHeading(text, level) { const tag = `h${level}`; const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; const element = this.wrap(allowedTag, text); return this.addRaw(element).addEOL(); } /** * Adds an HTML thematic break (
) to the summary buffer * * @returns {Summary} summary instance */ addSeparator() { const element = this.wrap("hr", null); return this.addRaw(element).addEOL(); } /** * Adds an HTML line break (
) to the summary buffer * * @returns {Summary} summary instance */ addBreak() { const element = this.wrap("br", null); return this.addRaw(element).addEOL(); } /** * Adds an HTML blockquote to the summary buffer * * @param {string} text quote text * @param {string} cite (optional) citation url * * @returns {Summary} summary instance */ addQuote(text, cite) { const attrs = Object.assign({}, cite && { cite }); const element = this.wrap("blockquote", text, attrs); return this.addRaw(element).addEOL(); } /** * Adds an HTML anchor tag to the summary buffer * * @param {string} text link text/content * @param {string} href hyperlink * * @returns {Summary} summary instance */ addLink(text, href) { const element = this.wrap("a", text, { href }); return this.addRaw(element).addEOL(); } }; __name(_Summary, "Summary"); var Summary = _Summary; var _summary = new Summary(); exports.markdownSummary = _summary; exports.summary = _summary; } }); // node_modules/@actions/core/lib/path-utils.js var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; var path2 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } __name(toPosixPath, "toPosixPath"); exports.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } __name(toWin32Path, "toWin32Path"); exports.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path2.sep); } __name(toPlatformPath, "toPlatformPath"); exports.toPlatformPath = toPlatformPath; } }); // node_modules/@actions/core/lib/core.js var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os2 = __importStar2(require("os")); var path2 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode = exports.ExitCode || (exports.ExitCode = {})); function exportVariable(name, val) { const convertedVal = utils_1.toCommandValue(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val)); } command_1.issueCommand("set-env", { name }, convertedVal); } __name(exportVariable, "exportVariable"); exports.exportVariable = exportVariable; function setSecret(secret) { command_1.issueCommand("add-mask", {}, secret); } __name(setSecret, "setSecret"); exports.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { file_command_1.issueFileCommand("PATH", inputPath); } else { command_1.issueCommand("add-path", {}, inputPath); } process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; } __name(addPath, "addPath"); exports.addPath = addPath; function getInput(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { return val; } return val.trim(); } __name(getInput, "getInput"); exports.getInput = getInput; function getMultilineInput(name, options) { const inputs = getInput(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { return inputs; } return inputs.map((input) => input.trim()); } __name(getMultilineInput, "getMultilineInput"); exports.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; const val = getInput(name, options); if (trueValue.includes(val)) return true; if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } __name(getBooleanInput, "getBooleanInput"); exports.getBooleanInput = getBooleanInput; function setOutput(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); } process.stdout.write(os2.EOL); command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); } __name(setOutput, "setOutput"); exports.setOutput = setOutput; function setCommandEcho(enabled) { command_1.issue("echo", enabled ? "on" : "off"); } __name(setCommandEcho, "setCommandEcho"); exports.setCommandEcho = setCommandEcho; function setFailed(message) { process.exitCode = ExitCode.Failure; error(message); } __name(setFailed, "setFailed"); exports.setFailed = setFailed; function isDebug() { return process.env["RUNNER_DEBUG"] === "1"; } __name(isDebug, "isDebug"); exports.isDebug = isDebug; function debug(message) { command_1.issueCommand("debug", {}, message); } __name(debug, "debug"); exports.debug = debug; function error(message, properties = {}) { command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } __name(error, "error"); exports.error = error; function warning(message, properties = {}) { command_1.issueCommand("warning", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } __name(warning, "warning"); exports.warning = warning; function notice(message, properties = {}) { command_1.issueCommand("notice", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } __name(notice, "notice"); exports.notice = notice; function info(message) { process.stdout.write(message + os2.EOL); } __name(info, "info"); exports.info = info; function startGroup(name) { command_1.issue("group", name); } __name(startGroup, "startGroup"); exports.startGroup = startGroup; function endGroup() { command_1.issue("endgroup"); } __name(endGroup, "endGroup"); exports.endGroup = endGroup; function group(name, fn) { return __awaiter2(this, void 0, void 0, function* () { startGroup(name); let result; try { result = yield fn(); } finally { endGroup(); } return result; }); } __name(group, "group"); exports.group = group; function saveState(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { return file_command_1.issueFileCommand("STATE", file_command_1.prepareKeyValueMessage(name, value)); } command_1.issueCommand("save-state", { name }, utils_1.toCommandValue(value)); } __name(saveState, "saveState"); exports.saveState = saveState; function getState(name) { return process.env[`STATE_${name}`] || ""; } __name(getState, "getState"); exports.getState = getState; function getIDToken(aud) { return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } __name(getIDToken, "getIDToken"); exports.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports, "summary", { enumerable: true, get: function() { return summary_1.summary; } }); var summary_2 = require_summary(); Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function() { return summary_2.markdownSummary; } }); var path_utils_1 = require_path_utils(); Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function() { return path_utils_1.toPosixPath; } }); Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function() { return path_utils_1.toWin32Path; } }); Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); } }); // node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ "node_modules/@actions/io/lib/io-util.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var _a; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; var fs = __importStar2(require("fs")); var path2 = __importStar2(require("path")); _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; exports.IS_WINDOWS = process.platform === "win32"; exports.UV_FS_O_EXLOCK = 268435456; exports.READONLY = fs.constants.O_RDONLY; function exists(fsPath) { return __awaiter2(this, void 0, void 0, function* () { try { yield exports.stat(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; } throw err; } return true; }); } __name(exists, "exists"); exports.exists = exists; function isDirectory(fsPath, useStat = false) { return __awaiter2(this, void 0, void 0, function* () { const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); return stats.isDirectory(); }); } __name(isDirectory, "isDirectory"); exports.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { throw new Error('isRooted() parameter "p" cannot be empty'); } if (exports.IS_WINDOWS) { return p.startsWith("\\") || /^[A-Z]:/i.test(p); } return p.startsWith("/"); } __name(isRooted, "isRooted"); exports.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { stats = yield exports.stat(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); } } if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { const upperExt = path2.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } } else { if (isUnixExecutable(stats)) { return filePath; } } } const originalFilePath = filePath; for (const extension of extensions) { filePath = originalFilePath + extension; stats = void 0; try { stats = yield exports.stat(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); } } if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { try { const directory = path2.dirname(filePath); const upperName = path2.basename(filePath).toUpperCase(); for (const actualName of yield exports.readdir(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path2.join(directory, actualName); break; } } } catch (err) { console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); } return filePath; } else { if (isUnixExecutable(stats)) { return filePath; } } } } return ""; }); } __name(tryGetExecutablePath, "tryGetExecutablePath"); exports.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports.IS_WINDOWS) { p = p.replace(/\//g, "\\"); return p.replace(/\\\\+/g, "\\"); } return p.replace(/\/\/+/g, "/"); } __name(normalizeSeparators, "normalizeSeparators"); function isUnixExecutable(stats) { return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); } __name(isUnixExecutable, "isUnixExecutable"); function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } __name(getCmdPath, "getCmdPath"); exports.getCmdPath = getCmdPath; } }); // node_modules/@actions/io/lib/io.js var require_io = __commonJS({ "node_modules/@actions/io/lib/io.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; var assert_1 = require("assert"); var path2 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util()); function cp(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { return; } const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } const sourceStat = yield ioUtil.stat(source); if (sourceStat.isDirectory()) { if (!recursive) { throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); } else { yield cpDirRecursive(source, newDest, 0, force); } } else { if (path2.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); } }); } __name(cp, "cp"); exports.cp = cp; function mv(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { dest = path2.join(dest, path2.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { if (options.force == null || options.force) { yield rmRF(dest); } else { throw new Error("Destination already exists"); } } } yield mkdirP(path2.dirname(dest)); yield ioUtil.rename(source, dest); }); } __name(mv, "mv"); exports.mv = mv; function rmRF(inputPath) { return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } } try { yield ioUtil.rm(inputPath, { force: true, maxRetries: 3, recursive: true, retryDelay: 300 }); } catch (err) { throw new Error(`File was unable to be removed ${err}`); } }); } __name(rmRF, "rmRF"); exports.rmRF = rmRF; function mkdirP(fsPath) { return __awaiter2(this, void 0, void 0, function* () { assert_1.ok(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } __name(mkdirP, "mkdirP"); exports.mkdirP = mkdirP; function which(tool, check) { return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } if (check) { const result = yield which(tool, false); if (!result) { if (ioUtil.IS_WINDOWS) { throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } return result; } const matches = yield findInPath(tool); if (matches && matches.length > 0) { return matches[0]; } return ""; }); } __name(which, "which"); exports.which = which; function findInPath(tool) { return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { if (extension) { extensions.push(extension); } } } if (ioUtil.isRooted(tool)) { const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); if (filePath) { return [filePath]; } return []; } if (tool.includes(path2.sep)) { return []; } const directories = []; if (process.env.PATH) { for (const p of process.env.PATH.split(path2.delimiter)) { if (p) { directories.push(p); } } } const matches = []; for (const directory of directories) { const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } } return matches; }); } __name(findInPath, "findInPath"); exports.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); return { force, recursive, copySourceDirectory }; } __name(readCopyOptions, "readCopyOptions"); function cpDirRecursive(sourceDir, destDir, currentDepth, force) { return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; yield mkdirP(destDir); const files = yield ioUtil.readdir(sourceDir); for (const fileName of files) { const srcFile = `${sourceDir}/${fileName}`; const destFile = `${destDir}/${fileName}`; const srcFileStat = yield ioUtil.lstat(srcFile); if (srcFileStat.isDirectory()) { yield cpDirRecursive(srcFile, destFile, currentDepth, force); } else { yield copyFile(srcFile, destFile, force); } } yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); } __name(cpDirRecursive, "cpDirRecursive"); function copyFile(srcFile, destFile, force) { return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); yield ioUtil.unlink(destFile); } catch (e) { if (e.code === "EPERM") { yield ioUtil.chmod(destFile, "0666"); yield ioUtil.unlink(destFile); } } const symlinkFull = yield ioUtil.readlink(srcFile); yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); } else if (!(yield ioUtil.exists(destFile)) || force) { yield ioUtil.copyFile(srcFile, destFile); } }); } __name(copyFile, "copyFile"); } }); // node_modules/@actions/exec/lib/toolrunner.js var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.argStringToArray = exports.ToolRunner = void 0; var os2 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); var path2 = __importStar2(require("path")); var io = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var _ToolRunner = class _ToolRunner extends events.EventEmitter { constructor(toolPath, args, options) { super(); if (!toolPath) { throw new Error("Parameter 'toolPath' cannot be null or empty."); } this.toolPath = toolPath; this.args = args || []; this.options = options || {}; } _debug(message) { if (this.options.listeners && this.options.listeners.debug) { this.options.listeners.debug(message); } } _getCommandString(options, noPrefix) { const toolPath = this._getSpawnFileName(); const args = this._getSpawnArgs(options); let cmd = noPrefix ? "" : "[command]"; if (IS_WINDOWS) { if (this._isCmdFile()) { cmd += toolPath; for (const a of args) { cmd += ` ${a}`; } } else if (options.windowsVerbatimArguments) { cmd += `"${toolPath}"`; for (const a of args) { cmd += ` ${a}`; } } else { cmd += this._windowsQuoteCmdArg(toolPath); for (const a of args) { cmd += ` ${this._windowsQuoteCmdArg(a)}`; } } } else { cmd += toolPath; for (const a of args) { cmd += ` ${a}`; } } return cmd; } _processLineBuffer(data, strBuffer, onLine) { try { let s = strBuffer + data.toString(); let n = s.indexOf(os2.EOL); while (n > -1) { const line = s.substring(0, n); onLine(line); s = s.substring(n + os2.EOL.length); n = s.indexOf(os2.EOL); } return s; } catch (err) { this._debug(`error processing line. Failed with error ${err}`); return ""; } } _getSpawnFileName() { if (IS_WINDOWS) { if (this._isCmdFile()) { return process.env["COMSPEC"] || "cmd.exe"; } } return this.toolPath; } _getSpawnArgs(options) { if (IS_WINDOWS) { if (this._isCmdFile()) { let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; for (const a of this.args) { argline += " "; argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); } argline += '"'; return [argline]; } } return this.args; } _endsWith(str, end) { return str.endsWith(end); } _isCmdFile() { const upperToolPath = this.toolPath.toUpperCase(); return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); } _windowsQuoteCmdArg(arg) { if (!this._isCmdFile()) { return this._uvQuoteCmdArg(arg); } if (!arg) { return '""'; } const cmdSpecialChars = [ " ", " ", "&", "(", ")", "[", "]", "{", "}", "^", "=", ";", "!", "'", "+", ",", "`", "~", "|", "<", ">", '"' ]; let needsQuotes = false; for (const char of arg) { if (cmdSpecialChars.some((x) => x === char)) { needsQuotes = true; break; } } if (!needsQuotes) { return arg; } let reverse = '"'; let quoteHit = true; for (let i = arg.length; i > 0; i--) { reverse += arg[i - 1]; if (quoteHit && arg[i - 1] === "\\") { reverse += "\\"; } else if (arg[i - 1] === '"') { quoteHit = true; reverse += '"'; } else { quoteHit = false; } } reverse += '"'; return reverse.split("").reverse().join(""); } _uvQuoteCmdArg(arg) { if (!arg) { return '""'; } if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { return arg; } if (!arg.includes('"') && !arg.includes("\\")) { return `"${arg}"`; } let reverse = '"'; let quoteHit = true; for (let i = arg.length; i > 0; i--) { reverse += arg[i - 1]; if (quoteHit && arg[i - 1] === "\\") { reverse += "\\"; } else if (arg[i - 1] === '"') { quoteHit = true; reverse += "\\"; } else { quoteHit = false; } } reverse += '"'; return reverse.split("").reverse().join(""); } _cloneExecOptions(options) { options = options || {}; const result = { cwd: options.cwd || process.cwd(), env: options.env || process.env, silent: options.silent || false, windowsVerbatimArguments: options.windowsVerbatimArguments || false, failOnStdErr: options.failOnStdErr || false, ignoreReturnCode: options.ignoreReturnCode || false, delay: options.delay || 1e4 }; result.outStream = options.outStream || process.stdout; result.errStream = options.errStream || process.stderr; return result; } _getSpawnOptions(options, toolPath) { options = options || {}; const result = {}; result.cwd = options.cwd; result.env = options.env; result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); if (options.windowsVerbatimArguments) { result.argv0 = `"${toolPath}"`; } return result; } /** * Exec a tool. * Output will be streamed to the live console. * Returns promise with return code * * @param tool path to tool to exec * @param options optional exec options. See ExecOptions * @returns number */ exec() { return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io.which(this.toolPath, true); return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { this._debug(` ${arg}`); } const optionsNonNull = this._cloneExecOptions(this.options); if (!optionsNonNull.silent && optionsNonNull.outStream) { optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); } const state = new ExecState(optionsNonNull, this.toolPath); state.on("debug", (message) => { this._debug(message); }); if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); } const fileName = this._getSpawnFileName(); const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); let stdbuffer = ""; if (cp.stdout) { cp.stdout.on("data", (data) => { if (this.options.listeners && this.options.listeners.stdout) { this.options.listeners.stdout(data); } if (!optionsNonNull.silent && optionsNonNull.outStream) { optionsNonNull.outStream.write(data); } stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { if (this.options.listeners && this.options.listeners.stdline) { this.options.listeners.stdline(line); } }); }); } let errbuffer = ""; if (cp.stderr) { cp.stderr.on("data", (data) => { state.processStderr = true; if (this.options.listeners && this.options.listeners.stderr) { this.options.listeners.stderr(data); } if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; s.write(data); } errbuffer = this._processLineBuffer(data, errbuffer, (line) => { if (this.options.listeners && this.options.listeners.errline) { this.options.listeners.errline(line); } }); }); } cp.on("error", (err) => { state.processError = err.message; state.processExited = true; state.processClosed = true; state.CheckComplete(); }); cp.on("exit", (code) => { state.processExitCode = code; state.processExited = true; this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); state.CheckComplete(); }); cp.on("close", (code) => { state.processExitCode = code; state.processExited = true; state.processClosed = true; this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); state.CheckComplete(); }); state.on("done", (error, exitCode) => { if (stdbuffer.length > 0) { this.emit("stdline", stdbuffer); } if (errbuffer.length > 0) { this.emit("errline", errbuffer); } cp.removeAllListeners(); if (error) { reject(error); } else { resolve(exitCode); } }); if (this.options.input) { if (!cp.stdin) { throw new Error("child process missing stdin"); } cp.stdin.end(this.options.input); } })); }); } }; __name(_ToolRunner, "ToolRunner"); var ToolRunner = _ToolRunner; exports.ToolRunner = ToolRunner; function argStringToArray(argString) { const args = []; let inQuotes = false; let escaped = false; let arg = ""; function append(c) { if (escaped && c !== '"') { arg += "\\"; } arg += c; escaped = false; } __name(append, "append"); for (let i = 0; i < argString.length; i++) { const c = argString.charAt(i); if (c === '"') { if (!escaped) { inQuotes = !inQuotes; } else { append(c); } continue; } if (c === "\\" && escaped) { append(c); continue; } if (c === "\\" && inQuotes) { escaped = true; continue; } if (c === " " && !inQuotes) { if (arg.length > 0) { args.push(arg); arg = ""; } continue; } append(c); } if (arg.length > 0) { args.push(arg.trim()); } return args; } __name(argStringToArray, "argStringToArray"); exports.argStringToArray = argStringToArray; var _ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); this.processClosed = false; this.processError = ""; this.processExitCode = 0; this.processExited = false; this.processStderr = false; this.delay = 1e4; this.done = false; this.timeout = null; if (!toolPath) { throw new Error("toolPath must not be empty"); } this.options = options; this.toolPath = toolPath; if (options.delay) { this.delay = options.delay; } } CheckComplete() { if (this.done) { return; } if (this.processClosed) { this._setResult(); } else if (this.processExited) { this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { this.emit("debug", message); } _setResult() { let error; if (this.processExited) { if (this.processError) { error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); } else if (this.processStderr && this.options.failOnStdErr) { error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); } } if (this.timeout) { clearTimeout(this.timeout); this.timeout = null; } this.done = true; this.emit("done", error, this.processExitCode); } static HandleTimeout(state) { if (state.done) { return; } if (!state.processClosed && state.processExited) { const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; state._debug(message); } state._setResult(); } }; __name(_ExecState, "ExecState"); var ExecState = _ExecState; } }); // node_modules/@actions/exec/lib/exec.js var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getExecOutput = exports.exec = void 0; var string_decoder_1 = require("string_decoder"); var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); } const toolPath = commandArgs[0]; args = commandArgs.slice(1).concat(args || []); const runner = new tr.ToolRunner(toolPath, args, options); return runner.exec(); }); } __name(exec, "exec"); exports.exec = exec; function getExecOutput(commandLine, args, options) { var _a, _b; return __awaiter2(this, void 0, void 0, function* () { let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; const stdErrListener = /* @__PURE__ */ __name((data) => { stderr += stderrDecoder.write(data); if (originalStdErrListener) { originalStdErrListener(data); } }, "stdErrListener"); const stdOutListener = /* @__PURE__ */ __name((data) => { stdout += stdoutDecoder.write(data); if (originalStdoutListener) { originalStdoutListener(data); } }, "stdOutListener"); const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); stdout += stdoutDecoder.end(); stderr += stderrDecoder.end(); return { exitCode, stdout, stderr }; }); } __name(getExecOutput, "getExecOutput"); exports.getExecOutput = getExecOutput; } }); // node_modules/@actions/glob/lib/internal-glob-options-helper.js var require_internal_glob_options_helper = __commonJS({ "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getOptions = void 0; var core = __importStar2(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, omitBrokenSymbolicLinks: true }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; core.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; } __name(getOptions, "getOptions"); exports.getOptions = getOptions; } }); // node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ "node_modules/@actions/glob/lib/internal-path-helper.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0; var path2 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname(p) { p = safeTrimTrailingSeparator(p); if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } let result = path2.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } return result; } __name(dirname, "dirname"); exports.dirname = dirname; function ensureAbsoluteRoot(root, itemPath) { assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; } else { if (!cwd.endsWith("\\")) { cwd += "\\"; } return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; } } else { return `${itemPath[0]}:\\${itemPath.substr(2)}`; } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path2.sep; } return root + itemPath; } __name(ensureAbsoluteRoot, "ensureAbsoluteRoot"); exports.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); } return itemPath.startsWith("/"); } __name(hasAbsoluteRoot, "hasAbsoluteRoot"); exports.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); } return itemPath.startsWith("/"); } __name(hasRoot, "hasRoot"); exports.hasRoot = hasRoot; function normalizeSeparators(p) { p = p || ""; if (IS_WINDOWS) { p = p.replace(/\//g, "\\"); const isUnc = /^\\\\+[^\\]/.test(p); return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); } return p.replace(/\/\/+/g, "/"); } __name(normalizeSeparators, "normalizeSeparators"); exports.normalizeSeparators = normalizeSeparators; function safeTrimTrailingSeparator(p) { if (!p) { return ""; } p = normalizeSeparators(p); if (!p.endsWith(path2.sep)) { return p; } if (p === path2.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { return p; } return p.substr(0, p.length - 1); } __name(safeTrimTrailingSeparator, "safeTrimTrailingSeparator"); exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; } }); // node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ "node_modules/@actions/glob/lib/internal-match-kind.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MatchKind = void 0; var MatchKind; (function(MatchKind2) { MatchKind2[MatchKind2["None"] = 0] = "None"; MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; })(MatchKind = exports.MatchKind || (exports.MatchKind = {})); } }); // node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.partialMatch = exports.match = exports.getSearchPaths = void 0; var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { patterns = patterns.filter((x) => !x.negate); const searchPathMap = {}; for (const pattern of patterns) { const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; searchPathMap[key] = "candidate"; } const result = []; for (const pattern of patterns) { const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; if (searchPathMap[key] === "included") { continue; } let foundAncestor = false; let tempKey = key; let parent = pathHelper.dirname(tempKey); while (parent !== tempKey) { if (searchPathMap[parent]) { foundAncestor = true; break; } tempKey = parent; parent = pathHelper.dirname(tempKey); } if (!foundAncestor) { result.push(pattern.searchPath); searchPathMap[key] = "included"; } } return result; } __name(getSearchPaths, "getSearchPaths"); exports.getSearchPaths = getSearchPaths; function match(patterns, itemPath) { let result = internal_match_kind_1.MatchKind.None; for (const pattern of patterns) { if (pattern.negate) { result &= ~pattern.match(itemPath); } else { result |= pattern.match(itemPath); } } return result; } __name(match, "match"); exports.match = match; function partialMatch(patterns, itemPath) { return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); } __name(partialMatch, "partialMatch"); exports.partialMatch = partialMatch; } }); // node_modules/concat-map/index.js var require_concat_map = __commonJS({ "node_modules/concat-map/index.js"(exports, module2) { module2.exports = function(xs, fn) { var res = []; for (var i = 0; i < xs.length; i++) { var x = fn(xs[i], i); if (isArray(x)) res.push.apply(res, x); else res.push(x); } return res; }; var isArray = Array.isArray || function(xs) { return Object.prototype.toString.call(xs) === "[object Array]"; }; } }); // node_modules/balanced-match/index.js var require_balanced_match = __commonJS({ "node_modules/balanced-match/index.js"(exports, module2) { "use strict"; module2.exports = balanced; function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); if (b instanceof RegExp) b = maybeMatch(b, str); var r = range(a, b, str); return r && { start: r[0], end: r[1], pre: str.slice(0, r[0]), body: str.slice(r[0] + a.length, r[1]), post: str.slice(r[1] + b.length) }; } __name(balanced, "balanced"); function maybeMatch(reg, str) { var m = str.match(reg); return m ? m[0] : null; } __name(maybeMatch, "maybeMatch"); balanced.range = range; function range(a, b, str) { var begs, beg, left, right, result; var ai = str.indexOf(a); var bi = str.indexOf(b, ai + 1); var i = ai; if (ai >= 0 && bi > 0) { if (a === b) { return [ai, bi]; } begs = []; left = str.length; while (i >= 0 && !result) { if (i == ai) { begs.push(i); ai = str.indexOf(a, i + 1); } else if (begs.length == 1) { result = [begs.pop(), bi]; } else { beg = begs.pop(); if (beg < left) { left = beg; right = bi; } bi = str.indexOf(b, i + 1); } i = ai < bi && ai >= 0 ? ai : bi; } if (begs.length) { result = [left, right]; } } return result; } __name(range, "range"); } }); // node_modules/brace-expansion/index.js var require_brace_expansion = __commonJS({ "node_modules/brace-expansion/index.js"(exports, module2) { var concatMap = require_concat_map(); var balanced = require_balanced_match(); module2.exports = expandTop; var escSlash = "\0SLASH" + Math.random() + "\0"; var escOpen = "\0OPEN" + Math.random() + "\0"; var escClose = "\0CLOSE" + Math.random() + "\0"; var escComma = "\0COMMA" + Math.random() + "\0"; var escPeriod = "\0PERIOD" + Math.random() + "\0"; function numeric(str) { return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); } __name(numeric, "numeric"); function escapeBraces(str) { return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); } __name(escapeBraces, "escapeBraces"); function unescapeBraces(str) { return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); } __name(unescapeBraces, "unescapeBraces"); function parseCommaParts(str) { if (!str) return [""]; var parts = []; var m = balanced("{", "}", str); if (!m) return str.split(","); var pre = m.pre; var body = m.body; var post = m.post; var p = pre.split(","); p[p.length - 1] += "{" + body + "}"; var postParts = parseCommaParts(post); if (post.length) { p[p.length - 1] += postParts.shift(); p.push.apply(p, postParts); } parts.push.apply(parts, p); return parts; } __name(parseCommaParts, "parseCommaParts"); function expandTop(str) { if (!str) return []; if (str.substr(0, 2) === "{}") { str = "\\{\\}" + str.substr(2); } return expand(escapeBraces(str), true).map(unescapeBraces); } __name(expandTop, "expandTop"); function embrace(str) { return "{" + str + "}"; } __name(embrace, "embrace"); function isPadded(el) { return /^-?0\d/.test(el); } __name(isPadded, "isPadded"); function lte(i, y) { return i <= y; } __name(lte, "lte"); function gte(i, y) { return i >= y; } __name(gte, "gte"); function expand(str, isTop) { var expansions = []; var m = balanced("{", "}", str); if (!m || /\$$/.test(m.pre)) return [str]; var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { if (m.post.match(/,.*\}/)) { str = m.pre + "{" + m.body + escClose + m.post; return expand(str); } return [str]; } var n; if (isSequence) { n = m.body.split(/\.\./); } else { n = parseCommaParts(m.body); if (n.length === 1) { n = expand(n[0], false).map(embrace); if (n.length === 1) { var post = m.post.length ? expand(m.post, false) : [""]; return post.map(function(p) { return m.pre + n[0] + p; }); } } } var pre = m.pre; var post = m.post.length ? expand(m.post, false) : [""]; var N; if (isSequence) { var x = numeric(n[0]); var y = numeric(n[1]); var width = Math.max(n[0].length, n[1].length); var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; var test = lte; var reverse = y < x; if (reverse) { incr *= -1; test = gte; } var pad = n.some(isPadded); N = []; for (var i = x; test(i, y); i += incr) { var c; if (isAlphaSequence) { c = String.fromCharCode(i); if (c === "\\") c = ""; } else { c = String(i); if (pad) { var need = width - c.length; if (need > 0) { var z = new Array(need + 1).join("0"); if (i < 0) c = "-" + z + c.slice(1); else c = z + c; } } } N.push(c); } } else { N = concatMap(n, function(el) { return expand(el, false); }); } for (var j = 0; j < N.length; j++) { for (var k = 0; k < post.length; k++) { var expansion = pre + N[j] + post[k]; if (!isTop || isSequence || expansion) expansions.push(expansion); } } return expansions; } __name(expand, "expand"); } }); // node_modules/minimatch/minimatch.js var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; var path2 = function() { try { return require("path"); } catch (e) { } }() || { sep: "/" }; minimatch.sep = path2.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, "?": { open: "(?:", close: ")?" }, "+": { open: "(?:", close: ")+" }, "*": { open: "(?:", close: ")*" }, "@": { open: "(?:", close: ")" } }; var qmark = "[^/]"; var star = qmark + "*?"; var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; var reSpecials = charSet("().*{}+?[]^$\\!"); function charSet(s) { return s.split("").reduce(function(set, c) { set[c] = true; return set; }, {}); } __name(charSet, "charSet"); var slashSplit = /\/+/; minimatch.filter = filter; function filter(pattern, options) { options = options || {}; return function(p, i, list) { return minimatch(p, pattern, options); }; } __name(filter, "filter"); function ext(a, b) { b = b || {}; var t = {}; Object.keys(a).forEach(function(k) { t[k] = a[k]; }); Object.keys(b).forEach(function(k) { t[k] = b[k]; }); return t; } __name(ext, "ext"); minimatch.defaults = function(def) { if (!def || typeof def !== "object" || !Object.keys(def).length) { return minimatch; } var orig = minimatch; var m = /* @__PURE__ */ __name(function minimatch2(p, pattern, options) { return orig(p, pattern, ext(def, options)); }, "minimatch"); m.Minimatch = /* @__PURE__ */ __name(function Minimatch2(pattern, options) { return new orig.Minimatch(pattern, ext(def, options)); }, "Minimatch"); m.Minimatch.defaults = /* @__PURE__ */ __name(function defaults(options) { return orig.defaults(ext(def, options)).Minimatch; }, "defaults"); m.filter = /* @__PURE__ */ __name(function filter2(pattern, options) { return orig.filter(pattern, ext(def, options)); }, "filter"); m.defaults = /* @__PURE__ */ __name(function defaults(options) { return orig.defaults(ext(def, options)); }, "defaults"); m.makeRe = /* @__PURE__ */ __name(function makeRe2(pattern, options) { return orig.makeRe(pattern, ext(def, options)); }, "makeRe"); m.braceExpand = /* @__PURE__ */ __name(function braceExpand2(pattern, options) { return orig.braceExpand(pattern, ext(def, options)); }, "braceExpand"); m.match = function(list, pattern, options) { return orig.match(list, pattern, ext(def, options)); }; return m; }; Minimatch.defaults = function(def) { return minimatch.defaults(def).Minimatch; }; function minimatch(p, pattern, options) { assertValidPattern(pattern); if (!options) options = {}; if (!options.nocomment && pattern.charAt(0) === "#") { return false; } return new Minimatch(pattern, options).match(p); } __name(minimatch, "minimatch"); function Minimatch(pattern, options) { if (!(this instanceof Minimatch)) { return new Minimatch(pattern, options); } assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); if (!options.allowWindowsEscape && path2.sep !== "/") { pattern = pattern.split(path2.sep).join("/"); } this.options = options; this.set = []; this.pattern = pattern; this.regexp = null; this.negate = false; this.comment = false; this.empty = false; this.partial = !!options.partial; this.make(); } __name(Minimatch, "Minimatch"); Minimatch.prototype.debug = function() { }; Minimatch.prototype.make = make; function make() { var pattern = this.pattern; var options = this.options; if (!options.nocomment && pattern.charAt(0) === "#") { this.comment = true; return; } if (!pattern) { this.empty = true; return; } this.parseNegate(); var set = this.globSet = this.braceExpand(); if (options.debug) this.debug = /* @__PURE__ */ __name(function debug() { console.error.apply(console, arguments); }, "debug"); this.debug(this.pattern, set); set = this.globParts = set.map(function(s) { return s.split(slashSplit); }); this.debug(this.pattern, set); set = set.map(function(s, si, set2) { return s.map(this.parse, this); }, this); this.debug(this.pattern, set); set = set.filter(function(s) { return s.indexOf(false) === -1; }); this.debug(this.pattern, set); this.set = set; } __name(make, "make"); Minimatch.prototype.parseNegate = parseNegate; function parseNegate() { var pattern = this.pattern; var negate = false; var options = this.options; var negateOffset = 0; if (options.nonegate) return; for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { negate = !negate; negateOffset++; } if (negateOffset) this.pattern = pattern.substr(negateOffset); this.negate = negate; } __name(parseNegate, "parseNegate"); minimatch.braceExpand = function(pattern, options) { return braceExpand(pattern, options); }; Minimatch.prototype.braceExpand = braceExpand; function braceExpand(pattern, options) { if (!options) { if (this instanceof Minimatch) { options = this.options; } else { options = {}; } } pattern = typeof pattern === "undefined" ? this.pattern : pattern; assertValidPattern(pattern); if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { return [pattern]; } return expand(pattern); } __name(braceExpand, "braceExpand"); var MAX_PATTERN_LENGTH = 1024 * 64; var assertValidPattern = /* @__PURE__ */ __name(function(pattern) { if (typeof pattern !== "string") { throw new TypeError("invalid pattern"); } if (pattern.length > MAX_PATTERN_LENGTH) { throw new TypeError("pattern is too long"); } }, "assertValidPattern"); Minimatch.prototype.parse = parse3; var SUBPARSE = {}; function parse3(pattern, isSub) { assertValidPattern(pattern); var options = this.options; if (pattern === "**") { if (!options.noglobstar) return GLOBSTAR; else pattern = "*"; } if (pattern === "") return ""; var re = ""; var hasMagic = !!options.nocase; var escaping = false; var patternListStack = []; var negativeLists = []; var stateChar; var inClass = false; var reClassStart = -1; var classStart = -1; var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; var self = this; function clearStateChar() { if (stateChar) { switch (stateChar) { case "*": re += star; hasMagic = true; break; case "?": re += qmark; hasMagic = true; break; default: re += "\\" + stateChar; break; } self.debug("clearStateChar %j %j", stateChar, re); stateChar = false; } } __name(clearStateChar, "clearStateChar"); for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { this.debug("%s %s %s %j", pattern, i, re, c); if (escaping && reSpecials[c]) { re += "\\" + c; escaping = false; continue; } switch (c) { case "/": { return false; } case "\\": clearStateChar(); escaping = true; continue; case "?": case "*": case "+": case "@": case "!": this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); if (inClass) { this.debug(" in class"); if (c === "!" && i === classStart + 1) c = "^"; re += c; continue; } self.debug("call clearStateChar %j", stateChar); clearStateChar(); stateChar = c; if (options.noext) clearStateChar(); continue; case "(": if (inClass) { re += "("; continue; } if (!stateChar) { re += "\\("; continue; } patternListStack.push({ type: stateChar, start: i - 1, reStart: re.length, open: plTypes[stateChar].open, close: plTypes[stateChar].close }); re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; this.debug("plType %j %j", stateChar, re); stateChar = false; continue; case ")": if (inClass || !patternListStack.length) { re += "\\)"; continue; } clearStateChar(); hasMagic = true; var pl = patternListStack.pop(); re += pl.close; if (pl.type === "!") { negativeLists.push(pl); } pl.reEnd = re.length; continue; case "|": if (inClass || !patternListStack.length || escaping) { re += "\\|"; escaping = false; continue; } clearStateChar(); re += "|"; continue; case "[": clearStateChar(); if (inClass) { re += "\\" + c; continue; } inClass = true; classStart = i; reClassStart = re.length; re += c; continue; case "]": if (i === classStart + 1 || !inClass) { re += "\\" + c; escaping = false; continue; } var cs = pattern.substring(classStart + 1, i); try { RegExp("[" + cs + "]"); } catch (er) { var sp = this.parse(cs, SUBPARSE); re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; hasMagic = hasMagic || sp[1]; inClass = false; continue; } hasMagic = true; inClass = false; re += c; continue; default: clearStateChar(); if (escaping) { escaping = false; } else if (reSpecials[c] && !(c === "^" && inClass)) { re += "\\"; } re += c; } } if (inClass) { cs = pattern.substr(classStart + 1); sp = this.parse(cs, SUBPARSE); re = re.substr(0, reClassStart) + "\\[" + sp[0]; hasMagic = hasMagic || sp[1]; } for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + pl.open.length); this.debug("setting tail", re, pl); tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { if (!$2) { $2 = "\\"; } return $1 + $1 + $2 + "|"; }); this.debug("tail=%j\n %s", tail, tail, pl, re); var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; hasMagic = true; re = re.slice(0, pl.reStart) + t + "\\(" + tail; } clearStateChar(); if (escaping) { re += "\\\\"; } var addPatternStart = false; switch (re.charAt(0)) { case "[": case ".": case "(": addPatternStart = true; } for (var n = negativeLists.length - 1; n > -1; n--) { var nl = negativeLists[n]; var nlBefore = re.slice(0, nl.reStart); var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); var nlAfter = re.slice(nl.reEnd); nlLast += nlAfter; var openParensBefore = nlBefore.split("(").length - 1; var cleanAfter = nlAfter; for (i = 0; i < openParensBefore; i++) { cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); } nlAfter = cleanAfter; var dollar = ""; if (nlAfter === "" && isSub !== SUBPARSE) { dollar = "$"; } var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; re = newRe; } if (re !== "" && hasMagic) { re = "(?=.)" + re; } if (addPatternStart) { re = patternStart + re; } if (isSub === SUBPARSE) { return [re, hasMagic]; } if (!hasMagic) { return globUnescape(pattern); } var flags = options.nocase ? "i" : ""; try { var regExp = new RegExp("^" + re + "$", flags); } catch (er) { return new RegExp("$."); } regExp._glob = pattern; regExp._src = re; return regExp; } __name(parse3, "parse"); minimatch.makeRe = function(pattern, options) { return new Minimatch(pattern, options || {}).makeRe(); }; Minimatch.prototype.makeRe = makeRe; function makeRe() { if (this.regexp || this.regexp === false) return this.regexp; var set = this.set; if (!set.length) { this.regexp = false; return this.regexp; } var options = this.options; var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; var flags = options.nocase ? "i" : ""; var re = set.map(function(pattern) { return pattern.map(function(p) { return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; }).join("\\/"); }).join("|"); re = "^(?:" + re + ")$"; if (this.negate) re = "^(?!" + re + ").*$"; try { this.regexp = new RegExp(re, flags); } catch (ex) { this.regexp = false; } return this.regexp; } __name(makeRe, "makeRe"); minimatch.match = function(list, pattern, options) { options = options || {}; var mm = new Minimatch(pattern, options); list = list.filter(function(f) { return mm.match(f); }); if (mm.options.nonull && !list.length) { list.push(pattern); } return list; }; Minimatch.prototype.match = /* @__PURE__ */ __name(function match(f, partial) { if (typeof partial === "undefined") partial = this.partial; this.debug("match", f, this.pattern); if (this.comment) return false; if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; if (path2.sep !== "/") { f = f.split(path2.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); var set = this.set; this.debug(this.pattern, "set", set); var filename; var i; for (i = f.length - 1; i >= 0; i--) { filename = f[i]; if (filename) break; } for (i = 0; i < set.length; i++) { var pattern = set[i]; var file = f; if (options.matchBase && pattern.length === 1) { file = [filename]; } var hit = this.matchOne(file, pattern, partial); if (hit) { if (options.flipNegate) return true; return !this.negate; } } if (options.flipNegate) return false; return this.negate; }, "match"); Minimatch.prototype.matchOne = function(file, pattern, partial) { var options = this.options; this.debug( "matchOne", { "this": this, file, pattern } ); this.debug("matchOne", file.length, pattern.length); for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { this.debug("matchOne loop"); var p = pattern[pi]; var f = file[fi]; this.debug(pattern, p, f); if (p === false) return false; if (p === GLOBSTAR) { this.debug("GLOBSTAR", [pattern, p, f]); var fr = fi; var pr = pi + 1; if (pr === pl) { this.debug("** at the end"); for (; fi < fl; fi++) { if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; } return true; } while (fr < fl) { var swallowee = file[fr]; this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { this.debug("globstar found match!", fr, fl, swallowee); return true; } else { if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { this.debug("dot detected!", file, fr, pattern, pr); break; } this.debug("globstar swallow a segment, and continue"); fr++; } } if (partial) { this.debug("\n>>> no match, partial?", file, fr, pattern, pr); if (fr === fl) return true; } return false; } var hit; if (typeof p === "string") { hit = f === p; this.debug("string match", p, f, hit); } else { hit = f.match(p); this.debug("pattern match", p, f, hit); } if (!hit) return false; } if (fi === fl && pi === pl) { return true; } else if (fi === fl) { return partial; } else if (pi === pl) { return fi === fl - 1 && file[fi] === ""; } throw new Error("wtf?"); }; function globUnescape(s) { return s.replace(/\\(.)/g, "$1"); } __name(globUnescape, "globUnescape"); function regExpEscape(s) { return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } __name(regExpEscape, "regExpEscape"); } }); // node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/glob/lib/internal-path.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Path = void 0; var path2 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var _Path = class _Path { /** * Constructs a Path * @param itemPath Path or array of segments */ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path2.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { const basename = path2.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); } this.segments.unshift(remaining); } } else { assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { assert_1.default(!segment.includes(path2.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } } } /** * Converts the path to it's string representation */ toString() { let result = this.segments[0]; let skipSlash = result.endsWith(path2.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { result += path2.sep; } result += this.segments[i]; } return result; } }; __name(_Path, "Path"); var Path = _Path; exports.Path = Path; } }); // node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ "node_modules/@actions/glob/lib/internal-pattern.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Pattern = void 0; var os2 = __importStar2(require("os")); var path2 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); var IS_WINDOWS = process.platform === "win32"; var _Pattern = class _Pattern { constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { this.negate = false; let pattern; if (typeof patternOrNegate === "string") { pattern = patternOrNegate.trim(); } else { segments = segments || []; assert_1.default(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; } } while (pattern.startsWith("!")) { this.negate = !this.negate; pattern = pattern.substr(1).trim(); } pattern = _Pattern.fixupPattern(pattern, homedir); this.segments = new internal_path_1.Path(pattern).segments; this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path2.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); this.searchPath = new internal_path_1.Path(searchSegments).toString(); this.rootRegExp = new RegExp(_Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? "i" : ""); this.isImplicitPattern = isImplicitPattern; const minimatchOptions = { dot: true, nobrace: true, nocase: IS_WINDOWS, nocomment: true, noext: true, nonegate: true }; pattern = IS_WINDOWS ? pattern.replace(/\\/g, "/") : pattern; this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); } /** * Matches the pattern against the specified path */ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); if (!itemPath.endsWith(path2.sep) && this.isImplicitPattern === false) { itemPath = `${itemPath}${path2.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); } if (this.minimatch.match(itemPath)) { return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; } return internal_match_kind_1.MatchKind.None; } /** * Indicates whether the pattern may match descendants of the specified path */ partialMatch(itemPath) { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (pathHelper.dirname(itemPath) === itemPath) { return this.rootRegExp.test(itemPath); } return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); } /** * Escapes glob patterns within a path */ static globEscape(s) { return (IS_WINDOWS ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); } /** * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { assert_1.default(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path2.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path2.sep}`)) { homedir = homedir || os2.homedir(); assert_1.default(homedir, "Unable to determine HOME directory"); assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); if (pattern.length > 2 && !root.endsWith("\\")) { root += "\\"; } pattern = _Pattern.globEscape(root) + pattern.substr(2); } else if (IS_WINDOWS && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); if (!root.endsWith("\\")) { root += "\\"; } pattern = _Pattern.globEscape(root) + pattern.substr(1); } else { pattern = pathHelper.ensureAbsoluteRoot(_Pattern.globEscape(process.cwd()), pattern); } return pathHelper.normalizeSeparators(pattern); } /** * Attempts to unescape a pattern segment to create a literal path segment. * Otherwise returns empty string. */ static getLiteral(segment) { let literal = ""; for (let i = 0; i < segment.length; i++) { const c = segment[i]; if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { literal += segment[++i]; continue; } else if (c === "*" || c === "?") { return ""; } else if (c === "[" && i + 1 < segment.length) { let set = ""; let closed = -1; for (let i2 = i + 1; i2 < segment.length; i2++) { const c2 = segment[i2]; if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { set += segment[++i2]; continue; } else if (c2 === "]") { closed = i2; break; } else { set += c2; } } if (closed >= 0) { if (set.length > 1) { return ""; } if (set) { literal += set; i = closed; continue; } } } literal += c; } return literal; } /** * Escapes regexp special characters * https://javascript.info/regexp-escaping */ static regExpEscape(s) { return s.replace(/[[\\^$.|?*+()]/g, "\\$&"); } }; __name(_Pattern, "Pattern"); var Pattern = _Pattern; exports.Pattern = Pattern; } }); // node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ "node_modules/@actions/glob/lib/internal-search-state.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SearchState = void 0; var _SearchState = class _SearchState { constructor(path2, level) { this.path = path2; this.level = level; } }; __name(_SearchState, "SearchState"); var SearchState = _SearchState; exports.SearchState = SearchState; } }); // node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ "node_modules/@actions/glob/lib/internal-globber.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __asyncValues2 = exports && exports.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { i[n] = o[n] && function(v) { return new Promise(function(resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } __name(verb, "verb"); function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v2) { resolve({ value: v2, done: d }); }, reject); } __name(settle, "settle"); }; var __await2 = exports && exports.__await || function(v) { return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; var __asyncGenerator2 = exports && exports.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i; function verb(n) { if (g[n]) i[n] = function(v) { return new Promise(function(a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } __name(verb, "verb"); function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } __name(resume, "resume"); function step(r) { r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } __name(step, "step"); function fulfill(value) { resume("next", value); } __name(fulfill, "fulfill"); function reject(value) { resume("throw", value); } __name(reject, "reject"); function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } __name(settle, "settle"); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.DefaultGlobber = void 0; var core = __importStar2(require_core()); var fs = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); var path2 = __importStar2(require("path")); var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); var IS_WINDOWS = process.platform === "win32"; var _DefaultGlobber = class _DefaultGlobber { constructor(options) { this.patterns = []; this.searchPaths = []; this.options = globOptionsHelper.getOptions(options); } getSearchPaths() { return this.searchPaths.slice(); } glob() { var e_1, _a; return __awaiter2(this, void 0, void 0, function* () { const result = []; try { for (var _b = __asyncValues2(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { const itemPath = _c.value; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); } finally { if (e_1) throw e_1.error; } } return result; }); } globGenerator() { return __asyncGenerator2(this, arguments, /* @__PURE__ */ __name(function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { patterns.push(pattern); if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); } } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { core.debug(`Search path '${searchPath}'`); try { yield __await2(fs.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; } throw err; } stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); } const traversalChain = []; while (stack.length) { const item = stack.pop(); const match = patternHelper.match(patterns, item.path); const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); if (!match && !partialMatch) { continue; } const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } if (stats.isDirectory()) { if (match & internal_match_kind_1.MatchKind.Directory) { yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; const childItems = (yield __await2(fs.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); } } }, "globGenerator_1")); } /** * Constructs a DefaultGlobber */ static create(patterns, options) { return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); patterns = patterns.replace(/\r/g, "\n"); } const lines = patterns.split("\n").map((x) => x.trim()); for (const line of lines) { if (!line || line.startsWith("#")) { continue; } else { result.patterns.push(new internal_pattern_1.Pattern(line)); } } result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; }); } static stat(item, options, traversalChain) { return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { stats = yield fs.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { core.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); } throw err; } } else { stats = yield fs.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { const realPath = yield fs.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); } return stats; }); } }; __name(_DefaultGlobber, "DefaultGlobber"); var DefaultGlobber = _DefaultGlobber; exports.DefaultGlobber = DefaultGlobber; } }); // node_modules/@actions/glob/lib/glob.js var require_glob = __commonJS({ "node_modules/@actions/glob/lib/glob.js"(exports) { "use strict"; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.create = void 0; var internal_globber_1 = require_internal_globber(); function create(patterns, options) { return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } __name(create, "create"); exports.create = create; } }); // node_modules/@actions/cache/node_modules/semver/semver.js var require_semver3 = __commonJS({ "node_modules/@actions/cache/node_modules/semver/semver.js"(exports, module2) { exports = module2.exports = SemVer; var debug; if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { debug = /* @__PURE__ */ __name(function() { var args = Array.prototype.slice.call(arguments, 0); args.unshift("SEMVER"); console.log.apply(console, args); }, "debug"); } else { debug = /* @__PURE__ */ __name(function() { }, "debug"); } exports.SEMVER_SPEC_VERSION = "2.0.0"; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991; var MAX_SAFE_COMPONENT_LENGTH = 16; var re = exports.re = []; var src = exports.src = []; var t = exports.tokens = {}; var R = 0; function tok(n) { t[n] = R++; } __name(tok, "tok"); tok("NUMERICIDENTIFIER"); src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; tok("NUMERICIDENTIFIERLOOSE"); src[t.NUMERICIDENTIFIERLOOSE] = "[0-9]+"; tok("NONNUMERICIDENTIFIER"); src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*"; tok("MAINVERSION"); src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; tok("MAINVERSIONLOOSE"); src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; tok("PRERELEASEIDENTIFIER"); src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; tok("PRERELEASEIDENTIFIERLOOSE"); src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; tok("PRERELEASE"); src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; tok("PRERELEASELOOSE"); src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; tok("BUILDIDENTIFIER"); src[t.BUILDIDENTIFIER] = "[0-9A-Za-z-]+"; tok("BUILD"); src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; tok("FULL"); tok("FULLPLAIN"); src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; tok("LOOSEPLAIN"); src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; tok("LOOSE"); src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; tok("GTLT"); src[t.GTLT] = "((?:<|>)?=?)"; tok("XRANGEIDENTIFIERLOOSE"); src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; tok("XRANGEIDENTIFIER"); src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; tok("XRANGEPLAIN"); src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; tok("XRANGEPLAINLOOSE"); src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; tok("XRANGE"); src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; tok("XRANGELOOSE"); src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; tok("COERCE"); src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; tok("COERCERTL"); re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); tok("LONETILDE"); src[t.LONETILDE] = "(?:~>?)"; tok("TILDETRIM"); src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); var tildeTrimReplace = "$1~"; tok("TILDE"); src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; tok("TILDELOOSE"); src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; tok("LONECARET"); src[t.LONECARET] = "(?:\\^)"; tok("CARETTRIM"); src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); var caretTrimReplace = "$1^"; tok("CARET"); src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; tok("CARETLOOSE"); src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; tok("COMPARATORLOOSE"); src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; tok("COMPARATOR"); src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; tok("COMPARATORTRIM"); src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); var comparatorTrimReplace = "$1$2$3"; tok("HYPHENRANGE"); src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; tok("HYPHENRANGELOOSE"); src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; tok("STAR"); src[t.STAR] = "(<|>)?=?\\s*\\*"; for (i = 0; i < R; i++) { debug(i, src[i]); if (!re[i]) { re[i] = new RegExp(src[i]); } } var i; exports.parse = parse3; function parse3(version3, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (version3 instanceof SemVer) { return version3; } if (typeof version3 !== "string") { return null; } if (version3.length > MAX_LENGTH) { return null; } var r = options.loose ? re[t.LOOSE] : re[t.FULL]; if (!r.test(version3)) { return null; } try { return new SemVer(version3, options); } catch (er) { return null; } } __name(parse3, "parse"); exports.valid = valid; function valid(version3, options) { var v = parse3(version3, options); return v ? v.version : null; } __name(valid, "valid"); exports.clean = clean; function clean(version3, options) { var s = parse3(version3.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; } __name(clean, "clean"); exports.SemVer = SemVer; function SemVer(version3, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (version3 instanceof SemVer) { if (version3.loose === options.loose) { return version3; } else { version3 = version3.version; } } else if (typeof version3 !== "string") { throw new TypeError("Invalid Version: " + version3); } if (version3.length > MAX_LENGTH) { throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); } if (!(this instanceof SemVer)) { return new SemVer(version3, options); } debug("SemVer", version3, options); this.options = options; this.loose = !!options.loose; var m = version3.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); if (!m) { throw new TypeError("Invalid Version: " + version3); } this.raw = version3; 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(function(id) { if (/^[0-9]+$/.test(id)) { var num = +id; if (num >= 0 && num < MAX_SAFE_INTEGER) { return num; } } return id; }); } this.build = m[5] ? m[5].split(".") : []; this.format(); } __name(SemVer, "SemVer"); SemVer.prototype.format = function() { this.version = this.major + "." + this.minor + "." + this.patch; if (this.prerelease.length) { this.version += "-" + this.prerelease.join("."); } return this.version; }; SemVer.prototype.toString = function() { return this.version; }; SemVer.prototype.compare = function(other) { debug("SemVer.compare", this.version, this.options, other); if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } return this.compareMain(other) || this.comparePre(other); }; SemVer.prototype.compareMain = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); }; SemVer.prototype.comparePre = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(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; } var i2 = 0; do { var a = this.prerelease[i2]; var b = other.prerelease[i2]; debug("prerelease compare", i2, 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 (++i2); }; SemVer.prototype.compareBuild = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } var i2 = 0; do { var a = this.build[i2]; var b = other.build[i2]; debug("prerelease compare", i2, 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 (++i2); }; SemVer.prototype.inc = function(release, identifier) { switch (release) { case "premajor": this.prerelease.length = 0; this.patch = 0; this.minor = 0; this.major++; this.inc("pre", identifier); break; case "preminor": this.prerelease.length = 0; this.patch = 0; this.minor++; this.inc("pre", identifier); break; case "prepatch": this.prerelease.length = 0; this.inc("patch", identifier); this.inc("pre", identifier); break; case "prerelease": if (this.prerelease.length === 0) { this.inc("patch", identifier); } this.inc("pre", identifier); 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": if (this.prerelease.length === 0) { this.prerelease = [0]; } else { var i2 = this.prerelease.length; while (--i2 >= 0) { if (typeof this.prerelease[i2] === "number") { this.prerelease[i2]++; i2 = -2; } } if (i2 === -1) { this.prerelease.push(0); } } if (identifier) { if (this.prerelease[0] === identifier) { if (isNaN(this.prerelease[1])) { this.prerelease = [identifier, 0]; } } else { this.prerelease = [identifier, 0]; } } break; default: throw new Error("invalid increment argument: " + release); } this.format(); this.raw = this.version; return this; }; exports.inc = inc; function inc(version3, release, loose, identifier) { if (typeof loose === "string") { identifier = loose; loose = void 0; } try { return new SemVer(version3, loose).inc(release, identifier).version; } catch (er) { return null; } } __name(inc, "inc"); exports.diff = diff; function diff(version1, version22) { if (eq(version1, version22)) { return null; } else { var v13 = parse3(version1); var v2 = parse3(version22); var prefix = ""; if (v13.prerelease.length || v2.prerelease.length) { prefix = "pre"; var defaultResult = "prerelease"; } for (var key in v13) { if (key === "major" || key === "minor" || key === "patch") { if (v13[key] !== v2[key]) { return prefix + key; } } } return defaultResult; } } __name(diff, "diff"); exports.compareIdentifiers = compareIdentifiers; var numeric = /^[0-9]+$/; function compareIdentifiers(a, b) { var anum = numeric.test(a); var 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; } __name(compareIdentifiers, "compareIdentifiers"); exports.rcompareIdentifiers = rcompareIdentifiers; function rcompareIdentifiers(a, b) { return compareIdentifiers(b, a); } __name(rcompareIdentifiers, "rcompareIdentifiers"); exports.major = major; function major(a, loose) { return new SemVer(a, loose).major; } __name(major, "major"); exports.minor = minor; function minor(a, loose) { return new SemVer(a, loose).minor; } __name(minor, "minor"); exports.patch = patch; function patch(a, loose) { return new SemVer(a, loose).patch; } __name(patch, "patch"); exports.compare = compare; function compare(a, b, loose) { return new SemVer(a, loose).compare(new SemVer(b, loose)); } __name(compare, "compare"); exports.compareLoose = compareLoose; function compareLoose(a, b) { return compare(a, b, true); } __name(compareLoose, "compareLoose"); exports.compareBuild = compareBuild; function compareBuild(a, b, loose) { var versionA = new SemVer(a, loose); var versionB = new SemVer(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); } __name(compareBuild, "compareBuild"); exports.rcompare = rcompare; function rcompare(a, b, loose) { return compare(b, a, loose); } __name(rcompare, "rcompare"); exports.sort = sort; function sort(list, loose) { return list.sort(function(a, b) { return exports.compareBuild(a, b, loose); }); } __name(sort, "sort"); exports.rsort = rsort; function rsort(list, loose) { return list.sort(function(a, b) { return exports.compareBuild(b, a, loose); }); } __name(rsort, "rsort"); exports.gt = gt; function gt(a, b, loose) { return compare(a, b, loose) > 0; } __name(gt, "gt"); exports.lt = lt; function lt(a, b, loose) { return compare(a, b, loose) < 0; } __name(lt, "lt"); exports.eq = eq; function eq(a, b, loose) { return compare(a, b, loose) === 0; } __name(eq, "eq"); exports.neq = neq; function neq(a, b, loose) { return compare(a, b, loose) !== 0; } __name(neq, "neq"); exports.gte = gte; function gte(a, b, loose) { return compare(a, b, loose) >= 0; } __name(gte, "gte"); exports.lte = lte; function lte(a, b, loose) { return compare(a, b, loose) <= 0; } __name(lte, "lte"); exports.cmp = cmp; function cmp(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(a, b, loose); case "!=": return neq(a, b, loose); case ">": return gt(a, b, loose); case ">=": return gte(a, b, loose); case "<": return lt(a, b, loose); case "<=": return lte(a, b, loose); default: throw new TypeError("Invalid operator: " + op); } } __name(cmp, "cmp"); exports.Comparator = Comparator; function Comparator(comp, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { return comp; } else { comp = comp.value; } } if (!(this instanceof Comparator)) { return new Comparator(comp, options); } debug("comparator", comp, options); this.options = options; this.loose = !!options.loose; this.parse(comp); if (this.semver === ANY) { this.value = ""; } else { this.value = this.operator + this.semver.version; } debug("comp", this); } __name(Comparator, "Comparator"); var ANY = {}; Comparator.prototype.parse = function(comp) { var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; var 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; } else { this.semver = new SemVer(m[2], this.options.loose); } }; Comparator.prototype.toString = function() { return this.value; }; Comparator.prototype.test = function(version3) { debug("Comparator.test", version3, this.options.loose); if (this.semver === ANY || version3 === ANY) { return true; } if (typeof version3 === "string") { try { version3 = new SemVer(version3, this.options); } catch (er) { return false; } } return cmp(version3, this.operator, this.semver, this.options); }; Comparator.prototype.intersects = function(comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError("a Comparator is required"); } if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } var rangeTmp; if (this.operator === "") { if (this.value === "") { return true; } rangeTmp = new Range(comp.value, options); return satisfies(this.value, rangeTmp, options); } else if (comp.operator === "") { if (comp.value === "") { return true; } rangeTmp = new Range(this.value, options); return satisfies(comp.semver, rangeTmp, options); } var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); var sameSemVer = this.semver.version === comp.semver.version; var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<")); var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">")); return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; }; exports.Range = Range; function Range(range, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (range instanceof Range) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { return range; } else { return new Range(range.raw, options); } } if (range instanceof Comparator) { return new Range(range.value, options); } if (!(this instanceof Range)) { return new Range(range, options); } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; this.raw = range; this.set = range.split(/\s*\|\|\s*/).map(function(range2) { return this.parseRange(range2.trim()); }, this).filter(function(c) { return c.length; }); if (!this.set.length) { throw new TypeError("Invalid SemVer Range: " + range); } this.format(); } __name(Range, "Range"); Range.prototype.format = function() { this.range = this.set.map(function(comps) { return comps.join(" ").trim(); }).join("||").trim(); return this.range; }; Range.prototype.toString = function() { return this.range; }; Range.prototype.parseRange = function(range) { var loose = this.options.loose; range = range.trim(); var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; range = range.replace(hr, hyphenReplace); debug("hyphen replace", range); range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); debug("comparator trim", range, re[t.COMPARATORTRIM]); range = range.replace(re[t.TILDETRIM], tildeTrimReplace); range = range.replace(re[t.CARETTRIM], caretTrimReplace); range = range.split(/\s+/).join(" "); var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; var set = range.split(" ").map(function(comp) { return parseComparator(comp, this.options); }, this).join(" ").split(/\s+/); if (this.options.loose) { set = set.filter(function(comp) { return !!comp.match(compRe); }); } set = set.map(function(comp) { return new Comparator(comp, this.options); }, this); return set; }; Range.prototype.intersects = function(range, options) { if (!(range instanceof Range)) { throw new TypeError("a Range is required"); } return this.set.some(function(thisComparators) { return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { return rangeComparators.every(function(rangeComparator) { return thisComparator.intersects(rangeComparator, options); }); }); }); }); }; function isSatisfiable(comparators, options) { var result = true; var remainingComparators = comparators.slice(); var testComparator = remainingComparators.pop(); while (result && remainingComparators.length) { result = remainingComparators.every(function(otherComparator) { return testComparator.intersects(otherComparator, options); }); testComparator = remainingComparators.pop(); } return result; } __name(isSatisfiable, "isSatisfiable"); exports.toComparators = toComparators; function toComparators(range, options) { return new Range(range, options).set.map(function(comp) { return comp.map(function(c) { return c.value; }).join(" ").trim().split(" "); }); } __name(toComparators, "toComparators"); function 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); return comp; } __name(parseComparator, "parseComparator"); function isX(id) { return !id || id.toLowerCase() === "x" || id === "*"; } __name(isX, "isX"); function replaceTildes(comp, options) { return comp.trim().split(/\s+/).map(function(comp2) { return replaceTilde(comp2, options); }).join(" "); } __name(replaceTildes, "replaceTildes"); function replaceTilde(comp, options) { var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; return comp.replace(r, function(_, M, m, p, pr) { debug("tilde", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; } else if (isX(p)) { ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; } else if (pr) { debug("replaceTilde pr", pr); ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; } else { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; } debug("tilde return", ret); return ret; }); } __name(replaceTilde, "replaceTilde"); function replaceCarets(comp, options) { return comp.trim().split(/\s+/).map(function(comp2) { return replaceCaret(comp2, options); }).join(" "); } __name(replaceCarets, "replaceCarets"); function replaceCaret(comp, options) { debug("caret", comp, options); var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; return comp.replace(r, function(_, M, m, p, pr) { debug("caret", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; } else if (isX(p)) { if (M === "0") { ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; } else { ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; } } else if (pr) { debug("replaceCaret pr", pr); if (M === "0") { if (m === "0") { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); } else { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; } } else { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; } } else { debug("no pr"); if (M === "0") { if (m === "0") { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); } else { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; } } else { ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; } } debug("caret return", ret); return ret; }); } __name(replaceCaret, "replaceCaret"); function replaceXRanges(comp, options) { debug("replaceXRanges", comp, options); return comp.split(/\s+/).map(function(comp2) { return replaceXRange(comp2, options); }).join(" "); } __name(replaceXRanges, "replaceXRanges"); function replaceXRange(comp, options) { comp = comp.trim(); var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; return comp.replace(r, function(ret, gtlt, M, m, p, pr) { debug("xRange", comp, ret, gtlt, M, m, p, pr); var xM = isX(M); var xm = xM || isX(m); var xp = xm || isX(p); var 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; } } ret = gtlt + M + "." + m + "." + p + pr; } else if (xm) { ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; } else if (xp) { ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; } debug("xRange return", ret); return ret; }); } __name(replaceXRange, "replaceXRange"); function replaceStars(comp, options) { debug("replaceStars", comp, options); return comp.trim().replace(re[t.STAR], ""); } __name(replaceStars, "replaceStars"); function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { if (isX(fM)) { from = ""; } else if (isX(fm)) { from = ">=" + fM + ".0.0"; } else if (isX(fp)) { from = ">=" + fM + "." + fm + ".0"; } else { from = ">=" + from; } if (isX(tM)) { to = ""; } else if (isX(tm)) { to = "<" + (+tM + 1) + ".0.0"; } else if (isX(tp)) { to = "<" + tM + "." + (+tm + 1) + ".0"; } else if (tpr) { to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; } else { to = "<=" + to; } return (from + " " + to).trim(); } __name(hyphenReplace, "hyphenReplace"); Range.prototype.test = function(version3) { if (!version3) { return false; } if (typeof version3 === "string") { try { version3 = new SemVer(version3, this.options); } catch (er) { return false; } } for (var i2 = 0; i2 < this.set.length; i2++) { if (testSet(this.set[i2], version3, this.options)) { return true; } } return false; }; function testSet(set, version3, options) { for (var i2 = 0; i2 < set.length; i2++) { if (!set[i2].test(version3)) { return false; } } if (version3.prerelease.length && !options.includePrerelease) { for (i2 = 0; i2 < set.length; i2++) { debug(set[i2].semver); if (set[i2].semver === ANY) { continue; } if (set[i2].semver.prerelease.length > 0) { var allowed = set[i2].semver; if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { return true; } } } return false; } return true; } __name(testSet, "testSet"); exports.satisfies = satisfies; function satisfies(version3, range, options) { try { range = new Range(range, options); } catch (er) { return false; } return range.test(version3); } __name(satisfies, "satisfies"); exports.maxSatisfying = maxSatisfying; function maxSatisfying(versions, range, options) { var max = null; var maxSV = null; try { var rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach(function(v) { if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; maxSV = new SemVer(max, options); } } }); return max; } __name(maxSatisfying, "maxSatisfying"); exports.minSatisfying = minSatisfying; function minSatisfying(versions, range, options) { var min = null; var minSV = null; try { var rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach(function(v) { if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; minSV = new SemVer(min, options); } } }); return min; } __name(minSatisfying, "minSatisfying"); exports.minVersion = minVersion; function minVersion(range, loose) { range = new Range(range, loose); var minver = new SemVer("0.0.0"); if (range.test(minver)) { return minver; } minver = new SemVer("0.0.0-0"); if (range.test(minver)) { return minver; } minver = null; for (var i2 = 0; i2 < range.set.length; ++i2) { var comparators = range.set[i2]; comparators.forEach(function(comparator) { var compver = new SemVer(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 (!minver || gt(minver, compver)) { minver = compver; } break; case "<": case "<=": break; default: throw new Error("Unexpected operation: " + comparator.operator); } }); } if (minver && range.test(minver)) { return minver; } return null; } __name(minVersion, "minVersion"); exports.validRange = validRange; function validRange(range, options) { try { return new Range(range, options).range || "*"; } catch (er) { return null; } } __name(validRange, "validRange"); exports.ltr = ltr; function ltr(version3, range, options) { return outside(version3, range, "<", options); } __name(ltr, "ltr"); exports.gtr = gtr; function gtr(version3, range, options) { return outside(version3, range, ">", options); } __name(gtr, "gtr"); exports.outside = outside; function outside(version3, range, hilo, options) { version3 = new SemVer(version3, options); range = new Range(range, options); var gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt; ltefn = lte; ltfn = lt; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt; ltefn = gte; ltfn = gt; comp = "<"; ecomp = "<="; break; default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } if (satisfies(version3, range, options)) { return false; } for (var i2 = 0; i2 < range.set.length; ++i2) { var comparators = range.set[i2]; var high = null; var low = null; comparators.forEach(function(comparator) { if (comparator.semver === ANY) { comparator = new Comparator(">=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(version3, low.semver)) { return false; } else if (low.operator === ecomp && ltfn(version3, low.semver)) { return false; } } return true; } __name(outside, "outside"); exports.prerelease = prerelease; function prerelease(version3, options) { var parsed = parse3(version3, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; } __name(prerelease, "prerelease"); exports.intersects = intersects; function intersects(r1, r2, options) { r1 = new Range(r1, options); r2 = new Range(r2, options); return r1.intersects(r2); } __name(intersects, "intersects"); exports.coerce = coerce; function coerce(version3, options) { if (version3 instanceof SemVer) { return version3; } if (typeof version3 === "number") { version3 = String(version3); } if (typeof version3 !== "string") { return null; } options = options || {}; var match = null; if (!options.rtl) { match = version3.match(re[t.COERCE]); } else { var next; while ((next = re[t.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; } re[t.COERCERTL].lastIndex = -1; } if (match === null) { return null; } return parse3(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); } __name(coerce, "coerce"); } }); // node_modules/uuid/lib/rng.js var require_rng = __commonJS({ "node_modules/uuid/lib/rng.js"(exports, module2) { var crypto7 = require("crypto"); module2.exports = /* @__PURE__ */ __name(function nodeRNG() { return crypto7.randomBytes(16); }, "nodeRNG"); } }); // node_modules/uuid/lib/bytesToUuid.js var require_bytesToUuid = __commonJS({ "node_modules/uuid/lib/bytesToUuid.js"(exports, module2) { var byteToHex3 = []; for (i = 0; i < 256; ++i) { byteToHex3[i] = (i + 256).toString(16).substr(1); } var i; function bytesToUuid(buf, offset) { var i2 = offset || 0; var bth = byteToHex3; return [ bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]], "-", bth[buf[i2++]], bth[buf[i2++]], "-", bth[buf[i2++]], bth[buf[i2++]], "-", bth[buf[i2++]], bth[buf[i2++]], "-", bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]] ].join(""); } __name(bytesToUuid, "bytesToUuid"); module2.exports = bytesToUuid; } }); // node_modules/uuid/v1.js var require_v1 = __commonJS({ "node_modules/uuid/v1.js"(exports, module2) { var rng3 = require_rng(); var bytesToUuid = require_bytesToUuid(); var _nodeId3; var _clockseq3; var _lastMSecs3 = 0; var _lastNSecs3 = 0; function v13(options, buf, offset) { var i = buf && offset || 0; var b = buf || []; options = options || {}; var node = options.node || _nodeId3; var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq3; if (node == null || clockseq == null) { var seedBytes = rng3(); if (node == null) { node = _nodeId3 = [ seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] ]; } if (clockseq == null) { clockseq = _clockseq3 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; } } var msecs = options.msecs !== void 0 ? options.msecs : (/* @__PURE__ */ new Date()).getTime(); var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs3 + 1; var dt = msecs - _lastMSecs3 + (nsecs - _lastNSecs3) / 1e4; if (dt < 0 && options.clockseq === void 0) { clockseq = clockseq + 1 & 16383; } if ((dt < 0 || msecs > _lastMSecs3) && options.nsecs === void 0) { nsecs = 0; } if (nsecs >= 1e4) { throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } _lastMSecs3 = msecs; _lastNSecs3 = nsecs; _clockseq3 = clockseq; msecs += 122192928e5; var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; b[i++] = tl >>> 24 & 255; b[i++] = tl >>> 16 & 255; b[i++] = tl >>> 8 & 255; b[i++] = tl & 255; var tmh = msecs / 4294967296 * 1e4 & 268435455; b[i++] = tmh >>> 8 & 255; b[i++] = tmh & 255; b[i++] = tmh >>> 24 & 15 | 16; b[i++] = tmh >>> 16 & 255; b[i++] = clockseq >>> 8 | 128; b[i++] = clockseq & 255; for (var n = 0; n < 6; ++n) { b[i + n] = node[n]; } return buf ? buf : bytesToUuid(b); } __name(v13, "v1"); module2.exports = v13; } }); // node_modules/uuid/v4.js var require_v4 = __commonJS({ "node_modules/uuid/v4.js"(exports, module2) { var rng3 = require_rng(); var bytesToUuid = require_bytesToUuid(); function v43(options, buf, offset) { var i = buf && offset || 0; if (typeof options == "string") { buf = options === "binary" ? new Array(16) : null; options = null; } options = options || {}; var rnds = options.random || (options.rng || rng3)(); rnds[6] = rnds[6] & 15 | 64; rnds[8] = rnds[8] & 63 | 128; if (buf) { for (var ii = 0; ii < 16; ++ii) { buf[i + ii] = rnds[ii]; } } return buf || bytesToUuid(rnds); } __name(v43, "v4"); module2.exports = v43; } }); // node_modules/uuid/index.js var require_uuid = __commonJS({ "node_modules/uuid/index.js"(exports, module2) { var v13 = require_v1(); var v43 = require_v4(); var uuid = v43; uuid.v1 = v13; uuid.v4 = v43; module2.exports = uuid; } }); // node_modules/@actions/cache/lib/internal/constants.js var require_constants2 = __commonJS({ "node_modules/@actions/cache/lib/internal/constants.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0; var CacheFilename; (function(CacheFilename2) { CacheFilename2["Gzip"] = "cache.tgz"; CacheFilename2["Zstd"] = "cache.tzst"; })(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {})); var CompressionMethod; (function(CompressionMethod2) { CompressionMethod2["Gzip"] = "gzip"; CompressionMethod2["ZstdWithoutLong"] = "zstd-without-long"; CompressionMethod2["Zstd"] = "zstd"; })(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {})); var ArchiveToolType; (function(ArchiveToolType2) { ArchiveToolType2["GNU"] = "gnu"; ArchiveToolType2["BSD"] = "bsd"; })(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {})); exports.DefaultRetryAttempts = 2; exports.DefaultRetryDelay = 5e3; exports.SocketTimeout = 5e3; exports.GnuTarPathOnWindows = `${process.env["PROGRAMFILES"]}\\Git\\usr\\bin\\tar.exe`; exports.SystemTarPathOnWindows = `${process.env["SYSTEMDRIVE"]}\\Windows\\System32\\tar.exe`; exports.TarFilename = "cache.tar"; exports.ManifestFilename = "manifest.txt"; } }); // node_modules/@actions/cache/lib/internal/cacheUtils.js var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __asyncValues2 = exports && exports.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { i[n] = o[n] && function(v) { return new Promise(function(resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } __name(verb, "verb"); function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v2) { resolve({ value: v2, done: d }); }, reject); } __name(settle, "settle"); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.isGhes = exports.assertDefined = exports.getGnuTarPathOnWindows = exports.getCacheFileName = exports.getCompressionMethod = exports.unlinkFile = exports.resolvePaths = exports.getArchiveFileSizeInBytes = exports.createTempDirectory = void 0; var core = __importStar2(require_core()); var exec = __importStar2(require_exec()); var glob = __importStar2(require_glob()); var io = __importStar2(require_io()); var fs = __importStar2(require("fs")); var path2 = __importStar2(require("path")); var semver2 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var uuid_1 = require_uuid(); var constants_1 = require_constants2(); function createTempDirectory() { return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { let baseLocation; if (IS_WINDOWS) { baseLocation = process.env["USERPROFILE"] || "C:\\"; } else { if (process.platform === "darwin") { baseLocation = "/Users"; } else { baseLocation = "/home"; } } tempDirectory = path2.join(baseLocation, "actions", "temp"); } const dest = path2.join(tempDirectory, (0, uuid_1.v4)()); yield io.mkdirP(dest); return dest; }); } __name(createTempDirectory, "createTempDirectory"); exports.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs.statSync(filePath).size; } __name(getArchiveFileSizeInBytes, "getArchiveFileSizeInBytes"); exports.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { var e_1, _a; var _b; return __awaiter2(this, void 0, void 0, function* () { const paths = []; const workspace = (_b = process.env["GITHUB_WORKSPACE"]) !== null && _b !== void 0 ? _b : process.cwd(); const globber = yield glob.create(patterns.join("\n"), { implicitDescendants: false }); try { for (var _c = __asyncValues2(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done; ) { const file = _d.value; const relativeFile = path2.relative(workspace, file).replace(new RegExp(`\\${path2.sep}`, "g"), "/"); core.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { paths.push(`${relativeFile}`); } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c); } finally { if (e_1) throw e_1.error; } } return paths; }); } __name(resolvePaths, "resolvePaths"); exports.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs.unlink)(filePath); }); } __name(unlinkFile, "unlinkFile"); exports.unlinkFile = unlinkFile; function getVersion(app, additionalArgs = []) { return __awaiter2(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); core.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, silent: true, listeners: { stdout: (data) => versionOutput += data.toString(), stderr: (data) => versionOutput += data.toString() } }); } catch (err) { core.debug(err.message); } versionOutput = versionOutput.trim(); core.debug(versionOutput); return versionOutput; }); } __name(getVersion, "getVersion"); function getCompressionMethod() { return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version3 = semver2.clean(versionOutput); core.debug(`zstd version: ${version3}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { return constants_1.CompressionMethod.ZstdWithoutLong; } }); } __name(getCompressionMethod, "getCompressionMethod"); exports.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } __name(getCacheFileName, "getCacheFileName"); exports.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter2(this, void 0, void 0, function* () { if (fs.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); return versionOutput.toLowerCase().includes("gnu tar") ? io.which("tar") : ""; }); } __name(getGnuTarPathOnWindows, "getGnuTarPathOnWindows"); exports.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } __name(assertDefined, "assertDefined"); exports.assertDefined = assertDefined; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); return ghUrl.hostname.toUpperCase() !== "GITHUB.COM"; } __name(isGhes, "isGhes"); exports.isGhes = isGhes; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/rng.js function rng2() { if (poolPtr2 > rnds8Pool2.length - 16) { import_crypto4.default.randomFillSync(rnds8Pool2); poolPtr2 = 0; } return rnds8Pool2.slice(poolPtr2, poolPtr2 += 16); } var import_crypto4, rnds8Pool2, poolPtr2; var init_rng2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/rng.js"() { import_crypto4 = __toESM(require("crypto")); rnds8Pool2 = new Uint8Array(256); poolPtr2 = rnds8Pool2.length; __name(rng2, "rng"); } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/regex.js var regex_default2; var init_regex2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/regex.js"() { regex_default2 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/validate.js function validate2(uuid) { return typeof uuid === "string" && regex_default2.test(uuid); } var validate_default2; var init_validate2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/validate.js"() { init_regex2(); __name(validate2, "validate"); validate_default2 = validate2; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/stringify.js function stringify2(arr, offset = 0) { const uuid = (byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]).toLowerCase(); if (!validate_default2(uuid)) { throw TypeError("Stringified UUID is invalid"); } return uuid; } var byteToHex2, stringify_default2; var init_stringify2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/stringify.js"() { init_validate2(); byteToHex2 = []; for (let i = 0; i < 256; ++i) { byteToHex2.push((i + 256).toString(16).substr(1)); } __name(stringify2, "stringify"); stringify_default2 = stringify2; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v1.js function v12(options, buf, offset) { let i = buf && offset || 0; const b = buf || new Array(16); options = options || {}; let node = options.node || _nodeId2; let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq2; if (node == null || clockseq == null) { const seedBytes = options.random || (options.rng || rng2)(); if (node == null) { node = _nodeId2 = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; } if (clockseq == null) { clockseq = _clockseq2 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; } } let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs2 + 1; const dt = msecs - _lastMSecs2 + (nsecs - _lastNSecs2) / 1e4; if (dt < 0 && options.clockseq === void 0) { clockseq = clockseq + 1 & 16383; } if ((dt < 0 || msecs > _lastMSecs2) && options.nsecs === void 0) { nsecs = 0; } if (nsecs >= 1e4) { throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } _lastMSecs2 = msecs; _lastNSecs2 = nsecs; _clockseq2 = clockseq; msecs += 122192928e5; const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; b[i++] = tl >>> 24 & 255; b[i++] = tl >>> 16 & 255; b[i++] = tl >>> 8 & 255; b[i++] = tl & 255; const tmh = msecs / 4294967296 * 1e4 & 268435455; b[i++] = tmh >>> 8 & 255; b[i++] = tmh & 255; b[i++] = tmh >>> 24 & 15 | 16; b[i++] = tmh >>> 16 & 255; b[i++] = clockseq >>> 8 | 128; b[i++] = clockseq & 255; for (let n = 0; n < 6; ++n) { b[i + n] = node[n]; } return buf || stringify_default2(b); } var _nodeId2, _clockseq2, _lastMSecs2, _lastNSecs2, v1_default2; var init_v12 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v1.js"() { init_rng2(); init_stringify2(); _lastMSecs2 = 0; _lastNSecs2 = 0; __name(v12, "v1"); v1_default2 = v12; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/parse.js function parse2(uuid) { if (!validate_default2(uuid)) { throw TypeError("Invalid UUID"); } let v; const arr = new Uint8Array(16); arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; arr[1] = v >>> 16 & 255; arr[2] = v >>> 8 & 255; arr[3] = v & 255; arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; arr[5] = v & 255; arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; arr[7] = v & 255; arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; arr[9] = v & 255; arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; arr[11] = v / 4294967296 & 255; arr[12] = v >>> 24 & 255; arr[13] = v >>> 16 & 255; arr[14] = v >>> 8 & 255; arr[15] = v & 255; return arr; } var parse_default2; var init_parse2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/parse.js"() { init_validate2(); __name(parse2, "parse"); parse_default2 = parse2; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v35.js function stringToBytes2(str) { str = unescape(encodeURIComponent(str)); const bytes = []; for (let i = 0; i < str.length; ++i) { bytes.push(str.charCodeAt(i)); } return bytes; } function v35_default2(name, version3, hashfunc) { function generateUUID(value, namespace, buf, offset) { if (typeof value === "string") { value = stringToBytes2(value); } if (typeof namespace === "string") { namespace = parse_default2(namespace); } if (namespace.length !== 16) { throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); } let bytes = new Uint8Array(16 + value.length); bytes.set(namespace); bytes.set(value, namespace.length); bytes = hashfunc(bytes); bytes[6] = bytes[6] & 15 | version3; bytes[8] = bytes[8] & 63 | 128; if (buf) { offset = offset || 0; for (let i = 0; i < 16; ++i) { buf[offset + i] = bytes[i]; } return buf; } return stringify_default2(bytes); } __name(generateUUID, "generateUUID"); try { generateUUID.name = name; } catch (err) { } generateUUID.DNS = DNS2; generateUUID.URL = URL3; return generateUUID; } var DNS2, URL3; var init_v352 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v35.js"() { init_stringify2(); init_parse2(); __name(stringToBytes2, "stringToBytes"); DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; __name(v35_default2, "default"); } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/md5.js function md52(bytes) { if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === "string") { bytes = Buffer.from(bytes, "utf8"); } return import_crypto5.default.createHash("md5").update(bytes).digest(); } var import_crypto5, md5_default2; var init_md52 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/md5.js"() { import_crypto5 = __toESM(require("crypto")); __name(md52, "md5"); md5_default2 = md52; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v3.js var v32, v3_default2; var init_v32 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v3.js"() { init_v352(); init_md52(); v32 = v35_default2("v3", 48, md5_default2); v3_default2 = v32; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v4.js function v42(options, buf, offset) { options = options || {}; const rnds = options.random || (options.rng || rng2)(); rnds[6] = rnds[6] & 15 | 64; rnds[8] = rnds[8] & 63 | 128; if (buf) { offset = offset || 0; for (let i = 0; i < 16; ++i) { buf[offset + i] = rnds[i]; } return buf; } return stringify_default2(rnds); } var v4_default2; var init_v42 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v4.js"() { init_rng2(); init_stringify2(); __name(v42, "v4"); v4_default2 = v42; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/sha1.js function sha12(bytes) { if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === "string") { bytes = Buffer.from(bytes, "utf8"); } return import_crypto6.default.createHash("sha1").update(bytes).digest(); } var import_crypto6, sha1_default2; var init_sha12 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/sha1.js"() { import_crypto6 = __toESM(require("crypto")); __name(sha12, "sha1"); sha1_default2 = sha12; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v5.js var v52, v5_default2; var init_v52 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v5.js"() { init_v352(); init_sha12(); v52 = v35_default2("v5", 80, sha1_default2); v5_default2 = v52; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/nil.js var nil_default2; var init_nil2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/nil.js"() { nil_default2 = "00000000-0000-0000-0000-000000000000"; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/version.js function version2(uuid) { if (!validate_default2(uuid)) { throw TypeError("Invalid UUID"); } return parseInt(uuid.substr(14, 1), 16); } var version_default2; var init_version2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/version.js"() { init_validate2(); __name(version2, "version"); version_default2 = version2; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/index.js var esm_node_exports2 = {}; __export(esm_node_exports2, { NIL: () => nil_default2, parse: () => parse_default2, stringify: () => stringify_default2, v1: () => v1_default2, v3: () => v3_default2, v4: () => v4_default2, v5: () => v5_default2, validate: () => validate_default2, version: () => version_default2 }); var init_esm_node2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/index.js"() { init_v12(); init_v32(); init_v42(); init_v52(); init_nil2(); init_version2(); init_validate2(); init_stringify2(); init_parse2(); } }); // node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, __assign: () => __assign, __asyncDelegator: () => __asyncDelegator, __asyncGenerator: () => __asyncGenerator, __asyncValues: () => __asyncValues, __await: () => __await, __awaiter: () => __awaiter, __classPrivateFieldGet: () => __classPrivateFieldGet, __classPrivateFieldIn: () => __classPrivateFieldIn, __classPrivateFieldSet: () => __classPrivateFieldSet, __createBinding: () => __createBinding, __decorate: () => __decorate, __disposeResources: () => __disposeResources, __esDecorate: () => __esDecorate, __exportStar: () => __exportStar, __extends: () => __extends, __generator: () => __generator, __importDefault: () => __importDefault, __importStar: () => __importStar, __makeTemplateObject: () => __makeTemplateObject, __metadata: () => __metadata, __param: () => __param, __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, __spreadArray: () => __spreadArray, __spreadArrays: () => __spreadArrays, __values: () => __values2, default: () => tslib_es6_default }); function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } __name(__, "__"); d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function(target, key) { decorator(target, key, paramIndex); }; } function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } __name(accept, "accept"); var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); var _, done = false; for (var i = decorators.length - 1; i >= 0; i--) { var context = {}; for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; for (var p in contextIn.access) context.access[p] = contextIn.access[p]; context.addInitializer = function(f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); if (kind === "accessor") { if (result === void 0) continue; if (result === null || typeof result !== "object") throw new TypeError("Object expected"); if (_ = accept(result.get)) descriptor.get = _; if (_ = accept(result.set)) descriptor.set = _; if (_ = accept(result.init)) initializers.unshift(_); } else if (_ = accept(result)) { if (kind === "field") initializers.unshift(_); else descriptor[key] = _; } } if (target) Object.defineProperty(target, contextIn.name, descriptor); done = true; } function __runInitializers(thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); } return useValue ? value : void 0; } function __propKey(x) { return typeof x === "symbol" ? x : "".concat(x); } function __setFunctionName(f, name, prefix) { if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function(v) { return step([n, v]); }; } __name(verb, "verb"); function step(op) { if (f) throw new TypeError("Generator is already executing."); while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } __name(step, "step"); } function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values2(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function() { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i; function verb(n) { if (g[n]) i[n] = function(v) { return new Promise(function(a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } __name(verb, "verb"); function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } __name(resume, "resume"); function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } __name(step, "step"); function fulfill(value) { resume("next", value); } __name(fulfill, "fulfill"); function reject(value) { resume("throw", value); } __name(reject, "reject"); function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } __name(settle, "settle"); } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function(e) { throw e; }), verb("return"), i[Symbol.iterator] = function() { return this; }, i; function verb(n, f) { i[n] = o[n] ? function(v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } __name(verb, "verb"); } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { i[n] = o[n] && function(v) { return new Promise(function(resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } __name(verb, "verb"); function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v2) { resolve({ value: v2, done: d }); }, reject); } __name(settle, "settle"); } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; } function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return mod && mod.__esModule ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; } function __classPrivateFieldIn(state, receiver) { if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); return typeof state === "function" ? receiver === state : state.has(receiver); } function __addDisposableResource(env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object") throw new TypeError("Object expected."); var dispose; if (async) { if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); dispose = value[Symbol.asyncDispose]; } if (dispose === void 0) { if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); dispose = value[Symbol.dispose]; } if (typeof dispose !== "function") throw new TypeError("Object not disposable."); env.stack.push({ value, dispose, async }); } else if (async) { env.stack.push({ async: true }); } return value; } function __disposeResources(env) { function fail(e) { env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; env.hasError = true; } __name(fail, "fail"); function next() { while (env.stack.length) { var rec = env.stack.pop(); try { var result = rec.dispose && rec.dispose.call(rec.value); if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); } catch (e) { fail(e); } } if (env.hasError) throw env.error; } __name(next, "next"); return next(); } var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ "node_modules/tslib/tslib.es6.mjs"() { extendStatics = /* @__PURE__ */ __name(function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; } || function(d2, b2) { for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; }; return extendStatics(d, b); }, "extendStatics"); __name(__extends, "__extends"); __assign = /* @__PURE__ */ __name(function() { __assign = Object.assign || /* @__PURE__ */ __name(function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }, "__assign"); return __assign.apply(this, arguments); }, "__assign"); __name(__rest, "__rest"); __name(__decorate, "__decorate"); __name(__param, "__param"); __name(__esDecorate, "__esDecorate"); __name(__runInitializers, "__runInitializers"); __name(__propKey, "__propKey"); __name(__setFunctionName, "__setFunctionName"); __name(__metadata, "__metadata"); __name(__awaiter, "__awaiter"); __name(__generator, "__generator"); __createBinding = Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }; __name(__exportStar, "__exportStar"); __name(__values2, "__values"); __name(__read, "__read"); __name(__spread, "__spread"); __name(__spreadArrays, "__spreadArrays"); __name(__spreadArray, "__spreadArray"); __name(__await, "__await"); __name(__asyncGenerator, "__asyncGenerator"); __name(__asyncDelegator, "__asyncDelegator"); __name(__asyncValues, "__asyncValues"); __name(__makeTemplateObject, "__makeTemplateObject"); __setModuleDefault = Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }; __name(__importStar, "__importStar"); __name(__importDefault, "__importDefault"); __name(__classPrivateFieldGet, "__classPrivateFieldGet"); __name(__classPrivateFieldSet, "__classPrivateFieldSet"); __name(__classPrivateFieldIn, "__classPrivateFieldIn"); __name(__addDisposableResource, "__addDisposableResource"); _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; __name(__disposeResources, "__disposeResources"); tslib_es6_default = { __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values: __values2, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources }; } }); // node_modules/xml2js/lib/defaults.js var require_defaults = __commonJS({ "node_modules/xml2js/lib/defaults.js"(exports) { (function() { exports.defaults = { "0.1": { explicitCharkey: false, trim: true, normalize: true, normalizeTags: false, attrkey: "@", charkey: "#", explicitArray: false, ignoreAttrs: false, mergeAttrs: false, explicitRoot: false, validator: null, xmlns: false, explicitChildren: false, childkey: "@@", charsAsChildren: false, includeWhiteChars: false, async: false, strict: true, attrNameProcessors: null, attrValueProcessors: null, tagNameProcessors: null, valueProcessors: null, emptyTag: "" }, "0.2": { explicitCharkey: false, trim: false, normalize: false, normalizeTags: false, attrkey: "$", charkey: "_", explicitArray: true, ignoreAttrs: false, mergeAttrs: false, explicitRoot: true, validator: null, xmlns: false, explicitChildren: false, preserveChildrenOrder: false, childkey: "$$", charsAsChildren: false, includeWhiteChars: false, async: false, strict: true, attrNameProcessors: null, attrValueProcessors: null, tagNameProcessors: null, valueProcessors: null, rootName: "root", xmldec: { "version": "1.0", "encoding": "UTF-8", "standalone": true }, doctype: null, renderOpts: { "pretty": true, "indent": " ", "newline": "\n" }, headless: false, chunkSize: 1e4, emptyTag: "", cdata: false } }; }).call(exports); } }); // node_modules/xmlbuilder/lib/Utility.js var require_Utility = __commonJS({ "node_modules/xmlbuilder/lib/Utility.js"(exports, module2) { (function() { var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, slice = [].slice, hasProp = {}.hasOwnProperty; assign = /* @__PURE__ */ __name(function() { var i, key, len, source, sources, target; target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : []; if (isFunction(Object.assign)) { Object.assign.apply(null, arguments); } else { for (i = 0, len = sources.length; i < len; i++) { source = sources[i]; if (source != null) { for (key in source) { if (!hasProp.call(source, key)) continue; target[key] = source[key]; } } } } return target; }, "assign"); isFunction = /* @__PURE__ */ __name(function(val) { return !!val && Object.prototype.toString.call(val) === "[object Function]"; }, "isFunction"); isObject = /* @__PURE__ */ __name(function(val) { var ref; return !!val && ((ref = typeof val) === "function" || ref === "object"); }, "isObject"); isArray = /* @__PURE__ */ __name(function(val) { if (isFunction(Array.isArray)) { return Array.isArray(val); } else { return Object.prototype.toString.call(val) === "[object Array]"; } }, "isArray"); isEmpty = /* @__PURE__ */ __name(function(val) { var key; if (isArray(val)) { return !val.length; } else { for (key in val) { if (!hasProp.call(val, key)) continue; return false; } return true; } }, "isEmpty"); isPlainObject = /* @__PURE__ */ __name(function(val) { var ctor, proto; return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && typeof ctor === "function" && ctor instanceof ctor && Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object); }, "isPlainObject"); getValue = /* @__PURE__ */ __name(function(obj) { if (isFunction(obj.valueOf)) { return obj.valueOf(); } else { return obj; } }, "getValue"); module2.exports.assign = assign; module2.exports.isFunction = isFunction; module2.exports.isObject = isObject; module2.exports.isArray = isArray; module2.exports.isEmpty = isEmpty; module2.exports.isPlainObject = isPlainObject; module2.exports.getValue = getValue; }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDOMImplementation.js var require_XMLDOMImplementation = __commonJS({ "node_modules/xmlbuilder/lib/XMLDOMImplementation.js"(exports, module2) { (function() { var XMLDOMImplementation; module2.exports = XMLDOMImplementation = function() { function XMLDOMImplementation2() { } __name(XMLDOMImplementation2, "XMLDOMImplementation"); XMLDOMImplementation2.prototype.hasFeature = function(feature, version3) { return true; }; XMLDOMImplementation2.prototype.createDocumentType = function(qualifiedName, publicId, systemId) { throw new Error("This DOM method is not implemented."); }; XMLDOMImplementation2.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) { throw new Error("This DOM method is not implemented."); }; XMLDOMImplementation2.prototype.createHTMLDocument = function(title) { throw new Error("This DOM method is not implemented."); }; XMLDOMImplementation2.prototype.getFeature = function(feature, version3) { throw new Error("This DOM method is not implemented."); }; return XMLDOMImplementation2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js var require_XMLDOMErrorHandler = __commonJS({ "node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js"(exports, module2) { (function() { var XMLDOMErrorHandler; module2.exports = XMLDOMErrorHandler = function() { function XMLDOMErrorHandler2() { } __name(XMLDOMErrorHandler2, "XMLDOMErrorHandler"); XMLDOMErrorHandler2.prototype.handleError = function(error) { throw new Error(error); }; return XMLDOMErrorHandler2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDOMStringList.js var require_XMLDOMStringList = __commonJS({ "node_modules/xmlbuilder/lib/XMLDOMStringList.js"(exports, module2) { (function() { var XMLDOMStringList; module2.exports = XMLDOMStringList = function() { function XMLDOMStringList2(arr) { this.arr = arr || []; } __name(XMLDOMStringList2, "XMLDOMStringList"); Object.defineProperty(XMLDOMStringList2.prototype, "length", { get: function() { return this.arr.length; } }); XMLDOMStringList2.prototype.item = function(index) { return this.arr[index] || null; }; XMLDOMStringList2.prototype.contains = function(str) { return this.arr.indexOf(str) !== -1; }; return XMLDOMStringList2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDOMConfiguration.js var require_XMLDOMConfiguration = __commonJS({ "node_modules/xmlbuilder/lib/XMLDOMConfiguration.js"(exports, module2) { (function() { var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; XMLDOMErrorHandler = require_XMLDOMErrorHandler(); XMLDOMStringList = require_XMLDOMStringList(); module2.exports = XMLDOMConfiguration = function() { function XMLDOMConfiguration2() { var clonedSelf; this.defaultParams = { "canonical-form": false, "cdata-sections": false, "comments": false, "datatype-normalization": false, "element-content-whitespace": true, "entities": true, "error-handler": new XMLDOMErrorHandler(), "infoset": true, "validate-if-schema": false, "namespaces": true, "namespace-declarations": true, "normalize-characters": false, "schema-location": "", "schema-type": "", "split-cdata-sections": true, "validate": false, "well-formed": true }; this.params = clonedSelf = Object.create(this.defaultParams); } __name(XMLDOMConfiguration2, "XMLDOMConfiguration"); Object.defineProperty(XMLDOMConfiguration2.prototype, "parameterNames", { get: function() { return new XMLDOMStringList(Object.keys(this.defaultParams)); } }); XMLDOMConfiguration2.prototype.getParameter = function(name) { if (this.params.hasOwnProperty(name)) { return this.params[name]; } else { return null; } }; XMLDOMConfiguration2.prototype.canSetParameter = function(name, value) { return true; }; XMLDOMConfiguration2.prototype.setParameter = function(name, value) { if (value != null) { return this.params[name] = value; } else { return delete this.params[name]; } }; return XMLDOMConfiguration2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/NodeType.js var require_NodeType = __commonJS({ "node_modules/xmlbuilder/lib/NodeType.js"(exports, module2) { (function() { module2.exports = { Element: 1, Attribute: 2, Text: 3, CData: 4, EntityReference: 5, EntityDeclaration: 6, ProcessingInstruction: 7, Comment: 8, Document: 9, DocType: 10, DocumentFragment: 11, NotationDeclaration: 12, Declaration: 201, Raw: 202, AttributeDeclaration: 203, ElementDeclaration: 204, Dummy: 205 }; }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLAttribute.js var require_XMLAttribute = __commonJS({ "node_modules/xmlbuilder/lib/XMLAttribute.js"(exports, module2) { (function() { var NodeType, XMLAttribute, XMLNode; NodeType = require_NodeType(); XMLNode = require_XMLNode(); module2.exports = XMLAttribute = function() { function XMLAttribute2(parent, name, value) { this.parent = parent; if (this.parent) { this.options = this.parent.options; this.stringify = this.parent.stringify; } if (name == null) { throw new Error("Missing attribute name. " + this.debugInfo(name)); } this.name = this.stringify.name(name); this.value = this.stringify.attValue(value); this.type = NodeType.Attribute; this.isId = false; this.schemaTypeInfo = null; } __name(XMLAttribute2, "XMLAttribute"); Object.defineProperty(XMLAttribute2.prototype, "nodeType", { get: function() { return this.type; } }); Object.defineProperty(XMLAttribute2.prototype, "ownerElement", { get: function() { return this.parent; } }); Object.defineProperty(XMLAttribute2.prototype, "textContent", { get: function() { return this.value; }, set: function(value) { return this.value = value || ""; } }); Object.defineProperty(XMLAttribute2.prototype, "namespaceURI", { get: function() { return ""; } }); Object.defineProperty(XMLAttribute2.prototype, "prefix", { get: function() { return ""; } }); Object.defineProperty(XMLAttribute2.prototype, "localName", { get: function() { return this.name; } }); Object.defineProperty(XMLAttribute2.prototype, "specified", { get: function() { return true; } }); XMLAttribute2.prototype.clone = function() { return Object.create(this); }; XMLAttribute2.prototype.toString = function(options) { return this.options.writer.attribute(this, this.options.writer.filterOptions(options)); }; XMLAttribute2.prototype.debugInfo = function(name) { name = name || this.name; if (name == null) { return "parent: <" + this.parent.name + ">"; } else { return "attribute: {" + name + "}, parent: <" + this.parent.name + ">"; } }; XMLAttribute2.prototype.isEqualNode = function(node) { if (node.namespaceURI !== this.namespaceURI) { return false; } if (node.prefix !== this.prefix) { return false; } if (node.localName !== this.localName) { return false; } if (node.value !== this.value) { return false; } return true; }; return XMLAttribute2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLNamedNodeMap.js var require_XMLNamedNodeMap = __commonJS({ "node_modules/xmlbuilder/lib/XMLNamedNodeMap.js"(exports, module2) { (function() { var XMLNamedNodeMap; module2.exports = XMLNamedNodeMap = function() { function XMLNamedNodeMap2(nodes) { this.nodes = nodes; } __name(XMLNamedNodeMap2, "XMLNamedNodeMap"); Object.defineProperty(XMLNamedNodeMap2.prototype, "length", { get: function() { return Object.keys(this.nodes).length || 0; } }); XMLNamedNodeMap2.prototype.clone = function() { return this.nodes = null; }; XMLNamedNodeMap2.prototype.getNamedItem = function(name) { return this.nodes[name]; }; XMLNamedNodeMap2.prototype.setNamedItem = function(node) { var oldNode; oldNode = this.nodes[node.nodeName]; this.nodes[node.nodeName] = node; return oldNode || null; }; XMLNamedNodeMap2.prototype.removeNamedItem = function(name) { var oldNode; oldNode = this.nodes[name]; delete this.nodes[name]; return oldNode || null; }; XMLNamedNodeMap2.prototype.item = function(index) { return this.nodes[Object.keys(this.nodes)[index]] || null; }; XMLNamedNodeMap2.prototype.getNamedItemNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented."); }; XMLNamedNodeMap2.prototype.setNamedItemNS = function(node) { throw new Error("This DOM method is not implemented."); }; XMLNamedNodeMap2.prototype.removeNamedItemNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented."); }; return XMLNamedNodeMap2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLElement.js var require_XMLElement = __commonJS({ "node_modules/xmlbuilder/lib/XMLElement.js"(exports, module2) { (function() { var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; ref = require_Utility(), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; XMLNode = require_XMLNode(); NodeType = require_NodeType(); XMLAttribute = require_XMLAttribute(); XMLNamedNodeMap = require_XMLNamedNodeMap(); module2.exports = XMLElement = function(superClass) { extend(XMLElement2, superClass); function XMLElement2(parent, name, attributes) { var child, j, len, ref1; XMLElement2.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing element name. " + this.debugInfo()); } this.name = this.stringify.name(name); this.type = NodeType.Element; this.attribs = {}; this.schemaTypeInfo = null; if (attributes != null) { this.attribute(attributes); } if (parent.type === NodeType.Document) { this.isRoot = true; this.documentObject = parent; parent.rootObject = this; if (parent.children) { ref1 = parent.children; for (j = 0, len = ref1.length; j < len; j++) { child = ref1[j]; if (child.type === NodeType.DocType) { child.name = this.name; break; } } } } } __name(XMLElement2, "XMLElement"); Object.defineProperty(XMLElement2.prototype, "tagName", { get: function() { return this.name; } }); Object.defineProperty(XMLElement2.prototype, "namespaceURI", { get: function() { return ""; } }); Object.defineProperty(XMLElement2.prototype, "prefix", { get: function() { return ""; } }); Object.defineProperty(XMLElement2.prototype, "localName", { get: function() { return this.name; } }); Object.defineProperty(XMLElement2.prototype, "id", { get: function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); Object.defineProperty(XMLElement2.prototype, "className", { get: function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); Object.defineProperty(XMLElement2.prototype, "classList", { get: function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); Object.defineProperty(XMLElement2.prototype, "attributes", { get: function() { if (!this.attributeMap || !this.attributeMap.nodes) { this.attributeMap = new XMLNamedNodeMap(this.attribs); } return this.attributeMap; } }); XMLElement2.prototype.clone = function() { var att, attName, clonedSelf, ref1; clonedSelf = Object.create(this); if (clonedSelf.isRoot) { clonedSelf.documentObject = null; } clonedSelf.attribs = {}; ref1 = this.attribs; for (attName in ref1) { if (!hasProp.call(ref1, attName)) continue; att = ref1[attName]; clonedSelf.attribs[attName] = att.clone(); } clonedSelf.children = []; this.children.forEach(function(child) { var clonedChild; clonedChild = child.clone(); clonedChild.parent = clonedSelf; return clonedSelf.children.push(clonedChild); }); return clonedSelf; }; XMLElement2.prototype.attribute = function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(name)) { for (attName in name) { if (!hasProp.call(name, attName)) continue; attValue = name[attName]; this.attribute(attName, attValue); } } else { if (isFunction(value)) { value = value.apply(); } if (this.options.keepNullAttributes && value == null) { this.attribs[name] = new XMLAttribute(this, name, ""); } else if (value != null) { this.attribs[name] = new XMLAttribute(this, name, value); } } return this; }; XMLElement2.prototype.removeAttribute = function(name) { var attName, j, len; if (name == null) { throw new Error("Missing attribute name. " + this.debugInfo()); } name = getValue(name); if (Array.isArray(name)) { for (j = 0, len = name.length; j < len; j++) { attName = name[j]; delete this.attribs[attName]; } } else { delete this.attribs[name]; } return this; }; XMLElement2.prototype.toString = function(options) { return this.options.writer.element(this, this.options.writer.filterOptions(options)); }; XMLElement2.prototype.att = function(name, value) { return this.attribute(name, value); }; XMLElement2.prototype.a = function(name, value) { return this.attribute(name, value); }; XMLElement2.prototype.getAttribute = function(name) { if (this.attribs.hasOwnProperty(name)) { return this.attribs[name].value; } else { return null; } }; XMLElement2.prototype.setAttribute = function(name, value) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getAttributeNode = function(name) { if (this.attribs.hasOwnProperty(name)) { return this.attribs[name]; } else { return null; } }; XMLElement2.prototype.setAttributeNode = function(newAttr) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.removeAttributeNode = function(oldAttr) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getElementsByTagName = function(name) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getAttributeNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.removeAttributeNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getAttributeNodeNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.setAttributeNodeNS = function(newAttr) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.hasAttribute = function(name) { return this.attribs.hasOwnProperty(name); }; XMLElement2.prototype.hasAttributeNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.setIdAttribute = function(name, isId) { if (this.attribs.hasOwnProperty(name)) { return this.attribs[name].isId; } else { return isId; } }; XMLElement2.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.setIdAttributeNode = function(idAttr, isId) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getElementsByTagName = function(tagname) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getElementsByClassName = function(classNames) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.isEqualNode = function(node) { var i, j, ref1; if (!XMLElement2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { return false; } if (node.namespaceURI !== this.namespaceURI) { return false; } if (node.prefix !== this.prefix) { return false; } if (node.localName !== this.localName) { return false; } if (node.attribs.length !== this.attribs.length) { return false; } for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) { if (!this.attribs[i].isEqualNode(node.attribs[i])) { return false; } } return true; }; return XMLElement2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLCharacterData.js var require_XMLCharacterData = __commonJS({ "node_modules/xmlbuilder/lib/XMLCharacterData.js"(exports, module2) { (function() { var XMLCharacterData, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); module2.exports = XMLCharacterData = function(superClass) { extend(XMLCharacterData2, superClass); function XMLCharacterData2(parent) { XMLCharacterData2.__super__.constructor.call(this, parent); this.value = ""; } __name(XMLCharacterData2, "XMLCharacterData"); Object.defineProperty(XMLCharacterData2.prototype, "data", { get: function() { return this.value; }, set: function(value) { return this.value = value || ""; } }); Object.defineProperty(XMLCharacterData2.prototype, "length", { get: function() { return this.value.length; } }); Object.defineProperty(XMLCharacterData2.prototype, "textContent", { get: function() { return this.value; }, set: function(value) { return this.value = value || ""; } }); XMLCharacterData2.prototype.clone = function() { return Object.create(this); }; XMLCharacterData2.prototype.substringData = function(offset, count) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLCharacterData2.prototype.appendData = function(arg) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLCharacterData2.prototype.insertData = function(offset, arg) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLCharacterData2.prototype.deleteData = function(offset, count) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLCharacterData2.prototype.replaceData = function(offset, count, arg) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLCharacterData2.prototype.isEqualNode = function(node) { if (!XMLCharacterData2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { return false; } if (node.data !== this.data) { return false; } return true; }; return XMLCharacterData2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLCData.js var require_XMLCData = __commonJS({ "node_modules/xmlbuilder/lib/XMLCData.js"(exports, module2) { (function() { var NodeType, XMLCData, XMLCharacterData, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLCData = function(superClass) { extend(XMLCData2, superClass); function XMLCData2(parent, text) { XMLCData2.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing CDATA text. " + this.debugInfo()); } this.name = "#cdata-section"; this.type = NodeType.CData; this.value = this.stringify.cdata(text); } __name(XMLCData2, "XMLCData"); XMLCData2.prototype.clone = function() { return Object.create(this); }; XMLCData2.prototype.toString = function(options) { return this.options.writer.cdata(this, this.options.writer.filterOptions(options)); }; return XMLCData2; }(XMLCharacterData); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLComment.js var require_XMLComment = __commonJS({ "node_modules/xmlbuilder/lib/XMLComment.js"(exports, module2) { (function() { var NodeType, XMLCharacterData, XMLComment, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLComment = function(superClass) { extend(XMLComment2, superClass); function XMLComment2(parent, text) { XMLComment2.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing comment text. " + this.debugInfo()); } this.name = "#comment"; this.type = NodeType.Comment; this.value = this.stringify.comment(text); } __name(XMLComment2, "XMLComment"); XMLComment2.prototype.clone = function() { return Object.create(this); }; XMLComment2.prototype.toString = function(options) { return this.options.writer.comment(this, this.options.writer.filterOptions(options)); }; return XMLComment2; }(XMLCharacterData); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDeclaration.js var require_XMLDeclaration = __commonJS({ "node_modules/xmlbuilder/lib/XMLDeclaration.js"(exports, module2) { (function() { var NodeType, XMLDeclaration, XMLNode, isObject, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; isObject = require_Utility().isObject; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDeclaration = function(superClass) { extend(XMLDeclaration2, superClass); function XMLDeclaration2(parent, version3, encoding, standalone) { var ref; XMLDeclaration2.__super__.constructor.call(this, parent); if (isObject(version3)) { ref = version3, version3 = ref.version, encoding = ref.encoding, standalone = ref.standalone; } if (!version3) { version3 = "1.0"; } this.type = NodeType.Declaration; this.version = this.stringify.xmlVersion(version3); if (encoding != null) { this.encoding = this.stringify.xmlEncoding(encoding); } if (standalone != null) { this.standalone = this.stringify.xmlStandalone(standalone); } } __name(XMLDeclaration2, "XMLDeclaration"); XMLDeclaration2.prototype.toString = function(options) { return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); }; return XMLDeclaration2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDTDAttList.js var require_XMLDTDAttList = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDAttList.js"(exports, module2) { (function() { var NodeType, XMLDTDAttList, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDTDAttList = function(superClass) { extend(XMLDTDAttList2, superClass); function XMLDTDAttList2(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { XMLDTDAttList2.__super__.constructor.call(this, parent); if (elementName == null) { throw new Error("Missing DTD element name. " + this.debugInfo()); } if (attributeName == null) { throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName)); } if (!attributeType) { throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName)); } if (!defaultValueType) { throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName)); } if (defaultValueType.indexOf("#") !== 0) { defaultValueType = "#" + defaultValueType; } if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName)); } if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName)); } this.elementName = this.stringify.name(elementName); this.type = NodeType.AttributeDeclaration; this.attributeName = this.stringify.name(attributeName); this.attributeType = this.stringify.dtdAttType(attributeType); if (defaultValue) { this.defaultValue = this.stringify.dtdAttDefault(defaultValue); } this.defaultValueType = defaultValueType; } __name(XMLDTDAttList2, "XMLDTDAttList"); XMLDTDAttList2.prototype.toString = function(options) { return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options)); }; return XMLDTDAttList2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDTDEntity.js var require_XMLDTDEntity = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDEntity.js"(exports, module2) { (function() { var NodeType, XMLDTDEntity, XMLNode, isObject, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; isObject = require_Utility().isObject; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDTDEntity = function(superClass) { extend(XMLDTDEntity2, superClass); function XMLDTDEntity2(parent, pe, name, value) { XMLDTDEntity2.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing DTD entity name. " + this.debugInfo(name)); } if (value == null) { throw new Error("Missing DTD entity value. " + this.debugInfo(name)); } this.pe = !!pe; this.name = this.stringify.name(name); this.type = NodeType.EntityDeclaration; if (!isObject(value)) { this.value = this.stringify.dtdEntityValue(value); this.internal = true; } else { if (!value.pubID && !value.sysID) { throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name)); } if (value.pubID && !value.sysID) { throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name)); } this.internal = false; if (value.pubID != null) { this.pubID = this.stringify.dtdPubID(value.pubID); } if (value.sysID != null) { this.sysID = this.stringify.dtdSysID(value.sysID); } if (value.nData != null) { this.nData = this.stringify.dtdNData(value.nData); } if (this.pe && this.nData) { throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name)); } } } __name(XMLDTDEntity2, "XMLDTDEntity"); Object.defineProperty(XMLDTDEntity2.prototype, "publicId", { get: function() { return this.pubID; } }); Object.defineProperty(XMLDTDEntity2.prototype, "systemId", { get: function() { return this.sysID; } }); Object.defineProperty(XMLDTDEntity2.prototype, "notationName", { get: function() { return this.nData || null; } }); Object.defineProperty(XMLDTDEntity2.prototype, "inputEncoding", { get: function() { return null; } }); Object.defineProperty(XMLDTDEntity2.prototype, "xmlEncoding", { get: function() { return null; } }); Object.defineProperty(XMLDTDEntity2.prototype, "xmlVersion", { get: function() { return null; } }); XMLDTDEntity2.prototype.toString = function(options) { return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options)); }; return XMLDTDEntity2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDTDElement.js var require_XMLDTDElement = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDElement.js"(exports, module2) { (function() { var NodeType, XMLDTDElement, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDTDElement = function(superClass) { extend(XMLDTDElement2, superClass); function XMLDTDElement2(parent, name, value) { XMLDTDElement2.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing DTD element name. " + this.debugInfo()); } if (!value) { value = "(#PCDATA)"; } if (Array.isArray(value)) { value = "(" + value.join(",") + ")"; } this.name = this.stringify.name(name); this.type = NodeType.ElementDeclaration; this.value = this.stringify.dtdElementValue(value); } __name(XMLDTDElement2, "XMLDTDElement"); XMLDTDElement2.prototype.toString = function(options) { return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options)); }; return XMLDTDElement2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDTDNotation.js var require_XMLDTDNotation = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDNotation.js"(exports, module2) { (function() { var NodeType, XMLDTDNotation, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDTDNotation = function(superClass) { extend(XMLDTDNotation2, superClass); function XMLDTDNotation2(parent, name, value) { XMLDTDNotation2.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing DTD notation name. " + this.debugInfo(name)); } if (!value.pubID && !value.sysID) { throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name)); } this.name = this.stringify.name(name); this.type = NodeType.NotationDeclaration; if (value.pubID != null) { this.pubID = this.stringify.dtdPubID(value.pubID); } if (value.sysID != null) { this.sysID = this.stringify.dtdSysID(value.sysID); } } __name(XMLDTDNotation2, "XMLDTDNotation"); Object.defineProperty(XMLDTDNotation2.prototype, "publicId", { get: function() { return this.pubID; } }); Object.defineProperty(XMLDTDNotation2.prototype, "systemId", { get: function() { return this.sysID; } }); XMLDTDNotation2.prototype.toString = function(options) { return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); }; return XMLDTDNotation2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDocType.js var require_XMLDocType = __commonJS({ "node_modules/xmlbuilder/lib/XMLDocType.js"(exports, module2) { (function() { var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; isObject = require_Utility().isObject; XMLNode = require_XMLNode(); NodeType = require_NodeType(); XMLDTDAttList = require_XMLDTDAttList(); XMLDTDEntity = require_XMLDTDEntity(); XMLDTDElement = require_XMLDTDElement(); XMLDTDNotation = require_XMLDTDNotation(); XMLNamedNodeMap = require_XMLNamedNodeMap(); module2.exports = XMLDocType = function(superClass) { extend(XMLDocType2, superClass); function XMLDocType2(parent, pubID, sysID) { var child, i, len, ref, ref1, ref2; XMLDocType2.__super__.constructor.call(this, parent); this.type = NodeType.DocType; if (parent.children) { ref = parent.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; if (child.type === NodeType.Element) { this.name = child.name; break; } } } this.documentObject = parent; if (isObject(pubID)) { ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID; } if (sysID == null) { ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1]; } if (pubID != null) { this.pubID = this.stringify.dtdPubID(pubID); } if (sysID != null) { this.sysID = this.stringify.dtdSysID(sysID); } } __name(XMLDocType2, "XMLDocType"); Object.defineProperty(XMLDocType2.prototype, "entities", { get: function() { var child, i, len, nodes, ref; nodes = {}; ref = this.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; if (child.type === NodeType.EntityDeclaration && !child.pe) { nodes[child.name] = child; } } return new XMLNamedNodeMap(nodes); } }); Object.defineProperty(XMLDocType2.prototype, "notations", { get: function() { var child, i, len, nodes, ref; nodes = {}; ref = this.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; if (child.type === NodeType.NotationDeclaration) { nodes[child.name] = child; } } return new XMLNamedNodeMap(nodes); } }); Object.defineProperty(XMLDocType2.prototype, "publicId", { get: function() { return this.pubID; } }); Object.defineProperty(XMLDocType2.prototype, "systemId", { get: function() { return this.sysID; } }); Object.defineProperty(XMLDocType2.prototype, "internalSubset", { get: function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); XMLDocType2.prototype.element = function(name, value) { var child; child = new XMLDTDElement(this, name, value); this.children.push(child); return this; }; XMLDocType2.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { var child; child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); this.children.push(child); return this; }; XMLDocType2.prototype.entity = function(name, value) { var child; child = new XMLDTDEntity(this, false, name, value); this.children.push(child); return this; }; XMLDocType2.prototype.pEntity = function(name, value) { var child; child = new XMLDTDEntity(this, true, name, value); this.children.push(child); return this; }; XMLDocType2.prototype.notation = function(name, value) { var child; child = new XMLDTDNotation(this, name, value); this.children.push(child); return this; }; XMLDocType2.prototype.toString = function(options) { return this.options.writer.docType(this, this.options.writer.filterOptions(options)); }; XMLDocType2.prototype.ele = function(name, value) { return this.element(name, value); }; XMLDocType2.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); }; XMLDocType2.prototype.ent = function(name, value) { return this.entity(name, value); }; XMLDocType2.prototype.pent = function(name, value) { return this.pEntity(name, value); }; XMLDocType2.prototype.not = function(name, value) { return this.notation(name, value); }; XMLDocType2.prototype.up = function() { return this.root() || this.documentObject; }; XMLDocType2.prototype.isEqualNode = function(node) { if (!XMLDocType2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { return false; } if (node.name !== this.name) { return false; } if (node.publicId !== this.publicId) { return false; } if (node.systemId !== this.systemId) { return false; } return true; }; return XMLDocType2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLRaw.js var require_XMLRaw = __commonJS({ "node_modules/xmlbuilder/lib/XMLRaw.js"(exports, module2) { (function() { var NodeType, XMLNode, XMLRaw, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLNode = require_XMLNode(); module2.exports = XMLRaw = function(superClass) { extend(XMLRaw2, superClass); function XMLRaw2(parent, text) { XMLRaw2.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing raw text. " + this.debugInfo()); } this.type = NodeType.Raw; this.value = this.stringify.raw(text); } __name(XMLRaw2, "XMLRaw"); XMLRaw2.prototype.clone = function() { return Object.create(this); }; XMLRaw2.prototype.toString = function(options) { return this.options.writer.raw(this, this.options.writer.filterOptions(options)); }; return XMLRaw2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLText.js var require_XMLText = __commonJS({ "node_modules/xmlbuilder/lib/XMLText.js"(exports, module2) { (function() { var NodeType, XMLCharacterData, XMLText, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLText = function(superClass) { extend(XMLText2, superClass); function XMLText2(parent, text) { XMLText2.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing element text. " + this.debugInfo()); } this.name = "#text"; this.type = NodeType.Text; this.value = this.stringify.text(text); } __name(XMLText2, "XMLText"); Object.defineProperty(XMLText2.prototype, "isElementContentWhitespace", { get: function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); Object.defineProperty(XMLText2.prototype, "wholeText", { get: function() { var next, prev, str; str = ""; prev = this.previousSibling; while (prev) { str = prev.data + str; prev = prev.previousSibling; } str += this.data; next = this.nextSibling; while (next) { str = str + next.data; next = next.nextSibling; } return str; } }); XMLText2.prototype.clone = function() { return Object.create(this); }; XMLText2.prototype.toString = function(options) { return this.options.writer.text(this, this.options.writer.filterOptions(options)); }; XMLText2.prototype.splitText = function(offset) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLText2.prototype.replaceWholeText = function(content) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; return XMLText2; }(XMLCharacterData); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLProcessingInstruction.js var require_XMLProcessingInstruction = __commonJS({ "node_modules/xmlbuilder/lib/XMLProcessingInstruction.js"(exports, module2) { (function() { var NodeType, XMLCharacterData, XMLProcessingInstruction, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLProcessingInstruction = function(superClass) { extend(XMLProcessingInstruction2, superClass); function XMLProcessingInstruction2(parent, target, value) { XMLProcessingInstruction2.__super__.constructor.call(this, parent); if (target == null) { throw new Error("Missing instruction target. " + this.debugInfo()); } this.type = NodeType.ProcessingInstruction; this.target = this.stringify.insTarget(target); this.name = this.target; if (value) { this.value = this.stringify.insValue(value); } } __name(XMLProcessingInstruction2, "XMLProcessingInstruction"); XMLProcessingInstruction2.prototype.clone = function() { return Object.create(this); }; XMLProcessingInstruction2.prototype.toString = function(options) { return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options)); }; XMLProcessingInstruction2.prototype.isEqualNode = function(node) { if (!XMLProcessingInstruction2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { return false; } if (node.target !== this.target) { return false; } return true; }; return XMLProcessingInstruction2; }(XMLCharacterData); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDummy.js var require_XMLDummy = __commonJS({ "node_modules/xmlbuilder/lib/XMLDummy.js"(exports, module2) { (function() { var NodeType, XMLDummy, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDummy = function(superClass) { extend(XMLDummy2, superClass); function XMLDummy2(parent) { XMLDummy2.__super__.constructor.call(this, parent); this.type = NodeType.Dummy; } __name(XMLDummy2, "XMLDummy"); XMLDummy2.prototype.clone = function() { return Object.create(this); }; XMLDummy2.prototype.toString = function(options) { return ""; }; return XMLDummy2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLNodeList.js var require_XMLNodeList = __commonJS({ "node_modules/xmlbuilder/lib/XMLNodeList.js"(exports, module2) { (function() { var XMLNodeList; module2.exports = XMLNodeList = function() { function XMLNodeList2(nodes) { this.nodes = nodes; } __name(XMLNodeList2, "XMLNodeList"); Object.defineProperty(XMLNodeList2.prototype, "length", { get: function() { return this.nodes.length || 0; } }); XMLNodeList2.prototype.clone = function() { return this.nodes = null; }; XMLNodeList2.prototype.item = function(index) { return this.nodes[index] || null; }; return XMLNodeList2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/DocumentPosition.js var require_DocumentPosition = __commonJS({ "node_modules/xmlbuilder/lib/DocumentPosition.js"(exports, module2) { (function() { module2.exports = { Disconnected: 1, Preceding: 2, Following: 4, Contains: 8, ContainedBy: 16, ImplementationSpecific: 32 }; }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLNode.js var require_XMLNode = __commonJS({ "node_modules/xmlbuilder/lib/XMLNode.js"(exports, module2) { (function() { var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1, hasProp = {}.hasOwnProperty; ref1 = require_Utility(), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue; XMLElement = null; XMLCData = null; XMLComment = null; XMLDeclaration = null; XMLDocType = null; XMLRaw = null; XMLText = null; XMLProcessingInstruction = null; XMLDummy = null; NodeType = null; XMLNodeList = null; XMLNamedNodeMap = null; DocumentPosition = null; module2.exports = XMLNode = function() { function XMLNode2(parent1) { this.parent = parent1; if (this.parent) { this.options = this.parent.options; this.stringify = this.parent.stringify; } this.value = null; this.children = []; this.baseURI = null; if (!XMLElement) { XMLElement = require_XMLElement(); XMLCData = require_XMLCData(); XMLComment = require_XMLComment(); XMLDeclaration = require_XMLDeclaration(); XMLDocType = require_XMLDocType(); XMLRaw = require_XMLRaw(); XMLText = require_XMLText(); XMLProcessingInstruction = require_XMLProcessingInstruction(); XMLDummy = require_XMLDummy(); NodeType = require_NodeType(); XMLNodeList = require_XMLNodeList(); XMLNamedNodeMap = require_XMLNamedNodeMap(); DocumentPosition = require_DocumentPosition(); } } __name(XMLNode2, "XMLNode"); Object.defineProperty(XMLNode2.prototype, "nodeName", { get: function() { return this.name; } }); Object.defineProperty(XMLNode2.prototype, "nodeType", { get: function() { return this.type; } }); Object.defineProperty(XMLNode2.prototype, "nodeValue", { get: function() { return this.value; } }); Object.defineProperty(XMLNode2.prototype, "parentNode", { get: function() { return this.parent; } }); Object.defineProperty(XMLNode2.prototype, "childNodes", { get: function() { if (!this.childNodeList || !this.childNodeList.nodes) { this.childNodeList = new XMLNodeList(this.children); } return this.childNodeList; } }); Object.defineProperty(XMLNode2.prototype, "firstChild", { get: function() { return this.children[0] || null; } }); Object.defineProperty(XMLNode2.prototype, "lastChild", { get: function() { return this.children[this.children.length - 1] || null; } }); Object.defineProperty(XMLNode2.prototype, "previousSibling", { get: function() { var i; i = this.parent.children.indexOf(this); return this.parent.children[i - 1] || null; } }); Object.defineProperty(XMLNode2.prototype, "nextSibling", { get: function() { var i; i = this.parent.children.indexOf(this); return this.parent.children[i + 1] || null; } }); Object.defineProperty(XMLNode2.prototype, "ownerDocument", { get: function() { return this.document() || null; } }); Object.defineProperty(XMLNode2.prototype, "textContent", { get: function() { var child, j, len, ref2, str; if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { str = ""; ref2 = this.children; for (j = 0, len = ref2.length; j < len; j++) { child = ref2[j]; if (child.textContent) { str += child.textContent; } } return str; } else { return null; } }, set: function(value) { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); XMLNode2.prototype.setParent = function(parent) { var child, j, len, ref2, results; this.parent = parent; if (parent) { this.options = parent.options; this.stringify = parent.stringify; } ref2 = this.children; results = []; for (j = 0, len = ref2.length; j < len; j++) { child = ref2[j]; results.push(child.setParent(this)); } return results; }; XMLNode2.prototype.element = function(name, attributes, text) { var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val; lastChild = null; if (attributes === null && text == null) { ref2 = [{}, null], attributes = ref2[0], text = ref2[1]; } if (attributes == null) { attributes = {}; } attributes = getValue(attributes); if (!isObject(attributes)) { ref3 = [attributes, text], text = ref3[0], attributes = ref3[1]; } if (name != null) { name = getValue(name); } if (Array.isArray(name)) { for (j = 0, len = name.length; j < len; j++) { item = name[j]; lastChild = this.element(item); } } else if (isFunction(name)) { lastChild = this.element(name.apply()); } else if (isObject(name)) { for (key in name) { if (!hasProp.call(name, key)) continue; val = name[key]; if (isFunction(val)) { val = val.apply(); } if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { lastChild = this.dummy(); } else if (isObject(val) && isEmpty(val)) { lastChild = this.element(key); } else if (!this.options.keepNullNodes && val == null) { lastChild = this.dummy(); } else if (!this.options.separateArrayItems && Array.isArray(val)) { for (k = 0, len1 = val.length; k < len1; k++) { item = val[k]; childNode = {}; childNode[key] = item; lastChild = this.element(childNode); } } else if (isObject(val)) { if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { lastChild = this.element(val); } else { lastChild = this.element(key); lastChild.element(val); } } else { lastChild = this.element(key, val); } } } else if (!this.options.keepNullNodes && text === null) { lastChild = this.dummy(); } else { if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { lastChild = this.text(text); } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { lastChild = this.cdata(text); } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { lastChild = this.comment(text); } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { lastChild = this.raw(text); } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); } else { lastChild = this.node(name, attributes, text); } } if (lastChild == null) { throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); } return lastChild; }; XMLNode2.prototype.insertBefore = function(name, attributes, text) { var child, i, newChild, refChild, removed; if (name != null ? name.type : void 0) { newChild = name; refChild = attributes; newChild.setParent(this); if (refChild) { i = children.indexOf(refChild); removed = children.splice(i); children.push(newChild); Array.prototype.push.apply(children, removed); } else { children.push(newChild); } return newChild; } else { if (this.isRoot) { throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); } i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i); child = this.parent.element(name, attributes, text); Array.prototype.push.apply(this.parent.children, removed); return child; } }; XMLNode2.prototype.insertAfter = function(name, attributes, text) { var child, i, removed; if (this.isRoot) { throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); } i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i + 1); child = this.parent.element(name, attributes, text); Array.prototype.push.apply(this.parent.children, removed); return child; }; XMLNode2.prototype.remove = function() { var i, ref2; if (this.isRoot) { throw new Error("Cannot remove the root element. " + this.debugInfo()); } i = this.parent.children.indexOf(this); [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2; return this.parent; }; XMLNode2.prototype.node = function(name, attributes, text) { var child, ref2; if (name != null) { name = getValue(name); } attributes || (attributes = {}); attributes = getValue(attributes); if (!isObject(attributes)) { ref2 = [attributes, text], text = ref2[0], attributes = ref2[1]; } child = new XMLElement(this, name, attributes); if (text != null) { child.text(text); } this.children.push(child); return child; }; XMLNode2.prototype.text = function(value) { var child; if (isObject(value)) { this.element(value); } child = new XMLText(this, value); this.children.push(child); return this; }; XMLNode2.prototype.cdata = function(value) { var child; child = new XMLCData(this, value); this.children.push(child); return this; }; XMLNode2.prototype.comment = function(value) { var child; child = new XMLComment(this, value); this.children.push(child); return this; }; XMLNode2.prototype.commentBefore = function(value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i); child = this.parent.comment(value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode2.prototype.commentAfter = function(value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i + 1); child = this.parent.comment(value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode2.prototype.raw = function(value) { var child; child = new XMLRaw(this, value); this.children.push(child); return this; }; XMLNode2.prototype.dummy = function() { var child; child = new XMLDummy(this); return child; }; XMLNode2.prototype.instruction = function(target, value) { var insTarget, insValue, instruction, j, len; if (target != null) { target = getValue(target); } if (value != null) { value = getValue(value); } if (Array.isArray(target)) { for (j = 0, len = target.length; j < len; j++) { insTarget = target[j]; this.instruction(insTarget); } } else if (isObject(target)) { for (insTarget in target) { if (!hasProp.call(target, insTarget)) continue; insValue = target[insTarget]; this.instruction(insTarget, insValue); } } else { if (isFunction(value)) { value = value.apply(); } instruction = new XMLProcessingInstruction(this, target, value); this.children.push(instruction); } return this; }; XMLNode2.prototype.instructionBefore = function(target, value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i); child = this.parent.instruction(target, value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode2.prototype.instructionAfter = function(target, value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i + 1); child = this.parent.instruction(target, value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode2.prototype.declaration = function(version3, encoding, standalone) { var doc, xmldec; doc = this.document(); xmldec = new XMLDeclaration(doc, version3, encoding, standalone); if (doc.children.length === 0) { doc.children.unshift(xmldec); } else if (doc.children[0].type === NodeType.Declaration) { doc.children[0] = xmldec; } else { doc.children.unshift(xmldec); } return doc.root() || doc; }; XMLNode2.prototype.dtd = function(pubID, sysID) { var child, doc, doctype, i, j, k, len, len1, ref2, ref3; doc = this.document(); doctype = new XMLDocType(doc, pubID, sysID); ref2 = doc.children; for (i = j = 0, len = ref2.length; j < len; i = ++j) { child = ref2[i]; if (child.type === NodeType.DocType) { doc.children[i] = doctype; return doctype; } } ref3 = doc.children; for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { child = ref3[i]; if (child.isRoot) { doc.children.splice(i, 0, doctype); return doctype; } } doc.children.push(doctype); return doctype; }; XMLNode2.prototype.up = function() { if (this.isRoot) { throw new Error("The root node has no parent. Use doc() if you need to get the document object."); } return this.parent; }; XMLNode2.prototype.root = function() { var node; node = this; while (node) { if (node.type === NodeType.Document) { return node.rootObject; } else if (node.isRoot) { return node; } else { node = node.parent; } } }; XMLNode2.prototype.document = function() { var node; node = this; while (node) { if (node.type === NodeType.Document) { return node; } else { node = node.parent; } } }; XMLNode2.prototype.end = function(options) { return this.document().end(options); }; XMLNode2.prototype.prev = function() { var i; i = this.parent.children.indexOf(this); if (i < 1) { throw new Error("Already at the first node. " + this.debugInfo()); } return this.parent.children[i - 1]; }; XMLNode2.prototype.next = function() { var i; i = this.parent.children.indexOf(this); if (i === -1 || i === this.parent.children.length - 1) { throw new Error("Already at the last node. " + this.debugInfo()); } return this.parent.children[i + 1]; }; XMLNode2.prototype.importDocument = function(doc) { var clonedRoot; clonedRoot = doc.root().clone(); clonedRoot.parent = this; clonedRoot.isRoot = false; this.children.push(clonedRoot); return this; }; XMLNode2.prototype.debugInfo = function(name) { var ref2, ref3; name = name || this.name; if (name == null && !((ref2 = this.parent) != null ? ref2.name : void 0)) { return ""; } else if (name == null) { return "parent: <" + this.parent.name + ">"; } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { return "node: <" + name + ">"; } else { return "node: <" + name + ">, parent: <" + this.parent.name + ">"; } }; XMLNode2.prototype.ele = function(name, attributes, text) { return this.element(name, attributes, text); }; XMLNode2.prototype.nod = function(name, attributes, text) { return this.node(name, attributes, text); }; XMLNode2.prototype.txt = function(value) { return this.text(value); }; XMLNode2.prototype.dat = function(value) { return this.cdata(value); }; XMLNode2.prototype.com = function(value) { return this.comment(value); }; XMLNode2.prototype.ins = function(target, value) { return this.instruction(target, value); }; XMLNode2.prototype.doc = function() { return this.document(); }; XMLNode2.prototype.dec = function(version3, encoding, standalone) { return this.declaration(version3, encoding, standalone); }; XMLNode2.prototype.e = function(name, attributes, text) { return this.element(name, attributes, text); }; XMLNode2.prototype.n = function(name, attributes, text) { return this.node(name, attributes, text); }; XMLNode2.prototype.t = function(value) { return this.text(value); }; XMLNode2.prototype.d = function(value) { return this.cdata(value); }; XMLNode2.prototype.c = function(value) { return this.comment(value); }; XMLNode2.prototype.r = function(value) { return this.raw(value); }; XMLNode2.prototype.i = function(target, value) { return this.instruction(target, value); }; XMLNode2.prototype.u = function() { return this.up(); }; XMLNode2.prototype.importXMLBuilder = function(doc) { return this.importDocument(doc); }; XMLNode2.prototype.replaceChild = function(newChild, oldChild) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.removeChild = function(oldChild) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.appendChild = function(newChild) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.hasChildNodes = function() { return this.children.length !== 0; }; XMLNode2.prototype.cloneNode = function(deep) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.normalize = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.isSupported = function(feature, version3) { return true; }; XMLNode2.prototype.hasAttributes = function() { return this.attribs.length !== 0; }; XMLNode2.prototype.compareDocumentPosition = function(other) { var ref, res; ref = this; if (ref === other) { return 0; } else if (this.document() !== other.document()) { res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; if (Math.random() < 0.5) { res |= DocumentPosition.Preceding; } else { res |= DocumentPosition.Following; } return res; } else if (ref.isAncestor(other)) { return DocumentPosition.Contains | DocumentPosition.Preceding; } else if (ref.isDescendant(other)) { return DocumentPosition.Contains | DocumentPosition.Following; } else if (ref.isPreceding(other)) { return DocumentPosition.Preceding; } else { return DocumentPosition.Following; } }; XMLNode2.prototype.isSameNode = function(other) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.lookupPrefix = function(namespaceURI) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.isDefaultNamespace = function(namespaceURI) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.lookupNamespaceURI = function(prefix) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.isEqualNode = function(node) { var i, j, ref2; if (node.nodeType !== this.nodeType) { return false; } if (node.children.length !== this.children.length) { return false; } for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) { if (!this.children[i].isEqualNode(node.children[i])) { return false; } } return true; }; XMLNode2.prototype.getFeature = function(feature, version3) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.setUserData = function(key, data, handler) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.getUserData = function(key) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.contains = function(other) { if (!other) { return false; } return other === this || this.isDescendant(other); }; XMLNode2.prototype.isDescendant = function(node) { var child, isDescendantChild, j, len, ref2; ref2 = this.children; for (j = 0, len = ref2.length; j < len; j++) { child = ref2[j]; if (node === child) { return true; } isDescendantChild = child.isDescendant(node); if (isDescendantChild) { return true; } } return false; }; XMLNode2.prototype.isAncestor = function(node) { return node.isDescendant(this); }; XMLNode2.prototype.isPreceding = function(node) { var nodePos, thisPos; nodePos = this.treePosition(node); thisPos = this.treePosition(this); if (nodePos === -1 || thisPos === -1) { return false; } else { return nodePos < thisPos; } }; XMLNode2.prototype.isFollowing = function(node) { var nodePos, thisPos; nodePos = this.treePosition(node); thisPos = this.treePosition(this); if (nodePos === -1 || thisPos === -1) { return false; } else { return nodePos > thisPos; } }; XMLNode2.prototype.treePosition = function(node) { var found, pos; pos = 0; found = false; this.foreachTreeNode(this.document(), function(childNode) { pos++; if (!found && childNode === node) { return found = true; } }); if (found) { return pos; } else { return -1; } }; XMLNode2.prototype.foreachTreeNode = function(node, func) { var child, j, len, ref2, res; node || (node = this.document()); ref2 = node.children; for (j = 0, len = ref2.length; j < len; j++) { child = ref2[j]; if (res = func(child)) { return res; } else { res = this.foreachTreeNode(child, func); if (res) { return res; } } } }; return XMLNode2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLStringifier.js var require_XMLStringifier = __commonJS({ "node_modules/xmlbuilder/lib/XMLStringifier.js"(exports, module2) { (function() { var XMLStringifier, bind = /* @__PURE__ */ __name(function(fn, me) { return function() { return fn.apply(me, arguments); }; }, "bind"), hasProp = {}.hasOwnProperty; module2.exports = XMLStringifier = function() { function XMLStringifier2(options) { this.assertLegalName = bind(this.assertLegalName, this); this.assertLegalChar = bind(this.assertLegalChar, this); var key, ref, value; options || (options = {}); this.options = options; if (!this.options.version) { this.options.version = "1.0"; } ref = options.stringify || {}; for (key in ref) { if (!hasProp.call(ref, key)) continue; value = ref[key]; this[key] = value; } } __name(XMLStringifier2, "XMLStringifier"); XMLStringifier2.prototype.name = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalName("" + val || ""); }; XMLStringifier2.prototype.text = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar(this.textEscape("" + val || "")); }; XMLStringifier2.prototype.cdata = function(val) { if (this.options.noValidation) { return val; } val = "" + val || ""; val = val.replace("]]>", "]]]]>"); return this.assertLegalChar(val); }; XMLStringifier2.prototype.comment = function(val) { if (this.options.noValidation) { return val; } val = "" + val || ""; if (val.match(/--/)) { throw new Error("Comment text cannot contain double-hypen: " + val); } return this.assertLegalChar(val); }; XMLStringifier2.prototype.raw = function(val) { if (this.options.noValidation) { return val; } return "" + val || ""; }; XMLStringifier2.prototype.attValue = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar(this.attEscape(val = "" + val || "")); }; XMLStringifier2.prototype.insTarget = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.insValue = function(val) { if (this.options.noValidation) { return val; } val = "" + val || ""; if (val.match(/\?>/)) { throw new Error("Invalid processing instruction value: " + val); } return this.assertLegalChar(val); }; XMLStringifier2.prototype.xmlVersion = function(val) { if (this.options.noValidation) { return val; } val = "" + val || ""; if (!val.match(/1\.[0-9]+/)) { throw new Error("Invalid version number: " + val); } return val; }; XMLStringifier2.prototype.xmlEncoding = function(val) { if (this.options.noValidation) { return val; } val = "" + val || ""; if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) { throw new Error("Invalid encoding: " + val); } return this.assertLegalChar(val); }; XMLStringifier2.prototype.xmlStandalone = function(val) { if (this.options.noValidation) { return val; } if (val) { return "yes"; } else { return "no"; } }; XMLStringifier2.prototype.dtdPubID = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdSysID = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdElementValue = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdAttType = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdAttDefault = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdEntityValue = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdNData = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.convertAttKey = "@"; XMLStringifier2.prototype.convertPIKey = "?"; XMLStringifier2.prototype.convertTextKey = "#text"; XMLStringifier2.prototype.convertCDataKey = "#cdata"; XMLStringifier2.prototype.convertCommentKey = "#comment"; XMLStringifier2.prototype.convertRawKey = "#raw"; XMLStringifier2.prototype.assertLegalChar = function(str) { var regex, res; if (this.options.noValidation) { return str; } regex = ""; if (this.options.version === "1.0") { regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; if (res = str.match(regex)) { throw new Error("Invalid character in string: " + str + " at index " + res.index); } } else if (this.options.version === "1.1") { regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; if (res = str.match(regex)) { throw new Error("Invalid character in string: " + str + " at index " + res.index); } } return str; }; XMLStringifier2.prototype.assertLegalName = function(str) { var regex; if (this.options.noValidation) { return str; } this.assertLegalChar(str); regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; if (!str.match(regex)) { throw new Error("Invalid character in name"); } return str; }; XMLStringifier2.prototype.textEscape = function(str) { var ampregex; if (this.options.noValidation) { return str; } ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; return str.replace(ampregex, "&").replace(//g, ">").replace(/\r/g, " "); }; XMLStringifier2.prototype.attEscape = function(str) { var ampregex; if (this.options.noValidation) { return str; } ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; return str.replace(ampregex, "&").replace(/ 0) { return new Array(indentLevel).join(options.indent); } } return ""; }; XMLWriterBase2.prototype.endline = function(node, options, level) { if (!options.pretty || options.suppressPrettyCount) { return ""; } else { return options.newline; } }; XMLWriterBase2.prototype.attribute = function(att, options, level) { var r; this.openAttribute(att, options, level); r = " " + att.name + '="' + att.value + '"'; this.closeAttribute(att, options, level); return r; }; XMLWriterBase2.prototype.cdata = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.comment = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.declaration = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + ""; r += this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.docType = function(node, options, level) { var child, i, len, r, ref; level || (level = 0); this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level); r += " 0) { r += " ["; r += this.endline(node, options, level); options.state = WriterState.InsideTag; ref = node.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; r += this.writeChildNode(child, options, level + 1); } options.state = WriterState.CloseTag; r += "]"; } options.state = WriterState.CloseTag; r += options.spaceBeforeSlash + ">"; r += this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.element = function(node, options, level) { var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2; level || (level = 0); prettySuppressed = false; r = ""; this.openNode(node, options, level); options.state = WriterState.OpenTag; r += this.indent(node, options, level) + "<" + node.name; ref = node.attribs; for (name in ref) { if (!hasProp.call(ref, name)) continue; att = ref[name]; r += this.attribute(att, options, level); } childNodeCount = node.children.length; firstChildNode = childNodeCount === 0 ? null : node.children[0]; if (childNodeCount === 0 || node.children.every(function(e) { return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ""; })) { if (options.allowEmpty) { r += ">"; options.state = WriterState.CloseTag; r += "" + this.endline(node, options, level); } else { options.state = WriterState.CloseTag; r += options.spaceBeforeSlash + "/>" + this.endline(node, options, level); } } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && firstChildNode.value != null) { r += ">"; options.state = WriterState.InsideTag; options.suppressPrettyCount++; prettySuppressed = true; r += this.writeChildNode(firstChildNode, options, level + 1); options.suppressPrettyCount--; prettySuppressed = false; options.state = WriterState.CloseTag; r += "" + this.endline(node, options, level); } else { if (options.dontPrettyTextNodes) { ref1 = node.children; for (i = 0, len = ref1.length; i < len; i++) { child = ref1[i]; if ((child.type === NodeType.Text || child.type === NodeType.Raw) && child.value != null) { options.suppressPrettyCount++; prettySuppressed = true; break; } } } r += ">" + this.endline(node, options, level); options.state = WriterState.InsideTag; ref2 = node.children; for (j = 0, len1 = ref2.length; j < len1; j++) { child = ref2[j]; r += this.writeChildNode(child, options, level + 1); } options.state = WriterState.CloseTag; r += this.indent(node, options, level) + ""; if (prettySuppressed) { options.suppressPrettyCount--; } r += this.endline(node, options, level); options.state = WriterState.None; } this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.writeChildNode = function(node, options, level) { switch (node.type) { case NodeType.CData: return this.cdata(node, options, level); case NodeType.Comment: return this.comment(node, options, level); case NodeType.Element: return this.element(node, options, level); case NodeType.Raw: return this.raw(node, options, level); case NodeType.Text: return this.text(node, options, level); case NodeType.ProcessingInstruction: return this.processingInstruction(node, options, level); case NodeType.Dummy: return ""; case NodeType.Declaration: return this.declaration(node, options, level); case NodeType.DocType: return this.docType(node, options, level); case NodeType.AttributeDeclaration: return this.dtdAttList(node, options, level); case NodeType.ElementDeclaration: return this.dtdElement(node, options, level); case NodeType.EntityDeclaration: return this.dtdEntity(node, options, level); case NodeType.NotationDeclaration: return this.dtdNotation(node, options, level); default: throw new Error("Unknown XML node type: " + node.constructor.name); } }; XMLWriterBase2.prototype.processingInstruction = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + ""; r += this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.raw = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level); options.state = WriterState.InsideTag; r += node.value; options.state = WriterState.CloseTag; r += this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.text = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level); options.state = WriterState.InsideTag; r += node.value; options.state = WriterState.CloseTag; r += this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.dtdAttList = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.dtdElement = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.dtdEntity = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.dtdNotation = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.openNode = function(node, options, level) { }; XMLWriterBase2.prototype.closeNode = function(node, options, level) { }; XMLWriterBase2.prototype.openAttribute = function(att, options, level) { }; XMLWriterBase2.prototype.closeAttribute = function(att, options, level) { }; return XMLWriterBase2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLStringWriter.js var require_XMLStringWriter = __commonJS({ "node_modules/xmlbuilder/lib/XMLStringWriter.js"(exports, module2) { (function() { var XMLStringWriter, XMLWriterBase, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; XMLWriterBase = require_XMLWriterBase(); module2.exports = XMLStringWriter = function(superClass) { extend(XMLStringWriter2, superClass); function XMLStringWriter2(options) { XMLStringWriter2.__super__.constructor.call(this, options); } __name(XMLStringWriter2, "XMLStringWriter"); XMLStringWriter2.prototype.document = function(doc, options) { var child, i, len, r, ref; options = this.filterOptions(options); r = ""; ref = doc.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; r += this.writeChildNode(child, options, 0); } if (options.pretty && r.slice(-options.newline.length) === options.newline) { r = r.slice(0, -options.newline.length); } return r; }; return XMLStringWriter2; }(XMLWriterBase); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDocument.js var require_XMLDocument = __commonJS({ "node_modules/xmlbuilder/lib/XMLDocument.js"(exports, module2) { (function() { var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; isPlainObject = require_Utility().isPlainObject; XMLDOMImplementation = require_XMLDOMImplementation(); XMLDOMConfiguration = require_XMLDOMConfiguration(); XMLNode = require_XMLNode(); NodeType = require_NodeType(); XMLStringifier = require_XMLStringifier(); XMLStringWriter = require_XMLStringWriter(); module2.exports = XMLDocument = function(superClass) { extend(XMLDocument2, superClass); function XMLDocument2(options) { XMLDocument2.__super__.constructor.call(this, null); this.name = "#document"; this.type = NodeType.Document; this.documentURI = null; this.domConfig = new XMLDOMConfiguration(); options || (options = {}); if (!options.writer) { options.writer = new XMLStringWriter(); } this.options = options; this.stringify = new XMLStringifier(options); } __name(XMLDocument2, "XMLDocument"); Object.defineProperty(XMLDocument2.prototype, "implementation", { value: new XMLDOMImplementation() }); Object.defineProperty(XMLDocument2.prototype, "doctype", { get: function() { var child, i, len, ref; ref = this.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; if (child.type === NodeType.DocType) { return child; } } return null; } }); Object.defineProperty(XMLDocument2.prototype, "documentElement", { get: function() { return this.rootObject || null; } }); Object.defineProperty(XMLDocument2.prototype, "inputEncoding", { get: function() { return null; } }); Object.defineProperty(XMLDocument2.prototype, "strictErrorChecking", { get: function() { return false; } }); Object.defineProperty(XMLDocument2.prototype, "xmlEncoding", { get: function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].encoding; } else { return null; } } }); Object.defineProperty(XMLDocument2.prototype, "xmlStandalone", { get: function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].standalone === "yes"; } else { return false; } } }); Object.defineProperty(XMLDocument2.prototype, "xmlVersion", { get: function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].version; } else { return "1.0"; } } }); Object.defineProperty(XMLDocument2.prototype, "URL", { get: function() { return this.documentURI; } }); Object.defineProperty(XMLDocument2.prototype, "origin", { get: function() { return null; } }); Object.defineProperty(XMLDocument2.prototype, "compatMode", { get: function() { return null; } }); Object.defineProperty(XMLDocument2.prototype, "characterSet", { get: function() { return null; } }); Object.defineProperty(XMLDocument2.prototype, "contentType", { get: function() { return null; } }); XMLDocument2.prototype.end = function(writer) { var writerOptions; writerOptions = {}; if (!writer) { writer = this.options.writer; } else if (isPlainObject(writer)) { writerOptions = writer; writer = this.options.writer; } return writer.document(this, writer.filterOptions(writerOptions)); }; XMLDocument2.prototype.toString = function(options) { return this.options.writer.document(this, this.options.writer.filterOptions(options)); }; XMLDocument2.prototype.createElement = function(tagName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createDocumentFragment = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createTextNode = function(data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createComment = function(data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createCDATASection = function(data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createProcessingInstruction = function(target, data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createAttribute = function(name) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createEntityReference = function(name) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.getElementsByTagName = function(tagname) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.importNode = function(importedNode, deep) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createElementNS = function(namespaceURI, qualifiedName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createAttributeNS = function(namespaceURI, qualifiedName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.getElementById = function(elementId) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.adoptNode = function(source) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.normalizeDocument = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.renameNode = function(node, namespaceURI, qualifiedName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.getElementsByClassName = function(classNames) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createEvent = function(eventInterface) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createRange = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createNodeIterator = function(root, whatToShow, filter) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createTreeWalker = function(root, whatToShow, filter) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; return XMLDocument2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDocumentCB.js var require_XMLDocumentCB = __commonJS({ "node_modules/xmlbuilder/lib/XMLDocumentCB.js"(exports, module2) { (function() { var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref, hasProp = {}.hasOwnProperty; ref = require_Utility(), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue; NodeType = require_NodeType(); XMLDocument = require_XMLDocument(); XMLElement = require_XMLElement(); XMLCData = require_XMLCData(); XMLComment = require_XMLComment(); XMLRaw = require_XMLRaw(); XMLText = require_XMLText(); XMLProcessingInstruction = require_XMLProcessingInstruction(); XMLDeclaration = require_XMLDeclaration(); XMLDocType = require_XMLDocType(); XMLDTDAttList = require_XMLDTDAttList(); XMLDTDEntity = require_XMLDTDEntity(); XMLDTDElement = require_XMLDTDElement(); XMLDTDNotation = require_XMLDTDNotation(); XMLAttribute = require_XMLAttribute(); XMLStringifier = require_XMLStringifier(); XMLStringWriter = require_XMLStringWriter(); WriterState = require_WriterState(); module2.exports = XMLDocumentCB = function() { function XMLDocumentCB2(options, onData, onEnd) { var writerOptions; this.name = "?xml"; this.type = NodeType.Document; options || (options = {}); writerOptions = {}; if (!options.writer) { options.writer = new XMLStringWriter(); } else if (isPlainObject(options.writer)) { writerOptions = options.writer; options.writer = new XMLStringWriter(); } this.options = options; this.writer = options.writer; this.writerOptions = this.writer.filterOptions(writerOptions); this.stringify = new XMLStringifier(options); this.onDataCallback = onData || function() { }; this.onEndCallback = onEnd || function() { }; this.currentNode = null; this.currentLevel = -1; this.openTags = {}; this.documentStarted = false; this.documentCompleted = false; this.root = null; } __name(XMLDocumentCB2, "XMLDocumentCB"); XMLDocumentCB2.prototype.createChildNode = function(node) { var att, attName, attributes, child, i, len, ref1, ref2; switch (node.type) { case NodeType.CData: this.cdata(node.value); break; case NodeType.Comment: this.comment(node.value); break; case NodeType.Element: attributes = {}; ref1 = node.attribs; for (attName in ref1) { if (!hasProp.call(ref1, attName)) continue; att = ref1[attName]; attributes[attName] = att.value; } this.node(node.name, attributes); break; case NodeType.Dummy: this.dummy(); break; case NodeType.Raw: this.raw(node.value); break; case NodeType.Text: this.text(node.value); break; case NodeType.ProcessingInstruction: this.instruction(node.target, node.value); break; default: throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name); } ref2 = node.children; for (i = 0, len = ref2.length; i < len; i++) { child = ref2[i]; this.createChildNode(child); if (child.type === NodeType.Element) { this.up(); } } return this; }; XMLDocumentCB2.prototype.dummy = function() { return this; }; XMLDocumentCB2.prototype.node = function(name, attributes, text) { var ref1; if (name == null) { throw new Error("Missing node name."); } if (this.root && this.currentLevel === -1) { throw new Error("Document can only have one root node. " + this.debugInfo(name)); } this.openCurrent(); name = getValue(name); if (attributes == null) { attributes = {}; } attributes = getValue(attributes); if (!isObject(attributes)) { ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; } this.currentNode = new XMLElement(this, name, attributes); this.currentNode.children = false; this.currentLevel++; this.openTags[this.currentLevel] = this.currentNode; if (text != null) { this.text(text); } return this; }; XMLDocumentCB2.prototype.element = function(name, attributes, text) { var child, i, len, oldValidationFlag, ref1, root; if (this.currentNode && this.currentNode.type === NodeType.DocType) { this.dtdElement.apply(this, arguments); } else { if (Array.isArray(name) || isObject(name) || isFunction(name)) { oldValidationFlag = this.options.noValidation; this.options.noValidation = true; root = new XMLDocument(this.options).element("TEMP_ROOT"); root.element(name); this.options.noValidation = oldValidationFlag; ref1 = root.children; for (i = 0, len = ref1.length; i < len; i++) { child = ref1[i]; this.createChildNode(child); if (child.type === NodeType.Element) { this.up(); } } } else { this.node(name, attributes, text); } } return this; }; XMLDocumentCB2.prototype.attribute = function(name, value) { var attName, attValue; if (!this.currentNode || this.currentNode.children) { throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name)); } if (name != null) { name = getValue(name); } if (isObject(name)) { for (attName in name) { if (!hasProp.call(name, attName)) continue; attValue = name[attName]; this.attribute(attName, attValue); } } else { if (isFunction(value)) { value = value.apply(); } if (this.options.keepNullAttributes && value == null) { this.currentNode.attribs[name] = new XMLAttribute(this, name, ""); } else if (value != null) { this.currentNode.attribs[name] = new XMLAttribute(this, name, value); } } return this; }; XMLDocumentCB2.prototype.text = function(value) { var node; this.openCurrent(); node = new XMLText(this, value); this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.cdata = function(value) { var node; this.openCurrent(); node = new XMLCData(this, value); this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.comment = function(value) { var node; this.openCurrent(); node = new XMLComment(this, value); this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.raw = function(value) { var node; this.openCurrent(); node = new XMLRaw(this, value); this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.instruction = function(target, value) { var i, insTarget, insValue, len, node; this.openCurrent(); if (target != null) { target = getValue(target); } if (value != null) { value = getValue(value); } if (Array.isArray(target)) { for (i = 0, len = target.length; i < len; i++) { insTarget = target[i]; this.instruction(insTarget); } } else if (isObject(target)) { for (insTarget in target) { if (!hasProp.call(target, insTarget)) continue; insValue = target[insTarget]; this.instruction(insTarget, insValue); } } else { if (isFunction(value)) { value = value.apply(); } node = new XMLProcessingInstruction(this, target, value); this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); } return this; }; XMLDocumentCB2.prototype.declaration = function(version3, encoding, standalone) { var node; this.openCurrent(); if (this.documentStarted) { throw new Error("declaration() must be the first node."); } node = new XMLDeclaration(this, version3, encoding, standalone); this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.doctype = function(root, pubID, sysID) { this.openCurrent(); if (root == null) { throw new Error("Missing root node name."); } if (this.root) { throw new Error("dtd() must come before the root node."); } this.currentNode = new XMLDocType(this, pubID, sysID); this.currentNode.rootNodeName = root; this.currentNode.children = false; this.currentLevel++; this.openTags[this.currentLevel] = this.currentNode; return this; }; XMLDocumentCB2.prototype.dtdElement = function(name, value) { var node; this.openCurrent(); node = new XMLDTDElement(this, name, value); this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { var node; this.openCurrent(); node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.entity = function(name, value) { var node; this.openCurrent(); node = new XMLDTDEntity(this, false, name, value); this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.pEntity = function(name, value) { var node; this.openCurrent(); node = new XMLDTDEntity(this, true, name, value); this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.notation = function(name, value) { var node; this.openCurrent(); node = new XMLDTDNotation(this, name, value); this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.up = function() { if (this.currentLevel < 0) { throw new Error("The document node has no parent."); } if (this.currentNode) { if (this.currentNode.children) { this.closeNode(this.currentNode); } else { this.openNode(this.currentNode); } this.currentNode = null; } else { this.closeNode(this.openTags[this.currentLevel]); } delete this.openTags[this.currentLevel]; this.currentLevel--; return this; }; XMLDocumentCB2.prototype.end = function() { while (this.currentLevel >= 0) { this.up(); } return this.onEnd(); }; XMLDocumentCB2.prototype.openCurrent = function() { if (this.currentNode) { this.currentNode.children = true; return this.openNode(this.currentNode); } }; XMLDocumentCB2.prototype.openNode = function(node) { var att, chunk, name, ref1; if (!node.isOpen) { if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) { this.root = node; } chunk = ""; if (node.type === NodeType.Element) { this.writerOptions.state = WriterState.OpenTag; chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "<" + node.name; ref1 = node.attribs; for (name in ref1) { if (!hasProp.call(ref1, name)) continue; att = ref1[name]; chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel); } chunk += (node.children ? ">" : "/>") + this.writer.endline(node, this.writerOptions, this.currentLevel); this.writerOptions.state = WriterState.InsideTag; } else { this.writerOptions.state = WriterState.OpenTag; chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ""; } chunk += this.writer.endline(node, this.writerOptions, this.currentLevel); } this.onData(chunk, this.currentLevel); return node.isOpen = true; } }; XMLDocumentCB2.prototype.closeNode = function(node) { var chunk; if (!node.isClosed) { chunk = ""; this.writerOptions.state = WriterState.CloseTag; if (node.type === NodeType.Element) { chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "" + this.writer.endline(node, this.writerOptions, this.currentLevel); } else { chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "]>" + this.writer.endline(node, this.writerOptions, this.currentLevel); } this.writerOptions.state = WriterState.None; this.onData(chunk, this.currentLevel); return node.isClosed = true; } }; XMLDocumentCB2.prototype.onData = function(chunk, level) { this.documentStarted = true; return this.onDataCallback(chunk, level + 1); }; XMLDocumentCB2.prototype.onEnd = function() { this.documentCompleted = true; return this.onEndCallback(); }; XMLDocumentCB2.prototype.debugInfo = function(name) { if (name == null) { return ""; } else { return "node: <" + name + ">"; } }; XMLDocumentCB2.prototype.ele = function() { return this.element.apply(this, arguments); }; XMLDocumentCB2.prototype.nod = function(name, attributes, text) { return this.node(name, attributes, text); }; XMLDocumentCB2.prototype.txt = function(value) { return this.text(value); }; XMLDocumentCB2.prototype.dat = function(value) { return this.cdata(value); }; XMLDocumentCB2.prototype.com = function(value) { return this.comment(value); }; XMLDocumentCB2.prototype.ins = function(target, value) { return this.instruction(target, value); }; XMLDocumentCB2.prototype.dec = function(version3, encoding, standalone) { return this.declaration(version3, encoding, standalone); }; XMLDocumentCB2.prototype.dtd = function(root, pubID, sysID) { return this.doctype(root, pubID, sysID); }; XMLDocumentCB2.prototype.e = function(name, attributes, text) { return this.element(name, attributes, text); }; XMLDocumentCB2.prototype.n = function(name, attributes, text) { return this.node(name, attributes, text); }; XMLDocumentCB2.prototype.t = function(value) { return this.text(value); }; XMLDocumentCB2.prototype.d = function(value) { return this.cdata(value); }; XMLDocumentCB2.prototype.c = function(value) { return this.comment(value); }; XMLDocumentCB2.prototype.r = function(value) { return this.raw(value); }; XMLDocumentCB2.prototype.i = function(target, value) { return this.instruction(target, value); }; XMLDocumentCB2.prototype.att = function() { if (this.currentNode && this.currentNode.type === NodeType.DocType) { return this.attList.apply(this, arguments); } else { return this.attribute.apply(this, arguments); } }; XMLDocumentCB2.prototype.a = function() { if (this.currentNode && this.currentNode.type === NodeType.DocType) { return this.attList.apply(this, arguments); } else { return this.attribute.apply(this, arguments); } }; XMLDocumentCB2.prototype.ent = function(name, value) { return this.entity(name, value); }; XMLDocumentCB2.prototype.pent = function(name, value) { return this.pEntity(name, value); }; XMLDocumentCB2.prototype.not = function(name, value) { return this.notation(name, value); }; return XMLDocumentCB2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLStreamWriter.js var require_XMLStreamWriter = __commonJS({ "node_modules/xmlbuilder/lib/XMLStreamWriter.js"(exports, module2) { (function() { var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLWriterBase = require_XMLWriterBase(); WriterState = require_WriterState(); module2.exports = XMLStreamWriter = function(superClass) { extend(XMLStreamWriter2, superClass); function XMLStreamWriter2(stream, options) { this.stream = stream; XMLStreamWriter2.__super__.constructor.call(this, options); } __name(XMLStreamWriter2, "XMLStreamWriter"); XMLStreamWriter2.prototype.endline = function(node, options, level) { if (node.isLastRootNode && options.state === WriterState.CloseTag) { return ""; } else { return XMLStreamWriter2.__super__.endline.call(this, node, options, level); } }; XMLStreamWriter2.prototype.document = function(doc, options) { var child, i, j, k, len, len1, ref, ref1, results; ref = doc.children; for (i = j = 0, len = ref.length; j < len; i = ++j) { child = ref[i]; child.isLastRootNode = i === doc.children.length - 1; } options = this.filterOptions(options); ref1 = doc.children; results = []; for (k = 0, len1 = ref1.length; k < len1; k++) { child = ref1[k]; results.push(this.writeChildNode(child, options, 0)); } return results; }; XMLStreamWriter2.prototype.attribute = function(att, options, level) { return this.stream.write(XMLStreamWriter2.__super__.attribute.call(this, att, options, level)); }; XMLStreamWriter2.prototype.cdata = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.cdata.call(this, node, options, level)); }; XMLStreamWriter2.prototype.comment = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.comment.call(this, node, options, level)); }; XMLStreamWriter2.prototype.declaration = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.declaration.call(this, node, options, level)); }; XMLStreamWriter2.prototype.docType = function(node, options, level) { var child, j, len, ref; level || (level = 0); this.openNode(node, options, level); options.state = WriterState.OpenTag; this.stream.write(this.indent(node, options, level)); this.stream.write(" 0) { this.stream.write(" ["); this.stream.write(this.endline(node, options, level)); options.state = WriterState.InsideTag; ref = node.children; for (j = 0, len = ref.length; j < len; j++) { child = ref[j]; this.writeChildNode(child, options, level + 1); } options.state = WriterState.CloseTag; this.stream.write("]"); } options.state = WriterState.CloseTag; this.stream.write(options.spaceBeforeSlash + ">"); this.stream.write(this.endline(node, options, level)); options.state = WriterState.None; return this.closeNode(node, options, level); }; XMLStreamWriter2.prototype.element = function(node, options, level) { var att, child, childNodeCount, firstChildNode, j, len, name, prettySuppressed, ref, ref1; level || (level = 0); this.openNode(node, options, level); options.state = WriterState.OpenTag; this.stream.write(this.indent(node, options, level) + "<" + node.name); ref = node.attribs; for (name in ref) { if (!hasProp.call(ref, name)) continue; att = ref[name]; this.attribute(att, options, level); } childNodeCount = node.children.length; firstChildNode = childNodeCount === 0 ? null : node.children[0]; if (childNodeCount === 0 || node.children.every(function(e) { return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ""; })) { if (options.allowEmpty) { this.stream.write(">"); options.state = WriterState.CloseTag; this.stream.write(""); } else { options.state = WriterState.CloseTag; this.stream.write(options.spaceBeforeSlash + "/>"); } } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && firstChildNode.value != null) { this.stream.write(">"); options.state = WriterState.InsideTag; options.suppressPrettyCount++; prettySuppressed = true; this.writeChildNode(firstChildNode, options, level + 1); options.suppressPrettyCount--; prettySuppressed = false; options.state = WriterState.CloseTag; this.stream.write(""); } else { this.stream.write(">" + this.endline(node, options, level)); options.state = WriterState.InsideTag; ref1 = node.children; for (j = 0, len = ref1.length; j < len; j++) { child = ref1[j]; this.writeChildNode(child, options, level + 1); } options.state = WriterState.CloseTag; this.stream.write(this.indent(node, options, level) + ""); } this.stream.write(this.endline(node, options, level)); options.state = WriterState.None; return this.closeNode(node, options, level); }; XMLStreamWriter2.prototype.processingInstruction = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.processingInstruction.call(this, node, options, level)); }; XMLStreamWriter2.prototype.raw = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.raw.call(this, node, options, level)); }; XMLStreamWriter2.prototype.text = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.text.call(this, node, options, level)); }; XMLStreamWriter2.prototype.dtdAttList = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.dtdAttList.call(this, node, options, level)); }; XMLStreamWriter2.prototype.dtdElement = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.dtdElement.call(this, node, options, level)); }; XMLStreamWriter2.prototype.dtdEntity = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.dtdEntity.call(this, node, options, level)); }; XMLStreamWriter2.prototype.dtdNotation = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.dtdNotation.call(this, node, options, level)); }; return XMLStreamWriter2; }(XMLWriterBase); }).call(exports); } }); // node_modules/xmlbuilder/lib/index.js var require_lib2 = __commonJS({ "node_modules/xmlbuilder/lib/index.js"(exports, module2) { (function() { var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref; ref = require_Utility(), assign = ref.assign, isFunction = ref.isFunction; XMLDOMImplementation = require_XMLDOMImplementation(); XMLDocument = require_XMLDocument(); XMLDocumentCB = require_XMLDocumentCB(); XMLStringWriter = require_XMLStringWriter(); XMLStreamWriter = require_XMLStreamWriter(); NodeType = require_NodeType(); WriterState = require_WriterState(); module2.exports.create = function(name, xmldec, doctype, options) { var doc, root; if (name == null) { throw new Error("Root element needs a name."); } options = assign({}, xmldec, doctype, options); doc = new XMLDocument(options); root = doc.element(name); if (!options.headless) { doc.declaration(options); if (options.pubID != null || options.sysID != null) { doc.dtd(options); } } return root; }; module2.exports.begin = function(options, onData, onEnd) { var ref1; if (isFunction(options)) { ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1]; options = {}; } if (onData) { return new XMLDocumentCB(options, onData, onEnd); } else { return new XMLDocument(options); } }; module2.exports.stringWriter = function(options) { return new XMLStringWriter(options); }; module2.exports.streamWriter = function(stream, options) { return new XMLStreamWriter(stream, options); }; module2.exports.implementation = new XMLDOMImplementation(); module2.exports.nodeType = NodeType; module2.exports.writerState = WriterState; }).call(exports); } }); // node_modules/xml2js/lib/builder.js var require_builder = __commonJS({ "node_modules/xml2js/lib/builder.js"(exports) { (function() { "use strict"; var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA, hasProp = {}.hasOwnProperty; builder = require_lib2(); defaults = require_defaults().defaults; requiresCDATA = /* @__PURE__ */ __name(function(entry) { return typeof entry === "string" && (entry.indexOf("&") >= 0 || entry.indexOf(">") >= 0 || entry.indexOf("<") >= 0); }, "requiresCDATA"); wrapCDATA = /* @__PURE__ */ __name(function(entry) { return ""; }, "wrapCDATA"); escapeCDATA = /* @__PURE__ */ __name(function(entry) { return entry.replace("]]>", "]]]]>"); }, "escapeCDATA"); exports.Builder = function() { function Builder(opts) { var key, ref, value; this.options = {}; ref = defaults["0.2"]; for (key in ref) { if (!hasProp.call(ref, key)) continue; value = ref[key]; this.options[key] = value; } for (key in opts) { if (!hasProp.call(opts, key)) continue; value = opts[key]; this.options[key] = value; } } __name(Builder, "Builder"); Builder.prototype.buildObject = function(rootObj) { var attrkey, charkey, render, rootElement, rootName; attrkey = this.options.attrkey; charkey = this.options.charkey; if (Object.keys(rootObj).length === 1 && this.options.rootName === defaults["0.2"].rootName) { rootName = Object.keys(rootObj)[0]; rootObj = rootObj[rootName]; } else { rootName = this.options.rootName; } render = function(_this) { return function(element, obj) { var attr, child, entry, index, key, value; if (typeof obj !== "object") { if (_this.options.cdata && requiresCDATA(obj)) { element.raw(wrapCDATA(obj)); } else { element.txt(obj); } } else if (Array.isArray(obj)) { for (index in obj) { if (!hasProp.call(obj, index)) continue; child = obj[index]; for (key in child) { entry = child[key]; element = render(element.ele(key), entry).up(); } } } else { for (key in obj) { if (!hasProp.call(obj, key)) continue; child = obj[key]; if (key === attrkey) { if (typeof child === "object") { for (attr in child) { value = child[attr]; element = element.att(attr, value); } } } else if (key === charkey) { if (_this.options.cdata && requiresCDATA(child)) { element = element.raw(wrapCDATA(child)); } else { element = element.txt(child); } } else if (Array.isArray(child)) { for (index in child) { if (!hasProp.call(child, index)) continue; entry = child[index]; if (typeof entry === "string") { if (_this.options.cdata && requiresCDATA(entry)) { element = element.ele(key).raw(wrapCDATA(entry)).up(); } else { element = element.ele(key, entry).up(); } } else { element = render(element.ele(key), entry).up(); } } } else if (typeof child === "object") { element = render(element.ele(key), child).up(); } else { if (typeof child === "string" && _this.options.cdata && requiresCDATA(child)) { element = element.ele(key).raw(wrapCDATA(child)).up(); } else { if (child == null) { child = ""; } element = element.ele(key, child.toString()).up(); } } } } return element; }; }(this); rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, { headless: this.options.headless, allowSurrogateChars: this.options.allowSurrogateChars }); return render(rootElement, rootObj).end(this.options.renderOpts); }; return Builder; }(); }).call(exports); } }); // node_modules/sax/lib/sax.js var require_sax = __commonJS({ "node_modules/sax/lib/sax.js"(exports) { (function(sax) { sax.parser = function(strict, opt) { return new SAXParser(strict, opt); }; sax.SAXParser = SAXParser; sax.SAXStream = SAXStream; sax.createStream = createStream; sax.MAX_BUFFER_LENGTH = 64 * 1024; var buffers = [ "comment", "sgmlDecl", "textNode", "tagName", "doctype", "procInstName", "procInstBody", "entity", "attribName", "attribValue", "cdata", "script" ]; sax.EVENTS = [ "text", "processinginstruction", "sgmldeclaration", "doctype", "comment", "opentagstart", "attribute", "opentag", "closetag", "opencdata", "cdata", "closecdata", "error", "end", "ready", "script", "opennamespace", "closenamespace" ]; function SAXParser(strict, opt) { if (!(this instanceof SAXParser)) { return new SAXParser(strict, opt); } var parser = this; clearBuffers(parser); parser.q = parser.c = ""; parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH; parser.opt = opt || {}; parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags; parser.looseCase = parser.opt.lowercase ? "toLowerCase" : "toUpperCase"; parser.tags = []; parser.closed = parser.closedRoot = parser.sawRoot = false; parser.tag = parser.error = null; parser.strict = !!strict; parser.noscript = !!(strict || parser.opt.noscript); parser.state = S.BEGIN; parser.strictEntities = parser.opt.strictEntities; parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES); parser.attribList = []; if (parser.opt.xmlns) { parser.ns = Object.create(rootNS); } parser.trackPosition = parser.opt.position !== false; if (parser.trackPosition) { parser.position = parser.line = parser.column = 0; } emit(parser, "onready"); } __name(SAXParser, "SAXParser"); if (!Object.create) { Object.create = function(o) { function F() { } __name(F, "F"); F.prototype = o; var newf = new F(); return newf; }; } if (!Object.keys) { Object.keys = function(o) { var a = []; for (var i in o) if (o.hasOwnProperty(i)) a.push(i); return a; }; } function checkBufferLength(parser) { var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10); var maxActual = 0; for (var i = 0, l = buffers.length; i < l; i++) { var len = parser[buffers[i]].length; if (len > maxAllowed) { switch (buffers[i]) { case "textNode": closeText(parser); break; case "cdata": emitNode(parser, "oncdata", parser.cdata); parser.cdata = ""; break; case "script": emitNode(parser, "onscript", parser.script); parser.script = ""; break; default: error(parser, "Max buffer length exceeded: " + buffers[i]); } } maxActual = Math.max(maxActual, len); } var m = sax.MAX_BUFFER_LENGTH - maxActual; parser.bufferCheckPosition = m + parser.position; } __name(checkBufferLength, "checkBufferLength"); function clearBuffers(parser) { for (var i = 0, l = buffers.length; i < l; i++) { parser[buffers[i]] = ""; } } __name(clearBuffers, "clearBuffers"); function flushBuffers(parser) { closeText(parser); if (parser.cdata !== "") { emitNode(parser, "oncdata", parser.cdata); parser.cdata = ""; } if (parser.script !== "") { emitNode(parser, "onscript", parser.script); parser.script = ""; } } __name(flushBuffers, "flushBuffers"); SAXParser.prototype = { end: function() { end(this); }, write, resume: function() { this.error = null; return this; }, close: function() { return this.write(null); }, flush: function() { flushBuffers(this); } }; var Stream; try { Stream = require("stream").Stream; } catch (ex) { Stream = /* @__PURE__ */ __name(function() { }, "Stream"); } var streamWraps = sax.EVENTS.filter(function(ev) { return ev !== "error" && ev !== "end"; }); function createStream(strict, opt) { return new SAXStream(strict, opt); } __name(createStream, "createStream"); function SAXStream(strict, opt) { if (!(this instanceof SAXStream)) { return new SAXStream(strict, opt); } Stream.apply(this); this._parser = new SAXParser(strict, opt); this.writable = true; this.readable = true; var me = this; this._parser.onend = function() { me.emit("end"); }; this._parser.onerror = function(er) { me.emit("error", er); me._parser.error = null; }; this._decoder = null; streamWraps.forEach(function(ev) { Object.defineProperty(me, "on" + ev, { get: function() { return me._parser["on" + ev]; }, set: function(h) { if (!h) { me.removeAllListeners(ev); me._parser["on" + ev] = h; return h; } me.on(ev, h); }, enumerable: true, configurable: false }); }); } __name(SAXStream, "SAXStream"); SAXStream.prototype = Object.create(Stream.prototype, { constructor: { value: SAXStream } }); SAXStream.prototype.write = function(data) { if (typeof Buffer === "function" && typeof Buffer.isBuffer === "function" && Buffer.isBuffer(data)) { if (!this._decoder) { var SD = require("string_decoder").StringDecoder; this._decoder = new SD("utf8"); } data = this._decoder.write(data); } this._parser.write(data.toString()); this.emit("data", data); return true; }; SAXStream.prototype.end = function(chunk) { if (chunk && chunk.length) { this.write(chunk); } this._parser.end(); return true; }; SAXStream.prototype.on = function(ev, handler) { var me = this; if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) { me._parser["on" + ev] = function() { var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments); args.splice(0, 0, ev); me.emit.apply(me, args); }; } return Stream.prototype.on.call(me, ev, handler); }; var CDATA = "[CDATA["; var DOCTYPE = "DOCTYPE"; var XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"; var XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"; var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }; var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/; var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/; function isWhitespace(c) { return c === " " || c === "\n" || c === "\r" || c === " "; } __name(isWhitespace, "isWhitespace"); function isQuote(c) { return c === '"' || c === "'"; } __name(isQuote, "isQuote"); function isAttribEnd(c) { return c === ">" || isWhitespace(c); } __name(isAttribEnd, "isAttribEnd"); function isMatch(regex, c) { return regex.test(c); } __name(isMatch, "isMatch"); function notMatch(regex, c) { return !isMatch(regex, c); } __name(notMatch, "notMatch"); var S = 0; sax.STATE = { BEGIN: S++, // leading byte order mark or whitespace BEGIN_WHITESPACE: S++, // leading whitespace TEXT: S++, // general stuff TEXT_ENTITY: S++, // & and such. OPEN_WAKA: S++, // < SGML_DECL: S++, // SCRIPT: S++, //