@rsdoctor/core 2.0.0 → 2.0.2

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.
package/dist/e.js CHANGED
@@ -10,6 +10,7 @@ import node_path from "node:path";
10
10
  import { fileURLToPath } from "node:url";
11
11
  import { find as collection_find, mapValues, omit } from "@rsdoctor/shared/collection";
12
12
  import fs from "fs";
13
+ import { parseSync } from "@swc-next/parser";
13
14
  let __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
14
15
  moduleFactories.add({
15
16
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy-sync.js" (module) {
@@ -83,20 +84,6 @@ moduleFactories.add({
83
84
  async function runFilter(src, dest, opts) {
84
85
  return !opts.filter || opts.filter(src, dest);
85
86
  }
86
- async function getStatsAndPerformCopy(destStat, src, dest, opts) {
87
- let statFn = opts.dereference ? fs.stat : fs.lstat, srcStat = await statFn(src);
88
- if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
89
- if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
90
- if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
91
- if (srcStat.isSocket()) throw Error(`Cannot copy a socket file: ${src}`);
92
- if (srcStat.isFIFO()) throw Error(`Cannot copy a FIFO pipe: ${src}`);
93
- throw Error(`Unknown file: ${src}`);
94
- }
95
- async function onFile(srcStat, destStat, src, dest, opts) {
96
- if (!destStat) return copyFile(srcStat, src, dest, opts);
97
- if (opts.overwrite) return await fs.unlink(dest), copyFile(srcStat, src, dest, opts);
98
- if (opts.errorOnExist) throw Error(`'${dest}' already exists`);
99
- }
100
87
  async function copyFile(srcStat, src, dest, opts) {
101
88
  if (await fs.copyFile(src, dest), opts.preserveTimestamps) {
102
89
  var dest1, srcMode;
@@ -106,39 +93,49 @@ moduleFactories.add({
106
93
  }
107
94
  return fs.chmod(dest, srcStat.mode);
108
95
  }
109
- async function onDir(srcStat, destStat, src, dest, opts) {
110
- destStat || await fs.mkdir(dest);
111
- let promises = [];
112
- for await (let item of (await fs.opendir(src))){
113
- let srcItem = path.join(src, item.name), destItem = path.join(dest, item.name);
114
- promises.push(runFilter(srcItem, destItem, opts).then((include)=>{
115
- if (include) return stat.checkPaths(srcItem, destItem, 'copy', opts).then(({ destStat })=>getStatsAndPerformCopy(destStat, srcItem, destItem, opts));
116
- }));
117
- }
118
- await Promise.all(promises), destStat || await fs.chmod(dest, srcStat.mode);
119
- }
120
- async function onLink(destStat, src, dest, opts) {
121
- let resolvedSrc = await fs.readlink(src);
122
- if (opts.dereference && (resolvedSrc = path.resolve(process.cwd(), resolvedSrc)), !destStat) return fs.symlink(resolvedSrc, dest);
123
- let resolvedDest = null;
124
- try {
125
- resolvedDest = await fs.readlink(dest);
126
- } catch (e) {
127
- if ('EINVAL' === e.code || 'UNKNOWN' === e.code) return fs.symlink(resolvedSrc, dest);
128
- throw e;
129
- }
130
- if (opts.dereference && (resolvedDest = path.resolve(process.cwd(), resolvedDest)), stat.isSrcSubdir(resolvedSrc, resolvedDest)) throw Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
131
- if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) throw Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
132
- return await fs.unlink(dest), fs.symlink(resolvedSrc, dest);
133
- }
134
- module.exports = async function copy(src, dest, opts = {}) {
96
+ module.exports = async function(src, dest, opts = {}) {
135
97
  'function' == typeof opts && (opts = {
136
98
  filter: opts
137
99
  }), opts.clobber = !('clobber' in opts) || !!opts.clobber, opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber, opts.preserveTimestamps && 'ia32' === process.arch && process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269", 'Warning', 'fs-extra-WARN0001');
138
100
  let { srcStat, destStat } = await stat.checkPaths(src, dest, 'copy', opts);
139
101
  if (await stat.checkParentPaths(src, srcStat, dest, 'copy'), !await runFilter(src, dest, opts)) return;
140
102
  let destParent = path.dirname(dest);
141
- await pathExists(destParent) || await mkdirs(destParent), await getStatsAndPerformCopy(destStat, src, dest, opts);
103
+ await pathExists(destParent) || await mkdirs(destParent), await async function getStatsAndPerformCopy(destStat, src, dest, opts) {
104
+ let statFn = opts.dereference ? fs.stat : fs.lstat, srcStat = await statFn(src);
105
+ if (srcStat.isDirectory()) return async function(srcStat, destStat, src, dest, opts) {
106
+ destStat || await fs.mkdir(dest);
107
+ let promises = [];
108
+ for await (let item of (await fs.opendir(src))){
109
+ let srcItem = path.join(src, item.name), destItem = path.join(dest, item.name);
110
+ promises.push(runFilter(srcItem, destItem, opts).then((include)=>{
111
+ if (include) return stat.checkPaths(srcItem, destItem, 'copy', opts).then(({ destStat })=>getStatsAndPerformCopy(destStat, srcItem, destItem, opts));
112
+ }));
113
+ }
114
+ await Promise.all(promises), destStat || await fs.chmod(dest, srcStat.mode);
115
+ }(srcStat, destStat, src, dest, opts);
116
+ if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return async function(srcStat, destStat, src, dest, opts) {
117
+ if (!destStat) return copyFile(srcStat, src, dest, opts);
118
+ if (opts.overwrite) return await fs.unlink(dest), copyFile(srcStat, src, dest, opts);
119
+ if (opts.errorOnExist) throw Error(`'${dest}' already exists`);
120
+ }(srcStat, destStat, src, dest, opts);
121
+ if (srcStat.isSymbolicLink()) return async function(destStat, src, dest, opts) {
122
+ let resolvedSrc = await fs.readlink(src);
123
+ if (opts.dereference && (resolvedSrc = path.resolve(process.cwd(), resolvedSrc)), !destStat) return fs.symlink(resolvedSrc, dest);
124
+ let resolvedDest = null;
125
+ try {
126
+ resolvedDest = await fs.readlink(dest);
127
+ } catch (e) {
128
+ if ('EINVAL' === e.code || 'UNKNOWN' === e.code) return fs.symlink(resolvedSrc, dest);
129
+ throw e;
130
+ }
131
+ if (opts.dereference && (resolvedDest = path.resolve(process.cwd(), resolvedDest)), stat.isSrcSubdir(resolvedSrc, resolvedDest)) throw Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
132
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) throw Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
133
+ return await fs.unlink(dest), fs.symlink(resolvedSrc, dest);
134
+ }(destStat, src, dest, opts);
135
+ if (srcStat.isSocket()) throw Error(`Cannot copy a socket file: ${src}`);
136
+ if (srcStat.isFIFO()) throw Error(`Cannot copy a FIFO pipe: ${src}`);
137
+ throw Error(`Unknown file: ${src}`);
138
+ }(destStat, src, dest, opts);
142
139
  };
143
140
  },
144
141
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/index.js" (module) {
@@ -178,7 +175,7 @@ moduleFactories.add({
178
175
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/file.js" (module) {
179
176
  let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, path = __rspack_createRequire_require("path"), fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), mkdir = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js");
180
177
  module.exports = {
181
- createFile: u(async function createFile(file) {
178
+ createFile: u(async function(file) {
182
179
  let stats;
183
180
  try {
184
181
  stats = await fs.stat(file);
@@ -233,7 +230,7 @@ moduleFactories.add({
233
230
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/link.js" (module) {
234
231
  let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, path = __rspack_createRequire_require("path"), fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), mkdir = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"), { pathExists } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js"), { areIdentical } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js");
235
232
  module.exports = {
236
- createLink: u(async function createLink(srcpath, dstpath) {
233
+ createLink: u(async function(srcpath, dstpath) {
237
234
  let dstStat, srcStat;
238
235
  try {
239
236
  dstStat = await fs.lstat(dstpath);
@@ -265,8 +262,24 @@ moduleFactories.add({
265
262
  },
266
263
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-paths.js" (module) {
267
264
  let path = __rspack_createRequire_require("path"), fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), { pathExists } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js");
268
- async function symlinkPaths(srcpath, dstpath) {
269
- if (path.isAbsolute(srcpath)) {
265
+ module.exports = {
266
+ symlinkPaths: (0, rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise)(async function(srcpath, dstpath) {
267
+ if (path.isAbsolute(srcpath)) {
268
+ try {
269
+ await fs.lstat(srcpath);
270
+ } catch (err) {
271
+ throw err.message = err.message.replace('lstat', 'ensureSymlink'), err;
272
+ }
273
+ return {
274
+ toCwd: srcpath,
275
+ toDst: srcpath
276
+ };
277
+ }
278
+ let dstdir = path.dirname(dstpath), relativeToDst = path.join(dstdir, srcpath);
279
+ if (await pathExists(relativeToDst)) return {
280
+ toCwd: relativeToDst,
281
+ toDst: srcpath
282
+ };
270
283
  try {
271
284
  await fs.lstat(srcpath);
272
285
  } catch (err) {
@@ -274,26 +287,9 @@ moduleFactories.add({
274
287
  }
275
288
  return {
276
289
  toCwd: srcpath,
277
- toDst: srcpath
290
+ toDst: path.relative(dstdir, srcpath)
278
291
  };
279
- }
280
- let dstdir = path.dirname(dstpath), relativeToDst = path.join(dstdir, srcpath);
281
- if (await pathExists(relativeToDst)) return {
282
- toCwd: relativeToDst,
283
- toDst: srcpath
284
- };
285
- try {
286
- await fs.lstat(srcpath);
287
- } catch (err) {
288
- throw err.message = err.message.replace('lstat', 'ensureSymlink'), err;
289
- }
290
- return {
291
- toCwd: srcpath,
292
- toDst: path.relative(dstdir, srcpath)
293
- };
294
- }
295
- module.exports = {
296
- symlinkPaths: (0, rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise)(symlinkPaths),
292
+ }),
297
293
  symlinkPathsSync: function(srcpath, dstpath) {
298
294
  if (path.isAbsolute(srcpath)) {
299
295
  if (!fs.existsSync(srcpath)) throw Error('absolute srcpath does not exist');
@@ -317,18 +313,17 @@ moduleFactories.add({
317
313
  },
318
314
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-type.js" (module) {
319
315
  let fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js");
320
- async function symlinkType(srcpath, type) {
321
- let stats;
322
- if (type) return type;
323
- try {
324
- stats = await fs.lstat(srcpath);
325
- } catch {
326
- return 'file';
327
- }
328
- return stats && stats.isDirectory() ? 'dir' : 'file';
329
- }
330
316
  module.exports = {
331
- symlinkType: (0, rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise)(symlinkType),
317
+ symlinkType: (0, rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise)(async function(srcpath, type) {
318
+ let stats;
319
+ if (type) return type;
320
+ try {
321
+ stats = await fs.lstat(srcpath);
322
+ } catch {
323
+ return 'file';
324
+ }
325
+ return stats && stats.isDirectory() ? 'dir' : 'file';
326
+ }),
332
327
  symlinkTypeSync: function(srcpath, type) {
333
328
  let stats;
334
329
  if (type) return type;
@@ -344,7 +339,7 @@ moduleFactories.add({
344
339
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink.js" (module) {
345
340
  let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, path = __rspack_createRequire_require("path"), fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), { mkdirs, mkdirsSync } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"), { symlinkPaths, symlinkPathsSync } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"), { symlinkType, symlinkTypeSync } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-type.js"), { pathExists } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js"), { areIdentical } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js");
346
341
  module.exports = {
347
- createSymlink: u(async function createSymlink(srcpath, dstpath, type) {
342
+ createSymlink: u(async function(srcpath, dstpath, type) {
348
343
  let stats;
349
344
  try {
350
345
  stats = await fs.lstat(dstpath);
@@ -568,36 +563,34 @@ moduleFactories.add({
568
563
  },
569
564
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move.js" (module) {
570
565
  let fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path = __rspack_createRequire_require("path"), { copy } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/index.js"), { remove } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/remove/index.js"), { mkdirp } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"), { pathExists } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js"), stat = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js");
571
- async function doRename(src, dest, overwrite, isChangingCase) {
572
- if (!isChangingCase) {
573
- if (overwrite) await remove(dest);
574
- else if (await pathExists(dest)) throw Error('dest already exists.');
575
- }
576
- try {
577
- await fs.rename(src, dest);
578
- } catch (err) {
579
- if ('EXDEV' !== err.code) throw err;
580
- await moveAcrossDevice(src, dest, overwrite);
581
- }
582
- }
583
- async function moveAcrossDevice(src, dest, overwrite) {
584
- return await copy(src, dest, {
585
- overwrite,
586
- errorOnExist: !0,
587
- preserveTimestamps: !0
588
- }), remove(src);
589
- }
590
566
  module.exports = async function(src, dest, opts = {}) {
591
567
  let overwrite = opts.overwrite || opts.clobber || !1, { srcStat, isChangingCase = !1 } = await stat.checkPaths(src, dest, 'move', opts);
592
568
  await stat.checkParentPaths(src, srcStat, dest, 'move');
593
569
  let destParent = path.dirname(dest);
594
- return path.parse(destParent).root !== destParent && await mkdirp(destParent), doRename(src, dest, overwrite, isChangingCase);
570
+ return path.parse(destParent).root !== destParent && await mkdirp(destParent), async function(src, dest, overwrite, isChangingCase) {
571
+ if (!isChangingCase) {
572
+ if (overwrite) await remove(dest);
573
+ else if (await pathExists(dest)) throw Error('dest already exists.');
574
+ }
575
+ try {
576
+ await fs.rename(src, dest);
577
+ } catch (err) {
578
+ if ('EXDEV' !== err.code) throw err;
579
+ await async function(src, dest, overwrite) {
580
+ return await copy(src, dest, {
581
+ overwrite,
582
+ errorOnExist: !0,
583
+ preserveTimestamps: !0
584
+ }), remove(src);
585
+ }(src, dest, overwrite);
586
+ }
587
+ }(src, dest, overwrite, isChangingCase);
595
588
  };
596
589
  },
597
590
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/output-file/index.js" (module) {
598
591
  let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path = __rspack_createRequire_require("path"), mkdir = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"), pathExists = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js").pathExists;
599
592
  module.exports = {
600
- outputFile: u(async function outputFile(file, data, encoding = 'utf-8') {
593
+ outputFile: u(async function(file, data, encoding = 'utf-8') {
601
594
  let dir = path.dirname(file);
602
595
  return await pathExists(dir) || await mkdir.mkdirs(dir), fs.writeFile(file, data, encoding);
603
596
  }),
@@ -635,21 +628,6 @@ moduleFactories.add({
635
628
  },
636
629
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js" (module) {
637
630
  let fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path = __rspack_createRequire_require("path"), u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise;
638
- async function checkParentPaths(src, srcStat, dest, funcName) {
639
- let destStat, srcParent = path.resolve(path.dirname(src)), destParent = path.resolve(path.dirname(dest));
640
- if (destParent !== srcParent && destParent !== path.parse(destParent).root) {
641
- try {
642
- destStat = await fs.stat(destParent, {
643
- bigint: !0
644
- });
645
- } catch (err) {
646
- if ('ENOENT' === err.code) return;
647
- throw err;
648
- }
649
- if (areIdentical(srcStat, destStat)) throw Error(errMsg(src, dest, funcName));
650
- return checkParentPaths(src, srcStat, destParent, funcName);
651
- }
652
- }
653
631
  function areIdentical(srcStat, destStat) {
654
632
  return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
655
633
  }
@@ -661,7 +639,7 @@ moduleFactories.add({
661
639
  return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
662
640
  }
663
641
  module.exports = {
664
- checkPaths: u(async function checkPaths(src, dest, funcName, opts) {
642
+ checkPaths: u(async function(src, dest, funcName, opts) {
665
643
  let statFunc, { srcStat, destStat } = await Promise.all([
666
644
  (statFunc = opts.dereference ? (file)=>fs.stat(file, {
667
645
  bigint: !0
@@ -735,7 +713,21 @@ moduleFactories.add({
735
713
  destStat
736
714
  };
737
715
  },
738
- checkParentPaths: u(checkParentPaths),
716
+ checkParentPaths: u(async function checkParentPaths(src, srcStat, dest, funcName) {
717
+ let destStat, srcParent = path.resolve(path.dirname(src)), destParent = path.resolve(path.dirname(dest));
718
+ if (destParent !== srcParent && destParent !== path.parse(destParent).root) {
719
+ try {
720
+ destStat = await fs.stat(destParent, {
721
+ bigint: !0
722
+ });
723
+ } catch (err) {
724
+ if ('ENOENT' === err.code) return;
725
+ throw err;
726
+ }
727
+ if (areIdentical(srcStat, destStat)) throw Error(errMsg(src, dest, funcName));
728
+ return checkParentPaths(src, srcStat, destParent, funcName);
729
+ }
730
+ }),
739
731
  checkParentPathsSync: function checkParentPathsSync(src, srcStat, dest, funcName) {
740
732
  let destStat, srcParent = path.resolve(path.dirname(src)), destParent = path.resolve(path.dirname(dest));
741
733
  if (destParent !== srcParent && destParent !== path.parse(destParent).root) {
@@ -757,21 +749,20 @@ moduleFactories.add({
757
749
  },
758
750
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/utimes.js" (module) {
759
751
  let fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js");
760
- async function utimesMillis(path, atime, mtime) {
761
- let fd = await fs.open(path, 'r+'), closeErr = null;
762
- try {
763
- await fs.futimes(fd, atime, mtime);
764
- } finally{
752
+ module.exports = {
753
+ utimesMillis: (0, rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise)(async function(path, atime, mtime) {
754
+ let fd = await fs.open(path, 'r+'), closeErr = null;
765
755
  try {
766
- await fs.close(fd);
767
- } catch (e) {
768
- closeErr = e;
756
+ await fs.futimes(fd, atime, mtime);
757
+ } finally{
758
+ try {
759
+ await fs.close(fd);
760
+ } catch (e) {
761
+ closeErr = e;
762
+ }
769
763
  }
770
- }
771
- if (closeErr) throw closeErr;
772
- }
773
- module.exports = {
774
- utimesMillis: (0, rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise)(utimesMillis),
764
+ if (closeErr) throw closeErr;
765
+ }),
775
766
  utimesMillisSync: function(path, atime, mtime) {
776
767
  let fd = fs.openSync(path, 'r+');
777
768
  return fs.futimesSync(fd, atime, mtime), fs.closeSync(fd);
@@ -1259,8 +1250,7 @@ moduleFactories.add({
1259
1250
  } catch (_) {
1260
1251
  _fs = __rspack_createRequire_require("fs");
1261
1252
  }
1262
- let universalify = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"), { stringify, stripBom } = rspackRequire("../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js");
1263
- async function _readFile(file, options = {}) {
1253
+ let universalify = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"), { stringify, stripBom } = rspackRequire("../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"), readFile = universalify.fromPromise(async function(file, options = {}) {
1264
1254
  let obj;
1265
1255
  'string' == typeof options && (options = {
1266
1256
  encoding: options
@@ -1274,12 +1264,7 @@ moduleFactories.add({
1274
1264
  throw err.message = `${file}: ${err.message}`, err;
1275
1265
  }
1276
1266
  return obj;
1277
- }
1278
- let readFile = universalify.fromPromise(_readFile);
1279
- async function _writeFile(file, obj, options = {}) {
1280
- let fs = options.fs || _fs, str = stringify(obj, options);
1281
- await universalify.fromCallback(fs.writeFile)(file, str, options);
1282
- }
1267
+ });
1283
1268
  module.exports = {
1284
1269
  readFile,
1285
1270
  readFileSync: function(file, options = {}) {
@@ -1295,7 +1280,10 @@ moduleFactories.add({
1295
1280
  throw err.message = `${file}: ${err.message}`, err;
1296
1281
  }
1297
1282
  },
1298
- writeFile: universalify.fromPromise(_writeFile),
1283
+ writeFile: universalify.fromPromise(async function(file, obj, options = {}) {
1284
+ let fs = options.fs || _fs, str = stringify(obj, options);
1285
+ await universalify.fromCallback(fs.writeFile)(file, str, options);
1286
+ }),
1299
1287
  writeFileSync: function(file, obj, options = {}) {
1300
1288
  let fs = options.fs || _fs, str = stringify(obj, options);
1301
1289
  return fs.writeFileSync(file, str, options);
@@ -1334,17 +1322,13 @@ moduleFactories.add({
1334
1322
  };
1335
1323
  }
1336
1324
  });
1337
- var options, Types, esm_Types, utils_namespaceObject = {};
1325
+ var Types, esm_Types, utils_namespaceObject = {};
1338
1326
  makeNamespaceObject(utils_namespaceObject), definePropertyGetters(utils_namespaceObject, {
1339
- canParse: ()=>canParse,
1340
- detectECMAVersion: ()=>detectECMAVersion,
1341
1327
  getDefaultImports: ()=>getDefaultImports,
1342
1328
  getIdentifierInDeclaration: ()=>getIdentifierInDeclaration,
1343
1329
  getIdentifierInExport: ()=>getIdentifierInExport,
1344
1330
  getIdentifierInImport: ()=>getIdentifierInImport,
1345
1331
  getIdentifierInPattern: ()=>getIdentifierInPattern,
1346
- isES5: ()=>isES5,
1347
- isES6: ()=>isES6,
1348
1332
  isSameSyntax: ()=>function isSameSyntax(node1, node2) {
1349
1333
  if (node1.type !== node2.type) return !1;
1350
1334
  switch(node1.type){
@@ -1368,42 +1352,18 @@ makeNamespaceObject(utils_namespaceObject), definePropertyGetters(utils_namespac
1368
1352
  });
1369
1353
  var walk_namespaceObject = {};
1370
1354
  makeNamespaceObject(walk_namespaceObject), definePropertyGetters(walk_namespaceObject, {
1371
- ancestor: ()=>ancestor,
1372
- base: ()=>walk_base,
1373
- findNodeAfter: ()=>findNodeAfter,
1374
- findNodeAround: ()=>findNodeAround,
1375
- findNodeAt: ()=>findNodeAt,
1376
- findNodeBefore: ()=>findNodeBefore,
1377
- full: ()=>walk_full,
1378
- fullAncestor: ()=>fullAncestor,
1379
- make: ()=>make,
1380
- recursive: ()=>recursive,
1381
- simple: ()=>walk_simple
1382
- });
1383
- var acorn_namespaceObject = {};
1384
- makeNamespaceObject(acorn_namespaceObject), definePropertyGetters(acorn_namespaceObject, {
1385
- Node: ()=>acorn_Node,
1386
- Parser: ()=>acorn_Parser,
1387
- Position: ()=>acorn_Position,
1388
- SourceLocation: ()=>acorn_SourceLocation,
1389
- TokContext: ()=>acorn_TokContext,
1390
- Token: ()=>acorn_Token,
1391
- TokenType: ()=>acorn_TokenType,
1392
- defaultOptions: ()=>defaultOptions,
1393
- getLineInfo: ()=>getLineInfo,
1394
- isIdentifierChar: ()=>isIdentifierChar,
1395
- isIdentifierStart: ()=>isIdentifierStart,
1396
- isNewLine: ()=>isNewLine,
1397
- keywordTypes: ()=>keywords,
1398
- lineBreak: ()=>lineBreak,
1399
- lineBreakG: ()=>lineBreakG,
1400
- nonASCIIwhitespace: ()=>nonASCIIwhitespace,
1401
- parse: ()=>acorn_parse,
1402
- parseExpressionAt: ()=>acorn_parseExpressionAt,
1403
- tokContexts: ()=>types,
1404
- tokTypes: ()=>types$1,
1405
- tokenizer: ()=>acorn_tokenizer,
1406
- version: ()=>version
1355
+ recursive: ()=>function recursive(node, state, visitors) {
1356
+ !function(ast, { enter, leave }) {
1357
+ new SyncWalker(enter, leave).visit(ast, null);
1358
+ }(node, {
1359
+ enter (child) {
1360
+ let visitor = visitors[child.type];
1361
+ visitor && (this.skip(), visitor(child, state, (next, nextState)=>{
1362
+ recursive(next, nextState, visitors);
1363
+ }));
1364
+ }
1365
+ });
1366
+ }
1407
1367
  }), !function() {
1408
1368
  let { versions } = process;
1409
1369
  if (!("styleText" in node_util) && versions.node && !versions.bun && !versions.deno) throw Error(`Unsupported Node.js version: "${process.versions.node || 'unknown'}". Expected Node.js >= 20.`);
@@ -1558,7 +1518,7 @@ function _assertThisInitialized(self) {
1558
1518
  if (void 0 === self) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
1559
1519
  return self;
1560
1520
  }
1561
- var rxEscapable = /[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, esm_meta = {
1521
+ var rxEscapable = /[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, meta = {
1562
1522
  '\b': '\\b',
1563
1523
  '\t': '\\t',
1564
1524
  '\n': '\\n',
@@ -1585,7 +1545,7 @@ var processFunctionLookupTable = [
1585
1545
  ];
1586
1546
  function escapeString(string) {
1587
1547
  return string.replace(rxEscapable, function(a) {
1588
- var c = esm_meta[a];
1548
+ var c = meta[a];
1589
1549
  return 'string' == typeof c ? c : "\\u".concat(a.charCodeAt(0).toString(16).padStart(4, '0'));
1590
1550
  });
1591
1551
  }
@@ -1987,6 +1947,32 @@ function calculateOptimizedValue(num, e, isDecimal, bits, ceil, autoExponent = !
1987
1947
  e
1988
1948
  };
1989
1949
  }
1950
+ function applyNumberFormatting(value, locale, localeOptions, separator, pad, round, roundingFunc) {
1951
+ let result = value, localePad = pad && round > 0 ? {
1952
+ minimumFractionDigits: round,
1953
+ maximumFractionDigits: round
1954
+ } : void 0;
1955
+ if ((!0 === locale || locale.length > 0) && "string" == typeof result && 0 !== Number(result) && (result = parseFloat(result)), !0 === locale) result = result.toLocaleString(void 0, localePad);
1956
+ else if (locale.length > 0) result = result.toLocaleString(locale, {
1957
+ ...localeOptions,
1958
+ ...localePad
1959
+ });
1960
+ else {
1961
+ if (separator.length > 0 && pad && round > 0) {
1962
+ let p = Math.pow(10, round);
1963
+ result = roundingFunc(result * p) / p;
1964
+ }
1965
+ "number" == typeof result && isFinite(result) && result.toString().includes("e") && (result = result.toLocaleString("en-US", {
1966
+ useGrouping: !1,
1967
+ maximumFractionDigits: 20
1968
+ })), separator.length > 0 && (result = result.toString().replace(".", separator));
1969
+ }
1970
+ if (pad && round > 0 && !0 !== locale && 0 === locale.length) {
1971
+ let resultStr = result.toString(), x = separator || ".", tmp = resultStr.split(x), s = tmp[1] || "";
1972
+ result = `${tmp[0]}${x}${s.padEnd(round, "0")}`;
1973
+ }
1974
+ return result;
1975
+ }
1990
1976
  function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "", localeOptions = {}, separator = "", spacer = " ", symbols = {}, standard = "", output = STRING, fullform = !1, fullforms = [], exponent = -1, roundingMethod = "round", precision = 0 } = {}) {
1991
1977
  let p, r, symbolTable, numericValue, valueResult, e = exponent, num, result = [], val = 0, u = "", isBigInt = "bigint" == typeof arg;
1992
1978
  if (isNaN(num = Number(arg)) || !isFinite(num)) throw TypeError("Invalid number");
@@ -2000,9 +1986,9 @@ function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "",
2000
1986
  actualStandard: JEDEC
2001
1987
  }, full = !0 === fullform, neg = num < 0, roundingFunc = Math[roundingMethod];
2002
1988
  if ("function" != typeof roundingFunc) throw TypeError("Invalid rounding method");
2003
- if (neg && (num = -num), 0 === num) {
1989
+ if (neg && (num = -num), 0 === num) return function(precision, actualStandard, bits, symbols, full, fullforms, output, spacer, pad, round, symbol, locale = "", localeOptions = {}, separator = "") {
2004
1990
  let value;
2005
- return (value = precision > 0 ? 0..toPrecision(precision) : pad && round > 0 ? 0..toFixed(round) : 0, output === EXPONENT) ? 0 : (symbol || (symbol = bits ? STRINGS_symbol[actualStandard].bits[0] : STRINGS_symbol[actualStandard].bytes[0]), symbols[symbol] && (symbol = symbols[symbol]), full && (fullforms[0] ? symbol = fullforms[0] : (symbol = STRINGS_fullform[actualStandard][0], bits ? symbol += "bit" : symbol += BYTE)), output === ARRAY) ? [
1991
+ return (value = precision > 0 ? 0..toPrecision(precision) : pad && round > 0 ? 0..toFixed(round) : 0, output === EXPONENT) ? 0 : (value = applyNumberFormatting(precision <= 0 && (!0 === locale || locale.length > 0) ? 0 : value, locale, localeOptions, separator, pad && precision <= 0, round, Math.round), symbol || (symbol = bits ? STRINGS_symbol[actualStandard].bits[0] : STRINGS_symbol[actualStandard].bytes[0]), symbols[symbol] && (symbol = symbols[symbol]), full && (fullforms[0] ? symbol = fullforms[0] : (symbol = STRINGS_fullform[actualStandard][0], bits ? symbol += "bit" : symbol += BYTE)), output === ARRAY) ? [
2006
1992
  value,
2007
1993
  symbol
2008
1994
  ] : output === OBJECT ? {
@@ -2011,7 +1997,7 @@ function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "",
2011
1997
  exponent: 0,
2012
1998
  unit: symbol
2013
1999
  } : value + spacer + symbol;
2014
- }
2000
+ }(precision, actualStandard, bits, symbols, full, fullforms, output, spacer, pad, round, void 0, locale, localeOptions, separator);
2015
2001
  let bigNum = isBigInt ? neg ? -BigInt(arg) : BigInt(arg) : null, precisionAdjusted = precision;
2016
2002
  if (isBigInt) {
2017
2003
  let { e: calculatedE, precision: pa } = function(num, e, isDecimal, precision) {
@@ -2066,32 +2052,8 @@ function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "",
2066
2052
  }
2067
2053
  if (output === EXPONENT) return e;
2068
2054
  e3 = e, symbolTable = STRINGS_symbol[actualStandard][bits ? "bits" : "bytes"], u = isDecimal && 1 === e3 ? bits ? "kbit" : "kB" : symbolTable[e3], result[1] = u;
2069
- var symbol, num1, e1, precision1, val1, e2, e3, e4 = e;
2070
- if (neg && ("string" == typeof result[0] ? result[0] = `-${result[0]}` : 0 === result[0] ? result[0] = "-0" : result[0] = -result[0]), symbols[result[1]] && (result[1] = symbols[result[1]]), numericValue = "string" == typeof result[0] ? parseFloat(result[0]) : result[0], result[0] = function(value, locale, localeOptions, separator, pad, round, roundingFunc) {
2071
- let result = value, localePad = pad && round > 0 ? {
2072
- minimumFractionDigits: round,
2073
- maximumFractionDigits: round
2074
- } : void 0;
2075
- if (!0 === locale) result = result.toLocaleString(void 0, localePad);
2076
- else if (locale.length > 0) result = result.toLocaleString(locale, {
2077
- ...localeOptions,
2078
- ...localePad
2079
- });
2080
- else if (separator.length > 0) {
2081
- if (pad && round > 0) {
2082
- let p = Math.pow(10, round);
2083
- result = roundingFunc(result * p) / p;
2084
- }
2085
- result = result.toString().replace(".", separator);
2086
- }
2087
- if ("number" == typeof result && isFinite(result) && result.toString().includes("e") && (result = result.toLocaleString("en-US", {
2088
- useGrouping: !1
2089
- })), pad && round > 0 && !0 !== locale && 0 === locale.length) {
2090
- let resultStr = result.toString(), x = separator || ".", tmp = resultStr.split(x), s = tmp[1] || "";
2091
- result = `${tmp[0]}${x}${s.padEnd(round, "0")}`;
2092
- }
2093
- return result;
2094
- }(result[0], locale, localeOptions, separator, pad, round, roundingFunc), full) {
2055
+ var num1, e1, precision1, val1, e2, e3, e4 = e;
2056
+ if (neg && ("string" == typeof result[0] ? result[0] = `-${result[0]}` : 0 === result[0] ? result[0] = "-0" : result[0] = -result[0]), symbols[result[1]] && (result[1] = symbols[result[1]]), numericValue = "string" == typeof result[0] ? parseFloat(result[0]) : result[0], result[0] = applyNumberFormatting(result[0], locale, localeOptions, separator, pad, round, roundingFunc), full) {
2095
2057
  let unit, suffix;
2096
2058
  unit = bits ? "bit" : BYTE, suffix = 1 === Math.abs(numericValue) ? "" : "s", fullforms[e4] ? result[1] = fullforms[e4] : result[1] = STRINGS_fullform[actualStandard][e4] + unit + suffix;
2097
2059
  }
@@ -2482,3547 +2444,60 @@ let asserts = {
2482
2444
  isBigIntLiteral: (node)=>asserts.isLiteral(node) && 'bigint' in node,
2483
2445
  isExportStatement: (node)=>asserts.isExportAllDeclaration(node) || asserts.isExportDefaultDeclaration(node) || asserts.isExportNamedDeclaration(node)
2484
2446
  };
2485
- var astralIdentifierCodes = [
2486
- 509,
2487
- 0,
2488
- 227,
2489
- 0,
2490
- 150,
2491
- 4,
2492
- 294,
2493
- 9,
2494
- 1368,
2495
- 2,
2496
- 2,
2497
- 1,
2498
- 6,
2499
- 3,
2500
- 41,
2501
- 2,
2502
- 5,
2503
- 0,
2504
- 166,
2505
- 1,
2506
- 574,
2507
- 3,
2508
- 9,
2509
- 9,
2510
- 7,
2511
- 9,
2512
- 32,
2513
- 4,
2514
- 318,
2515
- 1,
2516
- 78,
2517
- 5,
2518
- 71,
2519
- 10,
2520
- 50,
2521
- 3,
2522
- 123,
2523
- 2,
2524
- 54,
2525
- 14,
2526
- 32,
2527
- 10,
2528
- 3,
2529
- 1,
2530
- 11,
2531
- 3,
2532
- 46,
2533
- 10,
2534
- 8,
2535
- 0,
2536
- 46,
2537
- 9,
2538
- 7,
2539
- 2,
2540
- 37,
2541
- 13,
2542
- 2,
2543
- 9,
2544
- 6,
2545
- 1,
2546
- 45,
2547
- 0,
2548
- 13,
2549
- 2,
2550
- 49,
2551
- 13,
2552
- 9,
2553
- 3,
2554
- 2,
2555
- 11,
2556
- 83,
2557
- 11,
2558
- 7,
2559
- 0,
2560
- 3,
2561
- 0,
2562
- 158,
2563
- 11,
2564
- 6,
2565
- 9,
2566
- 7,
2567
- 3,
2568
- 56,
2569
- 1,
2570
- 2,
2571
- 6,
2572
- 3,
2573
- 1,
2574
- 3,
2575
- 2,
2576
- 10,
2577
- 0,
2578
- 11,
2579
- 1,
2580
- 3,
2581
- 6,
2582
- 4,
2583
- 4,
2584
- 68,
2585
- 8,
2586
- 2,
2587
- 0,
2588
- 3,
2589
- 0,
2590
- 2,
2591
- 3,
2592
- 2,
2593
- 4,
2594
- 2,
2595
- 0,
2596
- 15,
2597
- 1,
2598
- 83,
2599
- 17,
2600
- 10,
2601
- 9,
2602
- 5,
2603
- 0,
2604
- 82,
2605
- 19,
2606
- 13,
2607
- 9,
2608
- 214,
2609
- 6,
2610
- 3,
2611
- 8,
2612
- 28,
2613
- 1,
2614
- 83,
2615
- 16,
2616
- 16,
2617
- 9,
2618
- 82,
2619
- 12,
2620
- 9,
2621
- 9,
2622
- 7,
2623
- 19,
2624
- 58,
2625
- 14,
2626
- 5,
2627
- 9,
2628
- 243,
2629
- 14,
2630
- 166,
2631
- 9,
2632
- 71,
2633
- 5,
2634
- 2,
2635
- 1,
2636
- 3,
2637
- 3,
2638
- 2,
2639
- 0,
2640
- 2,
2641
- 1,
2642
- 13,
2643
- 9,
2644
- 120,
2645
- 6,
2646
- 3,
2647
- 6,
2648
- 4,
2649
- 0,
2650
- 29,
2651
- 9,
2652
- 41,
2653
- 6,
2654
- 2,
2655
- 3,
2656
- 9,
2657
- 0,
2658
- 10,
2659
- 10,
2660
- 47,
2661
- 15,
2662
- 199,
2663
- 7,
2664
- 137,
2665
- 9,
2666
- 54,
2667
- 7,
2668
- 2,
2669
- 7,
2670
- 17,
2671
- 9,
2672
- 57,
2673
- 21,
2674
- 2,
2675
- 13,
2676
- 123,
2677
- 5,
2678
- 4,
2679
- 0,
2680
- 2,
2681
- 1,
2682
- 2,
2683
- 6,
2684
- 2,
2685
- 0,
2686
- 9,
2687
- 9,
2688
- 49,
2689
- 4,
2690
- 2,
2691
- 1,
2692
- 2,
2693
- 4,
2694
- 9,
2695
- 9,
2696
- 55,
2697
- 9,
2698
- 266,
2699
- 3,
2700
- 10,
2701
- 1,
2702
- 2,
2703
- 0,
2704
- 49,
2705
- 6,
2706
- 4,
2707
- 4,
2708
- 14,
2709
- 10,
2710
- 5350,
2711
- 0,
2712
- 7,
2713
- 14,
2714
- 11465,
2715
- 27,
2716
- 2343,
2717
- 9,
2718
- 87,
2719
- 9,
2720
- 39,
2721
- 4,
2722
- 60,
2723
- 6,
2724
- 26,
2725
- 9,
2726
- 535,
2727
- 9,
2728
- 470,
2729
- 0,
2730
- 2,
2731
- 54,
2732
- 8,
2733
- 3,
2734
- 82,
2735
- 0,
2736
- 12,
2737
- 1,
2738
- 19628,
2739
- 1,
2740
- 4178,
2741
- 9,
2742
- 519,
2743
- 45,
2744
- 3,
2745
- 22,
2746
- 543,
2747
- 4,
2748
- 4,
2749
- 5,
2750
- 9,
2751
- 7,
2752
- 3,
2753
- 6,
2754
- 31,
2755
- 3,
2756
- 149,
2757
- 2,
2758
- 1418,
2759
- 49,
2760
- 513,
2761
- 54,
2762
- 5,
2763
- 49,
2764
- 9,
2765
- 0,
2766
- 15,
2767
- 0,
2768
- 23,
2769
- 4,
2770
- 2,
2771
- 14,
2772
- 1361,
2773
- 6,
2774
- 2,
2775
- 16,
2776
- 3,
2777
- 6,
2778
- 2,
2779
- 1,
2780
- 2,
2781
- 4,
2782
- 101,
2783
- 0,
2784
- 161,
2785
- 6,
2786
- 10,
2787
- 9,
2788
- 357,
2789
- 0,
2790
- 62,
2791
- 13,
2792
- 499,
2793
- 13,
2794
- 245,
2795
- 1,
2796
- 2,
2797
- 9,
2798
- 233,
2799
- 0,
2800
- 3,
2801
- 0,
2802
- 8,
2803
- 1,
2804
- 6,
2805
- 0,
2806
- 475,
2807
- 6,
2808
- 110,
2809
- 6,
2810
- 6,
2811
- 9,
2812
- 4759,
2813
- 9,
2814
- 787719,
2815
- 239
2816
- ], astralIdentifierStartCodes = [
2817
- 0,
2818
- 11,
2819
- 2,
2820
- 25,
2821
- 2,
2822
- 18,
2823
- 2,
2824
- 1,
2825
- 2,
2826
- 14,
2827
- 3,
2828
- 13,
2829
- 35,
2830
- 122,
2831
- 70,
2832
- 52,
2833
- 268,
2834
- 28,
2835
- 4,
2836
- 48,
2837
- 48,
2838
- 31,
2839
- 14,
2840
- 29,
2841
- 6,
2842
- 37,
2843
- 11,
2844
- 29,
2845
- 3,
2846
- 35,
2847
- 5,
2848
- 7,
2849
- 2,
2850
- 4,
2851
- 43,
2852
- 157,
2853
- 19,
2854
- 35,
2855
- 5,
2856
- 35,
2857
- 5,
2858
- 39,
2859
- 9,
2860
- 51,
2861
- 13,
2862
- 10,
2863
- 2,
2864
- 14,
2865
- 2,
2866
- 6,
2867
- 2,
2868
- 1,
2869
- 2,
2870
- 10,
2871
- 2,
2872
- 14,
2873
- 2,
2874
- 6,
2875
- 2,
2876
- 1,
2877
- 4,
2878
- 51,
2879
- 13,
2880
- 310,
2881
- 10,
2882
- 21,
2883
- 11,
2884
- 7,
2885
- 25,
2886
- 5,
2887
- 2,
2888
- 41,
2889
- 2,
2890
- 8,
2891
- 70,
2892
- 5,
2893
- 3,
2894
- 0,
2895
- 2,
2896
- 43,
2897
- 2,
2898
- 1,
2899
- 4,
2900
- 0,
2901
- 3,
2902
- 22,
2903
- 11,
2904
- 22,
2905
- 10,
2906
- 30,
2907
- 66,
2908
- 18,
2909
- 2,
2910
- 1,
2911
- 11,
2912
- 21,
2913
- 11,
2914
- 25,
2915
- 7,
2916
- 25,
2917
- 39,
2918
- 55,
2919
- 7,
2920
- 1,
2921
- 65,
2922
- 0,
2923
- 16,
2924
- 3,
2925
- 2,
2926
- 2,
2927
- 2,
2928
- 28,
2929
- 43,
2930
- 28,
2931
- 4,
2932
- 28,
2933
- 36,
2934
- 7,
2935
- 2,
2936
- 27,
2937
- 28,
2938
- 53,
2939
- 11,
2940
- 21,
2941
- 11,
2942
- 18,
2943
- 14,
2944
- 17,
2945
- 111,
2946
- 72,
2947
- 56,
2948
- 50,
2949
- 14,
2950
- 50,
2951
- 14,
2952
- 35,
2953
- 39,
2954
- 27,
2955
- 10,
2956
- 22,
2957
- 251,
2958
- 41,
2959
- 7,
2960
- 1,
2961
- 17,
2962
- 5,
2963
- 57,
2964
- 28,
2965
- 11,
2966
- 0,
2967
- 9,
2968
- 21,
2969
- 43,
2970
- 17,
2971
- 47,
2972
- 20,
2973
- 28,
2974
- 22,
2975
- 13,
2976
- 52,
2977
- 58,
2978
- 1,
2979
- 3,
2980
- 0,
2981
- 14,
2982
- 44,
2983
- 33,
2984
- 24,
2985
- 27,
2986
- 35,
2987
- 30,
2988
- 0,
2989
- 3,
2990
- 0,
2991
- 9,
2992
- 34,
2993
- 4,
2994
- 0,
2995
- 13,
2996
- 47,
2997
- 15,
2998
- 3,
2999
- 22,
3000
- 0,
3001
- 2,
3002
- 0,
3003
- 36,
3004
- 17,
3005
- 2,
3006
- 24,
3007
- 20,
3008
- 1,
3009
- 64,
3010
- 6,
3011
- 2,
3012
- 0,
3013
- 2,
3014
- 3,
3015
- 2,
3016
- 14,
3017
- 2,
3018
- 9,
3019
- 8,
3020
- 46,
3021
- 39,
3022
- 7,
3023
- 3,
3024
- 1,
3025
- 3,
3026
- 21,
3027
- 2,
3028
- 6,
3029
- 2,
3030
- 1,
3031
- 2,
3032
- 4,
3033
- 4,
3034
- 0,
3035
- 19,
3036
- 0,
3037
- 13,
3038
- 4,
3039
- 31,
3040
- 9,
3041
- 2,
3042
- 0,
3043
- 3,
3044
- 0,
3045
- 2,
3046
- 37,
3047
- 2,
3048
- 0,
3049
- 26,
3050
- 0,
3051
- 2,
3052
- 0,
3053
- 45,
3054
- 52,
3055
- 19,
3056
- 3,
3057
- 21,
3058
- 2,
3059
- 31,
3060
- 47,
3061
- 21,
3062
- 1,
3063
- 2,
3064
- 0,
3065
- 185,
3066
- 46,
3067
- 42,
3068
- 3,
3069
- 37,
3070
- 47,
3071
- 21,
3072
- 0,
3073
- 60,
3074
- 42,
3075
- 14,
3076
- 0,
3077
- 72,
3078
- 26,
3079
- 38,
3080
- 6,
3081
- 186,
3082
- 43,
3083
- 117,
3084
- 63,
3085
- 32,
3086
- 7,
3087
- 3,
3088
- 0,
3089
- 3,
3090
- 7,
3091
- 2,
3092
- 1,
3093
- 2,
3094
- 23,
3095
- 16,
3096
- 0,
3097
- 2,
3098
- 0,
3099
- 95,
3100
- 7,
3101
- 3,
3102
- 38,
3103
- 17,
3104
- 0,
3105
- 2,
3106
- 0,
3107
- 29,
3108
- 0,
3109
- 11,
3110
- 39,
3111
- 8,
3112
- 0,
3113
- 22,
3114
- 0,
3115
- 12,
3116
- 45,
3117
- 20,
3118
- 0,
3119
- 19,
3120
- 72,
3121
- 200,
3122
- 32,
3123
- 32,
3124
- 8,
3125
- 2,
3126
- 36,
3127
- 18,
3128
- 0,
3129
- 50,
3130
- 29,
3131
- 113,
3132
- 6,
3133
- 2,
3134
- 1,
3135
- 2,
3136
- 37,
3137
- 22,
3138
- 0,
3139
- 26,
3140
- 5,
3141
- 2,
3142
- 1,
3143
- 2,
3144
- 31,
3145
- 15,
3146
- 0,
3147
- 24,
3148
- 43,
3149
- 261,
3150
- 18,
3151
- 16,
3152
- 0,
3153
- 2,
3154
- 12,
3155
- 2,
3156
- 33,
3157
- 125,
3158
- 0,
3159
- 80,
3160
- 921,
3161
- 103,
3162
- 110,
3163
- 18,
3164
- 195,
3165
- 2637,
3166
- 96,
3167
- 16,
3168
- 1071,
3169
- 18,
3170
- 5,
3171
- 26,
3172
- 3994,
3173
- 6,
3174
- 582,
3175
- 6842,
3176
- 29,
3177
- 1763,
3178
- 568,
3179
- 8,
3180
- 30,
3181
- 18,
3182
- 78,
3183
- 18,
3184
- 29,
3185
- 19,
3186
- 47,
3187
- 17,
3188
- 3,
3189
- 32,
3190
- 20,
3191
- 6,
3192
- 18,
3193
- 433,
3194
- 44,
3195
- 212,
3196
- 63,
3197
- 33,
3198
- 24,
3199
- 3,
3200
- 24,
3201
- 45,
3202
- 74,
3203
- 6,
3204
- 0,
3205
- 67,
3206
- 12,
3207
- 65,
3208
- 1,
3209
- 2,
3210
- 0,
3211
- 15,
3212
- 4,
3213
- 10,
3214
- 7381,
3215
- 42,
3216
- 31,
3217
- 98,
3218
- 114,
3219
- 8702,
3220
- 3,
3221
- 2,
3222
- 6,
3223
- 2,
3224
- 1,
3225
- 2,
3226
- 290,
3227
- 16,
3228
- 0,
3229
- 30,
3230
- 2,
3231
- 3,
3232
- 0,
3233
- 15,
3234
- 3,
3235
- 9,
3236
- 395,
3237
- 2309,
3238
- 106,
3239
- 6,
3240
- 12,
3241
- 4,
3242
- 8,
3243
- 8,
3244
- 9,
3245
- 5991,
3246
- 84,
3247
- 2,
3248
- 70,
3249
- 2,
3250
- 1,
3251
- 3,
3252
- 0,
3253
- 3,
3254
- 1,
3255
- 3,
3256
- 3,
3257
- 2,
3258
- 11,
3259
- 2,
3260
- 0,
3261
- 2,
3262
- 6,
3263
- 2,
3264
- 64,
3265
- 2,
3266
- 3,
3267
- 3,
3268
- 7,
3269
- 2,
3270
- 6,
3271
- 2,
3272
- 27,
3273
- 2,
3274
- 3,
3275
- 2,
3276
- 4,
3277
- 2,
3278
- 0,
3279
- 4,
3280
- 6,
3281
- 2,
3282
- 339,
3283
- 3,
3284
- 24,
3285
- 2,
3286
- 24,
3287
- 2,
3288
- 30,
3289
- 2,
3290
- 24,
3291
- 2,
3292
- 30,
3293
- 2,
3294
- 24,
3295
- 2,
3296
- 30,
3297
- 2,
3298
- 24,
3299
- 2,
3300
- 30,
3301
- 2,
3302
- 24,
3303
- 2,
3304
- 7,
3305
- 1845,
3306
- 30,
3307
- 7,
3308
- 5,
3309
- 262,
3310
- 61,
3311
- 147,
3312
- 44,
3313
- 11,
3314
- 6,
3315
- 17,
3316
- 0,
3317
- 322,
3318
- 29,
3319
- 19,
3320
- 43,
3321
- 485,
3322
- 27,
3323
- 229,
3324
- 29,
3325
- 3,
3326
- 0,
3327
- 208,
3328
- 30,
3329
- 2,
3330
- 2,
3331
- 2,
3332
- 1,
3333
- 2,
3334
- 6,
3335
- 3,
3336
- 4,
3337
- 10,
3338
- 1,
3339
- 225,
3340
- 6,
3341
- 2,
3342
- 3,
3343
- 2,
3344
- 1,
3345
- 2,
3346
- 14,
3347
- 2,
3348
- 196,
3349
- 60,
3350
- 67,
3351
- 8,
3352
- 0,
3353
- 1205,
3354
- 3,
3355
- 2,
3356
- 26,
3357
- 2,
3358
- 1,
3359
- 2,
3360
- 0,
3361
- 3,
3362
- 0,
3363
- 2,
3364
- 9,
3365
- 2,
3366
- 3,
3367
- 2,
3368
- 0,
3369
- 2,
3370
- 0,
3371
- 7,
3372
- 0,
3373
- 5,
3374
- 0,
3375
- 2,
3376
- 0,
3377
- 2,
3378
- 0,
3379
- 2,
3380
- 2,
3381
- 2,
3382
- 1,
3383
- 2,
3384
- 0,
3385
- 3,
3386
- 0,
3387
- 2,
3388
- 0,
3389
- 2,
3390
- 0,
3391
- 2,
3392
- 0,
3393
- 2,
3394
- 0,
3395
- 2,
3396
- 1,
3397
- 2,
3398
- 0,
3399
- 3,
3400
- 3,
3401
- 2,
3402
- 6,
3403
- 2,
3404
- 3,
3405
- 2,
3406
- 3,
3407
- 2,
3408
- 0,
3409
- 2,
3410
- 9,
3411
- 2,
3412
- 16,
3413
- 6,
3414
- 2,
3415
- 2,
3416
- 4,
3417
- 2,
3418
- 16,
3419
- 4421,
3420
- 42719,
3421
- 33,
3422
- 4381,
3423
- 3,
3424
- 5773,
3425
- 3,
3426
- 7472,
3427
- 16,
3428
- 621,
3429
- 2467,
3430
- 541,
3431
- 1507,
3432
- 4938,
3433
- 6,
3434
- 8489
3435
- ], nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088f\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5c\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdc-\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7dc\ua7f1-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc", reservedWords = {
3436
- 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
3437
- 5: "class enum extends super const export import",
3438
- 6: "enum",
3439
- strict: "implements interface let package private protected public static yield",
3440
- strictBind: "eval arguments"
3441
- }, ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", keywords$1 = {
3442
- 5: ecma5AndLessKeywords,
3443
- "5module": ecma5AndLessKeywords + " export import",
3444
- 6: ecma5AndLessKeywords + " const class extends export import super"
3445
- }, keywordRelationalOperator = /^in(stanceof)?$/, nonASCIIidentifierStart = RegExp("[" + nonASCIIidentifierStartChars + "]"), nonASCIIidentifier = RegExp("[" + nonASCIIidentifierStartChars + "‌‍\xb7̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");
3446
- function isInAstralSet(code, set) {
3447
- for(var pos = 0x10000, i = 0; i < set.length && !((pos += set[i]) > code); i += 2)if ((pos += set[i + 1]) >= code) return !0;
3448
- return !1;
3449
- }
3450
- function isIdentifierStart(code, astral) {
3451
- return code < 65 ? 36 === code : code < 91 || (code < 97 ? 95 === code : code < 123 || (code <= 0xffff ? code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) : !1 !== astral && isInAstralSet(code, astralIdentifierStartCodes)));
3452
- }
3453
- function isIdentifierChar(code, astral) {
3454
- return code < 48 ? 36 === code : code < 58 || !(code < 65) && (code < 91 || (code < 97 ? 95 === code : code < 123 || (code <= 0xffff ? code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) : !1 !== astral && (isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)))));
3455
- }
3456
- var acorn_TokenType = function(label, conf) {
3457
- void 0 === conf && (conf = {}), this.label = label, this.keyword = conf.keyword, this.beforeExpr = !!conf.beforeExpr, this.startsExpr = !!conf.startsExpr, this.isLoop = !!conf.isLoop, this.isAssign = !!conf.isAssign, this.prefix = !!conf.prefix, this.postfix = !!conf.postfix, this.binop = conf.binop || null, this.updateContext = null;
3458
- };
3459
- function binop(name, prec) {
3460
- return new acorn_TokenType(name, {
3461
- beforeExpr: !0,
3462
- binop: prec
3463
- });
3464
- }
3465
- var beforeExpr = {
3466
- beforeExpr: !0
3467
- }, startsExpr = {
3468
- startsExpr: !0
3469
- }, keywords = {};
3470
- function kw(name, options) {
3471
- return void 0 === options && (options = {}), options.keyword = name, keywords[name] = new acorn_TokenType(name, options);
3472
- }
3473
- var types$1 = {
3474
- num: new acorn_TokenType("num", startsExpr),
3475
- regexp: new acorn_TokenType("regexp", startsExpr),
3476
- string: new acorn_TokenType("string", startsExpr),
3477
- name: new acorn_TokenType("name", startsExpr),
3478
- privateId: new acorn_TokenType("privateId", startsExpr),
3479
- eof: new acorn_TokenType("eof"),
3480
- bracketL: new acorn_TokenType("[", {
3481
- beforeExpr: !0,
3482
- startsExpr: !0
3483
- }),
3484
- bracketR: new acorn_TokenType("]"),
3485
- braceL: new acorn_TokenType("{", {
3486
- beforeExpr: !0,
3487
- startsExpr: !0
3488
- }),
3489
- braceR: new acorn_TokenType("}"),
3490
- parenL: new acorn_TokenType("(", {
3491
- beforeExpr: !0,
3492
- startsExpr: !0
3493
- }),
3494
- parenR: new acorn_TokenType(")"),
3495
- comma: new acorn_TokenType(",", beforeExpr),
3496
- semi: new acorn_TokenType(";", beforeExpr),
3497
- colon: new acorn_TokenType(":", beforeExpr),
3498
- dot: new acorn_TokenType("."),
3499
- question: new acorn_TokenType("?", beforeExpr),
3500
- questionDot: new acorn_TokenType("?."),
3501
- arrow: new acorn_TokenType("=>", beforeExpr),
3502
- template: new acorn_TokenType("template"),
3503
- invalidTemplate: new acorn_TokenType("invalidTemplate"),
3504
- ellipsis: new acorn_TokenType("...", beforeExpr),
3505
- backQuote: new acorn_TokenType("`", startsExpr),
3506
- dollarBraceL: new acorn_TokenType("${", {
3507
- beforeExpr: !0,
3508
- startsExpr: !0
3509
- }),
3510
- eq: new acorn_TokenType("=", {
3511
- beforeExpr: !0,
3512
- isAssign: !0
3513
- }),
3514
- assign: new acorn_TokenType("_=", {
3515
- beforeExpr: !0,
3516
- isAssign: !0
3517
- }),
3518
- incDec: new acorn_TokenType("++/--", {
3519
- prefix: !0,
3520
- postfix: !0,
3521
- startsExpr: !0
3522
- }),
3523
- prefix: new acorn_TokenType("!/~", {
3524
- beforeExpr: !0,
3525
- prefix: !0,
3526
- startsExpr: !0
3527
- }),
3528
- logicalOR: binop("||", 1),
3529
- logicalAND: binop("&&", 2),
3530
- bitwiseOR: binop("|", 3),
3531
- bitwiseXOR: binop("^", 4),
3532
- bitwiseAND: binop("&", 5),
3533
- equality: binop("==/!=/===/!==", 6),
3534
- relational: binop("</>/<=/>=", 7),
3535
- bitShift: binop("<</>>/>>>", 8),
3536
- plusMin: new acorn_TokenType("+/-", {
3537
- beforeExpr: !0,
3538
- binop: 9,
3539
- prefix: !0,
3540
- startsExpr: !0
3541
- }),
3542
- modulo: binop("%", 10),
3543
- star: binop("*", 10),
3544
- slash: binop("/", 10),
3545
- starstar: new acorn_TokenType("**", {
3546
- beforeExpr: !0
3547
- }),
3548
- coalesce: binop("??", 1),
3549
- _break: kw("break"),
3550
- _case: kw("case", beforeExpr),
3551
- _catch: kw("catch"),
3552
- _continue: kw("continue"),
3553
- _debugger: kw("debugger"),
3554
- _default: kw("default", beforeExpr),
3555
- _do: kw("do", {
3556
- isLoop: !0,
3557
- beforeExpr: !0
3558
- }),
3559
- _else: kw("else", beforeExpr),
3560
- _finally: kw("finally"),
3561
- _for: kw("for", {
3562
- isLoop: !0
3563
- }),
3564
- _function: kw("function", startsExpr),
3565
- _if: kw("if"),
3566
- _return: kw("return", beforeExpr),
3567
- _switch: kw("switch"),
3568
- _throw: kw("throw", beforeExpr),
3569
- _try: kw("try"),
3570
- _var: kw("var"),
3571
- _const: kw("const"),
3572
- _while: kw("while", {
3573
- isLoop: !0
3574
- }),
3575
- _with: kw("with"),
3576
- _new: kw("new", {
3577
- beforeExpr: !0,
3578
- startsExpr: !0
3579
- }),
3580
- _this: kw("this", startsExpr),
3581
- _super: kw("super", startsExpr),
3582
- _class: kw("class", startsExpr),
3583
- _extends: kw("extends", beforeExpr),
3584
- _export: kw("export"),
3585
- _import: kw("import", startsExpr),
3586
- _null: kw("null", startsExpr),
3587
- _true: kw("true", startsExpr),
3588
- _false: kw("false", startsExpr),
3589
- _in: kw("in", {
3590
- beforeExpr: !0,
3591
- binop: 7
3592
- }),
3593
- _instanceof: kw("instanceof", {
3594
- beforeExpr: !0,
3595
- binop: 7
3596
- }),
3597
- _typeof: kw("typeof", {
3598
- beforeExpr: !0,
3599
- prefix: !0,
3600
- startsExpr: !0
3601
- }),
3602
- _void: kw("void", {
3603
- beforeExpr: !0,
3604
- prefix: !0,
3605
- startsExpr: !0
3606
- }),
3607
- _delete: kw("delete", {
3608
- beforeExpr: !0,
3609
- prefix: !0,
3610
- startsExpr: !0
3611
- })
3612
- }, lineBreak = /\r\n?|\n|\u2028|\u2029/, lineBreakG = RegExp(lineBreak.source, "g");
3613
- function isNewLine(code) {
3614
- return 10 === code || 13 === code || 0x2028 === code || 0x2029 === code;
3615
- }
3616
- function nextLineBreak(code, from, end) {
3617
- void 0 === end && (end = code.length);
3618
- for(var i = from; i < end; i++){
3619
- var next = code.charCodeAt(i);
3620
- if (isNewLine(next)) return i < end - 1 && 13 === next && 10 === code.charCodeAt(i + 1) ? i + 2 : i + 1;
3621
- }
3622
- return -1;
3623
- }
3624
- var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, acorn_ref = Object.prototype, acorn_hasOwnProperty = acorn_ref.hasOwnProperty, acorn_toString = acorn_ref.toString, hasOwn = Object.hasOwn || function(obj, propName) {
3625
- return acorn_hasOwnProperty.call(obj, propName);
3626
- }, isArray = Array.isArray || function(obj) {
3627
- return "[object Array]" === acorn_toString.call(obj);
3628
- }, regexpCache = Object.create(null);
3629
- function wordsRegexp(words) {
3630
- return regexpCache[words] || (regexpCache[words] = RegExp("^(?:" + words.replace(/ /g, "|") + ")$"));
3631
- }
3632
- function codePointToString(code) {
3633
- return code <= 0xFFFF ? String.fromCharCode(code) : String.fromCharCode(((code -= 0x10000) >> 10) + 0xD800, (1023 & code) + 0xDC00);
3634
- }
3635
- var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, acorn_Position = function(line, col) {
3636
- this.line = line, this.column = col;
3637
- };
3638
- acorn_Position.prototype.offset = function(n) {
3639
- return new acorn_Position(this.line, this.column + n);
3640
- };
3641
- var acorn_SourceLocation = function(p, start, end) {
3642
- this.start = start, this.end = end, null !== p.sourceFile && (this.source = p.sourceFile);
3643
- };
3644
- function getLineInfo(input, offset) {
3645
- for(var line = 1, cur = 0;;){
3646
- var nextBreak = nextLineBreak(input, cur, offset);
3647
- if (nextBreak < 0) return new acorn_Position(line, offset - cur);
3648
- ++line, cur = nextBreak;
3649
- }
3650
- }
3651
- var defaultOptions = {
3652
- ecmaVersion: null,
3653
- sourceType: "script",
3654
- strict: !1,
3655
- onInsertedSemicolon: null,
3656
- onTrailingComma: null,
3657
- allowReserved: null,
3658
- allowReturnOutsideFunction: !1,
3659
- allowImportExportEverywhere: !1,
3660
- allowAwaitOutsideFunction: null,
3661
- allowSuperOutsideMethod: null,
3662
- allowHashBang: !1,
3663
- checkPrivateFields: !0,
3664
- locations: !1,
3665
- startLocation: null,
3666
- onToken: null,
3667
- onComment: null,
3668
- ranges: !1,
3669
- program: null,
3670
- sourceFile: null,
3671
- directSourceFile: null,
3672
- preserveParens: !1
3673
- }, warnedAboutEcmaVersion = !1;
3674
- function functionFlags(async, generator) {
3675
- return 2 | 4 * !!async | 8 * !!generator;
3676
- }
3677
- var acorn_Parser = function(options, input, startPos) {
3678
- this.options = options = function(opts) {
3679
- var options, array, options1 = {};
3680
- for(var opt in defaultOptions)options1[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt];
3681
- if ("latest" === options1.ecmaVersion ? options1.ecmaVersion = 1e8 : null == options1.ecmaVersion ? (!warnedAboutEcmaVersion && "object" == typeof console && console.warn && (warnedAboutEcmaVersion = !0, console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")), options1.ecmaVersion = 11) : options1.ecmaVersion >= 2015 && (options1.ecmaVersion -= 2009), null == options1.allowReserved && (options1.allowReserved = options1.ecmaVersion < 5), opts && null != opts.allowHashBang || (options1.allowHashBang = options1.ecmaVersion >= 14), isArray(options1.onToken)) {
3682
- var tokens = options1.onToken;
3683
- options1.onToken = function(token) {
3684
- return tokens.push(token);
3685
- };
3686
- }
3687
- if (isArray(options1.onComment) && (options = options1, array = options1.onComment, options1.onComment = function(block, text, start, end, startLoc, endLoc) {
3688
- var comment = {
3689
- type: block ? "Block" : "Line",
3690
- value: text,
3691
- start: start,
3692
- end: end
3693
- };
3694
- options.locations && (comment.loc = new acorn_SourceLocation(this, startLoc, endLoc)), options.ranges && (comment.range = [
3695
- start,
3696
- end
3697
- ]), array.push(comment);
3698
- }), "commonjs" === options1.sourceType && options1.allowAwaitOutsideFunction) throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
3699
- return options1;
3700
- }(options), this.sourceFile = options.sourceFile, this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : "module" === options.sourceType ? "5module" : 5]);
3701
- var reserved = "";
3702
- !0 !== options.allowReserved && (reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : 5 === options.ecmaVersion ? 5 : 3], "module" === options.sourceType && (reserved += " await")), this.reservedWords = wordsRegexp(reserved);
3703
- var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
3704
- this.reservedWordsStrict = wordsRegexp(reservedStrict), this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind), this.input = String(input), this.containsEsc = !1, this.pos = startPos || 0, this.curLine = 1, options.startLocation ? (this.lineStart = this.pos - options.startLocation.column, this.curLine = options.startLocation.line) : startPos ? (this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1, this.options.locations && (this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length)) : this.lineStart = 0, this.type = types$1.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = "module" === options.sourceType, this.strict = this.inModule || !0 === options.strict || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = Object.create(null), 0 === this.pos && options.allowHashBang && "#!" === this.input.slice(0, 2) && this.skipLineComment(2), this.scopeStack = [], this.enterScope("commonjs" === this.options.sourceType ? 2 : 1), this.regexpState = null, this.privateNameStack = [];
3705
- }, prototypeAccessors = {
3706
- inFunction: {
3707
- configurable: !0
3708
- },
3709
- inGenerator: {
3710
- configurable: !0
3711
- },
3712
- inAsync: {
3713
- configurable: !0
3714
- },
3715
- canAwait: {
3716
- configurable: !0
3717
- },
3718
- allowReturn: {
3719
- configurable: !0
3720
- },
3721
- allowSuper: {
3722
- configurable: !0
3723
- },
3724
- allowDirectSuper: {
3725
- configurable: !0
3726
- },
3727
- treatFunctionsAsVar: {
3728
- configurable: !0
3729
- },
3730
- allowNewDotTarget: {
3731
- configurable: !0
3732
- },
3733
- allowUsing: {
3734
- configurable: !0
3735
- },
3736
- inClassStaticBlock: {
3737
- configurable: !0
3738
- }
3739
- };
3740
- acorn_Parser.prototype.parse = function() {
3741
- var this$1$1 = this, node = this.options.program || this.startNode();
3742
- return this.nextToken(), this.catchStackOverflow(function() {
3743
- return this$1$1.parseTopLevel(node);
3744
- });
3745
- }, prototypeAccessors.inFunction.get = function() {
3746
- return (2 & this.currentVarScope().flags) > 0;
3747
- }, prototypeAccessors.inGenerator.get = function() {
3748
- return (8 & this.currentVarScope().flags) > 0;
3749
- }, prototypeAccessors.inAsync.get = function() {
3750
- return (4 & this.currentVarScope().flags) > 0;
3751
- }, prototypeAccessors.canAwait.get = function() {
3752
- for(var i = this.scopeStack.length - 1; i >= 0; i--){
3753
- var flags = this.scopeStack[i].flags;
3754
- if (768 & flags) return !1;
3755
- if (2 & flags) return (4 & flags) > 0;
3756
- }
3757
- return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
3758
- }, prototypeAccessors.allowReturn.get = function() {
3759
- return !!this.inFunction || !!this.options.allowReturnOutsideFunction && !!(1 & this.currentVarScope().flags);
3760
- }, prototypeAccessors.allowSuper.get = function() {
3761
- return (64 & this.currentThisScope().flags) > 0 || this.options.allowSuperOutsideMethod;
3762
- }, prototypeAccessors.allowDirectSuper.get = function() {
3763
- return (128 & this.currentThisScope().flags) > 0;
3764
- }, prototypeAccessors.treatFunctionsAsVar.get = function() {
3765
- return this.treatFunctionsAsVarInScope(this.currentScope());
3766
- }, prototypeAccessors.allowNewDotTarget.get = function() {
3767
- for(var i = this.scopeStack.length - 1; i >= 0; i--){
3768
- var flags = this.scopeStack[i].flags;
3769
- if (768 & flags || 2 & flags && !(16 & flags)) return !0;
3770
- }
3771
- return !1;
3772
- }, prototypeAccessors.allowUsing.get = function() {
3773
- var flags = this.currentScope().flags;
3774
- return !(1024 & flags) && (!!this.inModule || !(1 & flags));
3775
- }, prototypeAccessors.inClassStaticBlock.get = function() {
3776
- return (256 & this.currentVarScope().flags) > 0;
3777
- }, acorn_Parser.extend = function() {
3778
- for(var plugins = [], len = arguments.length; len--;)plugins[len] = arguments[len];
3779
- for(var cls = this, i = 0; i < plugins.length; i++)cls = plugins[i](cls);
3780
- return cls;
3781
- }, acorn_Parser.parse = function(input, options) {
3782
- return new this(options, input).parse();
3783
- }, acorn_Parser.parseExpressionAt = function(input, pos, options) {
3784
- var parser = new this(options, input, pos);
3785
- return parser.nextToken(), parser.parseExpression();
3786
- }, acorn_Parser.tokenizer = function(input, options) {
3787
- return new this(options, input);
3788
- }, Object.defineProperties(acorn_Parser.prototype, prototypeAccessors);
3789
- var pp$9 = acorn_Parser.prototype, literal = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
3790
- pp$9.strictDirective = function(start) {
3791
- if (this.options.ecmaVersion < 5) return !1;
3792
- for(;;){
3793
- skipWhiteSpace.lastIndex = start, start += skipWhiteSpace.exec(this.input)[0].length;
3794
- var match = literal.exec(this.input.slice(start));
3795
- if (!match) return !1;
3796
- if ("use strict" === (match[1] || match[2])) {
3797
- skipWhiteSpace.lastIndex = start + match[0].length;
3798
- var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length, next = this.input.charAt(end);
3799
- return ";" === next || "}" === next || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || "!" === next && "=" === this.input.charAt(end + 1));
3800
- }
3801
- skipWhiteSpace.lastIndex = start += match[0].length, start += skipWhiteSpace.exec(this.input)[0].length, ";" === this.input[start] && start++;
3802
- }
3803
- }, pp$9.eat = function(type) {
3804
- return this.type === type && (this.next(), !0);
3805
- }, pp$9.isContextual = function(name) {
3806
- return this.type === types$1.name && this.value === name && !this.containsEsc;
3807
- }, pp$9.eatContextual = function(name) {
3808
- return !!this.isContextual(name) && (this.next(), !0);
3809
- }, pp$9.catchStackOverflow = function(f) {
3810
- try {
3811
- return f();
3812
- } catch (e) {
3813
- if (e instanceof Error && (/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message) || /\btoo much recursion\b/i.test(e.message))) this.raise(this.start, "Not enough stack space to parse input");
3814
- else throw e;
3815
- }
3816
- }, pp$9.expectContextual = function(name) {
3817
- this.eatContextual(name) || this.unexpected();
3818
- }, pp$9.canInsertSemicolon = function() {
3819
- return this.type === types$1.eof || this.type === types$1.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
3820
- }, pp$9.insertSemicolon = function() {
3821
- if (this.canInsertSemicolon()) return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
3822
- }, pp$9.semicolon = function() {
3823
- this.eat(types$1.semi) || this.insertSemicolon() || this.unexpected();
3824
- }, pp$9.afterTrailingComma = function(tokType, notNext) {
3825
- if (this.type === tokType) return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), notNext || this.next(), !0;
3826
- }, pp$9.expect = function(type) {
3827
- this.eat(type) || this.unexpected();
3828
- }, pp$9.unexpected = function(pos) {
3829
- this.raise(null != pos ? pos : this.start, "Unexpected token");
3830
- };
3831
- var acorn_DestructuringErrors = function() {
3832
- this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
3833
- };
3834
- pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) {
3835
- if (refDestructuringErrors) {
3836
- refDestructuringErrors.trailingComma > -1 && this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
3837
- var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
3838
- parens > -1 && this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern");
3839
- }
3840
- }, pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
3841
- if (!refDestructuringErrors) return !1;
3842
- var shorthandAssign = refDestructuringErrors.shorthandAssign, doubleProto = refDestructuringErrors.doubleProto;
3843
- if (!andThrow) return shorthandAssign >= 0 || doubleProto >= 0;
3844
- shorthandAssign >= 0 && this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"), doubleProto >= 0 && this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
3845
- }, pp$9.checkYieldAwaitInDefaultParams = function() {
3846
- this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
3847
- }, pp$9.isSimpleAssignTarget = function(expr) {
3848
- return "ParenthesizedExpression" === expr.type ? this.isSimpleAssignTarget(expr.expression) : "Identifier" === expr.type || "MemberExpression" === expr.type;
3849
- };
3850
- var pp$8 = acorn_Parser.prototype;
3851
- pp$8.parseTopLevel = function(node) {
3852
- var exports$1 = Object.create(null);
3853
- for(node.body || (node.body = []); this.type !== types$1.eof;){
3854
- var stmt = this.parseStatement(null, !0, exports$1);
3855
- node.body.push(stmt);
3856
- }
3857
- if (this.inModule) for(var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1){
3858
- var name = list[i];
3859
- this.raiseRecoverable(this.undefinedExports[name].start, "Export '" + name + "' is not defined");
3860
- }
3861
- return this.adaptDirectivePrologue(node.body), this.next(), node.sourceType = "commonjs" === this.options.sourceType ? "script" : this.options.sourceType, this.finishNode(node, "Program");
3862
- };
3863
- var loopLabel = {
3864
- kind: "loop"
3865
- }, switchLabel = {
3866
- kind: "switch"
3867
- };
3868
- pp$8.isLet = function(context) {
3869
- if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return !1;
3870
- skipWhiteSpace.lastIndex = this.pos;
3871
- var skip = skipWhiteSpace.exec(this.input), next = this.pos + skip[0].length, nextCh = this.fullCharCodeAt(next);
3872
- if (91 === nextCh || 92 === nextCh) return !0;
3873
- if (context) return !1;
3874
- if (123 === nextCh) return !0;
3875
- if (isIdentifierStart(nextCh)) {
3876
- var start = next;
3877
- do next += nextCh <= 0xffff ? 1 : 2;
3878
- while (isIdentifierChar(nextCh = this.fullCharCodeAt(next)));
3879
- if (92 === nextCh) return !0;
3880
- var ident = this.input.slice(start, next);
3881
- if (!keywordRelationalOperator.test(ident)) return !0;
3882
- }
3883
- return !1;
3884
- }, pp$8.isAsyncFunction = function() {
3885
- if (this.options.ecmaVersion < 8 || !this.isContextual("async")) return !1;
3886
- skipWhiteSpace.lastIndex = this.pos;
3887
- var after, skip = skipWhiteSpace.exec(this.input), next = this.pos + skip[0].length;
3888
- return !lineBreak.test(this.input.slice(this.pos, next)) && "function" === this.input.slice(next, next + 8) && (next + 8 === this.input.length || !(isIdentifierChar(after = this.fullCharCodeAt(next + 8)) || 92 === after));
3889
- }, pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
3890
- if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using")) return !1;
3891
- skipWhiteSpace.lastIndex = this.pos;
3892
- var skip = skipWhiteSpace.exec(this.input), next = this.pos + skip[0].length;
3893
- if (lineBreak.test(this.input.slice(this.pos, next))) return !1;
3894
- if (isAwaitUsing) {
3895
- var after, usingEndPos = next + 5;
3896
- if ("using" !== this.input.slice(next, usingEndPos) || usingEndPos === this.input.length || isIdentifierChar(after = this.fullCharCodeAt(usingEndPos)) || 92 === after) return !1;
3897
- skipWhiteSpace.lastIndex = usingEndPos;
3898
- var skipAfterUsing = skipWhiteSpace.exec(this.input);
3899
- if (next = usingEndPos + skipAfterUsing[0].length, skipAfterUsing && lineBreak.test(this.input.slice(usingEndPos, next))) return !1;
3900
- }
3901
- var ch = this.fullCharCodeAt(next);
3902
- if (!isIdentifierStart(ch) && 92 !== ch) return !1;
3903
- var idStart = next;
3904
- do next += ch <= 0xffff ? 1 : 2;
3905
- while (isIdentifierChar(ch = this.fullCharCodeAt(next)));
3906
- if (92 === ch) return !0;
3907
- var id = this.input.slice(idStart, next);
3908
- return !keywordRelationalOperator.test(id) && (!isFor || !!isAwaitUsing || "of" !== id || (skipWhiteSpace.lastIndex = next, next += skipWhiteSpace.exec(this.input)[0].length, 61 === this.input.charCodeAt(next) && 61 !== (ch = this.input.charCodeAt(next + 1)) && 62 !== ch)) && !0;
3909
- }, pp$8.isAwaitUsing = function(isFor) {
3910
- return this.isUsingKeyword(!0, isFor);
3911
- }, pp$8.isUsing = function(isFor) {
3912
- return this.isUsingKeyword(!1, isFor);
3913
- }, pp$8.parseStatement = function(context, topLevel, exports$1) {
3914
- var kind, starttype = this.type, node = this.startNode();
3915
- switch(this.isLet(context) && (starttype = types$1._var, kind = "let"), starttype){
3916
- case types$1._break:
3917
- case types$1._continue:
3918
- return this.parseBreakContinueStatement(node, starttype.keyword);
3919
- case types$1._debugger:
3920
- return this.parseDebuggerStatement(node);
3921
- case types$1._do:
3922
- return this.parseDoStatement(node);
3923
- case types$1._for:
3924
- return this.parseForStatement(node);
3925
- case types$1._function:
3926
- return context && (this.strict || "if" !== context && "label" !== context) && this.options.ecmaVersion >= 6 && this.unexpected(), this.parseFunctionStatement(node, !1, !context);
3927
- case types$1._class:
3928
- return context && this.unexpected(), this.parseClass(node, !0);
3929
- case types$1._if:
3930
- return this.parseIfStatement(node);
3931
- case types$1._return:
3932
- return this.parseReturnStatement(node);
3933
- case types$1._switch:
3934
- return this.parseSwitchStatement(node);
3935
- case types$1._throw:
3936
- return this.parseThrowStatement(node);
3937
- case types$1._try:
3938
- return this.parseTryStatement(node);
3939
- case types$1._const:
3940
- case types$1._var:
3941
- return kind = kind || this.value, context && "var" !== kind && this.unexpected(), this.parseVarStatement(node, kind);
3942
- case types$1._while:
3943
- return this.parseWhileStatement(node);
3944
- case types$1._with:
3945
- return this.parseWithStatement(node);
3946
- case types$1.braceL:
3947
- return this.parseBlock(!0, node);
3948
- case types$1.semi:
3949
- return this.parseEmptyStatement(node);
3950
- case types$1._export:
3951
- case types$1._import:
3952
- if (this.options.ecmaVersion > 10 && starttype === types$1._import) {
3953
- skipWhiteSpace.lastIndex = this.pos;
3954
- var skip = skipWhiteSpace.exec(this.input), next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
3955
- if (40 === nextCh || 46 === nextCh) return this.parseExpressionStatement(node, this.parseExpression());
3956
- }
3957
- return !this.options.allowImportExportEverywhere && (topLevel || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports$1);
3958
- default:
3959
- if (this.isAsyncFunction()) return context && this.unexpected(), this.next(), this.parseFunctionStatement(node, !0, !context);
3960
- var usingKind = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
3961
- if (usingKind) return this.allowUsing || this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"), context && this.raise(this.start, "Using declaration is not allowed in single-statement positions"), "await using" === usingKind && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(node, !1, usingKind), this.semicolon(), this.finishNode(node, "VariableDeclaration");
3962
- var maybeName = this.value, expr = this.parseExpression();
3963
- if (starttype === types$1.name && "Identifier" === expr.type && this.eat(types$1.colon)) return this.parseLabeledStatement(node, maybeName, expr, context);
3964
- return this.parseExpressionStatement(node, expr);
3965
- }
3966
- }, pp$8.parseBreakContinueStatement = function(node, keyword) {
3967
- var isBreak = "break" === keyword;
3968
- this.next(), this.eat(types$1.semi) || this.insertSemicolon() ? node.label = null : this.type !== types$1.name ? this.unexpected() : (node.label = this.parseIdent(), this.semicolon());
3969
- for(var i = 0; i < this.labels.length; ++i){
3970
- var lab = this.labels[i];
3971
- if ((null == node.label || lab.name === node.label.name) && (null != lab.kind && (isBreak || "loop" === lab.kind) || node.label && isBreak)) break;
3972
- }
3973
- return i === this.labels.length && this.raise(node.start, "Unsyntactic " + keyword), this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
3974
- }, pp$8.parseDebuggerStatement = function(node) {
3975
- return this.next(), this.semicolon(), this.finishNode(node, "DebuggerStatement");
3976
- }, pp$8.parseDoStatement = function(node) {
3977
- return this.next(), this.labels.push(loopLabel), node.body = this.parseStatement("do"), this.labels.pop(), this.expect(types$1._while), node.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(types$1.semi) : this.semicolon(), this.finishNode(node, "DoWhileStatement");
3978
- }, pp$8.parseForStatement = function(node) {
3979
- this.next();
3980
- var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
3981
- if (this.labels.push(loopLabel), this.enterScope(0), this.expect(types$1.parenL), this.type === types$1.semi) return awaitAt > -1 && this.unexpected(awaitAt), this.parseFor(node, null);
3982
- var isLet = this.isLet();
3983
- if (this.type === types$1._var || this.type === types$1._const || isLet) {
3984
- var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
3985
- return this.next(), this.parseVar(init$1, !0, kind), this.finishNode(init$1, "VariableDeclaration"), this.parseForAfterInit(node, init$1, awaitAt);
3986
- }
3987
- var startsWithLet = this.isContextual("let"), isForOf = !1, usingKind = this.isUsing(!0) ? "using" : this.isAwaitUsing(!0) ? "await using" : null;
3988
- if (usingKind) {
3989
- var init$2 = this.startNode();
3990
- return this.next(), "await using" === usingKind && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.parseVar(init$2, !0, usingKind), this.finishNode(init$2, "VariableDeclaration"), this.parseForAfterInit(node, init$2, awaitAt);
3991
- }
3992
- var containsEsc = this.containsEsc, refDestructuringErrors = new acorn_DestructuringErrors, initPos = this.start, init = awaitAt > -1 ? this.parseExprSubscripts(refDestructuringErrors, "await") : this.parseExpression(!0, refDestructuringErrors);
3993
- return this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (awaitAt > -1 ? (this.type === types$1._in && this.unexpected(awaitAt), node.await = !0) : isForOf && this.options.ecmaVersion >= 8 && (init.start !== initPos || containsEsc || "Identifier" !== init.type || "async" !== init.name ? this.options.ecmaVersion >= 9 && (node.await = !1) : this.unexpected()), startsWithLet && isForOf && this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(init, !1, refDestructuringErrors), this.checkLValPattern(init), this.parseForIn(node, init)) : (this.checkExpressionErrors(refDestructuringErrors, !0), awaitAt > -1 && this.unexpected(awaitAt), this.parseFor(node, init));
3994
- }, pp$8.parseForAfterInit = function(node, init, awaitAt) {
3995
- return (this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && 1 === init.declarations.length ? (this.type === types$1._in ? ("using" !== init.kind && "await using" !== init.kind || init.declarations[0].init || this.raise(this.start, "Using declaration is not allowed in for-in loops"), this.options.ecmaVersion >= 9 && awaitAt > -1 && this.unexpected(awaitAt)) : this.options.ecmaVersion >= 9 && (node.await = awaitAt > -1), this.parseForIn(node, init)) : (awaitAt > -1 && this.unexpected(awaitAt), this.parseFor(node, init));
3996
- }, pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {
3997
- return this.next(), this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), !1, isAsync);
3998
- }, pp$8.parseIfStatement = function(node) {
3999
- return this.next(), node.test = this.parseParenExpression(), node.consequent = this.parseStatement("if"), node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null, this.finishNode(node, "IfStatement");
4000
- }, pp$8.parseReturnStatement = function(node) {
4001
- return this.allowReturn || this.raise(this.start, "'return' outside of function"), this.next(), this.eat(types$1.semi) || this.insertSemicolon() ? node.argument = null : (node.argument = this.parseExpression(), this.semicolon()), this.finishNode(node, "ReturnStatement");
4002
- }, pp$8.parseSwitchStatement = function(node) {
4003
- this.next(), node.discriminant = this.parseParenExpression(), node.cases = [], this.expect(types$1.braceL), this.labels.push(switchLabel), this.enterScope(1024);
4004
- for(var cur, sawDefault = !1; this.type !== types$1.braceR;)if (this.type === types$1._case || this.type === types$1._default) {
4005
- var isCase = this.type === types$1._case;
4006
- cur && this.finishNode(cur, "SwitchCase"), node.cases.push(cur = this.startNode()), cur.consequent = [], this.next(), isCase ? cur.test = this.parseExpression() : (sawDefault && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), sawDefault = !0, cur.test = null), this.expect(types$1.colon);
4007
- } else cur || this.unexpected(), cur.consequent.push(this.parseStatement(null));
4008
- return this.exitScope(), cur && this.finishNode(cur, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(node, "SwitchStatement");
4009
- }, pp$8.parseThrowStatement = function(node) {
4010
- return this.next(), lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), node.argument = this.parseExpression(), this.semicolon(), this.finishNode(node, "ThrowStatement");
4011
- };
4012
- var empty$1 = [];
4013
- pp$8.parseCatchClauseParam = function() {
4014
- var param = this.parseBindingAtom(), simple = "Identifier" === param.type;
4015
- return this.enterScope(32 * !!simple), this.checkLValPattern(param, simple ? 4 : 2), this.expect(types$1.parenR), param;
4016
- }, pp$8.parseTryStatement = function(node) {
4017
- if (this.next(), node.block = this.parseBlock(), node.handler = null, this.type === types$1._catch) {
4018
- var clause = this.startNode();
4019
- this.next(), this.eat(types$1.parenL) ? clause.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), clause.param = null, this.enterScope(0)), clause.body = this.parseBlock(!1), this.exitScope(), node.handler = this.finishNode(clause, "CatchClause");
4020
- }
4021
- return node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null, node.handler || node.finalizer || this.raise(node.start, "Missing catch or finally clause"), this.finishNode(node, "TryStatement");
4022
- }, pp$8.parseVarStatement = function(node, kind, allowMissingInitializer) {
4023
- return this.next(), this.parseVar(node, !1, kind, allowMissingInitializer), this.semicolon(), this.finishNode(node, "VariableDeclaration");
4024
- }, pp$8.parseWhileStatement = function(node) {
4025
- return this.next(), node.test = this.parseParenExpression(), this.labels.push(loopLabel), node.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(node, "WhileStatement");
4026
- }, pp$8.parseWithStatement = function(node) {
4027
- return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), node.object = this.parseParenExpression(), node.body = this.parseStatement("with"), this.finishNode(node, "WithStatement");
4028
- }, pp$8.parseEmptyStatement = function(node) {
4029
- return this.next(), this.finishNode(node, "EmptyStatement");
4030
- }, pp$8.parseLabeledStatement = function(node, maybeName, expr, context) {
4031
- for(var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1)list[i$1].name === maybeName && this.raise(expr.start, "Label '" + maybeName + "' is already declared");
4032
- for(var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null, i = this.labels.length - 1; i >= 0; i--){
4033
- var label$1 = this.labels[i];
4034
- if (label$1.statementStart === node.start) label$1.statementStart = this.start, label$1.kind = kind;
4035
- else break;
4036
- }
4037
- return this.labels.push({
4038
- name: maybeName,
4039
- kind: kind,
4040
- statementStart: this.start
4041
- }), node.body = this.parseStatement(context ? -1 === context.indexOf("label") ? context + "label" : context : "label"), this.labels.pop(), node.label = expr, this.finishNode(node, "LabeledStatement");
4042
- }, pp$8.parseExpressionStatement = function(node, expr) {
4043
- return node.expression = expr, this.semicolon(), this.finishNode(node, "ExpressionStatement");
4044
- }, pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) {
4045
- for(void 0 === createNewLexicalScope && (createNewLexicalScope = !0), void 0 === node && (node = this.startNode()), node.body = [], this.expect(types$1.braceL), createNewLexicalScope && this.enterScope(0); this.type !== types$1.braceR;){
4046
- var stmt = this.parseStatement(null);
4047
- node.body.push(stmt);
4048
- }
4049
- return exitStrict && (this.strict = !1), this.next(), createNewLexicalScope && this.exitScope(), this.finishNode(node, "BlockStatement");
4050
- }, pp$8.parseFor = function(node, init) {
4051
- return node.init = init, this.expect(types$1.semi), node.test = this.type === types$1.semi ? null : this.parseExpression(), this.expect(types$1.semi), node.update = this.type === types$1.parenR ? null : this.parseExpression(), this.expect(types$1.parenR), node.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(node, "ForStatement");
4052
- }, pp$8.parseForIn = function(node, init) {
4053
- var isForIn = this.type === types$1._in;
4054
- return this.next(), "VariableDeclaration" === init.type && null != init.declarations[0].init && (!isForIn || this.options.ecmaVersion < 8 || this.strict || "var" !== init.kind || "Identifier" !== init.declarations[0].id.type) && this.raise(init.start, (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"), node.left = init, node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(), this.expect(types$1.parenR), node.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
4055
- }, pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) {
4056
- for(node.declarations = [], node.kind = kind;;){
4057
- var decl = this.startNode();
4058
- if (this.parseVarId(decl, kind), this.eat(types$1.eq) ? decl.init = this.parseMaybeAssign(isFor) : allowMissingInitializer || "const" !== kind || this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of") ? allowMissingInitializer || "using" !== kind && "await using" !== kind || !(this.options.ecmaVersion >= 17) || this.type === types$1._in || this.isContextual("of") ? allowMissingInitializer || "Identifier" === decl.id.type || isFor && (this.type === types$1._in || this.isContextual("of")) ? decl.init = null : this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : this.raise(this.lastTokEnd, "Missing initializer in " + kind + " declaration") : this.unexpected(), node.declarations.push(this.finishNode(decl, "VariableDeclarator")), !this.eat(types$1.comma)) break;
4059
- }
4060
- return node;
4061
- }, pp$8.parseVarId = function(decl, kind) {
4062
- decl.id = "using" === kind || "await using" === kind ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(decl.id, "var" === kind ? 1 : 2, !1);
4063
- };
4064
- var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2;
4065
- function checkKeyName(node, name) {
4066
- var computed = node.computed, key = node.key;
4067
- return !computed && ("Identifier" === key.type && key.name === name || "Literal" === key.type && key.value === name);
4068
- }
4069
- pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
4070
- this.initFunction(node), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) && (this.type === types$1.star && statement & FUNC_HANGING_STATEMENT && this.unexpected(), node.generator = this.eat(types$1.star)), this.options.ecmaVersion >= 8 && (node.async = !!isAsync), statement & FUNC_STATEMENT && (node.id = 4 & statement && this.type !== types$1.name ? null : this.parseIdent(), node.id && !(statement & FUNC_HANGING_STATEMENT) && this.checkLValSimple(node.id, this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? 1 : 2 : 3));
4071
- var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
4072
- return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(functionFlags(node.async, node.generator)), statement & FUNC_STATEMENT || (node.id = this.type === types$1.name ? this.parseIdent() : null), this.parseFunctionParams(node), this.parseFunctionBody(node, allowExpressionBody, !1, forInit), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.finishNode(node, statement & FUNC_STATEMENT ? "FunctionDeclaration" : "FunctionExpression");
4073
- }, pp$8.parseFunctionParams = function(node) {
4074
- this.expect(types$1.parenL), node.params = this.parseBindingList(types$1.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
4075
- }, pp$8.parseClass = function(node, isStatement) {
4076
- this.next();
4077
- var oldStrict = this.strict;
4078
- this.strict = !0, this.parseClassId(node, isStatement), this.parseClassSuper(node);
4079
- var privateNameMap = this.enterClassBody(), classBody = this.startNode(), hadConstructor = !1;
4080
- for(classBody.body = [], this.expect(types$1.braceL); this.type !== types$1.braceR;){
4081
- var element = this.parseClassElement(null !== node.superClass);
4082
- element && (classBody.body.push(element), "MethodDefinition" === element.type && "constructor" === element.kind ? (hadConstructor && this.raiseRecoverable(element.start, "Duplicate constructor in the same class"), hadConstructor = !0) : element.key && "PrivateIdentifier" === element.key.type && function(privateNameMap, element) {
4083
- var name = element.key.name, curr = privateNameMap[name], next = "true";
4084
- return ("MethodDefinition" === element.type && ("get" === element.kind || "set" === element.kind) && (next = (element.static ? "s" : "i") + element.kind), "iget" === curr && "iset" === next || "iset" === curr && "iget" === next || "sget" === curr && "sset" === next || "sset" === curr && "sget" === next) ? (privateNameMap[name] = "true", !1) : !!curr || (privateNameMap[name] = next, !1);
4085
- }(privateNameMap, element) && this.raiseRecoverable(element.key.start, "Identifier '#" + element.key.name + "' has already been declared"));
4086
- }
4087
- return this.strict = oldStrict, this.next(), node.body = this.finishNode(classBody, "ClassBody"), this.exitClassBody(), this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
4088
- }, pp$8.parseClassElement = function(constructorAllowsSuper) {
4089
- if (this.eat(types$1.semi)) return null;
4090
- var ecmaVersion = this.options.ecmaVersion, node = this.startNode(), keyName = "", isGenerator = !1, isAsync = !1, kind = "method", isStatic = !1;
4091
- if (this.eatContextual("static")) {
4092
- if (ecmaVersion >= 13 && this.eat(types$1.braceL)) return this.parseClassStaticBlock(node), node;
4093
- this.isClassElementNameStart() || this.type === types$1.star ? isStatic = !0 : keyName = "static";
4094
- }
4095
- if (node.static = isStatic, !keyName && ecmaVersion >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon() ? isAsync = !0 : keyName = "async"), !keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star) && (isGenerator = !0), !keyName && !isAsync && !isGenerator) {
4096
- var lastValue = this.value;
4097
- (this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? kind = lastValue : keyName = lastValue);
4098
- }
4099
- if (keyName ? (node.computed = !1, node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), node.key.name = keyName, this.finishNode(node.key, "Identifier")) : this.parseClassElementName(node), ecmaVersion < 13 || this.type === types$1.parenL || "method" !== kind || isGenerator || isAsync) {
4100
- var isConstructor = !node.static && checkKeyName(node, "constructor");
4101
- isConstructor && "method" !== kind && this.raise(node.key.start, "Constructor can't have get/set modifier"), node.kind = isConstructor ? "constructor" : kind, this.parseClassMethod(node, isGenerator, isAsync, isConstructor && constructorAllowsSuper);
4102
- } else this.parseClassField(node);
4103
- return node;
4104
- }, pp$8.isClassElementNameStart = function() {
4105
- return this.type === types$1.name || this.type === types$1.privateId || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword;
4106
- }, pp$8.parseClassElementName = function(element) {
4107
- this.type === types$1.privateId ? ("constructor" === this.value && this.raise(this.start, "Classes can't have an element named '#constructor'"), element.computed = !1, element.key = this.parsePrivateIdent()) : this.parsePropertyName(element);
4108
- }, pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
4109
- var key = method.key;
4110
- "constructor" === method.kind ? (isGenerator && this.raise(key.start, "Constructor can't be a generator"), isAsync && this.raise(key.start, "Constructor can't be an async method")) : method.static && checkKeyName(method, "prototype") && this.raise(key.start, "Classes may not have a static property named prototype");
4111
- var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
4112
- return "get" === method.kind && 0 !== value.params.length && this.raiseRecoverable(value.start, "getter should have no params"), "set" === method.kind && 1 !== value.params.length && this.raiseRecoverable(value.start, "setter should have exactly one param"), "set" === method.kind && "RestElement" === value.params[0].type && this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"), this.finishNode(method, "MethodDefinition");
4113
- }, pp$8.parseClassField = function(field) {
4114
- return checkKeyName(field, "constructor") ? this.raise(field.key.start, "Classes can't have a field named 'constructor'") : field.static && checkKeyName(field, "prototype") && this.raise(field.key.start, "Classes can't have a static field named 'prototype'"), this.eat(types$1.eq) ? (this.enterScope(576), field.value = this.parseMaybeAssign(), this.exitScope()) : field.value = null, this.semicolon(), this.finishNode(field, "PropertyDefinition");
4115
- }, pp$8.parseClassStaticBlock = function(node) {
4116
- node.body = [];
4117
- var oldLabels = this.labels;
4118
- for(this.labels = [], this.enterScope(320); this.type !== types$1.braceR;){
4119
- var stmt = this.parseStatement(null);
4120
- node.body.push(stmt);
4121
- }
4122
- return this.next(), this.exitScope(), this.labels = oldLabels, this.finishNode(node, "StaticBlock");
4123
- }, pp$8.parseClassId = function(node, isStatement) {
4124
- this.type === types$1.name ? (node.id = this.parseIdent(), isStatement && this.checkLValSimple(node.id, 2, !1)) : (!0 === isStatement && this.unexpected(), node.id = null);
4125
- }, pp$8.parseClassSuper = function(node) {
4126
- node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, !1) : null;
4127
- }, pp$8.enterClassBody = function() {
4128
- var element = {
4129
- declared: Object.create(null),
4130
- used: []
4131
- };
4132
- return this.privateNameStack.push(element), element.declared;
4133
- }, pp$8.exitClassBody = function() {
4134
- var ref = this.privateNameStack.pop(), declared = ref.declared, used = ref.used;
4135
- if (this.options.checkPrivateFields) for(var len = this.privateNameStack.length, parent = 0 === len ? null : this.privateNameStack[len - 1], i = 0; i < used.length; ++i){
4136
- var id = used[i];
4137
- hasOwn(declared, id.name) || (parent ? parent.used.push(id) : this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class"));
4138
- }
4139
- }, pp$8.parseExportAllDeclaration = function(node, exports$1) {
4140
- return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (node.exported = this.parseModuleExportName(), this.checkExport(exports$1, node.exported, this.lastTokStart)) : node.exported = null), this.expectContextual("from"), this.type !== types$1.string && this.unexpected(), node.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (node.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(node, "ExportAllDeclaration");
4141
- }, pp$8.parseExport = function(node, exports$1) {
4142
- if (this.next(), this.eat(types$1.star)) return this.parseExportAllDeclaration(node, exports$1);
4143
- if (this.eat(types$1._default)) return this.checkExport(exports$1, "default", this.lastTokStart), node.declaration = this.parseExportDefaultDeclaration(), this.finishNode(node, "ExportDefaultDeclaration");
4144
- if (this.shouldParseExportStatement()) node.declaration = this.parseExportDeclaration(node), "VariableDeclaration" === node.declaration.type ? this.checkVariableExport(exports$1, node.declaration.declarations) : this.checkExport(exports$1, node.declaration.id, node.declaration.id.start), node.specifiers = [], node.source = null, this.options.ecmaVersion >= 16 && (node.attributes = []);
4145
- else {
4146
- if (node.declaration = null, node.specifiers = this.parseExportSpecifiers(exports$1), this.eatContextual("from")) this.type !== types$1.string && this.unexpected(), node.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (node.attributes = this.parseWithClause());
4147
- else {
4148
- for(var i = 0, list = node.specifiers; i < list.length; i += 1){
4149
- var spec = list[i];
4150
- this.checkUnreserved(spec.local), this.checkLocalExport(spec.local), "Literal" === spec.local.type && this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
4151
- }
4152
- node.source = null, this.options.ecmaVersion >= 16 && (node.attributes = []);
4153
- }
4154
- this.semicolon();
4155
- }
4156
- return this.finishNode(node, "ExportNamedDeclaration");
4157
- }, pp$8.parseExportDeclaration = function(node) {
4158
- return this.parseStatement(null);
4159
- }, pp$8.parseExportDefaultDeclaration = function() {
4160
- if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) {
4161
- var isAsync, fNode = this.startNode();
4162
- return this.next(), isAsync && this.next(), this.parseFunction(fNode, 4 | FUNC_STATEMENT, !1, isAsync);
4163
- }
4164
- if (this.type === types$1._class) {
4165
- var cNode = this.startNode();
4166
- return this.parseClass(cNode, "nullableID");
4167
- }
4168
- var declaration = this.parseMaybeAssign();
4169
- return this.semicolon(), declaration;
4170
- }, pp$8.checkExport = function(exports$1, name, pos) {
4171
- exports$1 && ("string" != typeof name && (name = "Identifier" === name.type ? name.name : name.value), hasOwn(exports$1, name) && this.raiseRecoverable(pos, "Duplicate export '" + name + "'"), exports$1[name] = !0);
4172
- }, pp$8.checkPatternExport = function(exports$1, pat) {
4173
- var type = pat.type;
4174
- if ("Identifier" === type) this.checkExport(exports$1, pat, pat.start);
4175
- else if ("ObjectPattern" === type) for(var i = 0, list = pat.properties; i < list.length; i += 1){
4176
- var prop = list[i];
4177
- this.checkPatternExport(exports$1, prop);
4178
- }
4179
- else if ("ArrayPattern" === type) for(var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1){
4180
- var elt = list$1[i$1];
4181
- elt && this.checkPatternExport(exports$1, elt);
4182
- }
4183
- else "Property" === type ? this.checkPatternExport(exports$1, pat.value) : "AssignmentPattern" === type ? this.checkPatternExport(exports$1, pat.left) : "RestElement" === type && this.checkPatternExport(exports$1, pat.argument);
4184
- }, pp$8.checkVariableExport = function(exports$1, decls) {
4185
- if (exports$1) for(var i = 0; i < decls.length; i += 1){
4186
- var decl = decls[i];
4187
- this.checkPatternExport(exports$1, decl.id);
4188
- }
4189
- }, pp$8.shouldParseExportStatement = function() {
4190
- return "var" === this.type.keyword || "const" === this.type.keyword || "class" === this.type.keyword || "function" === this.type.keyword || this.isLet() || this.isAsyncFunction();
4191
- }, pp$8.parseExportSpecifier = function(exports$1) {
4192
- var node = this.startNode();
4193
- return node.local = this.parseModuleExportName(), node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local, this.checkExport(exports$1, node.exported, node.exported.start), this.finishNode(node, "ExportSpecifier");
4194
- }, pp$8.parseExportSpecifiers = function(exports$1) {
4195
- var nodes = [], first = !0;
4196
- for(this.expect(types$1.braceL); !this.eat(types$1.braceR);){
4197
- if (first) first = !1;
4198
- else if (this.expect(types$1.comma), this.afterTrailingComma(types$1.braceR)) break;
4199
- nodes.push(this.parseExportSpecifier(exports$1));
4200
- }
4201
- return nodes;
4202
- }, pp$8.parseImport = function(node) {
4203
- return this.next(), this.type === types$1.string ? (node.specifiers = empty$1, node.source = this.parseExprAtom()) : (node.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (node.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(node, "ImportDeclaration");
4204
- }, pp$8.parseImportSpecifier = function() {
4205
- var node = this.startNode();
4206
- return node.imported = this.parseModuleExportName(), this.eatContextual("as") ? node.local = this.parseIdent() : (this.checkUnreserved(node.imported), node.local = node.imported), this.checkLValSimple(node.local, 2), this.finishNode(node, "ImportSpecifier");
4207
- }, pp$8.parseImportDefaultSpecifier = function() {
4208
- var node = this.startNode();
4209
- return node.local = this.parseIdent(), this.checkLValSimple(node.local, 2), this.finishNode(node, "ImportDefaultSpecifier");
4210
- }, pp$8.parseImportNamespaceSpecifier = function() {
4211
- var node = this.startNode();
4212
- return this.next(), this.expectContextual("as"), node.local = this.parseIdent(), this.checkLValSimple(node.local, 2), this.finishNode(node, "ImportNamespaceSpecifier");
4213
- }, pp$8.parseImportSpecifiers = function() {
4214
- var nodes = [], first = !0;
4215
- if (this.type === types$1.name && (nodes.push(this.parseImportDefaultSpecifier()), !this.eat(types$1.comma))) return nodes;
4216
- if (this.type === types$1.star) return nodes.push(this.parseImportNamespaceSpecifier()), nodes;
4217
- for(this.expect(types$1.braceL); !this.eat(types$1.braceR);){
4218
- if (first) first = !1;
4219
- else if (this.expect(types$1.comma), this.afterTrailingComma(types$1.braceR)) break;
4220
- nodes.push(this.parseImportSpecifier());
4221
- }
4222
- return nodes;
4223
- }, pp$8.parseWithClause = function() {
4224
- var nodes = [];
4225
- if (!this.eat(types$1._with)) return nodes;
4226
- this.expect(types$1.braceL);
4227
- for(var attributeKeys = {}, first = !0; !this.eat(types$1.braceR);){
4228
- if (first) first = !1;
4229
- else if (this.expect(types$1.comma), this.afterTrailingComma(types$1.braceR)) break;
4230
- var attr = this.parseImportAttribute(), keyName = "Identifier" === attr.key.type ? attr.key.name : attr.key.value;
4231
- hasOwn(attributeKeys, keyName) && this.raiseRecoverable(attr.key.start, "Duplicate attribute key '" + keyName + "'"), attributeKeys[keyName] = !0, nodes.push(attr);
4232
- }
4233
- return nodes;
4234
- }, pp$8.parseImportAttribute = function() {
4235
- var node = this.startNode();
4236
- return node.key = this.type === types$1.string ? this.parseExprAtom() : this.parseIdent("never" !== this.options.allowReserved), this.expect(types$1.colon), this.type !== types$1.string && this.unexpected(), node.value = this.parseExprAtom(), this.finishNode(node, "ImportAttribute");
4237
- }, pp$8.parseModuleExportName = function() {
4238
- if (this.options.ecmaVersion >= 13 && this.type === types$1.string) {
4239
- var stringLiteral = this.parseLiteral(this.value);
4240
- return loneSurrogate.test(stringLiteral.value) && this.raise(stringLiteral.start, "An export name cannot include a lone surrogate."), stringLiteral;
4241
- }
4242
- return this.parseIdent(!0);
4243
- }, pp$8.adaptDirectivePrologue = function(statements) {
4244
- for(var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i)statements[i].directive = statements[i].expression.raw.slice(1, -1);
4245
- }, pp$8.isDirectiveCandidate = function(statement) {
4246
- return this.options.ecmaVersion >= 5 && "ExpressionStatement" === statement.type && "Literal" === statement.expression.type && "string" == typeof statement.expression.value && ("\"" === this.input[statement.start] || "'" === this.input[statement.start]);
4247
- };
4248
- var pp$7 = acorn_Parser.prototype;
4249
- pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) {
4250
- if (this.options.ecmaVersion >= 6 && node) switch(node.type){
4251
- case "Identifier":
4252
- this.inAsync && "await" === node.name && this.raise(node.start, "Cannot use 'await' as identifier inside an async function");
4253
- break;
4254
- case "ObjectPattern":
4255
- case "ArrayPattern":
4256
- case "AssignmentPattern":
4257
- case "RestElement":
4258
- break;
4259
- case "ObjectExpression":
4260
- node.type = "ObjectPattern", refDestructuringErrors && this.checkPatternErrors(refDestructuringErrors, !0);
4261
- for(var i = 0, list = node.properties; i < list.length; i += 1){
4262
- var prop = list[i];
4263
- this.toAssignable(prop, isBinding), "RestElement" === prop.type && ("ArrayPattern" === prop.argument.type || "ObjectPattern" === prop.argument.type) && this.raise(prop.argument.start, "Unexpected token");
4264
- }
4265
- break;
4266
- case "Property":
4267
- "init" !== node.kind && this.raise(node.key.start, "Object pattern can't contain getter or setter"), this.toAssignable(node.value, isBinding);
4268
- break;
4269
- case "ArrayExpression":
4270
- node.type = "ArrayPattern", refDestructuringErrors && this.checkPatternErrors(refDestructuringErrors, !0), this.toAssignableList(node.elements, isBinding);
4271
- break;
4272
- case "SpreadElement":
4273
- node.type = "RestElement", this.toAssignable(node.argument, isBinding), "AssignmentPattern" === node.argument.type && this.raise(node.argument.start, "Rest elements cannot have a default value");
4274
- break;
4275
- case "AssignmentExpression":
4276
- "=" !== node.operator && this.raise(node.left.end, "Only '=' operator can be used for specifying default value."), node.type = "AssignmentPattern", delete node.operator, this.toAssignable(node.left, isBinding);
4277
- break;
4278
- case "ParenthesizedExpression":
4279
- this.toAssignable(node.expression, isBinding, refDestructuringErrors);
4280
- break;
4281
- case "ChainExpression":
4282
- this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side");
4283
- break;
4284
- case "MemberExpression":
4285
- if (!isBinding) break;
4286
- default:
4287
- this.raise(node.start, "Assigning to rvalue");
4288
- }
4289
- else refDestructuringErrors && this.checkPatternErrors(refDestructuringErrors, !0);
4290
- return node;
4291
- }, pp$7.toAssignableList = function(exprList, isBinding) {
4292
- for(var end = exprList.length, i = 0; i < end; i++){
4293
- var elt = exprList[i];
4294
- elt && this.toAssignable(elt, isBinding);
4295
- }
4296
- if (end) {
4297
- var last = exprList[end - 1];
4298
- 6 === this.options.ecmaVersion && isBinding && last && "RestElement" === last.type && "Identifier" !== last.argument.type && this.unexpected(last.argument.start);
4299
- }
4300
- return exprList;
4301
- }, pp$7.parseSpread = function(refDestructuringErrors) {
4302
- var node = this.startNode();
4303
- return this.next(), node.argument = this.parseMaybeAssign(!1, refDestructuringErrors), this.finishNode(node, "SpreadElement");
4304
- }, pp$7.parseRestBinding = function() {
4305
- var node = this.startNode();
4306
- return this.next(), 6 === this.options.ecmaVersion && this.type !== types$1.name && this.unexpected(), node.argument = this.parseBindingAtom(), this.finishNode(node, "RestElement");
4307
- }, pp$7.parseBindingAtom = function() {
4308
- if (this.options.ecmaVersion >= 6) switch(this.type){
4309
- case types$1.bracketL:
4310
- var node = this.startNode();
4311
- return this.next(), node.elements = this.parseBindingList(types$1.bracketR, !0, !0), this.finishNode(node, "ArrayPattern");
4312
- case types$1.braceL:
4313
- return this.parseObj(!0);
4314
- }
4315
- return this.parseIdent();
4316
- }, pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) {
4317
- for(var elts = [], first = !0; !this.eat(close);)if (first ? first = !1 : this.expect(types$1.comma), allowEmpty && this.type === types$1.comma) elts.push(null);
4318
- else if (allowTrailingComma && this.afterTrailingComma(close)) break;
4319
- else if (this.type === types$1.ellipsis) {
4320
- var rest = this.parseRestBinding();
4321
- this.parseBindingListItem(rest), elts.push(rest), this.type === types$1.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.expect(close);
4322
- break;
4323
- } else elts.push(this.parseAssignableListItem(allowModifiers));
4324
- return elts;
4325
- }, pp$7.parseAssignableListItem = function(allowModifiers) {
4326
- var elem = this.parseMaybeDefault(this.start, this.startLoc);
4327
- return this.parseBindingListItem(elem), elem;
4328
- }, pp$7.parseBindingListItem = function(param) {
4329
- return param;
4330
- }, pp$7.parseMaybeDefault = function(startPos, startLoc, left) {
4331
- if (left = left || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) return left;
4332
- var node = this.startNodeAt(startPos, startLoc);
4333
- return node.left = left, node.right = this.parseMaybeAssign(), this.finishNode(node, "AssignmentPattern");
4334
- }, pp$7.checkLValSimple = function(expr, bindingType, checkClashes) {
4335
- void 0 === bindingType && (bindingType = 0);
4336
- var isBind = 0 !== bindingType;
4337
- switch(expr.type){
4338
- case "Identifier":
4339
- this.strict && this.reservedWordsStrictBind.test(expr.name) && this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"), isBind && (2 === bindingType && "let" === expr.name && this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"), checkClashes && (hasOwn(checkClashes, expr.name) && this.raiseRecoverable(expr.start, "Argument name clash"), checkClashes[expr.name] = !0), 5 !== bindingType && this.declareName(expr.name, bindingType, expr.start));
4340
- break;
4341
- case "ChainExpression":
4342
- this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
4343
- break;
4344
- case "MemberExpression":
4345
- isBind && this.raiseRecoverable(expr.start, "Binding member expression");
4346
- break;
4347
- case "ParenthesizedExpression":
4348
- return isBind && this.raiseRecoverable(expr.start, "Binding parenthesized expression"), this.checkLValSimple(expr.expression, bindingType, checkClashes);
4349
- default:
4350
- this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue");
4351
- }
4352
- }, pp$7.checkLValPattern = function(expr, bindingType, checkClashes) {
4353
- switch(void 0 === bindingType && (bindingType = 0), expr.type){
4354
- case "ObjectPattern":
4355
- for(var i = 0, list = expr.properties; i < list.length; i += 1){
4356
- var prop = list[i];
4357
- this.checkLValInnerPattern(prop, bindingType, checkClashes);
4358
- }
4359
- break;
4360
- case "ArrayPattern":
4361
- for(var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1){
4362
- var elem = list$1[i$1];
4363
- elem && this.checkLValInnerPattern(elem, bindingType, checkClashes);
4364
- }
4365
- break;
4366
- default:
4367
- this.checkLValSimple(expr, bindingType, checkClashes);
4368
- }
4369
- }, pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) {
4370
- switch(void 0 === bindingType && (bindingType = 0), expr.type){
4371
- case "Property":
4372
- this.checkLValInnerPattern(expr.value, bindingType, checkClashes);
4373
- break;
4374
- case "AssignmentPattern":
4375
- this.checkLValPattern(expr.left, bindingType, checkClashes);
4376
- break;
4377
- case "RestElement":
4378
- this.checkLValPattern(expr.argument, bindingType, checkClashes);
4379
- break;
4380
- default:
4381
- this.checkLValPattern(expr, bindingType, checkClashes);
4382
- }
4383
- };
4384
- var acorn_TokContext = function(token, isExpr, preserveSpace, override, generator) {
4385
- this.token = token, this.isExpr = !!isExpr, this.preserveSpace = !!preserveSpace, this.override = override, this.generator = !!generator;
4386
- }, types = {
4387
- b_stat: new acorn_TokContext("{", !1),
4388
- b_expr: new acorn_TokContext("{", !0),
4389
- b_tmpl: new acorn_TokContext("${", !1),
4390
- p_stat: new acorn_TokContext("(", !1),
4391
- p_expr: new acorn_TokContext("(", !0),
4392
- q_tmpl: new acorn_TokContext("`", !0, !0, function(p) {
4393
- return p.tryReadTemplateToken();
4394
- }),
4395
- f_stat: new acorn_TokContext("function", !1),
4396
- f_expr: new acorn_TokContext("function", !0),
4397
- f_expr_gen: new acorn_TokContext("function", !0, !1, null, !0),
4398
- f_gen: new acorn_TokContext("function", !1, !1, null, !0)
4399
- }, pp$6 = acorn_Parser.prototype;
4400
- pp$6.initialContext = function() {
4401
- return [
4402
- types.b_stat
4403
- ];
4404
- }, pp$6.curContext = function() {
4405
- return this.context[this.context.length - 1];
4406
- }, pp$6.braceIsBlock = function(prevType) {
4407
- var parent = this.curContext();
4408
- return parent === types.f_expr || parent === types.f_stat || (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr) ? !parent.isExpr : prevType === types$1._return || prevType === types$1.name && this.exprAllowed ? lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) : prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow || (prevType === types$1.braceL ? parent === types.b_stat : prevType !== types$1._var && prevType !== types$1._const && prevType !== types$1.name && !this.exprAllowed));
4409
- }, pp$6.inGeneratorContext = function() {
4410
- for(var i = this.context.length - 1; i >= 1; i--){
4411
- var context = this.context[i];
4412
- if ("function" === context.token) return context.generator;
4413
- }
4414
- return !1;
4415
- }, pp$6.updateContext = function(prevType) {
4416
- var update, type = this.type;
4417
- type.keyword && prevType === types$1.dot ? this.exprAllowed = !1 : (update = type.updateContext) ? update.call(this, prevType) : this.exprAllowed = type.beforeExpr;
4418
- }, pp$6.overrideContext = function(tokenCtx) {
4419
- this.curContext() !== tokenCtx && (this.context[this.context.length - 1] = tokenCtx);
4420
- }, types$1.parenR.updateContext = types$1.braceR.updateContext = function() {
4421
- if (1 === this.context.length) {
4422
- this.exprAllowed = !0;
4423
- return;
4424
- }
4425
- var out = this.context.pop();
4426
- out === types.b_stat && "function" === this.curContext().token && (out = this.context.pop()), this.exprAllowed = !out.isExpr;
4427
- }, types$1.braceL.updateContext = function(prevType) {
4428
- this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr), this.exprAllowed = !0;
4429
- }, types$1.dollarBraceL.updateContext = function() {
4430
- this.context.push(types.b_tmpl), this.exprAllowed = !0;
4431
- }, types$1.parenL.updateContext = function(prevType) {
4432
- var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while;
4433
- this.context.push(statementParens ? types.p_stat : types.p_expr), this.exprAllowed = !0;
4434
- }, types$1.incDec.updateContext = function() {}, types$1._function.updateContext = types$1._class.updateContext = function(prevType) {
4435
- prevType.beforeExpr && prevType !== types$1._else && (prevType !== types$1.semi || this.curContext() === types.p_stat) && !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && (prevType !== types$1.colon && prevType !== types$1.braceL || this.curContext() !== types.b_stat) ? this.context.push(types.f_expr) : this.context.push(types.f_stat), this.exprAllowed = !1;
4436
- }, types$1.colon.updateContext = function() {
4437
- "function" === this.curContext().token && this.context.pop(), this.exprAllowed = !0;
4438
- }, types$1.backQuote.updateContext = function() {
4439
- this.curContext() === types.q_tmpl ? this.context.pop() : this.context.push(types.q_tmpl), this.exprAllowed = !1;
4440
- }, types$1.star.updateContext = function(prevType) {
4441
- if (prevType === types$1._function) {
4442
- var index = this.context.length - 1;
4443
- this.context[index] === types.f_expr ? this.context[index] = types.f_expr_gen : this.context[index] = types.f_gen;
4444
- }
4445
- this.exprAllowed = !0;
4446
- }, types$1.name.updateContext = function(prevType) {
4447
- var allowed = !1;
4448
- this.options.ecmaVersion >= 6 && prevType !== types$1.dot && ("of" === this.value && !this.exprAllowed || "yield" === this.value && this.inGeneratorContext()) && (allowed = !0), this.exprAllowed = allowed;
4449
- };
4450
- var pp$5 = acorn_Parser.prototype;
4451
- pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {
4452
- if ((!(this.options.ecmaVersion >= 9) || "SpreadElement" !== prop.type) && (!(this.options.ecmaVersion >= 6) || !prop.computed && !prop.method && !prop.shorthand)) {
4453
- var name, key = prop.key;
4454
- switch(key.type){
4455
- case "Identifier":
4456
- name = key.name;
4457
- break;
4458
- case "Literal":
4459
- name = String(key.value);
4460
- break;
4461
- default:
4462
- return;
4463
- }
4464
- var kind = prop.kind;
4465
- if (this.options.ecmaVersion >= 6) {
4466
- "__proto__" === name && "init" === kind && (propHash.proto && (refDestructuringErrors ? refDestructuringErrors.doubleProto < 0 && (refDestructuringErrors.doubleProto = key.start) : this.raiseRecoverable(key.start, "Redefinition of __proto__ property")), propHash.proto = !0);
4467
- return;
4468
- }
4469
- var other = propHash[name = "$" + name];
4470
- other ? ("init" === kind ? this.strict && other.init || other.get || other.set : other.init || other[kind]) && this.raiseRecoverable(key.start, "Redefinition of property") : other = propHash[name] = {
4471
- init: !1,
4472
- get: !1,
4473
- set: !1
4474
- }, other[kind] = !0;
4475
- }
4476
- }, pp$5.parseExpression = function(forInit, refDestructuringErrors) {
4477
- var this$1$1 = this;
4478
- return this.catchStackOverflow(function() {
4479
- var startPos = this$1$1.start, startLoc = this$1$1.startLoc, expr = this$1$1.parseMaybeAssign(forInit, refDestructuringErrors);
4480
- if (this$1$1.type === types$1.comma) {
4481
- var node = this$1$1.startNodeAt(startPos, startLoc);
4482
- for(node.expressions = [
4483
- expr
4484
- ]; this$1$1.eat(types$1.comma);)node.expressions.push(this$1$1.parseMaybeAssign(forInit, refDestructuringErrors));
4485
- return this$1$1.finishNode(node, "SequenceExpression");
4486
- }
4487
- return expr;
4488
- });
4489
- }, pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
4490
- if (this.isContextual("yield")) if (this.inGenerator) return this.parseYield(forInit);
4491
- else this.exprAllowed = !1;
4492
- var ownDestructuringErrors = !1, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;
4493
- refDestructuringErrors ? (oldParenAssign = refDestructuringErrors.parenthesizedAssign, oldTrailingComma = refDestructuringErrors.trailingComma, oldDoubleProto = refDestructuringErrors.doubleProto, refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1) : (refDestructuringErrors = new acorn_DestructuringErrors, ownDestructuringErrors = !0);
4494
- var startPos = this.start, startLoc = this.startLoc;
4495
- (this.type === types$1.parenL || this.type === types$1.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = "await" === forInit);
4496
- var left = this.parseMaybeConditional(forInit, refDestructuringErrors);
4497
- if (afterLeftParse && (left = afterLeftParse.call(this, left, startPos, startLoc)), this.type.isAssign) {
4498
- var node = this.startNodeAt(startPos, startLoc);
4499
- return node.operator = this.value, this.type === types$1.eq && (left = this.toAssignable(left, !1, refDestructuringErrors)), ownDestructuringErrors || (refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1), refDestructuringErrors.shorthandAssign >= left.start && (refDestructuringErrors.shorthandAssign = -1), this.type === types$1.eq ? this.checkLValPattern(left) : this.checkLValSimple(left), node.left = left, this.next(), node.right = this.parseMaybeAssign(forInit), oldDoubleProto > -1 && (refDestructuringErrors.doubleProto = oldDoubleProto), this.finishNode(node, "AssignmentExpression");
4500
- }
4501
- return ownDestructuringErrors && this.checkExpressionErrors(refDestructuringErrors, !0), oldParenAssign > -1 && (refDestructuringErrors.parenthesizedAssign = oldParenAssign), oldTrailingComma > -1 && (refDestructuringErrors.trailingComma = oldTrailingComma), left;
4502
- }, pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {
4503
- var startPos = this.start, startLoc = this.startLoc, expr = this.parseExprOps(forInit, refDestructuringErrors);
4504
- if (this.checkExpressionErrors(refDestructuringErrors)) return expr;
4505
- if (("ArrowFunctionExpression" !== expr.type || expr.start !== startPos) && this.eat(types$1.question)) {
4506
- var node = this.startNodeAt(startPos, startLoc);
4507
- return node.test = expr, node.consequent = this.parseMaybeAssign(), this.expect(types$1.colon), node.alternate = this.parseMaybeAssign(forInit), this.finishNode(node, "ConditionalExpression");
4508
- }
4509
- return expr;
4510
- }, pp$5.parseExprOps = function(forInit, refDestructuringErrors) {
4511
- var startPos = this.start, startLoc = this.startLoc, expr = this.parseMaybeUnary(refDestructuringErrors, !1, !1, forInit);
4512
- return this.checkExpressionErrors(refDestructuringErrors) || expr.start === startPos && "ArrowFunctionExpression" === expr.type ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit);
4513
- }, pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
4514
- var prec = this.type.binop;
4515
- if (null != prec && (!forInit || this.type !== types$1._in) && prec > minPrec) {
4516
- var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND, coalesce = this.type === types$1.coalesce;
4517
- coalesce && (prec = types$1.logicalAND.binop);
4518
- var op = this.value;
4519
- this.next();
4520
- var startPos = this.start, startLoc = this.startLoc, right = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, forInit), startPos, startLoc, prec, forInit), node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
4521
- return (logical && this.type === types$1.coalesce || coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit);
4522
- }
4523
- return left;
4524
- }, pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) {
4525
- "PrivateIdentifier" === right.type && this.raise(right.start, "Private identifier can only be left side of binary expression");
4526
- var node = this.startNodeAt(startPos, startLoc);
4527
- return node.left = left, node.operator = op, node.right = right, this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression");
4528
- }, pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
4529
- var expr, startPos = this.start, startLoc = this.startLoc;
4530
- if (this.isContextual("await") && this.canAwait) expr = this.parseAwait(forInit), sawUnary = !0;
4531
- else if (this.type.prefix) {
4532
- var node = this.startNode(), update = this.type === types$1.incDec;
4533
- node.operator = this.value, node.prefix = !0, this.next(), node.argument = this.parseMaybeUnary(null, !0, update, forInit), this.checkExpressionErrors(refDestructuringErrors, !0), update ? this.checkLValSimple(node.argument) : this.strict && "delete" === node.operator && function isLocalVariableAccess(node) {
4534
- return "Identifier" === node.type || "ParenthesizedExpression" === node.type && isLocalVariableAccess(node.expression);
4535
- }(node.argument) ? this.raiseRecoverable(node.start, "Deleting local variable in strict mode") : "delete" === node.operator && function isPrivateFieldAccess(node) {
4536
- return "MemberExpression" === node.type && "PrivateIdentifier" === node.property.type || "ChainExpression" === node.type && isPrivateFieldAccess(node.expression) || "ParenthesizedExpression" === node.type && isPrivateFieldAccess(node.expression);
4537
- }(node.argument) ? this.raiseRecoverable(node.start, "Private fields can not be deleted") : sawUnary = !0, expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
4538
- } else if (sawUnary || this.type !== types$1.privateId) {
4539
- if (expr = this.parseExprSubscripts(refDestructuringErrors, forInit), this.checkExpressionErrors(refDestructuringErrors)) return expr;
4540
- for(; this.type.postfix && !this.canInsertSemicolon();){
4541
- var node$1 = this.startNodeAt(startPos, startLoc);
4542
- node$1.operator = this.value, node$1.prefix = !1, node$1.argument = expr, this.checkLValSimple(expr), this.next(), expr = this.finishNode(node$1, "UpdateExpression");
4543
- }
4544
- } else (forInit || 0 === this.privateNameStack.length) && this.options.checkPrivateFields && this.unexpected(), expr = this.parsePrivateIdent(), this.type !== types$1._in && this.unexpected();
4545
- return !incDec && ("ArrowFunctionExpression" !== expr.type || expr.start !== startPos) && this.eat(types$1.starstar) ? sawUnary ? void this.unexpected(this.lastTokStart) : this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, !1, !1, forInit), "**", !1) : expr;
4546
- }, pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
4547
- var startPos = this.start, startLoc = this.startLoc, expr = this.parseExprAtom(refDestructuringErrors, forInit);
4548
- if ("ArrowFunctionExpression" === expr.type && ")" !== this.input.slice(this.lastTokStart, this.lastTokEnd)) return expr;
4549
- var result = this.parseSubscripts(expr, startPos, startLoc, !1, forInit);
4550
- return refDestructuringErrors && "MemberExpression" === result.type && (refDestructuringErrors.parenthesizedAssign >= result.start && (refDestructuringErrors.parenthesizedAssign = -1), refDestructuringErrors.parenthesizedBind >= result.start && (refDestructuringErrors.parenthesizedBind = -1), refDestructuringErrors.trailingComma >= result.start && (refDestructuringErrors.trailingComma = -1)), result;
4551
- }, pp$5.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) {
4552
- for(var maybeAsyncArrow = this.options.ecmaVersion >= 8 && "Identifier" === base.type && "async" === base.name && this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start == 5 && this.potentialArrowAt === base.start, optionalChained = !1;;){
4553
- var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);
4554
- if (element.optional && (optionalChained = !0), element === base || "ArrowFunctionExpression" === element.type) {
4555
- if (optionalChained) {
4556
- var chainNode = this.startNodeAt(startPos, startLoc);
4557
- chainNode.expression = element, element = this.finishNode(chainNode, "ChainExpression");
4558
- }
4559
- return element;
4560
- }
4561
- base = element;
4562
- }
4563
- }, pp$5.shouldParseAsyncArrow = function() {
4564
- return !this.canInsertSemicolon() && this.eat(types$1.arrow);
4565
- }, pp$5.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) {
4566
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, !0, forInit);
4567
- }, pp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
4568
- var optionalSupported = this.options.ecmaVersion >= 11, optional = optionalSupported && this.eat(types$1.questionDot);
4569
- noCalls && optional && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
4570
- var computed = this.eat(types$1.bracketL);
4571
- if (computed || optional && this.type !== types$1.parenL && this.type !== types$1.backQuote || this.eat(types$1.dot)) {
4572
- var node = this.startNodeAt(startPos, startLoc);
4573
- node.object = base, computed ? (node.property = this.parseExpression(), this.expect(types$1.bracketR)) : this.type === types$1.privateId && "Super" !== base.type ? node.property = this.parsePrivateIdent() : node.property = this.parseIdent("never" !== this.options.allowReserved), node.computed = !!computed, optionalSupported && (node.optional = optional), base = this.finishNode(node, "MemberExpression");
4574
- } else if (!noCalls && this.eat(types$1.parenL)) {
4575
- var refDestructuringErrors = new acorn_DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
4576
- this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
4577
- var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, !1, refDestructuringErrors);
4578
- if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) return this.checkPatternErrors(refDestructuringErrors, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit);
4579
- this.checkExpressionErrors(refDestructuringErrors, !0), this.yieldPos = oldYieldPos || this.yieldPos, this.awaitPos = oldAwaitPos || this.awaitPos, this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
4580
- var node$1 = this.startNodeAt(startPos, startLoc);
4581
- node$1.callee = base, node$1.arguments = exprList, optionalSupported && (node$1.optional = optional), base = this.finishNode(node$1, "CallExpression");
4582
- } else if (this.type === types$1.backQuote) {
4583
- (optional || optionalChained) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
4584
- var node$2 = this.startNodeAt(startPos, startLoc);
4585
- node$2.tag = base, node$2.quasi = this.parseTemplate({
4586
- isTagged: !0
4587
- }), base = this.finishNode(node$2, "TaggedTemplateExpression");
4588
- }
4589
- return base;
4590
- }, pp$5.parseExprAtom = function(refDestructuringErrors, forInit, forNew) {
4591
- this.type === types$1.slash && this.readRegexp();
4592
- var node, canBeArrow = this.potentialArrowAt === this.start;
4593
- switch(this.type){
4594
- case types$1._super:
4595
- return this.allowSuper || this.raise(this.start, "'super' keyword outside a method"), node = this.startNode(), this.next(), this.type !== types$1.parenL || this.allowDirectSuper || this.raise(node.start, "super() call outside constructor of a subclass"), this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL && this.unexpected(), this.finishNode(node, "Super");
4596
- case types$1._this:
4597
- return node = this.startNode(), this.next(), this.finishNode(node, "ThisExpression");
4598
- case types$1.name:
4599
- var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc, id = this.parseIdent(!1);
4600
- if (this.options.ecmaVersion >= 8 && !containsEsc && "async" === id.name && !this.canInsertSemicolon() && this.eat(types$1._function)) return this.overrideContext(types.f_expr), this.parseFunction(this.startNodeAt(startPos, startLoc), 0, !1, !0, forInit);
4601
- if (canBeArrow && !this.canInsertSemicolon()) {
4602
- if (this.eat(types$1.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [
4603
- id
4604
- ], !1, forInit);
4605
- if (this.options.ecmaVersion >= 8 && "async" === id.name && this.type === types$1.name && !containsEsc && (!this.potentialArrowInForAwait || "of" !== this.value || this.containsEsc)) return id = this.parseIdent(!1), (this.canInsertSemicolon() || !this.eat(types$1.arrow)) && this.unexpected(), this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [
4606
- id
4607
- ], !0, forInit);
4608
- }
4609
- return id;
4610
- case types$1.regexp:
4611
- var value = this.value;
4612
- return (node = this.parseLiteral(value.value)).regex = {
4613
- pattern: value.pattern,
4614
- flags: value.flags
4615
- }, node;
4616
- case types$1.num:
4617
- case types$1.string:
4618
- return this.parseLiteral(this.value);
4619
- case types$1._null:
4620
- case types$1._true:
4621
- case types$1._false:
4622
- return (node = this.startNode()).value = this.type === types$1._null ? null : this.type === types$1._true, node.raw = this.type.keyword, this.next(), this.finishNode(node, "Literal");
4623
- case types$1.parenL:
4624
- var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
4625
- return refDestructuringErrors && (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr) && (refDestructuringErrors.parenthesizedAssign = start), refDestructuringErrors.parenthesizedBind < 0 && (refDestructuringErrors.parenthesizedBind = start)), expr;
4626
- case types$1.bracketL:
4627
- return node = this.startNode(), this.next(), node.elements = this.parseExprList(types$1.bracketR, !0, !0, refDestructuringErrors), this.finishNode(node, "ArrayExpression");
4628
- case types$1.braceL:
4629
- return this.overrideContext(types.b_expr), this.parseObj(!1, refDestructuringErrors);
4630
- case types$1._function:
4631
- return node = this.startNode(), this.next(), this.parseFunction(node, 0);
4632
- case types$1._class:
4633
- return this.parseClass(this.startNode(), !1);
4634
- case types$1._new:
4635
- return this.parseNew();
4636
- case types$1.backQuote:
4637
- return this.parseTemplate();
4638
- case types$1._import:
4639
- if (this.options.ecmaVersion >= 11) return this.parseExprImport(forNew);
4640
- return this.unexpected();
4641
- default:
4642
- return this.parseExprAtomDefault();
4643
- }
4644
- }, pp$5.parseExprAtomDefault = function() {
4645
- this.unexpected();
4646
- }, pp$5.parseExprImport = function(forNew) {
4647
- var node = this.startNode();
4648
- if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === types$1.parenL && !forNew) return this.parseDynamicImport(node);
4649
- if (this.type === types$1.dot) {
4650
- var meta = this.startNodeAt(node.start, node.loc && node.loc.start);
4651
- return meta.name = "import", node.meta = this.finishNode(meta, "Identifier"), this.parseImportMeta(node);
4652
- }
4653
- this.unexpected();
4654
- }, pp$5.parseDynamicImport = function(node) {
4655
- if (this.next(), node.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16) this.eat(types$1.parenR) ? node.options = null : (this.expect(types$1.comma), this.afterTrailingComma(types$1.parenR) ? node.options = null : (node.options = this.parseMaybeAssign(), !this.eat(types$1.parenR) && (this.expect(types$1.comma), this.afterTrailingComma(types$1.parenR) || this.unexpected())));
4656
- else if (!this.eat(types$1.parenR)) {
4657
- var errorPos = this.start;
4658
- this.eat(types$1.comma) && this.eat(types$1.parenR) ? this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()") : this.unexpected(errorPos);
4659
- }
4660
- return this.finishNode(node, "ImportExpression");
4661
- }, pp$5.parseImportMeta = function(node) {
4662
- this.next();
4663
- var containsEsc = this.containsEsc;
4664
- return node.property = this.parseIdent(!0), "meta" !== node.property.name && this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"), containsEsc && this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"), "module" === this.options.sourceType || this.options.allowImportExportEverywhere || this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"), this.finishNode(node, "MetaProperty");
4665
- }, pp$5.parseLiteral = function(value) {
4666
- var node = this.startNode();
4667
- return node.value = value, node.raw = this.input.slice(this.start, this.end), 110 === node.raw.charCodeAt(node.raw.length - 1) && (node.bigint = null != node.value ? node.value.toString() : node.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(node, "Literal");
4668
- }, pp$5.parseParenExpression = function() {
4669
- this.expect(types$1.parenL);
4670
- var val = this.parseExpression();
4671
- return this.expect(types$1.parenR), val;
4672
- }, pp$5.shouldParseArrow = function(exprList) {
4673
- return !this.canInsertSemicolon();
4674
- }, pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
4675
- var val, startPos = this.start, startLoc = this.startLoc, allowTrailingComma = this.options.ecmaVersion >= 8;
4676
- if (this.options.ecmaVersion >= 6) {
4677
- this.next();
4678
- var spreadStart, innerStartPos = this.start, innerStartLoc = this.startLoc, exprList = [], first = !0, lastIsComma = !1, refDestructuringErrors = new acorn_DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos;
4679
- for(this.yieldPos = 0, this.awaitPos = 0; this.type !== types$1.parenR;){
4680
- if (first ? first = !1 : this.expect(types$1.comma), allowTrailingComma && this.afterTrailingComma(types$1.parenR, !0)) {
4681
- lastIsComma = !0;
4682
- break;
4683
- }
4684
- if (this.type === types$1.ellipsis) {
4685
- spreadStart = this.start, exprList.push(this.parseParenItem(this.parseRestBinding())), this.type === types$1.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element");
4686
- break;
4687
- }
4688
- exprList.push(this.parseMaybeAssign(!1, refDestructuringErrors, this.parseParenItem));
4689
- }
4690
- var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;
4691
- if (this.expect(types$1.parenR), canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$1.arrow)) return this.checkPatternErrors(refDestructuringErrors, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.parseParenArrowList(startPos, startLoc, exprList, forInit);
4692
- (!exprList.length || lastIsComma) && this.unexpected(this.lastTokStart), spreadStart && this.unexpected(spreadStart), this.checkExpressionErrors(refDestructuringErrors, !0), this.yieldPos = oldYieldPos || this.yieldPos, this.awaitPos = oldAwaitPos || this.awaitPos, exprList.length > 1 ? ((val = this.startNodeAt(innerStartPos, innerStartLoc)).expressions = exprList, this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc)) : val = exprList[0];
4693
- } else val = this.parseParenExpression();
4694
- if (!this.options.preserveParens) return val;
4695
- var par = this.startNodeAt(startPos, startLoc);
4696
- return par.expression = val, this.finishNode(par, "ParenthesizedExpression");
4697
- }, pp$5.parseParenItem = function(item) {
4698
- return item;
4699
- }, pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
4700
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, !1, forInit);
4701
- };
4702
- var empty = [];
4703
- pp$5.parseNew = function() {
4704
- this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
4705
- var node = this.startNode();
4706
- if (this.next(), this.options.ecmaVersion >= 6 && this.type === types$1.dot) {
4707
- var meta = this.startNodeAt(node.start, node.loc && node.loc.start);
4708
- meta.name = "new", node.meta = this.finishNode(meta, "Identifier"), this.next();
4709
- var containsEsc = this.containsEsc;
4710
- return node.property = this.parseIdent(!0), "target" !== node.property.name && this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"), containsEsc && this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block"), this.finishNode(node, "MetaProperty");
4711
- }
4712
- var startPos = this.start, startLoc = this.startLoc;
4713
- return node.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), startPos, startLoc, !0, !1), "Super" === node.callee.type && this.raiseRecoverable(startPos, "Invalid use of 'super'"), this.eat(types$1.parenL) ? node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, !1) : node.arguments = empty, this.finishNode(node, "NewExpression");
4714
- }, pp$5.parseTemplateElement = function(ref) {
4715
- var isTagged = ref.isTagged, elem = this.startNode();
4716
- return this.type === types$1.invalidTemplate ? (isTagged || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), elem.value = {
4717
- raw: this.value.replace(/\r\n?/g, "\n"),
4718
- cooked: null
4719
- }) : elem.value = {
4720
- raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
4721
- cooked: this.value
4722
- }, this.next(), elem.tail = this.type === types$1.backQuote, this.finishNode(elem, "TemplateElement");
4723
- }, pp$5.parseTemplate = function(ref) {
4724
- void 0 === ref && (ref = {});
4725
- var isTagged = ref.isTagged;
4726
- void 0 === isTagged && (isTagged = !1);
4727
- var node = this.startNode();
4728
- this.next(), node.expressions = [];
4729
- var curElt = this.parseTemplateElement({
4730
- isTagged: isTagged
4731
- });
4732
- for(node.quasis = [
4733
- curElt
4734
- ]; !curElt.tail;)this.type === types$1.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(types$1.dollarBraceL), node.expressions.push(this.parseExpression()), this.expect(types$1.braceR), node.quasis.push(curElt = this.parseTemplateElement({
4735
- isTagged: isTagged
4736
- }));
4737
- return this.next(), this.finishNode(node, "TemplateLiteral");
4738
- }, pp$5.isAsyncProp = function(prop) {
4739
- return !prop.computed && "Identifier" === prop.key.type && "async" === prop.key.name && (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$1.star) && !lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
4740
- }, pp$5.parseObj = function(isPattern, refDestructuringErrors) {
4741
- var node = this.startNode(), first = !0, propHash = {};
4742
- for(node.properties = [], this.next(); !this.eat(types$1.braceR);){
4743
- if (first) first = !1;
4744
- else if (this.expect(types$1.comma), this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) break;
4745
- var prop = this.parseProperty(isPattern, refDestructuringErrors);
4746
- isPattern || this.checkPropClash(prop, propHash, refDestructuringErrors), node.properties.push(prop);
4747
- }
4748
- return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
4749
- }, pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
4750
- var isGenerator, isAsync, startPos, startLoc, prop = this.startNode();
4751
- if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) return isPattern ? (prop.argument = this.parseIdent(!1), this.type === types$1.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(prop, "RestElement")) : (prop.argument = this.parseMaybeAssign(!1, refDestructuringErrors), this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0 && (refDestructuringErrors.trailingComma = this.start), this.finishNode(prop, "SpreadElement"));
4752
- this.options.ecmaVersion >= 6 && (prop.method = !1, prop.shorthand = !1, (isPattern || refDestructuringErrors) && (startPos = this.start, startLoc = this.startLoc), isPattern || (isGenerator = this.eat(types$1.star)));
4753
- var containsEsc = this.containsEsc;
4754
- return this.parsePropertyName(prop), !isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop) ? (isAsync = !0, isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star), this.parsePropertyName(prop)) : isAsync = !1, this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc), this.finishNode(prop, "Property");
4755
- }, pp$5.parseGetterSetter = function(prop) {
4756
- var kind = prop.key.name;
4757
- this.parsePropertyName(prop), prop.value = this.parseMethod(!1), prop.kind = kind;
4758
- var paramCount = +("get" !== prop.kind);
4759
- if (prop.value.params.length !== paramCount) {
4760
- var start = prop.value.start;
4761
- "get" === prop.kind ? this.raiseRecoverable(start, "getter should have no params") : this.raiseRecoverable(start, "setter should have exactly one param");
4762
- } else "set" === prop.kind && "RestElement" === prop.value.params[0].type && this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
4763
- }, pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
4764
- (isGenerator || isAsync) && this.type === types$1.colon && this.unexpected(), this.eat(types$1.colon) ? (prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, refDestructuringErrors), prop.kind = "init") : this.options.ecmaVersion >= 6 && this.type === types$1.parenL ? (isPattern && this.unexpected(), prop.method = !0, prop.value = this.parseMethod(isGenerator, isAsync), prop.kind = "init") : isPattern || containsEsc || !(this.options.ecmaVersion >= 5) || prop.computed || "Identifier" !== prop.key.type || "get" !== prop.key.name && "set" !== prop.key.name || this.type === types$1.comma || this.type === types$1.braceR || this.type === types$1.eq ? this.options.ecmaVersion >= 6 && !prop.computed && "Identifier" === prop.key.type ? ((isGenerator || isAsync) && this.unexpected(), this.checkUnreserved(prop.key), "await" !== prop.key.name || this.awaitIdentPos || (this.awaitIdentPos = startPos), isPattern ? prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)) : this.type === types$1.eq && refDestructuringErrors ? (refDestructuringErrors.shorthandAssign < 0 && (refDestructuringErrors.shorthandAssign = this.start), prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key))) : prop.value = this.copyNode(prop.key), prop.kind = "init", prop.shorthand = !0) : this.unexpected() : ((isGenerator || isAsync) && this.unexpected(), this.parseGetterSetter(prop));
4765
- }, pp$5.parsePropertyName = function(prop) {
4766
- if (this.options.ecmaVersion >= 6) if (this.eat(types$1.bracketL)) return prop.computed = !0, prop.key = this.parseMaybeAssign(), this.expect(types$1.bracketR), prop.key;
4767
- else prop.computed = !1;
4768
- return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent("never" !== this.options.allowReserved);
4769
- }, pp$5.initFunction = function(node) {
4770
- node.id = null, this.options.ecmaVersion >= 6 && (node.generator = node.expression = !1), this.options.ecmaVersion >= 8 && (node.async = !1);
4771
- }, pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
4772
- var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
4773
- return this.initFunction(node), this.options.ecmaVersion >= 6 && (node.generator = isGenerator), this.options.ecmaVersion >= 8 && (node.async = !!isAsync), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | functionFlags(isAsync, node.generator) | 128 * !!allowDirectSuper), this.expect(types$1.parenL), node.params = this.parseBindingList(types$1.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(node, !1, !0, !1), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.finishNode(node, "FunctionExpression");
4774
- }, pp$5.parseArrowExpression = function(node, params, isAsync, forInit) {
4775
- var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
4776
- return this.enterScope(16 | functionFlags(isAsync, !1)), this.initFunction(node), this.options.ecmaVersion >= 8 && (node.async = !!isAsync), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, node.params = this.toAssignableList(params, !0), this.parseFunctionBody(node, !0, !1, forInit), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.finishNode(node, "ArrowFunctionExpression");
4777
- }, pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) {
4778
- var isExpression = isArrowFunction && this.type !== types$1.braceL, oldStrict = this.strict, useStrict = !1;
4779
- if (isExpression) node.body = this.parseMaybeAssign(forInit), node.expression = !0, this.checkParams(node, !1);
4780
- else {
4781
- var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
4782
- (!oldStrict || nonSimple) && (useStrict = this.strictDirective(this.end)) && nonSimple && this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list");
4783
- var oldLabels = this.labels;
4784
- this.labels = [], useStrict && (this.strict = !0), this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)), this.strict && node.id && this.checkLValSimple(node.id, 5), node.body = this.parseBlock(!1, void 0, useStrict && !oldStrict), node.expression = !1, this.adaptDirectivePrologue(node.body.body), this.labels = oldLabels;
4785
- }
4786
- this.exitScope();
4787
- }, pp$5.isSimpleParamList = function(params) {
4788
- for(var i = 0; i < params.length; i += 1)if ("Identifier" !== params[i].type) return !1;
4789
- return !0;
4790
- }, pp$5.checkParams = function(node, allowDuplicates) {
4791
- for(var nameHash = Object.create(null), i = 0, list = node.params; i < list.length; i += 1){
4792
- var param = list[i];
4793
- this.checkLValInnerPattern(param, 1, allowDuplicates ? null : nameHash);
4794
- }
4795
- }, pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
4796
- for(var elts = [], first = !0; !this.eat(close);){
4797
- if (first) first = !1;
4798
- else if (this.expect(types$1.comma), allowTrailingComma && this.afterTrailingComma(close)) break;
4799
- var elt = void 0;
4800
- allowEmpty && this.type === types$1.comma ? elt = null : this.type === types$1.ellipsis ? (elt = this.parseSpread(refDestructuringErrors), refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0 && (refDestructuringErrors.trailingComma = this.start)) : elt = this.parseMaybeAssign(!1, refDestructuringErrors), elts.push(elt);
4801
- }
4802
- return elts;
4803
- }, pp$5.checkUnreserved = function(ref) {
4804
- var start = ref.start, end = ref.end, name = ref.name;
4805
- this.inGenerator && "yield" === name && this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && "await" === name && this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"), 259 & this.currentThisScope().flags || "arguments" !== name || this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && ("arguments" === name || "await" === name) && this.raise(start, "Cannot use " + name + " in class static initialization block"), this.keywords.test(name) && this.raise(start, "Unexpected keyword '" + name + "'"), (!(this.options.ecmaVersion < 6) || -1 === this.input.slice(start, end).indexOf("\\")) && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(name) && (this.inAsync || "await" !== name || this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(start, "The keyword '" + name + "' is reserved"));
4806
- }, pp$5.parseIdent = function(liberal) {
4807
- var node = this.parseIdentNode();
4808
- return this.next(!!liberal), this.finishNode(node, "Identifier"), !liberal && (this.checkUnreserved(node), "await" !== node.name || this.awaitIdentPos || (this.awaitIdentPos = node.start)), node;
4809
- }, pp$5.parseIdentNode = function() {
4810
- var node = this.startNode();
4811
- return this.type === types$1.name ? node.name = this.value : this.type.keyword ? (node.name = this.type.keyword, ("class" === node.name || "function" === node.name) && (this.lastTokEnd !== this.lastTokStart + 1 || 46 !== this.input.charCodeAt(this.lastTokStart)) && this.context.pop(), this.type = types$1.name) : this.unexpected(), node;
4812
- }, pp$5.parsePrivateIdent = function() {
4813
- var node = this.startNode();
4814
- return this.type === types$1.privateId ? node.name = this.value : this.unexpected(), this.next(), this.finishNode(node, "PrivateIdentifier"), this.options.checkPrivateFields && (0 === this.privateNameStack.length ? this.raise(node.start, "Private field '#" + node.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(node)), node;
4815
- }, pp$5.parseYield = function(forInit) {
4816
- this.yieldPos || (this.yieldPos = this.start);
4817
- var node = this.startNode();
4818
- return this.next(), this.type === types$1.semi || this.canInsertSemicolon() || this.type !== types$1.star && !this.type.startsExpr ? (node.delegate = !1, node.argument = null) : (node.delegate = this.eat(types$1.star), node.argument = this.parseMaybeAssign(forInit)), this.finishNode(node, "YieldExpression");
4819
- }, pp$5.parseAwait = function(forInit) {
4820
- this.awaitPos || (this.awaitPos = this.start);
4821
- var node = this.startNode();
4822
- return this.next(), node.argument = this.parseMaybeUnary(null, !0, !1, forInit), this.finishNode(node, "AwaitExpression");
4823
- };
4824
- var pp$4 = acorn_Parser.prototype;
4825
- pp$4.raise = function(pos, message) {
4826
- var loc = getLineInfo(this.input, pos);
4827
- message += " (" + loc.line + ":" + loc.column + ")", this.sourceFile && (message += " in " + this.sourceFile);
4828
- var err = SyntaxError(message);
4829
- throw err.pos = pos, err.loc = loc, err.raisedAt = this.pos, err;
4830
- }, pp$4.raiseRecoverable = pp$4.raise, pp$4.curPosition = function() {
4831
- if (this.options.locations) return new acorn_Position(this.curLine, this.pos - this.lineStart);
4832
- };
4833
- var pp$3 = acorn_Parser.prototype, acorn_Scope = function(flags) {
4834
- this.flags = flags, this.var = [], this.lexical = [], this.functions = [];
4835
- };
4836
- pp$3.enterScope = function(flags) {
4837
- this.scopeStack.push(new acorn_Scope(flags));
4838
- }, pp$3.exitScope = function() {
4839
- this.scopeStack.pop();
4840
- }, pp$3.treatFunctionsAsVarInScope = function(scope) {
4841
- return 2 & scope.flags || !this.inModule && 1 & scope.flags;
4842
- }, pp$3.declareName = function(name, bindingType, pos) {
4843
- var redeclared = !1;
4844
- if (2 === bindingType) {
4845
- var scope = this.currentScope();
4846
- redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1, scope.lexical.push(name), this.inModule && 1 & scope.flags && delete this.undefinedExports[name];
4847
- } else if (4 === bindingType) this.currentScope().lexical.push(name);
4848
- else if (3 === bindingType) {
4849
- var scope$2 = this.currentScope();
4850
- redeclared = this.treatFunctionsAsVar ? scope$2.lexical.indexOf(name) > -1 : scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1, scope$2.functions.push(name);
4851
- } else for(var i = this.scopeStack.length - 1; i >= 0; --i){
4852
- var scope$3 = this.scopeStack[i];
4853
- if (scope$3.lexical.indexOf(name) > -1 && !(32 & scope$3.flags && scope$3.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) {
4854
- redeclared = !0;
4855
- break;
4856
- }
4857
- if (scope$3.var.push(name), this.inModule && 1 & scope$3.flags && delete this.undefinedExports[name], 259 & scope$3.flags) break;
4858
- }
4859
- redeclared && this.raiseRecoverable(pos, "Identifier '" + name + "' has already been declared");
4860
- }, pp$3.checkLocalExport = function(id) {
4861
- -1 === this.scopeStack[0].lexical.indexOf(id.name) && -1 === this.scopeStack[0].var.indexOf(id.name) && (this.undefinedExports[id.name] = id);
4862
- }, pp$3.currentScope = function() {
4863
- return this.scopeStack[this.scopeStack.length - 1];
4864
- }, pp$3.currentVarScope = function() {
4865
- for(var i = this.scopeStack.length - 1;; i--){
4866
- var scope = this.scopeStack[i];
4867
- if (771 & scope.flags) return scope;
4868
- }
4869
- }, pp$3.currentThisScope = function() {
4870
- for(var i = this.scopeStack.length - 1;; i--){
4871
- var scope = this.scopeStack[i];
4872
- if (771 & scope.flags && !(16 & scope.flags)) return scope;
4873
- }
4874
- };
4875
- var acorn_Node = function(parser, pos, loc) {
4876
- this.type = "", this.start = pos, this.end = 0, parser.options.locations && (this.loc = new acorn_SourceLocation(parser, loc)), parser.options.directSourceFile && (this.sourceFile = parser.options.directSourceFile), parser.options.ranges && (this.range = [
4877
- pos,
4878
- 0
4879
- ]);
4880
- }, pp$2 = acorn_Parser.prototype;
4881
- function finishNodeAt(node, type, pos, loc) {
4882
- return node.type = type, node.end = pos, this.options.locations && (node.loc.end = loc), this.options.ranges && (node.range[1] = pos), node;
4883
- }
4884
- pp$2.startNode = function() {
4885
- return new acorn_Node(this, this.start, this.startLoc);
4886
- }, pp$2.startNodeAt = function(pos, loc) {
4887
- return new acorn_Node(this, pos, loc);
4888
- }, pp$2.finishNode = function(node, type) {
4889
- return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc);
4890
- }, pp$2.finishNodeAt = function(node, type, pos, loc) {
4891
- return finishNodeAt.call(this, node, type, pos, loc);
4892
- }, pp$2.copyNode = function(node) {
4893
- var newNode = new acorn_Node(this, node.start, this.startLoc);
4894
- for(var prop in node)newNode[prop] = node[prop];
4895
- return newNode;
4896
- };
4897
- for(var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic", ecma12BinaryProperties = ecma10BinaryProperties + " EBase EComp EMod EPres ExtPict", unicodeBinaryProperties = {
4898
- 9: ecma9BinaryProperties,
4899
- 10: ecma10BinaryProperties,
4900
- 11: ecma10BinaryProperties,
4901
- 12: ecma12BinaryProperties,
4902
- 13: ecma12BinaryProperties,
4903
- 14: ecma12BinaryProperties
4904
- }, unicodeBinaryPropertiesOfStrings = {
4905
- 9: "",
4906
- 10: "",
4907
- 11: "",
4908
- 12: "",
4909
- 13: "",
4910
- 14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"
4911
- }, unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", unicodeScriptValues = {
4912
- 9: ecma9ScriptValues,
4913
- 10: ecma10ScriptValues,
4914
- 11: ecma11ScriptValues,
4915
- 12: ecma12ScriptValues,
4916
- 13: ecma13ScriptValues,
4917
- 14: ecma13ScriptValues + " Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"
4918
- }, acorn_data = {}, acorn_i = 0, acorn_list = [
4919
- 9,
4920
- 10,
4921
- 11,
4922
- 12,
4923
- 13,
4924
- 14
4925
- ]; acorn_i < acorn_list.length; acorn_i += 1)!function(ecmaVersion) {
4926
- var d = acorn_data[ecmaVersion] = {
4927
- binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues),
4928
- binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion]),
4929
- nonBinary: {
4930
- General_Category: wordsRegexp(unicodeGeneralCategoryValues),
4931
- Script: wordsRegexp(unicodeScriptValues[ecmaVersion])
4932
- }
4933
- };
4934
- d.nonBinary.Script_Extensions = d.nonBinary.Script, d.nonBinary.gc = d.nonBinary.General_Category, d.nonBinary.sc = d.nonBinary.Script, d.nonBinary.scx = d.nonBinary.Script_Extensions;
4935
- }(acorn_list[acorn_i]);
4936
- var pp$1 = acorn_Parser.prototype, acorn_BranchID = function(parent, base) {
4937
- this.parent = parent, this.base = base || this;
4938
- };
4939
- acorn_BranchID.prototype.separatedFrom = function(alt) {
4940
- for(var self = this; self; self = self.parent)for(var other = alt; other; other = other.parent)if (self.base === other.base && self !== other) return !0;
4941
- return !1;
4942
- }, acorn_BranchID.prototype.sibling = function() {
4943
- return new acorn_BranchID(this.parent, this.base);
4944
- };
4945
- var acorn_RegExpValidationState = function(parser) {
4946
- this.parser = parser, this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = acorn_data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = Object.create(null), this.backReferenceNames = [], this.branchID = null;
4947
- };
4948
- function isSyntaxCharacter(ch) {
4949
- return 0x24 === ch || ch >= 0x28 && ch <= 0x2B || 0x2E === ch || 0x3F === ch || ch >= 0x5B && ch <= 0x5E || ch >= 0x7B && ch <= 0x7D;
4950
- }
4951
- function isControlLetter(ch) {
4952
- return ch >= 0x41 && ch <= 0x5A || ch >= 0x61 && ch <= 0x7A;
4953
- }
4954
- function isUnicodePropertyNameCharacter(ch) {
4955
- return isControlLetter(ch) || 0x5F === ch;
4956
- }
4957
- function isDecimalDigit(ch) {
4958
- return ch >= 0x30 && ch <= 0x39;
4959
- }
4960
- function isHexDigit(ch) {
4961
- return ch >= 0x30 && ch <= 0x39 || ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66;
4962
- }
4963
- function hexToInt(ch) {
4964
- return ch >= 0x41 && ch <= 0x46 ? 10 + (ch - 0x41) : ch >= 0x61 && ch <= 0x66 ? 10 + (ch - 0x61) : ch - 0x30;
4965
- }
4966
- function isOctalDigit(ch) {
4967
- return ch >= 0x30 && ch <= 0x37;
4968
- }
4969
- acorn_RegExpValidationState.prototype.reset = function(start, pattern, flags) {
4970
- var unicodeSets = -1 !== flags.indexOf("v"), unicode = -1 !== flags.indexOf("u");
4971
- this.start = 0 | start, this.source = pattern + "", this.flags = flags, unicodeSets && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = unicode && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = unicode && this.parser.options.ecmaVersion >= 9);
4972
- }, acorn_RegExpValidationState.prototype.raise = function(message) {
4973
- this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
4974
- }, acorn_RegExpValidationState.prototype.at = function(i, forceU) {
4975
- void 0 === forceU && (forceU = !1);
4976
- var s = this.source, l = s.length;
4977
- if (i >= l) return -1;
4978
- var c = s.charCodeAt(i);
4979
- if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) return c;
4980
- var next = s.charCodeAt(i + 1);
4981
- return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c;
4982
- }, acorn_RegExpValidationState.prototype.nextIndex = function(i, forceU) {
4983
- void 0 === forceU && (forceU = !1);
4984
- var s = this.source, l = s.length;
4985
- if (i >= l) return l;
4986
- var next, c = s.charCodeAt(i);
4987
- return !(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l || (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF ? i + 1 : i + 2;
4988
- }, acorn_RegExpValidationState.prototype.current = function(forceU) {
4989
- return void 0 === forceU && (forceU = !1), this.at(this.pos, forceU);
4990
- }, acorn_RegExpValidationState.prototype.lookahead = function(forceU) {
4991
- return void 0 === forceU && (forceU = !1), this.at(this.nextIndex(this.pos, forceU), forceU);
4992
- }, acorn_RegExpValidationState.prototype.advance = function(forceU) {
4993
- void 0 === forceU && (forceU = !1), this.pos = this.nextIndex(this.pos, forceU);
4994
- }, acorn_RegExpValidationState.prototype.eat = function(ch, forceU) {
4995
- return void 0 === forceU && (forceU = !1), this.current(forceU) === ch && (this.advance(forceU), !0);
4996
- }, acorn_RegExpValidationState.prototype.eatChars = function(chs, forceU) {
4997
- void 0 === forceU && (forceU = !1);
4998
- for(var pos = this.pos, i = 0; i < chs.length; i += 1){
4999
- var ch = chs[i], current = this.at(pos, forceU);
5000
- if (-1 === current || current !== ch) return !1;
5001
- pos = this.nextIndex(pos, forceU);
5002
- }
5003
- return this.pos = pos, !0;
5004
- }, pp$1.validateRegExpFlags = function(state) {
5005
- for(var validFlags = state.validFlags, flags = state.flags, u = !1, v = !1, i = 0; i < flags.length; i++){
5006
- var flag = flags.charAt(i);
5007
- -1 === validFlags.indexOf(flag) && this.raise(state.start, "Invalid regular expression flag"), flags.indexOf(flag, i + 1) > -1 && this.raise(state.start, "Duplicate regular expression flag"), "u" === flag && (u = !0), "v" === flag && (v = !0);
5008
- }
5009
- this.options.ecmaVersion >= 15 && u && v && this.raise(state.start, "Invalid regular expression flag");
5010
- }, pp$1.validateRegExpPattern = function(state) {
5011
- this.regexp_pattern(state), !state.switchN && this.options.ecmaVersion >= 9 && function(obj) {
5012
- for(var _ in obj)return !0;
5013
- return !1;
5014
- }(state.groupNames) && (state.switchN = !0, this.regexp_pattern(state));
5015
- }, pp$1.regexp_pattern = function(state) {
5016
- state.pos = 0, state.lastIntValue = 0, state.lastStringValue = "", state.lastAssertionIsQuantifiable = !1, state.numCapturingParens = 0, state.maxBackReference = 0, state.groupNames = Object.create(null), state.backReferenceNames.length = 0, state.branchID = null, this.regexp_disjunction(state), state.pos !== state.source.length && (state.eat(0x29) && state.raise("Unmatched ')'"), (state.eat(0x5D) || state.eat(0x7D)) && state.raise("Lone quantifier brackets")), state.maxBackReference > state.numCapturingParens && state.raise("Invalid escape");
5017
- for(var i = 0, list = state.backReferenceNames; i < list.length; i += 1){
5018
- var name = list[i];
5019
- state.groupNames[name] || state.raise("Invalid named capture referenced");
5020
- }
5021
- }, pp$1.regexp_disjunction = function(state) {
5022
- var trackDisjunction = this.options.ecmaVersion >= 16;
5023
- for(trackDisjunction && (state.branchID = new acorn_BranchID(state.branchID, null)), this.regexp_alternative(state); state.eat(0x7C);)trackDisjunction && (state.branchID = state.branchID.sibling()), this.regexp_alternative(state);
5024
- trackDisjunction && (state.branchID = state.branchID.parent), this.regexp_eatQuantifier(state, !0) && state.raise("Nothing to repeat"), state.eat(0x7B) && state.raise("Lone quantifier brackets");
5025
- }, pp$1.regexp_alternative = function(state) {
5026
- for(; state.pos < state.source.length && this.regexp_eatTerm(state););
5027
- }, pp$1.regexp_eatTerm = function(state) {
5028
- return this.regexp_eatAssertion(state) ? (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state) && state.switchU && state.raise("Invalid quantifier"), !0) : (state.switchU ? !!this.regexp_eatAtom(state) : !!this.regexp_eatExtendedAtom(state)) && (this.regexp_eatQuantifier(state), !0);
5029
- }, pp$1.regexp_eatAssertion = function(state) {
5030
- var start = state.pos;
5031
- if (state.lastAssertionIsQuantifiable = !1, state.eat(0x5E) || state.eat(0x24)) return !0;
5032
- if (state.eat(0x5C)) {
5033
- if (state.eat(0x42) || state.eat(0x62)) return !0;
5034
- state.pos = start;
5035
- }
5036
- if (state.eat(0x28) && state.eat(0x3F)) {
5037
- var lookbehind = !1;
5038
- if (this.options.ecmaVersion >= 9 && (lookbehind = state.eat(0x3C)), state.eat(0x3D) || state.eat(0x21)) return this.regexp_disjunction(state), state.eat(0x29) || state.raise("Unterminated group"), state.lastAssertionIsQuantifiable = !lookbehind, !0;
5039
- }
5040
- return state.pos = start, !1;
5041
- }, pp$1.regexp_eatQuantifier = function(state, noError) {
5042
- return void 0 === noError && (noError = !1), !!this.regexp_eatQuantifierPrefix(state, noError) && (state.eat(0x3F), !0);
5043
- }, pp$1.regexp_eatQuantifierPrefix = function(state, noError) {
5044
- return state.eat(0x2A) || state.eat(0x2B) || state.eat(0x3F) || this.regexp_eatBracedQuantifier(state, noError);
5045
- }, pp$1.regexp_eatBracedQuantifier = function(state, noError) {
5046
- var start = state.pos;
5047
- if (state.eat(0x7B)) {
5048
- var min = 0, max = -1;
5049
- if (this.regexp_eatDecimalDigits(state) && (min = state.lastIntValue, state.eat(0x2C) && this.regexp_eatDecimalDigits(state) && (max = state.lastIntValue), state.eat(0x7D))) return -1 !== max && max < min && !noError && state.raise("numbers out of order in {} quantifier"), !0;
5050
- state.switchU && !noError && state.raise("Incomplete quantifier"), state.pos = start;
5051
- }
5052
- return !1;
5053
- }, pp$1.regexp_eatAtom = function(state) {
5054
- return this.regexp_eatPatternCharacters(state) || state.eat(0x2E) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
5055
- }, pp$1.regexp_eatReverseSolidusAtomEscape = function(state) {
5056
- var start = state.pos;
5057
- if (state.eat(0x5C)) {
5058
- if (this.regexp_eatAtomEscape(state)) return !0;
5059
- state.pos = start;
2447
+ class WalkerBase {
2448
+ constructor(){
2449
+ this.should_skip = !1, this.should_remove = !1, this.replacement = null, this.context = {
2450
+ skip: ()=>this.should_skip = !0,
2451
+ remove: ()=>this.should_remove = !0,
2452
+ replace: (node)=>this.replacement = node
2453
+ };
5060
2454
  }
5061
- return !1;
5062
- }, pp$1.regexp_eatUncapturingGroup = function(state) {
5063
- var start = state.pos;
5064
- if (state.eat(0x28)) {
5065
- if (state.eat(0x3F)) {
5066
- if (this.options.ecmaVersion >= 16) {
5067
- var addModifiers = this.regexp_eatModifiers(state), hasHyphen = state.eat(0x2D);
5068
- if (addModifiers || hasHyphen) {
5069
- for(var i = 0; i < addModifiers.length; i++){
5070
- var modifier = addModifiers.charAt(i);
5071
- addModifiers.indexOf(modifier, i + 1) > -1 && state.raise("Duplicate regular expression modifiers");
5072
- }
5073
- if (hasHyphen) {
5074
- var removeModifiers = this.regexp_eatModifiers(state);
5075
- addModifiers || removeModifiers || 0x3A !== state.current() || state.raise("Invalid regular expression modifiers");
5076
- for(var i$1 = 0; i$1 < removeModifiers.length; i$1++){
5077
- var modifier$1 = removeModifiers.charAt(i$1);
5078
- (removeModifiers.indexOf(modifier$1, i$1 + 1) > -1 || addModifiers.indexOf(modifier$1) > -1) && state.raise("Duplicate regular expression modifiers");
5079
- }
5080
- }
2455
+ replace(parent, prop, index, node) {
2456
+ parent && prop && (null != index ? parent[prop][index] = node : parent[prop] = node);
2457
+ }
2458
+ remove(parent, prop, index) {
2459
+ parent && prop && (null != index ? parent[prop].splice(index, 1) : delete parent[prop]);
2460
+ }
2461
+ }
2462
+ class SyncWalker extends WalkerBase {
2463
+ constructor(enter, leave){
2464
+ super(), this.should_skip = !1, this.should_remove = !1, this.replacement = null, this.context = {
2465
+ skip: ()=>this.should_skip = !0,
2466
+ remove: ()=>this.should_remove = !0,
2467
+ replace: (node)=>this.replacement = node
2468
+ }, this.enter = enter, this.leave = leave;
2469
+ }
2470
+ visit(node, parent, prop, index) {
2471
+ if (node) {
2472
+ let key;
2473
+ if (this.enter) {
2474
+ let _should_skip = this.should_skip, _should_remove = this.should_remove, _replacement = this.replacement;
2475
+ this.should_skip = !1, this.should_remove = !1, this.replacement = null, this.enter.call(this.context, node, parent, prop, index), this.replacement && (node = this.replacement, this.replace(parent, prop, index, node)), this.should_remove && this.remove(parent, prop, index);
2476
+ let skipped = this.should_skip, removed = this.should_remove;
2477
+ if (this.should_skip = _should_skip, this.should_remove = _should_remove, this.replacement = _replacement, skipped) return node;
2478
+ if (removed) return null;
2479
+ }
2480
+ for(key in node){
2481
+ let value = node[key];
2482
+ if (value && 'object' == typeof value) if (Array.isArray(value)) for(let i = 0; i < value.length; i += 1){
2483
+ let item = value[i];
2484
+ isNode(item) && !this.visit(item, node, key, i) && i--;
5081
2485
  }
2486
+ else isNode(value) && this.visit(value, node, key, null);
5082
2487
  }
5083
- if (state.eat(0x3A)) {
5084
- if (this.regexp_disjunction(state), state.eat(0x29)) return !0;
5085
- state.raise("Unterminated group");
2488
+ if (this.leave) {
2489
+ let _replacement = this.replacement, _should_remove = this.should_remove;
2490
+ this.replacement = null, this.should_remove = !1, this.leave.call(this.context, node, parent, prop, index), this.replacement && (node = this.replacement, this.replace(parent, prop, index, node)), this.should_remove && this.remove(parent, prop, index);
2491
+ let removed = this.should_remove;
2492
+ if (this.replacement = _replacement, this.should_remove = _should_remove, removed) return null;
5086
2493
  }
5087
2494
  }
5088
- state.pos = start;
5089
- }
5090
- return !1;
5091
- }, pp$1.regexp_eatCapturingGroup = function(state) {
5092
- if (state.eat(0x28)) {
5093
- if (this.options.ecmaVersion >= 9 ? this.regexp_groupSpecifier(state) : 0x3F === state.current() && state.raise("Invalid group"), this.regexp_disjunction(state), state.eat(0x29)) return state.numCapturingParens += 1, !0;
5094
- state.raise("Unterminated group");
5095
- }
5096
- return !1;
5097
- }, pp$1.regexp_eatModifiers = function(state) {
5098
- for(var ch, modifiers = "", ch1 = 0; -1 !== (ch1 = state.current()) && (0x69 === (ch = ch1) || 0x6d === ch || 0x73 === ch);)modifiers += codePointToString(ch1), state.advance();
5099
- return modifiers;
5100
- }, pp$1.regexp_eatExtendedAtom = function(state) {
5101
- return state.eat(0x2E) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
5102
- }, pp$1.regexp_eatInvalidBracedQuantifier = function(state) {
5103
- return this.regexp_eatBracedQuantifier(state, !0) && state.raise("Nothing to repeat"), !1;
5104
- }, pp$1.regexp_eatSyntaxCharacter = function(state) {
5105
- var ch = state.current();
5106
- return !!isSyntaxCharacter(ch) && (state.lastIntValue = ch, state.advance(), !0);
5107
- }, pp$1.regexp_eatPatternCharacters = function(state) {
5108
- for(var start = state.pos, ch = 0; -1 !== (ch = state.current()) && !isSyntaxCharacter(ch);)state.advance();
5109
- return state.pos !== start;
5110
- }, pp$1.regexp_eatExtendedPatternCharacter = function(state) {
5111
- var ch = state.current();
5112
- return -1 !== ch && 0x24 !== ch && (!(ch >= 0x28) || !(ch <= 0x2B)) && 0x2E !== ch && 0x3F !== ch && 0x5B !== ch && 0x5E !== ch && 0x7C !== ch && (state.advance(), !0);
5113
- }, pp$1.regexp_groupSpecifier = function(state) {
5114
- if (state.eat(0x3F)) {
5115
- this.regexp_eatGroupName(state) || state.raise("Invalid group");
5116
- var trackDisjunction = this.options.ecmaVersion >= 16, known = state.groupNames[state.lastStringValue];
5117
- if (known) if (trackDisjunction) for(var i = 0; i < known.length; i += 1)known[i].separatedFrom(state.branchID) || state.raise("Duplicate capture group name");
5118
- else state.raise("Duplicate capture group name");
5119
- trackDisjunction ? (known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID) : state.groupNames[state.lastStringValue] = !0;
5120
- }
5121
- }, pp$1.regexp_eatGroupName = function(state) {
5122
- if (state.lastStringValue = "", state.eat(0x3C)) {
5123
- if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E)) return !0;
5124
- state.raise("Invalid capture group name");
5125
- }
5126
- return !1;
5127
- }, pp$1.regexp_eatRegExpIdentifierName = function(state) {
5128
- if (state.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(state)) {
5129
- for(state.lastStringValue += codePointToString(state.lastIntValue); this.regexp_eatRegExpIdentifierPart(state);)state.lastStringValue += codePointToString(state.lastIntValue);
5130
- return !0;
5131
- }
5132
- return !1;
5133
- }, pp$1.regexp_eatRegExpIdentifierStart = function(state) {
5134
- var ch, start = state.pos, forceU = this.options.ecmaVersion >= 11, ch1 = state.current(forceU);
5135
- return (state.advance(forceU), 0x5C === ch1 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU) && (ch1 = state.lastIntValue), isIdentifierStart(ch = ch1, !0) || 0x24 === ch || 0x5F === ch) ? (state.lastIntValue = ch1, !0) : (state.pos = start, !1);
5136
- }, pp$1.regexp_eatRegExpIdentifierPart = function(state) {
5137
- var ch, start = state.pos, forceU = this.options.ecmaVersion >= 11, ch1 = state.current(forceU);
5138
- return (state.advance(forceU), 0x5C === ch1 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU) && (ch1 = state.lastIntValue), isIdentifierChar(ch = ch1, !0) || 0x24 === ch || 0x5F === ch || 0x200C === ch || 0x200D === ch) ? (state.lastIntValue = ch1, !0) : (state.pos = start, !1);
5139
- }, pp$1.regexp_eatAtomEscape = function(state) {
5140
- return !!(this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) || (state.switchU && (0x63 === state.current() && state.raise("Invalid unicode escape"), state.raise("Invalid escape")), !1);
5141
- }, pp$1.regexp_eatBackReference = function(state) {
5142
- var start = state.pos;
5143
- if (this.regexp_eatDecimalEscape(state)) {
5144
- var n = state.lastIntValue;
5145
- if (state.switchU) return n > state.maxBackReference && (state.maxBackReference = n), !0;
5146
- if (n <= state.numCapturingParens) return !0;
5147
- state.pos = start;
5148
- }
5149
- return !1;
5150
- }, pp$1.regexp_eatKGroupName = function(state) {
5151
- if (state.eat(0x6B)) {
5152
- if (this.regexp_eatGroupName(state)) return state.backReferenceNames.push(state.lastStringValue), !0;
5153
- state.raise("Invalid named reference");
5154
- }
5155
- return !1;
5156
- }, pp$1.regexp_eatCharacterEscape = function(state) {
5157
- return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, !1) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
5158
- }, pp$1.regexp_eatCControlLetter = function(state) {
5159
- var start = state.pos;
5160
- if (state.eat(0x63)) {
5161
- if (this.regexp_eatControlLetter(state)) return !0;
5162
- state.pos = start;
5163
- }
5164
- return !1;
5165
- }, pp$1.regexp_eatZero = function(state) {
5166
- return !(0x30 !== state.current() || isDecimalDigit(state.lookahead())) && (state.lastIntValue = 0, state.advance(), !0);
5167
- }, pp$1.regexp_eatControlEscape = function(state) {
5168
- var ch = state.current();
5169
- return 0x74 === ch ? (state.lastIntValue = 0x09, state.advance(), !0) : 0x6E === ch ? (state.lastIntValue = 0x0A, state.advance(), !0) : 0x76 === ch ? (state.lastIntValue = 0x0B, state.advance(), !0) : 0x66 === ch ? (state.lastIntValue = 0x0C, state.advance(), !0) : 0x72 === ch && (state.lastIntValue = 0x0D, state.advance(), !0);
5170
- }, pp$1.regexp_eatControlLetter = function(state) {
5171
- var ch = state.current();
5172
- return !!isControlLetter(ch) && (state.lastIntValue = ch % 0x20, state.advance(), !0);
5173
- }, pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
5174
- void 0 === forceU && (forceU = !1);
5175
- var start = state.pos, switchU = forceU || state.switchU;
5176
- if (state.eat(0x75)) {
5177
- if (this.regexp_eatFixedHexDigits(state, 4)) {
5178
- var ch, lead = state.lastIntValue;
5179
- if (switchU && lead >= 0xD800 && lead <= 0xDBFF) {
5180
- var leadSurrogateEnd = state.pos;
5181
- if (state.eat(0x5C) && state.eat(0x75) && this.regexp_eatFixedHexDigits(state, 4)) {
5182
- var trail = state.lastIntValue;
5183
- if (trail >= 0xDC00 && trail <= 0xDFFF) return state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000, !0;
5184
- }
5185
- state.pos = leadSurrogateEnd, state.lastIntValue = lead;
5186
- }
5187
- return !0;
5188
- }
5189
- if (switchU && state.eat(0x7B) && this.regexp_eatHexDigits(state) && state.eat(0x7D) && (ch = state.lastIntValue) >= 0 && ch <= 0x10FFFF) return !0;
5190
- switchU && state.raise("Invalid unicode escape"), state.pos = start;
5191
- }
5192
- return !1;
5193
- }, pp$1.regexp_eatIdentityEscape = function(state) {
5194
- if (state.switchU) return !!this.regexp_eatSyntaxCharacter(state) || !!state.eat(0x2F) && (state.lastIntValue = 0x2F, !0);
5195
- var ch = state.current();
5196
- return 0x63 !== ch && (!state.switchN || 0x6B !== ch) && (state.lastIntValue = ch, state.advance(), !0);
5197
- }, pp$1.regexp_eatDecimalEscape = function(state) {
5198
- state.lastIntValue = 0;
5199
- var ch = state.current();
5200
- if (ch >= 0x31 && ch <= 0x39) {
5201
- do state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30), state.advance();
5202
- while ((ch = state.current()) >= 0x30 && ch <= 0x39);
5203
- return !0;
5204
- }
5205
- return !1;
5206
- }, pp$1.regexp_eatCharacterClassEscape = function(state) {
5207
- var ch, result, ch1 = state.current();
5208
- if (0x64 === (ch = ch1) || 0x44 === ch || 0x73 === ch || 0x53 === ch || 0x77 === ch || 0x57 === ch) return state.lastIntValue = -1, state.advance(), 1;
5209
- var negate = !1;
5210
- if (state.switchU && this.options.ecmaVersion >= 9 && ((negate = 0x50 === ch1) || 0x70 === ch1)) {
5211
- if (state.lastIntValue = -1, state.advance(), state.eat(0x7B) && (result = this.regexp_eatUnicodePropertyValueExpression(state)) && state.eat(0x7D)) return negate && 2 === result && state.raise("Invalid property name"), result;
5212
- state.raise("Invalid property name");
2495
+ return node;
5213
2496
  }
5214
- return 0;
5215
- }, pp$1.regexp_eatUnicodePropertyValueExpression = function(state) {
5216
- var start = state.pos;
5217
- if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D)) {
5218
- var name = state.lastStringValue;
5219
- if (this.regexp_eatUnicodePropertyValue(state)) {
5220
- var value = state.lastStringValue;
5221
- return this.regexp_validateUnicodePropertyNameAndValue(state, name, value), 1;
5222
- }
5223
- }
5224
- if (state.pos = start, this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
5225
- var nameOrValue = state.lastStringValue;
5226
- return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
5227
- }
5228
- return 0;
5229
- }, pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {
5230
- hasOwn(state.unicodeProperties.nonBinary, name) || state.raise("Invalid property name"), state.unicodeProperties.nonBinary[name].test(value) || state.raise("Invalid property value");
5231
- }, pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
5232
- return state.unicodeProperties.binary.test(nameOrValue) ? 1 : state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue) ? 2 : void state.raise("Invalid property name");
5233
- }, pp$1.regexp_eatUnicodePropertyName = function(state) {
5234
- var ch = 0;
5235
- for(state.lastStringValue = ""; isUnicodePropertyNameCharacter(ch = state.current());)state.lastStringValue += codePointToString(ch), state.advance();
5236
- return "" !== state.lastStringValue;
5237
- }, pp$1.regexp_eatUnicodePropertyValue = function(state) {
5238
- var ch, ch1 = 0;
5239
- for(state.lastStringValue = ""; isUnicodePropertyNameCharacter(ch = ch1 = state.current()) || isDecimalDigit(ch);)state.lastStringValue += codePointToString(ch1), state.advance();
5240
- return "" !== state.lastStringValue;
5241
- }, pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
5242
- return this.regexp_eatUnicodePropertyValue(state);
5243
- }, pp$1.regexp_eatCharacterClass = function(state) {
5244
- if (state.eat(0x5B)) {
5245
- var negate = state.eat(0x5E), result = this.regexp_classContents(state);
5246
- return state.eat(0x5D) || state.raise("Unterminated character class"), negate && 2 === result && state.raise("Negated character class may contain strings"), !0;
5247
- }
5248
- return !1;
5249
- }, pp$1.regexp_classContents = function(state) {
5250
- return 0x5D === state.current() ? 1 : state.switchV ? this.regexp_classSetExpression(state) : (this.regexp_nonEmptyClassRanges(state), 1);
5251
- }, pp$1.regexp_nonEmptyClassRanges = function(state) {
5252
- for(; this.regexp_eatClassAtom(state);){
5253
- var left = state.lastIntValue;
5254
- if (state.eat(0x2D) && this.regexp_eatClassAtom(state)) {
5255
- var right = state.lastIntValue;
5256
- state.switchU && (-1 === left || -1 === right) && state.raise("Invalid character class"), -1 !== left && -1 !== right && left > right && state.raise("Range out of order in character class");
5257
- }
5258
- }
5259
- }, pp$1.regexp_eatClassAtom = function(state) {
5260
- var start = state.pos;
5261
- if (state.eat(0x5C)) {
5262
- if (this.regexp_eatClassEscape(state)) return !0;
5263
- if (state.switchU) {
5264
- var ch$1 = state.current();
5265
- (0x63 === ch$1 || isOctalDigit(ch$1)) && state.raise("Invalid class escape"), state.raise("Invalid escape");
5266
- }
5267
- state.pos = start;
5268
- }
5269
- var ch = state.current();
5270
- return 0x5D !== ch && (state.lastIntValue = ch, state.advance(), !0);
5271
- }, pp$1.regexp_eatClassEscape = function(state) {
5272
- var start = state.pos;
5273
- if (state.eat(0x62)) return state.lastIntValue = 0x08, !0;
5274
- if (state.switchU && state.eat(0x2D)) return state.lastIntValue = 0x2D, !0;
5275
- if (!state.switchU && state.eat(0x63)) {
5276
- if (this.regexp_eatClassControlLetter(state)) return !0;
5277
- state.pos = start;
5278
- }
5279
- return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
5280
- }, pp$1.regexp_classSetExpression = function(state) {
5281
- var subResult, result = 1;
5282
- if (this.regexp_eatClassSetRange(state)) ;
5283
- else if (subResult = this.regexp_eatClassSetOperand(state)) {
5284
- 2 === subResult && (result = 2);
5285
- for(var start = state.pos; state.eatChars([
5286
- 0x26,
5287
- 0x26
5288
- ]);){
5289
- if (0x26 !== state.current() && (subResult = this.regexp_eatClassSetOperand(state))) {
5290
- 2 !== subResult && (result = 1);
5291
- continue;
5292
- }
5293
- state.raise("Invalid character in character class");
5294
- }
5295
- if (start !== state.pos) return result;
5296
- for(; state.eatChars([
5297
- 0x2D,
5298
- 0x2D
5299
- ]);)this.regexp_eatClassSetOperand(state) || state.raise("Invalid character in character class");
5300
- if (start !== state.pos) return result;
5301
- } else state.raise("Invalid character in character class");
5302
- for(;;)if (!this.regexp_eatClassSetRange(state)) {
5303
- if (!(subResult = this.regexp_eatClassSetOperand(state))) return result;
5304
- 2 === subResult && (result = 2);
5305
- }
5306
- }, pp$1.regexp_eatClassSetRange = function(state) {
5307
- var start = state.pos;
5308
- if (this.regexp_eatClassSetCharacter(state)) {
5309
- var left = state.lastIntValue;
5310
- if (state.eat(0x2D) && this.regexp_eatClassSetCharacter(state)) {
5311
- var right = state.lastIntValue;
5312
- return -1 !== left && -1 !== right && left > right && state.raise("Range out of order in character class"), !0;
5313
- }
5314
- state.pos = start;
5315
- }
5316
- return !1;
5317
- }, pp$1.regexp_eatClassSetOperand = function(state) {
5318
- return this.regexp_eatClassSetCharacter(state) ? 1 : this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state);
5319
- }, pp$1.regexp_eatNestedClass = function(state) {
5320
- var start = state.pos;
5321
- if (state.eat(0x5B)) {
5322
- var negate = state.eat(0x5E), result = this.regexp_classContents(state);
5323
- if (state.eat(0x5D)) return negate && 2 === result && state.raise("Negated character class may contain strings"), result;
5324
- state.pos = start;
5325
- }
5326
- if (state.eat(0x5C)) {
5327
- var result$1 = this.regexp_eatCharacterClassEscape(state);
5328
- if (result$1) return result$1;
5329
- state.pos = start;
5330
- }
5331
- return null;
5332
- }, pp$1.regexp_eatClassStringDisjunction = function(state) {
5333
- var start = state.pos;
5334
- if (state.eatChars([
5335
- 0x5C,
5336
- 0x71
5337
- ])) {
5338
- if (state.eat(0x7B)) {
5339
- var result = this.regexp_classStringDisjunctionContents(state);
5340
- if (state.eat(0x7D)) return result;
5341
- } else state.raise("Invalid escape");
5342
- state.pos = start;
5343
- }
5344
- return null;
5345
- }, pp$1.regexp_classStringDisjunctionContents = function(state) {
5346
- for(var result = this.regexp_classString(state); state.eat(0x7C);)2 === this.regexp_classString(state) && (result = 2);
5347
- return result;
5348
- }, pp$1.regexp_classString = function(state) {
5349
- for(var count = 0; this.regexp_eatClassSetCharacter(state);)count++;
5350
- return 1 === count ? 1 : 2;
5351
- }, pp$1.regexp_eatClassSetCharacter = function(state) {
5352
- var ch, ch1, start = state.pos;
5353
- if (state.eat(0x5C)) return !!(this.regexp_eatCharacterEscape(state) || this.regexp_eatClassSetReservedPunctuator(state)) || (state.eat(0x62) ? (state.lastIntValue = 0x08, !0) : (state.pos = start, !1));
5354
- var ch2 = state.current();
5355
- return !(ch2 < 0 || ch2 === state.lookahead() && (0x21 === (ch = ch2) || ch >= 0x23 && ch <= 0x26 || ch >= 0x2A && ch <= 0x2C || 0x2E === ch || ch >= 0x3A && ch <= 0x40 || 0x5E === ch || 0x60 === ch || 0x7E === ch) || 0x28 === (ch1 = ch2) || 0x29 === ch1 || 0x2D === ch1 || 0x2F === ch1 || ch1 >= 0x5B && ch1 <= 0x5D || ch1 >= 0x7B && ch1 <= 0x7D) && (state.advance(), state.lastIntValue = ch2, !0);
5356
- }, pp$1.regexp_eatClassSetReservedPunctuator = function(state) {
5357
- var ch, ch1 = state.current();
5358
- return !!(0x21 === (ch = ch1) || 0x23 === ch || 0x25 === ch || 0x26 === ch || 0x2C === ch || 0x2D === ch || ch >= 0x3A && ch <= 0x3E || 0x40 === ch || 0x60 === ch || 0x7E === ch) && (state.lastIntValue = ch1, state.advance(), !0);
5359
- }, pp$1.regexp_eatClassControlLetter = function(state) {
5360
- var ch = state.current();
5361
- return (!!isDecimalDigit(ch) || 0x5F === ch) && (state.lastIntValue = ch % 0x20, state.advance(), !0);
5362
- }, pp$1.regexp_eatHexEscapeSequence = function(state) {
5363
- var start = state.pos;
5364
- if (state.eat(0x78)) {
5365
- if (this.regexp_eatFixedHexDigits(state, 2)) return !0;
5366
- state.switchU && state.raise("Invalid escape"), state.pos = start;
5367
- }
5368
- return !1;
5369
- }, pp$1.regexp_eatDecimalDigits = function(state) {
5370
- var start = state.pos, ch = 0;
5371
- for(state.lastIntValue = 0; isDecimalDigit(ch = state.current());)state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30), state.advance();
5372
- return state.pos !== start;
5373
- }, pp$1.regexp_eatHexDigits = function(state) {
5374
- var start = state.pos, ch = 0;
5375
- for(state.lastIntValue = 0; isHexDigit(ch = state.current());)state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch), state.advance();
5376
- return state.pos !== start;
5377
- }, pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) {
5378
- if (this.regexp_eatOctalDigit(state)) {
5379
- var n1 = state.lastIntValue;
5380
- if (this.regexp_eatOctalDigit(state)) {
5381
- var n2 = state.lastIntValue;
5382
- n1 <= 3 && this.regexp_eatOctalDigit(state) ? state.lastIntValue = 64 * n1 + 8 * n2 + state.lastIntValue : state.lastIntValue = 8 * n1 + n2;
5383
- } else state.lastIntValue = n1;
5384
- return !0;
5385
- }
5386
- return !1;
5387
- }, pp$1.regexp_eatOctalDigit = function(state) {
5388
- var ch = state.current();
5389
- return isOctalDigit(ch) ? (state.lastIntValue = ch - 0x30, state.advance(), !0) : (state.lastIntValue = 0, !1);
5390
- }, pp$1.regexp_eatFixedHexDigits = function(state, length) {
5391
- var start = state.pos;
5392
- state.lastIntValue = 0;
5393
- for(var i = 0; i < length; ++i){
5394
- var ch = state.current();
5395
- if (!isHexDigit(ch)) return state.pos = start, !1;
5396
- state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch), state.advance();
5397
- }
5398
- return !0;
5399
- };
5400
- var acorn_Token = function(p) {
5401
- this.type = p.type, this.value = p.value, this.start = p.start, this.end = p.end, p.options.locations && (this.loc = new acorn_SourceLocation(p, p.startLoc, p.endLoc)), p.options.ranges && (this.range = [
5402
- p.start,
5403
- p.end
5404
- ]);
5405
- }, pp = acorn_Parser.prototype;
5406
- function stringToBigInt(str) {
5407
- return "function" != typeof BigInt ? null : BigInt(str.replace(/_/g, ""));
5408
- }
5409
- pp.next = function(ignoreEscapeSequenceInKeyword) {
5410
- !ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new acorn_Token(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
5411
- }, pp.getToken = function() {
5412
- return this.next(), new acorn_Token(this);
5413
- }, "u" > typeof Symbol && (pp[Symbol.iterator] = function() {
5414
- var this$1$1 = this;
5415
- return {
5416
- next: function() {
5417
- var token = this$1$1.getToken();
5418
- return {
5419
- done: token.type === types$1.eof,
5420
- value: token
5421
- };
5422
- }
5423
- };
5424
- }), pp.nextToken = function() {
5425
- var curContext = this.curContext();
5426
- return (curContext && curContext.preserveSpace || this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length) ? this.finishToken(types$1.eof) : curContext.override ? curContext.override(this) : void this.readToken(this.fullCharCodeAtPos());
5427
- }, pp.readToken = function(code) {
5428
- return isIdentifierStart(code, this.options.ecmaVersion >= 6) || 92 === code ? this.readWord() : this.getTokenFromCode(code);
5429
- }, pp.fullCharCodeAt = function(pos) {
5430
- var code = this.input.charCodeAt(pos);
5431
- if (code <= 0xd7ff || code >= 0xdc00) return code;
5432
- var next = this.input.charCodeAt(pos + 1);
5433
- return next <= 0xdbff || next >= 0xe000 ? code : (code << 10) + next - 0x35fdc00;
5434
- }, pp.fullCharCodeAtPos = function() {
5435
- return this.fullCharCodeAt(this.pos);
5436
- }, pp.skipBlockComment = function() {
5437
- var startLoc = this.options.onComment && this.curPosition(), start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
5438
- if (-1 === end && this.raise(this.pos - 2, "Unterminated comment"), this.pos = end + 2, this.options.locations) for(var nextBreak = void 0, pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;)++this.curLine, pos = this.lineStart = nextBreak;
5439
- this.options.onComment && this.options.onComment(!0, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition());
5440
- }, pp.skipLineComment = function(startSkip) {
5441
- for(var start = this.pos, startLoc = this.options.onComment && this.curPosition(), ch = this.input.charCodeAt(this.pos += startSkip); this.pos < this.input.length && !isNewLine(ch);)ch = this.input.charCodeAt(++this.pos);
5442
- this.options.onComment && this.options.onComment(!1, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition());
5443
- }, pp.skipSpace = function() {
5444
- loop: for(; this.pos < this.input.length;){
5445
- var ch = this.input.charCodeAt(this.pos);
5446
- switch(ch){
5447
- case 32:
5448
- case 160:
5449
- ++this.pos;
5450
- break;
5451
- case 13:
5452
- 10 === this.input.charCodeAt(this.pos + 1) && ++this.pos;
5453
- case 10:
5454
- case 8232:
5455
- case 8233:
5456
- ++this.pos, this.options.locations && (++this.curLine, this.lineStart = this.pos);
5457
- break;
5458
- case 47:
5459
- switch(this.input.charCodeAt(this.pos + 1)){
5460
- case 42:
5461
- this.skipBlockComment();
5462
- break;
5463
- case 47:
5464
- this.skipLineComment(2);
5465
- break;
5466
- default:
5467
- break loop;
5468
- }
5469
- break;
5470
- default:
5471
- if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) ++this.pos;
5472
- else break loop;
5473
- }
5474
- }
5475
- }, pp.finishToken = function(type, val) {
5476
- this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
5477
- var prevType = this.type;
5478
- this.type = type, this.value = val, this.updateContext(prevType);
5479
- }, pp.readToken_dot = function() {
5480
- var next = this.input.charCodeAt(this.pos + 1);
5481
- if (next >= 48 && next <= 57) return this.readNumber(!0);
5482
- var next2 = this.input.charCodeAt(this.pos + 2);
5483
- return this.options.ecmaVersion >= 6 && 46 === next && 46 === next2 ? (this.pos += 3, this.finishToken(types$1.ellipsis)) : (++this.pos, this.finishToken(types$1.dot));
5484
- }, pp.readToken_slash = function() {
5485
- var next = this.input.charCodeAt(this.pos + 1);
5486
- return this.exprAllowed ? (++this.pos, this.readRegexp()) : 61 === next ? this.finishOp(types$1.assign, 2) : this.finishOp(types$1.slash, 1);
5487
- }, pp.readToken_mult_modulo_exp = function(code) {
5488
- var next = this.input.charCodeAt(this.pos + 1), size = 1, tokentype = 42 === code ? types$1.star : types$1.modulo;
5489
- return (this.options.ecmaVersion >= 7 && 42 === code && 42 === next && (++size, tokentype = types$1.starstar, next = this.input.charCodeAt(this.pos + 2)), 61 === next) ? this.finishOp(types$1.assign, size + 1) : this.finishOp(tokentype, size);
5490
- }, pp.readToken_pipe_amp = function(code) {
5491
- var next = this.input.charCodeAt(this.pos + 1);
5492
- if (next === code) return this.options.ecmaVersion >= 12 && 61 === this.input.charCodeAt(this.pos + 2) ? this.finishOp(types$1.assign, 3) : this.finishOp(124 === code ? types$1.logicalOR : types$1.logicalAND, 2);
5493
- return 61 === next ? this.finishOp(types$1.assign, 2) : this.finishOp(124 === code ? types$1.bitwiseOR : types$1.bitwiseAND, 1);
5494
- }, pp.readToken_caret = function() {
5495
- return 61 === this.input.charCodeAt(this.pos + 1) ? this.finishOp(types$1.assign, 2) : this.finishOp(types$1.bitwiseXOR, 1);
5496
- }, pp.readToken_plus_min = function(code) {
5497
- var next = this.input.charCodeAt(this.pos + 1);
5498
- return next === code ? 45 === next && !this.inModule && 62 === this.input.charCodeAt(this.pos + 2) && (0 === this.lastTokEnd || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(types$1.incDec, 2) : 61 === next ? this.finishOp(types$1.assign, 2) : this.finishOp(types$1.plusMin, 1);
5499
- }, pp.readToken_lt_gt = function(code) {
5500
- var next = this.input.charCodeAt(this.pos + 1), size = 1;
5501
- return next === code ? (size = 62 === code && 62 === this.input.charCodeAt(this.pos + 2) ? 3 : 2, 61 === this.input.charCodeAt(this.pos + size)) ? this.finishOp(types$1.assign, size + 1) : this.finishOp(types$1.bitShift, size) : 33 !== next || 60 !== code || this.inModule || 45 !== this.input.charCodeAt(this.pos + 2) || 45 !== this.input.charCodeAt(this.pos + 3) ? (61 === next && (size = 2), this.finishOp(types$1.relational, size)) : (this.skipLineComment(4), this.skipSpace(), this.nextToken());
5502
- }, pp.readToken_eq_excl = function(code) {
5503
- var next = this.input.charCodeAt(this.pos + 1);
5504
- return 61 === next ? this.finishOp(types$1.equality, 61 === this.input.charCodeAt(this.pos + 2) ? 3 : 2) : 61 === code && 62 === next && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(types$1.arrow)) : this.finishOp(61 === code ? types$1.eq : types$1.prefix, 1);
5505
- }, pp.readToken_question = function() {
5506
- var ecmaVersion = this.options.ecmaVersion;
5507
- if (ecmaVersion >= 11) {
5508
- var next = this.input.charCodeAt(this.pos + 1);
5509
- if (46 === next) {
5510
- var next2 = this.input.charCodeAt(this.pos + 2);
5511
- if (next2 < 48 || next2 > 57) return this.finishOp(types$1.questionDot, 2);
5512
- }
5513
- if (63 === next) return ecmaVersion >= 12 && 61 === this.input.charCodeAt(this.pos + 2) ? this.finishOp(types$1.assign, 3) : this.finishOp(types$1.coalesce, 2);
5514
- }
5515
- return this.finishOp(types$1.question, 1);
5516
- }, pp.readToken_numberSign = function() {
5517
- var ecmaVersion = this.options.ecmaVersion, code = 35;
5518
- if (ecmaVersion >= 13 && (++this.pos, isIdentifierStart(code = this.fullCharCodeAtPos(), !0) || 92 === code)) return this.finishToken(types$1.privateId, this.readWord1());
5519
- this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
5520
- }, pp.getTokenFromCode = function(code) {
5521
- switch(code){
5522
- case 46:
5523
- return this.readToken_dot();
5524
- case 40:
5525
- return ++this.pos, this.finishToken(types$1.parenL);
5526
- case 41:
5527
- return ++this.pos, this.finishToken(types$1.parenR);
5528
- case 59:
5529
- return ++this.pos, this.finishToken(types$1.semi);
5530
- case 44:
5531
- return ++this.pos, this.finishToken(types$1.comma);
5532
- case 91:
5533
- return ++this.pos, this.finishToken(types$1.bracketL);
5534
- case 93:
5535
- return ++this.pos, this.finishToken(types$1.bracketR);
5536
- case 123:
5537
- return ++this.pos, this.finishToken(types$1.braceL);
5538
- case 125:
5539
- return ++this.pos, this.finishToken(types$1.braceR);
5540
- case 58:
5541
- return ++this.pos, this.finishToken(types$1.colon);
5542
- case 96:
5543
- if (this.options.ecmaVersion < 6) break;
5544
- return ++this.pos, this.finishToken(types$1.backQuote);
5545
- case 48:
5546
- var next = this.input.charCodeAt(this.pos + 1);
5547
- if (120 === next || 88 === next) return this.readRadixNumber(16);
5548
- if (this.options.ecmaVersion >= 6) {
5549
- if (111 === next || 79 === next) return this.readRadixNumber(8);
5550
- if (98 === next || 66 === next) return this.readRadixNumber(2);
5551
- }
5552
- case 49:
5553
- case 50:
5554
- case 51:
5555
- case 52:
5556
- case 53:
5557
- case 54:
5558
- case 55:
5559
- case 56:
5560
- case 57:
5561
- return this.readNumber(!1);
5562
- case 34:
5563
- case 39:
5564
- return this.readString(code);
5565
- case 47:
5566
- return this.readToken_slash();
5567
- case 37:
5568
- case 42:
5569
- return this.readToken_mult_modulo_exp(code);
5570
- case 124:
5571
- case 38:
5572
- return this.readToken_pipe_amp(code);
5573
- case 94:
5574
- return this.readToken_caret();
5575
- case 43:
5576
- case 45:
5577
- return this.readToken_plus_min(code);
5578
- case 60:
5579
- case 62:
5580
- return this.readToken_lt_gt(code);
5581
- case 61:
5582
- case 33:
5583
- return this.readToken_eq_excl(code);
5584
- case 63:
5585
- return this.readToken_question();
5586
- case 126:
5587
- return this.finishOp(types$1.prefix, 1);
5588
- case 35:
5589
- return this.readToken_numberSign();
5590
- }
5591
- this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
5592
- }, pp.finishOp = function(type, size) {
5593
- var str = this.input.slice(this.pos, this.pos + size);
5594
- return this.pos += size, this.finishToken(type, str);
5595
- }, pp.readRegexp = function() {
5596
- for(var escaped, inClass, start = this.pos;;){
5597
- this.pos >= this.input.length && this.raise(start, "Unterminated regular expression");
5598
- var ch = this.input.charAt(this.pos);
5599
- if (lineBreak.test(ch) && this.raise(start, "Unterminated regular expression"), escaped) escaped = !1;
5600
- else {
5601
- if ("[" === ch) inClass = !0;
5602
- else if ("]" === ch && inClass) inClass = !1;
5603
- else if ("/" === ch && !inClass) break;
5604
- escaped = "\\" === ch;
5605
- }
5606
- ++this.pos;
5607
- }
5608
- var pattern = this.input.slice(start, this.pos);
5609
- ++this.pos;
5610
- var flagsStart = this.pos, flags = this.readWord1();
5611
- this.containsEsc && this.unexpected(flagsStart);
5612
- var state = this.regexpState || (this.regexpState = new acorn_RegExpValidationState(this));
5613
- state.reset(start, pattern, flags), this.validateRegExpFlags(state), this.validateRegExpPattern(state);
5614
- var value = null;
5615
- try {
5616
- value = new RegExp(pattern, flags);
5617
- } catch (e) {}
5618
- return this.finishToken(types$1.regexp, {
5619
- pattern: pattern,
5620
- flags: flags,
5621
- value: value
5622
- });
5623
- }, pp.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
5624
- for(var allowSeparators = this.options.ecmaVersion >= 12 && void 0 === len, isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && 48 === this.input.charCodeAt(this.pos), start = this.pos, total = 0, lastCode = 0, i = 0, e = null == len ? 1 / 0 : len; i < e; ++i, ++this.pos){
5625
- var code = this.input.charCodeAt(this.pos), val = void 0;
5626
- if (allowSeparators && 95 === code) {
5627
- isLegacyOctalNumericLiteral && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), 95 === lastCode && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), 0 === i && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), lastCode = code;
5628
- continue;
5629
- }
5630
- if ((val = code >= 97 ? code - 97 + 10 : code >= 65 ? code - 65 + 10 : code >= 48 && code <= 57 ? code - 48 : 1 / 0) >= radix) break;
5631
- lastCode = code, total = total * radix + val;
5632
- }
5633
- return (allowSeparators && 95 === lastCode && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === start || null != len && this.pos - start !== len) ? null : total;
5634
- }, pp.readRadixNumber = function(radix) {
5635
- var start = this.pos;
5636
- this.pos += 2;
5637
- var val = this.readInt(radix);
5638
- return null == val && this.raise(this.start + 2, "Expected number in radix " + radix), this.options.ecmaVersion >= 11 && 110 === this.input.charCodeAt(this.pos) ? (val = stringToBigInt(this.input.slice(start, this.pos)), ++this.pos) : isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(types$1.num, val);
5639
- }, pp.readNumber = function(startsWithDot) {
5640
- var str, start = this.pos;
5641
- startsWithDot || null !== this.readInt(10, void 0, !0) || this.raise(start, "Invalid number");
5642
- var octal = this.pos - start >= 2 && 48 === this.input.charCodeAt(start);
5643
- octal && this.strict && this.raise(start, "Invalid number");
5644
- var next = this.input.charCodeAt(this.pos);
5645
- if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && 110 === next) {
5646
- var val$1 = stringToBigInt(this.input.slice(start, this.pos));
5647
- return ++this.pos, isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(types$1.num, val$1);
5648
- }
5649
- octal && /[89]/.test(this.input.slice(start, this.pos)) && (octal = !1), 46 !== next || octal || (++this.pos, this.readInt(10), next = this.input.charCodeAt(this.pos)), 69 !== next && 101 !== next || octal || ((43 === (next = this.input.charCodeAt(++this.pos)) || 45 === next) && ++this.pos, null === this.readInt(10) && this.raise(start, "Invalid number")), isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
5650
- var val = (str = this.input.slice(start, this.pos), octal ? parseInt(str, 8) : parseFloat(str.replace(/_/g, "")));
5651
- return this.finishToken(types$1.num, val);
5652
- }, pp.readCodePoint = function() {
5653
- var code;
5654
- if (123 === this.input.charCodeAt(this.pos)) {
5655
- this.options.ecmaVersion < 6 && this.unexpected();
5656
- var codePos = ++this.pos;
5657
- code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos), ++this.pos, code > 0x10FFFF && this.invalidStringToken(codePos, "Code point out of bounds");
5658
- } else code = this.readHexChar(4);
5659
- return code;
5660
- }, pp.readString = function(quote) {
5661
- for(var out = "", chunkStart = ++this.pos;;){
5662
- this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
5663
- var ch = this.input.charCodeAt(this.pos);
5664
- if (ch === quote) break;
5665
- 92 === ch ? (out += this.input.slice(chunkStart, this.pos), out += this.readEscapedChar(!1), chunkStart = this.pos) : 0x2028 === ch || 0x2029 === ch ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (isNewLine(ch) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
5666
- }
5667
- return out += this.input.slice(chunkStart, this.pos++), this.finishToken(types$1.string, out);
5668
- };
5669
- var INVALID_TEMPLATE_ESCAPE_ERROR = {};
5670
- pp.tryReadTemplateToken = function() {
5671
- this.inTemplateElement = !0;
5672
- try {
5673
- this.readTmplToken();
5674
- } catch (err) {
5675
- if (err === INVALID_TEMPLATE_ESCAPE_ERROR) this.readInvalidTemplateToken();
5676
- else throw err;
5677
- }
5678
- this.inTemplateElement = !1;
5679
- }, pp.invalidStringToken = function(position, message) {
5680
- if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw INVALID_TEMPLATE_ESCAPE_ERROR;
5681
- this.raise(position, message);
5682
- }, pp.readTmplToken = function() {
5683
- for(var out = "", chunkStart = this.pos;;){
5684
- this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
5685
- var ch = this.input.charCodeAt(this.pos);
5686
- if (96 === ch || 36 === ch && 123 === this.input.charCodeAt(this.pos + 1)) {
5687
- if (this.pos === this.start && (this.type === types$1.template || this.type === types$1.invalidTemplate)) if (36 === ch) return this.pos += 2, this.finishToken(types$1.dollarBraceL);
5688
- else return ++this.pos, this.finishToken(types$1.backQuote);
5689
- return out += this.input.slice(chunkStart, this.pos), this.finishToken(types$1.template, out);
5690
- }
5691
- if (92 === ch) out += this.input.slice(chunkStart, this.pos), out += this.readEscapedChar(!0), chunkStart = this.pos;
5692
- else if (isNewLine(ch)) {
5693
- switch(out += this.input.slice(chunkStart, this.pos), ++this.pos, ch){
5694
- case 13:
5695
- 10 === this.input.charCodeAt(this.pos) && ++this.pos;
5696
- case 10:
5697
- out += "\n";
5698
- break;
5699
- default:
5700
- out += String.fromCharCode(ch);
5701
- }
5702
- this.options.locations && (++this.curLine, this.lineStart = this.pos), chunkStart = this.pos;
5703
- } else ++this.pos;
5704
- }
5705
- }, pp.readInvalidTemplateToken = function() {
5706
- for(; this.pos < this.input.length; this.pos++)switch(this.input[this.pos]){
5707
- case "\\":
5708
- ++this.pos;
5709
- break;
5710
- case "$":
5711
- if ("{" !== this.input[this.pos + 1]) break;
5712
- case "`":
5713
- return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos));
5714
- case "\r":
5715
- "\n" === this.input[this.pos + 1] && ++this.pos;
5716
- case "\n":
5717
- case "\u2028":
5718
- case "\u2029":
5719
- ++this.curLine, this.lineStart = this.pos + 1;
5720
- }
5721
- this.raise(this.start, "Unterminated template");
5722
- }, pp.readEscapedChar = function(inTemplate) {
5723
- var ch = this.input.charCodeAt(++this.pos);
5724
- switch(++this.pos, ch){
5725
- case 110:
5726
- return "\n";
5727
- case 114:
5728
- return "\r";
5729
- case 120:
5730
- return String.fromCharCode(this.readHexChar(2));
5731
- case 117:
5732
- return codePointToString(this.readCodePoint());
5733
- case 116:
5734
- return "\t";
5735
- case 98:
5736
- return "\b";
5737
- case 118:
5738
- return "\u000b";
5739
- case 102:
5740
- return "\f";
5741
- case 13:
5742
- 10 === this.input.charCodeAt(this.pos) && ++this.pos;
5743
- case 10:
5744
- return this.options.locations && (this.lineStart = this.pos, ++this.curLine), "";
5745
- case 56:
5746
- case 57:
5747
- if (this.strict && this.invalidStringToken(this.pos - 1, "Invalid escape sequence"), inTemplate) {
5748
- var codePos = this.pos - 1;
5749
- this.invalidStringToken(codePos, "Invalid escape sequence in template string");
5750
- }
5751
- default:
5752
- if (ch >= 48 && ch <= 55) {
5753
- var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0], octal = parseInt(octalStr, 8);
5754
- return octal > 255 && (octal = parseInt(octalStr = octalStr.slice(0, -1), 8)), this.pos += octalStr.length - 1, ch = this.input.charCodeAt(this.pos), ("0" !== octalStr || 56 === ch || 57 === ch) && (this.strict || inTemplate) && this.invalidStringToken(this.pos - 1 - octalStr.length, inTemplate ? "Octal literal in template string" : "Octal literal in strict mode"), String.fromCharCode(octal);
5755
- }
5756
- if (isNewLine(ch)) return this.options.locations && (this.lineStart = this.pos, ++this.curLine), "";
5757
- return String.fromCharCode(ch);
5758
- }
5759
- }, pp.readHexChar = function(len) {
5760
- var codePos = this.pos, n = this.readInt(16, len);
5761
- return null === n && this.invalidStringToken(codePos, "Bad character escape sequence"), n;
5762
- }, pp.readWord1 = function() {
5763
- this.containsEsc = !1;
5764
- for(var word = "", first = !0, chunkStart = this.pos, astral = this.options.ecmaVersion >= 6; this.pos < this.input.length;){
5765
- var ch = this.fullCharCodeAtPos();
5766
- if (isIdentifierChar(ch, astral)) this.pos += ch <= 0xffff ? 1 : 2;
5767
- else if (92 === ch) {
5768
- this.containsEsc = !0, word += this.input.slice(chunkStart, this.pos);
5769
- var escStart = this.pos;
5770
- 117 !== this.input.charCodeAt(++this.pos) && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
5771
- var esc = this.readCodePoint();
5772
- (first ? isIdentifierStart : isIdentifierChar)(esc, astral) || this.invalidStringToken(escStart, "Invalid Unicode escape"), word += codePointToString(esc), chunkStart = this.pos;
5773
- } else break;
5774
- first = !1;
5775
- }
5776
- return word + this.input.slice(chunkStart, this.pos);
5777
- }, pp.readWord = function() {
5778
- var word = this.readWord1(), type = types$1.name;
5779
- return this.keywords.test(word) && (type = keywords[word]), this.finishToken(type, word);
5780
- };
5781
- var version = "8.18.0";
5782
- function acorn_parse(input, options) {
5783
- return acorn_Parser.parse(input, options);
5784
- }
5785
- function acorn_parseExpressionAt(input, pos, options) {
5786
- return acorn_Parser.parseExpressionAt(input, pos, options);
5787
- }
5788
- function acorn_tokenizer(input, options) {
5789
- return acorn_Parser.tokenizer(input, options);
5790
- }
5791
- acorn_Parser.acorn = {
5792
- Parser: acorn_Parser,
5793
- version: version,
5794
- defaultOptions: defaultOptions,
5795
- Position: acorn_Position,
5796
- SourceLocation: acorn_SourceLocation,
5797
- getLineInfo: getLineInfo,
5798
- Node: acorn_Node,
5799
- TokenType: acorn_TokenType,
5800
- tokTypes: types$1,
5801
- keywordTypes: keywords,
5802
- TokContext: acorn_TokContext,
5803
- tokContexts: types,
5804
- isIdentifierChar: isIdentifierChar,
5805
- isIdentifierStart: isIdentifierStart,
5806
- Token: acorn_Token,
5807
- isNewLine: isNewLine,
5808
- lineBreak: lineBreak,
5809
- lineBreakG: lineBreakG,
5810
- nonASCIIwhitespace: nonASCIIwhitespace
5811
- };
5812
- let withKeyword = "with", assertKeyword = "assert", importAttributes = (options = {
5813
- keyword: "with"
5814
- }, function(Parser) {
5815
- return function(options, Parser) {
5816
- let { tokTypes: tt, TokenType } = Parser.acorn || acorn_namespaceObject, { keyword } = options, isWithKeyword = keyword.includes(withKeyword), isAssertKeyword = keyword.includes(assertKeyword), isWithOrAssertKeyword = isWithKeyword && isAssertKeyword;
5817
- return class extends Parser {
5818
- constructor(...args){
5819
- super(...args), this.withToken = isWithKeyword && new TokenType(withKeyword), this.assertToken = isAssertKeyword && new TokenType(assertKeyword);
5820
- }
5821
- _codeAt(i) {
5822
- return this.input.charCodeAt(i);
5823
- }
5824
- _eat(t) {
5825
- this.type !== t && this.unexpected(), this.next();
5826
- }
5827
- _matchKeywordToken() {
5828
- return isWithOrAssertKeyword && (this.type === this.withToken || this.type === this.assertToken) || isWithKeyword && this.type === this.withToken || isAssertKeyword && this.type === this.assertToken;
5829
- }
5830
- _getProperty() {
5831
- return isWithOrAssertKeyword ? this.type === this.withToken ? "attributes" : "assertions" : isWithKeyword ? "attributes" : "assertions";
5832
- }
5833
- readToken(code) {
5834
- let keyword, token, i = 0;
5835
- if (isWithOrAssertKeyword) {
5836
- if (this.input.slice(this.pos, this.pos + withKeyword.length) === withKeyword) keyword = withKeyword, token = this.withToken;
5837
- else {
5838
- if (this.input.slice(this.pos, this.pos + assertKeyword.length) !== assertKeyword) return super.readToken(code);
5839
- keyword = assertKeyword, token = this.assertToken;
5840
- }
5841
- i += keyword.length;
5842
- } else for(keyword = isWithKeyword ? withKeyword : assertKeyword, token = isWithKeyword ? this.withToken : this.assertToken; i < keyword.length; i++)if (this._codeAt(this.pos + i) !== keyword.charCodeAt(i)) return super.readToken(code);
5843
- for(;; i++)if (123 === this._codeAt(this.pos + i)) break;
5844
- else if (32 === this._codeAt(this.pos + i)) continue;
5845
- else return super.readToken(code);
5846
- return "{" === this.type.label ? super.readToken(code) : (this.pos += keyword.length, this.finishToken(token));
5847
- }
5848
- parseDynamicImport(node) {
5849
- return this.next(), node.source = this.parseMaybeAssign(), this.eat(tt.comma) && (node.arguments = [
5850
- this.parseExpression()
5851
- ]), this._eat(tt.parenR), this.finishNode(node, "ImportExpression");
5852
- }
5853
- parseExport(node, exports) {
5854
- if (this.next(), this.eat(tt.star)) {
5855
- if (this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (node.exported = this.parseIdent(!0), this.checkExport(exports, node.exported.name, this.lastTokStart)) : node.exported = null), this.expectContextual("from"), this.type !== tt.string && this.unexpected(), node.source = this.parseExprAtom(), this._matchKeywordToken()) {
5856
- let property = this._getProperty();
5857
- this.next();
5858
- let attributes = this.parseImportAttributes();
5859
- attributes && (node[property] = attributes);
5860
- }
5861
- return this.semicolon(), this.finishNode(node, "ExportAllDeclaration");
5862
- }
5863
- if (this.eat(tt._default)) {
5864
- if (this.checkExport(exports, "default", this.lastTokStart), this.type === tt._function || (isAsync = this.isAsyncFunction())) {
5865
- var isAsync, fNode = this.startNode();
5866
- this.next(), isAsync && this.next(), node.declaration = this.parseFunction(fNode, 5, !1, isAsync);
5867
- } else if (this.type === tt._class) {
5868
- var cNode = this.startNode();
5869
- node.declaration = this.parseClass(cNode, "nullableID");
5870
- } else node.declaration = this.parseMaybeAssign(), this.semicolon();
5871
- return this.finishNode(node, "ExportDefaultDeclaration");
5872
- }
5873
- if (this.shouldParseExportStatement()) node.declaration = this.parseStatement(null), "VariableDeclaration" === node.declaration.type ? this.checkVariableExport(exports, node.declaration.declarations) : this.checkExport(exports, node.declaration.id.name, node.declaration.id.start), node.specifiers = [], node.source = null;
5874
- else {
5875
- if (node.declaration = null, node.specifiers = this.parseExportSpecifiers(exports), this.eatContextual("from")) {
5876
- if (this.type !== tt.string && this.unexpected(), node.source = this.parseExprAtom(), this._matchKeywordToken()) {
5877
- let property = this._getProperty();
5878
- this.next();
5879
- let attributes = this.parseImportAttributes();
5880
- attributes && (node[property] = attributes);
5881
- }
5882
- } else {
5883
- for(var i = 0, list = node.specifiers; i < list.length; i += 1){
5884
- var spec = list[i];
5885
- this.checkUnreserved(spec.local), this.checkLocalExport(spec.local);
5886
- }
5887
- node.source = null;
5888
- }
5889
- this.semicolon();
5890
- }
5891
- return this.finishNode(node, "ExportNamedDeclaration");
5892
- }
5893
- parseImport(node) {
5894
- if (this.next(), this.type === tt.string ? (node.specifiers = [], node.source = this.parseExprAtom()) : (node.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()), this._matchKeywordToken()) {
5895
- let property = this._getProperty();
5896
- this.next();
5897
- let attributes = this.parseImportAttributes();
5898
- attributes && (node[property] = attributes);
5899
- }
5900
- return this.semicolon(), this.finishNode(node, "ImportDeclaration");
5901
- }
5902
- parseImportAttributes() {
5903
- this._eat(tt.braceL);
5904
- let attrs = this.parsewithEntries();
5905
- return this._eat(tt.braceR), attrs;
5906
- }
5907
- parsewithEntries() {
5908
- let attrs = [], attrNames = new Set();
5909
- do {
5910
- let withionKeyNode;
5911
- if (this.type === tt.braceR) break;
5912
- let node = this.startNode();
5913
- withionKeyNode = this.type === tt.string ? this.parseLiteral(this.value) : this.parseIdent(!0), this.next(), node.key = withionKeyNode, attrNames.has(node.key.name) && this.raise(this.pos, "Duplicated key in attributes"), attrNames.add(node.key.name), this.type !== tt.string && this.raise(this.pos, "Only string is supported as an attribute value"), node.value = this.parseLiteral(this.value), attrs.push(this.finishNode(node, "ImportAttribute"));
5914
- }while (this.eat(tt.comma));
5915
- return attrs;
5916
- }
5917
- };
5918
- }(options, Parser);
5919
- });
5920
- function walk_simple(node, visitors, baseVisitor, state, override) {
5921
- baseVisitor || (baseVisitor = walk_base), function c(node, st, override) {
5922
- var type = override || node.type;
5923
- visitNode(baseVisitor, type, node, st, c), visitors[type] && visitors[type](node, st);
5924
- }(node, state, override);
5925
2497
  }
5926
- function ancestor(node, visitors, baseVisitor, state, override) {
5927
- var ancestors = [];
5928
- baseVisitor || (baseVisitor = walk_base), function c(node, st, override) {
5929
- var type = override || node.type, isNew = node !== ancestors[ancestors.length - 1];
5930
- isNew && ancestors.push(node), visitNode(baseVisitor, type, node, st, c), visitors[type] && visitors[type](node, st || ancestors, ancestors), isNew && ancestors.pop();
5931
- }(node, state, override);
2498
+ function isNode(value) {
2499
+ return null !== value && 'object' == typeof value && 'type' in value && 'string' == typeof value.type;
5932
2500
  }
5933
- function recursive(node, state, funcs, baseVisitor, override) {
5934
- var visitor = funcs ? make(funcs, baseVisitor || void 0) : baseVisitor;
5935
- !function c(node, st, override) {
5936
- visitor[override || node.type](node, st, c);
5937
- }(node, state, override);
5938
- }
5939
- function makeTest(test) {
5940
- return "string" == typeof test ? function(type) {
5941
- return type === test;
5942
- } : test || function() {
5943
- return !0;
5944
- };
5945
- }
5946
- var walk_Found = function(node, state) {
5947
- this.node = node, this.state = state;
5948
- };
5949
- function walk_full(node, callback, baseVisitor, state, override) {
5950
- var last;
5951
- baseVisitor || (baseVisitor = walk_base), function c(node, st, override) {
5952
- var type = override || node.type;
5953
- visitNode(baseVisitor, type, node, st, c), last !== node && (callback(node, st, type), last = node);
5954
- }(node, state, override);
5955
- }
5956
- function fullAncestor(node, callback, baseVisitor, state) {
5957
- baseVisitor || (baseVisitor = walk_base);
5958
- var last, ancestors = [];
5959
- !function c(node, st, override) {
5960
- var type = override || node.type, isNew = node !== ancestors[ancestors.length - 1];
5961
- isNew && ancestors.push(node), visitNode(baseVisitor, type, node, st, c), last !== node && (callback(node, st || ancestors, ancestors, type), last = node), isNew && ancestors.pop();
5962
- }(node, state);
5963
- }
5964
- function findNodeAt(node, start, end, test, baseVisitor, state) {
5965
- baseVisitor || (baseVisitor = walk_base), test = makeTest(test);
5966
- try {
5967
- !function c(node, st, override) {
5968
- var type = override || node.type;
5969
- if ((null == start || node.start <= start) && (null == end || node.end >= end) && visitNode(baseVisitor, type, node, st, c), (null == start || node.start === start) && (null == end || node.end === end) && test(type, node)) throw new walk_Found(node, st);
5970
- }(node, state);
5971
- } catch (e) {
5972
- if (e instanceof walk_Found) return e;
5973
- throw e;
5974
- }
5975
- }
5976
- function findNodeAround(node, pos, test, baseVisitor, state) {
5977
- test = makeTest(test), baseVisitor || (baseVisitor = walk_base);
5978
- try {
5979
- !function c(node, st, override) {
5980
- var type = override || node.type;
5981
- if (!(node.start > pos) && !(node.end < pos) && (visitNode(baseVisitor, type, node, st, c), test(type, node))) throw new walk_Found(node, st);
5982
- }(node, state);
5983
- } catch (e) {
5984
- if (e instanceof walk_Found) return e;
5985
- throw e;
5986
- }
5987
- }
5988
- function findNodeAfter(node, pos, test, baseVisitor, state) {
5989
- test = makeTest(test), baseVisitor || (baseVisitor = walk_base);
5990
- try {
5991
- !function c(node, st, override) {
5992
- if (!(node.end < pos)) {
5993
- var type = override || node.type;
5994
- if (node.start >= pos && test(type, node)) throw new walk_Found(node, st);
5995
- visitNode(baseVisitor, type, node, st, c);
5996
- }
5997
- }(node, state);
5998
- } catch (e) {
5999
- if (e instanceof walk_Found) return e;
6000
- throw e;
6001
- }
6002
- }
6003
- function findNodeBefore(node, pos, test, baseVisitor, state) {
6004
- var max;
6005
- return test = makeTest(test), baseVisitor || (baseVisitor = walk_base), !function c(node, st, override) {
6006
- if (!(node.start > pos)) {
6007
- var type = override || node.type;
6008
- node.end <= pos && (!max || max.node.end < node.end) && test(type, node) && (max = new walk_Found(node, st)), visitNode(baseVisitor, type, node, st, c);
6009
- }
6010
- }(node, state), max;
6011
- }
6012
- function make(funcs, baseVisitor) {
6013
- var visitor = Object.create(baseVisitor || walk_base);
6014
- for(var type in funcs)visitor[type] = funcs[type];
6015
- return visitor;
6016
- }
6017
- function skipThrough(node, st, c) {
6018
- c(node, st);
6019
- }
6020
- function ignore(_node, _st, _c) {}
6021
- function visitNode(baseVisitor, type, node, st, c) {
6022
- if (null == baseVisitor[type]) throw Error("No walker function defined for node type " + type);
6023
- baseVisitor[type](node, st, c);
6024
- }
6025
- var walk_base = {};
6026
2501
  function getDefaultImports(node) {
6027
2502
  return node.body.filter((statement)=>{
6028
2503
  if ('ImportDeclaration' !== statement.type) return !1;
@@ -6060,138 +2535,21 @@ function getIdentifierInExport(name, node) {
6060
2535
  }
6061
2536
  if (asserts.isExportAllDeclaration(node) && node.exported && node.exported.name === name) return node.exported;
6062
2537
  }
6063
- function canParse(code, ecmaVersion) {
6064
- try {
6065
- return acorn_parse(code, {
6066
- ecmaVersion,
6067
- sourceType: 'number' == typeof ecmaVersion && ecmaVersion <= 5 ? "script" : 'module'
6068
- }), !0;
6069
- } catch {
6070
- return !1;
6071
- }
6072
- }
6073
- function isES5(code) {
6074
- return canParse(code, 5);
6075
- }
6076
- function isES6(code) {
6077
- return canParse(code, 6);
6078
- }
6079
- function detectECMAVersion(code) {
6080
- return isES6(code) ? isES5(code) ? "ES5" : "ES6" : "ES7+";
6081
- }
6082
- walk_base.Program = walk_base.BlockStatement = walk_base.StaticBlock = function(node, st, c) {
6083
- for(var i = 0, list = node.body; i < list.length; i += 1)c(list[i], st, "Statement");
6084
- }, walk_base.Statement = skipThrough, walk_base.EmptyStatement = ignore, walk_base.ExpressionStatement = walk_base.ParenthesizedExpression = walk_base.ChainExpression = function(node, st, c) {
6085
- return c(node.expression, st, "Expression");
6086
- }, walk_base.IfStatement = function(node, st, c) {
6087
- c(node.test, st, "Expression"), c(node.consequent, st, "Statement"), node.alternate && c(node.alternate, st, "Statement");
6088
- }, walk_base.LabeledStatement = function(node, st, c) {
6089
- return c(node.body, st, "Statement");
6090
- }, walk_base.BreakStatement = walk_base.ContinueStatement = ignore, walk_base.WithStatement = function(node, st, c) {
6091
- c(node.object, st, "Expression"), c(node.body, st, "Statement");
6092
- }, walk_base.SwitchStatement = function(node, st, c) {
6093
- c(node.discriminant, st, "Expression");
6094
- for(var i = 0, list = node.cases; i < list.length; i += 1)c(list[i], st);
6095
- }, walk_base.SwitchCase = function(node, st, c) {
6096
- node.test && c(node.test, st, "Expression");
6097
- for(var i = 0, list = node.consequent; i < list.length; i += 1)c(list[i], st, "Statement");
6098
- }, walk_base.ReturnStatement = walk_base.YieldExpression = walk_base.AwaitExpression = function(node, st, c) {
6099
- node.argument && c(node.argument, st, "Expression");
6100
- }, walk_base.ThrowStatement = walk_base.SpreadElement = function(node, st, c) {
6101
- return c(node.argument, st, "Expression");
6102
- }, walk_base.TryStatement = function(node, st, c) {
6103
- c(node.block, st, "Statement"), node.handler && c(node.handler, st), node.finalizer && c(node.finalizer, st, "Statement");
6104
- }, walk_base.CatchClause = function(node, st, c) {
6105
- node.param && c(node.param, st, "Pattern"), c(node.body, st, "Statement");
6106
- }, walk_base.WhileStatement = walk_base.DoWhileStatement = function(node, st, c) {
6107
- c(node.test, st, "Expression"), c(node.body, st, "Statement");
6108
- }, walk_base.ForStatement = function(node, st, c) {
6109
- node.init && c(node.init, st, "ForInit"), node.test && c(node.test, st, "Expression"), node.update && c(node.update, st, "Expression"), c(node.body, st, "Statement");
6110
- }, walk_base.ForInStatement = walk_base.ForOfStatement = function(node, st, c) {
6111
- c(node.left, st, "ForInit"), c(node.right, st, "Expression"), c(node.body, st, "Statement");
6112
- }, walk_base.ForInit = function(node, st, c) {
6113
- "VariableDeclaration" === node.type ? c(node, st) : c(node, st, "Expression");
6114
- }, walk_base.DebuggerStatement = ignore, walk_base.FunctionDeclaration = function(node, st, c) {
6115
- return c(node, st, "Function");
6116
- }, walk_base.VariableDeclaration = function(node, st, c) {
6117
- for(var i = 0, list = node.declarations; i < list.length; i += 1)c(list[i], st);
6118
- }, walk_base.VariableDeclarator = function(node, st, c) {
6119
- c(node.id, st, "Pattern"), node.init && c(node.init, st, "Expression");
6120
- }, walk_base.Function = function(node, st, c) {
6121
- node.id && c(node.id, st, "Pattern");
6122
- for(var i = 0, list = node.params; i < list.length; i += 1)c(list[i], st, "Pattern");
6123
- c(node.body, st, node.expression ? "Expression" : "Statement");
6124
- }, walk_base.Pattern = function(node, st, c) {
6125
- "Identifier" === node.type ? c(node, st, "VariablePattern") : "MemberExpression" === node.type ? c(node, st, "MemberPattern") : c(node, st);
6126
- }, walk_base.VariablePattern = ignore, walk_base.MemberPattern = skipThrough, walk_base.RestElement = function(node, st, c) {
6127
- return c(node.argument, st, "Pattern");
6128
- }, walk_base.ArrayPattern = function(node, st, c) {
6129
- for(var i = 0, list = node.elements; i < list.length; i += 1){
6130
- var elt = list[i];
6131
- elt && c(elt, st, "Pattern");
6132
- }
6133
- }, walk_base.ObjectPattern = function(node, st, c) {
6134
- for(var i = 0, list = node.properties; i < list.length; i += 1){
6135
- var prop = list[i];
6136
- "Property" === prop.type ? (prop.computed && c(prop.key, st, "Expression"), c(prop.value, st, "Pattern")) : "RestElement" === prop.type && c(prop.argument, st, "Pattern");
6137
- }
6138
- }, walk_base.Expression = skipThrough, walk_base.ThisExpression = walk_base.Super = walk_base.MetaProperty = ignore, walk_base.ArrayExpression = function(node, st, c) {
6139
- for(var i = 0, list = node.elements; i < list.length; i += 1){
6140
- var elt = list[i];
6141
- elt && c(elt, st, "Expression");
6142
- }
6143
- }, walk_base.ObjectExpression = function(node, st, c) {
6144
- for(var i = 0, list = node.properties; i < list.length; i += 1)c(list[i], st);
6145
- }, walk_base.FunctionExpression = walk_base.ArrowFunctionExpression = walk_base.FunctionDeclaration, walk_base.SequenceExpression = function(node, st, c) {
6146
- for(var i = 0, list = node.expressions; i < list.length; i += 1)c(list[i], st, "Expression");
6147
- }, walk_base.TemplateLiteral = function(node, st, c) {
6148
- for(var i = 0, list = node.quasis; i < list.length; i += 1)c(list[i], st);
6149
- for(var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1)c(list$1[i$1], st, "Expression");
6150
- }, walk_base.TemplateElement = ignore, walk_base.UnaryExpression = walk_base.UpdateExpression = function(node, st, c) {
6151
- c(node.argument, st, "Expression");
6152
- }, walk_base.BinaryExpression = walk_base.LogicalExpression = function(node, st, c) {
6153
- c(node.left, st, "Expression"), c(node.right, st, "Expression");
6154
- }, walk_base.AssignmentExpression = walk_base.AssignmentPattern = function(node, st, c) {
6155
- c(node.left, st, "Pattern"), c(node.right, st, "Expression");
6156
- }, walk_base.ConditionalExpression = function(node, st, c) {
6157
- c(node.test, st, "Expression"), c(node.consequent, st, "Expression"), c(node.alternate, st, "Expression");
6158
- }, walk_base.NewExpression = walk_base.CallExpression = function(node, st, c) {
6159
- if (c(node.callee, st, "Expression"), node.arguments) for(var i = 0, list = node.arguments; i < list.length; i += 1)c(list[i], st, "Expression");
6160
- }, walk_base.MemberExpression = function(node, st, c) {
6161
- c(node.object, st, "Expression"), node.computed && c(node.property, st, "Expression");
6162
- }, walk_base.ExportNamedDeclaration = walk_base.ExportDefaultDeclaration = function(node, st, c) {
6163
- if (node.declaration && c(node.declaration, st, "ExportNamedDeclaration" === node.type || node.declaration.id ? "Statement" : "Expression"), node.source && c(node.source, st, "Expression"), node.attributes) for(var i = 0, list = node.attributes; i < list.length; i += 1)c(list[i], st);
6164
- }, walk_base.ExportAllDeclaration = function(node, st, c) {
6165
- if (node.exported && c(node.exported, st), c(node.source, st, "Expression"), node.attributes) for(var i = 0, list = node.attributes; i < list.length; i += 1)c(list[i], st);
6166
- }, walk_base.ImportAttribute = function(node, st, c) {
6167
- c(node.value, st, "Expression");
6168
- }, walk_base.ImportDeclaration = function(node, st, c) {
6169
- for(var i = 0, list = node.specifiers; i < list.length; i += 1)c(list[i], st);
6170
- if (c(node.source, st, "Expression"), node.attributes) for(var i$1 = 0, list$1 = node.attributes; i$1 < list$1.length; i$1 += 1)c(list$1[i$1], st);
6171
- }, walk_base.ImportExpression = function(node, st, c) {
6172
- c(node.source, st, "Expression"), node.options && c(node.options, st, "Expression");
6173
- }, walk_base.ImportSpecifier = walk_base.ImportDefaultSpecifier = walk_base.ImportNamespaceSpecifier = walk_base.Identifier = walk_base.PrivateIdentifier = walk_base.Literal = ignore, walk_base.TaggedTemplateExpression = function(node, st, c) {
6174
- c(node.tag, st, "Expression"), c(node.quasi, st, "Expression");
6175
- }, walk_base.ClassDeclaration = walk_base.ClassExpression = function(node, st, c) {
6176
- return c(node, st, "Class");
6177
- }, walk_base.Class = function(node, st, c) {
6178
- node.id && c(node.id, st, "Pattern"), node.superClass && c(node.superClass, st, "Expression"), c(node.body, st);
6179
- }, walk_base.ClassBody = function(node, st, c) {
6180
- for(var i = 0, list = node.body; i < list.length; i += 1)c(list[i], st);
6181
- }, walk_base.MethodDefinition = walk_base.PropertyDefinition = walk_base.Property = function(node, st, c) {
6182
- node.computed && c(node.key, st, "Expression"), node.value && c(node.value, st, "Expression");
6183
- };
6184
- let acornParserInternal = acorn_Parser.extend(importAttributes), acornParserExport = acorn_Parser.extend(importAttributes), parser_parser = {
2538
+ let parser = {
6185
2539
  walk: walk_namespaceObject,
6186
- parse: (input, options)=>acornParserExport.parse(input, options),
6187
- parseExpressionAt: (input, pos, options)=>acornParserExport.parseExpressionAt(input, pos, options),
6188
- extend: (...args)=>acornParserExport = acornParserExport.extend(...args),
2540
+ parse: function(input, options = {}) {
2541
+ let result = parseSync(input, {
2542
+ sourceType: options.sourceType ?? "script",
2543
+ lang: 'js',
2544
+ preserveParens: !1,
2545
+ comments: 'none',
2546
+ semanticErrors: !0
2547
+ }), diagnostic = result.diagnostics.find((item)=>'error' === item.severity);
2548
+ if (diagnostic) throw SyntaxError(diagnostic.message);
2549
+ return result.program;
2550
+ },
6189
2551
  asserts: asserts,
6190
- utils: utils_namespaceObject,
6191
- internal: {
6192
- parse: (input, options)=>acornParserInternal.parse(input, options),
6193
- parseExpressionAt: (input, pos, options)=>acornParserInternal.parseExpressionAt(input, pos, options)
6194
- }
2552
+ utils: utils_namespaceObject
6195
2553
  }, parseBundle = (bundlePath, modulesData)=>{
6196
2554
  let modules;
6197
2555
  if (bundlePath.indexOf('.worker.') > 0) return {};
@@ -6232,14 +2590,13 @@ let acornParserInternal = acorn_Parser.extend(importAttributes), acornParserExpo
6232
2590
  let loc = tagCache.get(bundlePath);
6233
2591
  content = content.slice(loc.start, loc.end), hasBannerPlugin = !0;
6234
2592
  }
6235
- let ast = parser_parser.internal.parse(content, {
6236
- sourceType: "script",
6237
- ecmaVersion: 'latest'
2593
+ let ast = parser.parse(content, {
2594
+ sourceType: "script"
6238
2595
  }), walkState = {
6239
2596
  locations: null,
6240
2597
  expressionStatementDepth: 0
6241
2598
  };
6242
- parser_parser.walk.recursive(ast, walkState, {
2599
+ parser.walk.recursive(ast, walkState, {
6243
2600
  ExpressionStatement (node, state, c) {
6244
2601
  if (!state.locations) {
6245
2602
  state.expressionStatementDepth++;
@@ -6404,4 +2761,4 @@ export default function(...args) {
6404
2761
  };
6405
2762
  sdk?.reportLoaderStartOrEnd(loaderData), this.callback(null, ...args);
6406
2763
  };
6407
- export { acorn_parse, addProbeLoader2Rules, color, createLoaderContextTrap, extractLoaderName, filesize, getDocument, getLoaderNameMatch, getSDK, interceptCompilationHooks, interceptCompilerHooks, isESMLoader, loadLoaderModule, logger_time, mapEachRules, parseBundle, parseQuery, parser_parser, registerSDK, rsdoctorLogger as logger, setSDK, stringify, timeEnd };
2764
+ export { addProbeLoader2Rules, color, createLoaderContextTrap, extractLoaderName, filesize, getDocument, getLoaderNameMatch, getSDK, interceptCompilationHooks, interceptCompilerHooks, isESMLoader, loadLoaderModule, logger_time, mapEachRules, parseBundle, parseQuery, parser, registerSDK, rsdoctorLogger as logger, setSDK, stringify, timeEnd };