@lousy-agents/lint 5.17.2 → 5.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/dist/316.js +408 -379
  2. package/dist/653.js +173 -371
  3. package/dist/index.js +193 -241
  4. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -550,7 +550,7 @@ module.exports = function extend() {
550
550
 
551
551
  },
552
552
  8078(module) {
553
- function webpackEmptyAsyncContext(req) {
553
+ function __rspack_empty_async_context(req) {
554
554
  // Here Promise.resolve().then() is used instead of new Promise() to prevent
555
555
  // uncaught exception popping up in devtools
556
556
  return Promise.resolve().then(function() {
@@ -559,10 +559,10 @@ function webpackEmptyAsyncContext(req) {
559
559
  throw e;
560
560
  });
561
561
  }
562
- webpackEmptyAsyncContext.keys = () => ([]);
563
- webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
564
- webpackEmptyAsyncContext.id = 8078;
565
- module.exports = webpackEmptyAsyncContext;
562
+ __rspack_empty_async_context.keys = () => ([]);
563
+ __rspack_empty_async_context.resolve = __rspack_empty_async_context;
564
+ __rspack_empty_async_context.id = 8078;
565
+ module.exports = __rspack_empty_async_context;
566
566
 
567
567
 
568
568
  },
@@ -34595,8 +34595,6 @@ const pathe_M_eThtNZ_path = (/* unused pure expression or super */ null && ({
34595
34595
  var lib_main = __webpack_require__(5599);
34596
34596
  // EXTERNAL MODULE: external "node:assert"
34597
34597
  var external_node_assert_ = __webpack_require__(4589);
34598
- // EXTERNAL MODULE: external "node:v8"
34599
- var external_node_v8_ = __webpack_require__(8877);
34600
34598
  ;// CONCATENATED MODULE: ../../node_modules/exsolve/dist/index.mjs
34601
34599
 
34602
34600
 
@@ -34604,9 +34602,6 @@ var external_node_v8_ = __webpack_require__(8877);
34604
34602
 
34605
34603
 
34606
34604
 
34607
-
34608
-
34609
- //#region src/internal/builtins.ts
34610
34605
  const nodeBuiltins = [
34611
34606
  "_http_agent",
34612
34607
  "_http_client",
@@ -34677,12 +34672,8 @@ const nodeBuiltins = [
34677
34672
  "worker_threads",
34678
34673
  "zlib"
34679
34674
  ];
34680
-
34681
- //#endregion
34682
- //#region src/internal/errors.ts
34683
- const own$1 = {}.hasOwnProperty;
34684
34675
  const classRegExp = /^([A-Z][a-z\d]*)+$/;
34685
- const kTypes = new Set([
34676
+ const kTypes = /* @__PURE__ */ new Set([
34686
34677
  "string",
34687
34678
  "function",
34688
34679
  "number",
@@ -34694,83 +34685,95 @@ const kTypes = new Set([
34694
34685
  "symbol"
34695
34686
  ]);
34696
34687
  const messages = /* @__PURE__ */ new Map();
34697
- const nodeInternalPrefix = "__node_internal_";
34698
- let userStackTraceLimit;
34699
- /**
34700
- * Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.
34701
- * We cannot use Intl.ListFormat because it's not available in
34702
- * --without-intl builds.
34703
- *
34704
- * @param {Array<string>} array
34705
- * An array of strings.
34706
- * @param {string} [type]
34707
- * The list type to be inserted before the last element.
34708
- * @returns {string}
34709
- */
34710
34688
  function formatList(array, type = "and") {
34711
- return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`;
34689
+ switch (array.length) {
34690
+ case 0: return "";
34691
+ case 1: return `${array[0]}`;
34692
+ case 2: return `${array[0]} ${type} ${array[1]}`;
34693
+ case 3: return `${array[0]}, ${array[1]}, ${type} ${array[2]}`;
34694
+ default: return `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`;
34695
+ }
34696
+ }
34697
+ function getExpectedArgumentLength(message) {
34698
+ let expectedLength = 0;
34699
+ const regex = /%[dfijoOs]/g;
34700
+ while (regex.exec(message) !== null) expectedLength++;
34701
+ return expectedLength;
34712
34702
  }
34713
- /**
34714
- * Utility function for registering the error codes.
34715
- */
34716
34703
  function createError(sym, value, constructor) {
34717
34704
  messages.set(sym, value);
34718
34705
  return makeNodeErrorWithCode(constructor, sym);
34719
34706
  }
34707
+ const kIsNodeError = Symbol("kIsNodeError");
34720
34708
  function makeNodeErrorWithCode(Base, key) {
34721
- return function NodeError(...parameters) {
34722
- const limit = Error.stackTraceLimit;
34723
- if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;
34724
- const error = new Base();
34725
- if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;
34726
- const message = getMessage(key, parameters, error);
34727
- Object.defineProperties(error, {
34728
- message: {
34729
- value: message,
34730
- enumerable: false,
34731
- writable: true,
34732
- configurable: true
34733
- },
34734
- toString: {
34735
- value() {
34709
+ const message = messages.get(key);
34710
+ const expectedLength = typeof message === "string" ? getExpectedArgumentLength(message) : -1;
34711
+ switch (expectedLength) {
34712
+ case 0: {
34713
+ class NodeError extends Base {
34714
+ code = key;
34715
+ constructor(...args) {
34716
+ external_node_assert_.ok(args.length === 0, `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).`);
34717
+ super(message);
34718
+ }
34719
+ get ["constructor"]() {
34720
+ return Base;
34721
+ }
34722
+ get [kIsNodeError]() {
34723
+ return true;
34724
+ }
34725
+ toString() {
34736
34726
  return `${this.name} [${key}]: ${this.message}`;
34737
- },
34738
- enumerable: false,
34739
- writable: true,
34740
- configurable: true
34727
+ }
34741
34728
  }
34742
- });
34743
- captureLargerStackTrace(error);
34744
- error.code = key;
34745
- return error;
34746
- };
34747
- }
34748
- function isErrorStackTraceLimitWritable() {
34749
- try {
34750
- if (external_node_v8_.startupSnapshot.isBuildingSnapshot()) return false;
34751
- } catch {}
34752
- const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
34753
- if (desc === void 0) return Object.isExtensible(Error);
34754
- return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
34755
- }
34756
- /**
34757
- * This function removes unnecessary frames from Node.js core errors.
34758
- */
34759
- function hideStackFrames(wrappedFunction) {
34760
- const hidden = nodeInternalPrefix + wrappedFunction.name;
34761
- Object.defineProperty(wrappedFunction, "name", { value: hidden });
34762
- return wrappedFunction;
34763
- }
34764
- const captureLargerStackTrace = hideStackFrames(function(error) {
34765
- const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
34766
- if (stackTraceLimitIsWritable) {
34767
- userStackTraceLimit = Error.stackTraceLimit;
34768
- Error.stackTraceLimit = Number.POSITIVE_INFINITY;
34729
+ return NodeError;
34730
+ }
34731
+ case -1: {
34732
+ class NodeError extends Base {
34733
+ code = key;
34734
+ constructor(...args) {
34735
+ super();
34736
+ Object.defineProperty(this, "message", {
34737
+ value: getMessage(key, args, this),
34738
+ enumerable: false,
34739
+ writable: true,
34740
+ configurable: true
34741
+ });
34742
+ }
34743
+ get ["constructor"]() {
34744
+ return Base;
34745
+ }
34746
+ get [kIsNodeError]() {
34747
+ return true;
34748
+ }
34749
+ toString() {
34750
+ return `${this.name} [${key}]: ${this.message}`;
34751
+ }
34752
+ }
34753
+ return NodeError;
34754
+ }
34755
+ default: {
34756
+ class NodeError extends Base {
34757
+ code = key;
34758
+ constructor(...args) {
34759
+ external_node_assert_.ok(args.length === expectedLength, `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).`);
34760
+ args.unshift(message);
34761
+ super(Reflect.apply(external_node_util_.format, null, args));
34762
+ }
34763
+ get ["constructor"]() {
34764
+ return Base;
34765
+ }
34766
+ get [kIsNodeError]() {
34767
+ return true;
34768
+ }
34769
+ toString() {
34770
+ return `${this.name} [${key}]: ${this.message}`;
34771
+ }
34772
+ }
34773
+ return NodeError;
34774
+ }
34769
34775
  }
34770
- Error.captureStackTrace(error);
34771
- if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
34772
- return error;
34773
- });
34776
+ }
34774
34777
  function getMessage(key, parameters, self) {
34775
34778
  const message = messages.get(key);
34776
34779
  external_node_assert_.ok(message !== void 0, "expected `message` to be found");
@@ -34778,29 +34781,44 @@ function getMessage(key, parameters, self) {
34778
34781
  external_node_assert_.ok(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`);
34779
34782
  return Reflect.apply(message, self, parameters);
34780
34783
  }
34781
- const regex = /%[dfijoOs]/g;
34782
- let expectedLength = 0;
34783
- while (regex.exec(message) !== null) expectedLength++;
34784
+ const expectedLength = getExpectedArgumentLength(message);
34784
34785
  external_node_assert_.ok(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`);
34785
34786
  if (parameters.length === 0) return message;
34786
34787
  parameters.unshift(message);
34787
34788
  return Reflect.apply(external_node_util_.format, null, parameters);
34788
34789
  }
34789
- /**
34790
- * Determine the specific type of a value for type-mismatch errors.
34791
- */
34792
34790
  function determineSpecificType(value) {
34793
- if (value === null || value === void 0) return String(value);
34794
- if (typeof value === "function" && value.name) return `function ${value.name}`;
34795
- if (typeof value === "object") {
34796
- if (value.constructor && value.constructor.name) return `an instance of ${value.constructor.name}`;
34797
- return `${(0,external_node_util_.inspect)(value, { depth: -1 })}`;
34791
+ if (value === null) return "null";
34792
+ else if (value === void 0) return "undefined";
34793
+ const type = typeof value;
34794
+ switch (type) {
34795
+ case "bigint": return `type bigint (${value}n)`;
34796
+ case "number":
34797
+ if (value === 0) return 1 / value === Number.NEGATIVE_INFINITY ? "type number (-0)" : "type number (0)";
34798
+ else if (Number.isNaN(value)) return "type number (NaN)";
34799
+ else if (value === Number.POSITIVE_INFINITY) return "type number (Infinity)";
34800
+ else if (value === Number.NEGATIVE_INFINITY) return "type number (-Infinity)";
34801
+ return `type number (${value})`;
34802
+ case "boolean": return value ? "type boolean (true)" : "type boolean (false)";
34803
+ case "symbol": return `type symbol (${String(value)})`;
34804
+ case "function": return `function ${value.name}`;
34805
+ case "object":
34806
+ if (value.constructor && value.constructor.name) return `an instance of ${value.constructor.name}`;
34807
+ return `${(0,external_node_util_.inspect)(value, { depth: -1 })}`;
34808
+ case "string": {
34809
+ let string = value;
34810
+ if (string.length > 28) string = `${string.slice(0, 25)}...`;
34811
+ if (!string.includes("'")) return `type string ('${string}')`;
34812
+ return `type string (${JSON.stringify(string)})`;
34813
+ }
34814
+ default: {
34815
+ let inspected = (0,external_node_util_.inspect)(value, { colors: false });
34816
+ if (inspected.length > 28) inspected = `${inspected.slice(0, 25)}...`;
34817
+ return `type ${type} (${inspected})`;
34818
+ }
34798
34819
  }
34799
- let inspected = (0,external_node_util_.inspect)(value, { colors: false });
34800
- if (inspected.length > 28) inspected = `${inspected.slice(0, 25)}...`;
34801
- return `type ${typeof value} (${inspected})`;
34802
34820
  }
34803
- const ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
34821
+ createError("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
34804
34822
  external_node_assert_.ok(typeof name === "string", "'name' must be a string");
34805
34823
  if (!Array.isArray(expected)) expected = [expected];
34806
34824
  let message = "The ";
@@ -34824,7 +34842,7 @@ const ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (name, expected
34824
34842
  if (instances.length > 0) {
34825
34843
  const pos = types.indexOf("object");
34826
34844
  if (pos !== -1) {
34827
- types.slice(pos, 1);
34845
+ types.splice(pos, 1);
34828
34846
  instances.push("Object");
34829
34847
  }
34830
34848
  }
@@ -34844,20 +34862,11 @@ const ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (name, expected
34844
34862
  message += `. Received ${determineSpecificType(actual)}`;
34845
34863
  return message;
34846
34864
  }, TypeError);
34847
- const ERR_INVALID_MODULE_SPECIFIER = createError(
34848
- "ERR_INVALID_MODULE_SPECIFIER",
34849
- /**
34850
- * @param {string} request
34851
- * @param {string} reason
34852
- * @param {string} [base]
34853
- */
34854
- (request, reason, base) => {
34855
- return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
34856
- },
34857
- TypeError
34858
- );
34859
- const ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path$1, base, message) => {
34860
- return `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
34865
+ const ERR_INVALID_MODULE_SPECIFIER = createError("ERR_INVALID_MODULE_SPECIFIER", (request, reason, base) => {
34866
+ return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
34867
+ }, TypeError);
34868
+ const ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path, base, message) => {
34869
+ return `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
34861
34870
  }, Error);
34862
34871
  const ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (packagePath, key, target, isImport = false, base) => {
34863
34872
  const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
@@ -34867,39 +34876,30 @@ const ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (pa
34867
34876
  }
34868
34877
  return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
34869
34878
  }, Error);
34870
- const ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (path$1, base, exactUrl = false) => {
34871
- return `Cannot find ${exactUrl ? "module" : "package"} '${path$1}' imported from ${base}`;
34879
+ const ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", function(path, base, exactUrl = false) {
34880
+ if (exactUrl && typeof exactUrl === "string") this.url = `${exactUrl}`;
34881
+ return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`;
34872
34882
  }, Error);
34873
- const ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error);
34874
34883
  const ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => {
34875
34884
  return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`;
34876
34885
  }, TypeError);
34877
- const ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
34878
- "ERR_PACKAGE_PATH_NOT_EXPORTED",
34879
- /**
34880
- * @param {string} packagePath
34881
- * @param {string} subpath
34882
- * @param {string} [base]
34883
- */
34884
- (packagePath, subpath, base) => {
34885
- if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
34886
- return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
34887
- },
34888
- Error
34889
- );
34890
- const ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error);
34886
+ const ERR_PACKAGE_PATH_NOT_EXPORTED = createError("ERR_PACKAGE_PATH_NOT_EXPORTED", (packagePath, subpath, base) => {
34887
+ if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
34888
+ return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
34889
+ }, Error);
34890
+ const ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", function(path, base, exactUrl = void 0) {
34891
+ this.url = exactUrl;
34892
+ return `Directory import '${path}' is not supported resolving ES modules imported from ${base}`;
34893
+ }, Error);
34891
34894
  const ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError);
34892
- const ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (extension, path$1) => {
34893
- return `Unknown file extension "${extension}" for ${path$1}`;
34895
+ const ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (extension, path) => {
34896
+ return `Unknown file extension "${extension}" for ${path}`;
34894
34897
  }, TypeError);
34895
- const ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (name, value, reason = "is invalid") => {
34898
+ createError("ERR_INVALID_ARG_VALUE", (name, value, reason = "is invalid") => {
34896
34899
  let inspected = (0,external_node_util_.inspect)(value);
34897
34900
  if (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`;
34898
34901
  return `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
34899
34902
  }, TypeError);
34900
-
34901
- //#endregion
34902
- //#region src/internal/package-json-reader.ts
34903
34903
  const hasOwnProperty$1 = {}.hasOwnProperty;
34904
34904
  const dist_cache = /* @__PURE__ */ new Map();
34905
34905
  function read(jsonPath, { base, specifier }) {
@@ -34956,9 +34956,6 @@ function getPackageScopeConfig(resolved) {
34956
34956
  type: "none"
34957
34957
  };
34958
34958
  }
34959
-
34960
- //#endregion
34961
- //#region src/internal/get-format.ts
34962
34959
  const dist_hasOwnProperty = {}.hasOwnProperty;
34963
34960
  const extensionFormatMap = {
34964
34961
  __proto__: null,
@@ -34977,33 +34974,25 @@ const protocolHandlers = {
34977
34974
  "node:": () => "builtin"
34978
34975
  };
34979
34976
  function mimeToFormat(mime) {
34980
- if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) return "module";
34977
+ if (mime && /^\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?$/i.test(mime)) return "module";
34981
34978
  if (mime === "application/json") return "json";
34982
34979
  return null;
34983
34980
  }
34984
34981
  function getDataProtocolModuleFormat(parsed) {
34985
- const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [
34982
+ const { 1: mime } = /^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/.exec(parsed.pathname) || [
34986
34983
  null,
34987
34984
  null,
34988
34985
  null
34989
34986
  ];
34990
34987
  return mimeToFormat(mime);
34991
34988
  }
34992
- /**
34993
- * Returns the file extension from a URL.
34994
- *
34995
- * Should give similar result to
34996
- * `require('node:path').extname(require('node:url').fileURLToPath(url))`
34997
- * when used with a `file:` URL.
34998
- *
34999
- */
34989
+ const DOT_CODE = 46;
34990
+ const SLASH_CODE = 47;
35000
34991
  function dist_extname(url) {
35001
34992
  const pathname = url.pathname;
35002
- let index = pathname.length;
35003
- while (index--) {
35004
- const code = pathname.codePointAt(index);
35005
- if (code === 47) return "";
35006
- if (code === 46) return pathname.codePointAt(index - 1) === 47 ? "" : pathname.slice(index);
34993
+ for (let i = pathname.length - 1; i > 0; i--) switch (pathname.charCodeAt(i)) {
34994
+ case SLASH_CODE: return "";
34995
+ case DOT_CODE: return pathname.charCodeAt(i - 1) === SLASH_CODE ? "" : pathname.slice(i);
35007
34996
  }
35008
34997
  return "";
35009
34998
  }
@@ -35016,11 +35005,12 @@ function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
35016
35005
  }
35017
35006
  if (ext === "") {
35018
35007
  const { type: packageType } = getPackageScopeConfig(url);
35019
- if (packageType === "none" || packageType === "commonjs") return "commonjs";
35020
- return "module";
35008
+ if (packageType === "module") return "module";
35009
+ if (packageType !== "none") return packageType;
35010
+ return "commonjs";
35021
35011
  }
35022
- const format$1 = extensionFormatMap[ext];
35023
- if (format$1) return format$1;
35012
+ const format = extensionFormatMap[ext];
35013
+ if (format) return format;
35024
35014
  if (ignoreErrors) return;
35025
35015
  throw new ERR_UNKNOWN_FILE_EXTENSION(ext, (0,external_node_url_.fileURLToPath)(url));
35026
35016
  }
@@ -35029,9 +35019,6 @@ function defaultGetFormatWithoutErrors(url, context) {
35029
35019
  if (!dist_hasOwnProperty.call(protocolHandlers, protocol)) return null;
35030
35020
  return protocolHandlers[protocol](url, context, true) || null;
35031
35021
  }
35032
-
35033
- //#endregion
35034
- //#region src/internal/resolve.ts
35035
35022
  const RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
35036
35023
  const dist_own = {}.hasOwnProperty;
35037
35024
  const invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i;
@@ -35056,19 +35043,11 @@ function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
35056
35043
  if (!main) external_node_process_.emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
35057
35044
  else if (external_node_path_.resolve(packagePath, main) !== urlPath) external_node_process_.emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
35058
35045
  }
35059
- function tryStatSync(path$1) {
35046
+ function tryStatSync(path) {
35060
35047
  try {
35061
- return (0,external_node_fs_.statSync)(path$1);
35048
+ return (0,external_node_fs_.statSync)(path);
35062
35049
  } catch {}
35063
35050
  }
35064
- /**
35065
- * Legacy CommonJS main resolution:
35066
- * 1. let M = pkg_url + (json main field)
35067
- * 2. TRY(M, M.js, M.json, M.node)
35068
- * 3. TRY(M/index.js, M/index.json, M/index.node)
35069
- * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)
35070
- * 5. NOT_FOUND
35071
- */
35072
35051
  function dist_fileExists(url) {
35073
35052
  const stats = (0,external_node_fs_.statSync)(url, { throwIfNoEntry: false });
35074
35053
  const isFile = stats ? stats.isFile() : void 0;
@@ -35079,7 +35058,7 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
35079
35058
  if (packageConfig.main !== void 0) {
35080
35059
  guess = new external_node_url_.URL(packageConfig.main, packageJsonUrl);
35081
35060
  if (dist_fileExists(guess)) return guess;
35082
- const tries$1 = [
35061
+ const tries = [
35083
35062
  `./${packageConfig.main}.js`,
35084
35063
  `./${packageConfig.main}.json`,
35085
35064
  `./${packageConfig.main}.node`,
@@ -35087,9 +35066,9 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
35087
35066
  `./${packageConfig.main}/index.json`,
35088
35067
  `./${packageConfig.main}/index.node`
35089
35068
  ];
35090
- let i$1 = -1;
35091
- while (++i$1 < tries$1.length) {
35092
- guess = new external_node_url_.URL(tries$1[i$1], packageJsonUrl);
35069
+ let i = -1;
35070
+ while (++i < tries.length) {
35071
+ guess = new external_node_url_.URL(tries[i], packageJsonUrl);
35093
35072
  if (dist_fileExists(guess)) break;
35094
35073
  guess = void 0;
35095
35074
  }
@@ -35221,7 +35200,7 @@ function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, b
35221
35200
  }
35222
35201
  return resolveResult;
35223
35202
  }
35224
- if (lastException === void 0 || lastException === null) return null;
35203
+ if (lastException === void 0 || lastException === null) return lastException;
35225
35204
  throw lastException;
35226
35205
  }
35227
35206
  if (typeof target === "object" && target !== null) {
@@ -35241,7 +35220,7 @@ function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, b
35241
35220
  return resolveResult;
35242
35221
  }
35243
35222
  }
35244
- return null;
35223
+ return;
35245
35224
  }
35246
35225
  if (target === null) return null;
35247
35226
  throw invalidPackageTarget(packageSubpath, target, packageJsonUrl, internal, base);
@@ -35315,7 +35294,7 @@ function patternKeyCompare(a, b) {
35315
35294
  return 0;
35316
35295
  }
35317
35296
  function packageImportsResolve(name, base, conditions) {
35318
- if (name === "#" || name.startsWith("#/") || name.endsWith("/")) throw new ERR_INVALID_MODULE_SPECIFIER(name, "is not a valid internal imports specifier name", (0,external_node_url_.fileURLToPath)(base));
35297
+ if (name === "#" || name.endsWith("/")) throw new ERR_INVALID_MODULE_SPECIFIER(name, "is not a valid internal imports specifier name", (0,external_node_url_.fileURLToPath)(base));
35319
35298
  let packageJsonUrl;
35320
35299
  const packageConfig = getPackageScopeConfig(base);
35321
35300
  if (packageConfig.exists) {
@@ -35349,10 +35328,6 @@ function packageImportsResolve(name, base, conditions) {
35349
35328
  }
35350
35329
  throw importNotDefined(name, packageJsonUrl, base);
35351
35330
  }
35352
- /**
35353
- * @param {string} specifier
35354
- * @param {URL} base
35355
- */
35356
35331
  function parsePackageName(specifier, base) {
35357
35332
  let separatorIndex = specifier.indexOf("/");
35358
35333
  let validPackageName = true;
@@ -35387,12 +35362,12 @@ function packageResolve(specifier, base, conditions) {
35387
35362
  packageJsonPath = (0,external_node_url_.fileURLToPath)(packageJsonUrl);
35388
35363
  continue;
35389
35364
  }
35390
- const packageConfig$1 = read(packageJsonPath, {
35365
+ const packageConfig = read(packageJsonPath, {
35391
35366
  base,
35392
35367
  specifier
35393
35368
  });
35394
- if (packageConfig$1.exports !== void 0 && packageConfig$1.exports !== null) return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig$1, base, conditions);
35395
- if (packageSubpath === ".") return legacyMainResolve(packageJsonUrl, packageConfig$1, base);
35369
+ if (packageConfig.exports !== void 0 && packageConfig.exports !== null) return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions);
35370
+ if (packageSubpath === ".") return legacyMainResolve(packageJsonUrl, packageConfig, base);
35396
35371
  return new external_node_url_.URL(packageSubpath, packageJsonUrl);
35397
35372
  } while (packageJsonPath.length !== lastPath.length);
35398
35373
  // removed by dead control flow
@@ -35410,21 +35385,6 @@ function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {
35410
35385
  if (specifier[0] === "/") return true;
35411
35386
  return isRelativeSpecifier(specifier);
35412
35387
  }
35413
- /**
35414
- * The “Resolver Algorithm Specification” as detailed in the Node docs (which is
35415
- * sync and slightly lower-level than `resolve`).
35416
- *
35417
- * @param {string} specifier
35418
- * `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.
35419
- * @param {URL} base
35420
- * Full URL (to a file) that `specifier` is resolved relative from.
35421
- * @param {Set<string>} [conditions]
35422
- * Conditions.
35423
- * @param {boolean} [preserveSymlinks]
35424
- * Keep symlinks instead of resolving them.
35425
- * @returns {URL}
35426
- * A URL object to the found thing.
35427
- */
35428
35388
  function moduleResolve(specifier, base, conditions, preserveSymlinks) {
35429
35389
  const protocol = base.protocol;
35430
35390
  const isData = protocol === "data:";
@@ -35451,19 +35411,10 @@ function moduleResolve(specifier, base, conditions, preserveSymlinks) {
35451
35411
  if (resolved.protocol !== "file:") return resolved;
35452
35412
  return finalizeResolution(resolved, base, preserveSymlinks);
35453
35413
  }
35454
-
35455
- //#endregion
35456
- //#region src/resolve.ts
35457
- const DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set(["node", "import"]);
35458
- const dist_isWindows = /* @__PURE__ */ (() => process.platform === "win32")();
35459
- const globalCache = /* @__PURE__ */ (() => globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map())();
35460
- /**
35461
- * Synchronously resolves a module url based on the options provided.
35462
- *
35463
- * @param {string} input - The identifier or path of the module to resolve.
35464
- * @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
35465
- * @returns {string} The resolved URL as a string.
35466
- */
35414
+ const DEFAULT_CONDITIONS_SET = /* #__PURE__ */ new Set(["node", "import"]);
35415
+ const DEFAULT_CONDITIONS_KEY = "2:6:import4:node";
35416
+ const dist_isWindows = /* #__PURE__ */ (() => process.platform === "win32")();
35417
+ const globalCache = /* #__PURE__ */ (() => globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map())();
35467
35418
  function resolveModuleURL(input, options) {
35468
35419
  const parsedInput = _parseInput(input);
35469
35420
  if ("external" in parsedInput) return parsedInput.external;
@@ -35528,15 +35479,6 @@ function resolveModuleURL(input, options) {
35528
35479
  if (cacheObj) cacheObj.set(cacheKey, resolved.href);
35529
35480
  return resolved.href;
35530
35481
  }
35531
- /**
35532
- * Synchronously resolves a module then converts it to a file path
35533
- *
35534
- * (throws error if reolved path is not file:// scheme)
35535
- *
35536
- * @param {string} id - The identifier or path of the module to resolve.
35537
- * @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
35538
- * @returns {string} The resolved URL as a string.
35539
- */
35540
35482
  function resolveModulePath(id, options) {
35541
35483
  const resolved = resolveModuleURL(id, options);
35542
35484
  if (!resolved) return;
@@ -35596,21 +35538,31 @@ function _fmtPath(input) {
35596
35538
  return input;
35597
35539
  }
35598
35540
  }
35599
- function _cacheKey(id, opts) {
35600
- return JSON.stringify([
35601
- id,
35602
- (opts?.conditions || ["node", "import"]).sort(),
35603
- opts?.extensions,
35604
- opts?.from,
35605
- opts?.suffixes
35606
- ]);
35541
+ function _cacheKey(id, options) {
35542
+ let from;
35543
+ if (Array.isArray(options?.from)) from = options.from;
35544
+ else if (options?.from) from = [options.from];
35545
+ return _cacheKeyValues([id]) + _conditionsKey(options?.conditions) + _cacheKeyValues(options?.extensions) + _cacheKeyValues(from) + _cacheKeyValues(options?.suffixes);
35546
+ }
35547
+ function _conditionsKey(conditions) {
35548
+ if (!conditions) return DEFAULT_CONDITIONS_KEY;
35549
+ return _cacheKeyValues([...new Set(conditions)].sort());
35550
+ }
35551
+ function _cacheKeyValues(values) {
35552
+ if (!values) return "-";
35553
+ let key = `${values.length}:`;
35554
+ for (const value of values) {
35555
+ const stringValue = String(value);
35556
+ key += `${stringValue.length}:${stringValue}`;
35557
+ }
35558
+ return key;
35607
35559
  }
35608
35560
  function _join(a, b) {
35609
35561
  if (!a || !b || b === "/") return a;
35610
35562
  return (a.endsWith("/") ? a : a + "/") + (b.startsWith("/") ? b.slice(1) : b);
35611
35563
  }
35612
- function _normalizeWinPath(path$1) {
35613
- return path$1.replace(/\\/g, "/").replace(/^[a-z]:\//, (r) => r.toUpperCase());
35564
+ function _normalizeWinPath(path) {
35565
+ return path.replace(/\\/g, "/").replace(/^[a-z]:\//, (r) => r.toUpperCase());
35614
35566
  }
35615
35567
  function _isURL(input) {
35616
35568
  return input instanceof URL || input?.constructor?.name === "URL";
@@ -35642,7 +35594,6 @@ function _parseInput(input) {
35642
35594
  throw new TypeError("id must be a `string` or `URL`");
35643
35595
  }
35644
35596
 
35645
- //#endregion
35646
35597
 
35647
35598
  // EXTERNAL MODULE: external "node:module"
35648
35599
  var external_node_module_ = __webpack_require__(8995);
@@ -46934,8 +46885,8 @@ __webpack_require__.r = (exports) => {
46934
46885
  // object to store loaded and loading chunks
46935
46886
  // undefined = chunk not loaded, null = chunk preloaded/prefetched
46936
46887
  // [resolve, Promise] = chunk loading, 0 = chunk loaded
46937
- var installedChunks = {410: 0,};
46938
- var installChunk = (data) => {
46888
+ var moduleInstalledChunks = {410: 0,};
46889
+ var moduleInstallChunk = (data) => {
46939
46890
  var __rspack_esm_ids = data.__rspack_esm_ids;
46940
46891
  var moreModules = data.__webpack_modules__;
46941
46892
  var __rspack_esm_runtime = data.__rspack_esm_runtime;
@@ -46950,17 +46901,17 @@ __webpack_require__.r = (exports) => {
46950
46901
  if (__rspack_esm_runtime) __rspack_esm_runtime(__webpack_require__);
46951
46902
  for (; i < __rspack_esm_ids.length; i++) {
46952
46903
  chunkId = __rspack_esm_ids[i];
46953
- if (__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
46954
- installedChunks[chunkId][0]();
46904
+ if (__webpack_require__.o(moduleInstalledChunks, chunkId) && moduleInstalledChunks[chunkId]) {
46905
+ moduleInstalledChunks[chunkId][0]();
46955
46906
  }
46956
- installedChunks[__rspack_esm_ids[i]] = 0;
46907
+ moduleInstalledChunks[__rspack_esm_ids[i]] = 0;
46957
46908
  }
46958
46909
 
46959
46910
  };
46960
46911
 
46961
46912
  __webpack_require__.f.j = function (chunkId, promises) {
46962
46913
  // import() chunk loading for javascript
46963
- var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
46914
+ var installedChunkData = __webpack_require__.o(moduleInstalledChunks, chunkId) ? moduleInstalledChunks[chunkId] : undefined;
46964
46915
  if (installedChunkData !== 0) { // 0 means "already installed".'
46965
46916
  // a Promise means "currently loading".
46966
46917
  if (installedChunkData) {
@@ -46968,18 +46919,19 @@ if (installedChunkData !== 0) { // 0 means "already installed".'
46968
46919
  } else {
46969
46920
  if (true) {
46970
46921
  // setup Promise in chunk cache
46971
- var promise = import("./" + __webpack_require__.u(chunkId)).then(installChunk, (e) => {
46972
- if (installedChunks[chunkId] !== 0) installedChunks[chunkId] = undefined;
46922
+ var promise = import("./" + __webpack_require__.u(chunkId)).then(moduleInstallChunk, (e) => {
46923
+ if (moduleInstalledChunks[chunkId] !== 0) moduleInstalledChunks[chunkId] = undefined;
46973
46924
  throw e;
46974
46925
  });
46975
46926
  var promise = Promise.race([promise, new Promise((resolve) => {
46976
- installedChunkData = installedChunks[chunkId] = [resolve];
46927
+ installedChunkData = moduleInstalledChunks[chunkId] = [resolve];
46977
46928
  })]);
46978
46929
  promises.push(installedChunkData[1] = promise);
46979
46930
  }
46980
46931
 
46981
46932
  }
46982
46933
  }
46934
+
46983
46935
  }
46984
46936
  // no external install chunk
46985
46937
  // no on chunks loaded