TestArgumentDefaultValueScopeNoBundle
---------- /out.js ----------
export function a(o = foo) {
  var r;
  return o;
}
export class b {
  fn(r = foo) {
    var f;
    return r;
  }
}
export let c = [
  function(o = foo) {
    var r;
    return o;
  },
  (o = foo) => {
    var r;
    return o;
  },
  { fn(o = foo) {
    var r;
    return o;
  } },
  class {
    fn(o = foo) {
      var r;
      return o;
    }
  }
];

================================================================================
TestArgumentsSpecialCaseNoBundle
---------- /out.js ----------
(() => {
  var r;
  function t(n = arguments) {
    return arguments;
  }
  (function(n = arguments) {
    return arguments;
  });
  ({ foo(n = arguments) {
    return arguments;
  } });
  class u {
    foo(e = arguments) {
      return arguments;
    }
  }
  (class {
    foo(n = arguments) {
      return arguments;
    }
  });
  function t(n = arguments) {
    var arguments;
    return arguments;
  }
  (function(n = arguments) {
    var arguments;
    return arguments;
  });
  ({ foo(n = arguments) {
    var arguments;
    return arguments;
  } });
  (n) => r;
  () => r;
  async () => r;
  (n = r) => r;
  async (n = r) => r;
  (n) => r;
  () => r;
  async () => r;
  (n = r) => r;
  async (n = r) => r;
  (n) => {
    return r;
  };
  () => {
    return r;
  };
  async () => {
    return r;
  };
  (n = r) => {
    return r;
  };
  async (n = r) => {
    return r;
  };
  (n) => {
    return r;
  };
  () => {
    return r;
  };
  async () => {
    return r;
  };
  (n = r) => {
    return r;
  };
  async (n = r) => {
    return r;
  };
})();

================================================================================
TestArrowFnScope
---------- /out.js ----------
// entry.js
tests = {
  0: (s = (e) => s + e, t) => s + t,
  1: (s, t = (e) => t + e) => t + s,
  2: (s = (a = (c) => s + a + c, b) => s + a + b, t, e) => s + t + e,
  3: (s, t, e = (a, b = (c) => e + b + c) => e + b + a) => e + s + t,
  4: (x = (s) => x + s, y, x + y),
  5: (y, x = (s) => x + s, x + y),
  6: (x = (s = (e) => x + s + e, t) => x + s + t, y, z, x + y + z),
  7: (y, z, x = (s, t = (e) => x + t + e) => x + t + s, x + y + z)
};

================================================================================
TestAutoExternal
---------- /out/entry.js ----------
// entry.js
import "http://example.com/code.js";
import "https://example.com/code.js";
import "//example.com/code.js";
import "data:application/javascript;base64,ZXhwb3J0IGRlZmF1bHQgMTIz";

================================================================================
TestAutoExternalNode
---------- /out/entry.js ----------
// entry.js
import fs from "node:fs/promises";
import "node:what-is-this";
fs.readFile();

================================================================================
TestAvoidTDZ
---------- /out.js ----------
// entry.js
var _Foo = class {
};
var Foo = _Foo;
__publicField(Foo, "foo", new _Foo());
var foo = Foo.foo;
console.log(foo);
var Bar = class {
};
var bar = 123;
export {
  Bar,
  bar
};

================================================================================
TestAvoidTDZNoBundle
---------- /out.js ----------
class Foo {
  static foo = new Foo();
}
let foo = Foo.foo;
console.log(foo);
export class Bar {
}
export let bar = 123;

================================================================================
TestAwaitImportInsideTry
---------- /out.js ----------
// entry.js
async function main(name) {
  try {
    return await import(name);
  } catch {
  }
}
main("fs");

================================================================================
TestBuiltInNodeModulePrecedence
---------- /out/entry.js ----------
// node_modules/fs/abc.js
var require_abc = __commonJS({
  "node_modules/fs/abc.js"() {
    console.log("include this");
  }
});

// node_modules/fs/index.js
var require_fs = __commonJS({
  "node_modules/fs/index.js"() {
    console.log("include this too");
  }
});

// entry.js
console.log([
  require("fs"),
  require("fs/promises"),
  require("node:foo"),
  require_abc(),
  require_fs()
]);

================================================================================
TestCallImportNamespaceWarning
---------- /out/js.js ----------
import * as a from "a";
import { b } from "b";
import c from "c";
a();
b();
c();
new a();
new b();
new c();

---------- /out/ts.js ----------
import * as a from "a";
import { b } from "b";
import c from "c";
a();
b();
c();
new a();
new b();
new c();

---------- /out/jsx-components.js ----------
import * as A from "a";
import { B } from "b";
import C from "c";
/* @__PURE__ */ React.createElement(A, null);
/* @__PURE__ */ React.createElement(B, null);
/* @__PURE__ */ React.createElement(C, null);

---------- /out/jsx-a.js ----------
import * as a from "a";
/* @__PURE__ */ a("div", null);

---------- /out/jsx-b.js ----------
import { b } from "b";
/* @__PURE__ */ b("div", null);

---------- /out/jsx-c.js ----------
import c from "c";
/* @__PURE__ */ c("div", null);

================================================================================
TestCharFreqIgnoreComments
---------- /out/a.js ----------
// a.js
function u(e, t, n, r) {
  return "the argument names must be the same";
}
export {
  u as default
};

---------- /out/b.js ----------
// b.js
function u(e, t, n, r) {
  return "the argument names must be the same";
}
export {
  u as default
};

================================================================================
TestCommonJSFromES6
---------- /out.js ----------
// foo.js
var foo_exports = {};
__export(foo_exports, {
  foo: () => foo
});
function foo() {
  return "foo";
}
var init_foo = __esm({
  "foo.js"() {
  }
});

// bar.js
var bar_exports = {};
__export(bar_exports, {
  bar: () => bar
});
function bar() {
  return "bar";
}
var init_bar = __esm({
  "bar.js"() {
  }
});

// entry.js
var { foo: foo2 } = (init_foo(), __toCommonJS(foo_exports));
console.log(foo2(), bar2());
var { bar: bar2 } = (init_bar(), __toCommonJS(bar_exports));

================================================================================
TestConditionalImport
---------- /out/a.js ----------
// import.js
var require_import = __commonJS({
  "import.js"(exports) {
    exports.foo = 213;
  }
});

// a.js
x ? import("a") : y ? Promise.resolve().then(() => __toESM(require_import())) : import("c");

---------- /out/b.js ----------
// import.js
var require_import = __commonJS({
  "import.js"(exports) {
    exports.foo = 213;
  }
});

// b.js
x ? y ? import("a") : Promise.resolve().then(() => __toESM(require_import())) : import(c);

================================================================================
TestConditionalRequire
---------- /out.js ----------
// b.js
var require_b = __commonJS({
  "b.js"(exports) {
    exports.foo = 213;
  }
});

// a.js
x ? __require("a") : y ? require_b() : __require("c");
x ? y ? __require("a") : require_b() : __require(c);

================================================================================
TestConditionalRequireResolve
---------- /out.js ----------
// a.js
x ? require.resolve("a") : y ? require.resolve("b") : require.resolve("c");
x ? y ? require.resolve("a") : require.resolve("b") : require.resolve(c);

================================================================================
TestConstWithLet
---------- /out.js ----------
// entry.js
console.log(1);
console.log(2);
unknownFn(3);
for (let c = x; ; )
  console.log(c);
for (let d in x)
  console.log(d);
for (let e of x)
  console.log(e);

================================================================================
TestConstWithLetNoBundle
---------- /out.js ----------
const a = 1;
console.log(1), console.log(2), unknownFn(3);
for (const c = x; ; )
  console.log(c);
for (const d in x)
  console.log(d);
for (const e of x)
  console.log(e);

================================================================================
TestConstWithLetNoMangle
---------- /out.js ----------
// entry.js
var a = 1;
console.log(a);
if (true) {
  const b = 2;
  console.log(b);
}
for (const c = x; ; )
  console.log(c);
for (const d in x)
  console.log(d);
for (const e of x)
  console.log(e);

================================================================================
TestDefineImportMeta
---------- /out.js ----------
// entry.js
console.log(
  1,
  2,
  3,
  2 .baz,
  1 .bar
);

================================================================================
TestDefineImportMetaES5
---------- /out/replaced.js ----------
// replaced.js
console.log(1);

---------- /out/kept.js ----------
// kept.js
var import_meta = {};
console.log(import_meta.y);

---------- /out/dead-code.js ----------

================================================================================
TestDefineInfiniteLoopIssue2407
---------- /out.js ----------
// entry.js
b.c();
y();

================================================================================
TestDefineOptionalChain
---------- /out.js ----------
// entry.js
console.log([
  1,
  1,
  1
], [
  1,
  1,
  1
], [
  a[b][c],
  a?.[b][c],
  a[b]?.[c]
]);

================================================================================
TestDefineOptionalChainLowered
---------- /out.js ----------
// entry.js
var _a;
console.log([
  1,
  1,
  1
], [
  1,
  1,
  1
], [
  a[b][c],
  a == null ? void 0 : a[b][c],
  (_a = a[b]) == null ? void 0 : _a[c]
]);

================================================================================
TestDefineThis
---------- /out.js ----------
// entry.js
ok(
  1,
  2,
  3,
  2 .baz,
  1 .bar
);
(() => {
  ok(
    1,
    2,
    3,
    2 .baz,
    1 .bar
  );
})();
(function() {
  doNotSubstitute(
    this,
    this.foo,
    this.foo.bar,
    this.foo.baz,
    this.bar
  );
})();

================================================================================
TestDirectEvalTaintingNoBundle
---------- /out.js ----------
function test1() {
  function add(n, t) {
    return n + t;
  }
  eval("add(1, 2)");
}
function test2() {
  function n(t, e) {
    return t + e;
  }
  (0, eval)("add(1, 2)");
}
function test3() {
  function n(t, e) {
    return t + e;
  }
}
function test4(eval) {
  function add(n, t) {
    return n + t;
  }
  eval("add(1, 2)");
}
function test5() {
  function containsDirectEval() {
    eval();
  }
  if (true) {
    var shouldNotBeRenamed;
  }
}

================================================================================
TestDotImport
---------- /out.js ----------
// index.js
var require_index = __commonJS({
  "index.js"(exports) {
    exports.x = 123;
  }
});

// entry.js
var import__ = __toESM(require_index());
console.log(import__.x);

================================================================================
TestDuplicateEntryPoint
---------- /out.js/entry.js ----------
// entry.js
console.log(123);

================================================================================
TestDuplicatePropertyWarning
---------- /out/entry.js ----------
// outside-node-modules/index.jsx
console.log({ a: 1, a: 2 }, /* @__PURE__ */ React.createElement("div", { a2: true, a2: 3 }));

// node_modules/inside-node-modules/index.jsx
console.log({ c: 1, c: 2 }, /* @__PURE__ */ React.createElement("div", { c2: true, c2: 3 }));

================================================================================
TestDynamicImportWithExpressionCJS
---------- /out.js ----------
import("foo");
import(foo());

================================================================================
TestDynamicImportWithTemplateIIFE
---------- /out.js ----------
(() => {
  // b.js
  var require_b = __commonJS({
    "b.js"(exports) {
      exports.x = 123;
    }
  });

  // a.js
  Promise.resolve().then(() => __toESM(require_b())).then((ns) => console.log(ns));
  Promise.resolve().then(() => __toESM(require_b())).then((ns) => console.log(ns));
})();

================================================================================
TestES6FromCommonJS
---------- /out.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"(exports) {
    exports.foo = function() {
      return "foo";
    };
  }
});

// bar.js
var require_bar = __commonJS({
  "bar.js"(exports) {
    exports.bar = function() {
      return "bar";
    };
  }
});

// entry.js
var import_foo = __toESM(require_foo());
var import_bar = __toESM(require_bar());
console.log((0, import_foo.foo)(), (0, import_bar.bar)());

================================================================================
TestEmptyExportClauseBundleAsCommonJSIssue910
---------- /out.js ----------
// types.mjs
var types_exports = {};
var init_types = __esm({
  "types.mjs"() {
  }
});

// entry.js
console.log((init_types(), __toCommonJS(types_exports)));

================================================================================
TestEntryNamesNoSlashAfterDir
---------- /out/app1-main.js ----------
console.log(1);

---------- /out/app2-main.js ----------
console.log(2);

---------- /out/-customPath.js ----------
console.log(3);

================================================================================
TestEntryNamesNonPortableCharacter
---------- /out/entry1-_.js ----------
console.log(1);

---------- /out/entry2-*.js ----------
console.log(2);

================================================================================
TestExportChain
---------- /out.js ----------
// bar.js
var c = 123;
export {
  c as a
};

================================================================================
TestExportFSNode
---------- /out.js ----------
// entry.js
import * as fs from "fs";
import { readFileSync } from "fs";
export {
  fs,
  readFileSync
};

================================================================================
TestExportFSNodeInCommonJSModule
---------- /out.js ----------
// entry.js
import * as fs from "fs";
import { readFileSync } from "fs";
var require_entry = __commonJS({
  "entry.js"(exports) {
    exports.fs = fs;
    exports.readFileSync = readFileSync;
    exports.foo = 123;
  }
});
export default require_entry();

================================================================================
TestExportFormsCommonJS
---------- /out.js ----------
// a.js
var abc;
var init_a = __esm({
  "a.js"() {
    abc = void 0;
  }
});

// b.js
var b_exports = {};
__export(b_exports, {
  xyz: () => xyz
});
var xyz;
var init_b = __esm({
  "b.js"() {
    xyz = null;
  }
});

// commonjs.js
var commonjs_exports = {};
__export(commonjs_exports, {
  C: () => Class,
  Class: () => Class,
  Fn: () => Fn,
  abc: () => abc,
  b: () => b_exports,
  c: () => c,
  default: () => commonjs_default,
  l: () => l,
  v: () => v
});
function Fn() {
}
var commonjs_default, v, l, c, Class;
var init_commonjs = __esm({
  "commonjs.js"() {
    init_a();
    init_b();
    commonjs_default = 123;
    v = 234;
    l = 234;
    c = 234;
    Class = class {
    };
  }
});

// c.js
var c_exports = {};
__export(c_exports, {
  default: () => c_default
});
var c_default;
var init_c = __esm({
  "c.js"() {
    c_default = class {
    };
  }
});

// d.js
var d_exports = {};
__export(d_exports, {
  default: () => Foo
});
var Foo;
var init_d = __esm({
  "d.js"() {
    Foo = class {
    };
    Foo.prop = 123;
  }
});

// e.js
var e_exports = {};
__export(e_exports, {
  default: () => e_default
});
function e_default() {
}
var init_e = __esm({
  "e.js"() {
  }
});

// f.js
var f_exports = {};
__export(f_exports, {
  default: () => foo
});
function foo() {
}
var init_f = __esm({
  "f.js"() {
    foo.prop = 123;
  }
});

// g.js
var g_exports = {};
__export(g_exports, {
  default: () => g_default
});
async function g_default() {
}
var init_g = __esm({
  "g.js"() {
  }
});

// h.js
var h_exports = {};
__export(h_exports, {
  default: () => foo2
});
async function foo2() {
}
var init_h = __esm({
  "h.js"() {
    foo2.prop = 123;
  }
});

// entry.js
init_commonjs();
init_c();
init_d();
init_e();
init_f();
init_g();
init_h();

================================================================================
TestExportFormsES6
---------- /out.js ----------
// a.js
var abc = void 0;

// b.js
var b_exports = {};
__export(b_exports, {
  xyz: () => xyz
});
var xyz = null;

// entry.js
var entry_default = 123;
var v = 234;
var l = 234;
var c = 234;
function Fn() {
}
var Class = class {
};
export {
  Class as C,
  Class,
  Fn,
  abc,
  b_exports as b,
  c,
  entry_default as default,
  l,
  v
};

================================================================================
TestExportFormsIIFE
---------- /out.js ----------
var globalName = (() => {
  // entry.js
  var entry_exports = {};
  __export(entry_exports, {
    C: () => Class,
    Class: () => Class,
    Fn: () => Fn,
    abc: () => abc,
    b: () => b_exports,
    c: () => c,
    default: () => entry_default,
    l: () => l,
    v: () => v
  });

  // a.js
  var abc = void 0;

  // b.js
  var b_exports = {};
  __export(b_exports, {
    xyz: () => xyz
  });
  var xyz = null;

  // entry.js
  var entry_default = 123;
  var v = 234;
  var l = 234;
  var c = 234;
  function Fn() {
  }
  var Class = class {
  };
  return __toCommonJS(entry_exports);
})();

================================================================================
TestExportFormsWithMinifyIdentifiersAndNoBundle
---------- /out/a.js ----------
export default 123;
export var varName = 234;
export let letName = 234;
export const constName = 234;
function s() {
}
class t {
}
export { Class as Cls, s as Fn2, t as Cls2 };
export function Func() {
}
export class Class {
}
export * from "./a";
export * as fromB from "./b";

---------- /out/b.js ----------
export default function() {
}

---------- /out/c.js ----------
export default function o() {
}

---------- /out/d.js ----------
export default class {
}

---------- /out/e.js ----------
export default class o {
}

================================================================================
TestExportWildcardFSNodeCommonJS
---------- /out.js ----------
// entry.js
var entry_exports = {};
module.exports = __toCommonJS(entry_exports);
__reExport(entry_exports, require("fs"), module.exports);

================================================================================
TestExportWildcardFSNodeES6
---------- /out.js ----------
// entry.js
export * from "fs";

================================================================================
TestExportsAndModuleFormatCommonJS
---------- /out.js ----------
// foo/test.js
var test_exports = {};
__export(test_exports, {
  foo: () => foo
});
var foo = 123;

// bar/test.js
var test_exports2 = {};
__export(test_exports2, {
  bar: () => bar
});
var bar = 123;

// entry.js
console.log(exports, module.exports, test_exports, test_exports2);

================================================================================
TestExternalES6ConvertedToCommonJS
---------- /out.js ----------
// a.js
var a_exports = {};
__export(a_exports, {
  ns: () => ns
});
import * as ns from "x";
var init_a = __esm({
  "a.js"() {
  }
});

// b.js
var b_exports = {};
__export(b_exports, {
  ns: () => ns2
});
import * as ns2 from "x";
var init_b = __esm({
  "b.js"() {
  }
});

// c.js
var c_exports = {};
__export(c_exports, {
  ns: () => ns3
});
import * as ns3 from "x";
var init_c = __esm({
  "c.js"() {
  }
});

// d.js
var d_exports = {};
__export(d_exports, {
  ns: () => ns4
});
import { ns as ns4 } from "x";
var init_d = __esm({
  "d.js"() {
  }
});

// e.js
var e_exports = {};
import * as x_star from "x";
var init_e = __esm({
  "e.js"() {
    __reExport(e_exports, x_star);
  }
});

// entry.js
init_a();
init_b();
init_c();
init_d();
init_e();

================================================================================
TestExternalModuleExclusionPackage
---------- /out.js ----------
// index.js
import { S3 } from "aws-sdk";
import { DocumentClient } from "aws-sdk/clients/dynamodb";
var s3 = new S3();
var dynamodb = new DocumentClient();
export {
  dynamodb,
  s3
};

================================================================================
TestExternalModuleExclusionRelativePath
---------- /Users/user/project/out/index.js ----------
// Users/user/project/src/nested/folder/test.js
import foo from "../src/nested/folder/foo.js";
import out from "./in-out-dir.js";
import sha256 from "../src/sha256.min.js";
import config from "/api/config?a=1&b=2";
console.log(foo, out, sha256, config);

================================================================================
TestFalseRequire
---------- /out.js ----------
// entry.js
((require2) => require2("/test.txt"))();

================================================================================
TestHashbangBannerUseStrictOrder
---------- /out.js ----------
#! in file
#! from banner
"use strict";
(() => {
  // entry.js
  foo();
})();

================================================================================
TestHashbangBundle
---------- /out.js ----------
#!/usr/bin/env a

// code.js
var code = 0;

// entry.js
process.exit(code);

================================================================================
TestHashbangNoBundle
---------- /out.js ----------
#!/usr/bin/env node
process.exit(0);

================================================================================
TestIIFE_ES5
---------- /out.js ----------
(function() {
  // entry.js
  console.log("test");
})();

================================================================================
TestImportAbsPathAsDir
---------- /out/entry.js ----------
// Users/user/project/node_modules/pkg/index.js
var pkg_default = 123;

// Users/user/project/entry.js
console.log(pkg_default);

================================================================================
TestImportAbsPathAsFile
---------- /out/entry.js ----------
// Users/user/project/node_modules/pkg/index.js
var pkg_default = 123;

// Users/user/project/entry.js
console.log(pkg_default);

================================================================================
TestImportAbsPathWithQueryParameter
---------- /out/entry.js ----------
// Users/user/project/file.txt?foo
var file_default = "This is some text";

// Users/user/project/file.txt#bar
var file_default2 = "This is some text";

// Users/user/project/entry.js
console.log(file_default, file_default2);

================================================================================
TestImportFSNodeCommonJS
---------- /out.js ----------
// entry.js
var fs = __toESM(require("fs"));
var import_fs = __toESM(require("fs"));
var import_fs2 = require("fs");
console.log(fs, import_fs2.readFileSync, import_fs.default);

================================================================================
TestImportFSNodeES6
---------- /out.js ----------
// entry.js
import * as fs from "fs";
import defaultValue from "fs";
import { readFileSync } from "fs";
console.log(fs, readFileSync, defaultValue);

================================================================================
TestImportFormsWithMinifyIdentifiersAndNoBundle
---------- /out.js ----------
import "foo";
import {} from "foo";
import * as o from "foo";
import { a as r, b as m } from "foo";
import t from "foo";
import f, * as i from "foo";
import p, { a2 as s, b as n } from "foo";
const a = [
  import("foo"),
  function() {
    return import("foo");
  }
];
console.log(o, r, m, t, f, i, p, s, n, a);

================================================================================
TestImportFormsWithNoBundle
---------- /out.js ----------
import "foo";
import {} from "foo";
import * as ns from "foo";
import { a, b as c } from "foo";
import def from "foo";
import def2, * as ns2 from "foo";
import def3, { a2, b as c3 } from "foo";
const imp = [
  import("foo"),
  function nested() {
    return import("foo");
  }
];
console.log(ns, a, c, def, def2, ns2, def3, a2, c3, imp);

================================================================================
TestImportMetaCommonJS
---------- /out.js ----------
// entry.js
var import_meta = {};
console.log(import_meta.url, import_meta.path);

================================================================================
TestImportMetaES6
---------- /out.js ----------
// entry.js
console.log(import.meta.url, import.meta.path);

================================================================================
TestImportMetaNoBundle
---------- /out.js ----------
console.log(import.meta.url, import.meta.path);

================================================================================
TestImportMissingCommonJS
---------- /out.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"(exports) {
    exports.x = 123;
  }
});

// entry.js
var import_foo = __toESM(require_foo());
console.log((0, import_foo.default)(import_foo.x, import_foo.y));

================================================================================
TestImportMissingNeitherES6NorCommonJS
---------- /out/named.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"() {
    console.log("no exports here");
  }
});

// named.js
var import_foo = __toESM(require_foo());
console.log((0, import_foo.default)(void 0, void 0));

---------- /out/star.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"() {
    console.log("no exports here");
  }
});

// star.js
var ns = __toESM(require_foo());
console.log(ns.default(void 0, void 0));

---------- /out/star-capture.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"() {
    console.log("no exports here");
  }
});

// star-capture.js
var ns = __toESM(require_foo());
console.log(ns);

---------- /out/bare.js ----------
// foo.js
console.log("no exports here");

---------- /out/require.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"() {
    console.log("no exports here");
  }
});

// require.js
console.log(require_foo());

---------- /out/import.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"() {
    console.log("no exports here");
  }
});

// import.js
console.log(Promise.resolve().then(() => __toESM(require_foo())));

================================================================================
TestImportNamespaceThisValue
---------- /out/a.js ----------
// a.js
var ns = __toESM(require("external"));
console.log(ns[foo](), new ns[foo]());

---------- /out/b.js ----------
// b.js
var ns = __toESM(require("external"));
console.log(ns.foo(), new ns.foo());

---------- /out/c.js ----------
// c.js
var import_external = __toESM(require("external"));
console.log((0, import_external.default)(), (0, import_external.foo)());
console.log(new import_external.default(), new import_external.foo());

================================================================================
TestImportReExportES6Issue149
---------- /out.js ----------
// import.js
import { h, render } from "preact";
var p = "p";

// in2.jsx
var Internal = () => /* @__PURE__ */ h(p, null, " Test 2 ");

// app.jsx
var App = () => /* @__PURE__ */ h(p, null, " ", /* @__PURE__ */ h(Internal, null), " T ");
render(/* @__PURE__ */ h(App, null), document.getElementById("app"));

================================================================================
TestImportThenCatch
---------- /out.js ----------
// entry.js
import(name).then(pass, fail);
import(name).then(pass).catch(fail);
import(name).catch(fail);

================================================================================
TestImportWithHashInPath
---------- /out/entry.js ----------
// file#foo.txt
var file_foo_default = "foo";

// file#bar.txt
var file_bar_default = "bar";

// entry.js
console.log(file_foo_default, file_bar_default);

================================================================================
TestImportWithHashParameter
---------- /out/entry.js ----------
// file.txt#foo
var file_default = "This is some text";

// file.txt#bar
var file_default2 = "This is some text";

// entry.js
console.log(file_default, file_default2);

================================================================================
TestImportWithQueryParameter
---------- /out/entry.js ----------
// file.txt?foo
var file_default = "This is some text";

// file.txt?bar
var file_default2 = "This is some text";

// entry.js
console.log(file_default, file_default2);

================================================================================
TestInject
---------- /out.js ----------
// inject.js
var obj = {};
var sideEffects = console.log("side effects");

// node_modules/unused/index.js
console.log("This is unused but still has side effects");

// replacement.js
var replace = {
  test() {
  }
};

// re-export.js
var import_external_pkg = require("external-pkg");

// entry.js
var sideEffects2 = console.log("this should be renamed");
var collide = 123;
console.log(obj.prop);
console.log("defined");
console.log("should be used");
console.log(replace.test);
console.log(collide);
console.log(import_external_pkg.re_export);

================================================================================
TestInjectImportOrder
---------- /out.js ----------
// inject-1.js
import "first";
console.log("first");

// inject-2.js
import "second";
console.log("second");

// entry.ts
import "third";
console.log("third");

================================================================================
TestInjectImportTS
---------- /out.js ----------
console.log("must be present");
console.log("here");

================================================================================
TestInjectJSX
---------- /out.js ----------
// inject.js
function el() {
}
function frag() {
}

// entry.jsx
console.log(/* @__PURE__ */ el(frag, null, /* @__PURE__ */ el("div", null)));

================================================================================
TestInjectNoBundle
---------- /out.js ----------
var obj = {};
var sideEffects = console.log("side effects");
console.log("This is unused but still has side effects");
var replace = {
  test() {
  }
};
import { re_export } from "external-pkg";
let sideEffects2 = console.log("this should be renamed");
let collide = 123;
console.log(obj.prop);
console.log("defined");
console.log("should be used");
console.log(replace.test);
console.log(collide);
console.log(re_export);

================================================================================
TestJSXAutomaticImportsCommonJS
---------- /out.js ----------
// custom-react.js
var require_custom_react = __commonJS({
  "custom-react.js"(exports, module) {
    module.exports = {};
  }
});

// entry.jsx
var import_custom_react = __toESM(require_custom_react());
import { Fragment as Fragment2, jsx as jsx2 } from "react/jsx-runtime";
console.log(/* @__PURE__ */ jsx2("div", { jsx: import_custom_react.jsx }), /* @__PURE__ */ jsx2(Fragment2, { children: /* @__PURE__ */ jsx2(import_custom_react.Fragment, {}) }));

================================================================================
TestJSXAutomaticImportsES6
---------- /out.js ----------
// custom-react.js
function jsx() {
}
function Fragment() {
}

// entry.jsx
import { Fragment as Fragment2, jsx as jsx2 } from "react/jsx-runtime";
console.log(/* @__PURE__ */ jsx2("div", { jsx }), /* @__PURE__ */ jsx2(Fragment2, { children: /* @__PURE__ */ jsx2(Fragment, {}) }));

================================================================================
TestJSXAutomaticNoNameCollision
---------- /out.js ----------
var import_react = require("react");
var import_react2 = require("@remix-run/react");
const x = /* @__PURE__ */ (0, import_react.createElement)(import_react2.Link, { ...y, key: z });

================================================================================
TestJSXConstantFragments
---------- /out.js ----------
// default.jsx
console.log(/* @__PURE__ */ React.createElement("]", null));

// null.jsx
console.log(/* @__PURE__ */ React.createElement(null, null));

// boolean.jsx
console.log(/* @__PURE__ */ React.createElement(true, null));

// number.jsx
console.log(/* @__PURE__ */ React.createElement(123, null));

// string-single-empty.jsx
console.log(/* @__PURE__ */ React.createElement("", null));

// string-double-empty.jsx
console.log(/* @__PURE__ */ React.createElement("", null));

// string-single-punctuation.jsx
console.log(/* @__PURE__ */ React.createElement("[", null));

// string-double-punctuation.jsx
console.log(/* @__PURE__ */ React.createElement("[", null));

// string-template.jsx
console.log(/* @__PURE__ */ React.createElement("]", null));

================================================================================
TestJSXImportMetaProperty
---------- /out/factory.js ----------
// factory.jsx
var import_meta = {};
console.log([
  /* @__PURE__ */ import_meta.factory("x", null),
  /* @__PURE__ */ import_meta.factory("x", null)
]);
f = function() {
  console.log([
    /* @__PURE__ */ import_meta.factory("y", null),
    /* @__PURE__ */ import_meta.factory("y", null)
  ]);
};

---------- /out/fragment.js ----------
// fragment.jsx
var import_meta = {};
console.log([
  /* @__PURE__ */ import_meta.factory(import_meta.fragment, null, "x"),
  /* @__PURE__ */ import_meta.factory(import_meta.fragment, null, "x")
]), f = function() {
  console.log([
    /* @__PURE__ */ import_meta.factory(import_meta.fragment, null, "y"),
    /* @__PURE__ */ import_meta.factory(import_meta.fragment, null, "y")
  ]);
};

================================================================================
TestJSXImportMetaValue
---------- /out/factory.js ----------
// factory.jsx
var import_meta = {};
console.log([
  /* @__PURE__ */ import_meta("x", null),
  /* @__PURE__ */ import_meta("x", null)
]);
f = function() {
  console.log([
    /* @__PURE__ */ import_meta("y", null),
    /* @__PURE__ */ import_meta("y", null)
  ]);
};

---------- /out/fragment.js ----------
// fragment.jsx
var import_meta = {};
console.log([
  /* @__PURE__ */ import_meta(import_meta, null, "x"),
  /* @__PURE__ */ import_meta(import_meta, null, "x")
]), f = function() {
  console.log([
    /* @__PURE__ */ import_meta(import_meta, null, "y"),
    /* @__PURE__ */ import_meta(import_meta, null, "y")
  ]);
};

================================================================================
TestJSXImportsCommonJS
---------- /out.js ----------
// custom-react.js
var require_custom_react = __commonJS({
  "custom-react.js"(exports, module) {
    module.exports = {};
  }
});

// entry.jsx
var import_custom_react = __toESM(require_custom_react());
console.log(/* @__PURE__ */ (0, import_custom_react.elem)("div", null), /* @__PURE__ */ (0, import_custom_react.elem)(import_custom_react.frag, null, "fragment"));

================================================================================
TestJSXImportsES6
---------- /out.js ----------
// custom-react.js
function elem() {
}
function frag() {
}

// entry.jsx
console.log(/* @__PURE__ */ elem("div", null), /* @__PURE__ */ elem(frag, null, "fragment"));

================================================================================
TestJSXThisPropertyCommonJS
---------- /out/factory.js ----------
// factory.jsx
var require_factory = __commonJS({
  "factory.jsx"(exports) {
    console.log([
      /* @__PURE__ */ exports.factory("x", null),
      /* @__PURE__ */ exports.factory("x", null)
    ]);
    f = function() {
      console.log([
        /* @__PURE__ */ this.factory("y", null),
        /* @__PURE__ */ this.factory("y", null)
      ]);
    };
  }
});
export default require_factory();

---------- /out/fragment.js ----------
// fragment.jsx
var require_fragment = __commonJS({
  "fragment.jsx"(exports) {
    console.log([
      /* @__PURE__ */ exports.factory(exports.fragment, null, "x"),
      /* @__PURE__ */ exports.factory(exports.fragment, null, "x")
    ]), f = function() {
      console.log([
        /* @__PURE__ */ this.factory(this.fragment, null, "y"),
        /* @__PURE__ */ this.factory(this.fragment, null, "y")
      ]);
    };
  }
});
export default require_fragment();

================================================================================
TestJSXThisPropertyESM
---------- /out/factory.js ----------
// factory.jsx
console.log([
  /* @__PURE__ */ (void 0).factory("x", null),
  /* @__PURE__ */ (void 0).factory("x", null)
]);
f = function() {
  console.log([
    /* @__PURE__ */ this.factory("y", null),
    /* @__PURE__ */ this.factory("y", null)
  ]);
};

---------- /out/fragment.js ----------
// fragment.jsx
console.log([
  /* @__PURE__ */ (void 0).factory((void 0).fragment, null, "x"),
  /* @__PURE__ */ (void 0).factory((void 0).fragment, null, "x")
]), f = function() {
  console.log([
    /* @__PURE__ */ this.factory(this.fragment, null, "y"),
    /* @__PURE__ */ this.factory(this.fragment, null, "y")
  ]);
};

================================================================================
TestJSXThisValueCommonJS
---------- /out/factory.js ----------
// factory.jsx
var require_factory = __commonJS({
  "factory.jsx"(exports) {
    console.log([
      /* @__PURE__ */ exports("x", null),
      /* @__PURE__ */ exports("x", null)
    ]);
    f = function() {
      console.log([
        /* @__PURE__ */ this("y", null),
        /* @__PURE__ */ this("y", null)
      ]);
    };
  }
});
export default require_factory();

---------- /out/fragment.js ----------
// fragment.jsx
var require_fragment = __commonJS({
  "fragment.jsx"(exports) {
    console.log([
      /* @__PURE__ */ exports(exports, null, "x"),
      /* @__PURE__ */ exports(exports, null, "x")
    ]), f = function() {
      console.log([
        /* @__PURE__ */ this(this, null, "y"),
        /* @__PURE__ */ this(this, null, "y")
      ]);
    };
  }
});
export default require_fragment();

================================================================================
TestJSXThisValueESM
---------- /out/factory.js ----------
// factory.jsx
console.log([
  /* @__PURE__ */ (void 0)("x", null),
  /* @__PURE__ */ (void 0)("x", null)
]);
f = function() {
  console.log([
    /* @__PURE__ */ this("y", null),
    /* @__PURE__ */ this("y", null)
  ]);
};

---------- /out/fragment.js ----------
// fragment.jsx
console.log([
  /* @__PURE__ */ (void 0)(void 0, null, "x"),
  /* @__PURE__ */ (void 0)(void 0, null, "x")
]), f = function() {
  console.log([
    /* @__PURE__ */ this(this, null, "y"),
    /* @__PURE__ */ this(this, null, "y")
  ]);
};

================================================================================
TestKeepNamesTreeShaking
---------- /out.js ----------
// entry.js
function fnStmtKeep() {
}
__name(fnStmtKeep, "fnStmtKeep");
x = fnStmtKeep;
var fnExprKeep = /* @__PURE__ */ __name(function() {
}, "keep");
x = fnExprKeep;
var clsStmtKeep = class {
};
__name(clsStmtKeep, "clsStmtKeep");
new clsStmtKeep();
var clsExprKeep = /* @__PURE__ */ __name(class {
}, "keep");
new clsExprKeep();

================================================================================
TestLegalCommentsAvoidSlashTagEndOfFile
---------- /out/entry.js ----------
// entry.js
var x;
export {
  x
};
//! <script>foo<\/script>

---------- /out/entry.css ----------
/* entry.css */
x {
  y: z;
}
/*! <style>foo<\/style> */

================================================================================
TestLegalCommentsAvoidSlashTagExternal
---------- /out/entry.js.LEGAL.txt ----------
//! <script>foo</script>

---------- /out/entry.js ----------
// entry.js
var x;
export {
  x
};

---------- /out/entry.css.LEGAL.txt ----------
/*! <style>foo</style> */

---------- /out/entry.css ----------
/* entry.css */
x {
  y: z;
}

================================================================================
TestLegalCommentsAvoidSlashTagInline
---------- /out/entry.js ----------
// entry.js
//! <script>foo<\/script>
var x;
export {
  x
};

---------- /out/entry.css ----------
/* entry.css */
/*! <style>foo<\/style> */
x {
  y: z;
}

================================================================================
TestLegalCommentsEndOfFile
---------- /out/entry.js ----------
// a.js
console.log("in a");

// b.js
console.log("in b");

// c.js
console.log("in c");
//! Copyright notice 1
//! Copyright notice 2

---------- /out/entry.css ----------
/* a.css */
a {
  zoom: 2;
}

/* b.css */
b {
  zoom: 2;
}

/* c.css */
c {
  zoom: 2;
}

/* entry.css */
/*! Copyright notice 1 */
/*! Copyright notice 2 */

================================================================================
TestLegalCommentsExternal
---------- /out/entry.js.LEGAL.txt ----------
//! Copyright notice 1
//! Copyright notice 2

---------- /out/entry.js ----------
// a.js
console.log("in a");

// b.js
console.log("in b");

// c.js
console.log("in c");

---------- /out/entry.css.LEGAL.txt ----------
/*! Copyright notice 1 */
/*! Copyright notice 2 */

---------- /out/entry.css ----------
/* a.css */
a {
  zoom: 2;
}

/* b.css */
b {
  zoom: 2;
}

/* c.css */
c {
  zoom: 2;
}

/* entry.css */

================================================================================
TestLegalCommentsInline
---------- /out/entry.js ----------
// a.js
console.log("in a");
//! Copyright notice 1

// b.js
console.log("in b");
//! Copyright notice 1

// c.js
console.log("in c");
//! Copyright notice 2

---------- /out/entry.css ----------
/* a.css */
a {
  zoom: 2;
}
/*! Copyright notice 1 */

/* b.css */
b {
  zoom: 2;
}
/*! Copyright notice 1 */

/* c.css */
c {
  zoom: 2;
}
/*! Copyright notice 2 */

/* entry.css */

================================================================================
TestLegalCommentsLinked
---------- /out/entry.js.LEGAL.txt ----------
//! Copyright notice 1
//! Copyright notice 2

---------- /out/entry.js ----------
// a.js
console.log("in a");

// b.js
console.log("in b");

// c.js
console.log("in c");
/*! For license information please see entry.js.LEGAL.txt */

---------- /out/entry.css.LEGAL.txt ----------
/*! Copyright notice 1 */
/*! Copyright notice 2 */

---------- /out/entry.css ----------
/* a.css */
a {
  zoom: 2;
}

/* b.css */
b {
  zoom: 2;
}

/* c.css */
c {
  zoom: 2;
}

/* entry.css */
/*! For license information please see entry.css.LEGAL.txt */

================================================================================
TestLegalCommentsModifyIndent
---------- /out/entry.js ----------
// entry.js
var entry_default = () => {
  /**
   * @preserve
   */
};
export {
  entry_default as default
};

---------- /out/entry.css ----------
/* entry.css */
@media (x: y) {
  /**
   * @preserve
   */
  z {
    zoom: 2;
  }
}

================================================================================
TestLegalCommentsNone
---------- /out/entry.js ----------
// a.js
console.log("in a");

// b.js
console.log("in b");

// c.js
console.log("in c");

---------- /out/entry.css ----------
/* a.css */
a {
  zoom: 2;
}

/* b.css */
b {
  zoom: 2;
}

/* c.css */
c {
  zoom: 2;
}

/* entry.css */

================================================================================
TestLoaderCopyWithBundleEntryPoint
---------- /out/assets/some.file ----------
stuff
---------- /out/src/entry.js ----------
// Users/user/project/src/entry.js
import x from "../assets/some.file";
console.log(x);

---------- /out/src/entry.css ----------
/* Users/user/project/src/entry.css */
body {
  background: url(../assets/some.file);
}

================================================================================
TestLoaderCopyWithBundleFromCSS
---------- /out/some-BYATPJRB.file ----------
stuff
---------- /out/src/entry.css ----------
/* Users/user/project/src/entry.css */
body {
  background: url(../some-BYATPJRB.file);
}

================================================================================
TestLoaderCopyWithBundleFromJS
---------- /out/some-BYATPJRB.file ----------
stuff
---------- /out/src/entry.js ----------
// Users/user/project/src/entry.js
import x from "../some-BYATPJRB.file";
console.log(x);

================================================================================
TestLoaderCopyWithFormat
---------- /out/src/entry.js ----------
(() => {
  console.log("entry");
})();

---------- /out/assets/some.file ----------
stuff
================================================================================
TestLoaderCopyWithTransform
---------- /out/src/entry.js ----------
console.log("entry");

---------- /out/assets/some.file ----------
stuff
================================================================================
TestLoaderDataURLApplicationJSON
---------- /out/entry.js ----------
// <data:application/json,"%31%32%33">
var json_31_32_33_default = "123";

// <data:application/json;base64,eyJ3b3JrcyI6dHJ1ZX0=>
var json_base64_eyJ3b3JrcyI6dHJ1ZX0_default = { works: true };

// <data:application/json;charset=UTF-8,%31%32%33>
var json_charset_UTF_8_31_32_33_default = 123;

// <data:application/json;charset=UTF-8;base64,eyJ3b3JrcyI6dHJ1ZX0=>
var json_charset_UTF_8_base64_eyJ3b3JrcyI6dHJ1ZX0_default = { works: true };

// entry.js
console.log([
  json_31_32_33_default,
  json_base64_eyJ3b3JrcyI6dHJ1ZX0_default,
  json_charset_UTF_8_31_32_33_default,
  json_charset_UTF_8_base64_eyJ3b3JrcyI6dHJ1ZX0_default
]);

================================================================================
TestLoaderDataURLExtensionBasedMIME
---------- /out/entry.js ----------
// example.css
var example_default = "data:text/css;charset=utf-8;base64,Y3Nz";

// example.eot
var example_default2 = "data:application/vnd.ms-fontobject;base64,ZW90";

// example.gif
var example_default3 = "data:image/gif;base64,Z2lm";

// example.htm
var example_default4 = "data:text/html;charset=utf-8;base64,aHRt";

// example.html
var example_default5 = "data:text/html;charset=utf-8;base64,aHRtbA==";

// example.jpeg
var example_default6 = "data:image/jpeg;base64,anBlZw==";

// example.jpg
var example_default7 = "data:image/jpeg;base64,anBn";

// example.js
var example_default8 = "data:text/javascript;charset=utf-8;base64,anM=";

// example.json
var example_default9 = "data:application/json;base64,anNvbg==";

// example.mjs
var example_default10 = "data:text/javascript;charset=utf-8;base64,bWpz";

// example.otf
var example_default11 = "data:font/otf;base64,b3Rm";

// example.pdf
var example_default12 = "data:application/pdf;base64,cGRm";

// example.png
var example_default13 = "data:image/png;base64,cG5n";

// example.sfnt
var example_default14 = "data:font/sfnt;base64,c2ZudA==";

// example.svg
var example_default15 = "data:image/svg+xml;base64,c3Zn";

// example.ttf
var example_default16 = "data:font/ttf;base64,dHRm";

// example.wasm
var example_default17 = "data:application/wasm;base64,d2FzbQ==";

// example.webp
var example_default18 = "data:image/webp;base64,d2VicA==";

// example.woff
var example_default19 = "data:font/woff;base64,d29mZg==";

// example.woff2
var example_default20 = "data:font/woff2;base64,d29mZjI=";

// example.xml
var example_default21 = "data:text/xml;charset=utf-8;base64,eG1s";
export {
  example_default as css,
  example_default2 as eot,
  example_default3 as gif,
  example_default4 as htm,
  example_default5 as html,
  example_default6 as jpeg,
  example_default7 as jpg,
  example_default8 as js,
  example_default9 as json,
  example_default10 as mjs,
  example_default11 as otf,
  example_default12 as pdf,
  example_default13 as png,
  example_default14 as sfnt,
  example_default15 as svg,
  example_default16 as ttf,
  example_default17 as wasm,
  example_default18 as webp,
  example_default19 as woff,
  example_default20 as woff2,
  example_default21 as xml
};

================================================================================
TestLoaderDataURLTextCSS
---------- /out/entry.css ----------
/* <data:text/css,body{color:%72%65%64}> */
body {
  color: red;
}

/* <data:text/css;base64,Ym9keXtiYWNrZ3JvdW5kOmJsdWV9> */
body {
  background: blue;
}

/* <data:text/css;charset=UTF-8,body{color:%72%65%64}> */
body {
  color: red;
}

/* <data:text/css;charset=UTF-8;base64,Ym9keXtiYWNrZ3JvdW5kOmJsdWV9> */
body {
  background: blue;
}

/* entry.css */

================================================================================
TestLoaderDataURLTextJavaScript
---------- /out/entry.js ----------
// <data:text/javascript,console.log('%31%32%33')>
console.log("123");

// <data:text/javascript;base64,Y29uc29sZS5sb2coMjM0KQ==>
console.log(234);

// <data:text/javascript;charset=UTF-8,console.log(%31%32%33)>
console.log(123);

// <data:text/javascript;charset=UTF-8;base64,Y29uc29sZS5sb2coMjM0KQ...>
console.log(234);

================================================================================
TestLoaderDataURLTextJavaScriptPlusCharacter
---------- /out/entry.js ----------
// <data:text/javascript,console.log(1+2)>
console.log(1 + 2);

================================================================================
TestLoaderDataURLUnknownMIME
---------- /out/entry.js ----------
// entry.js
import a from "data:some/thing;what,someData%31%32%33";
import b from "data:other/thing;stuff;base64,c29tZURhdGEyMzQ=";
console.log(a, b);

================================================================================
TestLoaderFileWithQueryParameter
---------- /out/file-UEHVHXRQ.txt ----------
This is some text
---------- /out/entry.js ----------
// file.txt?foo
var file_default = "./file-UEHVHXRQ.txt?foo";

// file.txt?bar
var file_default2 = "./file-UEHVHXRQ.txt?bar";

// entry.js
console.log(file_default, file_default2);

================================================================================
TestLoaderFromExtensionWithQueryParameter
---------- /out/entry.js ----------
// file.abc?query.xyz
var file_default = "This should not be base64 encoded";

// entry.js
console.log(file_default);

================================================================================
TestManyEntryPoints
---------- /out/e00.js ----------
// shared.js
var shared_default = 123;

// e00.js
console.log(shared_default);

---------- /out/e01.js ----------
// shared.js
var shared_default = 123;

// e01.js
console.log(shared_default);

---------- /out/e02.js ----------
// shared.js
var shared_default = 123;

// e02.js
console.log(shared_default);

---------- /out/e03.js ----------
// shared.js
var shared_default = 123;

// e03.js
console.log(shared_default);

---------- /out/e04.js ----------
// shared.js
var shared_default = 123;

// e04.js
console.log(shared_default);

---------- /out/e05.js ----------
// shared.js
var shared_default = 123;

// e05.js
console.log(shared_default);

---------- /out/e06.js ----------
// shared.js
var shared_default = 123;

// e06.js
console.log(shared_default);

---------- /out/e07.js ----------
// shared.js
var shared_default = 123;

// e07.js
console.log(shared_default);

---------- /out/e08.js ----------
// shared.js
var shared_default = 123;

// e08.js
console.log(shared_default);

---------- /out/e09.js ----------
// shared.js
var shared_default = 123;

// e09.js
console.log(shared_default);

---------- /out/e10.js ----------
// shared.js
var shared_default = 123;

// e10.js
console.log(shared_default);

---------- /out/e11.js ----------
// shared.js
var shared_default = 123;

// e11.js
console.log(shared_default);

---------- /out/e12.js ----------
// shared.js
var shared_default = 123;

// e12.js
console.log(shared_default);

---------- /out/e13.js ----------
// shared.js
var shared_default = 123;

// e13.js
console.log(shared_default);

---------- /out/e14.js ----------
// shared.js
var shared_default = 123;

// e14.js
console.log(shared_default);

---------- /out/e15.js ----------
// shared.js
var shared_default = 123;

// e15.js
console.log(shared_default);

---------- /out/e16.js ----------
// shared.js
var shared_default = 123;

// e16.js
console.log(shared_default);

---------- /out/e17.js ----------
// shared.js
var shared_default = 123;

// e17.js
console.log(shared_default);

---------- /out/e18.js ----------
// shared.js
var shared_default = 123;

// e18.js
console.log(shared_default);

---------- /out/e19.js ----------
// shared.js
var shared_default = 123;

// e19.js
console.log(shared_default);

---------- /out/e20.js ----------
// shared.js
var shared_default = 123;

// e20.js
console.log(shared_default);

---------- /out/e21.js ----------
// shared.js
var shared_default = 123;

// e21.js
console.log(shared_default);

---------- /out/e22.js ----------
// shared.js
var shared_default = 123;

// e22.js
console.log(shared_default);

---------- /out/e23.js ----------
// shared.js
var shared_default = 123;

// e23.js
console.log(shared_default);

---------- /out/e24.js ----------
// shared.js
var shared_default = 123;

// e24.js
console.log(shared_default);

---------- /out/e25.js ----------
// shared.js
var shared_default = 123;

// e25.js
console.log(shared_default);

---------- /out/e26.js ----------
// shared.js
var shared_default = 123;

// e26.js
console.log(shared_default);

---------- /out/e27.js ----------
// shared.js
var shared_default = 123;

// e27.js
console.log(shared_default);

---------- /out/e28.js ----------
// shared.js
var shared_default = 123;

// e28.js
console.log(shared_default);

---------- /out/e29.js ----------
// shared.js
var shared_default = 123;

// e29.js
console.log(shared_default);

---------- /out/e30.js ----------
// shared.js
var shared_default = 123;

// e30.js
console.log(shared_default);

---------- /out/e31.js ----------
// shared.js
var shared_default = 123;

// e31.js
console.log(shared_default);

---------- /out/e32.js ----------
// shared.js
var shared_default = 123;

// e32.js
console.log(shared_default);

---------- /out/e33.js ----------
// shared.js
var shared_default = 123;

// e33.js
console.log(shared_default);

---------- /out/e34.js ----------
// shared.js
var shared_default = 123;

// e34.js
console.log(shared_default);

---------- /out/e35.js ----------
// shared.js
var shared_default = 123;

// e35.js
console.log(shared_default);

---------- /out/e36.js ----------
// shared.js
var shared_default = 123;

// e36.js
console.log(shared_default);

---------- /out/e37.js ----------
// shared.js
var shared_default = 123;

// e37.js
console.log(shared_default);

---------- /out/e38.js ----------
// shared.js
var shared_default = 123;

// e38.js
console.log(shared_default);

---------- /out/e39.js ----------
// shared.js
var shared_default = 123;

// e39.js
console.log(shared_default);

================================================================================
TestMinifiedBundleCommonJS
---------- /out.js ----------
var t=e(r=>{r.foo=function(){return 123}});var n=e((l,c)=>{c.exports={test:!0}});var{foo:f}=t();console.log(f(),n());

================================================================================
TestMinifiedBundleES6
---------- /out.js ----------
function o(){return 123}o();console.log(o());

================================================================================
TestMinifiedBundleEndingWithImportantSemicolon
---------- /out.js ----------
(()=>{while(foo());})();

================================================================================
TestMinifiedDynamicImportWithExpressionCJS
---------- /out.js ----------
import("foo");import(foo());

================================================================================
TestMinifiedExportsAndModuleFormatCommonJS
---------- /out.js ----------
// foo/test.js
var o = {};
p(o, {
  foo: () => l
});
var l = 123;

// bar/test.js
var r = {};
p(r, {
  bar: () => m
});
var m = 123;

// entry.js
console.log(exports, module.exports, o, r);

================================================================================
TestMinifyArguments
---------- /out.js ----------
(() => {
  // entry.js
  function e(n = arguments) {
    let t;
  }
  function u(n = arguments) {
    let t;
  }
  function a(n = arguments) {
    let t;
  }
  e();
  u();
  a();
})();

================================================================================
TestMinifyNestedLabelsNoBundle
---------- /out.js ----------
n:{l:{a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{m:{o:{p:{nl(`
`);q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{E:{F:{nl(`
`);G:{H:{I:{J:{K:{L:{M:{N:{O:{P:{Q:{R:{S:{T:{U:{V:{nl(`
`);W:{X:{Y:{Z:{_:{$:{nn:{ln:{an:{bn:{cn:{dn:{en:{fn:{gn:{hn:{nl(`
`);jn:{kn:{mn:{on:{pn:{qn:{rn:{sn:{tn:{un:{vn:{wn:{xn:{yn:{zn:{An:{nl(`
`);Bn:{Cn:{Dn:{En:{Fn:{Gn:{Hn:{In:{Jn:{Kn:{Ln:{Mn:{Nn:{On:{Pn:{Qn:{nl(`
`);Rn:{Sn:{Tn:{Un:{Vn:{Wn:{Xn:{Yn:{Zn:{_n:{$n:{nl:{ll:{al:{bl:{cl:{nl(`
`);dl:{el:{fl:{gl:{hl:{il:{jl:{kl:{ml:{ol:{pl:{ql:{rl:{sl:{tl:{ul:{nl(`
`);vl:{wl:{xl:{yl:{zl:{Al:{Bl:{Cl:{Dl:{El:{Fl:{Gl:{Hl:{Il:{Jl:{Kl:{nl(`
`);Ll:{Ml:{Nl:{Ol:{Pl:{Ql:{Rl:{Sl:{Tl:{Ul:{Vl:{Wl:{Xl:{Yl:{Zl:{_l:{nl(`
`);$l:{na:{la:{aa:{ba:{ca:{da:{ea:{fa:{ga:{ha:{ia:{ja:{ka:{ma:{oa:{nl(`
`);pa:{qa:{ra:{sa:{ta:{ua:{va:{wa:{xa:{ya:{za:{Aa:{Ba:{Ca:{Da:{Ea:{nl(`
`);Fa:{Ga:{Ha:{Ia:{Ja:{Ka:{La:{Ma:{Na:{Oa:{Pa:{Qa:{Ra:{Sa:{Ta:{Ua:{nl(`
`);Va:{Wa:{Xa:{Ya:{Za:{_a:{$a:{nb:{lb:{ab:{bb:{cb:{db:{eb:{fb:{gb:{nl(`
`);hb:{ib:{jb:{kb:{mb:{ob:{pb:{qb:{rb:{sb:{tb:{ub:{vb:{wb:{xb:{yb:{nl(`
`);zb:{Ab:{Bb:{Cb:{Db:{Eb:{Fb:{Gb:{Hb:{Ib:{Jb:{Kb:{Lb:{Mb:{Nb:{Ob:{nl(`
`);Pb:{Qb:{Rb:{Sb:{Tb:{Ub:{Vb:{Wb:{Xb:{Yb:{Zb:{_b:{$b:{nc:{lc:{ac:{nl(`
`);bc:{cc:{dc:{ec:{fc:{gc:{hc:{ic:{jc:{kc:{mc:{oc:{pc:{qc:{rc:{sc:{nl(`
`);tc:{uc:{vc:{wc:{xc:{yc:{zc:{Ac:{Bc:{Cc:{Dc:{Ec:{Fc:{Gc:{Hc:{Ic:{nl(`
`);Jc:{Kc:{Lc:{Mc:{Nc:{Oc:{Pc:{Qc:{Rc:{Sc:{Tc:{Uc:{Vc:{Wc:{Xc:{Yc:{nl(`
`);Zc:{_c:{$c:{nd:{ld:{ad:{bd:{cd:{dd:{ed:{fd:{gd:{hd:;}}}}}}}}}}}}}}}}}nl(`
`)}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}nl(`
`)}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}nl(`
`)}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}nl(`
`)}}}}}}}}}}}}}}}}}}}}}}}}}}}

================================================================================
TestMinifyPrivateIdentifiersNoBundle
---------- /out.js ----------
class Foo {
  #a;
  foo = class {
    #s;
    #f;
    #r;
  };
  get #o() {
  }
  set #o(a) {
  }
}
class Bar {
  #a;
  foo = class {
    #s;
    #f;
    #r;
  };
  get #o() {
  }
  set #o(a) {
  }
}

================================================================================
TestMinifySiblingLabelsNoBundle
---------- /out.js ----------
a: {
  b: {
    if (x)
      break b;
    break a;
  }
}
a: {
  b: {
    if (x)
      break b;
    break a;
  }
}
a: {
  b: {
    if (x)
      break b;
    break a;
  }
}

================================================================================
TestMultipleEntryPointsSameNameCollision
---------- /out/a/entry.js ----------
// common.js
var foo = 123;

// a/entry.js
console.log(foo);

---------- /out/b/entry.js ----------
// common.js
var foo = 123;

// b/entry.js
console.log(foo);

================================================================================
TestNestedCommonJS
---------- /out.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"(exports, module) {
    module.exports = function() {
      return 123;
    };
  }
});

// entry.js
function nestedScope() {
  const fn = require_foo();
  console.log(fn());
}
nestedScope();

================================================================================
TestNestedES6FromCommonJS
---------- /out.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"(exports) {
    exports.fn = function() {
      return 123;
    };
  }
});

// entry.js
var import_foo = __toESM(require_foo());
(() => {
  console.log((0, import_foo.fn)());
})();

================================================================================
TestNestedRequireWithoutCall
---------- /out.js ----------
// entry.js
(() => {
  const req = __require;
  req("./entry");
})();

================================================================================
TestNestedScopeBug
---------- /out.js ----------
// entry.js
(() => {
  function a() {
    b();
  }
  {
    var b = () => {
    };
  }
  a();
})();

================================================================================
TestNewExpressionCommonJS
---------- /out.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"(exports, module) {
    var Foo = class {
    };
    module.exports = { Foo };
  }
});

// entry.js
new (require_foo()).Foo();

================================================================================
TestNodeModules
---------- /Users/user/project/out.js ----------
// Users/user/project/node_modules/demo-pkg/index.js
var require_demo_pkg = __commonJS({
  "Users/user/project/node_modules/demo-pkg/index.js"(exports, module) {
    module.exports = function() {
      return 123;
    };
  }
});

// Users/user/project/src/entry.js
var import_demo_pkg = __toESM(require_demo_pkg());
console.log((0, import_demo_pkg.default)());

================================================================================
TestOutbase
---------- /out/a/b/c.js ----------
// a/b/c.js
console.log("c");

---------- /out/a/b/d.js ----------
// a/b/d.js
console.log("d");

================================================================================
TestOutputExtensionRemappingDir
---------- /out/entry.notjs ----------
// entry.js
console.log("test");

================================================================================
TestOutputExtensionRemappingFile
---------- /out.js ----------
// entry.js
console.log("test");

================================================================================
TestQuotedProperty
---------- /out/entry.js ----------
// entry.js
var ns = __toESM(require("ext"));
console.log(ns.mustBeUnquoted, ns["mustBeQuoted"]);

================================================================================
TestQuotedPropertyMangle
---------- /out/entry.js ----------
// entry.js
var ns = __toESM(require("ext"));
console.log(ns.mustBeUnquoted, ns.mustBeUnquoted2);

================================================================================
TestReExportCommonJSAsES6
---------- /out.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"(exports) {
    exports.bar = 123;
  }
});

// entry.js
var import_foo = __toESM(require_foo());
var export_bar = import_foo.bar;
export {
  export_bar as bar
};

================================================================================
TestReExportDefaultExternalCommonJS
---------- /out.js ----------
// entry.js
var entry_exports = {};
__export(entry_exports, {
  bar: () => import_bar.default,
  foo: () => import_foo.default
});
module.exports = __toCommonJS(entry_exports);
var import_foo = __toESM(require("foo"));

// bar.js
var import_bar = __toESM(require("bar"));

================================================================================
TestReExportDefaultExternalES6
---------- /out.js ----------
// entry.js
import { default as default3 } from "foo";

// bar.js
import { default as default2 } from "bar";
export {
  default2 as bar,
  default3 as foo
};

================================================================================
TestReExportDefaultInternal
---------- /out.js ----------
// foo.js
var foo_default = "foo";

// bar.js
var bar_default = "bar";
export {
  bar_default as bar,
  foo_default as foo
};

================================================================================
TestReExportDefaultNoBundle
---------- /out.js ----------
export { default as foo } from "./foo";
export { default as bar } from "./bar";

================================================================================
TestReExportDefaultNoBundleCommonJS
---------- /out.js ----------
var entry_exports = {};
__export(entry_exports, {
  bar: () => import_bar.default,
  foo: () => import_foo.default
});
module.exports = __toCommonJS(entry_exports);
var import_foo = __toESM(require("./foo"));
var import_bar = __toESM(require("./bar"));

================================================================================
TestReExportDefaultNoBundleES6
---------- /out.js ----------
import { default as default2 } from "./foo";
import { default as default3 } from "./bar";
export {
  default3 as bar,
  default2 as foo
};

================================================================================
TestReExportFSNode
---------- /out.js ----------
// foo.js
import * as fs from "fs";
import { readFileSync } from "fs";
export {
  fs as f,
  readFileSync as rfs
};

================================================================================
TestRenameLabelsNoBundle
---------- /out.js ----------
foo: {
  bar: {
    if (x)
      break bar;
    break foo;
  }
}
foo2: {
  bar2: {
    if (x)
      break bar2;
    break foo2;
  }
}
foo: {
  bar: {
    if (x)
      break bar;
    break foo;
  }
}

================================================================================
TestRenamePrivateIdentifiersNoBundle
---------- /out.js ----------
class Foo {
  #foo;
  foo = class {
    #foo;
    #foo2;
    #bar;
  };
  get #bar() {
  }
  set #bar(x) {
  }
}
class Bar {
  #foo;
  foo = class {
    #foo2;
    #foo;
    #bar;
  };
  get #bar() {
  }
  set #bar(x) {
  }
}

================================================================================
TestRequireAndDynamicImportInvalidTemplate
---------- /out.js ----------
// entry.js
__require(tag`./b`);
__require(`./${b}`);
try {
  __require(tag`./b`);
  __require(`./${b}`);
} catch {
}
(async () => {
  import(tag`./b`);
  import(`./${b}`);
  await import(tag`./b`);
  await import(`./${b}`);
  try {
    import(tag`./b`);
    import(`./${b}`);
    await import(tag`./b`);
    await import(`./${b}`);
  } catch {
  }
})();

================================================================================
TestRequireBadArgumentCount
---------- /out.js ----------
// entry.js
__require();
__require("a", "b");
try {
  __require();
  __require("a", "b");
} catch {
}

================================================================================
TestRequireChildDirCommonJS
---------- /out.js ----------
// Users/user/project/src/dir/index.js
var require_dir = __commonJS({
  "Users/user/project/src/dir/index.js"(exports, module) {
    module.exports = 123;
  }
});

// Users/user/project/src/entry.js
console.log(require_dir());

================================================================================
TestRequireChildDirES6
---------- /out.js ----------
// Users/user/project/src/dir/index.js
var dir_default = 123;

// Users/user/project/src/entry.js
console.log(dir_default);

================================================================================
TestRequireFSNode
---------- /out.js ----------
// entry.js
return require("fs");

================================================================================
TestRequireFSNodeMinify
---------- /out.js ----------
return require("fs");

================================================================================
TestRequireJson
---------- /out.js ----------
// test.json
var require_test = __commonJS({
  "test.json"(exports, module) {
    module.exports = {
      a: true,
      b: 123,
      c: [null]
    };
  }
});

// entry.js
console.log(require_test());

================================================================================
TestRequireMainCacheCommonJS
---------- /out.js ----------
// is-main.js
var require_is_main = __commonJS({
  "is-main.js"(exports2, module2) {
    module2.exports = require.main === module2;
  }
});

// entry.js
console.log("is main:", require.main === module);
console.log(require_is_main());
console.log("cache:", require.cache);

================================================================================
TestRequireParentDirCommonJS
---------- /out.js ----------
// Users/user/project/src/index.js
var require_src = __commonJS({
  "Users/user/project/src/index.js"(exports, module) {
    module.exports = 123;
  }
});

// Users/user/project/src/dir/entry.js
console.log(require_src());

================================================================================
TestRequireParentDirES6
---------- /out.js ----------
// Users/user/project/src/index.js
var src_default = 123;

// Users/user/project/src/dir/entry.js
console.log(src_default);

================================================================================
TestRequirePropertyAccessCommonJS
---------- /out.js ----------
// entry.js
console.log(Object.keys(require.cache));
console.log(Object.keys(require.extensions));
delete require.cache["fs"];
delete require.extensions[".json"];

================================================================================
TestRequireResolve
---------- /out.js ----------
// entry.js
console.log(require.resolve);
console.log(require.resolve());
console.log(require.resolve(foo));
console.log(require.resolve("a", "b"));
console.log(require.resolve("./present-file"));
console.log(require.resolve("./missing-file"));
console.log(require.resolve("./external-file"));
console.log(require.resolve("missing-pkg"));
console.log(require.resolve("external-pkg"));
console.log(require.resolve("@scope/missing-pkg"));
console.log(require.resolve("@scope/external-pkg"));
try {
  console.log(require.resolve("inside-try"));
} catch (e) {
}
if (false) {
  console.log(null);
}
console.log(false ? null : 0);
console.log(true ? 0 : null);
console.log(false);
console.log(true);
console.log(true);

================================================================================
TestRequireShimSubstitution
---------- /out/entry.js ----------
// example.json
var require_example = __commonJS({
  "example.json"(exports, module) {
    module.exports = { works: true };
  }
});

// entry.js
console.log([
  __require,
  typeof __require,
  require_example(),
  __require("./example.json", { type: "json" }),
  __require(window.SOME_PATH),
  require_example(),
  __require("./example.json", { type: "json" }),
  __require(window.SOME_PATH),
  __require.resolve("some-path"),
  __require.resolve(window.SOME_PATH),
  Promise.resolve().then(() => __toESM(__require("some-path"))),
  Promise.resolve().then(() => __toESM(__require(window.SOME_PATH)))
]);

================================================================================
TestRequireTxt
---------- /out.js ----------
// test.txt
var require_test = __commonJS({
  "test.txt"(exports, module) {
    module.exports = "This is a test.";
  }
});

// entry.js
console.log(require_test());

================================================================================
TestRequireWithCallInsideTry
---------- /out.js ----------
// entry.js
var require_entry = __commonJS({
  "entry.js"(exports) {
    try {
      const supportsColor = __require("supports-color");
      if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
        exports.colors = [];
      }
    } catch (error) {
    }
  }
});
export default require_entry();

================================================================================
TestRequireWithTemplate
---------- /out.js ----------
// b.js
var require_b = __commonJS({
  "b.js"(exports) {
    exports.x = 123;
  }
});

// a.js
console.log(require_b());
console.log(require_b());

================================================================================
TestRequireWithoutCall
---------- /out.js ----------
// entry.js
var req = __require;
req("./entry");

================================================================================
TestRequireWithoutCallInsideTry
---------- /out.js ----------
// entry.js
try {
  oldLocale = globalLocale._abbr;
  aliasedRequire = __require;
  aliasedRequire("./locale/" + name);
  getSetGlobalLocale(oldLocale);
} catch (e) {
}
var aliasedRequire;

================================================================================
TestRuntimeNameCollisionNoBundle
---------- /out.js ----------
function __require() {
  return 123;
}
console.log(__require());

================================================================================
TestScopedExternalModuleExclusion
---------- /out.js ----------
// index.js
import { Foo } from "@scope/foo";
import { Bar } from "@scope/foo/bar";
var foo = new Foo();
var bar = new Bar();
export {
  bar,
  foo
};

================================================================================
TestSimpleCommonJS
---------- /out.js ----------
// foo.js
var require_foo = __commonJS({
  "foo.js"(exports, module) {
    module.exports = function() {
      return 123;
    };
  }
});

// entry.js
var fn = require_foo();
console.log(fn());

================================================================================
TestSimpleES6
---------- /out.js ----------
// foo.js
function fn() {
  return 123;
}

// entry.js
console.log(fn());

================================================================================
TestSourceMap
---------- /Users/user/project/out.js ----------
// Users/user/project/src/bar.js
function bar() {
  throw new Error("test");
}

// Users/user/project/src/entry.js
function foo() {
  bar();
}
foo();
//# sourceMappingURL=out.js.map

================================================================================
TestStrictModeNestedFnDeclKeepNamesVariableInliningIssue1552
---------- /out/entry.js ----------
export function outer() {
  {
    let inner = function() {
      return Math.random();
    };
    __name(inner, "inner");
    const x = inner();
    console.log(x);
  }
}
__name(outer, "outer"), outer();

================================================================================
TestSwitchScopeNoBundle
---------- /out.js ----------
switch (foo) {
  default:
    var foo;
}
switch (bar) {
  default:
    let a;
}

================================================================================
TestTSAbstractClassFieldUseAssign
---------- /out.js ----------
const keepThis = Symbol("keepThis");
class Foo {
}
keepThis;
(() => new Foo())();

================================================================================
TestTSAbstractClassFieldUseDefine
---------- /out.js ----------
const keepThisToo = Symbol("keepThisToo");
class Foo {
  keepThis;
  [keepThisToo];
}
(() => new Foo())();

================================================================================
TestTSComputedClassFieldUseDefineFalse
---------- /out.js ----------
var _a, _b, _c;
class Foo {
  constructor() {
    this[_a] = s;
    this[_c] = z;
  }
}
q, _a = r, _b = x, _c = y;
__decorateClass([
  dec
], Foo.prototype, _b, 2);
__decorateClass([
  dec
], Foo.prototype, _c, 2);
new Foo();

================================================================================
TestTSComputedClassFieldUseDefineTrue
---------- /out.js ----------
var _a, _b;
class Foo {
  [q];
  [r] = s;
  [_a = x];
  [_b = y] = z;
}
__decorateClass([
  dec
], Foo.prototype, _a, 2);
__decorateClass([
  dec
], Foo.prototype, _b, 2);
new Foo();

================================================================================
TestTSComputedClassFieldUseDefineTrueLower
---------- /out.js ----------
var _a, _b, _c, _d;
class Foo {
  constructor() {
    __publicField(this, _a);
    __publicField(this, _b, s);
    __publicField(this, _c);
    __publicField(this, _d, z);
  }
}
_a = q, _b = r, _c = x, _d = y;
__decorateClass([
  dec
], Foo.prototype, _c, 2);
__decorateClass([
  dec
], Foo.prototype, _d, 2);
new Foo();

================================================================================
TestTSImportCTS
---------- /out.js ----------
// required.cjs
var require_required = __commonJS({
  "required.cjs"() {
    console.log("works");
  }
});

// entry.ts
require_required();

================================================================================
TestTSImportMTS
---------- /out.js ----------
// imported.mts
console.log("works");

================================================================================
TestTSSideEffectsFalseWarningTypeDeclarations
---------- /out.js ----------

================================================================================
TestThisInsideFunction
---------- /out.js ----------
// entry.js
function foo(x = this) {
  console.log(this);
}
var objFoo = {
  foo(x = this) {
    console.log(this);
  }
};
var _Foo = class {
  x = this;
  foo(x = this) {
    console.log(this);
  }
  static bar(x = this) {
    console.log(this);
  }
};
var Foo = _Foo;
__publicField(Foo, "y", _Foo.z);
new Foo(foo(objFoo));
if (nested) {
  let bar = function(x = this) {
    console.log(this);
  };
  bar2 = bar;
  const objBar = {
    foo(x = this) {
      console.log(this);
    }
  };
  class Bar {
    x = this;
    static y = this.z;
    foo(x = this) {
      console.log(this);
    }
    static bar(x = this) {
      console.log(this);
    }
  }
  new Bar(bar(objBar));
}
var bar2;

================================================================================
TestThisInsideFunctionTS
---------- /out.js ----------
// entry.ts
function foo(x = this) {
  console.log(this);
}
var objFoo = {
  foo(x = this) {
    console.log(this);
  }
};
var _Foo = class {
  constructor() {
    this.x = this;
  }
  foo(x = this) {
    console.log(this);
  }
  static bar(x = this) {
    console.log(this);
  }
};
var Foo = _Foo;
Foo.y = _Foo.z;
new Foo(foo(objFoo));
if (nested) {
  let bar = function(x = this) {
    console.log(this);
  };
  bar2 = bar;
  const objBar = {
    foo(x = this) {
      console.log(this);
    }
  };
  const _Bar = class {
    constructor() {
      this.x = this;
    }
    foo(x = this) {
      console.log(this);
    }
    static bar(x = this) {
      console.log(this);
    }
  };
  let Bar = _Bar;
  Bar.y = _Bar.z;
  new Bar(bar(objBar));
}
var bar2;

================================================================================
TestThisInsideFunctionTSNoBundle
---------- /out.js ----------
function foo(x = this) {
  console.log(this);
}
const objFoo = {
  foo(x = this) {
    console.log(this);
  }
};
const _Foo = class {
  constructor() {
    this.x = this;
  }
  foo(x = this) {
    console.log(this);
  }
  static bar(x = this) {
    console.log(this);
  }
};
let Foo = _Foo;
Foo.y = _Foo.z;
new Foo(foo(objFoo));
if (nested) {
  let bar2 = function(x = this) {
    console.log(this);
  };
  var bar = bar2;
  const objBar = {
    foo(x = this) {
      console.log(this);
    }
  };
  const _Bar = class {
    constructor() {
      this.x = this;
    }
    foo(x = this) {
      console.log(this);
    }
    static bar(x = this) {
      console.log(this);
    }
  };
  let Bar = _Bar;
  Bar.y = _Bar.z;
  new Bar(bar2(objBar));
}

================================================================================
TestThisInsideFunctionTSNoBundleUseDefineForClassFields
---------- /out.js ----------
function foo(x = this) {
  console.log(this);
}
const objFoo = {
  foo(x = this) {
    console.log(this);
  }
};
class Foo {
  x = this;
  static y = this.z;
  foo(x = this) {
    console.log(this);
  }
  static bar(x = this) {
    console.log(this);
  }
}
new Foo(foo(objFoo));
if (nested) {
  let bar2 = function(x = this) {
    console.log(this);
  };
  var bar = bar2;
  const objBar = {
    foo(x = this) {
      console.log(this);
    }
  };
  class Bar {
    x = this;
    static y = this.z;
    foo(x = this) {
      console.log(this);
    }
    static bar(x = this) {
      console.log(this);
    }
  }
  new Bar(bar2(objBar));
}

================================================================================
TestThisInsideFunctionTSUseDefineForClassFields
---------- /out.js ----------
// entry.ts
function foo(x = this) {
  console.log(this);
}
var objFoo = {
  foo(x = this) {
    console.log(this);
  }
};
var _Foo = class {
  x = this;
  foo(x = this) {
    console.log(this);
  }
  static bar(x = this) {
    console.log(this);
  }
};
var Foo = _Foo;
__publicField(Foo, "y", _Foo.z);
new Foo(foo(objFoo));
if (nested) {
  let bar = function(x = this) {
    console.log(this);
  };
  bar2 = bar;
  const objBar = {
    foo(x = this) {
      console.log(this);
    }
  };
  class Bar {
    x = this;
    static y = this.z;
    foo(x = this) {
      console.log(this);
    }
    static bar(x = this) {
      console.log(this);
    }
  }
  new Bar(bar(objBar));
}
var bar2;

================================================================================
TestThisOutsideFunction
---------- /out.js ----------
// entry.js
var require_entry = __commonJS({
  "entry.js"(exports) {
    if (shouldBeExportsNotThis) {
      console.log(exports);
      console.log((x = exports) => exports);
      console.log({ x: exports });
      console.log(class extends exports.foo {
      });
      console.log(class {
        [exports.foo];
      });
      console.log(class {
        [exports.foo]() {
        }
      });
      console.log(class {
        static [exports.foo];
      });
      console.log(class {
        static [exports.foo]() {
        }
      });
    }
    if (shouldBeThisNotExports) {
      console.log(class {
        foo = this;
      });
      console.log(class {
        foo() {
          this;
        }
      });
      console.log(class {
        static foo = this;
      });
      console.log(class {
        static foo() {
          this;
        }
      });
    }
  }
});
export default require_entry();

================================================================================
TestThisUndefinedWarningESM
---------- /out/entry.js ----------
// file1.js
var file1_default = [void 0, void 0];

// node_modules/pkg/file2.js
var file2_default = [void 0, void 0];

// entry.js
console.log(file1_default, file2_default);

================================================================================
TestThisWithES6Syntax
---------- /out.js ----------
// cjs.js
var require_cjs = __commonJS({
  "cjs.js"(exports) {
    console.log(exports);
  }
});

// dummy.js
var dummy_exports = {};
__export(dummy_exports, {
  dummy: () => dummy
});
var dummy;
var init_dummy = __esm({
  "dummy.js"() {
    dummy = 123;
  }
});

// es6-import-stmt.js
var require_es6_import_stmt = __commonJS({
  "es6-import-stmt.js"(exports) {
    init_dummy();
    console.log(exports);
  }
});

// es6-import-assign.ts
var require_es6_import_assign = __commonJS({
  "es6-import-assign.ts"(exports) {
    var x2 = (init_dummy(), __toCommonJS(dummy_exports));
    console.log(exports);
  }
});

// es6-import-dynamic.js
var require_es6_import_dynamic = __commonJS({
  "es6-import-dynamic.js"(exports) {
    Promise.resolve().then(() => init_dummy());
    console.log(exports);
  }
});

// es6-expr-import-dynamic.js
var require_es6_expr_import_dynamic = __commonJS({
  "es6-expr-import-dynamic.js"(exports) {
    Promise.resolve().then(() => init_dummy());
    console.log(exports);
  }
});

// es6-export-assign.ts
var require_es6_export_assign = __commonJS({
  "es6-export-assign.ts"(exports, module) {
    console.log(exports);
    module.exports = 123;
  }
});

// es6-ns-export-variable.ts
var require_es6_ns_export_variable = __commonJS({
  "es6-ns-export-variable.ts"(exports) {
    var ns;
    ((ns2) => {
      ns2.foo = 123;
    })(ns || (ns = {}));
    console.log(exports);
  }
});

// es6-ns-export-function.ts
var require_es6_ns_export_function = __commonJS({
  "es6-ns-export-function.ts"(exports) {
    var ns;
    ((ns2) => {
      function foo() {
      }
      ns2.foo = foo;
    })(ns || (ns = {}));
    console.log(exports);
  }
});

// es6-ns-export-async-function.ts
var require_es6_ns_export_async_function = __commonJS({
  "es6-ns-export-async-function.ts"(exports) {
    var ns;
    ((ns2) => {
      async function foo() {
      }
      ns2.foo = foo;
    })(ns || (ns = {}));
    console.log(exports);
  }
});

// es6-ns-export-enum.ts
var require_es6_ns_export_enum = __commonJS({
  "es6-ns-export-enum.ts"(exports) {
    var ns;
    ((ns2) => {
      let Foo;
      ((Foo2) => {
      })(Foo = ns2.Foo || (ns2.Foo = {}));
    })(ns || (ns = {}));
    console.log(exports);
  }
});

// es6-ns-export-const-enum.ts
var require_es6_ns_export_const_enum = __commonJS({
  "es6-ns-export-const-enum.ts"(exports) {
    var ns;
    ((ns2) => {
      let Foo;
      ((Foo2) => {
      })(Foo = ns2.Foo || (ns2.Foo = {}));
    })(ns || (ns = {}));
    console.log(exports);
  }
});

// es6-ns-export-module.ts
var require_es6_ns_export_module = __commonJS({
  "es6-ns-export-module.ts"(exports) {
    console.log(exports);
  }
});

// es6-ns-export-namespace.ts
var require_es6_ns_export_namespace = __commonJS({
  "es6-ns-export-namespace.ts"(exports) {
    console.log(exports);
  }
});

// es6-ns-export-class.ts
var require_es6_ns_export_class = __commonJS({
  "es6-ns-export-class.ts"(exports) {
    var ns;
    ((ns2) => {
      class Foo {
      }
      ns2.Foo = Foo;
    })(ns || (ns = {}));
    console.log(exports);
  }
});

// es6-ns-export-abstract-class.ts
var require_es6_ns_export_abstract_class = __commonJS({
  "es6-ns-export-abstract-class.ts"(exports) {
    var ns;
    ((ns2) => {
      class Foo {
      }
      ns2.Foo = Foo;
    })(ns || (ns = {}));
    console.log(exports);
  }
});

// entry.js
var import_cjs = __toESM(require_cjs());
var import_es6_import_stmt = __toESM(require_es6_import_stmt());
var import_es6_import_assign = __toESM(require_es6_import_assign());
var import_es6_import_dynamic = __toESM(require_es6_import_dynamic());

// es6-import-meta.js
console.log(void 0);

// entry.js
var import_es6_expr_import_dynamic = __toESM(require_es6_expr_import_dynamic());

// es6-expr-import-meta.js
console.log(void 0);

// es6-export-variable.js
console.log(void 0);

// es6-export-function.js
console.log(void 0);

// es6-export-async-function.js
console.log(void 0);

// es6-export-enum.ts
console.log(void 0);

// es6-export-const-enum.ts
console.log(void 0);

// es6-export-module.ts
console.log(void 0);

// es6-export-namespace.ts
console.log(void 0);

// es6-export-class.js
console.log(void 0);

// es6-export-abstract-class.ts
console.log(void 0);

// es6-export-default.js
console.log(void 0);

// es6-export-clause.js
console.log(void 0);

// es6-export-clause-from.js
init_dummy();
console.log(void 0);

// es6-export-star.js
init_dummy();
console.log(void 0);

// es6-export-star-as.js
init_dummy();
console.log(void 0);

// entry.js
var import_es6_export_assign = __toESM(require_es6_export_assign());

// es6-export-import-assign.ts
var x = (init_dummy(), __toCommonJS(dummy_exports));
console.log(void 0);

// entry.js
var import_es6_ns_export_variable = __toESM(require_es6_ns_export_variable());
var import_es6_ns_export_function = __toESM(require_es6_ns_export_function());
var import_es6_ns_export_async_function = __toESM(require_es6_ns_export_async_function());
var import_es6_ns_export_enum = __toESM(require_es6_ns_export_enum());
var import_es6_ns_export_const_enum = __toESM(require_es6_ns_export_const_enum());
var import_es6_ns_export_module = __toESM(require_es6_ns_export_module());
var import_es6_ns_export_namespace = __toESM(require_es6_ns_export_namespace());
var import_es6_ns_export_class = __toESM(require_es6_ns_export_class());
var import_es6_ns_export_abstract_class = __toESM(require_es6_ns_export_abstract_class());

================================================================================
TestTopLevelAwaitAllowedImportWithSplitting
---------- /out/entry.js ----------
// entry.js
import("./a-3BAWOBN3.js");
import("./b-2IGVSUS7.js");
import("./c-DMBKURS2.js");
require_entry();
await 0;

---------- /out/c-DMBKURS2.js ----------
import "./chunk-GETF6B5C.js";

---------- /out/b-2IGVSUS7.js ----------
import "./chunk-QJYGFXJG.js";
import "./chunk-GETF6B5C.js";

---------- /out/a-3BAWOBN3.js ----------
import "./chunk-QJYGFXJG.js";
import "./chunk-GETF6B5C.js";

---------- /out/chunk-QJYGFXJG.js ----------

---------- /out/chunk-GETF6B5C.js ----------
// c.js
await 0;

================================================================================
TestTopLevelAwaitAllowedImportWithoutSplitting
---------- /out.js ----------
// c.js
var c_exports = {};
var init_c = __esm({
  async "c.js"() {
    await 0;
  }
});

// b.js
var b_exports = {};
var init_b = __esm({
  async "b.js"() {
    await init_c();
  }
});

// a.js
var a_exports = {};
var init_a = __esm({
  async "a.js"() {
    await init_b();
  }
});

// entry.js
var entry_exports = {};
var init_entry = __esm({
  async "entry.js"() {
    init_a();
    init_b();
    init_c();
    init_entry();
    await 0;
  }
});
await init_entry();

================================================================================
TestTopLevelAwaitESM
---------- /out.js ----------
// entry.js
await foo;
for await (foo of bar)
  ;

================================================================================
TestTopLevelAwaitNoBundle
---------- /out.js ----------
await foo;
for await (foo of bar)
  ;

================================================================================
TestTopLevelAwaitNoBundleES6
---------- /out.js ----------
await foo;
for await (foo of bar)
  ;

================================================================================
TestUseStrictDirectiveBundleCJSIssue2264
---------- /out.js ----------
"use strict";

// entry.js
var entry_exports = {};
__export(entry_exports, {
  a: () => a
});
module.exports = __toCommonJS(entry_exports);
var a = 1;

================================================================================
TestUseStrictDirectiveBundleESMIssue2264
---------- /out.js ----------
// entry.js
var a = 1;
export {
  a
};

================================================================================
TestUseStrictDirectiveBundleIIFEIssue2264
---------- /out.js ----------
"use strict";
(() => {
  // entry.js
  var a = 1;
})();

================================================================================
TestUseStrictDirectiveBundleIssue1837
---------- /out.js ----------
(() => {
  // shims.js
  var import_process;
  var init_shims = __esm({
    "shims.js"() {
      import_process = __toESM(__require("process"));
    }
  });

  // cjs.js
  var require_cjs = __commonJS({
    "cjs.js"(exports) {
      "use strict";
      init_shims();
      exports.foo = import_process.default;
    }
  });

  // entry.js
  init_shims();
  console.log(require_cjs());
})();

================================================================================
TestUseStrictDirectiveMinifyNoBundle
---------- /out.js ----------
"use strict";a,b;

================================================================================
TestWarningsInsideNodeModules
---------- /out.js ----------
// return-asi.js
var require_return_asi = __commonJS({
  "return-asi.js"() {
    return;
  }
});

// node_modules/return-asi.js
var require_return_asi2 = __commonJS({
  "node_modules/return-asi.js"() {
    return;
  }
});

// plugin-dir/node_modules/return-asi.js
var require_return_asi3 = __commonJS({
  "plugin-dir/node_modules/return-asi.js"() {
    return;
  }
});

// dup-case.js
switch (x) {
  case 0:
  case 0:
}

// node_modules/dup-case.js
switch (x) {
  case 0:
  case 0:
}

// plugin-dir/node_modules/dup-case.js
switch (x) {
  case 0:
  case 0:
}

// not-in.js
!a in b;

// node_modules/not-in.js
!a in b;

// plugin-dir/node_modules/not-in.js
!a in b;

// not-instanceof.js
!a instanceof b;

// node_modules/not-instanceof.js
!a instanceof b;

// plugin-dir/node_modules/not-instanceof.js
!a instanceof b;

// entry.js
var import_return_asi = __toESM(require_return_asi());
var import_return_asi2 = __toESM(require_return_asi2());
var import_return_asi3 = __toESM(require_return_asi3());

// equals-neg-zero.js
x === -0;

// node_modules/equals-neg-zero.js
x === -0;

// plugin-dir/node_modules/equals-neg-zero.js
x === -0;

// equals-nan.js
x === NaN;

// node_modules/equals-nan.js
x === NaN;

// plugin-dir/node_modules/equals-nan.js
x === NaN;

// equals-object.js
x === [];

// node_modules/equals-object.js
x === [];

// plugin-dir/node_modules/equals-object.js
x === [];

// delete-super.js
var Foo = class extends Bar {
  foo() {
    delete super.foo;
  }
};

// node_modules/delete-super.js
var Foo2 = class extends Bar {
  foo() {
    delete super.foo;
  }
};

// plugin-dir/node_modules/delete-super.js
var Foo3 = class extends Bar {
  foo() {
    delete super.foo;
  }
};

================================================================================
TestWithStatementTaintingNoBundle
---------- /out.js ----------
(() => {
  let e = 1;
  let outer = 2;
  let outerDead = 3;
  with ({}) {
    var hoisted = 4;
    let t = 5;
    hoisted++;
    t++;
    if (1)
      outer++;
    if (0)
      outerDead++;
  }
  if (1) {
    hoisted++;
    e++;
    outer++;
    outerDead++;
  }
})();
