@storm-software/esbuild 0.35.3 → 0.35.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +1 -2
  2. package/dist/assets.cjs +6 -5
  3. package/dist/assets.js +5 -4
  4. package/dist/build.cjs +14 -13
  5. package/dist/build.js +13 -12
  6. package/dist/{chunk-FQQYNAPT.cjs → chunk-2DAVPJ7D.cjs} +126 -82
  7. package/dist/{chunk-EVDNG72R.cjs → chunk-2SU3HI5Q.cjs} +65 -35
  8. package/dist/{chunk-4D6ICA75.js → chunk-347I4FKJ.js} +5 -36
  9. package/dist/{chunk-VTBMJYSM.cjs → chunk-6WPLL2C2.cjs} +8 -6
  10. package/dist/{chunk-TSQT5MWW.js → chunk-6YDZYQLV.js} +32 -2
  11. package/dist/{chunk-G66JI4BS.cjs → chunk-AEHXBLG2.cjs} +9 -5
  12. package/dist/{chunk-SLSBBNRF.cjs → chunk-C23H24WU.cjs} +7 -3
  13. package/dist/{chunk-CVOQEYHW.cjs → chunk-CQGBWOR4.cjs} +29 -27
  14. package/dist/{chunk-NJJBR57W.js → chunk-DK7FJ3YJ.js} +47 -3
  15. package/dist/{chunk-2CM3VAO5.cjs → chunk-EP4M3VJ3.cjs} +16 -12
  16. package/dist/{chunk-PTHYT3U2.cjs → chunk-FBR7AR6F.cjs} +463 -372
  17. package/dist/{chunk-ABRK5MYP.js → chunk-FWIPARM7.js} +6 -2
  18. package/dist/{chunk-WXURMFT7.js → chunk-IGG5GIIV.js} +5 -1
  19. package/dist/{chunk-R2KKGNQL.js → chunk-MFZUNTR7.js} +8 -4
  20. package/dist/chunk-N3AYB46G.cjs +6 -0
  21. package/dist/{chunk-RK34D7S5.cjs → chunk-N5MGZ2YM.cjs} +8 -6
  22. package/dist/{chunk-EBTMX5WL.js → chunk-ODOBFGX6.js} +11 -9
  23. package/dist/{chunk-WLJT52I3.cjs → chunk-POL6NUTY.cjs} +21 -17
  24. package/dist/{chunk-EDLA3ZZN.js → chunk-QNVXA3GL.js} +6 -4
  25. package/dist/{chunk-YHMM6RY5.cjs → chunk-RIGD2PFD.cjs} +11 -42
  26. package/dist/{chunk-QWTKBUQW.js → chunk-RT5QOWTF.js} +1024 -1022
  27. package/dist/chunk-SJESTPEC.cjs +49 -0
  28. package/dist/{chunk-QVMJLFU5.cjs → chunk-T2DBJGI2.cjs} +9 -7
  29. package/dist/chunk-V5SXPYDB.js +56 -0
  30. package/dist/{chunk-OCDIIBBZ.js → chunk-VW5VOVX7.js} +5 -3
  31. package/dist/{chunk-DNZNN5SK.js → chunk-WCXP7IBU.js} +5 -3
  32. package/dist/chunk-X3XWFR6F.js +6 -0
  33. package/dist/{chunk-ECCVVXNX.js → chunk-XWGV6MFZ.js} +10 -6
  34. package/dist/clean.cjs +5 -4
  35. package/dist/clean.js +4 -3
  36. package/dist/config.cjs +6 -5
  37. package/dist/config.js +5 -4
  38. package/dist/context.cjs +8 -7
  39. package/dist/context.js +7 -6
  40. package/dist/index.cjs +20 -14
  41. package/dist/index.js +19 -13
  42. package/dist/package-json.cjs +6 -5
  43. package/dist/package-json.js +5 -4
  44. package/dist/plugins/deps-check.cjs +5 -4
  45. package/dist/plugins/deps-check.js +4 -3
  46. package/dist/plugins/resolve-paths.cjs +4 -3
  47. package/dist/plugins/resolve-paths.js +3 -2
  48. package/dist/tsup.cjs +5 -4
  49. package/dist/tsup.js +4 -3
  50. package/dist/types.cjs +2 -1
  51. package/dist/types.js +2 -1
  52. package/dist/watch.cjs +15 -11
  53. package/dist/watch.js +7 -3
  54. package/package.json +4 -4
  55. package/dist/chunk-GGNOJ77I.js +0 -0
  56. package/dist/chunk-SFZRYJZ2.cjs +0 -1
@@ -1,41 +1,46 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain3(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkEVDNG72Rcjs = require('./chunk-EVDNG72R.cjs');
4
+ var _chunk2SU3HI5Qcjs = require('./chunk-2SU3HI5Q.cjs');
5
5
 
6
6
 
7
+ var _chunkRIGD2PFDcjs = require('./chunk-RIGD2PFD.cjs');
7
8
 
8
9
 
9
10
 
10
11
 
11
- var _chunkYHMM6RY5cjs = require('./chunk-YHMM6RY5.cjs');
12
12
 
13
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-BYH4XDRH.js
14
- var require_chunk_BYH4XDRH = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
15
- "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-BYH4XDRH.js"(exports) {
13
+
14
+ var _chunkSJESTPECcjs = require('./chunk-SJESTPEC.cjs');
15
+
16
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-BYH4XDRH.js
17
+ var require_chunk_BYH4XDRH = _chunkSJESTPECcjs.__commonJS.call(void 0, {
18
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-BYH4XDRH.js"(exports2) {
16
19
  "use strict";
17
- Object.defineProperty(exports, "__esModule", {
20
+ _chunkSJESTPECcjs.init_cjs_shims.call(void 0, );
21
+ Object.defineProperty(exports2, "__esModule", {
18
22
  value: true
19
23
  });
20
24
  var version = "8.4.0";
21
- exports.version = version;
25
+ exports2.version = version;
22
26
  }
23
27
  });
24
28
 
25
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-TWFEYLU4.js
26
- var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
27
- "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-TWFEYLU4.js"(exports) {
29
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-TWFEYLU4.js
30
+ var require_chunk_TWFEYLU4 = _chunkSJESTPECcjs.__commonJS.call(void 0, {
31
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-TWFEYLU4.js"(exports2) {
28
32
  "use strict";
29
- Object.defineProperty(exports, "__esModule", {
33
+ _chunkSJESTPECcjs.init_cjs_shims.call(void 0, );
34
+ Object.defineProperty(exports2, "__esModule", {
30
35
  value: true
31
36
  });
32
- function _interopRequireDefault(obj) {
37
+ function _interopRequireDefault2(obj) {
33
38
  return obj && obj.__esModule ? obj : {
34
39
  default: obj
35
40
  };
36
41
  }
37
- _chunkYHMM6RY5cjs.__name.call(void 0, _interopRequireDefault, "_interopRequireDefault");
38
- function _optionalChain(ops) {
42
+ _chunkSJESTPECcjs.__name.call(void 0, _interopRequireDefault2, "_interopRequireDefault");
43
+ function _optionalChain2(ops) {
39
44
  let lastAccessLHS = void 0;
40
45
  let value = ops[0];
41
46
  let i = 1;
@@ -50,40 +55,40 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
50
55
  lastAccessLHS = value;
51
56
  value = fn(value);
52
57
  } else if (op === "call" || op === "optionalCall") {
53
- value = fn((...args) => value.call(lastAccessLHS, ...args));
58
+ value = fn((...args2) => value.call(lastAccessLHS, ...args2));
54
59
  lastAccessLHS = void 0;
55
60
  }
56
61
  }
57
62
  return value;
58
63
  }
59
- _chunkYHMM6RY5cjs.__name.call(void 0, _optionalChain, "_optionalChain");
64
+ _chunkSJESTPECcjs.__name.call(void 0, _optionalChain2, "_optionalChain");
60
65
  var __create = Object.create;
61
66
  var __defProp = Object.defineProperty;
62
67
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
63
68
  var __getOwnPropNames = Object.getOwnPropertyNames;
64
69
  var __getProtoOf = Object.getPrototypeOf;
65
70
  var __hasOwnProp = Object.prototype.hasOwnProperty;
66
- var __require2 = /* @__PURE__ */ ((x) => typeof _chunkYHMM6RY5cjs.__require !== "undefined" ? _chunkYHMM6RY5cjs.__require : typeof Proxy !== "undefined" ? new Proxy(x, {
67
- get: /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (a, b) => (typeof _chunkYHMM6RY5cjs.__require !== "undefined" ? _chunkYHMM6RY5cjs.__require : a)[b], "get")
71
+ var __require2 = /* @__PURE__ */ ((x) => typeof _chunkSJESTPECcjs.__require !== "undefined" ? _chunkSJESTPECcjs.__require : typeof Proxy !== "undefined" ? new Proxy(x, {
72
+ get: /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (a, b) => (typeof _chunkSJESTPECcjs.__require !== "undefined" ? _chunkSJESTPECcjs.__require : a)[b], "get")
68
73
  }) : x)(function(x) {
69
- if (typeof _chunkYHMM6RY5cjs.__require !== "undefined") return _chunkYHMM6RY5cjs.__require.apply(this, arguments);
74
+ if (typeof _chunkSJESTPECcjs.__require !== "undefined") return _chunkSJESTPECcjs.__require.apply(this, arguments);
70
75
  throw Error('Dynamic require of "' + x + '" is not supported');
71
76
  });
72
- var __commonJS2 = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (cb, mod) => /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, function __require22() {
77
+ var __commonJS2 = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (cb, mod) => /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, function __require22() {
73
78
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
74
79
  exports: {}
75
80
  }).exports, mod), mod.exports;
76
81
  }, "__require2"), "__commonJS");
77
- var __copyProps = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (to, from, except, desc) => {
82
+ var __copyProps = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (to, from, except, desc) => {
78
83
  if (from && typeof from === "object" || typeof from === "function") {
79
84
  for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
80
- get: /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => from[key], "get"),
85
+ get: /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => from[key], "get"),
81
86
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
82
87
  });
83
88
  }
84
89
  return to;
85
90
  }, "__copyProps");
86
- var __toESM2 = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
91
+ var __toESM2 = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
87
92
  // If the importer is in node compatibility mode or this is not an ESM
88
93
  // file that has been converted to a CommonJS file using a Babel-
89
94
  // compatible transform (i.e. "__esModule" has not been set), then set
@@ -94,17 +99,17 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
94
99
  }) : target,
95
100
  mod
96
101
  )), "__toESM");
97
- var _fs = _chunkYHMM6RY5cjs.__require.call(void 0, "fs");
98
- var _fs2 = _interopRequireDefault(_fs);
99
- var _path = _chunkYHMM6RY5cjs.__require.call(void 0, "path");
100
- var _path2 = _interopRequireDefault(_path);
101
- var _resolvefrom = _chunkYHMM6RY5cjs.__require.call(void 0, "resolve-from");
102
- var _resolvefrom2 = _interopRequireDefault(_resolvefrom);
102
+ var _fs3 = _chunkSJESTPECcjs.__require.call(void 0, "fs");
103
+ var _fs22 = _interopRequireDefault2(_fs3);
104
+ var _path3 = _chunkSJESTPECcjs.__require.call(void 0, "path");
105
+ var _path22 = _interopRequireDefault2(_path3);
106
+ var _resolvefrom = _chunkSJESTPECcjs.__require.call(void 0, "resolve-from");
107
+ var _resolvefrom2 = _interopRequireDefault2(_resolvefrom);
103
108
  var singleComment = Symbol("singleComment");
104
109
  var multiComment = Symbol("multiComment");
105
- var stripWithoutWhitespace = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => "", "stripWithoutWhitespace");
106
- var stripWithWhitespace = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (string, start, end) => string.slice(start, end).replace(/\S/g, " "), "stripWithWhitespace");
107
- var isEscaped = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (jsonString, quotePosition) => {
110
+ var stripWithoutWhitespace = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => "", "stripWithoutWhitespace");
111
+ var stripWithWhitespace = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (string, start, end) => string.slice(start, end).replace(/\S/g, " "), "stripWithWhitespace");
112
+ var isEscaped = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (jsonString, quotePosition) => {
108
113
  let index = quotePosition - 1;
109
114
  let backslashCount = 0;
110
115
  while (jsonString[index] === "\\") {
@@ -120,7 +125,7 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
120
125
  const strip = whitespace ? stripWithWhitespace : stripWithoutWhitespace;
121
126
  let isInsideString = false;
122
127
  let isInsideComment = false;
123
- let offset = 0;
128
+ let offset2 = 0;
124
129
  let buffer = "";
125
130
  let result = "";
126
131
  let commaIndex = -1;
@@ -137,93 +142,93 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
137
142
  continue;
138
143
  }
139
144
  if (!isInsideComment && currentCharacter + nextCharacter === "//") {
140
- buffer += jsonString.slice(offset, index);
141
- offset = index;
145
+ buffer += jsonString.slice(offset2, index);
146
+ offset2 = index;
142
147
  isInsideComment = singleComment;
143
148
  index++;
144
149
  } else if (isInsideComment === singleComment && currentCharacter + nextCharacter === "\r\n") {
145
150
  index++;
146
151
  isInsideComment = false;
147
- buffer += strip(jsonString, offset, index);
148
- offset = index;
152
+ buffer += strip(jsonString, offset2, index);
153
+ offset2 = index;
149
154
  continue;
150
155
  } else if (isInsideComment === singleComment && currentCharacter === "\n") {
151
156
  isInsideComment = false;
152
- buffer += strip(jsonString, offset, index);
153
- offset = index;
157
+ buffer += strip(jsonString, offset2, index);
158
+ offset2 = index;
154
159
  } else if (!isInsideComment && currentCharacter + nextCharacter === "/*") {
155
- buffer += jsonString.slice(offset, index);
156
- offset = index;
160
+ buffer += jsonString.slice(offset2, index);
161
+ offset2 = index;
157
162
  isInsideComment = multiComment;
158
163
  index++;
159
164
  continue;
160
165
  } else if (isInsideComment === multiComment && currentCharacter + nextCharacter === "*/") {
161
166
  index++;
162
167
  isInsideComment = false;
163
- buffer += strip(jsonString, offset, index + 1);
164
- offset = index + 1;
168
+ buffer += strip(jsonString, offset2, index + 1);
169
+ offset2 = index + 1;
165
170
  continue;
166
171
  } else if (trailingCommas && !isInsideComment) {
167
172
  if (commaIndex !== -1) {
168
173
  if (currentCharacter === "}" || currentCharacter === "]") {
169
- buffer += jsonString.slice(offset, index);
174
+ buffer += jsonString.slice(offset2, index);
170
175
  result += strip(buffer, 0, 1) + buffer.slice(1);
171
176
  buffer = "";
172
- offset = index;
177
+ offset2 = index;
173
178
  commaIndex = -1;
174
179
  } else if (currentCharacter !== " " && currentCharacter !== " " && currentCharacter !== "\r" && currentCharacter !== "\n") {
175
- buffer += jsonString.slice(offset, index);
176
- offset = index;
180
+ buffer += jsonString.slice(offset2, index);
181
+ offset2 = index;
177
182
  commaIndex = -1;
178
183
  }
179
184
  } else if (currentCharacter === ",") {
180
- result += buffer + jsonString.slice(offset, index);
185
+ result += buffer + jsonString.slice(offset2, index);
181
186
  buffer = "";
182
- offset = index;
187
+ offset2 = index;
183
188
  commaIndex = index;
184
189
  }
185
190
  }
186
191
  }
187
- return result + buffer + (isInsideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset));
192
+ return result + buffer + (isInsideComment ? strip(jsonString.slice(offset2)) : jsonString.slice(offset2));
188
193
  }
189
- _chunkYHMM6RY5cjs.__name.call(void 0, stripJsonComments, "stripJsonComments");
190
- var _tinyglobby = _chunkYHMM6RY5cjs.__require.call(void 0, "tinyglobby");
194
+ _chunkSJESTPECcjs.__name.call(void 0, stripJsonComments, "stripJsonComments");
195
+ var _tinyglobby2 = _chunkSJESTPECcjs.__require.call(void 0, "tinyglobby");
191
196
  function getPostcss() {
192
197
  return localRequire("postcss");
193
198
  }
194
- _chunkYHMM6RY5cjs.__name.call(void 0, getPostcss, "getPostcss");
199
+ _chunkSJESTPECcjs.__name.call(void 0, getPostcss, "getPostcss");
195
200
  function getApiExtractor() {
196
201
  return localRequire("@microsoft/api-extractor");
197
202
  }
198
- _chunkYHMM6RY5cjs.__name.call(void 0, getApiExtractor, "getApiExtractor");
203
+ _chunkSJESTPECcjs.__name.call(void 0, getApiExtractor, "getApiExtractor");
199
204
  function localRequire(moduleName) {
200
205
  const p = _resolvefrom2.default.silent(process.cwd(), moduleName);
201
206
  return p && __require2(p);
202
207
  }
203
- _chunkYHMM6RY5cjs.__name.call(void 0, localRequire, "localRequire");
208
+ _chunkSJESTPECcjs.__name.call(void 0, localRequire, "localRequire");
204
209
  async function removeFiles(patterns, dir) {
205
- const files = await _tinyglobby.glob.call(void 0, patterns, {
210
+ const files = await _tinyglobby2.glob.call(void 0, patterns, {
206
211
  cwd: dir,
207
212
  absolute: true
208
213
  });
209
- files.forEach((file) => _fs2.default.existsSync(file) && _fs2.default.unlinkSync(file));
214
+ files.forEach((file) => _fs22.default.existsSync(file) && _fs22.default.unlinkSync(file));
210
215
  }
211
- _chunkYHMM6RY5cjs.__name.call(void 0, removeFiles, "removeFiles");
216
+ _chunkSJESTPECcjs.__name.call(void 0, removeFiles, "removeFiles");
212
217
  function debouncePromise(fn, delay, onError) {
213
218
  let timeout;
214
219
  let promiseInFly;
215
220
  let callbackPending;
216
- return /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, function debounced(...args) {
221
+ return /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, function debounced(...args2) {
217
222
  if (promiseInFly) {
218
- callbackPending = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
219
- debounced(...args);
223
+ callbackPending = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
224
+ debounced(...args2);
220
225
  callbackPending = void 0;
221
226
  }, "callbackPending");
222
227
  } else {
223
228
  if (timeout != null) clearTimeout(timeout);
224
229
  timeout = setTimeout(() => {
225
230
  timeout = void 0;
226
- promiseInFly = fn(...args).catch(onError).finally(() => {
231
+ promiseInFly = fn(...args2).catch(onError).finally(() => {
227
232
  promiseInFly = void 0;
228
233
  if (callbackPending) callbackPending();
229
234
  });
@@ -231,7 +236,7 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
231
236
  }
232
237
  }, "debounced");
233
238
  }
234
- _chunkYHMM6RY5cjs.__name.call(void 0, debouncePromise, "debouncePromise");
239
+ _chunkSJESTPECcjs.__name.call(void 0, debouncePromise, "debouncePromise");
235
240
  function slash(path2) {
236
241
  const isExtendedLengthPath = path2.startsWith("\\\\?\\");
237
242
  if (isExtendedLengthPath) {
@@ -239,11 +244,11 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
239
244
  }
240
245
  return path2.replace(/\\/g, "/");
241
246
  }
242
- _chunkYHMM6RY5cjs.__name.call(void 0, slash, "slash");
247
+ _chunkSJESTPECcjs.__name.call(void 0, slash, "slash");
243
248
  function truthy(value) {
244
249
  return Boolean(value);
245
250
  }
246
- _chunkYHMM6RY5cjs.__name.call(void 0, truthy, "truthy");
251
+ _chunkSJESTPECcjs.__name.call(void 0, truthy, "truthy");
247
252
  function jsoncParse(data) {
248
253
  try {
249
254
  return new Function(`return ${stripJsonComments(data).trim()}`)();
@@ -251,7 +256,7 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
251
256
  return {};
252
257
  }
253
258
  }
254
- _chunkYHMM6RY5cjs.__name.call(void 0, jsoncParse, "jsoncParse");
259
+ _chunkSJESTPECcjs.__name.call(void 0, jsoncParse, "jsoncParse");
255
260
  function defaultOutExtension({ format, pkgType }) {
256
261
  let jsExtension = ".js";
257
262
  let dtsExtension = ".d.ts";
@@ -272,22 +277,22 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
272
277
  dts: dtsExtension
273
278
  };
274
279
  }
275
- _chunkYHMM6RY5cjs.__name.call(void 0, defaultOutExtension, "defaultOutExtension");
280
+ _chunkSJESTPECcjs.__name.call(void 0, defaultOutExtension, "defaultOutExtension");
276
281
  function ensureTempDeclarationDir(options2) {
277
- const cwd = _optionalChain2([options2, 'access', _40 => _40.workspaceConfig, 'optionalAccess', _41 => _41.workspaceRoot]) || process.cwd();
278
- const dirPath = _path2.default.join(cwd, ".tsup", "declaration");
279
- if (_fs2.default.existsSync(dirPath)) {
282
+ const cwd = _optionalChain3([options2, 'access', _40 => _40.workspaceConfig, 'optionalAccess', _41 => _41.workspaceRoot]) || process.cwd();
283
+ const dirPath = _path22.default.join(cwd, ".tsup", "declaration");
284
+ if (_fs22.default.existsSync(dirPath)) {
280
285
  return dirPath;
281
286
  }
282
- _fs2.default.mkdirSync(dirPath, {
287
+ _fs22.default.mkdirSync(dirPath, {
283
288
  recursive: true
284
289
  });
285
- const gitIgnorePath = _path2.default.join(cwd, ".tsup", ".gitignore");
290
+ const gitIgnorePath = _path22.default.join(cwd, ".tsup", ".gitignore");
286
291
  writeFileSync(gitIgnorePath, "**/*\n");
287
292
  return dirPath;
288
293
  }
289
- _chunkYHMM6RY5cjs.__name.call(void 0, ensureTempDeclarationDir, "ensureTempDeclarationDir");
290
- var toObjectEntry = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (entry) => {
294
+ _chunkSJESTPECcjs.__name.call(void 0, ensureTempDeclarationDir, "ensureTempDeclarationDir");
295
+ var toObjectEntry = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (entry) => {
291
296
  if (typeof entry === "string") {
292
297
  entry = [
293
298
  entry
@@ -306,7 +311,7 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
306
311
  };
307
312
  }, {});
308
313
  }, "toObjectEntry");
309
- var findLowestCommonAncestor = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (filepaths) => {
314
+ var findLowestCommonAncestor = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (filepaths) => {
310
315
  if (filepaths.length <= 1) return "";
311
316
  const [first, ...rest] = filepaths;
312
317
  let ancestor = first.split("/");
@@ -326,19 +331,19 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
326
331
  return ancestor.length <= 1 && ancestor[0] === "" ? `/${ancestor[0]}` : ancestor.join("/");
327
332
  }, "findLowestCommonAncestor");
328
333
  function toAbsolutePath(p, cwd) {
329
- if (_path2.default.isAbsolute(p)) {
334
+ if (_path22.default.isAbsolute(p)) {
330
335
  return p;
331
336
  }
332
- return slash(_path2.default.normalize(_path2.default.join(cwd || process.cwd(), p)));
337
+ return slash(_path22.default.normalize(_path22.default.join(cwd || process.cwd(), p)));
333
338
  }
334
- _chunkYHMM6RY5cjs.__name.call(void 0, toAbsolutePath, "toAbsolutePath");
339
+ _chunkSJESTPECcjs.__name.call(void 0, toAbsolutePath, "toAbsolutePath");
335
340
  function writeFileSync(filePath, content) {
336
- _fs2.default.mkdirSync(_path2.default.dirname(filePath), {
341
+ _fs22.default.mkdirSync(_path22.default.dirname(filePath), {
337
342
  recursive: true
338
343
  });
339
- _fs2.default.writeFileSync(filePath, content);
344
+ _fs22.default.writeFileSync(filePath, content);
340
345
  }
341
- _chunkYHMM6RY5cjs.__name.call(void 0, writeFileSync, "writeFileSync");
346
+ _chunkSJESTPECcjs.__name.call(void 0, writeFileSync, "writeFileSync");
342
347
  function replaceDtsWithJsExtensions(dtsFilePath) {
343
348
  return dtsFilePath.replace(/\.d\.(ts|mts|cts)$/, (_, fileExtension) => {
344
349
  switch (fileExtension) {
@@ -353,20 +358,20 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
353
358
  }
354
359
  });
355
360
  }
356
- _chunkYHMM6RY5cjs.__name.call(void 0, replaceDtsWithJsExtensions, "replaceDtsWithJsExtensions");
357
- var convertArrayEntriesToObjectEntries = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (arrayOfEntries) => {
361
+ _chunkSJESTPECcjs.__name.call(void 0, replaceDtsWithJsExtensions, "replaceDtsWithJsExtensions");
362
+ var convertArrayEntriesToObjectEntries = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (arrayOfEntries) => {
358
363
  const objectEntries = Object.fromEntries(arrayOfEntries.map((entry) => [
359
- _path2.default.posix.join(...entry.split(_path2.default.posix.sep).slice(1, -1).concat(_path2.default.parse(entry).name)),
364
+ _path22.default.posix.join(...entry.split(_path22.default.posix.sep).slice(1, -1).concat(_path22.default.parse(entry).name)),
360
365
  entry
361
366
  ]));
362
367
  return objectEntries;
363
368
  }, "convertArrayEntriesToObjectEntries");
364
- var resolveEntryPaths = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (entryPaths) => {
365
- const resolvedEntryPaths = typeof entryPaths === "string" || Array.isArray(entryPaths) ? convertArrayEntriesToObjectEntries(await _tinyglobby.glob.call(void 0, entryPaths)) : entryPaths;
369
+ var resolveEntryPaths = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async (entryPaths) => {
370
+ const resolvedEntryPaths = typeof entryPaths === "string" || Array.isArray(entryPaths) ? convertArrayEntriesToObjectEntries(await _tinyglobby2.glob.call(void 0, entryPaths)) : entryPaths;
366
371
  return resolvedEntryPaths;
367
372
  }, "resolveEntryPaths");
368
- var resolveExperimentalDtsConfig = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (options2, tsconfig) => {
369
- const resolvedEntryPaths = await resolveEntryPaths(_optionalChain([
373
+ var resolveExperimentalDtsConfig = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async (options2, tsconfig) => {
374
+ const resolvedEntryPaths = await resolveEntryPaths(_optionalChain2([
370
375
  options2,
371
376
  "access",
372
377
  (_2) => _2.experimentalDts,
@@ -377,7 +382,7 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
377
382
  const normalizedExperimentalDtsConfig = {
378
383
  compilerOptions: {
379
384
  ...tsconfig.data.compilerOptions || {},
380
- ..._optionalChain([
385
+ ..._optionalChain2([
381
386
  options2,
382
387
  "access",
383
388
  (_4) => _4.experimentalDts,
@@ -389,7 +394,7 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
389
394
  };
390
395
  return normalizedExperimentalDtsConfig;
391
396
  }, "resolveExperimentalDtsConfig");
392
- var resolveInitialExperimentalDtsConfig = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (experimentalDts) => {
397
+ var resolveInitialExperimentalDtsConfig = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async (experimentalDts) => {
393
398
  if (experimentalDts == null) {
394
399
  return;
395
400
  }
@@ -398,54 +403,55 @@ var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
398
403
  } : void 0;
399
404
  if (typeof experimentalDts === "string") {
400
405
  return {
401
- entry: convertArrayEntriesToObjectEntries(await _tinyglobby.glob.call(void 0, experimentalDts))
406
+ entry: convertArrayEntriesToObjectEntries(await _tinyglobby2.glob.call(void 0, experimentalDts))
402
407
  };
403
408
  }
404
409
  return {
405
410
  ...experimentalDts,
406
- entry: _optionalChain([
411
+ entry: _optionalChain2([
407
412
  experimentalDts,
408
413
  "optionalAccess",
409
414
  (_6) => _6.entry
410
415
  ]) == null ? {} : await resolveEntryPaths(experimentalDts.entry)
411
416
  };
412
417
  }, "resolveInitialExperimentalDtsConfig");
413
- exports.__require = __require2;
414
- exports.__commonJS = __commonJS2;
415
- exports.__toESM = __toESM2;
416
- exports.getPostcss = getPostcss;
417
- exports.getApiExtractor = getApiExtractor;
418
- exports.localRequire = localRequire;
419
- exports.removeFiles = removeFiles;
420
- exports.debouncePromise = debouncePromise;
421
- exports.slash = slash;
422
- exports.truthy = truthy;
423
- exports.jsoncParse = jsoncParse;
424
- exports.defaultOutExtension = defaultOutExtension;
425
- exports.ensureTempDeclarationDir = ensureTempDeclarationDir;
426
- exports.toObjectEntry = toObjectEntry;
427
- exports.toAbsolutePath = toAbsolutePath;
428
- exports.writeFileSync = writeFileSync;
429
- exports.replaceDtsWithJsExtensions = replaceDtsWithJsExtensions;
430
- exports.resolveExperimentalDtsConfig = resolveExperimentalDtsConfig;
431
- exports.resolveInitialExperimentalDtsConfig = resolveInitialExperimentalDtsConfig;
418
+ exports2.__require = __require2;
419
+ exports2.__commonJS = __commonJS2;
420
+ exports2.__toESM = __toESM2;
421
+ exports2.getPostcss = getPostcss;
422
+ exports2.getApiExtractor = getApiExtractor;
423
+ exports2.localRequire = localRequire;
424
+ exports2.removeFiles = removeFiles;
425
+ exports2.debouncePromise = debouncePromise;
426
+ exports2.slash = slash;
427
+ exports2.truthy = truthy;
428
+ exports2.jsoncParse = jsoncParse;
429
+ exports2.defaultOutExtension = defaultOutExtension;
430
+ exports2.ensureTempDeclarationDir = ensureTempDeclarationDir;
431
+ exports2.toObjectEntry = toObjectEntry;
432
+ exports2.toAbsolutePath = toAbsolutePath;
433
+ exports2.writeFileSync = writeFileSync;
434
+ exports2.replaceDtsWithJsExtensions = replaceDtsWithJsExtensions;
435
+ exports2.resolveExperimentalDtsConfig = resolveExperimentalDtsConfig;
436
+ exports2.resolveInitialExperimentalDtsConfig = resolveInitialExperimentalDtsConfig;
432
437
  }
433
438
  });
434
439
 
435
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-VGC3FXLU.js
436
- var require_chunk_VGC3FXLU = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
437
- "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-VGC3FXLU.js"(exports) {
440
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-VGC3FXLU.js
441
+ var require_chunk_VGC3FXLU = _chunkSJESTPECcjs.__commonJS.call(void 0, {
442
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-VGC3FXLU.js"(exports2) {
438
443
  "use strict";
439
- Object.defineProperty(exports, "__esModule", {
444
+ _chunkSJESTPECcjs.init_cjs_shims.call(void 0, );
445
+ Object.defineProperty(exports2, "__esModule", {
440
446
  value: true
441
447
  });
442
- function _interopRequireDefault(obj) {
448
+ function _interopRequireDefault2(obj) {
443
449
  return obj && obj.__esModule ? obj : {
444
450
  default: obj
445
451
  };
446
452
  }
447
- _chunkYHMM6RY5cjs.__name.call(void 0, _interopRequireDefault, "_interopRequireDefault");
448
- function _optionalChain(ops) {
453
+ _chunkSJESTPECcjs.__name.call(void 0, _interopRequireDefault2, "_interopRequireDefault");
454
+ function _optionalChain2(ops) {
449
455
  let lastAccessLHS = void 0;
450
456
  let value = ops[0];
451
457
  let i = 1;
@@ -460,28 +466,28 @@ var require_chunk_VGC3FXLU = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
460
466
  lastAccessLHS = value;
461
467
  value = fn(value);
462
468
  } else if (op === "call" || op === "optionalCall") {
463
- value = fn((...args) => value.call(lastAccessLHS, ...args));
469
+ value = fn((...args2) => value.call(lastAccessLHS, ...args2));
464
470
  lastAccessLHS = void 0;
465
471
  }
466
472
  }
467
473
  return value;
468
474
  }
469
- _chunkYHMM6RY5cjs.__name.call(void 0, _optionalChain, "_optionalChain");
470
- var _chunkTWFEYLU4js = require_chunk_TWFEYLU4();
471
- var _fs = _chunkYHMM6RY5cjs.__require.call(void 0, "fs");
472
- var _fs2 = _interopRequireDefault(_fs);
473
- var _path = _chunkYHMM6RY5cjs.__require.call(void 0, "path");
474
- var _path2 = _interopRequireDefault(_path);
475
- var _joycon = _chunkYHMM6RY5cjs.__require.call(void 0, "joycon");
476
- var _joycon2 = _interopRequireDefault(_joycon);
477
- var _bundlerequire = _chunkYHMM6RY5cjs.__require.call(void 0, "bundle-require");
475
+ _chunkSJESTPECcjs.__name.call(void 0, _optionalChain2, "_optionalChain");
476
+ var _chunkTWFEYLU4js2 = require_chunk_TWFEYLU4();
477
+ var _fs3 = _chunkSJESTPECcjs.__require.call(void 0, "fs");
478
+ var _fs22 = _interopRequireDefault2(_fs3);
479
+ var _path3 = _chunkSJESTPECcjs.__require.call(void 0, "path");
480
+ var _path22 = _interopRequireDefault2(_path3);
481
+ var _joycon = _chunkSJESTPECcjs.__require.call(void 0, "joycon");
482
+ var _joycon2 = _interopRequireDefault2(_joycon);
483
+ var _bundlerequire2 = _chunkSJESTPECcjs.__require.call(void 0, "bundle-require");
478
484
  var joycon = new (0, _joycon2.default)();
479
- var loadJson = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (filepath, options2) => {
485
+ var loadJson = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async (filepath, options2) => {
480
486
  try {
481
- return _chunkTWFEYLU4js.jsoncParse.call(void 0, await _fs2.default.promises.readFile(filepath, "utf8"));
487
+ return _chunkTWFEYLU4js2.jsoncParse.call(void 0, await _fs22.default.promises.readFile(filepath, "utf8"));
482
488
  } catch (error) {
483
489
  if (error instanceof Error) {
484
- throw new Error(`Failed to parse ${_path2.default.relative(_optionalChain2([options2, 'access', _42 => _42.workspaceConfig, 'optionalAccess', _43 => _43.workspaceRoot]) || process.cwd(), filepath)}: ${error.message}`);
490
+ throw new Error(`Failed to parse ${_path22.default.relative(_optionalChain3([options2, 'access', _42 => _42.workspaceConfig, 'optionalAccess', _43 => _43.workspaceRoot]) || process.cwd(), filepath)}: ${error.message}`);
485
491
  } else {
486
492
  throw error;
487
493
  }
@@ -510,7 +516,7 @@ var require_chunk_VGC3FXLU = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
510
516
  "package.json"
511
517
  ],
512
518
  cwd,
513
- stopDir: _path2.default.parse(cwd).root,
519
+ stopDir: _path22.default.parse(cwd).root,
514
520
  packageKey: "tsup"
515
521
  });
516
522
  if (configPath) {
@@ -527,7 +533,7 @@ var require_chunk_VGC3FXLU = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
527
533
  }
528
534
  return {};
529
535
  }
530
- const config = await _bundlerequire.bundleRequire.call(void 0, {
536
+ const config = await _bundlerequire2.bundleRequire.call(void 0, {
531
537
  filepath: configPath
532
538
  });
533
539
  return {
@@ -537,17 +543,17 @@ var require_chunk_VGC3FXLU = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
537
543
  }
538
544
  return {};
539
545
  }
540
- _chunkYHMM6RY5cjs.__name.call(void 0, loadTsupConfig, "loadTsupConfig");
546
+ _chunkSJESTPECcjs.__name.call(void 0, loadTsupConfig, "loadTsupConfig");
541
547
  async function loadPkg(cwd, clearCache = false) {
542
548
  if (clearCache) {
543
549
  joycon.clearCache();
544
550
  }
545
551
  const { data } = await joycon.load([
546
552
  "package.json"
547
- ], cwd, _path2.default.dirname(cwd));
553
+ ], cwd, _path22.default.dirname(cwd));
548
554
  return data || {};
549
555
  }
550
- _chunkYHMM6RY5cjs.__name.call(void 0, loadPkg, "loadPkg");
556
+ _chunkSJESTPECcjs.__name.call(void 0, loadPkg, "loadPkg");
551
557
  async function getProductionDeps(cwd, clearCache = false) {
552
558
  const data = await loadPkg(cwd, clearCache);
553
559
  const deps = Array.from(/* @__PURE__ */ new Set([
@@ -556,7 +562,7 @@ var require_chunk_VGC3FXLU = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
556
562
  ]));
557
563
  return deps;
558
564
  }
559
- _chunkYHMM6RY5cjs.__name.call(void 0, getProductionDeps, "getProductionDeps");
565
+ _chunkSJESTPECcjs.__name.call(void 0, getProductionDeps, "getProductionDeps");
560
566
  async function getAllDepsHash(cwd) {
561
567
  const data = await loadPkg(cwd, true);
562
568
  return JSON.stringify({
@@ -565,20 +571,20 @@ var require_chunk_VGC3FXLU = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
565
571
  ...data.devDependencies
566
572
  });
567
573
  }
568
- _chunkYHMM6RY5cjs.__name.call(void 0, getAllDepsHash, "getAllDepsHash");
569
- var _util = _chunkYHMM6RY5cjs.__require.call(void 0, "util");
570
- var _util2 = _interopRequireDefault(_util);
571
- var _worker_threads = _chunkYHMM6RY5cjs.__require.call(void 0, "worker_threads");
572
- var _picocolors = _chunkYHMM6RY5cjs.__require.call(void 0, "picocolors");
573
- var _picocolors2 = _interopRequireDefault(_picocolors);
574
- var colorize = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (type, data, onlyImportant = false) => {
574
+ _chunkSJESTPECcjs.__name.call(void 0, getAllDepsHash, "getAllDepsHash");
575
+ var _util = _chunkSJESTPECcjs.__require.call(void 0, "util");
576
+ var _util2 = _interopRequireDefault2(_util);
577
+ var _worker_threads2 = _chunkSJESTPECcjs.__require.call(void 0, "worker_threads");
578
+ var _picocolors = _chunkSJESTPECcjs.__require.call(void 0, "picocolors");
579
+ var _picocolors2 = _interopRequireDefault2(_picocolors);
580
+ var colorize = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (type, data, onlyImportant = false) => {
575
581
  if (onlyImportant && (type === "info" || type === "success")) return data;
576
582
  const color = type === "info" ? "blue" : type === "error" ? "red" : type === "warn" ? "yellow" : "green";
577
583
  return _picocolors2.default[color](data);
578
584
  }, "colorize");
579
- var makeLabel = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (name, input, type) => {
585
+ var makeLabel = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (name2, input, type) => {
580
586
  return [
581
- name && `${_picocolors2.default.dim("[")}${name.toUpperCase()}${_picocolors2.default.dim("]")}`,
587
+ name2 && `${_picocolors2.default.dim("[")}${name2.toUpperCase()}${_picocolors2.default.dim("]")}`,
582
588
  colorize(type, input.toUpperCase())
583
589
  ].filter(Boolean).join(" ");
584
590
  }, "makeLabel");
@@ -586,71 +592,71 @@ var require_chunk_VGC3FXLU = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
586
592
  function setSilent(isSilent) {
587
593
  silent = !!isSilent;
588
594
  }
589
- _chunkYHMM6RY5cjs.__name.call(void 0, setSilent, "setSilent");
595
+ _chunkSJESTPECcjs.__name.call(void 0, setSilent, "setSilent");
590
596
  function getSilent() {
591
597
  return silent;
592
598
  }
593
- _chunkYHMM6RY5cjs.__name.call(void 0, getSilent, "getSilent");
594
- var createLogger = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (name) => {
599
+ _chunkSJESTPECcjs.__name.call(void 0, getSilent, "getSilent");
600
+ var createLogger = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (name2) => {
595
601
  return {
596
602
  setName(_name) {
597
- name = _name;
603
+ name2 = _name;
598
604
  },
599
- success(label, ...args) {
600
- return this.log(label, "success", ...args);
605
+ success(label, ...args2) {
606
+ return this.log(label, "success", ...args2);
601
607
  },
602
- info(label, ...args) {
603
- return this.log(label, "info", ...args);
608
+ info(label, ...args2) {
609
+ return this.log(label, "info", ...args2);
604
610
  },
605
- error(label, ...args) {
606
- return this.log(label, "error", ...args);
611
+ error(label, ...args2) {
612
+ return this.log(label, "error", ...args2);
607
613
  },
608
- warn(label, ...args) {
609
- return this.log(label, "warn", ...args);
614
+ warn(label, ...args2) {
615
+ return this.log(label, "warn", ...args2);
610
616
  },
611
617
  log(label, type, ...data) {
612
- const args = [
613
- makeLabel(name, label, type),
618
+ const args2 = [
619
+ makeLabel(name2, label, type),
614
620
  ...data.map((item) => colorize(type, item, true))
615
621
  ];
616
622
  switch (type) {
617
623
  case "error": {
618
- if (!_worker_threads.isMainThread) {
619
- _optionalChain([
620
- _worker_threads.parentPort,
624
+ if (!_worker_threads2.isMainThread) {
625
+ _optionalChain2([
626
+ _worker_threads2.parentPort,
621
627
  "optionalAccess",
622
628
  (_) => _.postMessage,
623
629
  "call",
624
630
  (_2) => _2({
625
631
  type: "error",
626
- text: _util2.default.format(...args)
632
+ text: _util2.default.format(...args2)
627
633
  })
628
634
  ]);
629
635
  return;
630
636
  }
631
- return console.error(...args);
637
+ return console.error(...args2);
632
638
  }
633
639
  default:
634
640
  if (silent) return;
635
- if (!_worker_threads.isMainThread) {
636
- _optionalChain([
637
- _worker_threads.parentPort,
641
+ if (!_worker_threads2.isMainThread) {
642
+ _optionalChain2([
643
+ _worker_threads2.parentPort,
638
644
  "optionalAccess",
639
645
  (_3) => _3.postMessage,
640
646
  "call",
641
647
  (_4) => _4({
642
648
  type: "log",
643
- text: _util2.default.format(...args)
649
+ text: _util2.default.format(...args2)
644
650
  })
645
651
  ]);
646
652
  return;
647
653
  }
648
- console.log(...args);
654
+ console.log(...args2);
649
655
  }
650
656
  }
651
657
  };
652
658
  }, "createLogger");
653
- var prettyBytes = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (bytes) => {
659
+ var prettyBytes = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (bytes) => {
654
660
  if (bytes === 0) return "0 B";
655
661
  const unit = [
656
662
  "B",
@@ -666,51 +672,52 @@ var require_chunk_VGC3FXLU = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
666
672
  const exp = Math.floor(Math.log(bytes) / Math.log(1024));
667
673
  return `${(bytes / 1024 ** exp).toFixed(2)} ${unit[exp]}`;
668
674
  }, "prettyBytes");
669
- var getLengthOfLongestString = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (strings) => {
675
+ var getLengthOfLongestString = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (strings) => {
670
676
  return strings.reduce((max, str) => {
671
677
  return Math.max(max, str.length);
672
678
  }, 0);
673
679
  }, "getLengthOfLongestString");
674
- var padRight = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (str, maxLength) => {
680
+ var padRight = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (str, maxLength) => {
675
681
  return str + " ".repeat(maxLength - str.length);
676
682
  }, "padRight");
677
- var reportSize = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (logger, format, files) => {
683
+ var reportSize = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (logger3, format, files) => {
678
684
  const filenames = Object.keys(files);
679
685
  const maxLength = getLengthOfLongestString(filenames) + 1;
680
- for (const name of filenames) {
681
- logger.success(format, `${_picocolors2.default.bold(padRight(name, maxLength))}${_picocolors2.default.green(prettyBytes(files[name]))}`);
686
+ for (const name2 of filenames) {
687
+ logger3.success(format, `${_picocolors2.default.bold(padRight(name2, maxLength))}${_picocolors2.default.green(prettyBytes(files[name2]))}`);
682
688
  }
683
689
  }, "reportSize");
684
- exports.loadTsupConfig = loadTsupConfig;
685
- exports.loadPkg = loadPkg;
686
- exports.getProductionDeps = getProductionDeps;
687
- exports.getAllDepsHash = getAllDepsHash;
688
- exports.setSilent = setSilent;
689
- exports.getSilent = getSilent;
690
- exports.createLogger = createLogger;
691
- exports.reportSize = reportSize;
690
+ exports2.loadTsupConfig = loadTsupConfig;
691
+ exports2.loadPkg = loadPkg;
692
+ exports2.getProductionDeps = getProductionDeps;
693
+ exports2.getAllDepsHash = getAllDepsHash;
694
+ exports2.setSilent = setSilent;
695
+ exports2.getSilent = getSilent;
696
+ exports2.createLogger = createLogger;
697
+ exports2.reportSize = reportSize;
692
698
  }
693
699
  });
694
700
 
695
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-JZ25TPTY.js
696
- var require_chunk_JZ25TPTY = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
697
- "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-JZ25TPTY.js"(exports) {
701
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-JZ25TPTY.js
702
+ var require_chunk_JZ25TPTY = _chunkSJESTPECcjs.__commonJS.call(void 0, {
703
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-JZ25TPTY.js"(exports2) {
698
704
  "use strict";
699
- Object.defineProperty(exports, "__esModule", {
705
+ _chunkSJESTPECcjs.init_cjs_shims.call(void 0, );
706
+ Object.defineProperty(exports2, "__esModule", {
700
707
  value: true
701
708
  });
702
- function _interopRequireDefault(obj) {
709
+ function _interopRequireDefault2(obj) {
703
710
  return obj && obj.__esModule ? obj : {
704
711
  default: obj
705
712
  };
706
713
  }
707
- _chunkYHMM6RY5cjs.__name.call(void 0, _interopRequireDefault, "_interopRequireDefault");
708
- var _worker_threads = _chunkYHMM6RY5cjs.__require.call(void 0, "worker_threads");
709
- var _picocolors = _chunkYHMM6RY5cjs.__require.call(void 0, "picocolors");
710
- var _picocolors2 = _interopRequireDefault(_picocolors);
714
+ _chunkSJESTPECcjs.__name.call(void 0, _interopRequireDefault2, "_interopRequireDefault");
715
+ var _worker_threads2 = _chunkSJESTPECcjs.__require.call(void 0, "worker_threads");
716
+ var _picocolors = _chunkSJESTPECcjs.__require.call(void 0, "picocolors");
717
+ var _picocolors2 = _interopRequireDefault2(_picocolors);
711
718
  var PrettyError = class extends Error {
712
719
  static {
713
- _chunkYHMM6RY5cjs.__name.call(void 0, this, "PrettyError");
720
+ _chunkSJESTPECcjs.__name.call(void 0, this, "PrettyError");
714
721
  }
715
722
  constructor(message) {
716
723
  super(message);
@@ -735,20 +742,21 @@ var require_chunk_JZ25TPTY = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
735
742
  console.error(_picocolors2.default.red(error.stack));
736
743
  }
737
744
  process.exitCode = 1;
738
- if (!_worker_threads.isMainThread && _worker_threads.parentPort) {
739
- _worker_threads.parentPort.postMessage("error");
745
+ if (!_worker_threads2.isMainThread && _worker_threads2.parentPort) {
746
+ _worker_threads2.parentPort.postMessage("error");
740
747
  }
741
748
  }
742
- _chunkYHMM6RY5cjs.__name.call(void 0, handleError, "handleError");
743
- exports.PrettyError = PrettyError;
744
- exports.handleError = handleError;
749
+ _chunkSJESTPECcjs.__name.call(void 0, handleError, "handleError");
750
+ exports2.PrettyError = PrettyError;
751
+ exports2.handleError = handleError;
745
752
  }
746
753
  });
747
754
 
748
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/index.js
749
- var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
750
- "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/index.js"(exports) {
755
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/index.js
756
+ var require_dist = _chunkSJESTPECcjs.__commonJS.call(void 0, {
757
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/index.js"(exports, module) {
751
758
  "use strict";
759
+ _chunkSJESTPECcjs.init_cjs_shims.call(void 0, );
752
760
  Object.defineProperty(exports, "__esModule", {
753
761
  value: true
754
762
  });
@@ -768,13 +776,13 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
768
776
  return newObj;
769
777
  }
770
778
  }
771
- _chunkYHMM6RY5cjs.__name.call(void 0, _interopRequireWildcard, "_interopRequireWildcard");
779
+ _chunkSJESTPECcjs.__name.call(void 0, _interopRequireWildcard, "_interopRequireWildcard");
772
780
  function _interopRequireDefault(obj) {
773
781
  return obj && obj.__esModule ? obj : {
774
782
  default: obj
775
783
  };
776
784
  }
777
- _chunkYHMM6RY5cjs.__name.call(void 0, _interopRequireDefault, "_interopRequireDefault");
785
+ _chunkSJESTPECcjs.__name.call(void 0, _interopRequireDefault, "_interopRequireDefault");
778
786
  function _nullishCoalesce(lhs, rhsFn) {
779
787
  if (lhs != null) {
780
788
  return lhs;
@@ -782,7 +790,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
782
790
  return rhsFn();
783
791
  }
784
792
  }
785
- _chunkYHMM6RY5cjs.__name.call(void 0, _nullishCoalesce, "_nullishCoalesce");
793
+ _chunkSJESTPECcjs.__name.call(void 0, _nullishCoalesce, "_nullishCoalesce");
786
794
  function _optionalChain(ops) {
787
795
  let lastAccessLHS = void 0;
788
796
  let value = ops[0];
@@ -798,37 +806,37 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
798
806
  lastAccessLHS = value;
799
807
  value = fn(value);
800
808
  } else if (op === "call" || op === "optionalCall") {
801
- value = fn((...args) => value.call(lastAccessLHS, ...args));
809
+ value = fn((...args2) => value.call(lastAccessLHS, ...args2));
802
810
  lastAccessLHS = void 0;
803
811
  }
804
812
  }
805
813
  return value;
806
814
  }
807
- _chunkYHMM6RY5cjs.__name.call(void 0, _optionalChain, "_optionalChain");
815
+ _chunkSJESTPECcjs.__name.call(void 0, _optionalChain, "_optionalChain");
808
816
  var _class;
809
817
  var _chunkBYH4XDRHjs = require_chunk_BYH4XDRH();
810
818
  var _chunkVGC3FXLUjs = require_chunk_VGC3FXLU();
811
819
  var _chunkJZ25TPTYjs = require_chunk_JZ25TPTY();
812
820
  var _chunkTWFEYLU4js = require_chunk_TWFEYLU4();
813
- var _path = _chunkYHMM6RY5cjs.__require.call(void 0, "path");
821
+ var _path = _chunkSJESTPECcjs.__require.call(void 0, "path");
814
822
  var _path2 = _interopRequireDefault(_path);
815
- var _fs = _chunkYHMM6RY5cjs.__require.call(void 0, "fs");
823
+ var _fs = _chunkSJESTPECcjs.__require.call(void 0, "fs");
816
824
  var _fs2 = _interopRequireDefault(_fs);
817
- var _worker_threads = _chunkYHMM6RY5cjs.__require.call(void 0, "worker_threads");
818
- var _bundlerequire = _chunkYHMM6RY5cjs.__require.call(void 0, "bundle-require");
819
- var _tinyexec = _chunkYHMM6RY5cjs.__require.call(void 0, "tinyexec");
820
- var _tinyglobby = _chunkYHMM6RY5cjs.__require.call(void 0, "tinyglobby");
821
- var _treekill = _chunkYHMM6RY5cjs.__require.call(void 0, "tree-kill");
825
+ var _worker_threads = _chunkSJESTPECcjs.__require.call(void 0, "worker_threads");
826
+ var _bundlerequire = _chunkSJESTPECcjs.__require.call(void 0, "bundle-require");
827
+ var _tinyexec = _chunkSJESTPECcjs.__require.call(void 0, "tinyexec");
828
+ var _tinyglobby = _chunkSJESTPECcjs.__require.call(void 0, "tinyglobby");
829
+ var _treekill = _chunkSJESTPECcjs.__require.call(void 0, "tree-kill");
822
830
  var _treekill2 = _interopRequireDefault(_treekill);
823
- var _esbuild = _chunkYHMM6RY5cjs.__require.call(void 0, "esbuild");
824
- var _consola = _chunkYHMM6RY5cjs.__require.call(void 0, "consola");
831
+ var _esbuild = _chunkSJESTPECcjs.__require.call(void 0, "esbuild");
832
+ var _consola = _chunkSJESTPECcjs.__require.call(void 0, "consola");
825
833
  var _consola2 = _interopRequireDefault(_consola);
826
- var nodeProtocolPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
834
+ var nodeProtocolPlugin = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
827
835
  const nodeProtocol = "node:";
828
836
  return {
829
837
  name: "node-protocol-plugin",
830
- setup({ onResolve }) {
831
- onResolve({
838
+ setup({ onResolve: onResolve2 }) {
839
+ onResolve2({
832
840
  filter: /^node:/
833
841
  }, ({ path: path12 }) => ({
834
842
  path: path12.slice(nodeProtocol.length),
@@ -837,8 +845,88 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
837
845
  }
838
846
  };
839
847
  }, "nodeProtocolPlugin");
848
+ var requireToImportPlugin = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
849
+ return {
850
+ name: "require-to-import",
851
+ setup({ onResolve, onLoad, esbuild }) {
852
+ function matchBrace(text, from) {
853
+ if (!(text[from] === "(")) return -1;
854
+ let i, k = 1;
855
+ for (i = from + 1; i < text.length && k > 0; ++i) {
856
+ if (text[i] === "(") k++;
857
+ if (text[i] === ")") k--;
858
+ }
859
+ let to = i - 1;
860
+ if (!(text[to] === ")") || k !== 0) return -1;
861
+ return to;
862
+ }
863
+ _chunkSJESTPECcjs.__name.call(void 0, matchBrace, "matchBrace");
864
+ function makeName(path2) {
865
+ return path2.replace(/-(\w)/g, (_, x) => x.toUpperCase()).replace(/[^$_a-zA-Z0-9]/g, "_");
866
+ }
867
+ _chunkSJESTPECcjs.__name.call(void 0, makeName, "makeName");
868
+ onLoad({
869
+ filter: /\.c?js/
870
+ }, async (args) => {
871
+ let contents = await _fs2.default.promises.readFile(args.path, "utf8");
872
+ let warnings;
873
+ try {
874
+ ({ warnings } = await esbuild.transform(contents, {
875
+ format: "esm",
876
+ logLevel: "silent"
877
+ }));
878
+ } catch (err) {
879
+ ({ warnings } = err);
880
+ }
881
+ let lines = contents.split("\n");
882
+ if (warnings && warnings.some((e) => e.text.includes('"require" to "esm"'))) {
883
+ let modifications = [], imports = [];
884
+ for (const { location: { line, lineText, column, length } } of warnings) {
885
+ let left = column + length;
886
+ let right = matchBrace(lineText, left);
887
+ if (right === -1) continue;
888
+ let raw = lineText.slice(left + 1, right);
889
+ let path;
890
+ try {
891
+ path = eval(raw);
892
+ if (typeof path !== "string") continue;
893
+ } catch (e) {
894
+ continue;
895
+ }
896
+ let name = `__import_${makeName(path)}`;
897
+ let import_statement = `import ${name} from ${raw};`;
898
+ let offset = lines.slice(0, line - 1).map((line2) => line2.length).reduce((a, b) => a + 1 + b, 0);
899
+ modifications.push([
900
+ offset + column,
901
+ offset + right + 1,
902
+ name
903
+ ]);
904
+ imports.push(import_statement);
905
+ }
906
+ if (imports.length === 0) return null;
907
+ imports = [
908
+ ...new Set(imports)
909
+ ];
910
+ let offset = 0;
911
+ for (const [start, end, name2] of modifications) {
912
+ contents = contents.slice(0, start + offset) + name2 + contents.slice(end + offset);
913
+ offset += name2.length - (end - start);
914
+ }
915
+ contents = [
916
+ ...imports,
917
+ "module.exports",
918
+ contents
919
+ ].join(";");
920
+ return {
921
+ contents
922
+ };
923
+ }
924
+ });
925
+ }
926
+ };
927
+ }, "requireToImportPlugin");
840
928
  var NON_NODE_MODULE_RE = /^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/;
841
- var externalPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ external, noExternal, skipNodeModulesBundle, tsconfigResolvePaths }) => {
929
+ var externalPlugin = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, ({ external, noExternal, skipNodeModulesBundle, tsconfigResolvePaths }) => {
842
930
  return {
843
931
  name: `external`,
844
932
  setup(build2) {
@@ -846,21 +934,21 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
846
934
  const resolvePatterns = _bundlerequire.tsconfigPathsToRegExp.call(void 0, tsconfigResolvePaths || {});
847
935
  build2.onResolve({
848
936
  filter: /.*/
849
- }, (args) => {
850
- if (_bundlerequire.match.call(void 0, args.path, resolvePatterns)) {
937
+ }, (args2) => {
938
+ if (_bundlerequire.match.call(void 0, args2.path, resolvePatterns)) {
851
939
  return;
852
940
  }
853
- if (_bundlerequire.match.call(void 0, args.path, noExternal)) {
941
+ if (_bundlerequire.match.call(void 0, args2.path, noExternal)) {
854
942
  return;
855
943
  }
856
- if (_bundlerequire.match.call(void 0, args.path, external)) {
944
+ if (_bundlerequire.match.call(void 0, args2.path, external)) {
857
945
  return {
858
946
  external: true
859
947
  };
860
948
  }
861
- if (!NON_NODE_MODULE_RE.test(args.path)) {
949
+ if (!NON_NODE_MODULE_RE.test(args2.path)) {
862
950
  return {
863
- path: args.path,
951
+ path: args2.path,
864
952
  external: true
865
953
  };
866
954
  }
@@ -868,11 +956,11 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
868
956
  } else {
869
957
  build2.onResolve({
870
958
  filter: /.*/
871
- }, (args) => {
872
- if (_bundlerequire.match.call(void 0, args.path, noExternal)) {
959
+ }, (args2) => {
960
+ if (_bundlerequire.match.call(void 0, args2.path, noExternal)) {
873
961
  return;
874
962
  }
875
- if (_bundlerequire.match.call(void 0, args.path, external)) {
963
+ if (_bundlerequire.match.call(void 0, args2.path, external)) {
876
964
  return {
877
965
  external: true
878
966
  };
@@ -882,18 +970,18 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
882
970
  }
883
971
  };
884
972
  }, "externalPlugin");
885
- var postcssPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ options: options1, css, inject, cssLoader }) => {
973
+ var postcssPlugin = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, ({ options: options1, css, inject, cssLoader }) => {
886
974
  return {
887
975
  name: "postcss",
888
976
  setup(build2) {
889
977
  let configCache;
890
- const getPostcssConfig = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
978
+ const getPostcssConfig = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async () => {
891
979
  const loadConfig = _chunkTWFEYLU4js.__require.call(void 0, "postcss-load-config");
892
980
  if (configCache) {
893
981
  return configCache;
894
982
  }
895
983
  try {
896
- const result = await loadConfig({}, _optionalChain2([options1, 'access', _44 => _44.workspaceConfig, 'optionalAccess', _45 => _45.workspaceRoot]) || process.cwd());
984
+ const result = await loadConfig({}, _optionalChain3([options1, 'access', _44 => _44.workspaceConfig, 'optionalAccess', _45 => _45.workspaceRoot]) || process.cwd());
897
985
  configCache = result;
898
986
  return result;
899
987
  } catch (error) {
@@ -951,12 +1039,12 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
951
1039
  });
952
1040
  build2.onLoad({
953
1041
  filter: /\.css$/
954
- }, async (args) => {
955
- let contents;
956
- if (css && args.path.endsWith(".svelte.css")) {
957
- contents = css.get(args.path);
1042
+ }, async (args2) => {
1043
+ let contents2;
1044
+ if (css && args2.path.endsWith(".svelte.css")) {
1045
+ contents2 = css.get(args2.path);
958
1046
  } else {
959
- contents = await _fs2.default.promises.readFile(args.path, "utf8");
1047
+ contents2 = await _fs2.default.promises.readFile(args2.path, "utf8");
960
1048
  }
961
1049
  const { plugins, options: options12 } = await getPostcssConfig();
962
1050
  if (plugins && plugins.length > 0) {
@@ -979,15 +1067,15 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
979
1067
  "access",
980
1068
  (_4) => _4.process,
981
1069
  "call",
982
- (_5) => _5(contents, {
1070
+ (_5) => _5(contents2, {
983
1071
  ...options12,
984
- from: args.path
1072
+ from: args2.path
985
1073
  })
986
1074
  ]);
987
- contents = result.css;
1075
+ contents2 = result.css;
988
1076
  }
989
1077
  if (inject) {
990
- contents = (await _esbuild.transform.call(void 0, contents, {
1078
+ contents2 = (await _esbuild.transform.call(void 0, contents2, {
991
1079
  minify: build2.initialOptions.minify,
992
1080
  minifyIdentifiers: build2.initialOptions.minifyIdentifiers,
993
1081
  minifySyntax: build2.initialOptions.minifySyntax,
@@ -995,22 +1083,22 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
995
1083
  logLevel: build2.initialOptions.logLevel,
996
1084
  loader: "css"
997
1085
  })).code;
998
- contents = typeof inject === "function" ? await inject(JSON.stringify(contents), args.path) : `import styleInject from '#style-inject';styleInject(${JSON.stringify(contents)})`;
1086
+ contents2 = typeof inject === "function" ? await inject(JSON.stringify(contents2), args2.path) : `import styleInject from '#style-inject';styleInject(${JSON.stringify(contents2)})`;
999
1087
  return {
1000
- contents,
1088
+ contents: contents2,
1001
1089
  loader: "js"
1002
1090
  };
1003
1091
  }
1004
1092
  return {
1005
- contents,
1093
+ contents: contents2,
1006
1094
  loader: _nullishCoalesce(cssLoader, () => "css")
1007
1095
  };
1008
1096
  });
1009
1097
  }
1010
1098
  };
1011
1099
  }, "postcssPlugin");
1012
- var useSvelteCssExtension = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (p) => p.replace(/\.svelte$/, ".svelte.css"), "useSvelteCssExtension");
1013
- var sveltePlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ css, options: options1 }) => {
1100
+ var useSvelteCssExtension = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (p) => p.replace(/\.svelte$/, ".svelte.css"), "useSvelteCssExtension");
1101
+ var sveltePlugin = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, ({ css, options: options1 }) => {
1014
1102
  return {
1015
1103
  name: "svelte",
1016
1104
  setup(build2) {
@@ -1018,15 +1106,15 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1018
1106
  let sveltePreprocessor;
1019
1107
  build2.onResolve({
1020
1108
  filter: /\.svelte\.css$/
1021
- }, (args) => {
1109
+ }, (args2) => {
1022
1110
  return {
1023
- path: _path2.default.relative(_optionalChain2([options1, 'access', _46 => _46.workspaceConfig, 'optionalAccess', _47 => _47.workspaceRoot]) || process.cwd(), _path2.default.join(args.resolveDir, args.path)),
1111
+ path: _path2.default.relative(_optionalChain3([options1, 'access', _46 => _46.workspaceConfig, 'optionalAccess', _47 => _47.workspaceRoot]) || process.cwd(), _path2.default.join(args2.resolveDir, args2.path)),
1024
1112
  namespace: "svelte-css"
1025
1113
  };
1026
1114
  });
1027
1115
  build2.onLoad({
1028
1116
  filter: /\.svelte$/
1029
- }, async (args) => {
1117
+ }, async (args2) => {
1030
1118
  svelte = svelte || _chunkTWFEYLU4js.localRequire.call(void 0, "svelte/compiler");
1031
1119
  sveltePreprocessor = sveltePreprocessor || _chunkTWFEYLU4js.localRequire.call(void 0, "svelte-preprocess");
1032
1120
  if (!svelte) {
@@ -1038,17 +1126,17 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1038
1126
  ]
1039
1127
  };
1040
1128
  }
1041
- const convertMessage = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ message, start, end }) => {
1129
+ const convertMessage = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, ({ message, start, end }) => {
1042
1130
  let location;
1043
1131
  if (start && end) {
1044
- const lineText = source.split(/\r\n|\r|\n/g)[start.line - 1];
1045
- const lineEnd = start.line === end.line ? end.column : lineText.length;
1132
+ const lineText2 = source.split(/\r\n|\r|\n/g)[start.line - 1];
1133
+ const lineEnd = start.line === end.line ? end.column : lineText2.length;
1046
1134
  location = {
1047
1135
  file: filename,
1048
1136
  line: start.line,
1049
1137
  column: start.column,
1050
1138
  length: lineEnd - start.column,
1051
- lineText
1139
+ lineText: lineText2
1052
1140
  };
1053
1141
  }
1054
1142
  return {
@@ -1056,8 +1144,8 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1056
1144
  location
1057
1145
  };
1058
1146
  }, "convertMessage");
1059
- const source = await _fs2.default.promises.readFile(args.path, "utf8");
1060
- const filename = _path2.default.relative(_optionalChain2([options1, 'access', _48 => _48.workspaceConfig, 'optionalAccess', _49 => _49.workspaceRoot]) || process.cwd(), args.path);
1147
+ const source = await _fs2.default.promises.readFile(args2.path, "utf8");
1148
+ const filename = _path2.default.relative(_optionalChain3([options1, 'access', _48 => _48.workspaceConfig, 'optionalAccess', _49 => _49.workspaceRoot]) || process.cwd(), args2.path);
1061
1149
  try {
1062
1150
  const preprocess = await svelte.preprocess(source, sveltePreprocessor ? sveltePreprocessor({
1063
1151
  sourceMap: true,
@@ -1072,7 +1160,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1072
1160
  code: content
1073
1161
  };
1074
1162
  const { code, map } = await _esbuild.transform.call(void 0, content, {
1075
- sourcefile: args.path,
1163
+ sourcefile: args2.path,
1076
1164
  loader: "ts",
1077
1165
  sourcemap: true,
1078
1166
  tsconfigRaw: {
@@ -1088,20 +1176,20 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1088
1176
  };
1089
1177
  }
1090
1178
  }, {
1091
- filename: args.path
1179
+ filename: args2.path
1092
1180
  });
1093
1181
  const result = svelte.compile(preprocess.code, {
1094
1182
  filename,
1095
1183
  css: "external"
1096
1184
  });
1097
- let contents = result.js.code;
1185
+ let contents2 = result.js.code;
1098
1186
  if (css && result.css && result.css.code) {
1099
1187
  const cssPath = useSvelteCssExtension(filename);
1100
1188
  css.set(cssPath, result.css.code);
1101
- contents = `import '${useSvelteCssExtension(_path2.default.basename(args.path))}';${contents}`;
1189
+ contents2 = `import '${useSvelteCssExtension(_path2.default.basename(args2.path))}';${contents2}`;
1102
1190
  }
1103
1191
  return {
1104
- contents,
1192
+ contents: contents2,
1105
1193
  warnings: result.warnings.map(convertMessage)
1106
1194
  };
1107
1195
  } catch (error) {
@@ -1115,7 +1203,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1115
1203
  }
1116
1204
  };
1117
1205
  }, "sveltePlugin");
1118
- var swcPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ logger: logger3 }) => {
1206
+ var swcPlugin = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, ({ logger: logger3 }) => {
1119
1207
  return {
1120
1208
  name: "swc",
1121
1209
  setup(build2) {
@@ -1127,8 +1215,8 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1127
1215
  build2.initialOptions.keepNames = true;
1128
1216
  build2.onLoad({
1129
1217
  filter: /\.[jt]sx?$/
1130
- }, async (args) => {
1131
- const isTs = /\.tsx?$/.test(args.path);
1218
+ }, async (args2) => {
1219
+ const isTs = /\.tsx?$/.test(args2.path);
1132
1220
  const jsc = {
1133
1221
  parser: {
1134
1222
  syntax: isTs ? "typescript" : "ecmascript",
@@ -1141,7 +1229,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1141
1229
  keepClassNames: true,
1142
1230
  target: "es2022"
1143
1231
  };
1144
- const result = await swc.transformFile(args.path, {
1232
+ const result = await swc.transformFile(args2.path, {
1145
1233
  jsc,
1146
1234
  sourceMaps: true,
1147
1235
  configFile: false,
@@ -1151,7 +1239,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1151
1239
  if (result.map) {
1152
1240
  const map = JSON.parse(result.map);
1153
1241
  map.sources = map.sources.map((source) => {
1154
- return _path2.default.isAbsolute(source) ? _path2.default.relative(_path2.default.dirname(args.path), source) : source;
1242
+ return _path2.default.isAbsolute(source) ? _path2.default.relative(_path2.default.dirname(args2.path), source) : source;
1155
1243
  });
1156
1244
  code += `//# sourceMappingURL=data:application/json;base64,${Buffer.from(JSON.stringify(map)).toString("base64")}`;
1157
1245
  }
@@ -1162,17 +1250,17 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1162
1250
  }
1163
1251
  };
1164
1252
  }, "swcPlugin");
1165
- var nativeNodeModulesPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
1253
+ var nativeNodeModulesPlugin = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
1166
1254
  return {
1167
1255
  name: "native-node-modules",
1168
1256
  setup(build2) {
1169
1257
  build2.onResolve({
1170
1258
  filter: /\.node$/,
1171
1259
  namespace: "file"
1172
- }, (args) => {
1173
- const resolvedId = _chunkTWFEYLU4js.__require.resolve(args.path, {
1260
+ }, (args2) => {
1261
+ const resolvedId = _chunkTWFEYLU4js.__require.resolve(args2.path, {
1174
1262
  paths: [
1175
- args.resolveDir
1263
+ args2.resolveDir
1176
1264
  ]
1177
1265
  });
1178
1266
  if (resolvedId.endsWith(".node")) {
@@ -1188,21 +1276,21 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1188
1276
  build2.onLoad({
1189
1277
  filter: /.*/,
1190
1278
  namespace: "node-file"
1191
- }, (args) => {
1279
+ }, (args2) => {
1192
1280
  return {
1193
1281
  contents: `
1194
- import path from ${JSON.stringify(args.path)}
1282
+ import path from ${JSON.stringify(args2.path)}
1195
1283
  try { module.exports = require(path) }
1196
1284
  catch {}
1197
1285
  `,
1198
- resolveDir: _path2.default.dirname(args.path)
1286
+ resolveDir: _path2.default.dirname(args2.path)
1199
1287
  };
1200
1288
  });
1201
1289
  build2.onResolve({
1202
1290
  filter: /\.node$/,
1203
1291
  namespace: "node-file"
1204
- }, (args) => ({
1205
- path: args.path,
1292
+ }, (args2) => ({
1293
+ path: args2.path,
1206
1294
  namespace: "file"
1207
1295
  }));
1208
1296
  const opts = build2.initialOptions;
@@ -1211,7 +1299,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1211
1299
  }
1212
1300
  };
1213
1301
  }, "nativeNodeModulesPlugin");
1214
- var getOutputExtensionMap = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (options1, format, pkgType) => {
1302
+ var getOutputExtensionMap = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (options1, format, pkgType) => {
1215
1303
  const outExtension = options1.outExtension || _chunkTWFEYLU4js.defaultOutExtension;
1216
1304
  const defaultExtension = _chunkTWFEYLU4js.defaultOutExtension.call(void 0, {
1217
1305
  format,
@@ -1226,22 +1314,22 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1226
1314
  ".js": extension.js || defaultExtension.js
1227
1315
  };
1228
1316
  }, "getOutputExtensionMap");
1229
- var generateExternal = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (external) => {
1317
+ var generateExternal = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async (external) => {
1230
1318
  const result = [];
1231
1319
  for (const item of external) {
1232
1320
  if (typeof item !== "string" || !item.endsWith("package.json")) {
1233
1321
  result.push(item);
1234
1322
  continue;
1235
1323
  }
1236
- const pkgPath = _path2.default.isAbsolute(item) ? _path2.default.dirname(item) : _path2.default.dirname(_path2.default.resolve(_optionalChain2([options, 'access', _50 => _50.workspaceConfig, 'optionalAccess', _51 => _51.workspaceRoot]) || process.cwd(), item));
1324
+ const pkgPath = _path2.default.isAbsolute(item) ? _path2.default.dirname(item) : _path2.default.dirname(_path2.default.resolve(_optionalChain3([options, 'access', _50 => _50.workspaceConfig, 'optionalAccess', _51 => _51.workspaceRoot]) || process.cwd(), item));
1237
1325
  const deps = await _chunkVGC3FXLUjs.getProductionDeps.call(void 0, pkgPath);
1238
1326
  result.push(...deps);
1239
1327
  }
1240
1328
  return result;
1241
1329
  }, "generateExternal");
1242
1330
  async function runEsbuild(options1, { format, css, logger: logger3, buildDependencies, pluginContainer }) {
1243
- const pkg = await _chunkVGC3FXLUjs.loadPkg.call(void 0, _optionalChain2([options1, 'access', _52 => _52.workspaceConfig, 'optionalAccess', _53 => _53.workspaceRoot]) || process.cwd());
1244
- const deps = await _chunkVGC3FXLUjs.getProductionDeps.call(void 0, _optionalChain2([options1, 'access', _54 => _54.workspaceConfig, 'optionalAccess', _55 => _55.workspaceRoot]) || process.cwd());
1331
+ const pkg = await _chunkVGC3FXLUjs.loadPkg.call(void 0, _optionalChain3([options1, 'access', _52 => _52.workspaceConfig, 'optionalAccess', _53 => _53.workspaceRoot]) || process.cwd());
1332
+ const deps = await _chunkVGC3FXLUjs.getProductionDeps.call(void 0, _optionalChain3([options1, 'access', _54 => _54.workspaceConfig, 'optionalAccess', _55 => _55.workspaceRoot]) || process.cwd());
1245
1333
  const external = [
1246
1334
  // Exclude dependencies, e.g. `lodash`, `lodash/get`
1247
1335
  ...deps.map((dep) => new RegExp(`^${dep}($|\\/|\\\\)`)),
@@ -1262,6 +1350,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1262
1350
  const platform = options1.platform || "node";
1263
1351
  const loader = options1.loader || {};
1264
1352
  const injectShims = options1.shims;
1353
+ const bundle = typeof options1.bundle === "undefined" ? true : options1.bundle;
1265
1354
  pluginContainer.setContext({
1266
1355
  format,
1267
1356
  splitting,
@@ -1271,6 +1360,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1271
1360
  await pluginContainer.buildStarted();
1272
1361
  const esbuildPlugins = [
1273
1362
  format === "cjs" && options1.removeNodeProtocol && nodeProtocolPlugin(),
1363
+ format === "esm" && bundle && options1.requireToImport && requireToImportPlugin(),
1274
1364
  {
1275
1365
  name: "modify-options",
1276
1366
  setup(build2) {
@@ -1316,7 +1406,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1316
1406
  result = await _esbuild.build.call(void 0, {
1317
1407
  entryPoints: options1.entry,
1318
1408
  format: format === "cjs" && splitting || options1.treeshake ? "esm" : format,
1319
- bundle: typeof options1.bundle === "undefined" ? true : options1.bundle,
1409
+ bundle,
1320
1410
  platform,
1321
1411
  globalName: options1.globalName,
1322
1412
  jsxFactory: options1.jsxFactory,
@@ -1431,8 +1521,8 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1431
1521
  }
1432
1522
  }
1433
1523
  }
1434
- _chunkYHMM6RY5cjs.__name.call(void 0, runEsbuild, "runEsbuild");
1435
- var shebang = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
1524
+ _chunkSJESTPECcjs.__name.call(void 0, runEsbuild, "runEsbuild");
1525
+ var shebang = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
1436
1526
  return {
1437
1527
  name: "shebang",
1438
1528
  renderChunk(_, info) {
@@ -1442,7 +1532,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1442
1532
  }
1443
1533
  };
1444
1534
  }, "shebang");
1445
- var cjsSplitting = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
1535
+ var cjsSplitting = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
1446
1536
  return {
1447
1537
  name: "cjs-splitting",
1448
1538
  async renderChunk(code, info) {
@@ -1450,7 +1540,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1450
1540
  this.format !== "cjs" || info.type !== "chunk" || !/\.(js|cjs)$/.test(info.path)) {
1451
1541
  return;
1452
1542
  }
1453
- const { transform: transform3 } = await Promise.resolve().then(() => _interopRequireWildcard(_chunkYHMM6RY5cjs.__require.call(void 0, "sucrase")));
1543
+ const { transform: transform3 } = await Promise.resolve().then(() => _interopRequireWildcard(_chunkSJESTPECcjs.__require.call(void 0, "sucrase")));
1454
1544
  const result = transform3(code, {
1455
1545
  filePath: info.path,
1456
1546
  transforms: [
@@ -1467,8 +1557,8 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1467
1557
  }
1468
1558
  };
1469
1559
  }, "cjsSplitting");
1470
- var _sourcemap = _chunkYHMM6RY5cjs.__require.call(void 0, "source-map");
1471
- var outputFile = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (filepath, data, options1) => {
1560
+ var _sourcemap = _chunkSJESTPECcjs.__require.call(void 0, "source-map");
1561
+ var outputFile = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async (filepath, data, options1) => {
1472
1562
  await _fs2.default.promises.mkdir(_path2.default.dirname(filepath), {
1473
1563
  recursive: true
1474
1564
  });
@@ -1493,15 +1583,15 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1493
1583
  }
1494
1584
  }
1495
1585
  }
1496
- _chunkYHMM6RY5cjs.__name.call(void 0, copyDirSync, "copyDirSync");
1497
- var parseSourceMap = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (map) => {
1586
+ _chunkSJESTPECcjs.__name.call(void 0, copyDirSync, "copyDirSync");
1587
+ var parseSourceMap = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (map) => {
1498
1588
  return typeof map === "string" ? JSON.parse(map) : map;
1499
1589
  }, "parseSourceMap");
1500
- var isJS = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (path12) => /\.(js|mjs|cjs)$/.test(path12), "isJS");
1501
- var isCSS = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (path12) => /\.css$/.test(path12), "isCSS");
1590
+ var isJS = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (path12) => /\.(js|mjs|cjs)$/.test(path12), "isJS");
1591
+ var isCSS = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (path12) => /\.css$/.test(path12), "isCSS");
1502
1592
  var PluginContainer = class {
1503
1593
  static {
1504
- _chunkYHMM6RY5cjs.__name.call(void 0, this, "PluginContainer");
1594
+ _chunkSJESTPECcjs.__name.call(void 0, this, "PluginContainer");
1505
1595
  }
1506
1596
  constructor(plugins) {
1507
1597
  this.plugins = plugins;
@@ -1530,7 +1620,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1530
1620
  async buildFinished({ options: options1, outputFiles, metafile }) {
1531
1621
  const files = outputFiles.filter((file) => !file.path.endsWith(".map")).map((file) => {
1532
1622
  if (isJS(file.path) || isCSS(file.path)) {
1533
- const relativePath = _chunkTWFEYLU4js.slash.call(void 0, _path2.default.relative(_optionalChain2([options1, 'access', _56 => _56.workspaceConfig, 'optionalAccess', _57 => _57.workspaceRoot]) || process.cwd(), file.path));
1623
+ const relativePath = _chunkTWFEYLU4js.slash.call(void 0, _path2.default.relative(_optionalChain3([options1, 'access', _56 => _56.workspaceConfig, 'optionalAccess', _57 => _57.workspaceRoot]) || process.cwd(), file.path));
1534
1624
  const meta = _optionalChain([
1535
1625
  metafile,
1536
1626
  "optionalAccess",
@@ -1595,29 +1685,29 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1595
1685
  }
1596
1686
  }
1597
1687
  const inlineSourceMap = this.context.options.sourcemap === "inline";
1598
- const contents = info.type === "chunk" ? info.code + getSourcemapComment(inlineSourceMap, info.map, info.path, isCSS(info.path)) : info.contents;
1599
- await outputFile(info.path, contents, {
1688
+ const contents2 = info.type === "chunk" ? info.code + getSourcemapComment(inlineSourceMap, info.map, info.path, isCSS(info.path)) : info.contents;
1689
+ await outputFile(info.path, contents2, {
1600
1690
  mode: info.type === "chunk" ? info.mode : void 0
1601
1691
  });
1602
1692
  writtenFiles.push({
1603
1693
  get name() {
1604
- return _path2.default.relative(_optionalChain2([options1, 'access', _58 => _58.workspaceConfig, 'optionalAccess', _59 => _59.workspaceRoot]) || process.cwd(), info.path);
1694
+ return _path2.default.relative(_optionalChain3([options1, 'access', _58 => _58.workspaceConfig, 'optionalAccess', _59 => _59.workspaceRoot]) || process.cwd(), info.path);
1605
1695
  },
1606
1696
  get size() {
1607
- return contents.length;
1697
+ return contents2.length;
1608
1698
  }
1609
1699
  });
1610
1700
  if (info.type === "chunk" && info.map && !inlineSourceMap) {
1611
1701
  const map = typeof info.map === "string" ? JSON.parse(info.map) : info.map;
1612
1702
  const outPath = `${info.path}.map`;
1613
- const contents2 = JSON.stringify(map);
1614
- await outputFile(outPath, contents2);
1703
+ const contents22 = JSON.stringify(map);
1704
+ await outputFile(outPath, contents22);
1615
1705
  writtenFiles.push({
1616
1706
  get name() {
1617
- return _path2.default.relative(_optionalChain2([options1, 'access', _60 => _60.workspaceConfig, 'optionalAccess', _61 => _61.workspaceRoot]) || process.cwd(), outPath);
1707
+ return _path2.default.relative(_optionalChain3([options1, 'access', _60 => _60.workspaceConfig, 'optionalAccess', _61 => _61.workspaceRoot]) || process.cwd(), outPath);
1618
1708
  },
1619
1709
  get size() {
1620
- return contents2.length;
1710
+ return contents22.length;
1621
1711
  }
1622
1712
  });
1623
1713
  }
@@ -1631,7 +1721,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1631
1721
  }
1632
1722
  }
1633
1723
  };
1634
- var getSourcemapComment = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (inline, map, filepath, isCssFile) => {
1724
+ var getSourcemapComment = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (inline, map, filepath, isCssFile) => {
1635
1725
  if (!map) return "";
1636
1726
  const prefix = isCssFile ? "/*" : "//";
1637
1727
  const suffix = isCssFile ? " */" : "";
@@ -1642,7 +1732,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1642
1732
  "es5",
1643
1733
  "es3"
1644
1734
  ];
1645
- var swcTarget = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
1735
+ var swcTarget = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
1646
1736
  let enabled = false;
1647
1737
  let target;
1648
1738
  return {
@@ -1691,7 +1781,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1691
1781
  }
1692
1782
  };
1693
1783
  }, "swcTarget");
1694
- var sizeReporter = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
1784
+ var sizeReporter = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
1695
1785
  return {
1696
1786
  name: "size-reporter",
1697
1787
  buildEnd({ writtenFiles }) {
@@ -1704,8 +1794,8 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1704
1794
  }
1705
1795
  };
1706
1796
  }, "sizeReporter");
1707
- var _rollup = _chunkYHMM6RY5cjs.__require.call(void 0, "rollup");
1708
- var treeShakingPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ treeshake, name, silent }) => {
1797
+ var _rollup = _chunkSJESTPECcjs.__require.call(void 0, "rollup");
1798
+ var treeShakingPlugin = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, ({ treeshake, name: name2, silent }) => {
1709
1799
  return {
1710
1800
  name: "tree-shaking",
1711
1801
  async renderChunk(code, info) {
@@ -1741,7 +1831,7 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1741
1831
  file: info.path,
1742
1832
  sourcemap: !!this.options.sourcemap,
1743
1833
  compact: !!this.options.minify,
1744
- name
1834
+ name: name2
1745
1835
  });
1746
1836
  for (const file of result.output) {
1747
1837
  if (file.type === "chunk" && file.fileName === _path2.default.basename(info.path)) {
@@ -1754,16 +1844,16 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1754
1844
  }
1755
1845
  };
1756
1846
  }, "treeShakingPlugin");
1757
- var copyPublicDir = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (publicDir, outDir) => {
1847
+ var copyPublicDir = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (publicDir, outDir) => {
1758
1848
  if (!publicDir) return;
1759
1849
  copyDirSync(_path2.default.resolve(publicDir === true ? "public" : publicDir), outDir);
1760
1850
  }, "copyPublicDir");
1761
- var isInPublicDir = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (publicDir, filePath) => {
1851
+ var isInPublicDir = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (publicDir, filePath) => {
1762
1852
  if (!publicDir) return false;
1763
1853
  const publicPath = _chunkTWFEYLU4js.slash.call(void 0, _path2.default.resolve(publicDir === true ? "public" : publicDir));
1764
1854
  return _chunkTWFEYLU4js.slash.call(void 0, _path2.default.resolve(filePath)).startsWith(`${publicPath}/`);
1765
1855
  }, "isInPublicDir");
1766
- var terserPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ minifyOptions, format, terserOptions = {}, globalName, logger: logger3 }) => {
1856
+ var terserPlugin = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, ({ minifyOptions, format, terserOptions = {}, globalName, logger: logger3 }) => {
1767
1857
  return {
1768
1858
  name: "terser",
1769
1859
  async renderChunk(code, info) {
@@ -1806,12 +1896,12 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1806
1896
  }
1807
1897
  };
1808
1898
  }, "terserPlugin");
1809
- var _typescript = _chunkYHMM6RY5cjs.__require.call(void 0, "typescript");
1899
+ var _typescript = _chunkSJESTPECcjs.__require.call(void 0, "typescript");
1810
1900
  var _typescript2 = _interopRequireDefault(_typescript);
1811
1901
  var logger = _chunkVGC3FXLUjs.createLogger.call(void 0);
1812
1902
  var AliasPool = (_class = class {
1813
1903
  static {
1814
- _chunkYHMM6RY5cjs.__name.call(void 0, this, "_class");
1904
+ _chunkSJESTPECcjs.__name.call(void 0, this, "_class");
1815
1905
  }
1816
1906
  constructor() {
1817
1907
  _class.prototype.__init.call(this);
@@ -1819,11 +1909,11 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1819
1909
  __init() {
1820
1910
  this.seen = /* @__PURE__ */ new Set();
1821
1911
  }
1822
- assign(name) {
1912
+ assign(name2) {
1823
1913
  let suffix = 0;
1824
- let alias = name === "default" ? "default_alias" : name;
1914
+ let alias = name2 === "default" ? "default_alias" : name2;
1825
1915
  while (this.seen.has(alias)) {
1826
- alias = `${name}_alias_${++suffix}`;
1916
+ alias = `${name2}_alias_${++suffix}`;
1827
1917
  if (suffix >= 1e3) {
1828
1918
  throw new Error("Alias generation exceeded limit. Possible infinite loop detected.");
1829
1919
  }
@@ -1854,25 +1944,25 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1854
1944
  const exports1 = [];
1855
1945
  const exportSymbols = checker.getExportsOfModule(moduleSymbol);
1856
1946
  exportSymbols.forEach((symbol) => {
1857
- const name = symbol.getName();
1947
+ const name2 = symbol.getName();
1858
1948
  exports1.push({
1859
1949
  kind: "named",
1860
1950
  sourceFileName,
1861
1951
  destFileName,
1862
- name,
1863
- alias: assignAlias(name),
1952
+ name: name2,
1953
+ alias: assignAlias(name2),
1864
1954
  isTypeOnly: false
1865
1955
  });
1866
1956
  });
1867
1957
  return exports1;
1868
1958
  }
1869
- _chunkYHMM6RY5cjs.__name.call(void 0, extractExports, "extractExports");
1959
+ _chunkSJESTPECcjs.__name.call(void 0, extractExports, "extractExports");
1870
1960
  return program.getRootFileNames().flatMap(extractExports);
1871
1961
  }
1872
- _chunkYHMM6RY5cjs.__name.call(void 0, getExports, "getExports");
1962
+ _chunkSJESTPECcjs.__name.call(void 0, getExports, "getExports");
1873
1963
  function emitDtsFiles(program, host) {
1874
1964
  const fileMapping = /* @__PURE__ */ new Map();
1875
- const writeFile = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
1965
+ const writeFile = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
1876
1966
  const sourceFile = _optionalChain([
1877
1967
  sourceFiles,
1878
1968
  "optionalAccess",
@@ -1894,9 +1984,9 @@ var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
1894
1984
  const diagnosticMessages = [];
1895
1985
  diagnostics.forEach((diagnostic) => {
1896
1986
  if (diagnostic.file) {
1897
- const { line, character } = _typescript2.default.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
1987
+ const { line: line2, character } = _typescript2.default.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
1898
1988
  const message = _typescript2.default.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
1899
- diagnosticMessages.push(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
1989
+ diagnosticMessages.push(`${diagnostic.file.fileName} (${line2 + 1},${character + 1}): ${message}`);
1900
1990
  } else {
1901
1991
  const message = _typescript2.default.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
1902
1992
  diagnosticMessages.push(message);
@@ -1911,9 +2001,9 @@ ${diagnosticMessage}`);
1911
2001
  }
1912
2002
  return fileMapping;
1913
2003
  }
1914
- _chunkYHMM6RY5cjs.__name.call(void 0, emitDtsFiles, "emitDtsFiles");
2004
+ _chunkSJESTPECcjs.__name.call(void 0, emitDtsFiles, "emitDtsFiles");
1915
2005
  function emit(compilerOptions, tsconfig, _options) {
1916
- const cwd = _optionalChain2([_options, 'access', _62 => _62.workspaceConfig, 'optionalAccess', _63 => _63.workspaceRoot]) || process.cwd();
2006
+ const cwd = _optionalChain3([_options, 'access', _62 => _62.workspaceConfig, 'optionalAccess', _63 => _63.workspaceRoot]) || process.cwd();
1917
2007
  let rawTsconfig = _bundlerequire.loadTsConfig.call(void 0, cwd, tsconfig);
1918
2008
  if (!rawTsconfig) {
1919
2009
  rawTsconfig = _bundlerequire.loadTsConfig.call(void 0, process.cwd(), tsconfig);
@@ -1947,11 +2037,11 @@ ${diagnosticMessage}`);
1947
2037
  const fileMapping = emitDtsFiles(program, host);
1948
2038
  return getExports(program, fileMapping);
1949
2039
  }
1950
- _chunkYHMM6RY5cjs.__name.call(void 0, emit, "emit");
2040
+ _chunkSJESTPECcjs.__name.call(void 0, emit, "emit");
1951
2041
  function runTypeScriptCompiler(options1) {
1952
2042
  try {
1953
2043
  const start = Date.now();
1954
- const getDuration = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
2044
+ const getDuration = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
1955
2045
  return `${Math.floor(Date.now() - start)}ms`;
1956
2046
  }, "getDuration");
1957
2047
  logger.info("tsc", "Build start");
@@ -1964,16 +2054,16 @@ ${diagnosticMessage}`);
1964
2054
  logger.error("tsc", "Build error");
1965
2055
  }
1966
2056
  }
1967
- _chunkYHMM6RY5cjs.__name.call(void 0, runTypeScriptCompiler, "runTypeScriptCompiler");
2057
+ _chunkSJESTPECcjs.__name.call(void 0, runTypeScriptCompiler, "runTypeScriptCompiler");
1968
2058
  function formatAggregationExports(exports1, declarationDirPath) {
1969
- const lines = exports1.map((declaration) => formatAggregationExport(declaration, declarationDirPath)).filter(_chunkTWFEYLU4js.truthy);
1970
- if (lines.length === 0) {
1971
- lines.push("export {};");
2059
+ const lines2 = exports1.map((declaration) => formatAggregationExport(declaration, declarationDirPath)).filter(_chunkTWFEYLU4js.truthy);
2060
+ if (lines2.length === 0) {
2061
+ lines2.push("export {};");
1972
2062
  }
1973
- return `${lines.join("\n")}
2063
+ return `${lines2.join("\n")}
1974
2064
  `;
1975
2065
  }
1976
- _chunkYHMM6RY5cjs.__name.call(void 0, formatAggregationExports, "formatAggregationExports");
2066
+ _chunkSJESTPECcjs.__name.call(void 0, formatAggregationExports, "formatAggregationExports");
1977
2067
  function formatAggregationExport(declaration, declarationDirPath) {
1978
2068
  const dest = _chunkTWFEYLU4js.replaceDtsWithJsExtensions.call(void 0, `./${_path2.default.posix.normalize(_chunkTWFEYLU4js.slash.call(void 0, _path2.default.relative(declarationDirPath, declaration.destFileName)))}`);
1979
2069
  if (declaration.kind === "module") {
@@ -1992,7 +2082,7 @@ ${diagnosticMessage}`);
1992
2082
  throw new Error("Unknown declaration");
1993
2083
  }
1994
2084
  }
1995
- _chunkYHMM6RY5cjs.__name.call(void 0, formatAggregationExport, "formatAggregationExport");
2085
+ _chunkSJESTPECcjs.__name.call(void 0, formatAggregationExport, "formatAggregationExport");
1996
2086
  function formatDistributionExports(exports1, fromFilePath, toFilePath) {
1997
2087
  let importPath = _chunkTWFEYLU4js.replaceDtsWithJsExtensions.call(void 0, _path2.default.posix.relative(_path2.default.posix.dirname(_path2.default.posix.normalize(_chunkTWFEYLU4js.slash.call(void 0, fromFilePath))), _path2.default.posix.normalize(_chunkTWFEYLU4js.slash.call(void 0, toFilePath))));
1998
2088
  if (!/^\.+\//.test(importPath)) {
@@ -2002,7 +2092,7 @@ ${diagnosticMessage}`);
2002
2092
  named: /* @__PURE__ */ new Set(),
2003
2093
  module: /* @__PURE__ */ new Set()
2004
2094
  };
2005
- const lines = exports1.filter((declaration) => {
2095
+ const lines2 = exports1.filter((declaration) => {
2006
2096
  if (declaration.kind === "module") {
2007
2097
  if (seen.module.has(declaration.moduleName)) {
2008
2098
  return false;
@@ -2019,13 +2109,13 @@ ${diagnosticMessage}`);
2019
2109
  return false;
2020
2110
  }
2021
2111
  }).map((declaration) => formatDistributionExport(declaration, importPath)).filter(_chunkTWFEYLU4js.truthy);
2022
- if (lines.length === 0) {
2023
- lines.push("export {};");
2112
+ if (lines2.length === 0) {
2113
+ lines2.push("export {};");
2024
2114
  }
2025
- return `${lines.join("\n")}
2115
+ return `${lines2.join("\n")}
2026
2116
  `;
2027
2117
  }
2028
- _chunkYHMM6RY5cjs.__name.call(void 0, formatDistributionExports, "formatDistributionExports");
2118
+ _chunkSJESTPECcjs.__name.call(void 0, formatDistributionExports, "formatDistributionExports");
2029
2119
  function formatDistributionExport(declaration, dest) {
2030
2120
  if (declaration.kind === "named") {
2031
2121
  return [
@@ -2042,10 +2132,10 @@ ${diagnosticMessage}`);
2042
2132
  }
2043
2133
  return "";
2044
2134
  }
2045
- _chunkYHMM6RY5cjs.__name.call(void 0, formatDistributionExport, "formatDistributionExport");
2135
+ _chunkSJESTPECcjs.__name.call(void 0, formatDistributionExport, "formatDistributionExport");
2046
2136
  var logger2 = _chunkVGC3FXLUjs.createLogger.call(void 0);
2047
2137
  function rollupDtsFile(inputFilePath, outputFilePath, tsconfigFilePath, options1) {
2048
- const cwd = _optionalChain2([options1, 'access', _64 => _64.workspaceConfig, 'optionalAccess', _65 => _65.workspaceRoot]) || process.cwd();
2138
+ const cwd = _optionalChain3([options1, 'access', _64 => _64.workspaceConfig, 'optionalAccess', _65 => _65.workspaceRoot]) || process.cwd();
2049
2139
  const packageJsonFullPath = _path2.default.join(cwd, "package.json");
2050
2140
  const configObject = {
2051
2141
  mainEntryPointFilePath: inputFilePath,
@@ -2091,7 +2181,7 @@ ${diagnosticMessage}`);
2091
2181
  throw new Error(`API Extractor completed with ${extractorResult.errorCount} errors and ${extractorResult.warningCount} warnings when processing ${inputFilePath}`);
2092
2182
  }
2093
2183
  }
2094
- _chunkYHMM6RY5cjs.__name.call(void 0, rollupDtsFile, "rollupDtsFile");
2184
+ _chunkSJESTPECcjs.__name.call(void 0, rollupDtsFile, "rollupDtsFile");
2095
2185
  async function rollupDtsFiles(options1, exports1, format) {
2096
2186
  if (!options1.experimentalDts || !_optionalChain([
2097
2187
  options1,
@@ -2104,7 +2194,7 @@ ${diagnosticMessage}`);
2104
2194
  }
2105
2195
  const declarationDir = _chunkTWFEYLU4js.ensureTempDeclarationDir.call(void 0, options1);
2106
2196
  const outDir = options1.outDir || "dist";
2107
- const pkg = await _chunkVGC3FXLUjs.loadPkg.call(void 0, _optionalChain2([options1, 'access', _66 => _66.workspaceConfig, 'optionalAccess', _67 => _67.workspaceRoot]) || process.cwd());
2197
+ const pkg = await _chunkVGC3FXLUjs.loadPkg.call(void 0, _optionalChain3([options1, 'access', _66 => _66.workspaceConfig, 'optionalAccess', _67 => _67.workspaceRoot]) || process.cwd());
2108
2198
  const dtsExtension = _chunkTWFEYLU4js.defaultOutExtension.call(void 0, {
2109
2199
  format,
2110
2200
  pkgType: pkg.type
@@ -2122,7 +2212,7 @@ ${diagnosticMessage}`);
2122
2212
  _chunkTWFEYLU4js.writeFileSync.call(void 0, outFileName, formatDistributionExports(currentExports, outFileName, dtsOutputFilePath));
2123
2213
  }
2124
2214
  }
2125
- _chunkYHMM6RY5cjs.__name.call(void 0, rollupDtsFiles, "rollupDtsFiles");
2215
+ _chunkSJESTPECcjs.__name.call(void 0, rollupDtsFiles, "rollupDtsFiles");
2126
2216
  async function cleanDtsFiles(options1) {
2127
2217
  if (options1.clean) {
2128
2218
  await _chunkTWFEYLU4js.removeFiles.call(void 0, [
@@ -2130,11 +2220,11 @@ ${diagnosticMessage}`);
2130
2220
  ], options1.outDir);
2131
2221
  }
2132
2222
  }
2133
- _chunkYHMM6RY5cjs.__name.call(void 0, cleanDtsFiles, "cleanDtsFiles");
2223
+ _chunkSJESTPECcjs.__name.call(void 0, cleanDtsFiles, "cleanDtsFiles");
2134
2224
  async function runDtsRollup(options1, exports1) {
2135
2225
  try {
2136
2226
  const start = Date.now();
2137
- const getDuration = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
2227
+ const getDuration = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
2138
2228
  return `${Math.floor(Date.now() - start)}ms`;
2139
2229
  }, "getDuration");
2140
2230
  logger2.info("dts", "Build start");
@@ -2151,8 +2241,8 @@ ${diagnosticMessage}`);
2151
2241
  logger2.error("dts", "Build error");
2152
2242
  }
2153
2243
  }
2154
- _chunkYHMM6RY5cjs.__name.call(void 0, runDtsRollup, "runDtsRollup");
2155
- var cjsInterop = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
2244
+ _chunkSJESTPECcjs.__name.call(void 0, runDtsRollup, "runDtsRollup");
2245
+ var cjsInterop = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
2156
2246
  return {
2157
2247
  name: "cjs-interop",
2158
2248
  renderChunk(code, info) {
@@ -2174,17 +2264,17 @@ module.exports = exports.default;
2174
2264
  }
2175
2265
  };
2176
2266
  }, "cjsInterop");
2177
- var defineConfig = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (options1) => options1, "defineConfig");
2178
- var isTaskkillCmdProcessNotFoundError = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (err) => {
2267
+ var defineConfig = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (options1) => options1, "defineConfig");
2268
+ var isTaskkillCmdProcessNotFoundError = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (err) => {
2179
2269
  return process.platform === "win32" && "cmd" in err && "code" in err && typeof err.cmd === "string" && err.cmd.startsWith("taskkill") && err.code === 128;
2180
2270
  }, "isTaskkillCmdProcessNotFoundError");
2181
- var killProcess = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ pid, signal }) => new Promise((resolve, reject) => {
2271
+ var killProcess = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, ({ pid, signal }) => new Promise((resolve, reject) => {
2182
2272
  _treekill2.default.call(void 0, pid, signal, (err) => {
2183
2273
  if (err && !isTaskkillCmdProcessNotFoundError(err)) return reject(err);
2184
2274
  resolve();
2185
2275
  });
2186
2276
  }), "killProcess");
2187
- var normalizeOptions = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (logger3, optionsFromConfigFile, optionsOverride) => {
2277
+ var normalizeOptions = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async (logger3, optionsFromConfigFile, optionsOverride) => {
2188
2278
  const _options = {
2189
2279
  ...optionsFromConfigFile,
2190
2280
  ...optionsOverride
@@ -2227,9 +2317,9 @@ module.exports = exports.default;
2227
2317
  options1.entry = entry;
2228
2318
  logger3.info("CLI", `Building entry: ${JSON.stringify(entry)}`);
2229
2319
  }
2230
- const tsconfig = _bundlerequire.loadTsConfig.call(void 0, _optionalChain2([options1, 'access', _68 => _68.workspaceConfig, 'optionalAccess', _69 => _69.workspaceRoot]) || process.cwd(), options1.tsconfig);
2320
+ const tsconfig = _bundlerequire.loadTsConfig.call(void 0, _optionalChain3([options1, 'access', _68 => _68.workspaceConfig, 'optionalAccess', _69 => _69.workspaceRoot]) || process.cwd(), options1.tsconfig);
2231
2321
  if (tsconfig) {
2232
- logger3.info("CLI", `Using tsconfig: ${_path2.default.relative(_optionalChain2([options1, 'access', _70 => _70.workspaceConfig, 'optionalAccess', _71 => _71.workspaceRoot]) || process.cwd(), tsconfig.path)}`);
2322
+ logger3.info("CLI", `Using tsconfig: ${_path2.default.relative(_optionalChain3([options1, 'access', _70 => _70.workspaceConfig, 'optionalAccess', _71 => _71.workspaceRoot]) || process.cwd(), tsconfig.path)}`);
2233
2323
  options1.tsconfig = tsconfig.path;
2234
2324
  options1.tsconfigResolvePaths = _optionalChain([
2235
2325
  tsconfig,
@@ -2282,7 +2372,7 @@ module.exports = exports.default;
2282
2372
  return options1;
2283
2373
  }, "normalizeOptions");
2284
2374
  async function build(_options) {
2285
- const config = _options.config === false ? {} : await _chunkVGC3FXLUjs.loadTsupConfig.call(void 0, _optionalChain2([_options, 'access', _72 => _72.workspaceConfig, 'optionalAccess', _73 => _73.workspaceRoot]) || process.cwd(), _options.config === true ? void 0 : _options.config);
2375
+ const config = _options.config === false ? {} : await _chunkVGC3FXLUjs.loadTsupConfig.call(void 0, _optionalChain3([_options, 'access', _72 => _72.workspaceConfig, 'optionalAccess', _73 => _73.workspaceRoot]) || process.cwd(), _options.config === true ? void 0 : _options.config);
2286
2376
  const configData = typeof config.data === "function" ? await config.data(_options) : config.data;
2287
2377
  await Promise.all([
2288
2378
  ...Array.isArray(configData) ? configData : [
@@ -2302,13 +2392,13 @@ module.exports = exports.default;
2302
2392
  if (options1.watch) {
2303
2393
  logger3.info("CLI", "Running in watch mode");
2304
2394
  }
2305
- const experimentalDtsTask = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
2395
+ const experimentalDtsTask = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async () => {
2306
2396
  if (!options1.dts && options1.experimentalDts) {
2307
2397
  const exports1 = runTypeScriptCompiler(options1);
2308
2398
  await runDtsRollup(options1, exports1);
2309
2399
  }
2310
2400
  }, "experimentalDtsTask");
2311
- const dtsTask = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
2401
+ const dtsTask = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async () => {
2312
2402
  if (options1.dts && options1.experimentalDts) {
2313
2403
  throw new Error("You can't use both `dts` and `experimentalDts` at the same time");
2314
2404
  }
@@ -2316,7 +2406,7 @@ module.exports = exports.default;
2316
2406
  if (options1.dts) {
2317
2407
  await new Promise((resolve, reject) => {
2318
2408
  const worker = new (0, _worker_threads.Worker)(_path2.default.join(__dirname, "./rollup.js"));
2319
- const terminateWorker = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
2409
+ const terminateWorker = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, () => {
2320
2410
  if (options1.watch) return;
2321
2411
  worker.terminate();
2322
2412
  }, "terminateWorker");
@@ -2359,7 +2449,7 @@ module.exports = exports.default;
2359
2449
  });
2360
2450
  }
2361
2451
  }, "dtsTask");
2362
- const mainTasks = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
2452
+ const mainTasks = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async () => {
2363
2453
  if (!_optionalChain([
2364
2454
  options1,
2365
2455
  "access",
@@ -2370,8 +2460,8 @@ module.exports = exports.default;
2370
2460
  let onSuccessProcess;
2371
2461
  let onSuccessCleanup;
2372
2462
  const buildDependencies = /* @__PURE__ */ new Set();
2373
- let depsHash = await _chunkVGC3FXLUjs.getAllDepsHash.call(void 0, _optionalChain2([options1, 'access', _74 => _74.workspaceConfig, 'optionalAccess', _75 => _75.workspaceRoot]) || process.cwd());
2374
- const doOnSuccessCleanup = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
2463
+ let depsHash = await _chunkVGC3FXLUjs.getAllDepsHash.call(void 0, _optionalChain3([options1, 'access', _74 => _74.workspaceConfig, 'optionalAccess', _75 => _75.workspaceRoot]) || process.cwd());
2464
+ const doOnSuccessCleanup = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async () => {
2375
2465
  if (onSuccessProcess) {
2376
2466
  await killProcess({
2377
2467
  pid: onSuccessProcess.pid,
@@ -2386,7 +2476,7 @@ module.exports = exports.default;
2386
2476
  const debouncedBuildAll = _chunkTWFEYLU4js.debouncePromise.call(void 0, () => {
2387
2477
  return buildAll();
2388
2478
  }, 100, _chunkJZ25TPTYjs.handleError);
2389
- const buildAll = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
2479
+ const buildAll = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async () => {
2390
2480
  await doOnSuccessCleanup();
2391
2481
  const previousBuildDependencies = new Set(buildDependencies);
2392
2482
  buildDependencies.clear();
@@ -2462,9 +2552,9 @@ module.exports = exports.default;
2462
2552
  }
2463
2553
  }
2464
2554
  }, "buildAll");
2465
- const startWatcher = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
2555
+ const startWatcher = /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, async () => {
2466
2556
  if (!options1.watch) return;
2467
- const { watch } = await Promise.resolve().then(() => _interopRequireWildcard(_chunkYHMM6RY5cjs.__require.call(void 0, "chokidar")));
2557
+ const { watch } = await Promise.resolve().then(() => _interopRequireWildcard(_chunkSJESTPECcjs.__require.call(void 0, "chokidar")));
2468
2558
  const customIgnores = options1.ignoreWatch ? Array.isArray(options1.ignoreWatch) ? options1.ignoreWatch : [
2469
2559
  options1.ignoreWatch
2470
2560
  ] : [];
@@ -2479,7 +2569,7 @@ module.exports = exports.default;
2479
2569
  const watcher = watch(await _tinyglobby.glob.call(void 0, watchPaths), {
2480
2570
  ignoreInitial: true,
2481
2571
  ignorePermissionErrors: true,
2482
- ignored: /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (p) => _tinyglobby.globSync.call(void 0, p, {
2572
+ ignored: /* @__PURE__ */ _chunkSJESTPECcjs.__name.call(void 0, (p) => _tinyglobby.globSync.call(void 0, p, {
2483
2573
  ignore: ignored
2484
2574
  }).length === 0, "ignored")
2485
2575
  });
@@ -2493,7 +2583,7 @@ module.exports = exports.default;
2493
2583
  let shouldSkipChange = false;
2494
2584
  if (options1.watch === true) {
2495
2585
  if (file === "package.json" && !buildDependencies.has(file)) {
2496
- const currentHash = await _chunkVGC3FXLUjs.getAllDepsHash.call(void 0, _optionalChain2([options1, 'access', _76 => _76.workspaceConfig, 'optionalAccess', _77 => _77.workspaceRoot]) || process.cwd());
2586
+ const currentHash = await _chunkVGC3FXLUjs.getAllDepsHash.call(void 0, _optionalChain3([options1, 'access', _76 => _76.workspaceConfig, 'optionalAccess', _77 => _77.workspaceRoot]) || process.cwd());
2497
2587
  shouldSkipChange = currentHash === depsHash;
2498
2588
  depsHash = currentHash;
2499
2589
  } else if (!buildDependencies.has(file)) {
@@ -2519,26 +2609,27 @@ module.exports = exports.default;
2519
2609
  ]);
2520
2610
  }));
2521
2611
  }
2522
- _chunkYHMM6RY5cjs.__name.call(void 0, build, "build");
2612
+ _chunkSJESTPECcjs.__name.call(void 0, build, "build");
2523
2613
  exports.build = build;
2524
2614
  exports.defineConfig = defineConfig;
2525
2615
  }
2526
2616
  });
2527
2617
 
2528
2618
  // src/tsup.ts
2529
- var import_tsup = _chunkYHMM6RY5cjs.__toESM.call(void 0, require_dist(), 1);
2619
+ _chunkSJESTPECcjs.init_cjs_shims.call(void 0, );
2620
+ var import_tsup = _chunkSJESTPECcjs.__toESM.call(void 0, require_dist(), 1);
2530
2621
  async function executeTsup(context) {
2531
- _chunkEVDNG72Rcjs.writeDebug.call(void 0, ` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
2532
- const stopwatch = _chunkEVDNG72Rcjs.getStopwatch.call(void 0, `${context.options.name} build`);
2622
+ _chunk2SU3HI5Qcjs.writeDebug.call(void 0, ` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
2623
+ const stopwatch = _chunk2SU3HI5Qcjs.getStopwatch.call(void 0, `${context.options.name} build`);
2533
2624
  await (0, import_tsup.build)({
2534
2625
  ...context.options,
2535
- outDir: context.options.distDir ? _chunkYHMM6RY5cjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
2626
+ outDir: context.options.distDir ? _chunkRIGD2PFDcjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
2536
2627
  workspaceConfig: context.workspaceConfig
2537
2628
  });
2538
2629
  stopwatch();
2539
2630
  return context;
2540
2631
  }
2541
- _chunkYHMM6RY5cjs.__name.call(void 0, executeTsup, "executeTsup");
2632
+ _chunkSJESTPECcjs.__name.call(void 0, executeTsup, "executeTsup");
2542
2633
 
2543
2634
 
2544
2635