UNPKG

@famibee/skynovel_esm

Version:
1,731 lines (1,729 loc) 519 kB
import Pf, { dialog as uo, shell as Nf, app as Pt, screen as lo, ipcMain as Nt, BrowserWindow as Of } from "electron"; import ct from "fs"; import If from "constants"; import Tf from "stream"; import xi from "util"; import ef from "assert"; import me from "path"; import tf from "crypto"; import Cf from "events"; import Df from "os"; import rf from "zlib"; var Fn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function nf(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var Mn = {}, Ot = {}, fo; function ve() { return fo || (fo = 1, Ot.fromCallback = function(e) { return Object.defineProperty(function(...t) { if (typeof t[t.length - 1] == "function") e.apply(this, t); else return new Promise((f, s) => { t.push((d, i) => d != null ? s(d) : f(i)), e.apply(this, t); }); }, "name", { value: e.name }); }, Ot.fromPromise = function(e) { return Object.defineProperty(function(...t) { const f = t[t.length - 1]; if (typeof f != "function") return e.apply(this, t); t.pop(), e.apply(this, t).then((s) => f(null, s), f); }, "name", { value: e.name }); }), Ot; } var Un, ho; function Af() { if (ho) return Un; ho = 1; var e = If, t = process.cwd, f = null, s = process.env.GRACEFUL_FS_PLATFORM || process.platform; process.cwd = function() { return f || (f = t.call(process)), f; }; try { process.cwd(); } catch { } if (typeof process.chdir == "function") { var d = process.chdir; process.chdir = function(r) { f = null, d.call(process, r); }, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir, d); } Un = i; function i(r) { e.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && a(r), r.lutimes || o(r), r.chown = g(r.chown), r.fchown = g(r.fchown), r.lchown = g(r.lchown), r.chmod = l(r.chmod), r.fchmod = l(r.fchmod), r.lchmod = l(r.lchmod), r.chownSync = E(r.chownSync), r.fchownSync = E(r.fchownSync), r.lchownSync = E(r.lchownSync), r.chmodSync = c(r.chmodSync), r.fchmodSync = c(r.fchmodSync), r.lchmodSync = c(r.lchmodSync), r.stat = _(r.stat), r.fstat = _(r.fstat), r.lstat = _(r.lstat), r.statSync = w(r.statSync), r.fstatSync = w(r.fstatSync), r.lstatSync = w(r.lstatSync), r.chmod && !r.lchmod && (r.lchmod = function(u, h, n) { n && process.nextTick(n); }, r.lchmodSync = function() { }), r.chown && !r.lchown && (r.lchown = function(u, h, n, m) { m && process.nextTick(m); }, r.lchownSync = function() { }), s === "win32" && (r.rename = typeof r.rename != "function" ? r.rename : function(u) { function h(n, m, v) { var p = Date.now(), y = 0; u(n, m, function $(b) { if (b && (b.code === "EACCES" || b.code === "EPERM" || b.code === "EBUSY") && Date.now() - p < 6e4) { setTimeout(function() { r.stat(m, function(N, L) { N && N.code === "ENOENT" ? u(n, m, $) : v(b); }); }, y), y < 100 && (y += 10); return; } v && v(b); }); } return Object.setPrototypeOf && Object.setPrototypeOf(h, u), h; }(r.rename)), r.read = typeof r.read != "function" ? r.read : function(u) { function h(n, m, v, p, y, $) { var b; if ($ && typeof $ == "function") { var N = 0; b = function(L, F, H) { if (L && L.code === "EAGAIN" && N < 10) return N++, u.call(r, n, m, v, p, y, b); $.apply(this, arguments); }; } return u.call(r, n, m, v, p, y, b); } return Object.setPrototypeOf && Object.setPrototypeOf(h, u), h; }(r.read), r.readSync = typeof r.readSync != "function" ? r.readSync : /* @__PURE__ */ function(u) { return function(h, n, m, v, p) { for (var y = 0; ; ) try { return u.call(r, h, n, m, v, p); } catch ($) { if ($.code === "EAGAIN" && y < 10) { y++; continue; } throw $; } }; }(r.readSync); function a(u) { u.lchmod = function(h, n, m) { u.open( h, e.O_WRONLY | e.O_SYMLINK, n, function(v, p) { if (v) { m && m(v); return; } u.fchmod(p, n, function(y) { u.close(p, function($) { m && m(y || $); }); }); } ); }, u.lchmodSync = function(h, n) { var m = u.openSync(h, e.O_WRONLY | e.O_SYMLINK, n), v = !0, p; try { p = u.fchmodSync(m, n), v = !1; } finally { if (v) try { u.closeSync(m); } catch { } else u.closeSync(m); } return p; }; } function o(u) { e.hasOwnProperty("O_SYMLINK") && u.futimes ? (u.lutimes = function(h, n, m, v) { u.open(h, e.O_SYMLINK, function(p, y) { if (p) { v && v(p); return; } u.futimes(y, n, m, function($) { u.close(y, function(b) { v && v($ || b); }); }); }); }, u.lutimesSync = function(h, n, m) { var v = u.openSync(h, e.O_SYMLINK), p, y = !0; try { p = u.futimesSync(v, n, m), y = !1; } finally { if (y) try { u.closeSync(v); } catch { } else u.closeSync(v); } return p; }) : u.futimes && (u.lutimes = function(h, n, m, v) { v && process.nextTick(v); }, u.lutimesSync = function() { }); } function l(u) { return u && function(h, n, m) { return u.call(r, h, n, function(v) { R(v) && (v = null), m && m.apply(this, arguments); }); }; } function c(u) { return u && function(h, n) { try { return u.call(r, h, n); } catch (m) { if (!R(m)) throw m; } }; } function g(u) { return u && function(h, n, m, v) { return u.call(r, h, n, m, function(p) { R(p) && (p = null), v && v.apply(this, arguments); }); }; } function E(u) { return u && function(h, n, m) { try { return u.call(r, h, n, m); } catch (v) { if (!R(v)) throw v; } }; } function _(u) { return u && function(h, n, m) { typeof n == "function" && (m = n, n = null); function v(p, y) { y && (y.uid < 0 && (y.uid += 4294967296), y.gid < 0 && (y.gid += 4294967296)), m && m.apply(this, arguments); } return n ? u.call(r, h, n, v) : u.call(r, h, v); }; } function w(u) { return u && function(h, n) { var m = n ? u.call(r, h, n) : u.call(r, h); return m && (m.uid < 0 && (m.uid += 4294967296), m.gid < 0 && (m.gid += 4294967296)), m; }; } function R(u) { if (!u || u.code === "ENOSYS") return !0; var h = !process.getuid || process.getuid() !== 0; return !!(h && (u.code === "EINVAL" || u.code === "EPERM")); } } return Un; } var Vn, mo; function Lf() { if (mo) return Vn; mo = 1; var e = Tf.Stream; Vn = t; function t(f) { return { ReadStream: s, WriteStream: d }; function s(i, r) { if (!(this instanceof s)) return new s(i, r); e.call(this); var a = this; this.path = i, this.fd = null, this.readable = !0, this.paused = !1, this.flags = "r", this.mode = 438, this.bufferSize = 64 * 1024, r = r || {}; for (var o = Object.keys(r), l = 0, c = o.length; l < c; l++) { var g = o[l]; this[g] = r[g]; } if (this.encoding && this.setEncoding(this.encoding), this.start !== void 0) { if (typeof this.start != "number") throw TypeError("start must be a Number"); if (this.end === void 0) this.end = 1 / 0; else if (typeof this.end != "number") throw TypeError("end must be a Number"); if (this.start > this.end) throw new Error("start must be <= end"); this.pos = this.start; } if (this.fd !== null) { process.nextTick(function() { a._read(); }); return; } f.open(this.path, this.flags, this.mode, function(E, _) { if (E) { a.emit("error", E), a.readable = !1; return; } a.fd = _, a.emit("open", _), a._read(); }); } function d(i, r) { if (!(this instanceof d)) return new d(i, r); e.call(this), this.path = i, this.fd = null, this.writable = !0, this.flags = "w", this.encoding = "binary", this.mode = 438, this.bytesWritten = 0, r = r || {}; for (var a = Object.keys(r), o = 0, l = a.length; o < l; o++) { var c = a[o]; this[c] = r[c]; } if (this.start !== void 0) { if (typeof this.start != "number") throw TypeError("start must be a Number"); if (this.start < 0) throw new Error("start must be >= zero"); this.pos = this.start; } this.busy = !1, this._queue = [], this.fd === null && (this._open = f.open, this._queue.push([this._open, this.path, this.flags, this.mode, void 0]), this.flush()); } } return Vn; } var zn, po; function kf() { if (po) return zn; po = 1, zn = t; var e = Object.getPrototypeOf || function(f) { return f.__proto__; }; function t(f) { if (f === null || typeof f != "object") return f; if (f instanceof Object) var s = { __proto__: e(f) }; else var s = /* @__PURE__ */ Object.create(null); return Object.getOwnPropertyNames(f).forEach(function(d) { Object.defineProperty(s, d, Object.getOwnPropertyDescriptor(f, d)); }), s; } return zn; } var It, yo; function wt() { if (yo) return It; yo = 1; var e = ct, t = Af(), f = Lf(), s = kf(), d = xi, i, r; typeof Symbol == "function" && typeof Symbol.for == "function" ? (i = Symbol.for("graceful-fs.queue"), r = Symbol.for("graceful-fs.previous")) : (i = "___graceful-fs.queue", r = "___graceful-fs.previous"); function a() { } function o(u, h) { Object.defineProperty(u, i, { get: function() { return h; } }); } var l = a; if (d.debuglog ? l = d.debuglog("gfs4") : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && (l = function() { var u = d.format.apply(d, arguments); u = "GFS4: " + u.split(/\n/).join(` GFS4: `), console.error(u); }), !e[i]) { var c = Fn[i] || []; o(e, c), e.close = function(u) { function h(n, m) { return u.call(e, n, function(v) { v || w(), typeof m == "function" && m.apply(this, arguments); }); } return Object.defineProperty(h, r, { value: u }), h; }(e.close), e.closeSync = function(u) { function h(n) { u.apply(e, arguments), w(); } return Object.defineProperty(h, r, { value: u }), h; }(e.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() { l(e[i]), ef.equal(e[i].length, 0); }); } Fn[i] || o(Fn, e[i]), It = g(s(e)), process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !e.__patched && (It = g(e), e.__patched = !0); function g(u) { t(u), u.gracefulify = g, u.createReadStream = O, u.createWriteStream = k; var h = u.readFile; u.readFile = n; function n(P, A, K) { return typeof A == "function" && (K = A, A = null), B(P, A, K); function B(X, Z, I, C) { return h(X, Z, function(q) { q && (q.code === "EMFILE" || q.code === "ENFILE") ? E([B, [X, Z, I], q, C || Date.now(), Date.now()]) : typeof I == "function" && I.apply(this, arguments); }); } } var m = u.writeFile; u.writeFile = v; function v(P, A, K, B) { return typeof K == "function" && (B = K, K = null), X(P, A, K, B); function X(Z, I, C, q, V) { return m(Z, I, C, function(x) { x && (x.code === "EMFILE" || x.code === "ENFILE") ? E([X, [Z, I, C, q], x, V || Date.now(), Date.now()]) : typeof q == "function" && q.apply(this, arguments); }); } } var p = u.appendFile; p && (u.appendFile = y); function y(P, A, K, B) { return typeof K == "function" && (B = K, K = null), X(P, A, K, B); function X(Z, I, C, q, V) { return p(Z, I, C, function(x) { x && (x.code === "EMFILE" || x.code === "ENFILE") ? E([X, [Z, I, C, q], x, V || Date.now(), Date.now()]) : typeof q == "function" && q.apply(this, arguments); }); } } var $ = u.copyFile; $ && (u.copyFile = b); function b(P, A, K, B) { return typeof K == "function" && (B = K, K = 0), X(P, A, K, B); function X(Z, I, C, q, V) { return $(Z, I, C, function(x) { x && (x.code === "EMFILE" || x.code === "ENFILE") ? E([X, [Z, I, C, q], x, V || Date.now(), Date.now()]) : typeof q == "function" && q.apply(this, arguments); }); } } var N = u.readdir; u.readdir = F; var L = /^v[0-5]\./; function F(P, A, K) { typeof A == "function" && (K = A, A = null); var B = L.test(process.version) ? function(I, C, q, V) { return N(I, X( I, C, q, V )); } : function(I, C, q, V) { return N(I, C, X( I, C, q, V )); }; return B(P, A, K); function X(Z, I, C, q) { return function(V, x) { V && (V.code === "EMFILE" || V.code === "ENFILE") ? E([ B, [Z, I, C], V, q || Date.now(), Date.now() ]) : (x && x.sort && x.sort(), typeof C == "function" && C.call(this, V, x)); }; } } if (process.version.substr(0, 4) === "v0.8") { var H = f(u); W = H.ReadStream, G = H.WriteStream; } var M = u.ReadStream; M && (W.prototype = Object.create(M.prototype), W.prototype.open = j); var U = u.WriteStream; U && (G.prototype = Object.create(U.prototype), G.prototype.open = D), Object.defineProperty(u, "ReadStream", { get: function() { return W; }, set: function(P) { W = P; }, enumerable: !0, configurable: !0 }), Object.defineProperty(u, "WriteStream", { get: function() { return G; }, set: function(P) { G = P; }, enumerable: !0, configurable: !0 }); var z = W; Object.defineProperty(u, "FileReadStream", { get: function() { return z; }, set: function(P) { z = P; }, enumerable: !0, configurable: !0 }); var J = G; Object.defineProperty(u, "FileWriteStream", { get: function() { return J; }, set: function(P) { J = P; }, enumerable: !0, configurable: !0 }); function W(P, A) { return this instanceof W ? (M.apply(this, arguments), this) : W.apply(Object.create(W.prototype), arguments); } function j() { var P = this; S(P.path, P.flags, P.mode, function(A, K) { A ? (P.autoClose && P.destroy(), P.emit("error", A)) : (P.fd = K, P.emit("open", K), P.read()); }); } function G(P, A) { return this instanceof G ? (U.apply(this, arguments), this) : G.apply(Object.create(G.prototype), arguments); } function D() { var P = this; S(P.path, P.flags, P.mode, function(A, K) { A ? (P.destroy(), P.emit("error", A)) : (P.fd = K, P.emit("open", K)); }); } function O(P, A) { return new u.ReadStream(P, A); } function k(P, A) { return new u.WriteStream(P, A); } var T = u.open; u.open = S; function S(P, A, K, B) { return typeof K == "function" && (B = K, K = null), X(P, A, K, B); function X(Z, I, C, q, V) { return T(Z, I, C, function(x, Y) { x && (x.code === "EMFILE" || x.code === "ENFILE") ? E([X, [Z, I, C, q], x, V || Date.now(), Date.now()]) : typeof q == "function" && q.apply(this, arguments); }); } } return u; } function E(u) { l("ENQUEUE", u[0].name, u[1]), e[i].push(u), R(); } var _; function w() { for (var u = Date.now(), h = 0; h < e[i].length; ++h) e[i][h].length > 2 && (e[i][h][3] = u, e[i][h][4] = u); R(); } function R() { if (clearTimeout(_), _ = void 0, e[i].length !== 0) { var u = e[i].shift(), h = u[0], n = u[1], m = u[2], v = u[3], p = u[4]; if (v === void 0) l("RETRY", h.name, n), h.apply(null, n); else if (Date.now() - v >= 6e4) { l("TIMEOUT", h.name, n); var y = n.pop(); typeof y == "function" && y.call(null, m); } else { var $ = Date.now() - p, b = Math.max(p - v, 1), N = Math.min(b * 1.2, 100); $ >= N ? (l("RETRY", h.name, n), h.apply(null, n.concat([v]))) : e[i].push(u); } _ === void 0 && (_ = setTimeout(R, 0)); } } return It; } var vo; function Ee() { return vo || (vo = 1, function(e) { const t = ve().fromCallback, f = wt(), s = [ "access", "appendFile", "chmod", "chown", "close", "copyFile", "cp", "fchmod", "fchown", "fdatasync", "fstat", "fsync", "ftruncate", "futimes", "glob", "lchmod", "lchown", "lutimes", "link", "lstat", "mkdir", "mkdtemp", "open", "opendir", "readdir", "readFile", "readlink", "realpath", "rename", "rm", "rmdir", "stat", "statfs", "symlink", "truncate", "unlink", "utimes", "writeFile" ].filter((d) => typeof f[d] == "function"); Object.assign(e, f), s.forEach((d) => { e[d] = t(f[d]); }), e.exists = function(d, i) { return typeof i == "function" ? f.exists(d, i) : new Promise((r) => f.exists(d, r)); }, e.read = function(d, i, r, a, o, l) { return typeof l == "function" ? f.read(d, i, r, a, o, l) : new Promise((c, g) => { f.read(d, i, r, a, o, (E, _, w) => { if (E) return g(E); c({ bytesRead: _, buffer: w }); }); }); }, e.write = function(d, i, ...r) { return typeof r[r.length - 1] == "function" ? f.write(d, i, ...r) : new Promise((a, o) => { f.write(d, i, ...r, (l, c, g) => { if (l) return o(l); a({ bytesWritten: c, buffer: g }); }); }); }, e.readv = function(d, i, ...r) { return typeof r[r.length - 1] == "function" ? f.readv(d, i, ...r) : new Promise((a, o) => { f.readv(d, i, ...r, (l, c, g) => { if (l) return o(l); a({ bytesRead: c, buffers: g }); }); }); }, e.writev = function(d, i, ...r) { return typeof r[r.length - 1] == "function" ? f.writev(d, i, ...r) : new Promise((a, o) => { f.writev(d, i, ...r, (l, c, g) => { if (l) return o(l); a({ bytesWritten: c, buffers: g }); }); }); }, typeof f.realpath.native == "function" ? e.realpath.native = t(f.realpath.native) : process.emitWarning( "fs.realpath.native is not a function. Is fs being monkey-patched?", "Warning", "fs-extra-WARN0003" ); }(Mn)), Mn; } var Tt = {}, Gn = {}, _o; function qf() { if (_o) return Gn; _o = 1; const e = me; return Gn.checkPath = function(f) { if (process.platform === "win32" && /[<>:"|?*]/.test(f.replace(e.parse(f).root, ""))) { const d = new Error(`Path contains invalid characters: ${f}`); throw d.code = "EINVAL", d; } }, Gn; } var go; function jf() { if (go) return Tt; go = 1; const e = /* @__PURE__ */ Ee(), { checkPath: t } = /* @__PURE__ */ qf(), f = (s) => { const d = { mode: 511 }; return typeof s == "number" ? s : { ...d, ...s }.mode; }; return Tt.makeDir = async (s, d) => (t(s), e.mkdir(s, { mode: f(d), recursive: !0 })), Tt.makeDirSync = (s, d) => (t(s), e.mkdirSync(s, { mode: f(d), recursive: !0 })), Tt; } var Kn, $o; function Le() { if ($o) return Kn; $o = 1; const e = ve().fromPromise, { makeDir: t, makeDirSync: f } = /* @__PURE__ */ jf(), s = e(t); return Kn = { mkdirs: s, mkdirsSync: f, // alias mkdirp: s, mkdirpSync: f, ensureDir: s, ensureDirSync: f }, Kn; } var Hn, Eo; function nt() { if (Eo) return Hn; Eo = 1; const e = ve().fromPromise, t = /* @__PURE__ */ Ee(); function f(s) { return t.access(s).then(() => !0).catch(() => !1); } return Hn = { pathExists: e(f), pathExistsSync: t.existsSync }, Hn; } var xn, wo; function sf() { if (wo) return xn; wo = 1; const e = /* @__PURE__ */ Ee(), t = ve().fromPromise; async function f(d, i, r) { const a = await e.open(d, "r+"); let o = null; try { await e.futimes(a, i, r); } finally { try { await e.close(a); } catch (l) { o = l; } } if (o) throw o; } function s(d, i, r) { const a = e.openSync(d, "r+"); return e.futimesSync(a, i, r), e.closeSync(a); } return xn = { utimesMillis: t(f), utimesMillisSync: s }, xn; } var Bn, So; function ut() { if (So) return Bn; So = 1; const e = /* @__PURE__ */ Ee(), t = me, f = ve().fromPromise; function s(E, _, w) { const R = w.dereference ? (u) => e.stat(u, { bigint: !0 }) : (u) => e.lstat(u, { bigint: !0 }); return Promise.all([ R(E), R(_).catch((u) => { if (u.code === "ENOENT") return null; throw u; }) ]).then(([u, h]) => ({ srcStat: u, destStat: h })); } function d(E, _, w) { let R; const u = w.dereference ? (n) => e.statSync(n, { bigint: !0 }) : (n) => e.lstatSync(n, { bigint: !0 }), h = u(E); try { R = u(_); } catch (n) { if (n.code === "ENOENT") return { srcStat: h, destStat: null }; throw n; } return { srcStat: h, destStat: R }; } async function i(E, _, w, R) { const { srcStat: u, destStat: h } = await s(E, _, R); if (h) { if (l(u, h)) { const n = t.basename(E), m = t.basename(_); if (w === "move" && n !== m && n.toLowerCase() === m.toLowerCase()) return { srcStat: u, destStat: h, isChangingCase: !0 }; throw new Error("Source and destination must not be the same."); } if (u.isDirectory() && !h.isDirectory()) throw new Error(`Cannot overwrite non-directory '${_}' with directory '${E}'.`); if (!u.isDirectory() && h.isDirectory()) throw new Error(`Cannot overwrite directory '${_}' with non-directory '${E}'.`); } if (u.isDirectory() && c(E, _)) throw new Error(g(E, _, w)); return { srcStat: u, destStat: h }; } function r(E, _, w, R) { const { srcStat: u, destStat: h } = d(E, _, R); if (h) { if (l(u, h)) { const n = t.basename(E), m = t.basename(_); if (w === "move" && n !== m && n.toLowerCase() === m.toLowerCase()) return { srcStat: u, destStat: h, isChangingCase: !0 }; throw new Error("Source and destination must not be the same."); } if (u.isDirectory() && !h.isDirectory()) throw new Error(`Cannot overwrite non-directory '${_}' with directory '${E}'.`); if (!u.isDirectory() && h.isDirectory()) throw new Error(`Cannot overwrite directory '${_}' with non-directory '${E}'.`); } if (u.isDirectory() && c(E, _)) throw new Error(g(E, _, w)); return { srcStat: u, destStat: h }; } async function a(E, _, w, R) { const u = t.resolve(t.dirname(E)), h = t.resolve(t.dirname(w)); if (h === u || h === t.parse(h).root) return; let n; try { n = await e.stat(h, { bigint: !0 }); } catch (m) { if (m.code === "ENOENT") return; throw m; } if (l(_, n)) throw new Error(g(E, w, R)); return a(E, _, h, R); } function o(E, _, w, R) { const u = t.resolve(t.dirname(E)), h = t.resolve(t.dirname(w)); if (h === u || h === t.parse(h).root) return; let n; try { n = e.statSync(h, { bigint: !0 }); } catch (m) { if (m.code === "ENOENT") return; throw m; } if (l(_, n)) throw new Error(g(E, w, R)); return o(E, _, h, R); } function l(E, _) { return _.ino !== void 0 && _.dev !== void 0 && _.ino === E.ino && _.dev === E.dev; } function c(E, _) { const w = t.resolve(E).split(t.sep).filter((u) => u), R = t.resolve(_).split(t.sep).filter((u) => u); return w.every((u, h) => R[h] === u); } function g(E, _, w) { return `Cannot ${w} '${E}' to a subdirectory of itself, '${_}'.`; } return Bn = { // checkPaths checkPaths: f(i), checkPathsSync: r, // checkParent checkParentPaths: f(a), checkParentPathsSync: o, // Misc isSrcSubdir: c, areIdentical: l }, Bn; } var Wn, Ro; function Ff() { if (Ro) return Wn; Ro = 1; async function e(t, f) { const s = []; for await (const d of t) s.push( f(d).then( () => null, (i) => i ?? new Error("unknown error") ) ); await Promise.all( s.map( (d) => d.then((i) => { if (i !== null) throw i; }) ) ); } return Wn = { asyncIteratorConcurrentProcess: e }, Wn; } var Jn, bo; function Mf() { if (bo) return Jn; bo = 1; const e = /* @__PURE__ */ Ee(), t = me, { mkdirs: f } = /* @__PURE__ */ Le(), { pathExists: s } = /* @__PURE__ */ nt(), { utimesMillis: d } = /* @__PURE__ */ sf(), i = /* @__PURE__ */ ut(), { asyncIteratorConcurrentProcess: r } = /* @__PURE__ */ Ff(); async function a(u, h, n = {}) { typeof n == "function" && (n = { filter: n }), n.clobber = "clobber" in n ? !!n.clobber : !0, n.overwrite = "overwrite" in n ? !!n.overwrite : n.clobber, n.preserveTimestamps && process.arch === "ia32" && process.emitWarning( `Using the preserveTimestamps option in 32-bit node is not recommended; see https://github.com/jprichardson/node-fs-extra/issues/269`, "Warning", "fs-extra-WARN0001" ); const { srcStat: m, destStat: v } = await i.checkPaths(u, h, "copy", n); if (await i.checkParentPaths(u, m, h, "copy"), !await o(u, h, n)) return; const y = t.dirname(h); await s(y) || await f(y), await l(v, u, h, n); } async function o(u, h, n) { return n.filter ? n.filter(u, h) : !0; } async function l(u, h, n, m) { const p = await (m.dereference ? e.stat : e.lstat)(h); if (p.isDirectory()) return w(p, u, h, n, m); if (p.isFile() || p.isCharacterDevice() || p.isBlockDevice()) return c(p, u, h, n, m); if (p.isSymbolicLink()) return R(u, h, n, m); throw p.isSocket() ? new Error(`Cannot copy a socket file: ${h}`) : p.isFIFO() ? new Error(`Cannot copy a FIFO pipe: ${h}`) : new Error(`Unknown file: ${h}`); } async function c(u, h, n, m, v) { if (!h) return g(u, n, m, v); if (v.overwrite) return await e.unlink(m), g(u, n, m, v); if (v.errorOnExist) throw new Error(`'${m}' already exists`); } async function g(u, h, n, m) { if (await e.copyFile(h, n), m.preserveTimestamps) { E(u.mode) && await _(n, u.mode); const v = await e.stat(h); await d(n, v.atime, v.mtime); } return e.chmod(n, u.mode); } function E(u) { return (u & 128) === 0; } function _(u, h) { return e.chmod(u, h | 128); } async function w(u, h, n, m, v) { h || await e.mkdir(m), await r(await e.opendir(n), async (p) => { const y = t.join(n, p.name), $ = t.join(m, p.name); if (await o(y, $, v)) { const { destStat: N } = await i.checkPaths(y, $, "copy", v); await l(N, y, $, v); } }), h || await e.chmod(m, u.mode); } async function R(u, h, n, m) { let v = await e.readlink(h); if (m.dereference && (v = t.resolve(process.cwd(), v)), !u) return e.symlink(v, n); let p = null; try { p = await e.readlink(n); } catch (y) { if (y.code === "EINVAL" || y.code === "UNKNOWN") return e.symlink(v, n); throw y; } if (m.dereference && (p = t.resolve(process.cwd(), p)), i.isSrcSubdir(v, p)) throw new Error(`Cannot copy '${v}' to a subdirectory of itself, '${p}'.`); if (i.isSrcSubdir(p, v)) throw new Error(`Cannot overwrite '${p}' with '${v}'.`); return await e.unlink(n), e.symlink(v, n); } return Jn = a, Jn; } var Zn, Po; function Uf() { if (Po) return Zn; Po = 1; const e = wt(), t = me, f = Le().mkdirsSync, s = sf().utimesMillisSync, d = /* @__PURE__ */ ut(); function i(p, y, $) { typeof $ == "function" && ($ = { filter: $ }), $ = $ || {}, $.clobber = "clobber" in $ ? !!$.clobber : !0, $.overwrite = "overwrite" in $ ? !!$.overwrite : $.clobber, $.preserveTimestamps && process.arch === "ia32" && process.emitWarning( `Using the preserveTimestamps option in 32-bit node is not recommended; see https://github.com/jprichardson/node-fs-extra/issues/269`, "Warning", "fs-extra-WARN0002" ); const { srcStat: b, destStat: N } = d.checkPathsSync(p, y, "copy", $); if (d.checkParentPathsSync(p, b, y, "copy"), $.filter && !$.filter(p, y)) return; const L = t.dirname(y); return e.existsSync(L) || f(L), r(N, p, y, $); } function r(p, y, $, b) { const L = (b.dereference ? e.statSync : e.lstatSync)(y); if (L.isDirectory()) return R(L, p, y, $, b); if (L.isFile() || L.isCharacterDevice() || L.isBlockDevice()) return a(L, p, y, $, b); if (L.isSymbolicLink()) return m(p, y, $, b); throw L.isSocket() ? new Error(`Cannot copy a socket file: ${y}`) : L.isFIFO() ? new Error(`Cannot copy a FIFO pipe: ${y}`) : new Error(`Unknown file: ${y}`); } function a(p, y, $, b, N) { return y ? o(p, $, b, N) : l(p, $, b, N); } function o(p, y, $, b) { if (b.overwrite) return e.unlinkSync($), l(p, y, $, b); if (b.errorOnExist) throw new Error(`'${$}' already exists`); } function l(p, y, $, b) { return e.copyFileSync(y, $), b.preserveTimestamps && c(p.mode, y, $), _($, p.mode); } function c(p, y, $) { return g(p) && E($, p), w(y, $); } function g(p) { return (p & 128) === 0; } function E(p, y) { return _(p, y | 128); } function _(p, y) { return e.chmodSync(p, y); } function w(p, y) { const $ = e.statSync(p); return s(y, $.atime, $.mtime); } function R(p, y, $, b, N) { return y ? h($, b, N) : u(p.mode, $, b, N); } function u(p, y, $, b) { return e.mkdirSync($), h(y, $, b), _($, p); } function h(p, y, $) { const b = e.opendirSync(p); try { let N; for (; (N = b.readSync()) !== null; ) n(N.name, p, y, $); } finally { b.closeSync(); } } function n(p, y, $, b) { const N = t.join(y, p), L = t.join($, p); if (b.filter && !b.filter(N, L)) return; const { destStat: F } = d.checkPathsSync(N, L, "copy", b); return r(F, N, L, b); } function m(p, y, $, b) { let N = e.readlinkSync(y); if (b.dereference && (N = t.resolve(process.cwd(), N)), p) { let L; try { L = e.readlinkSync($); } catch (F) { if (F.code === "EINVAL" || F.code === "UNKNOWN") return e.symlinkSync(N, $); throw F; } if (b.dereference && (L = t.resolve(process.cwd(), L)), d.isSrcSubdir(N, L)) throw new Error(`Cannot copy '${N}' to a subdirectory of itself, '${L}'.`); if (d.isSrcSubdir(L, N)) throw new Error(`Cannot overwrite '${L}' with '${N}'.`); return v(N, $); } else return e.symlinkSync(N, $); } function v(p, y) { return e.unlinkSync(y), e.symlinkSync(p, y); } return Zn = i, Zn; } var Xn, No; function Bi() { if (No) return Xn; No = 1; const e = ve().fromPromise; return Xn = { copy: e(/* @__PURE__ */ Mf()), copySync: /* @__PURE__ */ Uf() }, Xn; } var Yn, Oo; function wn() { if (Oo) return Yn; Oo = 1; const e = wt(), t = ve().fromCallback; function f(d, i) { e.rm(d, { recursive: !0, force: !0 }, i); } function s(d) { e.rmSync(d, { recursive: !0, force: !0 }); } return Yn = { remove: t(f), removeSync: s }, Yn; } var Qn, Io; function Vf() { if (Io) return Qn; Io = 1; const e = ve().fromPromise, t = /* @__PURE__ */ Ee(), f = me, s = /* @__PURE__ */ Le(), d = /* @__PURE__ */ wn(), i = e(async function(o) { let l; try { l = await t.readdir(o); } catch { return s.mkdirs(o); } return Promise.all(l.map((c) => d.remove(f.join(o, c)))); }); function r(a) { let o; try { o = t.readdirSync(a); } catch { return s.mkdirsSync(a); } o.forEach((l) => { l = f.join(a, l), d.removeSync(l); }); } return Qn = { emptyDirSync: r, emptydirSync: r, emptyDir: i, emptydir: i }, Qn; } var es, To; function zf() { if (To) return es; To = 1; const e = ve().fromPromise, t = me, f = /* @__PURE__ */ Ee(), s = /* @__PURE__ */ Le(); async function d(r) { let a; try { a = await f.stat(r); } catch { } if (a && a.isFile()) return; const o = t.dirname(r); let l = null; try { l = await f.stat(o); } catch (c) { if (c.code === "ENOENT") { await s.mkdirs(o), await f.writeFile(r, ""); return; } else throw c; } l.isDirectory() ? await f.writeFile(r, "") : await f.readdir(o); } function i(r) { let a; try { a = f.statSync(r); } catch { } if (a && a.isFile()) return; const o = t.dirname(r); try { f.statSync(o).isDirectory() || f.readdirSync(o); } catch (l) { if (l && l.code === "ENOENT") s.mkdirsSync(o); else throw l; } f.writeFileSync(r, ""); } return es = { createFile: e(d), createFileSync: i }, es; } var ts, Co; function Gf() { if (Co) return ts; Co = 1; const e = ve().fromPromise, t = me, f = /* @__PURE__ */ Ee(), s = /* @__PURE__ */ Le(), { pathExists: d } = /* @__PURE__ */ nt(), { areIdentical: i } = /* @__PURE__ */ ut(); async function r(o, l) { let c; try { c = await f.lstat(l); } catch { } let g; try { g = await f.lstat(o); } catch (w) { throw w.message = w.message.replace("lstat", "ensureLink"), w; } if (c && i(g, c)) return; const E = t.dirname(l); await d(E) || await s.mkdirs(E), await f.link(o, l); } function a(o, l) { let c; try { c = f.lstatSync(l); } catch { } try { const _ = f.lstatSync(o); if (c && i(_, c)) return; } catch (_) { throw _.message = _.message.replace("lstat", "ensureLink"), _; } const g = t.dirname(l); return f.existsSync(g) || s.mkdirsSync(g), f.linkSync(o, l); } return ts = { createLink: e(r), createLinkSync: a }, ts; } var rs, Do; function Kf() { if (Do) return rs; Do = 1; const e = me, t = /* @__PURE__ */ Ee(), { pathExists: f } = /* @__PURE__ */ nt(), s = ve().fromPromise; async function d(r, a) { if (e.isAbsolute(r)) { try { await t.lstat(r); } catch (g) { throw g.message = g.message.replace("lstat", "ensureSymlink"), g; } return { toCwd: r, toDst: r }; } const o = e.dirname(a), l = e.join(o, r); if (await f(l)) return { toCwd: l, toDst: r }; try { await t.lstat(r); } catch (g) { throw g.message = g.message.replace("lstat", "ensureSymlink"), g; } return { toCwd: r, toDst: e.relative(o, r) }; } function i(r, a) { if (e.isAbsolute(r)) { if (!t.existsSync(r)) throw new Error("absolute srcpath does not exist"); return { toCwd: r, toDst: r }; } const o = e.dirname(a), l = e.join(o, r); if (t.existsSync(l)) return { toCwd: l, toDst: r }; if (!t.existsSync(r)) throw new Error("relative srcpath does not exist"); return { toCwd: r, toDst: e.relative(o, r) }; } return rs = { symlinkPaths: s(d), symlinkPathsSync: i }, rs; } var ns, Ao; function Hf() { if (Ao) return ns; Ao = 1; const e = /* @__PURE__ */ Ee(), t = ve().fromPromise; async function f(d, i) { if (i) return i; let r; try { r = await e.lstat(d); } catch { return "file"; } return r && r.isDirectory() ? "dir" : "file"; } function s(d, i) { if (i) return i; let r; try { r = e.lstatSync(d); } catch { return "file"; } return r && r.isDirectory() ? "dir" : "file"; } return ns = { symlinkType: t(f), symlinkTypeSync: s }, ns; } var ss, Lo; function xf() { if (Lo) return ss; Lo = 1; const e = ve().fromPromise, t = me, f = /* @__PURE__ */ Ee(), { mkdirs: s, mkdirsSync: d } = /* @__PURE__ */ Le(), { symlinkPaths: i, symlinkPathsSync: r } = /* @__PURE__ */ Kf(), { symlinkType: a, symlinkTypeSync: o } = /* @__PURE__ */ Hf(), { pathExists: l } = /* @__PURE__ */ nt(), { areIdentical: c } = /* @__PURE__ */ ut(); async function g(_, w, R) { let u; try { u = await f.lstat(w); } catch { } if (u && u.isSymbolicLink()) { const [v, p] = await Promise.all([ f.stat(_), f.stat(w) ]); if (c(v, p)) return; } const h = await i(_, w); _ = h.toDst; const n = await a(h.toCwd, R), m = t.dirname(w); return await l(m) || await s(m), f.symlink(_, w, n); } function E(_, w, R) { let u; try { u = f.lstatSync(w); } catch { } if (u && u.isSymbolicLink()) { const v = f.statSync(_), p = f.statSync(w); if (c(v, p)) return; } const h = r(_, w); _ = h.toDst, R = o(h.toCwd, R); const n = t.dirname(w); return f.existsSync(n) || d(n), f.symlinkSync(_, w, R); } return ss = { createSymlink: e(g), createSymlinkSync: E }, ss; } var is, ko; function Bf() { if (ko) return is; ko = 1; const { createFile: e, createFileSync: t } = /* @__PURE__ */ zf(), { createLink: f, createLinkSync: s } = /* @__PURE__ */ Gf(), { createSymlink: d, createSymlinkSync: i } = /* @__PURE__ */ xf(); return is = { // file createFile: e, createFileSync: t, ensureFile: e, ensureFileSync: t, // link createLink: f, createLinkSync: s, ensureLink: f, ensureLinkSync: s, // symlink createSymlink: d, createSymlinkSync: i, ensureSymlink: d, ensureSymlinkSync: i }, is; } var os, qo; function Wi() { if (qo) return os; qo = 1; function e(f, { EOL: s = ` `, finalEOL: d = !0, replacer: i = null, spaces: r } = {}) { const a = d ? s : ""; return JSON.stringify(f, i, r).replace(/\n/g, s) + a; } function t(f) { return Buffer.isBuffer(f) && (f = f.toString("utf8")), f.replace(/^\uFEFF/, ""); } return os = { stringify: e, stripBom: t }, os; } var as, jo; function Wf() { if (jo) return as; jo = 1; let e; try { e = wt(); } catch { e = ct; } const t = ve(), { stringify: f, stripBom: s } = Wi(); async function d(g, E = {}) { typeof E == "string" && (E = { encoding: E }); const _ = E.fs || e, w = "throws" in E ? E.throws : !0; let R = await t.fromCallback(_.readFile)(g, E); R = s(R); let u; try { u = JSON.parse(R, E ? E.reviver : null); } catch (h) { if (w) throw h.message = `${g}: ${h.message}`, h; return null; } return u; } const i = t.fromPromise(d); function r(g, E = {}) { typeof E == "string" && (E = { encoding: E }); const _ = E.fs || e, w = "throws" in E ? E.throws : !0; try { let R = _.readFileSync(g, E); return R = s(R), JSON.parse(R, E.reviver); } catch (R) { if (w) throw R.message = `${g}: ${R.message}`, R; return null; } } async function a(g, E, _ = {}) { const w = _.fs || e, R = f(E, _); await t.fromCallback(w.writeFile)(g, R, _); } const o = t.fromPromise(a); function l(g, E, _ = {}) { const w = _.fs || e, R = f(E, _); return w.writeFileSync(g, R, _); } return as = { readFile: i, readFileSync: r, writeFile: o, writeFileSync: l }, as; } var cs, Fo; function Jf() { if (Fo) return cs; Fo = 1; const e = Wf(); return cs = { // jsonfile exports readJson: e.readFile, readJsonSync: e.readFileSync, writeJson: e.writeFile, writeJsonSync: e.writeFileSync }, cs; } var us, Mo; function Ji() { if (Mo) return us; Mo = 1; const e = ve().fromPromise, t = /* @__PURE__ */ Ee(), f = me, s = /* @__PURE__ */ Le(), d = nt().pathExists; async function i(a, o, l = "utf-8") { const c = f.dirname(a); return await d(c) || await s.mkdirs(c), t.writeFile(a, o, l); } function r(a, ...o) { const l = f.dirname(a); t.existsSync(l) || s.mkdirsSync(l), t.writeFileSync(a, ...o); } return us = { outputFile: e(i), outputFileSync: r }, us; } var ls, Uo; function Zf() { if (Uo) return ls; Uo = 1; const { stringify: e } = Wi(), { outputFile: t } = /* @__PURE__ */ Ji(); async function f(s, d, i = {}) { const r = e(d, i); await t(s, r, i); } return ls = f, ls; } var fs, Vo; function Xf() { if (Vo) return fs; Vo = 1; const { stringify: e } = Wi(), { outputFileSync: t } = /* @__PURE__ */ Ji(); function f(s, d, i) { const r = e(d, i); t(s, r, i); } return fs = f, fs; } var ds, zo; function Yf() { if (zo) return ds; zo = 1; const e = ve().fromPromise, t = /* @__PURE__ */ Jf(); return t.outputJson = e(/* @__PURE__ */ Zf()), t.outputJsonSync = /* @__PURE__ */ Xf(), t.outputJSON = t.outputJson, t.outputJSONSync = t.outputJsonSync, t.writeJSON = t.writeJson, t.writeJSONSync = t.writeJsonSync, t.readJSON = t.readJson, t.readJSONSync = t.readJsonSync, ds = t, ds; } var hs, Go; function Qf() { if (Go) return hs; Go = 1; const e = /* @__PURE__ */ Ee(), t = me, { copy: f } = /* @__PURE__ */ Bi(), { remove: s } = /* @__PURE__ */ wn(), { mkdirp: d } = /* @__PURE__ */ Le(), { pathExists: i } = /* @__PURE__ */ nt(), r = /* @__PURE__ */ ut(); async function a(c, g, E = {}) { const _ = E.overwrite || E.clobber || !1, { srcStat: w, isChangingCase: R = !1 } = await r.checkPaths(c, g, "move", E); await r.checkParentPaths(c, w, g, "move"); const u = t.dirname(g); return t.parse(u).root !== u && await d(u), o(c, g, _, R); } async function o(c, g, E, _) { if (!_) { if (E) await s(g); else if (await i(g)) throw new Error("dest already exists."); } try { await e.rename(c, g); } catch (w) { if (w.code !== "EXDEV") throw w; await l(c, g, E); } } async function l(c, g, E) { return await f(c, g, { overwrite: E, errorOnExist: !0, preserveTimestamps: !0 }), s(c); } return hs = a, hs; } var ms, Ko; function ed() { if (Ko) return ms; Ko = 1; const e = wt(), t = me, f = Bi().copySync, s = wn().removeSync, d = Le().mkdirpSync, i = /* @__PURE__ */ ut(); function r(g, E, _) { _ = _ || {}; const w = _.overwrite || _.clobber || !1, { srcStat: R, isChangingCase: u = !1 } = i.checkPathsSync(g, E, "move", _); return i.checkParentPathsSync(g, R, E, "move"), a(E) || d(t.dirname(E)), o(g, E, w, u); } function a(g) { const E = t.dirname(g); return t.parse(E).root === E; } function o(g, E, _, w) { if (w) return l(g, E, _); if (_) return s(E), l(g, E, _); if (e.existsSync(E)) throw new Error("dest already exists."); return l(g, E, _); } function l(g, E, _) { try { e.renameSync(g, E); } catch (w) { if (w.code !== "EXDEV") throw w; return c(g, E, _); } } function c(g, E, _) { return f(g, E, { overwrite: _, errorOnExist: !0, preserveTimestamps: !0 }), s(g); } return ms = r, ms; } var ps, Ho; function td() { if (Ho) return ps; Ho = 1; const e = ve().fromPromise; return ps = { move: e(/* @__PURE__ */ Qf()), moveSync: /* @__PURE__ */ ed() }, ps; } var ys, xo; function rd() { return xo || (xo = 1, ys = { // Export promiseified graceful-fs: .../* @__PURE__ */ Ee(), // Export extra methods: .../* @__PURE__ */ Bi(), .../* @__PURE__ */ Vf(), .../* @__PURE__ */ Bf(), .../* @__PURE__ */ Yf(), .../* @__PURE__ */ Le(), .../* @__PURE__ */ td(), .../* @__PURE__ */ Ji(), .../* @__PURE__ */ nt(), .../* @__PURE__ */ wn() }), ys; } var be = /* @__PURE__ */ rd(), $t = { exports: {} }, vs, Bo; function nd() { return Bo || (Bo = 1, vs = (e) => { const t = typeof e; return e !== null && (t === "object" || t === "function"); }), vs; } var _s, Wo; function sd() { if (Wo) return _s; Wo = 1; const e = nd(), t = /* @__PURE__ */ new Set([ "__proto__", "prototype", "constructor" ]), f = (d) => !d.some((i) => t.has(i)); function s(d) { const i = d.split("."), r = []; for (let a = 0; a < i.length; a++) { let o = i[a]; for (; o[o.length - 1] === "\\" && i[a + 1] !== void 0; ) o = o.slice(0, -1) + ".", o += i[++a]; r.push(o); } return f(r) ? r : []; } return _s = { get(d, i, r) { if (!e(d) || typeof i != "string") return r === void 0 ? d : r; const a = s(i); if (a.length !== 0) { for (let o = 0; o < a.length; o++) if (d = d[a[o]], d == null) { if (o !== a.length - 1) return r; break; } return d === void 0 ? r : d; } }, set(d, i, r) { if (!e(d) || typeof i != "string") return d; const a = d, o = s(i); for (let l = 0; l < o.length; l++) { const c = o[l]; e(d[c]) || (d[c] = {}), l === o.length - 1 && (d[c] = r), d = d[c]; } return a; }, delete(d, i) { if (!e(d) || typeof i != "string") return !1; const r = s(i); for (let a = 0; a < r.length; a++) { const o = r[a]; if (a === r.length - 1) return delete d[o], !0; if (d = d[o], !e(d)) return !1; } }, has(d, i) { if (!e(d) || typeof i != "string") return !1; const r = s(i); if (r.length === 0) return !1; for (let a = 0; a < r.length; a++) if (e(d)) { if (!(r[a] in d)) return !1; d = d[r[a]]; } else return !1; return !0; } }, _s; } var Ct = { exports: {} }, Dt = { exports: {} }, At = { exports: {} }, Lt = { exports: {} }, Jo; function id() { if (Jo) return Lt.exports; Jo = 1; const e = ct; return Lt.exports = (t) => new Promise((f) => { e.access(t, (s) => { f(!s); }); }), Lt.exports.sync = (t) => { try { return e.accessSync(t), !0; } catch { return !1; } }, Lt.exports; } var kt = { exports: {} }, qt = { exports: {} }, Zo; function od() { if (Zo) return qt.exports; Zo = 1; const e = (t, ...f) => new Promise((s) => { s(t(...f)); }); return qt.exports = e, qt.exports.default = e, qt.exports; } var Xo; function ad() { if (Xo) return kt.exports; Xo = 1; const e = od(), t = (f) => { if (!((Number.isInteger(f) || f === 1 / 0) && f > 0)) return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up")); const s = []; let d = 0; const i = () => { d--, s.length > 0 && s.shift()(); }, r = (l, c, ...g) => { d++; const E = e(l, ...g); c(E), E.then(i, i); }, a = (l, c, ...g) => { d < f ? r(l, c, ...g) : s.push(r.bind(null, l, c, ...g)); }, o = (l, ...c) => new Promise((g) => a(l, g, ...c)); return Object.defineProperties(o, { activeCount: { get: () => d }, pendingCount: { get: () => s.length }, clearQueue: { value: () => { s.length = 0; } } }), o; }; return kt.exports = t, kt.exports.default = t, kt.exports; } var gs, Yo; function cd() { if (Yo) return gs; Yo = 1; const e = ad(); class t extends Error { constructor(i) { super(), this.value = i; } } const f = (d, i) => Promise.resolve(d).then(i), s = (d) => Promise.all(d).then((i) => i[1] === !0 && Promise.reject(new t(i[0]))); return gs = (d, i, r) => { r = Object.assign({ concurrency: 1 / 0, preserveOrder: !0 }, r); const a = e(r.concurrency), o = [...d].map((c) => [c, a(f, c, i)]), l = e(r.preserveOrder ? 1 : 1 / 0); return Promise.all(o.map((c) => l(s, c))).then(() => { }).catch((c) => c instanceof t ? c.value : Promise.reject(c)); }, gs; } var Qo; function ud() { if (Qo) return At.exports; Qo = 1; const e = me, t = id(), f = cd(); return At.exports = (s, d) => (d = Object.assign({ cwd: process.cwd() }, d), f(s, (i) => t(e.resolve(d.cwd, i)), d)), At.exports.sync = (s, d) => { d = Object.assign({ cwd: process.cwd() }, d); for (const i of s) if (t.sync(e.resolve(d.cwd, i))) return i; }, At.exports; } var ea; function ld() { if (ea) return Dt.exports; ea = 1; const e = me, t = ud(); return Dt.exports = (f, s = {}) => { const d = e.resolve(s.cwd || ""), { root: i } = e.parse(d), r = [].concat(f); return new Promise((a) => { (function o(l) { t(r, { cwd: