nitro 3.0.260311-beta → 3.0.260429-beta

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 (211) hide show
  1. package/dist/THIRD-PARTY-LICENSES.md +32 -2
  2. package/dist/_build/common.mjs +669 -1627
  3. package/dist/_build/rolldown.mjs +1 -12
  4. package/dist/_build/rollup.mjs +2 -15
  5. package/dist/_build/vite.build.mjs +1 -3
  6. package/dist/_chunks/nitro.mjs +28 -221
  7. package/dist/_chunks/nitro2.mjs +1 -3
  8. package/dist/_chunks/nitro3.mjs +128 -121
  9. package/dist/_chunks/nitro4.mjs +127 -0
  10. package/dist/_chunks/utils.mjs +2 -9
  11. package/dist/_common.mjs +1 -3
  12. package/dist/_dev.d.mts +0 -3
  13. package/dist/_dev.mjs +3 -12
  14. package/dist/_libs/c12+rc9.mjs +45 -31
  15. package/dist/_libs/c12+readdirp+chokidar.d.mts +0 -7
  16. package/dist/_libs/citty.mjs +134 -31
  17. package/dist/_libs/commondir+is-reference.mjs +2 -9
  18. package/dist/_libs/compatx.d.mts +0 -2
  19. package/dist/_libs/compatx.mjs +0 -2
  20. package/dist/_libs/esbuild.d.mts +0 -1
  21. package/dist/_libs/estree+pluginutils.d.mts +0 -5
  22. package/dist/_libs/estree-walker.mjs +3 -88
  23. package/dist/_libs/hasown+resolve+deepmerge.mjs +69 -119
  24. package/dist/_libs/httpxy.d.mts +6 -4
  25. package/dist/_libs/httpxy.mjs +286 -118
  26. package/dist/_libs/klona.mjs +0 -2
  27. package/dist/_libs/magic-string.d.mts +0 -2
  28. package/dist/_libs/mlly.d.mts +0 -2
  29. package/dist/_libs/nypm+tinyexec.mjs +161 -153
  30. package/dist/_libs/perfect-debounce.mjs +0 -20
  31. package/dist/_libs/pkg-types.d.mts +7 -7
  32. package/dist/_libs/plugin-alias.mjs +0 -2
  33. package/dist/_libs/plugin-inject.mjs +3 -3
  34. package/dist/_libs/plugin-json.mjs +0 -2
  35. package/dist/_libs/pluginutils.mjs +4 -28
  36. package/dist/_libs/readdirp+chokidar.mjs +2 -174
  37. package/dist/_libs/remapping.mjs +0 -2
  38. package/dist/_libs/resolve-uri+gen-mapping.mjs +0 -32
  39. package/dist/_libs/rou3.d.mts +0 -4
  40. package/dist/_libs/rou3.mjs +0 -29
  41. package/dist/_libs/std-env.d.mts +1 -3
  42. package/dist/_libs/tsconfck.mjs +0 -294
  43. package/dist/_libs/ultrahtml.mjs +0 -2
  44. package/dist/_libs/{unimport+unplugin.mjs → unimport+unplugin+oxc-parser.mjs} +50 -81
  45. package/dist/_libs/unplugin+unimport.d.mts +1 -8
  46. package/dist/_libs/unwasm.d.mts +0 -3
  47. package/dist/_presets.mjs +213 -81
  48. package/dist/builder.d.mts +1 -22
  49. package/dist/builder.mjs +0 -11
  50. package/dist/cli/_chunks/build.mjs +1 -3
  51. package/dist/cli/_chunks/common.mjs +0 -2
  52. package/dist/cli/_chunks/deploy.mjs +1 -4
  53. package/dist/cli/_chunks/dev.mjs +1 -6
  54. package/dist/cli/_chunks/docs.mjs +1 -3
  55. package/dist/cli/_chunks/list.mjs +1 -3
  56. package/dist/cli/_chunks/prepare.mjs +1 -3
  57. package/dist/cli/_chunks/preview.mjs +2 -5
  58. package/dist/cli/_chunks/run.mjs +1 -3
  59. package/dist/cli/_chunks/task.mjs +0 -2
  60. package/dist/cli/index.mjs +0 -2
  61. package/{skills/nitro/docs/docs/quick-start.md → dist/docs/0.docs/1.quick-start.md} +4 -4
  62. package/{skills/nitro/docs/docs/lifecycle.md → dist/docs/0.docs/10.lifecycle.md} +4 -4
  63. package/dist/docs/0.docs/11.openapi.md +291 -0
  64. package/{skills/nitro/docs/docs/plugins.md → dist/docs/0.docs/12.plugins.md} +2 -2
  65. package/{skills/nitro/docs/docs/tasks.md → dist/docs/0.docs/13.tasks.md} +6 -6
  66. package/dist/docs/0.docs/14.websocket.md +386 -0
  67. package/{skills/nitro/docs/docs/migration.md → dist/docs/0.docs/15.migration.md} +2 -4
  68. package/{skills/nitro/docs/docs/renderer.md → dist/docs/0.docs/2.renderer.md} +8 -8
  69. package/{skills/nitro/docs/docs/routing.md → dist/docs/0.docs/3.routing.md} +34 -34
  70. package/{skills/nitro/docs/docs/server-entry.md → dist/docs/0.docs/4.server-entry.md} +6 -6
  71. package/{skills/nitro/docs/docs/cache.md → dist/docs/0.docs/5.cache.md} +65 -21
  72. package/{skills/nitro/docs/docs/storage.md → dist/docs/0.docs/6.storage.md} +6 -6
  73. package/{skills/nitro/docs/docs/assets.md → dist/docs/0.docs/7.assets.md} +8 -8
  74. package/{skills/nitro/docs/docs/configuration.md → dist/docs/0.docs/8.configuration.md} +16 -16
  75. package/{skills/nitro/docs/docs/database.md → dist/docs/0.docs/9.database.md} +6 -6
  76. package/{skills/nitro/docs/deploy → dist/docs/1.deploy/0.index}/index.md +3 -3
  77. package/{skills/nitro/docs/deploy/providers/aws.md → dist/docs/1.deploy/2.providers/1.aws.md} +4 -4
  78. package/{skills/nitro/docs/deploy/providers/iis.md → dist/docs/1.deploy/2.providers/15.iis.md} +2 -2
  79. package/{skills/nitro/docs/deploy/providers/aws-amplify.md → dist/docs/1.deploy/2.providers/2.aws-amplify.md} +2 -2
  80. package/{skills/nitro/docs/deploy/providers/vercel.md → dist/docs/1.deploy/2.providers/21.vercel.md} +98 -7
  81. package/{skills/nitro/docs/deploy/providers/zephyr.md → dist/docs/1.deploy/2.providers/23.zephyr.md} +2 -2
  82. package/{skills/nitro/docs/deploy/providers/cloudflare.md → dist/docs/1.deploy/2.providers/5.cloudflare.md} +9 -15
  83. package/dist/docs/1.deploy/2.providers/8.edgeone.md +20 -0
  84. package/{skills/nitro/docs/config → dist/docs/2.config/0.index}/index.md +165 -91
  85. package/{skills/nitro/docs/examples/hono.md → dist/docs/3.examples/10.hono.md} +1 -1
  86. package/{skills/nitro/docs/examples/import-alias.md → dist/docs/3.examples/11.import-alias.md} +1 -4
  87. package/{skills/nitro/docs/examples/mono-jsx.md → dist/docs/3.examples/13.mono-jsx.md} +2 -2
  88. package/{skills/nitro/docs/examples/plugins.md → dist/docs/3.examples/15.plugins.md} +4 -4
  89. package/{skills/nitro/docs/examples/shiki.md → dist/docs/3.examples/19.shiki.md} +1 -1
  90. package/{skills/nitro/docs/examples/auto-imports.md → dist/docs/3.examples/2.auto-imports.md} +0 -1
  91. package/{skills/nitro/docs/examples/vite-nitro-plugin.md → dist/docs/3.examples/21.vite-nitro-plugin.md} +1 -1
  92. package/{skills/nitro/docs/examples/vite-rsc.md → dist/docs/3.examples/22.vite-rsc.md} +4 -4
  93. package/{skills/nitro/docs/examples/vite-ssr-html.md → dist/docs/3.examples/23.vite-ssr-html.md} +3 -3
  94. package/{skills/nitro/docs/examples/vite-ssr-preact.md → dist/docs/3.examples/24.vite-ssr-preact.md} +6 -6
  95. package/{skills/nitro/docs/examples/vite-ssr-react.md → dist/docs/3.examples/25.vite-ssr-react.md} +3 -3
  96. package/{skills/nitro/docs/examples/vite-ssr-solid.md → dist/docs/3.examples/26.vite-ssr-solid.md} +3 -3
  97. package/{skills/nitro/docs/examples/vite-ssr-tsr-react.md → dist/docs/3.examples/27.vite-ssr-tsr-react.md} +6 -6
  98. package/{skills/nitro/docs/examples/vite-ssr-tss-react.md → dist/docs/3.examples/28.vite-ssr-tss-react.md} +11 -11
  99. package/{skills/nitro/docs/examples/vite-ssr-vue-router.md → dist/docs/3.examples/29.vite-ssr-vue-router.md} +6 -5
  100. package/{skills/nitro/docs/examples/vite-trpc.md → dist/docs/3.examples/30.vite-trpc.md} +3 -3
  101. package/{skills/nitro/docs/examples/elysia.md → dist/docs/3.examples/6.elysia.md} +1 -1
  102. package/{skills/nitro/docs/examples/fastify.md → dist/docs/3.examples/8.fastify.md} +1 -1
  103. package/dist/docs/README.md +86 -0
  104. package/dist/node_modules/@speed-highlight/core/dist/index.js +4 -4
  105. package/dist/node_modules/@speed-highlight/core/dist/terminal.js +2 -2
  106. package/dist/node_modules/@speed-highlight/core/package.json +1 -1
  107. package/dist/node_modules/cookie-es/dist/index.mjs +299 -250
  108. package/dist/node_modules/cookie-es/package.json +26 -23
  109. package/dist/node_modules/defu/dist/defu.mjs +2 -2
  110. package/dist/node_modules/defu/package.json +33 -28
  111. package/dist/node_modules/rendu/dist/_chunks/libs/cookie-es.mjs +151 -0
  112. package/dist/node_modules/rendu/dist/index.mjs +5 -112
  113. package/dist/node_modules/rendu/package.json +25 -24
  114. package/dist/node_modules/ufo/dist/index.mjs +2 -2
  115. package/dist/node_modules/ufo/package.json +9 -9
  116. package/dist/node_modules/youch/package.json +2 -2
  117. package/dist/presets/_nitro/runtime/nitro-dev.mjs +3 -1
  118. package/dist/presets/_nitro/runtime/service-worker.mjs +1 -1
  119. package/dist/presets/aws-lambda/runtime/_utils.mjs +6 -6
  120. package/dist/presets/azure/runtime/_utils.mjs +5 -5
  121. package/dist/presets/azure/runtime/azure-swa.mjs +7 -5
  122. package/dist/presets/bun/runtime/bun.mjs +5 -3
  123. package/dist/presets/cloudflare/runtime/_module-handler.mjs +1 -1
  124. package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +4 -4
  125. package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +3 -3
  126. package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +2 -2
  127. package/dist/presets/cloudflare/runtime/plugin.dev.mjs +10 -21
  128. package/dist/presets/deno/runtime/deno-deploy.mjs +4 -4
  129. package/dist/presets/deno/runtime/deno-server.mjs +5 -3
  130. package/dist/presets/edgeone/runtime/edgeone.mjs +10 -0
  131. package/dist/presets/netlify/runtime/netlify-edge.mjs +2 -2
  132. package/dist/presets/node/runtime/node-cluster.mjs +2 -2
  133. package/dist/presets/node/runtime/node-middleware.mjs +1 -1
  134. package/dist/presets/node/runtime/node-server.mjs +5 -3
  135. package/dist/presets/stormkit/runtime/stormkit.mjs +1 -1
  136. package/dist/presets/vercel/runtime/cron-handler.mjs +1 -1
  137. package/dist/presets/vercel/runtime/queue-handler.mjs +21 -0
  138. package/dist/presets/vercel/runtime/vercel.node.mjs +3 -3
  139. package/dist/presets/vercel/runtime/vercel.web.mjs +1 -1
  140. package/dist/presets/winterjs/runtime/winterjs.mjs +10 -10
  141. package/dist/runtime/internal/app.mjs +12 -11
  142. package/dist/runtime/internal/context.mjs +1 -9
  143. package/dist/runtime/internal/error/dev.mjs +10 -10
  144. package/dist/runtime/internal/route-rules.d.mts +4 -1
  145. package/dist/runtime/internal/route-rules.mjs +38 -8
  146. package/dist/runtime/internal/routes/dev-tasks.mjs +13 -12
  147. package/dist/runtime/internal/routes/openapi.mjs +2 -2
  148. package/dist/runtime/internal/routes/scalar.mjs +4 -3
  149. package/dist/runtime/internal/routes/swagger.mjs +7 -4
  150. package/dist/runtime/internal/runtime-config.mjs +2 -2
  151. package/dist/runtime/internal/task.mjs +5 -5
  152. package/dist/runtime/meta.d.mts +1 -0
  153. package/dist/runtime/meta.mjs +1 -0
  154. package/dist/runtime/nitro.mjs +3 -3
  155. package/dist/runtime/virtual/renderer-template.mjs +1 -1
  156. package/dist/runtime/virtual/tracing.d.mts +5 -0
  157. package/dist/runtime/virtual/tracing.mjs +1 -0
  158. package/dist/types/index.d.mts +1074 -147
  159. package/dist/vite.d.mts +1 -6
  160. package/dist/vite.mjs +67 -32
  161. package/lib/tsconfig.json +3 -5
  162. package/package.json +62 -59
  163. package/dist/_libs/_.mjs +0 -3
  164. package/dist/_libs/_2.mjs +0 -2
  165. package/dist/_libs/_3.mjs +0 -3
  166. package/dist/_libs/_4.mjs +0 -2
  167. package/dist/_libs/_5.mjs +0 -3
  168. package/dist/_libs/_6.mjs +0 -4
  169. package/dist/_libs/_7.mjs +0 -5
  170. package/dist/_libs/escape-string-regexp.mjs +0 -7
  171. package/skills/nitro/SKILL.md +0 -10
  172. package/skills/nitro/docs/TOC.md +0 -83
  173. package/skills/nitro/docs/_navigation.json +0 -679
  174. /package/{skills/nitro/docs/docs → dist/docs/0.docs/0.index}/index.md +0 -0
  175. /package/{skills/nitro/docs/docs/nightly.md → dist/docs/0.docs/16.nightly.md} +0 -0
  176. /package/{skills/nitro/docs/deploy/runtimes/node.md → dist/docs/1.deploy/1.runtimes/0.node.md} +0 -0
  177. /package/{skills/nitro/docs/deploy/runtimes/bun.md → dist/docs/1.deploy/1.runtimes/1.bun.md} +0 -0
  178. /package/{skills/nitro/docs/deploy/runtimes/deno.md → dist/docs/1.deploy/1.runtimes/2.deno.md} +0 -0
  179. /package/{skills/nitro/docs/deploy/providers/alwaysdata.md → dist/docs/1.deploy/2.providers/0.alwaysdata.md} +0 -0
  180. /package/{skills/nitro/docs/deploy/providers/flightcontrol.md → dist/docs/1.deploy/2.providers/10.flightcontrol.md} +0 -0
  181. /package/{skills/nitro/docs/deploy/providers/genezio.md → dist/docs/1.deploy/2.providers/11.genezio.md} +0 -0
  182. /package/{skills/nitro/docs/deploy/providers/github-pages.md → dist/docs/1.deploy/2.providers/12.github-pages.md} +0 -0
  183. /package/{skills/nitro/docs/deploy/providers/gitlab-pages.md → dist/docs/1.deploy/2.providers/13.gitlab-pages.md} +0 -0
  184. /package/{skills/nitro/docs/deploy/providers/heroku.md → dist/docs/1.deploy/2.providers/14.heroku.md} +0 -0
  185. /package/{skills/nitro/docs/deploy/providers/koyeb.md → dist/docs/1.deploy/2.providers/16.koyeb.md} +0 -0
  186. /package/{skills/nitro/docs/deploy/providers/netlify.md → dist/docs/1.deploy/2.providers/17.netlify.md} +0 -0
  187. /package/{skills/nitro/docs/deploy/providers/platform-sh.md → dist/docs/1.deploy/2.providers/18.platform-sh.md} +0 -0
  188. /package/{skills/nitro/docs/deploy/providers/render.md → dist/docs/1.deploy/2.providers/19.render.md} +0 -0
  189. /package/{skills/nitro/docs/deploy/providers/stormkit.md → dist/docs/1.deploy/2.providers/20.stormkit.md} +0 -0
  190. /package/{skills/nitro/docs/deploy/providers/zeabur.md → dist/docs/1.deploy/2.providers/22.zeabur.md} +0 -0
  191. /package/{skills/nitro/docs/deploy/providers/zerops.md → dist/docs/1.deploy/2.providers/24.zerops.md} +0 -0
  192. /package/{skills/nitro/docs/deploy/providers/azure.md → dist/docs/1.deploy/2.providers/3.azure.md} +0 -0
  193. /package/{skills/nitro/docs/deploy/providers/cleavr.md → dist/docs/1.deploy/2.providers/4.cleavr.md} +0 -0
  194. /package/{skills/nitro/docs/deploy/providers/deno-deploy.md → dist/docs/1.deploy/2.providers/6.deno-deploy.md} +0 -0
  195. /package/{skills/nitro/docs/deploy/providers/digitalocean.md → dist/docs/1.deploy/2.providers/7.digitalocean.md} +0 -0
  196. /package/{skills/nitro/docs/deploy/providers/firebase.md → dist/docs/1.deploy/2.providers/9.firebase.md} +0 -0
  197. /package/{skills/nitro/docs/examples → dist/docs/3.examples/0.index}/index.md +0 -0
  198. /package/{skills/nitro/docs/examples/api-routes.md → dist/docs/3.examples/1.api-routes.md} +0 -0
  199. /package/{skills/nitro/docs/examples/middleware.md → dist/docs/3.examples/12.middleware.md} +0 -0
  200. /package/{skills/nitro/docs/examples/nano-jsx.md → dist/docs/3.examples/14.nano-jsx.md} +0 -0
  201. /package/{skills/nitro/docs/examples/renderer.md → dist/docs/3.examples/16.renderer.md} +0 -0
  202. /package/{skills/nitro/docs/examples/runtime-config.md → dist/docs/3.examples/17.runtime-config.md} +0 -0
  203. /package/{skills/nitro/docs/examples/server-fetch.md → dist/docs/3.examples/18.server-fetch.md} +0 -0
  204. /package/{skills/nitro/docs/examples/virtual-routes.md → dist/docs/3.examples/20.virtual-routes.md} +0 -0
  205. /package/{skills/nitro/docs/examples/cached-handler.md → dist/docs/3.examples/3.cached-handler.md} +0 -0
  206. /package/{skills/nitro/docs/examples/websocket.md → dist/docs/3.examples/31.websocket.md} +0 -0
  207. /package/{skills/nitro/docs/examples/custom-error-handler.md → dist/docs/3.examples/4.custom-error-handler.md} +0 -0
  208. /package/{skills/nitro/docs/examples/database.md → dist/docs/3.examples/5.database.md} +0 -0
  209. /package/{skills/nitro/docs/examples/express.md → dist/docs/3.examples/7.express.md} +0 -0
  210. /package/{skills/nitro/docs/examples/hello-world.md → dist/docs/3.examples/9.hello-world.md} +0 -0
  211. /package/{skills/nitro → dist}/docs/index.md +0 -0
@@ -1,6 +1,7 @@
1
1
  import { i as __toESM$1, n as __exportAll, r as __require$1, t as __commonJSMin } from "../_common.mjs";
2
2
  import { builtinModules, createRequire } from "node:module";
3
3
  import consola from "consola";
4
+ import { pkgDir, runtimeDependencies, runtimeDir, version } from "nitro/meta";
4
5
  import fs, { accessSync, constants, existsSync, lstatSync, promises, readFileSync, realpathSync, statSync } from "node:fs";
5
6
  import { format, inspect } from "node:util";
6
7
  import fsp, { mkdir, readFile, stat as stat$1, writeFile } from "node:fs/promises";
@@ -11,13 +12,12 @@ import assert from "node:assert";
11
12
  import process$1 from "node:process";
12
13
  import v8 from "node:v8";
13
14
  import { defu } from "defu";
14
- import { pkgDir, runtimeDependencies, runtimeDir, version } from "nitro/meta";
15
15
  import { joinURL, withTrailingSlash } from "ufo";
16
16
  import { createRequire as createRequire$1 } from "module";
17
17
  import { colors } from "consola/utils";
18
- import * as nativeFs$1 from "fs";
19
- import nativeFs from "fs";
20
- import path$1, { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize as normalize$1, posix, relative as relative$1, resolve as resolve$1, sep as sep$1, win32 as win32$1 } from "path";
18
+ import * as nativeFs from "fs";
19
+ import { readdir as readdir$1, readdirSync, realpath as realpath$1, realpathSync as realpathSync$1, stat as stat$2, statSync as statSync$1 } from "fs";
20
+ import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize as normalize$1, posix, relative as relative$1, resolve as resolve$1, sep as sep$1, win32 as win32$1 } from "path";
21
21
  import { fileURLToPath as fileURLToPath$1 } from "url";
22
22
  import { hash } from "ohash";
23
23
  import zlib from "node:zlib";
@@ -27,7 +27,7 @@ import { connectors } from "db0";
27
27
  import { RENDER_CONTEXT_KEYS, compileTemplateToString, hasTemplateSyntax } from "rendu";
28
28
  import { builtinDrivers, normalizeKey } from "unstorage";
29
29
  import { createHash } from "node:crypto";
30
- //#region node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
30
+ import { FullTracePackages, NodeNativePackages, NonBundleablePackages } from "nf3/db";
31
31
  const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
32
32
  function normalizeWindowsPath(input = "") {
33
33
  if (!input) return input;
@@ -189,8 +189,6 @@ const parse$1 = function(p) {
189
189
  };
190
190
  };
191
191
  globalThis.process?.platform;
192
- //#endregion
193
- //#region node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs
194
192
  const nodeBuiltins = [
195
193
  "_http_agent",
196
194
  "_http_client",
@@ -277,23 +275,9 @@ const kTypes$1 = new Set([
277
275
  const messages$1 = /* @__PURE__ */ new Map();
278
276
  const nodeInternalPrefix$1 = "__node_internal_";
279
277
  let userStackTraceLimit$1;
280
- /**
281
- * Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.
282
- * We cannot use Intl.ListFormat because it's not available in
283
- * --without-intl builds.
284
- *
285
- * @param {Array<string>} array
286
- * An array of strings.
287
- * @param {string} [type]
288
- * The list type to be inserted before the last element.
289
- * @returns {string}
290
- */
291
278
  function formatList$1(array, type = "and") {
292
279
  return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`;
293
280
  }
294
- /**
295
- * Utility function for registering the error codes.
296
- */
297
281
  function createError$1(sym, value, constructor) {
298
282
  messages$1.set(sym, value);
299
283
  return makeNodeErrorWithCode$1(constructor, sym);
@@ -334,9 +318,6 @@ function isErrorStackTraceLimitWritable$1() {
334
318
  if (desc === void 0) return Object.isExtensible(Error);
335
319
  return own$1$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
336
320
  }
337
- /**
338
- * This function removes unnecessary frames from Node.js core errors.
339
- */
340
321
  function hideStackFrames$1(wrappedFunction) {
341
322
  const hidden = nodeInternalPrefix$1 + wrappedFunction.name;
342
323
  Object.defineProperty(wrappedFunction, "name", { value: hidden });
@@ -367,9 +348,6 @@ function getMessage$1(key, parameters, self) {
367
348
  parameters.unshift(message);
368
349
  return Reflect.apply(format, null, parameters);
369
350
  }
370
- /**
371
- * Determine the specific type of a value for type-mismatch errors.
372
- */
373
351
  function determineSpecificType$1(value) {
374
352
  if (value === null || value === void 0) return String(value);
375
353
  if (typeof value === "function" && value.name) return `function ${value.name}`;
@@ -425,18 +403,9 @@ createError$1("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
425
403
  message += `. Received ${determineSpecificType$1(actual)}`;
426
404
  return message;
427
405
  }, TypeError);
428
- const ERR_INVALID_MODULE_SPECIFIER$1 = createError$1(
429
- "ERR_INVALID_MODULE_SPECIFIER",
430
- /**
431
- * @param {string} request
432
- * @param {string} reason
433
- * @param {string} [base]
434
- */
435
- (request, reason, base) => {
436
- return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
437
- },
438
- TypeError
439
- );
406
+ const ERR_INVALID_MODULE_SPECIFIER$1 = createError$1("ERR_INVALID_MODULE_SPECIFIER", (request, reason, base) => {
407
+ return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
408
+ }, TypeError);
440
409
  const ERR_INVALID_PACKAGE_CONFIG$2 = createError$1("ERR_INVALID_PACKAGE_CONFIG", (path$1, base, message) => {
441
410
  return `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
442
411
  }, Error);
@@ -455,19 +424,10 @@ createError$1("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supp
455
424
  const ERR_PACKAGE_IMPORT_NOT_DEFINED$1 = createError$1("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => {
456
425
  return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`;
457
426
  }, TypeError);
458
- const ERR_PACKAGE_PATH_NOT_EXPORTED$1 = createError$1(
459
- "ERR_PACKAGE_PATH_NOT_EXPORTED",
460
- /**
461
- * @param {string} packagePath
462
- * @param {string} subpath
463
- * @param {string} [base]
464
- */
465
- (packagePath, subpath, base) => {
466
- if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
467
- return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
468
- },
469
- Error
470
- );
427
+ const ERR_PACKAGE_PATH_NOT_EXPORTED$1 = createError$1("ERR_PACKAGE_PATH_NOT_EXPORTED", (packagePath, subpath, base) => {
428
+ if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
429
+ return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
430
+ }, Error);
471
431
  const ERR_UNSUPPORTED_DIR_IMPORT$1 = createError$1("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error);
472
432
  const ERR_UNSUPPORTED_RESOLVE_REQUEST$1 = createError$1("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError);
473
433
  const ERR_UNKNOWN_FILE_EXTENSION$1 = createError$1("ERR_UNKNOWN_FILE_EXTENSION", (extension, path$1) => {
@@ -564,14 +524,6 @@ function getDataProtocolModuleFormat$1(parsed) {
564
524
  ];
565
525
  return mimeToFormat$1(mime);
566
526
  }
567
- /**
568
- * Returns the file extension from a URL.
569
- *
570
- * Should give similar result to
571
- * `require('node:path').extname(require('node:url').fileURLToPath(url))`
572
- * when used with a `file:` URL.
573
- *
574
- */
575
527
  function extname$3(url) {
576
528
  const pathname = url.pathname;
577
529
  let index = pathname.length;
@@ -633,14 +585,6 @@ function tryStatSync$1(path$1) {
633
585
  return statSync(path$1);
634
586
  } catch {}
635
587
  }
636
- /**
637
- * Legacy CommonJS main resolution:
638
- * 1. let M = pkg_url + (json main field)
639
- * 2. TRY(M, M.js, M.json, M.node)
640
- * 3. TRY(M/index.js, M/index.json, M/index.node)
641
- * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)
642
- * 5. NOT_FOUND
643
- */
644
588
  function fileExists$1(url) {
645
589
  const stats = statSync(url, { throwIfNoEntry: false });
646
590
  const isFile = stats ? stats.isFile() : void 0;
@@ -921,10 +865,6 @@ function packageImportsResolve$1(name, base, conditions) {
921
865
  }
922
866
  throw importNotDefined$1(name, packageJsonUrl, base);
923
867
  }
924
- /**
925
- * @param {string} specifier
926
- * @param {URL} base
927
- */
928
868
  function parsePackageName$1(specifier, base) {
929
869
  let separatorIndex = specifier.indexOf("/");
930
870
  let validPackageName = true;
@@ -981,21 +921,6 @@ function shouldBeTreatedAsRelativeOrAbsolutePath$1(specifier) {
981
921
  if (specifier[0] === "/") return true;
982
922
  return isRelativeSpecifier$1(specifier);
983
923
  }
984
- /**
985
- * The “Resolver Algorithm Specification” as detailed in the Node docs (which is
986
- * sync and slightly lower-level than `resolve`).
987
- *
988
- * @param {string} specifier
989
- * `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.
990
- * @param {URL} base
991
- * Full URL (to a file) that `specifier` is resolved relative from.
992
- * @param {Set<string>} [conditions]
993
- * Conditions.
994
- * @param {boolean} [preserveSymlinks]
995
- * Keep symlinks instead of resolving them.
996
- * @returns {URL}
997
- * A URL object to the found thing.
998
- */
999
924
  function moduleResolve$1(specifier, base, conditions, preserveSymlinks) {
1000
925
  const protocol = base.protocol;
1001
926
  const isData = protocol === "data:";
@@ -1025,13 +950,6 @@ function moduleResolve$1(specifier, base, conditions, preserveSymlinks) {
1025
950
  const DEFAULT_CONDITIONS_SET$2 = /* @__PURE__ */ new Set(["node", "import"]);
1026
951
  const isWindows = process.platform === "win32";
1027
952
  const globalCache = globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map();
1028
- /**
1029
- * Synchronously resolves a module url based on the options provided.
1030
- *
1031
- * @param {string} input - The identifier or path of the module to resolve.
1032
- * @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
1033
- * @returns {string} The resolved URL as a string.
1034
- */
1035
953
  function resolveModuleURL(input, options) {
1036
954
  const parsedInput = _parseInput(input);
1037
955
  if ("external" in parsedInput) return parsedInput.external;
@@ -1096,15 +1014,6 @@ function resolveModuleURL(input, options) {
1096
1014
  if (cacheObj) cacheObj.set(cacheKey, resolved.href);
1097
1015
  return resolved.href;
1098
1016
  }
1099
- /**
1100
- * Synchronously resolves a module then converts it to a file path
1101
- *
1102
- * (throws error if reolved path is not file:// scheme)
1103
- *
1104
- * @param {string} id - The identifier or path of the module to resolve.
1105
- * @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
1106
- * @returns {string} The resolved URL as a string.
1107
- */
1108
1017
  function resolveModulePath(id, options) {
1109
1018
  const resolved = resolveModuleURL(id, options);
1110
1019
  if (!resolved) return;
@@ -1186,8 +1095,6 @@ function _parseInput(input) {
1186
1095
  }
1187
1096
  throw new TypeError("id must be a `string` or `URL`");
1188
1097
  }
1189
- //#endregion
1190
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs
1191
1098
  var e$6 = Object.create, t$10 = Object.defineProperty, n$10 = Object.getOwnPropertyDescriptor, r$10 = Object.getOwnPropertyNames, i$11 = Object.getPrototypeOf, a$9 = Object.prototype.hasOwnProperty, o$7 = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), s$6 = (e, i, o, s) => {
1192
1099
  if (i && typeof i == `object` || typeof i == `function`) for (var c = r$10(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a$9.call(e, d) && d !== o && t$10(e, d, {
1193
1100
  get: ((e) => i[e]).bind(null, d),
@@ -1198,8 +1105,6 @@ var e$6 = Object.create, t$10 = Object.defineProperty, n$10 = Object.getOwnPrope
1198
1105
  value: n,
1199
1106
  enumerable: !0
1200
1107
  }) : a, n));
1201
- //#endregion
1202
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs
1203
1108
  var t$9 = o$7(((e, t) => {
1204
1109
  t.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/, t.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/, t.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
1205
1110
  })), n$9 = o$7(((e, n) => {
@@ -1954,8 +1859,6 @@ var t$9 = o$7(((e, t) => {
1954
1859
  }
1955
1860
  };
1956
1861
  }));
1957
- //#endregion
1958
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/detect-indent.mjs
1959
1862
  const e$5 = /^(?:( )+|\t+)/, t$8 = `space`;
1960
1863
  function n$8(e, n, r) {
1961
1864
  return e && n === t$8 && r === 1;
@@ -2011,8 +1914,6 @@ function c$3(e) {
2011
1914
  indent: l
2012
1915
  };
2013
1916
  }
2014
- //#endregion
2015
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs
2016
1917
  const t$7 = Symbol.for(`__confbox_fmt__`), n$7 = /^(\s+)/, r$7 = /(\s+)$/;
2017
1918
  function i$8(e, t = {}) {
2018
1919
  return {
@@ -2048,16 +1949,12 @@ function o$5(n, r) {
2048
1949
  }
2049
1950
  };
2050
1951
  }
2051
- //#endregion
2052
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs
2053
1952
  var json5_exports = /* @__PURE__ */ __exportAll({ parseJSON5: () => s$4 }), a$6 = c$4(r$9(), 1);
2054
1953
  c$4(i$10(), 1);
2055
1954
  function s$4(e, n) {
2056
1955
  let r = (0, a$6.default)(e, n?.reviver);
2057
1956
  return a$7(e, r, n), r;
2058
1957
  }
2059
- //#endregion
2060
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs
2061
1958
  function e$4(e, i = !1) {
2062
1959
  let a = e.length, o = 0, s = ``, c = 0, l = 16, u = 0, d = 0, f = 0, p = 0, m = 0;
2063
1960
  function h(t, n) {
@@ -2441,22 +2338,15 @@ var h$7;
2441
2338
  (function(e) {
2442
2339
  e[e.InvalidSymbol = 1] = `InvalidSymbol`, e[e.InvalidNumberFormat = 2] = `InvalidNumberFormat`, e[e.PropertyNameExpected = 3] = `PropertyNameExpected`, e[e.ValueExpected = 4] = `ValueExpected`, e[e.ColonExpected = 5] = `ColonExpected`, e[e.CommaExpected = 6] = `CommaExpected`, e[e.CloseBraceExpected = 7] = `CloseBraceExpected`, e[e.CloseBracketExpected = 8] = `CloseBracketExpected`, e[e.EndOfFileExpected = 9] = `EndOfFileExpected`, e[e.InvalidCommentToken = 10] = `InvalidCommentToken`, e[e.UnexpectedEndOfComment = 11] = `UnexpectedEndOfComment`, e[e.UnexpectedEndOfString = 12] = `UnexpectedEndOfString`, e[e.UnexpectedEndOfNumber = 13] = `UnexpectedEndOfNumber`, e[e.InvalidUnicode = 14] = `InvalidUnicode`, e[e.InvalidEscapeCharacter = 15] = `InvalidEscapeCharacter`, e[e.InvalidCharacter = 16] = `InvalidCharacter`;
2443
2340
  })(h$7 ||= {});
2444
- //#endregion
2445
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs
2446
2341
  function n$5(t, n) {
2447
2342
  let r = JSON.parse(t, n?.reviver);
2448
2343
  return a$7(t, r, n), r;
2449
2344
  }
2450
- //#endregion
2451
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs
2452
2345
  var jsonc_exports = /* @__PURE__ */ __exportAll({ parseJSONC: () => r$5 });
2453
2346
  function r$5(n, r) {
2454
2347
  let i = m$5(n, r?.errors, r);
2455
2348
  return a$7(n, i, r), i;
2456
2349
  }
2457
- //#endregion
2458
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs
2459
- /*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
2460
2350
  function e$3(e) {
2461
2351
  return e == null;
2462
2352
  }
@@ -3511,8 +3401,6 @@ function Pn$1(e, t) {
3511
3401
  var Fn$1 = { dump: Pn$1 }, In$1 = Ft.load;
3512
3402
  Ft.loadAll;
3513
3403
  var Ln$1 = Fn$1.dump;
3514
- //#endregion
3515
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs
3516
3404
  var yaml_exports = /* @__PURE__ */ __exportAll({
3517
3405
  parseYAML: () => i$5,
3518
3406
  stringifyYAML: () => a$3
@@ -3528,35 +3416,6 @@ function a$3(e, n) {
3528
3416
  });
3529
3417
  return i.whitespace.start + a.trim() + i.whitespace.end;
3530
3418
  }
3531
- //#endregion
3532
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs
3533
- /*!
3534
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3535
- * SPDX-License-Identifier: BSD-3-Clause
3536
- *
3537
- * Redistribution and use in source and binary forms, with or without
3538
- * modification, are permitted provided that the following conditions are met:
3539
- *
3540
- * 1. Redistributions of source code must retain the above copyright notice, this
3541
- * list of conditions and the following disclaimer.
3542
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3543
- * this list of conditions and the following disclaimer in the
3544
- * documentation and/or other materials provided with the distribution.
3545
- * 3. Neither the name of the copyright holder nor the names of its contributors
3546
- * may be used to endorse or promote products derived from this software without
3547
- * specific prior written permission.
3548
- *
3549
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3550
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3551
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3552
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3553
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3554
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3555
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3556
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3557
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3558
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3559
- */
3560
3419
  function e$2(e, t) {
3561
3420
  let n = e.slice(0, t).split(/\r\n|\n|\r/g);
3562
3421
  return [n.length, n.pop().length + 1];
@@ -3580,33 +3439,6 @@ var n$3 = class extends Error {
3580
3439
  super(`Invalid TOML document: ${n}\n\n${o}`, r), this.line = i, this.column = a, this.codeblock = o;
3581
3440
  }
3582
3441
  };
3583
- /*!
3584
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3585
- * SPDX-License-Identifier: BSD-3-Clause
3586
- *
3587
- * Redistribution and use in source and binary forms, with or without
3588
- * modification, are permitted provided that the following conditions are met:
3589
- *
3590
- * 1. Redistributions of source code must retain the above copyright notice, this
3591
- * list of conditions and the following disclaimer.
3592
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3593
- * this list of conditions and the following disclaimer in the
3594
- * documentation and/or other materials provided with the distribution.
3595
- * 3. Neither the name of the copyright holder nor the names of its contributors
3596
- * may be used to endorse or promote products derived from this software without
3597
- * specific prior written permission.
3598
- *
3599
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3600
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3601
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3602
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3603
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3604
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3605
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3606
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3607
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3608
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3609
- */
3610
3442
  function r$3(e, t) {
3611
3443
  let n = 0;
3612
3444
  for (; e[t - ++n] === `\\`;);
@@ -3661,33 +3493,6 @@ function c$1(e, t) {
3661
3493
  while (t > -1 && n !== `'` && r$3(e, t));
3662
3494
  return t > -1 && (t += i.length, i.length > 1 && (e[t] === n && t++, e[t] === n && t++)), t;
3663
3495
  }
3664
- /*!
3665
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3666
- * SPDX-License-Identifier: BSD-3-Clause
3667
- *
3668
- * Redistribution and use in source and binary forms, with or without
3669
- * modification, are permitted provided that the following conditions are met:
3670
- *
3671
- * 1. Redistributions of source code must retain the above copyright notice, this
3672
- * list of conditions and the following disclaimer.
3673
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3674
- * this list of conditions and the following disclaimer in the
3675
- * documentation and/or other materials provided with the distribution.
3676
- * 3. Neither the name of the copyright holder nor the names of its contributors
3677
- * may be used to endorse or promote products derived from this software without
3678
- * specific prior written permission.
3679
- *
3680
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3681
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3682
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3683
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3684
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3685
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3686
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3687
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3688
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3689
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3690
- */
3691
3496
  let l$2 = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
3692
3497
  var u$2 = class e extends Date {
3693
3498
  #e = !1;
@@ -3742,33 +3547,6 @@ var u$2 = class e extends Date {
3742
3547
  return n.#e = !1, n.#n = null, n;
3743
3548
  }
3744
3549
  };
3745
- /*!
3746
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3747
- * SPDX-License-Identifier: BSD-3-Clause
3748
- *
3749
- * Redistribution and use in source and binary forms, with or without
3750
- * modification, are permitted provided that the following conditions are met:
3751
- *
3752
- * 1. Redistributions of source code must retain the above copyright notice, this
3753
- * list of conditions and the following disclaimer.
3754
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3755
- * this list of conditions and the following disclaimer in the
3756
- * documentation and/or other materials provided with the distribution.
3757
- * 3. Neither the name of the copyright holder nor the names of its contributors
3758
- * may be used to endorse or promote products derived from this software without
3759
- * specific prior written permission.
3760
- *
3761
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3762
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3763
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3764
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3765
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3766
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3767
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3768
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3769
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3770
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3771
- */
3772
3550
  let d$1 = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/, f$2 = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/, p$1 = /^[+-]?0[0-9_]/, m$3 = /^[0-9a-f]{2,8}$/i, h$5 = {
3773
3551
  b: `\b`,
3774
3552
  t: ` `,
@@ -3866,33 +3644,6 @@ function _$3(e, t, r, i) {
3866
3644
  });
3867
3645
  return o;
3868
3646
  }
3869
- /*!
3870
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3871
- * SPDX-License-Identifier: BSD-3-Clause
3872
- *
3873
- * Redistribution and use in source and binary forms, with or without
3874
- * modification, are permitted provided that the following conditions are met:
3875
- *
3876
- * 1. Redistributions of source code must retain the above copyright notice, this
3877
- * list of conditions and the following disclaimer.
3878
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3879
- * this list of conditions and the following disclaimer in the
3880
- * documentation and/or other materials provided with the distribution.
3881
- * 3. Neither the name of the copyright holder nor the names of its contributors
3882
- * may be used to endorse or promote products derived from this software without
3883
- * specific prior written permission.
3884
- *
3885
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3886
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3887
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3888
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3889
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3890
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3891
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3892
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3893
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3894
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3895
- */
3896
3647
  function v$3(e, t, n) {
3897
3648
  let r = e.slice(t, n), i = r.indexOf(`#`);
3898
3649
  return i > -1 && (a$2(e, i), r = r.slice(0, i)), [r.trimEnd(), i];
@@ -3936,33 +3687,6 @@ function y$3(e, t, r, i, a) {
3936
3687
  });
3937
3688
  return r && d[1] > -1 && (u = o$1(e, t + d[1]), u += +(e[u] === `,`)), [_$3(d[0], e, t, a), u];
3938
3689
  }
3939
- /*!
3940
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3941
- * SPDX-License-Identifier: BSD-3-Clause
3942
- *
3943
- * Redistribution and use in source and binary forms, with or without
3944
- * modification, are permitted provided that the following conditions are met:
3945
- *
3946
- * 1. Redistributions of source code must retain the above copyright notice, this
3947
- * list of conditions and the following disclaimer.
3948
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3949
- * this list of conditions and the following disclaimer in the
3950
- * documentation and/or other materials provided with the distribution.
3951
- * 3. Neither the name of the copyright holder nor the names of its contributors
3952
- * may be used to endorse or promote products derived from this software without
3953
- * specific prior written permission.
3954
- *
3955
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3956
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3957
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3958
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3959
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3960
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3961
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3962
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3963
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3964
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3965
- */
3966
3690
  let b$3 = /^[a-zA-Z0-9-_]+[ \t]*$/;
3967
3691
  function x$3(e, t, r = `=`) {
3968
3692
  let a = t - 1, s = [], l = e.indexOf(r, t);
@@ -4061,33 +3785,6 @@ function C$2(e, t, r, i) {
4061
3785
  });
4062
3786
  return [o, t];
4063
3787
  }
4064
- /*!
4065
- * Copyright (c) Squirrel Chat et al., All rights reserved.
4066
- * SPDX-License-Identifier: BSD-3-Clause
4067
- *
4068
- * Redistribution and use in source and binary forms, with or without
4069
- * modification, are permitted provided that the following conditions are met:
4070
- *
4071
- * 1. Redistributions of source code must retain the above copyright notice, this
4072
- * list of conditions and the following disclaimer.
4073
- * 2. Redistributions in binary form must reproduce the above copyright notice,
4074
- * this list of conditions and the following disclaimer in the
4075
- * documentation and/or other materials provided with the distribution.
4076
- * 3. Neither the name of the copyright holder nor the names of its contributors
4077
- * may be used to endorse or promote products derived from this software without
4078
- * specific prior written permission.
4079
- *
4080
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
4081
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4082
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4083
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
4084
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4085
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4086
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4087
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
4088
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4089
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4090
- */
4091
3788
  function w$3(e, t, n, r) {
4092
3789
  let i = t, a = n, o, s = !1, c;
4093
3790
  for (let t = 0; t < e.length; t++) {
@@ -4164,15 +3861,11 @@ function T$3(e, { maxDepth: t = 1e3, integersAsBigInt: r } = {}) {
4164
3861
  }
4165
3862
  return i;
4166
3863
  }
4167
- //#endregion
4168
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/toml.mjs
4169
3864
  var toml_exports = /* @__PURE__ */ __exportAll({ parseTOML: () => i$3 });
4170
3865
  function i$3(t) {
4171
3866
  let r = T$3(t);
4172
3867
  return a$7(t, r, { preserveIndentation: !1 }), r;
4173
3868
  }
4174
- //#endregion
4175
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/ini.mjs
4176
3869
  var t$2 = o$7(((e, t) => {
4177
3870
  let { hasOwnProperty: n } = Object.prototype, r = (e, t = {}) => {
4178
3871
  typeof t == `string` && (t = { section: t }), t.align = t.align === !0, t.newline = t.newline === !0, t.sort = t.sort === !0, t.whitespace = t.whitespace === !0 || t.align === !0, t.platform = t.platform || typeof process < `u` && process.platform, t.bracketedArray = t.bracketedArray !== !1;
@@ -4269,8 +3962,6 @@ var t$2 = o$7(((e, t) => {
4269
3962
  function n$2(e, n) {
4270
3963
  return (0, t$2.parse)(e, n);
4271
3964
  }
4272
- //#endregion
4273
- //#region node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs
4274
3965
  var dist_exports$1 = /* @__PURE__ */ __exportAll({
4275
3966
  findFile: () => findFile$1,
4276
3967
  findNearestFile: () => findNearestFile$1,
@@ -4304,12 +3995,12 @@ async function findFile$1(filename, _options = {}) {
4304
3995
  if (leadingSlash) segments[0] = "/" + segments[0];
4305
3996
  let root = segments.findIndex((r) => r.match(options.rootPattern));
4306
3997
  if (root === -1) root = 0;
4307
- if (options.reverse) for (let index = root + 1; index <= segments.length; index++) for (const filename2 of filenames) {
4308
- const filePath = join$2(...segments.slice(0, index), filename2);
3998
+ if (options.reverse) for (let index = root + 1; index <= segments.length; index++) for (const filename of filenames) {
3999
+ const filePath = join$2(...segments.slice(0, index), filename);
4309
4000
  if (await options.test(filePath)) return filePath;
4310
4001
  }
4311
- else for (let index = segments.length; index > root; index--) for (const filename2 of filenames) {
4312
- const filePath = join$2(...segments.slice(0, index), filename2);
4002
+ else for (let index = segments.length; index > root; index--) for (const filename of filenames) {
4003
+ const filePath = join$2(...segments.slice(0, index), filename);
4313
4004
  if (await options.test(filePath)) return filePath;
4314
4005
  }
4315
4006
  throw new Error(`Cannot find matching ${filename} in ${options.startingFrom} or parent directories`);
@@ -4407,8 +4098,6 @@ async function readGitConfig(dir, opts) {
4407
4098
  function parseGitConfig(ini) {
4408
4099
  return n$2(ini.replaceAll(/^\[(\w+) "(.+)"\]$/gm, "[$1.$2]"));
4409
4100
  }
4410
- //#endregion
4411
- //#region node_modules/.pnpm/std-env@4.0.0/node_modules/std-env/dist/index.mjs
4412
4101
  const e$1 = globalThis.process?.env || Object.create(null), t$1 = globalThis.process || { env: e$1 }, n$1 = t$1 !== void 0 && t$1.env && t$1.env.NODE_ENV || void 0, r$2 = [
4413
4102
  [`claude`, [`CLAUDECODE`, `CLAUDE_CODE`]],
4414
4103
  [`replit`, [`REPL_ID`]],
@@ -4534,6 +4223,11 @@ const l$1 = [
4534
4223
  `FIREBASE_APP_HOSTING`,
4535
4224
  `FIREBASE_APP_HOSTING`,
4536
4225
  { ci: !0 }
4226
+ ],
4227
+ [
4228
+ `EDGEONE_PAGES`,
4229
+ `EO_PAGES_CI`,
4230
+ { ci: !0 }
4537
4231
  ]
4538
4232
  ];
4539
4233
  function u$1() {
@@ -4573,8 +4267,20 @@ function I$2() {
4573
4267
  if (e) return { name: e[1] };
4574
4268
  }
4575
4269
  const R$1 = I$2()?.name || ``;
4576
- //#endregion
4577
- //#region node_modules/.pnpm/dot-prop@10.1.0/node_modules/dot-prop/index.js
4270
+ function escapeRegExp$1(string) {
4271
+ return string.replace(/[-\\^$*+?.()|[\]{}]/g, String.raw`\$&`);
4272
+ }
4273
+ function pathRegExp(string) {
4274
+ if (S$3) string = string.replace(/\\/g, "/");
4275
+ let escaped = escapeRegExp$1(string);
4276
+ if (S$3) escaped = escaped.replace(/\//g, String.raw`[/\\]`);
4277
+ return escaped;
4278
+ }
4279
+ function toPathRegExp(input) {
4280
+ if (input instanceof RegExp) return input;
4281
+ if (typeof input === "string") return new RegExp(pathRegExp(input));
4282
+ throw new TypeError("Expected a string or RegExp", { cause: input });
4283
+ }
4578
4284
  const isObject$2 = (value) => {
4579
4285
  const type = typeof value;
4580
4286
  return value !== null && (type === "object" || type === "function");
@@ -4709,8 +4415,6 @@ function getProperty(object, path, value) {
4709
4415
  }
4710
4416
  return object === void 0 ? value : object;
4711
4417
  }
4712
- //#endregion
4713
- //#region src/utils/fs.ts
4714
4418
  function prettyPath(p, highlight = true) {
4715
4419
  p = relative$2(process.cwd(), p);
4716
4420
  return highlight ? colors.cyan(p) : p;
@@ -4741,8 +4445,6 @@ async function isDirectory(path) {
4741
4445
  return false;
4742
4446
  }
4743
4447
  }
4744
- //#endregion
4745
- //#region node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.3/node_modules/fdir/dist/index.mjs
4746
4448
  var __require = /* @__PURE__ */ createRequire$1(import.meta.url);
4747
4449
  function cleanPath(path) {
4748
4450
  let normalized = normalize$1(path);
@@ -4960,11 +4662,6 @@ const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) =>
4960
4662
  function build$8(isSynchronous) {
4961
4663
  return isSynchronous ? walkSync : walkAsync;
4962
4664
  }
4963
- /**
4964
- * This is a custom stateless queue to track concurrent async fs calls.
4965
- * It increments a counter whenever a call is queued and decrements it
4966
- * as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
4967
- */
4968
4665
  var Queue = class {
4969
4666
  count = 0;
4970
4667
  constructor(onQueueEmpty) {
@@ -4999,18 +4696,10 @@ var Counter = class {
4999
4696
  get directories() {
5000
4697
  return this._directories;
5001
4698
  }
5002
- /**
5003
- * @deprecated use `directories` instead
5004
- */
5005
- /* c8 ignore next 3 */
5006
4699
  get dirs() {
5007
4700
  return this._directories;
5008
4701
  }
5009
4702
  };
5010
- /**
5011
- * AbortController is not supported on Node 14 so we use this until we can drop
5012
- * support for Node 14.
5013
- */
5014
4703
  var Aborter = class {
5015
4704
  aborted = false;
5016
4705
  abort() {
@@ -5043,7 +4732,7 @@ var Walker = class {
5043
4732
  symlinks: /* @__PURE__ */ new Map(),
5044
4733
  visited: [""].slice(0, 0),
5045
4734
  controller: new Aborter(),
5046
- fs: options.fs || nativeFs$1
4735
+ fs: options.fs || nativeFs
5047
4736
  };
5048
4737
  this.joinPath = build$7(this.root, options);
5049
4738
  this.pushDirectory = build$6(this.root, options);
@@ -5122,7 +4811,6 @@ var APIBuilder = class {
5122
4811
  }
5123
4812
  };
5124
4813
  let pm$2 = null;
5125
- /* c8 ignore next 6 */
5126
4814
  try {
5127
4815
  __require.resolve("picomatch");
5128
4816
  pm$2 = __require("picomatch");
@@ -5217,14 +4905,6 @@ var Builder = class {
5217
4905
  this.globFunction = fn;
5218
4906
  return this;
5219
4907
  }
5220
- /**
5221
- * @deprecated Pass options using the constructor instead:
5222
- * ```ts
5223
- * new fdir(options).crawl("/path/to/root");
5224
- * ```
5225
- * This method will be removed in v7.0
5226
- */
5227
- /* c8 ignore next 4 */
5228
4908
  crawlWithOptions(root, options) {
5229
4909
  this.options = {
5230
4910
  ...this.options,
@@ -5238,7 +4918,6 @@ var Builder = class {
5238
4918
  }
5239
4919
  globWithOptions(patterns, ...options) {
5240
4920
  const globFn = this.globFunction || pm$2;
5241
- /* c8 ignore next 5 */
5242
4921
  if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
5243
4922
  var isMatch = this.globCache[patterns.join("\0")];
5244
4923
  if (!isMatch) {
@@ -5249,14 +4928,10 @@ var Builder = class {
5249
4928
  return this;
5250
4929
  }
5251
4930
  };
5252
- //#endregion
5253
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js
5254
4931
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5255
4932
  const WIN_SLASH = "\\\\/";
5256
4933
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
5257
- /**
5258
- * Posix glob regex
5259
- */
4934
+ const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
5260
4935
  const DOT_LITERAL = "\\.";
5261
4936
  const PLUS_LITERAL = "\\+";
5262
4937
  const QMARK_LITERAL = "\\?";
@@ -5284,9 +4959,6 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5284
4959
  START_ANCHOR,
5285
4960
  SEP: "/"
5286
4961
  };
5287
- /**
5288
- * Windows glob regex
5289
- */
5290
4962
  const WINDOWS_CHARS = {
5291
4963
  ...POSIX_CHARS,
5292
4964
  SLASH_LITERAL: `[${WIN_SLASH}]`,
@@ -5303,8 +4975,10 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5303
4975
  SEP: "\\"
5304
4976
  };
5305
4977
  module.exports = {
4978
+ DEFAULT_MAX_EXTGLOB_RECURSION,
5306
4979
  MAX_LENGTH: 1024 * 64,
5307
4980
  POSIX_REGEX_SOURCE: {
4981
+ __proto__: null,
5308
4982
  alnum: "a-zA-Z0-9",
5309
4983
  alpha: "a-zA-Z",
5310
4984
  ascii: "\\x00-\\x7F",
@@ -5409,8 +5083,6 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5409
5083
  }
5410
5084
  };
5411
5085
  }));
5412
- //#endregion
5413
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js
5414
5086
  var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5415
5087
  const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
5416
5088
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
@@ -5457,8 +5129,6 @@ var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5457
5129
  return last;
5458
5130
  };
5459
5131
  }));
5460
- //#endregion
5461
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js
5462
5132
  var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5463
5133
  const utils = require_utils$1();
5464
5134
  const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
@@ -5468,22 +5138,6 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5468
5138
  const depth = (token) => {
5469
5139
  if (token.isPrefix !== true) token.depth = token.isGlobstar ? Infinity : 1;
5470
5140
  };
5471
- /**
5472
- * Quickly scans a glob pattern and returns an object with a handful of
5473
- * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
5474
- * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
5475
- * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
5476
- *
5477
- * ```js
5478
- * const pm = require('picomatch');
5479
- * console.log(pm.scan('foo/bar/*.js'));
5480
- * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
5481
- * ```
5482
- * @param {String} `str`
5483
- * @param {Object} `options`
5484
- * @return {Object} Returns an object with tokens and regex source string.
5485
- * @api public
5486
- */
5487
5141
  const scan = (input, options) => {
5488
5142
  const opts = options || {};
5489
5143
  const length = input.length - 1;
@@ -5744,18 +5398,10 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5744
5398
  };
5745
5399
  module.exports = scan;
5746
5400
  }));
5747
- //#endregion
5748
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js
5749
5401
  var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5750
5402
  const constants = require_constants();
5751
5403
  const utils = require_utils$1();
5752
- /**
5753
- * Constants
5754
- */
5755
5404
  const { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants;
5756
- /**
5757
- * Helpers
5758
- */
5759
5405
  const expandRange = (args, options) => {
5760
5406
  if (typeof options.expandRange === "function") return options.expandRange(...args, options);
5761
5407
  args.sort();
@@ -5767,18 +5413,180 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5767
5413
  }
5768
5414
  return value;
5769
5415
  };
5770
- /**
5771
- * Create the message for a syntax error
5772
- */
5773
5416
  const syntaxError = (type, char) => {
5774
5417
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
5775
5418
  };
5776
- /**
5777
- * Parse the given input string.
5778
- * @param {String} input
5779
- * @param {Object} options
5780
- * @return {Object}
5781
- */
5419
+ const splitTopLevel = (input) => {
5420
+ const parts = [];
5421
+ let bracket = 0;
5422
+ let paren = 0;
5423
+ let quote = 0;
5424
+ let value = "";
5425
+ let escaped = false;
5426
+ for (const ch of input) {
5427
+ if (escaped === true) {
5428
+ value += ch;
5429
+ escaped = false;
5430
+ continue;
5431
+ }
5432
+ if (ch === "\\") {
5433
+ value += ch;
5434
+ escaped = true;
5435
+ continue;
5436
+ }
5437
+ if (ch === "\"") {
5438
+ quote = quote === 1 ? 0 : 1;
5439
+ value += ch;
5440
+ continue;
5441
+ }
5442
+ if (quote === 0) {
5443
+ if (ch === "[") bracket++;
5444
+ else if (ch === "]" && bracket > 0) bracket--;
5445
+ else if (bracket === 0) {
5446
+ if (ch === "(") paren++;
5447
+ else if (ch === ")" && paren > 0) paren--;
5448
+ else if (ch === "|" && paren === 0) {
5449
+ parts.push(value);
5450
+ value = "";
5451
+ continue;
5452
+ }
5453
+ }
5454
+ }
5455
+ value += ch;
5456
+ }
5457
+ parts.push(value);
5458
+ return parts;
5459
+ };
5460
+ const isPlainBranch = (branch) => {
5461
+ let escaped = false;
5462
+ for (const ch of branch) {
5463
+ if (escaped === true) {
5464
+ escaped = false;
5465
+ continue;
5466
+ }
5467
+ if (ch === "\\") {
5468
+ escaped = true;
5469
+ continue;
5470
+ }
5471
+ if (/[?*+@!()[\]{}]/.test(ch)) return false;
5472
+ }
5473
+ return true;
5474
+ };
5475
+ const normalizeSimpleBranch = (branch) => {
5476
+ let value = branch.trim();
5477
+ let changed = true;
5478
+ while (changed === true) {
5479
+ changed = false;
5480
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
5481
+ value = value.slice(2, -1);
5482
+ changed = true;
5483
+ }
5484
+ }
5485
+ if (!isPlainBranch(value)) return;
5486
+ return value.replace(/\\(.)/g, "$1");
5487
+ };
5488
+ const hasRepeatedCharPrefixOverlap = (branches) => {
5489
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
5490
+ for (let i = 0; i < values.length; i++) for (let j = i + 1; j < values.length; j++) {
5491
+ const a = values[i];
5492
+ const b = values[j];
5493
+ const char = a[0];
5494
+ if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) continue;
5495
+ if (a === b || a.startsWith(b) || b.startsWith(a)) return true;
5496
+ }
5497
+ return false;
5498
+ };
5499
+ const parseRepeatedExtglob = (pattern, requireEnd = true) => {
5500
+ if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") return;
5501
+ let bracket = 0;
5502
+ let paren = 0;
5503
+ let quote = 0;
5504
+ let escaped = false;
5505
+ for (let i = 1; i < pattern.length; i++) {
5506
+ const ch = pattern[i];
5507
+ if (escaped === true) {
5508
+ escaped = false;
5509
+ continue;
5510
+ }
5511
+ if (ch === "\\") {
5512
+ escaped = true;
5513
+ continue;
5514
+ }
5515
+ if (ch === "\"") {
5516
+ quote = quote === 1 ? 0 : 1;
5517
+ continue;
5518
+ }
5519
+ if (quote === 1) continue;
5520
+ if (ch === "[") {
5521
+ bracket++;
5522
+ continue;
5523
+ }
5524
+ if (ch === "]" && bracket > 0) {
5525
+ bracket--;
5526
+ continue;
5527
+ }
5528
+ if (bracket > 0) continue;
5529
+ if (ch === "(") {
5530
+ paren++;
5531
+ continue;
5532
+ }
5533
+ if (ch === ")") {
5534
+ paren--;
5535
+ if (paren === 0) {
5536
+ if (requireEnd === true && i !== pattern.length - 1) return;
5537
+ return {
5538
+ type: pattern[0],
5539
+ body: pattern.slice(2, i),
5540
+ end: i
5541
+ };
5542
+ }
5543
+ }
5544
+ }
5545
+ };
5546
+ const getStarExtglobSequenceOutput = (pattern) => {
5547
+ let index = 0;
5548
+ const chars = [];
5549
+ while (index < pattern.length) {
5550
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
5551
+ if (!match || match.type !== "*") return;
5552
+ const branches = splitTopLevel(match.body).map((branch) => branch.trim());
5553
+ if (branches.length !== 1) return;
5554
+ const branch = normalizeSimpleBranch(branches[0]);
5555
+ if (!branch || branch.length !== 1) return;
5556
+ chars.push(branch);
5557
+ index += match.end + 1;
5558
+ }
5559
+ if (chars.length < 1) return;
5560
+ return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
5561
+ };
5562
+ const repeatedExtglobRecursion = (pattern) => {
5563
+ let depth = 0;
5564
+ let value = pattern.trim();
5565
+ let match = parseRepeatedExtglob(value);
5566
+ while (match) {
5567
+ depth++;
5568
+ value = match.body.trim();
5569
+ match = parseRepeatedExtglob(value);
5570
+ }
5571
+ return depth;
5572
+ };
5573
+ const analyzeRepeatedExtglob = (body, options) => {
5574
+ if (options.maxExtglobRecursion === false) return { risky: false };
5575
+ const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
5576
+ const branches = splitTopLevel(body).map((branch) => branch.trim());
5577
+ if (branches.length > 1) {
5578
+ if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true };
5579
+ }
5580
+ for (const branch of branches) {
5581
+ const safeOutput = getStarExtglobSequenceOutput(branch);
5582
+ if (safeOutput) return {
5583
+ risky: true,
5584
+ safeOutput
5585
+ };
5586
+ if (repeatedExtglobRecursion(branch) > max) return { risky: true };
5587
+ }
5588
+ return { risky: false };
5589
+ };
5782
5590
  const parse = (input, options) => {
5783
5591
  if (typeof input !== "string") throw new TypeError("Expected a string");
5784
5592
  input = REPLACEMENTS[input] || input;
@@ -5828,9 +5636,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5828
5636
  const stack = [];
5829
5637
  let prev = bos;
5830
5638
  let value;
5831
- /**
5832
- * Tokenizing helpers
5833
- */
5834
5639
  const eos = () => state.index === len - 1;
5835
5640
  const peek = state.peek = (n = 1) => input[state.index + n];
5836
5641
  const advance = state.advance = () => input[++state.index] || "";
@@ -5863,13 +5668,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5863
5668
  state[type]--;
5864
5669
  stack.pop();
5865
5670
  };
5866
- /**
5867
- * Push tokens onto the tokens array. This helper speeds up
5868
- * tokenizing by 1) helping us avoid backtracking as much as possible,
5869
- * and 2) helping us avoid creating extra tokens when consecutive
5870
- * characters are plain text. This improves performance and simplifies
5871
- * lookbehinds.
5872
- */
5873
5671
  const push = (tok) => {
5874
5672
  if (prev.type === "globstar") {
5875
5673
  const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
@@ -5902,6 +5700,8 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5902
5700
  token.prev = prev;
5903
5701
  token.parens = state.parens;
5904
5702
  token.output = state.output;
5703
+ token.startIndex = state.index;
5704
+ token.tokensIndex = tokens.length;
5905
5705
  const output = (opts.capture ? "(" : "") + token.open;
5906
5706
  increment("parens");
5907
5707
  push({
@@ -5918,6 +5718,30 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5918
5718
  extglobs.push(token);
5919
5719
  };
5920
5720
  const extglobClose = (token) => {
5721
+ const literal = input.slice(token.startIndex, state.index + 1);
5722
+ const analysis = analyzeRepeatedExtglob(input.slice(token.startIndex + 2, state.index), opts);
5723
+ if ((token.type === "plus" || token.type === "star") && analysis.risky) {
5724
+ const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
5725
+ const open = tokens[token.tokensIndex];
5726
+ open.type = "text";
5727
+ open.value = literal;
5728
+ open.output = safeOutput || utils.escapeRegex(literal);
5729
+ for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
5730
+ tokens[i].value = "";
5731
+ tokens[i].output = "";
5732
+ delete tokens[i].suffix;
5733
+ }
5734
+ state.output = token.output + open.output;
5735
+ state.backtrack = true;
5736
+ push({
5737
+ type: "paren",
5738
+ extglob: true,
5739
+ value,
5740
+ output: ""
5741
+ });
5742
+ decrement("parens");
5743
+ return;
5744
+ }
5921
5745
  let output = token.close + (opts.capture ? ")" : "");
5922
5746
  let rest;
5923
5747
  if (token.type === "negate") {
@@ -5938,9 +5762,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5938
5762
  });
5939
5763
  decrement("parens");
5940
5764
  };
5941
- /**
5942
- * Fast paths
5943
- */
5944
5765
  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
5945
5766
  let backslashes = false;
5946
5767
  let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
@@ -5971,15 +5792,9 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5971
5792
  state.output = utils.wrapOutput(output, state, options);
5972
5793
  return state;
5973
5794
  }
5974
- /**
5975
- * Tokenize input until we reach end-of-string
5976
- */
5977
5795
  while (!eos()) {
5978
5796
  value = advance();
5979
5797
  if (value === "\0") continue;
5980
- /**
5981
- * Escaped characters
5982
- */
5983
5798
  if (value === "\\") {
5984
5799
  const next = peek();
5985
5800
  if (next === "/" && opts.bash !== true) continue;
@@ -6009,10 +5824,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6009
5824
  continue;
6010
5825
  }
6011
5826
  }
6012
- /**
6013
- * If we're inside a regex character class, continue
6014
- * until we reach the closing bracket.
6015
- */
6016
5827
  if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
6017
5828
  if (opts.posix !== false && value === ":") {
6018
5829
  const inner = prev.value.slice(1);
@@ -6039,19 +5850,12 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6039
5850
  append({ value });
6040
5851
  continue;
6041
5852
  }
6042
- /**
6043
- * If we're inside a quoted string, continue
6044
- * until we reach the closing double quote.
6045
- */
6046
5853
  if (state.quotes === 1 && value !== "\"") {
6047
5854
  value = utils.escapeRegex(value);
6048
5855
  prev.value += value;
6049
5856
  append({ value });
6050
5857
  continue;
6051
5858
  }
6052
- /**
6053
- * Double quotes
6054
- */
6055
5859
  if (value === "\"") {
6056
5860
  state.quotes = state.quotes === 1 ? 0 : 1;
6057
5861
  if (opts.keepQuotes === true) push({
@@ -6060,9 +5864,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6060
5864
  });
6061
5865
  continue;
6062
5866
  }
6063
- /**
6064
- * Parentheses
6065
- */
6066
5867
  if (value === "(") {
6067
5868
  increment("parens");
6068
5869
  push({
@@ -6086,9 +5887,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6086
5887
  decrement("parens");
6087
5888
  continue;
6088
5889
  }
6089
- /**
6090
- * Square brackets
6091
- */
6092
5890
  if (value === "[") {
6093
5891
  if (opts.nobracket === true || !remaining().includes("]")) {
6094
5892
  if (opts.nobracket !== true && opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
@@ -6135,9 +5933,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6135
5933
  state.output += prev.value;
6136
5934
  continue;
6137
5935
  }
6138
- /**
6139
- * Braces
6140
- */
6141
5936
  if (value === "{" && opts.nobrace !== true) {
6142
5937
  increment("braces");
6143
5938
  const open = {
@@ -6190,9 +5985,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6190
5985
  braces.pop();
6191
5986
  continue;
6192
5987
  }
6193
- /**
6194
- * Pipes
6195
- */
6196
5988
  if (value === "|") {
6197
5989
  if (extglobs.length > 0) extglobs[extglobs.length - 1].conditions++;
6198
5990
  push({
@@ -6201,9 +5993,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6201
5993
  });
6202
5994
  continue;
6203
5995
  }
6204
- /**
6205
- * Commas
6206
- */
6207
5996
  if (value === ",") {
6208
5997
  let output = value;
6209
5998
  const brace = braces[braces.length - 1];
@@ -6218,9 +6007,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6218
6007
  });
6219
6008
  continue;
6220
6009
  }
6221
- /**
6222
- * Slashes
6223
- */
6224
6010
  if (value === "/") {
6225
6011
  if (prev.type === "dot" && state.index === state.start + 1) {
6226
6012
  state.start = state.index + 1;
@@ -6237,9 +6023,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6237
6023
  });
6238
6024
  continue;
6239
6025
  }
6240
- /**
6241
- * Dots
6242
- */
6243
6026
  if (value === ".") {
6244
6027
  if (state.braces > 0 && prev.type === "dot") {
6245
6028
  if (prev.value === ".") prev.output = DOT_LITERAL;
@@ -6265,9 +6048,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6265
6048
  });
6266
6049
  continue;
6267
6050
  }
6268
- /**
6269
- * Question marks
6270
- */
6271
6051
  if (value === "?") {
6272
6052
  if (!(prev && prev.value === "(") && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
6273
6053
  extglobOpen("qmark", value);
@@ -6299,9 +6079,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6299
6079
  });
6300
6080
  continue;
6301
6081
  }
6302
- /**
6303
- * Exclamation
6304
- */
6305
6082
  if (value === "!") {
6306
6083
  if (opts.noextglob !== true && peek() === "(") {
6307
6084
  if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
@@ -6314,9 +6091,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6314
6091
  continue;
6315
6092
  }
6316
6093
  }
6317
- /**
6318
- * Plus
6319
- */
6320
6094
  if (value === "+") {
6321
6095
  if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
6322
6096
  extglobOpen("plus", value);
@@ -6343,9 +6117,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6343
6117
  });
6344
6118
  continue;
6345
6119
  }
6346
- /**
6347
- * Plain text
6348
- */
6349
6120
  if (value === "@") {
6350
6121
  if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
6351
6122
  push({
@@ -6362,9 +6133,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6362
6133
  });
6363
6134
  continue;
6364
6135
  }
6365
- /**
6366
- * Plain text
6367
- */
6368
6136
  if (value !== "*") {
6369
6137
  if (value === "$" || value === "^") value = `\\${value}`;
6370
6138
  const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
@@ -6378,9 +6146,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6378
6146
  });
6379
6147
  continue;
6380
6148
  }
6381
- /**
6382
- * Stars
6383
- */
6384
6149
  if (prev && (prev.type === "globstar" || prev.star === true)) {
6385
6150
  prev.type = "star";
6386
6151
  prev.star = true;
@@ -6552,11 +6317,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6552
6317
  }
6553
6318
  return state;
6554
6319
  };
6555
- /**
6556
- * Fast paths for creating regular expressions for common glob patterns.
6557
- * This can significantly speed up processing and has very little downside
6558
- * impact when none of the fast paths match.
6559
- */
6560
6320
  parse.fastpaths = (input, options) => {
6561
6321
  const opts = { ...options };
6562
6322
  const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
@@ -6602,35 +6362,12 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6602
6362
  };
6603
6363
  module.exports = parse;
6604
6364
  }));
6605
- //#endregion
6606
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js
6607
6365
  var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6608
6366
  const scan = require_scan();
6609
6367
  const parse = require_parse();
6610
6368
  const utils = require_utils$1();
6611
6369
  const constants = require_constants();
6612
6370
  const isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
6613
- /**
6614
- * Creates a matcher function from one or more glob patterns. The
6615
- * returned function takes a string to match as its first argument,
6616
- * and returns true if the string is a match. The returned matcher
6617
- * function also takes a boolean as the second argument that, when true,
6618
- * returns an object with additional information.
6619
- *
6620
- * ```js
6621
- * const picomatch = require('picomatch');
6622
- * // picomatch(glob[, options]);
6623
- *
6624
- * const isMatch = picomatch('*.!(*a)');
6625
- * console.log(isMatch('a.a')); //=> false
6626
- * console.log(isMatch('a.b')); //=> true
6627
- * ```
6628
- * @name picomatch
6629
- * @param {String|Array} `globs` One or more glob patterns.
6630
- * @param {Object=} `options`
6631
- * @return {Function=} Returns a matcher function.
6632
- * @api public
6633
- */
6634
6371
  const picomatch = (glob, options, returnState = false) => {
6635
6372
  if (Array.isArray(glob)) {
6636
6373
  const fns = glob.map((input) => picomatch(input, options, returnState));
@@ -6691,22 +6428,6 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6691
6428
  if (returnState) matcher.state = state;
6692
6429
  return matcher;
6693
6430
  };
6694
- /**
6695
- * Test `input` with the given `regex`. This is used by the main
6696
- * `picomatch()` function to test the input string.
6697
- *
6698
- * ```js
6699
- * const picomatch = require('picomatch');
6700
- * // picomatch.test(input, regex[, options]);
6701
- *
6702
- * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
6703
- * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
6704
- * ```
6705
- * @param {String} `input` String to test.
6706
- * @param {RegExp} `regex`
6707
- * @return {Object} Returns an object with matching info.
6708
- * @api public
6709
- */
6710
6431
  picomatch.test = (input, regex, options, { glob, posix } = {}) => {
6711
6432
  if (typeof input !== "string") throw new TypeError("Expected input to be a string");
6712
6433
  if (input === "") return {
@@ -6729,52 +6450,10 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6729
6450
  output
6730
6451
  };
6731
6452
  };
6732
- /**
6733
- * Match the basename of a filepath.
6734
- *
6735
- * ```js
6736
- * const picomatch = require('picomatch');
6737
- * // picomatch.matchBase(input, glob[, options]);
6738
- * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
6739
- * ```
6740
- * @param {String} `input` String to test.
6741
- * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
6742
- * @return {Boolean}
6743
- * @api public
6744
- */
6745
6453
  picomatch.matchBase = (input, glob, options) => {
6746
6454
  return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input));
6747
6455
  };
6748
- /**
6749
- * Returns true if **any** of the given glob `patterns` match the specified `string`.
6750
- *
6751
- * ```js
6752
- * const picomatch = require('picomatch');
6753
- * // picomatch.isMatch(string, patterns[, options]);
6754
- *
6755
- * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
6756
- * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
6757
- * ```
6758
- * @param {String|Array} str The string to test.
6759
- * @param {String|Array} patterns One or more glob patterns to use for matching.
6760
- * @param {Object} [options] See available [options](#options).
6761
- * @return {Boolean} Returns true if any patterns match `str`
6762
- * @api public
6763
- */
6764
6456
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
6765
- /**
6766
- * Parse a glob pattern to create the source string for a regular
6767
- * expression.
6768
- *
6769
- * ```js
6770
- * const picomatch = require('picomatch');
6771
- * const result = picomatch.parse(pattern[, options]);
6772
- * ```
6773
- * @param {String} `pattern`
6774
- * @param {Object} `options`
6775
- * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
6776
- * @api public
6777
- */
6778
6457
  picomatch.parse = (pattern, options) => {
6779
6458
  if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
6780
6459
  return parse(pattern, {
@@ -6782,44 +6461,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6782
6461
  fastpaths: false
6783
6462
  });
6784
6463
  };
6785
- /**
6786
- * Scan a glob pattern to separate the pattern into segments.
6787
- *
6788
- * ```js
6789
- * const picomatch = require('picomatch');
6790
- * // picomatch.scan(input[, options]);
6791
- *
6792
- * const result = picomatch.scan('!./foo/*.js');
6793
- * console.log(result);
6794
- * { prefix: '!./',
6795
- * input: '!./foo/*.js',
6796
- * start: 3,
6797
- * base: 'foo',
6798
- * glob: '*.js',
6799
- * isBrace: false,
6800
- * isBracket: false,
6801
- * isGlob: true,
6802
- * isExtglob: false,
6803
- * isGlobstar: false,
6804
- * negated: true }
6805
- * ```
6806
- * @param {String} `input` Glob pattern to scan.
6807
- * @param {Object} `options`
6808
- * @return {Object} Returns an object with
6809
- * @api public
6810
- */
6811
6464
  picomatch.scan = (input, options) => scan(input, options);
6812
- /**
6813
- * Compile a regular expression from the `state` object returned by the
6814
- * [parse()](#parse) method.
6815
- *
6816
- * @param {Object} `state`
6817
- * @param {Object} `options`
6818
- * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
6819
- * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
6820
- * @return {RegExp}
6821
- * @api public
6822
- */
6823
6465
  picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
6824
6466
  if (returnOutput === true) return state.output;
6825
6467
  const opts = options || {};
@@ -6831,24 +6473,6 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6831
6473
  if (returnState === true) regex.state = state;
6832
6474
  return regex;
6833
6475
  };
6834
- /**
6835
- * Create a regular expression from a parsed glob pattern.
6836
- *
6837
- * ```js
6838
- * const picomatch = require('picomatch');
6839
- * const state = picomatch.parse('*.js');
6840
- * // picomatch.compileRe(state[, options]);
6841
- *
6842
- * console.log(picomatch.compileRe(state));
6843
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
6844
- * ```
6845
- * @param {String} `state` The object returned from the `.parse` method.
6846
- * @param {Object} `options`
6847
- * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
6848
- * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
6849
- * @return {RegExp} Returns a regex created from the given pattern.
6850
- * @api public
6851
- */
6852
6476
  picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
6853
6477
  if (!input || typeof input !== "string") throw new TypeError("Expected a non-empty string");
6854
6478
  let parsed = {
@@ -6859,22 +6483,6 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6859
6483
  if (!parsed.output) parsed = parse(input, options);
6860
6484
  return picomatch.compileRe(parsed, options, returnOutput, returnState);
6861
6485
  };
6862
- /**
6863
- * Create a regular expression from the given regex source string.
6864
- *
6865
- * ```js
6866
- * const picomatch = require('picomatch');
6867
- * // picomatch.toRegex(source[, options]);
6868
- *
6869
- * const { output } = picomatch.parse('*.js');
6870
- * console.log(picomatch.toRegex(output));
6871
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
6872
- * ```
6873
- * @param {String} `source` Regular expression source string.
6874
- * @param {Object} `options`
6875
- * @return {RegExp}
6876
- * @api public
6877
- */
6878
6486
  picomatch.toRegex = (source, options) => {
6879
6487
  try {
6880
6488
  const opts = options || {};
@@ -6884,18 +6492,9 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6884
6492
  return /$^/;
6885
6493
  }
6886
6494
  };
6887
- /**
6888
- * Picomatch constants.
6889
- * @return {Object}
6890
- */
6891
6495
  picomatch.constants = constants;
6892
- /**
6893
- * Expose "picomatch"
6894
- */
6895
6496
  module.exports = picomatch;
6896
6497
  }));
6897
- //#endregion
6898
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js
6899
6498
  var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6900
6499
  const pico = require_picomatch$1();
6901
6500
  const utils = require_utils$1();
@@ -6909,39 +6508,38 @@ var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6909
6508
  Object.assign(picomatch, pico);
6910
6509
  module.exports = picomatch;
6911
6510
  }));
6912
- //#endregion
6913
- //#region node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs
6914
6511
  var import_picomatch = /* @__PURE__ */ __toESM$1(require_picomatch(), 1);
6915
6512
  const isReadonlyArray = Array.isArray;
6513
+ const BACKSLASHES = /\\/g;
6916
6514
  const isWin = process.platform === "win32";
6917
6515
  const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
6918
6516
  function getPartialMatcher(patterns, options = {}) {
6919
6517
  const patternsCount = patterns.length;
6920
6518
  const patternsParts = Array(patternsCount);
6921
6519
  const matchers = Array(patternsCount);
6922
- const globstarEnabled = !options.noglobstar;
6923
- for (let i = 0; i < patternsCount; i++) {
6520
+ let i, j;
6521
+ for (i = 0; i < patternsCount; i++) {
6924
6522
  const parts = splitPattern(patterns[i]);
6925
6523
  patternsParts[i] = parts;
6926
6524
  const partsCount = parts.length;
6927
6525
  const partMatchers = Array(partsCount);
6928
- for (let j = 0; j < partsCount; j++) partMatchers[j] = (0, import_picomatch.default)(parts[j], options);
6526
+ for (j = 0; j < partsCount; j++) partMatchers[j] = (0, import_picomatch.default)(parts[j], options);
6929
6527
  matchers[i] = partMatchers;
6930
6528
  }
6931
6529
  return (input) => {
6932
6530
  const inputParts = input.split("/");
6933
6531
  if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
6934
- for (let i = 0; i < patterns.length; i++) {
6532
+ for (i = 0; i < patternsCount; i++) {
6935
6533
  const patternParts = patternsParts[i];
6936
6534
  const matcher = matchers[i];
6937
6535
  const inputPatternCount = inputParts.length;
6938
6536
  const minParts = Math.min(inputPatternCount, patternParts.length);
6939
- let j = 0;
6537
+ j = 0;
6940
6538
  while (j < minParts) {
6941
6539
  const part = patternParts[j];
6942
6540
  if (part.includes("/")) return true;
6943
6541
  if (!matcher[j](inputParts[j])) break;
6944
- if (globstarEnabled && part === "**") return true;
6542
+ if (!options.noglobstar && part === "**") return true;
6945
6543
  j++;
6946
6544
  }
6947
6545
  if (j === inputPatternCount) return true;
@@ -6949,13 +6547,12 @@ function getPartialMatcher(patterns, options = {}) {
6949
6547
  return false;
6950
6548
  };
6951
6549
  }
6952
- /* node:coverage ignore next 2 */
6953
6550
  const WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
6954
6551
  const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/";
6955
6552
  function buildFormat(cwd, root, absolute) {
6956
6553
  if (cwd === root || root.startsWith(`${cwd}/`)) {
6957
6554
  if (absolute) {
6958
- const start = isRoot(cwd) ? cwd.length : cwd.length + 1;
6555
+ const start = cwd.length + +!isRoot(cwd);
6959
6556
  return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
6960
6557
  }
6961
6558
  const prefix = root.slice(cwd.length + 1);
@@ -6976,38 +6573,20 @@ function buildRelative(cwd, root) {
6976
6573
  }
6977
6574
  return (p) => {
6978
6575
  const result = posix.relative(cwd, `${root}/${p}`);
6979
- if (p.endsWith("/") && result !== "") return `${result}/`;
6980
- return result || ".";
6576
+ return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
6981
6577
  };
6982
6578
  }
6983
6579
  const splitPatternOptions = { parts: true };
6984
- function splitPattern(path$1) {
6580
+ function splitPattern(path) {
6985
6581
  var _result$parts;
6986
- const result = import_picomatch.default.scan(path$1, splitPatternOptions);
6987
- return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$1];
6582
+ const result = import_picomatch.default.scan(path, splitPatternOptions);
6583
+ return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path];
6988
6584
  }
6989
6585
  const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
6990
6586
  const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
6991
- const escapePosixPath = (path$1) => path$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
6992
- const escapeWin32Path = (path$1) => path$1.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
6993
- /**
6994
- * Escapes a path's special characters depending on the platform.
6995
- * @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
6996
- */
6997
- /* node:coverage ignore next */
6587
+ const escapePosixPath = (path) => path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
6588
+ const escapeWin32Path = (path) => path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
6998
6589
  const escapePath = isWin ? escapeWin32Path : escapePosixPath;
6999
- /**
7000
- * Checks if a pattern has dynamic parts.
7001
- *
7002
- * Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
7003
- *
7004
- * - Doesn't necessarily return `false` on patterns that include `\`.
7005
- * - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
7006
- * - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
7007
- * - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
7008
- *
7009
- * @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
7010
- */
7011
6590
  function isDynamicPattern(pattern, options) {
7012
6591
  if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;
7013
6592
  const scan = import_picomatch.default.scan(pattern);
@@ -7016,28 +6595,31 @@ function isDynamicPattern(pattern, options) {
7016
6595
  function log(...tasks) {
7017
6596
  console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
7018
6597
  }
6598
+ function ensureStringArray(value) {
6599
+ return typeof value === "string" ? [value] : value !== null && value !== void 0 ? value : [];
6600
+ }
7019
6601
  const PARENT_DIRECTORY = /^(\/?\.\.)+/;
7020
6602
  const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
7021
- const BACKSLASHES = /\\/g;
7022
- function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
6603
+ function normalizePattern(pattern, opts, props, isIgnore) {
6604
+ var _PARENT_DIRECTORY$exe;
6605
+ const cwd = opts.cwd;
7023
6606
  let result = pattern;
7024
- if (pattern.endsWith("/")) result = pattern.slice(0, -1);
7025
- if (!result.endsWith("*") && expandDirectories) result += "/**";
6607
+ if (pattern[pattern.length - 1] === "/") result = pattern.slice(0, -1);
6608
+ if (result[result.length - 1] !== "*" && opts.expandDirectories) result += "/**";
7026
6609
  const escapedCwd = escapePath(cwd);
7027
- if (path$1.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = posix.relative(escapedCwd, result);
7028
- else result = posix.normalize(result);
7029
- const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
6610
+ result = isAbsolute$1(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
6611
+ const parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) === null || _PARENT_DIRECTORY$exe === void 0 ? void 0 : _PARENT_DIRECTORY$exe[0];
7030
6612
  const parts = splitPattern(result);
7031
- if (parentDirectoryMatch === null || parentDirectoryMatch === void 0 ? void 0 : parentDirectoryMatch[0]) {
7032
- const n = (parentDirectoryMatch[0].length + 1) / 3;
6613
+ if (parentDir) {
6614
+ const n = (parentDir.length + 1) / 3;
7033
6615
  let i = 0;
7034
6616
  const cwdParts = escapedCwd.split("/");
7035
6617
  while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
7036
6618
  result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
7037
6619
  i++;
7038
6620
  }
7039
- const potentialRoot = posix.join(cwd, parentDirectoryMatch[0].slice(i * 3));
7040
- if (!potentialRoot.startsWith(".") && props.root.length > potentialRoot.length) {
6621
+ const potentialRoot = posix.join(cwd, parentDir.slice(i * 3));
6622
+ if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
7041
6623
  props.root = potentialRoot;
7042
6624
  props.depthOffset = -n + i;
7043
6625
  }
@@ -7053,7 +6635,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
7053
6635
  newCommonPath.pop();
7054
6636
  break;
7055
6637
  }
7056
- if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1) break;
6638
+ if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
7057
6639
  newCommonPath.push(part);
7058
6640
  }
7059
6641
  props.depthOffset = newCommonPath.length;
@@ -7062,138 +6644,127 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
7062
6644
  }
7063
6645
  return result;
7064
6646
  }
7065
- function processPatterns({ patterns = ["**/*"], ignore = [], expandDirectories = true }, cwd, props) {
7066
- if (typeof patterns === "string") patterns = [patterns];
7067
- if (typeof ignore === "string") ignore = [ignore];
6647
+ function processPatterns(options, patterns, props) {
7068
6648
  const matchPatterns = [];
7069
6649
  const ignorePatterns = [];
7070
- for (const pattern of ignore) {
6650
+ for (const pattern of options.ignore) {
7071
6651
  if (!pattern) continue;
7072
- if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, true));
6652
+ if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, options, props, true));
7073
6653
  }
7074
6654
  for (const pattern of patterns) {
7075
6655
  if (!pattern) continue;
7076
- if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, false));
7077
- else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd, props, true));
6656
+ if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, options, props, false));
6657
+ else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
7078
6658
  }
7079
6659
  return {
7080
6660
  match: matchPatterns,
7081
6661
  ignore: ignorePatterns
7082
6662
  };
7083
6663
  }
7084
- function formatPaths(paths, relative) {
7085
- for (let i = paths.length - 1; i >= 0; i--) {
7086
- const path$1 = paths[i];
7087
- paths[i] = relative(path$1);
7088
- }
7089
- return paths;
7090
- }
7091
- function normalizeCwd(cwd) {
7092
- if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
7093
- if (cwd instanceof URL) return fileURLToPath$1(cwd).replace(BACKSLASHES, "/");
7094
- return path$1.resolve(cwd).replace(BACKSLASHES, "/");
7095
- }
7096
- function getCrawler(patterns, inputOptions = {}) {
7097
- const options = process.env.TINYGLOBBY_DEBUG ? {
7098
- ...inputOptions,
7099
- debug: true
7100
- } : inputOptions;
7101
- const cwd = normalizeCwd(options.cwd);
7102
- if (options.debug) log("globbing with:", {
7103
- patterns,
7104
- options,
7105
- cwd
7106
- });
7107
- if (Array.isArray(patterns) && patterns.length === 0) return [{
7108
- sync: () => [],
7109
- withPromise: async () => []
7110
- }, false];
6664
+ function buildCrawler(options, patterns) {
6665
+ const cwd = options.cwd;
7111
6666
  const props = {
7112
6667
  root: cwd,
7113
- commonPath: null,
7114
6668
  depthOffset: 0
7115
6669
  };
7116
- const processed = processPatterns({
7117
- ...options,
7118
- patterns
7119
- }, cwd, props);
6670
+ const processed = processPatterns(options, patterns, props);
7120
6671
  if (options.debug) log("internal processing patterns:", processed);
6672
+ const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;
6673
+ const root = props.root.replace(BACKSLASHES, "");
7121
6674
  const matchOptions = {
7122
- dot: options.dot,
6675
+ dot,
7123
6676
  nobrace: options.braceExpansion === false,
7124
- nocase: options.caseSensitiveMatch === false,
6677
+ nocase: !caseSensitiveMatch,
7125
6678
  noextglob: options.extglob === false,
7126
6679
  noglobstar: options.globstar === false,
7127
6680
  posix: true
7128
6681
  };
7129
- const matcher = (0, import_picomatch.default)(processed.match, {
7130
- ...matchOptions,
7131
- ignore: processed.ignore
7132
- });
6682
+ const matcher = (0, import_picomatch.default)(processed.match, matchOptions);
7133
6683
  const ignore = (0, import_picomatch.default)(processed.ignore, matchOptions);
7134
6684
  const partialMatcher = getPartialMatcher(processed.match, matchOptions);
7135
- const format = buildFormat(cwd, props.root, options.absolute);
7136
- const formatExclude = options.absolute ? format : buildFormat(cwd, props.root, true);
7137
- const fdirOptions = {
7138
- filters: [options.debug ? (p, isDirectory) => {
7139
- const path$1 = format(p, isDirectory);
7140
- const matches = matcher(path$1);
7141
- if (matches) log(`matched ${path$1}`);
6685
+ const format = buildFormat(cwd, root, absolute);
6686
+ const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
6687
+ const excludePredicate = (_, p) => {
6688
+ const relativePath = excludeFormatter(p, true);
6689
+ return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
6690
+ };
6691
+ let maxDepth;
6692
+ if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
6693
+ const crawler = new Builder({
6694
+ filters: [debug ? (p, isDirectory) => {
6695
+ const path = format(p, isDirectory);
6696
+ const matches = matcher(path) && !ignore(path);
6697
+ if (matches) log(`matched ${path}`);
7142
6698
  return matches;
7143
- } : (p, isDirectory) => matcher(format(p, isDirectory))],
7144
- exclude: options.debug ? (_, p) => {
7145
- const relativePath = formatExclude(p, true);
7146
- const skipped = relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
7147
- if (skipped) log(`skipped ${p}`);
7148
- else log(`crawling ${p}`);
6699
+ } : (p, isDirectory) => {
6700
+ const path = format(p, isDirectory);
6701
+ return matcher(path) && !ignore(path);
6702
+ }],
6703
+ exclude: debug ? (_, p) => {
6704
+ const skipped = excludePredicate(_, p);
6705
+ log(`${skipped ? "skipped" : "crawling"} ${p}`);
7149
6706
  return skipped;
7150
- } : (_, p) => {
7151
- const relativePath = formatExclude(p, true);
7152
- return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
7153
- },
7154
- fs: options.fs ? {
7155
- readdir: options.fs.readdir || nativeFs.readdir,
7156
- readdirSync: options.fs.readdirSync || nativeFs.readdirSync,
7157
- realpath: options.fs.realpath || nativeFs.realpath,
7158
- realpathSync: options.fs.realpathSync || nativeFs.realpathSync,
7159
- stat: options.fs.stat || nativeFs.stat,
7160
- statSync: options.fs.statSync || nativeFs.statSync
7161
- } : void 0,
6707
+ } : excludePredicate,
6708
+ fs: options.fs,
7162
6709
  pathSeparator: "/",
7163
- relativePaths: true,
7164
- resolveSymlinks: true,
6710
+ relativePaths: !absolute,
6711
+ resolvePaths: absolute,
6712
+ includeBasePath: absolute,
6713
+ resolveSymlinks: followSymbolicLinks,
6714
+ excludeSymlinks: !followSymbolicLinks,
6715
+ excludeFiles: onlyDirectories,
6716
+ includeDirs: onlyDirectories || !options.onlyFiles,
6717
+ maxDepth,
7165
6718
  signal: options.signal
6719
+ }).crawl(root);
6720
+ if (options.debug) log("internal properties:", {
6721
+ ...props,
6722
+ root
6723
+ });
6724
+ return [crawler, cwd !== root && !absolute && buildRelative(cwd, root)];
6725
+ }
6726
+ function formatPaths(paths, mapper) {
6727
+ if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
6728
+ return paths;
6729
+ }
6730
+ const defaultOptions$1 = {
6731
+ caseSensitiveMatch: true,
6732
+ cwd: process.cwd(),
6733
+ debug: !!process.env.TINYGLOBBY_DEBUG,
6734
+ expandDirectories: true,
6735
+ followSymbolicLinks: true,
6736
+ onlyFiles: true
6737
+ };
6738
+ function getOptions$1(options) {
6739
+ const opts = {
6740
+ ...defaultOptions$1,
6741
+ ...options
7166
6742
  };
7167
- if (options.deep !== void 0) fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset);
7168
- if (options.absolute) {
7169
- fdirOptions.relativePaths = false;
7170
- fdirOptions.resolvePaths = true;
7171
- fdirOptions.includeBasePath = true;
7172
- }
7173
- if (options.followSymbolicLinks === false) {
7174
- fdirOptions.resolveSymlinks = false;
7175
- fdirOptions.excludeSymlinks = true;
7176
- }
7177
- if (options.onlyDirectories) {
7178
- fdirOptions.excludeFiles = true;
7179
- fdirOptions.includeDirs = true;
7180
- } else if (options.onlyFiles === false) fdirOptions.includeDirs = true;
7181
- props.root = props.root.replace(BACKSLASHES, "");
7182
- const root = props.root;
7183
- if (options.debug) log("internal properties:", props);
7184
- const relative = cwd !== root && !options.absolute && buildRelative(cwd, props.root);
7185
- return [new Builder(fdirOptions).crawl(root), relative];
7186
- }
7187
- async function glob(patternsOrOptions, options) {
7188
- if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
7189
- const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string";
7190
- const opts = isModern ? options : patternsOrOptions;
7191
- const [crawler, relative] = getCrawler(isModern ? patternsOrOptions : patternsOrOptions.patterns, opts);
7192
- if (!relative) return crawler.withPromise();
7193
- return formatPaths(await crawler.withPromise(), relative);
7194
- }
7195
- //#endregion
7196
- //#region src/build/build.ts
6743
+ opts.cwd = (opts.cwd instanceof URL ? fileURLToPath$1(opts.cwd) : resolve$1(opts.cwd)).replace(BACKSLASHES, "/");
6744
+ opts.ignore = ensureStringArray(opts.ignore);
6745
+ opts.fs && (opts.fs = {
6746
+ readdir: opts.fs.readdir || readdir$1,
6747
+ readdirSync: opts.fs.readdirSync || readdirSync,
6748
+ realpath: opts.fs.realpath || realpath$1,
6749
+ realpathSync: opts.fs.realpathSync || realpathSync$1,
6750
+ stat: opts.fs.stat || stat$2,
6751
+ statSync: opts.fs.statSync || statSync$1
6752
+ });
6753
+ if (opts.debug) log("globbing with options:", opts);
6754
+ return opts;
6755
+ }
6756
+ function getCrawler(globInput, inputOptions = {}) {
6757
+ var _ref;
6758
+ if (globInput && (inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
6759
+ const isModern = isReadonlyArray(globInput) || typeof globInput === "string";
6760
+ const patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== void 0 ? _ref : "**/*");
6761
+ const options = getOptions$1(isModern ? inputOptions : globInput);
6762
+ return patterns.length > 0 ? buildCrawler(options, patterns) : [];
6763
+ }
6764
+ async function glob(globInput, options) {
6765
+ const [crawler, relative] = getCrawler(globInput, options);
6766
+ return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
6767
+ }
7197
6768
  async function build(nitro) {
7198
6769
  switch (nitro.options.builder) {
7199
6770
  case "rollup": {
@@ -7211,8 +6782,6 @@ async function build(nitro) {
7211
6782
  default: throw new Error(`Unknown builder: ${nitro.options.builder}`);
7212
6783
  }
7213
6784
  }
7214
- //#endregion
7215
- //#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/types/other.js
7216
6785
  const types$3 = {
7217
6786
  "application/prs.cww": ["cww"],
7218
6787
  "application/prs.xsf+xml": ["xsf"],
@@ -8049,8 +7618,6 @@ const types$3 = {
8049
7618
  "x-conference/x-cooltalk": ["ice"]
8050
7619
  };
8051
7620
  Object.freeze(types$3);
8052
- //#endregion
8053
- //#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/types/standard.js
8054
7621
  const types$2 = {
8055
7622
  "application/andrew-inset": ["ez"],
8056
7623
  "application/appinstaller": ["appinstaller"],
@@ -8522,8 +8089,6 @@ const types$2 = {
8522
8089
  "video/webm": ["webm"]
8523
8090
  };
8524
8091
  Object.freeze(types$2);
8525
- //#endregion
8526
- //#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/src/Mime.js
8527
8092
  var __classPrivateFieldGet = function(receiver, state, kind, f) {
8528
8093
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8529
8094
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
@@ -8591,11 +8156,7 @@ var Mime = class {
8591
8156
  }
8592
8157
  };
8593
8158
  _Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtensions = /* @__PURE__ */ new WeakMap();
8594
- //#endregion
8595
- //#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/src/index.js
8596
8159
  var src_default = new Mime(types$2, types$3)._freeze();
8597
- //#endregion
8598
- //#region src/utils/compress.ts
8599
8160
  const EncodingMap = {
8600
8161
  gzip: ".gz",
8601
8162
  br: ".br",
@@ -8705,8 +8266,6 @@ const COMPRESSIBLE_MIMES_RE = new Set([
8705
8266
  function isCompressibleMime(mimeType) {
8706
8267
  return COMPRESSIBLE_MIMES_RE.has(mimeType);
8707
8268
  }
8708
- //#endregion
8709
- //#region src/build/assets.ts
8710
8269
  const NEGATION_RE = /^(!?)(.*)$/;
8711
8270
  const PARENT_DIR_GLOB_RE = /!?\.\.\//;
8712
8271
  async function scanUnprefixedPublicAssets(nitro) {
@@ -8750,8 +8309,6 @@ function getIncludePatterns(nitro, assetDir, ignorePatterns = nitro.options.igno
8750
8309
  return (negation ? "" : "!") + (pattern.startsWith("*") ? pattern : relative$2(assetDir, resolve$3(nitro.options.rootDir, pattern)));
8751
8310
  })].filter((p) => !PARENT_DIR_GLOB_RE.test(p));
8752
8311
  }
8753
- //#endregion
8754
- //#region src/build/prepare.ts
8755
8312
  async function prepare(nitro) {
8756
8313
  await prepareDir(nitro.options.output.dir);
8757
8314
  if (!nitro.options.noPublicDir) await prepareDir(nitro.options.output.publicDir);
@@ -8764,8 +8321,6 @@ async function prepareDir(dir) {
8764
8321
  });
8765
8322
  await fsp.mkdir(dir, { recursive: true });
8766
8323
  }
8767
- //#endregion
8768
- //#region node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs
8769
8324
  var astralIdentifierCodes = [
8770
8325
  509,
8771
8326
  0,
@@ -12273,23 +11828,21 @@ var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
12273
11828
  var ecma11BinaryProperties = ecma10BinaryProperties;
12274
11829
  var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
12275
11830
  var ecma13BinaryProperties = ecma12BinaryProperties;
12276
- var ecma14BinaryProperties = ecma13BinaryProperties;
12277
11831
  var unicodeBinaryProperties = {
12278
11832
  9: ecma9BinaryProperties,
12279
11833
  10: ecma10BinaryProperties,
12280
11834
  11: ecma11BinaryProperties,
12281
11835
  12: ecma12BinaryProperties,
12282
11836
  13: ecma13BinaryProperties,
12283
- 14: ecma14BinaryProperties
11837
+ 14: ecma13BinaryProperties
12284
11838
  };
12285
- var ecma14BinaryPropertiesOfStrings = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji";
12286
11839
  var unicodeBinaryPropertiesOfStrings = {
12287
11840
  9: "",
12288
11841
  10: "",
12289
11842
  11: "",
12290
11843
  12: "",
12291
11844
  13: "",
12292
- 14: ecma14BinaryPropertiesOfStrings
11845
+ 14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"
12293
11846
  };
12294
11847
  var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
12295
11848
  var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
@@ -12297,14 +11850,13 @@ var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Han
12297
11850
  var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
12298
11851
  var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
12299
11852
  var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
12300
- var ecma14ScriptValues = ecma13ScriptValues + " " + scriptValuesAddedInUnicode;
12301
11853
  var unicodeScriptValues = {
12302
11854
  9: ecma9ScriptValues,
12303
11855
  10: ecma10ScriptValues,
12304
11856
  11: ecma11ScriptValues,
12305
11857
  12: ecma12ScriptValues,
12306
11858
  13: ecma13ScriptValues,
12307
- 14: ecma14ScriptValues
11859
+ 14: ecma13ScriptValues + " " + scriptValuesAddedInUnicode
12308
11860
  };
12309
11861
  var data = {};
12310
11862
  function buildUnicodeData(ecmaVersion) {
@@ -12434,12 +11986,6 @@ RegExpValidationState.prototype.eatChars = function eatChars(chs, forceU) {
12434
11986
  this.pos = pos;
12435
11987
  return true;
12436
11988
  };
12437
- /**
12438
- * Validate the flags part of a given RegExpLiteral.
12439
- *
12440
- * @param {RegExpValidationState} state The state to validate RegExp.
12441
- * @returns {void}
12442
- */
12443
11989
  pp$1.validateRegExpFlags = function(state) {
12444
11990
  var validFlags = state.validFlags;
12445
11991
  var flags = state.flags;
@@ -12458,12 +12004,6 @@ function hasProp(obj) {
12458
12004
  for (var _ in obj) return true;
12459
12005
  return false;
12460
12006
  }
12461
- /**
12462
- * Validate the pattern part of a given RegExpLiteral.
12463
- *
12464
- * @param {RegExpValidationState} state The state to validate RegExp.
12465
- * @returns {void}
12466
- */
12467
12007
  pp$1.validateRegExpPattern = function(state) {
12468
12008
  this.regexp_pattern(state);
12469
12009
  if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
@@ -13852,8 +13392,6 @@ function parse(input, options) {
13852
13392
  function tokenizer(input, options) {
13853
13393
  return Parser.tokenizer(input, options);
13854
13394
  }
13855
- //#endregion
13856
- //#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.9388d834.mjs
13857
13395
  const m$1 = Symbol.for("__confbox_fmt__"), k$2 = /^(\s+)/, v$1 = /(\s+)$/;
13858
13396
  function x$1(e, t = {}) {
13859
13397
  return {
@@ -13872,8 +13410,6 @@ function N$2(e, t, n) {
13872
13410
  value: x$1(e, n)
13873
13411
  });
13874
13412
  }
13875
- //#endregion
13876
- //#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/json5.mjs
13877
13413
  function X$1(D) {
13878
13414
  return D && D.__esModule && Object.prototype.hasOwnProperty.call(D, "default") ? D.default : D;
13879
13415
  }
@@ -14632,8 +14168,6 @@ var Bu = function(C, E, n) {
14632
14168
  }
14633
14169
  };
14634
14170
  X$1(Bu);
14635
- //#endregion
14636
- //#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.f9f03f05.mjs
14637
14171
  function $$1(n, l = !1) {
14638
14172
  const g = n.length;
14639
14173
  let e = 0, u = "", p = 0, k = 16, A = 0, o = 0, O = 0, B = 0, b = 0;
@@ -15032,9 +14566,7 @@ function h$2(n, l) {
15032
14566
  const g = K$1(n, l?.errors, l);
15033
14567
  return N$2(n, g, l), g;
15034
14568
  }
15035
- //#endregion
15036
- //#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/yaml.mjs
15037
- /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ function oe(e) {
14569
+ function oe(e) {
15038
14570
  return typeof e > "u" || e === null;
15039
14571
  }
15040
14572
  function We(e) {
@@ -16089,8 +15621,6 @@ function dr(e, n) {
16089
15621
  var xr = { dump: dr };
16090
15622
  Ni.load;
16091
15623
  xr.dump;
16092
- //#endregion
16093
- //#region node_modules/.pnpm/pkg-types@1.3.1/node_modules/pkg-types/dist/index.mjs
16094
15624
  const defaultFindOptions = {
16095
15625
  startingFrom: ".",
16096
15626
  rootPattern: /^node_modules$/,
@@ -16147,8 +15677,6 @@ async function resolvePackageJSON(id = process.cwd(), options = {}) {
16147
15677
  ...options
16148
15678
  });
16149
15679
  }
16150
- //#endregion
16151
- //#region node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.mjs
16152
15680
  const BUILTIN_MODULES = new Set(builtinModules);
16153
15681
  function normalizeSlash(path) {
16154
15682
  return path.replace(/\\/g, "/");
@@ -16174,16 +15702,6 @@ function getImportNames(cleanedImports) {
16174
15702
  defaultImport: topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() || void 0
16175
15703
  };
16176
15704
  }
16177
- /**
16178
- * @typedef ErrnoExceptionFields
16179
- * @property {number | undefined} [errnode]
16180
- * @property {string | undefined} [code]
16181
- * @property {string | undefined} [path]
16182
- * @property {string | undefined} [syscall]
16183
- * @property {string | undefined} [url]
16184
- *
16185
- * @typedef {Error & ErrnoExceptionFields} ErrnoException
16186
- */
16187
15705
  const own$1 = {}.hasOwnProperty;
16188
15706
  const classRegExp = /^([A-Z][a-z\d]*)+$/;
16189
15707
  const kTypes = new Set([
@@ -16198,211 +15716,97 @@ const kTypes = new Set([
16198
15716
  "symbol"
16199
15717
  ]);
16200
15718
  const codes = {};
16201
- /**
16202
- * Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.
16203
- * We cannot use Intl.ListFormat because it's not available in
16204
- * --without-intl builds.
16205
- *
16206
- * @param {Array<string>} array
16207
- * An array of strings.
16208
- * @param {string} [type]
16209
- * The list type to be inserted before the last element.
16210
- * @returns {string}
16211
- */
16212
15719
  function formatList(array, type = "and") {
16213
15720
  return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array[array.length - 1]}`;
16214
15721
  }
16215
- /** @type {Map<string, MessageFunction | string>} */
16216
15722
  const messages = /* @__PURE__ */ new Map();
16217
15723
  const nodeInternalPrefix = "__node_internal_";
16218
- /** @type {number} */
16219
15724
  let userStackTraceLimit;
16220
- codes.ERR_INVALID_ARG_TYPE = createError(
16221
- "ERR_INVALID_ARG_TYPE",
16222
- /**
16223
- * @param {string} name
16224
- * @param {Array<string> | string} expected
16225
- * @param {unknown} actual
16226
- */
16227
- (name, expected, actual) => {
16228
- assert.ok(typeof name === "string", "'name' must be a string");
16229
- if (!Array.isArray(expected)) expected = [expected];
16230
- let message = "The ";
16231
- if (name.endsWith(" argument")) message += `${name} `;
16232
- else {
16233
- const type = name.includes(".") ? "property" : "argument";
16234
- message += `"${name}" ${type} `;
16235
- }
16236
- message += "must be ";
16237
- /** @type {Array<string>} */
16238
- const types = [];
16239
- /** @type {Array<string>} */
16240
- const instances = [];
16241
- /** @type {Array<string>} */
16242
- const other = [];
16243
- for (const value of expected) {
16244
- assert.ok(typeof value === "string", "All expected entries have to be of type string");
16245
- if (kTypes.has(value)) types.push(value.toLowerCase());
16246
- else if (classRegExp.exec(value) === null) {
16247
- assert.ok(value !== "object", "The value \"object\" should be written as \"Object\"");
16248
- other.push(value);
16249
- } else instances.push(value);
16250
- }
16251
- if (instances.length > 0) {
16252
- const pos = types.indexOf("object");
16253
- if (pos !== -1) {
16254
- types.slice(pos, 1);
16255
- instances.push("Object");
16256
- }
16257
- }
16258
- if (types.length > 0) {
16259
- message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`;
16260
- if (instances.length > 0 || other.length > 0) message += " or ";
16261
- }
16262
- if (instances.length > 0) {
16263
- message += `an instance of ${formatList(instances, "or")}`;
16264
- if (other.length > 0) message += " or ";
16265
- }
16266
- if (other.length > 0) if (other.length > 1) message += `one of ${formatList(other, "or")}`;
16267
- else {
16268
- if (other[0].toLowerCase() !== other[0]) message += "an ";
16269
- message += `${other[0]}`;
15725
+ codes.ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
15726
+ assert.ok(typeof name === "string", "'name' must be a string");
15727
+ if (!Array.isArray(expected)) expected = [expected];
15728
+ let message = "The ";
15729
+ if (name.endsWith(" argument")) message += `${name} `;
15730
+ else {
15731
+ const type = name.includes(".") ? "property" : "argument";
15732
+ message += `"${name}" ${type} `;
15733
+ }
15734
+ message += "must be ";
15735
+ const types = [];
15736
+ const instances = [];
15737
+ const other = [];
15738
+ for (const value of expected) {
15739
+ assert.ok(typeof value === "string", "All expected entries have to be of type string");
15740
+ if (kTypes.has(value)) types.push(value.toLowerCase());
15741
+ else if (classRegExp.exec(value) === null) {
15742
+ assert.ok(value !== "object", "The value \"object\" should be written as \"Object\"");
15743
+ other.push(value);
15744
+ } else instances.push(value);
15745
+ }
15746
+ if (instances.length > 0) {
15747
+ const pos = types.indexOf("object");
15748
+ if (pos !== -1) {
15749
+ types.slice(pos, 1);
15750
+ instances.push("Object");
16270
15751
  }
16271
- message += `. Received ${determineSpecificType(actual)}`;
16272
- return message;
16273
- },
16274
- TypeError
16275
- );
16276
- codes.ERR_INVALID_MODULE_SPECIFIER = createError(
16277
- "ERR_INVALID_MODULE_SPECIFIER",
16278
- /**
16279
- * @param {string} request
16280
- * @param {string} reason
16281
- * @param {string} [base]
16282
- */
16283
- (request, reason, base = void 0) => {
16284
- return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
16285
- },
16286
- TypeError
16287
- );
16288
- codes.ERR_INVALID_PACKAGE_CONFIG = createError(
16289
- "ERR_INVALID_PACKAGE_CONFIG",
16290
- /**
16291
- * @param {string} path
16292
- * @param {string} [base]
16293
- * @param {string} [message]
16294
- */
16295
- (path, base, message) => {
16296
- return `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
16297
- },
16298
- Error
16299
- );
16300
- codes.ERR_INVALID_PACKAGE_TARGET = createError(
16301
- "ERR_INVALID_PACKAGE_TARGET",
16302
- /**
16303
- * @param {string} packagePath
16304
- * @param {string} key
16305
- * @param {unknown} target
16306
- * @param {boolean} [isImport=false]
16307
- * @param {string} [base]
16308
- */
16309
- (packagePath, key, target, isImport = false, base = void 0) => {
16310
- const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
16311
- if (key === ".") {
16312
- assert.ok(isImport === false);
16313
- return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
16314
- }
16315
- return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
16316
- },
16317
- Error
16318
- );
16319
- codes.ERR_MODULE_NOT_FOUND = createError(
16320
- "ERR_MODULE_NOT_FOUND",
16321
- /**
16322
- * @param {string} path
16323
- * @param {string} base
16324
- * @param {boolean} [exactUrl]
16325
- */
16326
- (path, base, exactUrl = false) => {
16327
- return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`;
16328
- },
16329
- Error
16330
- );
15752
+ }
15753
+ if (types.length > 0) {
15754
+ message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`;
15755
+ if (instances.length > 0 || other.length > 0) message += " or ";
15756
+ }
15757
+ if (instances.length > 0) {
15758
+ message += `an instance of ${formatList(instances, "or")}`;
15759
+ if (other.length > 0) message += " or ";
15760
+ }
15761
+ if (other.length > 0) if (other.length > 1) message += `one of ${formatList(other, "or")}`;
15762
+ else {
15763
+ if (other[0].toLowerCase() !== other[0]) message += "an ";
15764
+ message += `${other[0]}`;
15765
+ }
15766
+ message += `. Received ${determineSpecificType(actual)}`;
15767
+ return message;
15768
+ }, TypeError);
15769
+ codes.ERR_INVALID_MODULE_SPECIFIER = createError("ERR_INVALID_MODULE_SPECIFIER", (request, reason, base = void 0) => {
15770
+ return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
15771
+ }, TypeError);
15772
+ codes.ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path, base, message) => {
15773
+ return `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
15774
+ }, Error);
15775
+ codes.ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (packagePath, key, target, isImport = false, base = void 0) => {
15776
+ const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
15777
+ if (key === ".") {
15778
+ assert.ok(isImport === false);
15779
+ return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
15780
+ }
15781
+ return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
15782
+ }, Error);
15783
+ codes.ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (path, base, exactUrl = false) => {
15784
+ return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`;
15785
+ }, Error);
16331
15786
  codes.ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error);
16332
- codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(
16333
- "ERR_PACKAGE_IMPORT_NOT_DEFINED",
16334
- /**
16335
- * @param {string} specifier
16336
- * @param {string} packagePath
16337
- * @param {string} base
16338
- */
16339
- (specifier, packagePath, base) => {
16340
- return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base}`;
16341
- },
16342
- TypeError
16343
- );
16344
- codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
16345
- "ERR_PACKAGE_PATH_NOT_EXPORTED",
16346
- /**
16347
- * @param {string} packagePath
16348
- * @param {string} subpath
16349
- * @param {string} [base]
16350
- */
16351
- (packagePath, subpath, base = void 0) => {
16352
- if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
16353
- return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
16354
- },
16355
- Error
16356
- );
15787
+ codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => {
15788
+ return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base}`;
15789
+ }, TypeError);
15790
+ codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError("ERR_PACKAGE_PATH_NOT_EXPORTED", (packagePath, subpath, base = void 0) => {
15791
+ if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
15792
+ return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
15793
+ }, Error);
16357
15794
  codes.ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error);
16358
15795
  codes.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError);
16359
- codes.ERR_UNKNOWN_FILE_EXTENSION = createError(
16360
- "ERR_UNKNOWN_FILE_EXTENSION",
16361
- /**
16362
- * @param {string} extension
16363
- * @param {string} path
16364
- */
16365
- (extension, path) => {
16366
- return `Unknown file extension "${extension}" for ${path}`;
16367
- },
16368
- TypeError
16369
- );
16370
- codes.ERR_INVALID_ARG_VALUE = createError(
16371
- "ERR_INVALID_ARG_VALUE",
16372
- /**
16373
- * @param {string} name
16374
- * @param {unknown} value
16375
- * @param {string} [reason='is invalid']
16376
- */
16377
- (name, value, reason = "is invalid") => {
16378
- let inspected = inspect(value);
16379
- if (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`;
16380
- return `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
16381
- },
16382
- TypeError
16383
- );
16384
- /**
16385
- * Utility function for registering the error codes. Only used here. Exported
16386
- * *only* to allow for testing.
16387
- * @param {string} sym
16388
- * @param {MessageFunction | string} value
16389
- * @param {ErrorConstructor} constructor
16390
- * @returns {new (...parameters: Array<any>) => Error}
16391
- */
15796
+ codes.ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (extension, path) => {
15797
+ return `Unknown file extension "${extension}" for ${path}`;
15798
+ }, TypeError);
15799
+ codes.ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (name, value, reason = "is invalid") => {
15800
+ let inspected = inspect(value);
15801
+ if (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`;
15802
+ return `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
15803
+ }, TypeError);
16392
15804
  function createError(sym, value, constructor) {
16393
15805
  messages.set(sym, value);
16394
15806
  return makeNodeErrorWithCode(constructor, sym);
16395
15807
  }
16396
- /**
16397
- * @param {ErrorConstructor} Base
16398
- * @param {string} key
16399
- * @returns {ErrorConstructor}
16400
- */
16401
15808
  function makeNodeErrorWithCode(Base, key) {
16402
15809
  return NodeError;
16403
- /**
16404
- * @param {Array<unknown>} parameters
16405
- */
16406
15810
  function NodeError(...parameters) {
16407
15811
  const limit = Error.stackTraceLimit;
16408
15812
  if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;
@@ -16430,9 +15834,6 @@ function makeNodeErrorWithCode(Base, key) {
16430
15834
  return error;
16431
15835
  }
16432
15836
  }
16433
- /**
16434
- * @returns {boolean}
16435
- */
16436
15837
  function isErrorStackTraceLimitWritable() {
16437
15838
  try {
16438
15839
  if (v8.startupSnapshot.isBuildingSnapshot()) return false;
@@ -16441,39 +15842,21 @@ function isErrorStackTraceLimitWritable() {
16441
15842
  if (desc === void 0) return Object.isExtensible(Error);
16442
15843
  return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
16443
15844
  }
16444
- /**
16445
- * This function removes unnecessary frames from Node.js core errors.
16446
- * @template {(...parameters: unknown[]) => unknown} T
16447
- * @param {T} wrappedFunction
16448
- * @returns {T}
16449
- */
16450
15845
  function hideStackFrames(wrappedFunction) {
16451
15846
  const hidden = nodeInternalPrefix + wrappedFunction.name;
16452
15847
  Object.defineProperty(wrappedFunction, "name", { value: hidden });
16453
15848
  return wrappedFunction;
16454
15849
  }
16455
- const captureLargerStackTrace = hideStackFrames(
16456
- /**
16457
- * @param {Error} error
16458
- * @returns {Error}
16459
- */
16460
- function(error) {
16461
- const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
16462
- if (stackTraceLimitIsWritable) {
16463
- userStackTraceLimit = Error.stackTraceLimit;
16464
- Error.stackTraceLimit = Number.POSITIVE_INFINITY;
16465
- }
16466
- Error.captureStackTrace(error);
16467
- if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
16468
- return error;
15850
+ const captureLargerStackTrace = hideStackFrames(function(error) {
15851
+ const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
15852
+ if (stackTraceLimitIsWritable) {
15853
+ userStackTraceLimit = Error.stackTraceLimit;
15854
+ Error.stackTraceLimit = Number.POSITIVE_INFINITY;
16469
15855
  }
16470
- );
16471
- /**
16472
- * @param {string} key
16473
- * @param {Array<unknown>} parameters
16474
- * @param {Error} self
16475
- * @returns {string}
16476
- */
15856
+ Error.captureStackTrace(error);
15857
+ if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
15858
+ return error;
15859
+ });
16477
15860
  function getMessage(key, parameters, self) {
16478
15861
  const message = messages.get(key);
16479
15862
  assert.ok(message !== void 0, "expected `message` to be found");
@@ -16489,11 +15872,6 @@ function getMessage(key, parameters, self) {
16489
15872
  parameters.unshift(message);
16490
15873
  return Reflect.apply(format, null, parameters);
16491
15874
  }
16492
- /**
16493
- * Determine the specific type of a value for type-mismatch errors.
16494
- * @param {unknown} value
16495
- * @returns {string}
16496
- */
16497
15875
  function determineSpecificType(value) {
16498
15876
  if (value === null || value === void 0) return String(value);
16499
15877
  if (typeof value === "function" && value.name) return `function ${value.name}`;
@@ -16507,17 +15885,10 @@ function determineSpecificType(value) {
16507
15885
  }
16508
15886
  const hasOwnProperty$1 = {}.hasOwnProperty;
16509
15887
  const { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
16510
- /** @type {Map<string, PackageConfig>} */
16511
15888
  const cache = /* @__PURE__ */ new Map();
16512
- /**
16513
- * @param {string} jsonPath
16514
- * @param {{specifier: URL | string, base?: URL}} options
16515
- * @returns {PackageConfig}
16516
- */
16517
15889
  function read(jsonPath, { base, specifier }) {
16518
15890
  const existing = cache.get(jsonPath);
16519
15891
  if (existing) return existing;
16520
- /** @type {string | undefined} */
16521
15892
  let string;
16522
15893
  try {
16523
15894
  string = fs.readFileSync(path.toNamespacedPath(jsonPath), "utf8");
@@ -16525,7 +15896,6 @@ function read(jsonPath, { base, specifier }) {
16525
15896
  const exception = error;
16526
15897
  if (exception.code !== "ENOENT") throw exception;
16527
15898
  }
16528
- /** @type {PackageConfig} */
16529
15899
  const result = {
16530
15900
  exists: false,
16531
15901
  pjsonPath: jsonPath,
@@ -16536,7 +15906,6 @@ function read(jsonPath, { base, specifier }) {
16536
15906
  imports: void 0
16537
15907
  };
16538
15908
  if (string !== void 0) {
16539
- /** @type {Record<string, unknown>} */
16540
15909
  let parsed;
16541
15910
  try {
16542
15911
  parsed = JSON.parse(string);
@@ -16556,10 +15925,6 @@ function read(jsonPath, { base, specifier }) {
16556
15925
  cache.set(jsonPath, result);
16557
15926
  return result;
16558
15927
  }
16559
- /**
16560
- * @param {URL | string} resolved
16561
- * @returns {PackageConfig}
16562
- */
16563
15928
  function getPackageScopeConfig(resolved) {
16564
15929
  let packageJSONUrl = new URL("package.json", resolved);
16565
15930
  while (true) {
@@ -16576,17 +15941,11 @@ function getPackageScopeConfig(resolved) {
16576
15941
  type: "none"
16577
15942
  };
16578
15943
  }
16579
- /**
16580
- * Returns the package type for a given URL.
16581
- * @param {URL} url - The URL to get the package type for.
16582
- * @returns {PackageType}
16583
- */
16584
15944
  function getPackageType(url) {
16585
15945
  return getPackageScopeConfig(url).type;
16586
15946
  }
16587
15947
  const { ERR_UNKNOWN_FILE_EXTENSION } = codes;
16588
15948
  const hasOwnProperty = {}.hasOwnProperty;
16589
- /** @type {Record<string, string>} */
16590
15949
  const extensionFormatMap = {
16591
15950
  __proto__: null,
16592
15951
  ".cjs": "commonjs",
@@ -16594,25 +15953,11 @@ const extensionFormatMap = {
16594
15953
  ".json": "json",
16595
15954
  ".mjs": "module"
16596
15955
  };
16597
- /**
16598
- * @param {string | null} mime
16599
- * @returns {string | null}
16600
- */
16601
15956
  function mimeToFormat(mime) {
16602
15957
  if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) return "module";
16603
15958
  if (mime === "application/json") return "json";
16604
15959
  return null;
16605
15960
  }
16606
- /**
16607
- * @callback ProtocolHandler
16608
- * @param {URL} parsed
16609
- * @param {{parentURL: string, source?: Buffer}} context
16610
- * @param {boolean} ignoreErrors
16611
- * @returns {string | null | void}
16612
- */
16613
- /**
16614
- * @type {Record<string, ProtocolHandler>}
16615
- */
16616
15961
  const protocolHandlers = {
16617
15962
  __proto__: null,
16618
15963
  "data:": getDataProtocolModuleFormat,
@@ -16623,9 +15968,6 @@ const protocolHandlers = {
16623
15968
  return "builtin";
16624
15969
  }
16625
15970
  };
16626
- /**
16627
- * @param {URL} parsed
16628
- */
16629
15971
  function getDataProtocolModuleFormat(parsed) {
16630
15972
  const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [
16631
15973
  null,
@@ -16634,16 +15976,6 @@ function getDataProtocolModuleFormat(parsed) {
16634
15976
  ];
16635
15977
  return mimeToFormat(mime);
16636
15978
  }
16637
- /**
16638
- * Returns the file extension from a URL.
16639
- *
16640
- * Should give similar result to
16641
- * `require('node:path').extname(require('node:url').fileURLToPath(url))`
16642
- * when used with a `file:` URL.
16643
- *
16644
- * @param {URL} url
16645
- * @returns {string}
16646
- */
16647
15979
  function extname$2(url) {
16648
15980
  const pathname = url.pathname;
16649
15981
  let index = pathname.length;
@@ -16654,9 +15986,6 @@ function extname$2(url) {
16654
15986
  }
16655
15987
  return "";
16656
15988
  }
16657
- /**
16658
- * @type {ProtocolHandler}
16659
- */
16660
15989
  function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
16661
15990
  const value = extname$2(url);
16662
15991
  if (value === ".js") {
@@ -16675,11 +16004,6 @@ function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
16675
16004
  throw new ERR_UNKNOWN_FILE_EXTENSION(value, fileURLToPath(url));
16676
16005
  }
16677
16006
  function getHttpProtocolModuleFormat() {}
16678
- /**
16679
- * @param {URL} url
16680
- * @param {{parentURL: string}} context
16681
- * @returns {string | null}
16682
- */
16683
16007
  function defaultGetFormatWithoutErrors(url, context) {
16684
16008
  const protocol = url.protocol;
16685
16009
  if (!hasOwnProperty.call(protocolHandlers, protocol)) return null;
@@ -16687,16 +16011,9 @@ function defaultGetFormatWithoutErrors(url, context) {
16687
16011
  }
16688
16012
  const DEFAULT_CONDITIONS = Object.freeze(["node", "import"]);
16689
16013
  const DEFAULT_CONDITIONS_SET$1 = new Set(DEFAULT_CONDITIONS);
16690
- /**
16691
- * Returns the default conditions for ES module loading, as a Set.
16692
- */
16693
16014
  function getDefaultConditionsSet() {
16694
16015
  return DEFAULT_CONDITIONS_SET$1;
16695
16016
  }
16696
- /**
16697
- * @param {Array<string>} [conditions]
16698
- * @returns {Set<string>}
16699
- */
16700
16017
  function getConditionsSet(conditions) {
16701
16018
  return getDefaultConditionsSet();
16702
16019
  }
@@ -16708,32 +16025,14 @@ const deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o
16708
16025
  const invalidPackageNameRegEx = /^\.|%|\\/;
16709
16026
  const patternRegEx = /\*/g;
16710
16027
  const encodedSeparatorRegEx = /%2f|%5c/i;
16711
- /** @type {Set<string>} */
16712
16028
  const emittedPackageWarnings = /* @__PURE__ */ new Set();
16713
16029
  const doubleSlashRegEx = /[/\\]{2}/;
16714
- /**
16715
- *
16716
- * @param {string} target
16717
- * @param {string} request
16718
- * @param {string} match
16719
- * @param {URL} packageJsonUrl
16720
- * @param {boolean} internal
16721
- * @param {URL} base
16722
- * @param {boolean} isTarget
16723
- */
16724
16030
  function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) {
16725
16031
  if (process$1.noDeprecation) return;
16726
16032
  const pjsonPath = fileURLToPath(packageJsonUrl);
16727
16033
  const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;
16728
16034
  process$1.emitWarning(`Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}.`, "DeprecationWarning", "DEP0166");
16729
16035
  }
16730
- /**
16731
- * @param {URL} url
16732
- * @param {URL} packageJsonUrl
16733
- * @param {URL} base
16734
- * @param {string} [main]
16735
- * @returns {void}
16736
- */
16737
16036
  function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
16738
16037
  if (process$1.noDeprecation) return;
16739
16038
  if (defaultGetFormatWithoutErrors(url, { parentURL: base.href }) !== "module") return;
@@ -16743,39 +16042,17 @@ function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
16743
16042
  if (!main) process$1.emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
16744
16043
  else if (path.resolve(packagePath, main) !== urlPath) process$1.emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
16745
16044
  }
16746
- /**
16747
- * @param {string} path
16748
- * @returns {Stats | undefined}
16749
- */
16750
16045
  function tryStatSync(path) {
16751
16046
  try {
16752
16047
  return statSync(path);
16753
16048
  } catch {}
16754
16049
  }
16755
- /**
16756
- * Legacy CommonJS main resolution:
16757
- * 1. let M = pkg_url + (json main field)
16758
- * 2. TRY(M, M.js, M.json, M.node)
16759
- * 3. TRY(M/index.js, M/index.json, M/index.node)
16760
- * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)
16761
- * 5. NOT_FOUND
16762
- *
16763
- * @param {URL} url
16764
- * @returns {boolean}
16765
- */
16766
16050
  function fileExists(url) {
16767
16051
  const stats = statSync(url, { throwIfNoEntry: false });
16768
16052
  const isFile = stats ? stats.isFile() : void 0;
16769
16053
  return isFile === null || isFile === void 0 ? false : isFile;
16770
16054
  }
16771
- /**
16772
- * @param {URL} packageJsonUrl
16773
- * @param {PackageConfig} packageConfig
16774
- * @param {URL} base
16775
- * @returns {URL}
16776
- */
16777
16055
  function legacyMainResolve(packageJsonUrl, packageConfig, base) {
16778
- /** @type {URL | undefined} */
16779
16056
  let guess;
16780
16057
  if (packageConfig.main !== void 0) {
16781
16058
  guess = new URL(packageConfig.main, packageJsonUrl);
@@ -16816,15 +16093,8 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
16816
16093
  }
16817
16094
  throw new ERR_MODULE_NOT_FOUND(fileURLToPath(new URL(".", packageJsonUrl)), fileURLToPath(base));
16818
16095
  }
16819
- /**
16820
- * @param {URL} resolved
16821
- * @param {URL} base
16822
- * @param {boolean} [preserveSymlinks]
16823
- * @returns {URL}
16824
- */
16825
16096
  function finalizeResolution(resolved, base, preserveSymlinks) {
16826
16097
  if (encodedSeparatorRegEx.exec(resolved.pathname) !== null) throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, "must not include encoded \"/\" or \"\\\" characters", fileURLToPath(base));
16827
- /** @type {string} */
16828
16098
  let filePath;
16829
16099
  try {
16830
16100
  filePath = fileURLToPath(resolved);
@@ -16854,59 +16124,19 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
16854
16124
  }
16855
16125
  return resolved;
16856
16126
  }
16857
- /**
16858
- * @param {string} specifier
16859
- * @param {URL | undefined} packageJsonUrl
16860
- * @param {URL} base
16861
- * @returns {Error}
16862
- */
16863
16127
  function importNotDefined(specifier, packageJsonUrl, base) {
16864
16128
  return new ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier, packageJsonUrl && fileURLToPath(new URL(".", packageJsonUrl)), fileURLToPath(base));
16865
16129
  }
16866
- /**
16867
- * @param {string} subpath
16868
- * @param {URL} packageJsonUrl
16869
- * @param {URL} base
16870
- * @returns {Error}
16871
- */
16872
16130
  function exportsNotFound(subpath, packageJsonUrl, base) {
16873
16131
  return new ERR_PACKAGE_PATH_NOT_EXPORTED(fileURLToPath(new URL(".", packageJsonUrl)), subpath, base && fileURLToPath(base));
16874
16132
  }
16875
- /**
16876
- * @param {string} request
16877
- * @param {string} match
16878
- * @param {URL} packageJsonUrl
16879
- * @param {boolean} internal
16880
- * @param {URL} [base]
16881
- * @returns {never}
16882
- */
16883
16133
  function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {
16884
16134
  throw new ERR_INVALID_MODULE_SPECIFIER(request, `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`, base && fileURLToPath(base));
16885
16135
  }
16886
- /**
16887
- * @param {string} subpath
16888
- * @param {unknown} target
16889
- * @param {URL} packageJsonUrl
16890
- * @param {boolean} internal
16891
- * @param {URL} [base]
16892
- * @returns {Error}
16893
- */
16894
16136
  function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {
16895
16137
  target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`;
16896
16138
  return new ERR_INVALID_PACKAGE_TARGET(fileURLToPath(new URL(".", packageJsonUrl)), subpath, target, internal, base && fileURLToPath(base));
16897
16139
  }
16898
- /**
16899
- * @param {string} target
16900
- * @param {string} subpath
16901
- * @param {string} match
16902
- * @param {URL} packageJsonUrl
16903
- * @param {URL} base
16904
- * @param {boolean} pattern
16905
- * @param {boolean} internal
16906
- * @param {boolean} isPathMap
16907
- * @param {Set<string> | undefined} conditions
16908
- * @returns {URL}
16909
- */
16910
16140
  function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) {
16911
16141
  if (subpath !== "" && !pattern && target[target.length - 1] !== "/") throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);
16912
16142
  if (!target.startsWith("./")) {
@@ -16940,39 +16170,20 @@ function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base
16940
16170
  if (pattern) return new URL(RegExpPrototypeSymbolReplace.call(patternRegEx, resolved.href, () => subpath));
16941
16171
  return new URL(subpath, resolved);
16942
16172
  }
16943
- /**
16944
- * @param {string} key
16945
- * @returns {boolean}
16946
- */
16947
16173
  function isArrayIndex(key) {
16948
16174
  const keyNumber = Number(key);
16949
16175
  if (`${keyNumber}` !== key) return false;
16950
16176
  return keyNumber >= 0 && keyNumber < 4294967295;
16951
16177
  }
16952
- /**
16953
- * @param {URL} packageJsonUrl
16954
- * @param {unknown} target
16955
- * @param {string} subpath
16956
- * @param {string} packageSubpath
16957
- * @param {URL} base
16958
- * @param {boolean} pattern
16959
- * @param {boolean} internal
16960
- * @param {boolean} isPathMap
16961
- * @param {Set<string> | undefined} conditions
16962
- * @returns {URL | null}
16963
- */
16964
16178
  function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) {
16965
16179
  if (typeof target === "string") return resolvePackageTargetString(target, subpath, packageSubpath, packageJsonUrl, base, pattern, internal, isPathMap, conditions);
16966
16180
  if (Array.isArray(target)) {
16967
- /** @type {Array<unknown>} */
16968
16181
  const targetList = target;
16969
16182
  if (targetList.length === 0) return null;
16970
- /** @type {ErrnoException | null | undefined} */
16971
16183
  let lastException;
16972
16184
  let i = -1;
16973
16185
  while (++i < targetList.length) {
16974
16186
  const targetItem = targetList[i];
16975
- /** @type {URL | null} */
16976
16187
  let resolveResult;
16977
16188
  try {
16978
16189
  resolveResult = resolvePackageTarget(packageJsonUrl, targetItem, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions);
@@ -17014,12 +16225,6 @@ function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, b
17014
16225
  if (target === null) return null;
17015
16226
  throw invalidPackageTarget(packageSubpath, target, packageJsonUrl, internal, base);
17016
16227
  }
17017
- /**
17018
- * @param {unknown} exports
17019
- * @param {URL} packageJsonUrl
17020
- * @param {URL} base
17021
- * @returns {boolean}
17022
- */
17023
16228
  function isConditionalExportsMainSugar(exports$1, packageJsonUrl, base) {
17024
16229
  if (typeof exports$1 === "string" || Array.isArray(exports$1)) return true;
17025
16230
  if (typeof exports$1 !== "object" || exports$1 === null) return false;
@@ -17035,11 +16240,6 @@ function isConditionalExportsMainSugar(exports$1, packageJsonUrl, base) {
17035
16240
  }
17036
16241
  return isConditionalSugar;
17037
16242
  }
17038
- /**
17039
- * @param {string} match
17040
- * @param {URL} pjsonUrl
17041
- * @param {URL} base
17042
- */
17043
16243
  function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
17044
16244
  if (process$1.noDeprecation) return;
17045
16245
  const pjsonPath = fileURLToPath(pjsonUrl);
@@ -17047,14 +16247,6 @@ function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
17047
16247
  emittedPackageWarnings.add(pjsonPath + "|" + match);
17048
16248
  process$1.emitWarning(`Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155");
17049
16249
  }
17050
- /**
17051
- * @param {URL} packageJsonUrl
17052
- * @param {string} packageSubpath
17053
- * @param {Record<string, unknown>} packageConfig
17054
- * @param {URL} base
17055
- * @param {Set<string> | undefined} conditions
17056
- * @returns {URL}
17057
- */
17058
16250
  function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) {
17059
16251
  let exports$1 = packageConfig.exports;
17060
16252
  if (isConditionalExportsMainSugar(exports$1, packageJsonUrl, base)) exports$1 = { ".": exports$1 };
@@ -17088,10 +16280,6 @@ function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, ba
17088
16280
  }
17089
16281
  throw exportsNotFound(packageSubpath, packageJsonUrl, base);
17090
16282
  }
17091
- /**
17092
- * @param {string} a
17093
- * @param {string} b
17094
- */
17095
16283
  function patternKeyCompare(a, b) {
17096
16284
  const aPatternIndex = a.indexOf("*");
17097
16285
  const bPatternIndex = b.indexOf("*");
@@ -17105,15 +16293,8 @@ function patternKeyCompare(a, b) {
17105
16293
  if (b.length > a.length) return 1;
17106
16294
  return 0;
17107
16295
  }
17108
- /**
17109
- * @param {string} name
17110
- * @param {URL} base
17111
- * @param {Set<string>} [conditions]
17112
- * @returns {URL}
17113
- */
17114
16296
  function packageImportsResolve(name, base, conditions) {
17115
16297
  if (name === "#" || name.startsWith("#/") || name.endsWith("/")) throw new ERR_INVALID_MODULE_SPECIFIER(name, "is not a valid internal imports specifier name", fileURLToPath(base));
17116
- /** @type {URL | undefined} */
17117
16298
  let packageJsonUrl;
17118
16299
  const packageConfig = getPackageScopeConfig(base);
17119
16300
  if (packageConfig.exists) {
@@ -17147,10 +16328,6 @@ function packageImportsResolve(name, base, conditions) {
17147
16328
  }
17148
16329
  throw importNotDefined(name, packageJsonUrl, base);
17149
16330
  }
17150
- /**
17151
- * @param {string} specifier
17152
- * @param {URL} base
17153
- */
17154
16331
  function parsePackageName(specifier, base) {
17155
16332
  let separatorIndex = specifier.indexOf("/");
17156
16333
  let validPackageName = true;
@@ -17169,24 +16346,16 @@ function parsePackageName(specifier, base) {
17169
16346
  isScoped
17170
16347
  };
17171
16348
  }
17172
- /**
17173
- * @param {string} specifier
17174
- * @param {URL} base
17175
- * @param {Set<string> | undefined} conditions
17176
- * @returns {URL}
17177
- */
17178
16349
  function packageResolve(specifier, base, conditions) {
17179
16350
  if (builtinModules.includes(specifier)) return new URL("node:" + specifier);
17180
16351
  const { packageName, packageSubpath, isScoped } = parsePackageName(specifier, base);
17181
16352
  const packageConfig = getPackageScopeConfig(base);
17182
- /* c8 ignore next 16 */
17183
16353
  if (packageConfig.exists) {
17184
16354
  const packageJsonUrl = pathToFileURL(packageConfig.pjsonPath);
17185
16355
  if (packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions);
17186
16356
  }
17187
16357
  let packageJsonUrl = new URL("./node_modules/" + packageName + "/package.json", base);
17188
16358
  let packageJsonPath = fileURLToPath(packageJsonUrl);
17189
- /** @type {string} */
17190
16359
  let lastPath;
17191
16360
  do {
17192
16361
  const stat = tryStatSync(packageJsonPath.slice(0, -13));
@@ -17206,10 +16375,6 @@ function packageResolve(specifier, base, conditions) {
17206
16375
  } while (packageJsonPath.length !== lastPath.length);
17207
16376
  throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), false);
17208
16377
  }
17209
- /**
17210
- * @param {string} specifier
17211
- * @returns {boolean}
17212
- */
17213
16378
  function isRelativeSpecifier(specifier) {
17214
16379
  if (specifier[0] === ".") {
17215
16380
  if (specifier.length === 1 || specifier[1] === "/") return true;
@@ -17217,35 +16382,15 @@ function isRelativeSpecifier(specifier) {
17217
16382
  }
17218
16383
  return false;
17219
16384
  }
17220
- /**
17221
- * @param {string} specifier
17222
- * @returns {boolean}
17223
- */
17224
16385
  function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {
17225
16386
  if (specifier === "") return false;
17226
16387
  if (specifier[0] === "/") return true;
17227
16388
  return isRelativeSpecifier(specifier);
17228
16389
  }
17229
- /**
17230
- * The “Resolver Algorithm Specification” as detailed in the Node docs (which is
17231
- * sync and slightly lower-level than `resolve`).
17232
- *
17233
- * @param {string} specifier
17234
- * `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.
17235
- * @param {URL} base
17236
- * Full URL (to a file) that `specifier` is resolved relative from.
17237
- * @param {Set<string>} [conditions]
17238
- * Conditions.
17239
- * @param {boolean} [preserveSymlinks]
17240
- * Keep symlinks instead of resolving them.
17241
- * @returns {URL}
17242
- * A URL object to the found thing.
17243
- */
17244
16390
  function moduleResolve(specifier, base, conditions, preserveSymlinks) {
17245
16391
  if (conditions === void 0) conditions = getConditionsSet();
17246
16392
  const protocol = base.protocol;
17247
16393
  const isRemote = protocol === "data:" || protocol === "http:" || protocol === "https:";
17248
- /** @type {URL | undefined} */
17249
16394
  let resolved;
17250
16395
  if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) try {
17251
16396
  resolved = new URL(specifier, base);
@@ -17463,7 +16608,11 @@ function _extractExtraNames(extraNamesStr) {
17463
16608
  angleDepth++;
17464
16609
  continue;
17465
16610
  }
17466
- if (inTypeAnnotation && char === ">" && angleDepth > 0) {
16611
+ if (!inTypeAnnotation && char === "<" && depth === 0 && i > 0 && _isIdentifierBeforeAngleBracket(extraNamesStr, i)) {
16612
+ angleDepth++;
16613
+ continue;
16614
+ }
16615
+ if (char === ">" && angleDepth > 0 && extraNamesStr[i - 1] !== "=") {
17467
16616
  angleDepth--;
17468
16617
  continue;
17469
16618
  }
@@ -17584,6 +16733,12 @@ function _getLocations(code, label) {
17584
16733
  });
17585
16734
  return locations;
17586
16735
  }
16736
+ function _isIdentifierBeforeAngleBracket(str, i) {
16737
+ let j = i - 1;
16738
+ while (j >= 0 && /[A-Za-z0-9_$]/.test(str[j])) j--;
16739
+ const wordStart = j + 1;
16740
+ return wordStart < i && /[A-Za-z_$]/.test(str[wordStart]);
16741
+ }
17587
16742
  const ESM_RE = /(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m;
17588
16743
  const CJS_RE = /(?:[\s;]|^)(?:module\.exports\b|exports\.\w|require\s*\(|global\.\w)/m;
17589
16744
  const COMMENT_RE = /\/\*.+?\*\/|\/\/.*(?=[nr])/g;
@@ -17605,8 +16760,6 @@ function detectSyntax(code, opts = {}) {
17605
16760
  isMixed: hasESM && hasCJS
17606
16761
  };
17607
16762
  }
17608
- //#endregion
17609
- //#region node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/utils.mjs
17610
16763
  const pathSeparators = /* @__PURE__ */ new Set([
17611
16764
  "/",
17612
16765
  "\\",
@@ -17642,8 +16795,6 @@ function hasTrailingSlash(path = "/") {
17642
16795
  const lastChar = path[path.length - 1];
17643
16796
  return lastChar === "/" || lastChar === "\\";
17644
16797
  }
17645
- //#endregion
17646
- //#region node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs
17647
16798
  function getType(val) {
17648
16799
  const type = typeof val;
17649
16800
  if (type === "undefined" || val === null) return;
@@ -17687,8 +16838,6 @@ function normalizeTypes(val) {
17687
16838
  if (arr.length === 0 || arr.includes("any")) return;
17688
16839
  return arr.length > 1 ? arr : arr[0];
17689
16840
  }
17690
- //#endregion
17691
- //#region node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs
17692
16841
  async function resolveSchema(obj, defaults, options = {}) {
17693
16842
  return await _resolveSchema(obj, "", {
17694
16843
  root: obj,
@@ -17754,8 +16903,6 @@ function normalizeSchema(schema, options) {
17754
16903
  schema.default = Object.fromEntries(propsWithDefaults);
17755
16904
  }
17756
16905
  }
17757
- //#endregion
17758
- //#region node_modules/.pnpm/knitwork@1.3.0/node_modules/knitwork/dist/index.mjs
17759
16906
  function genString(input, options = {}) {
17760
16907
  const str = JSON.stringify(input);
17761
16908
  if (!options.singleQuotes) return str;
@@ -17876,8 +17023,6 @@ function genRawValue(value, indent = "", options = {}) {
17876
17023
  if (options.preserveTypes && typeof value !== "function") return JSON.stringify(value);
17877
17024
  return value.toString();
17878
17025
  }
17879
- //#endregion
17880
- //#region node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/index.mjs
17881
17026
  const GenerateTypesDefaults = {
17882
17027
  interfaceName: "Untyped",
17883
17028
  addExport: true,
@@ -18028,8 +17173,6 @@ function isRequired(schema, key, opts) {
18028
17173
  if (Array.isArray(schema.required) && schema.required.includes(key)) return true;
18029
17174
  return !opts.partial;
18030
17175
  }
18031
- //#endregion
18032
- //#region node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
18033
17176
  var comma = ",".charCodeAt(0);
18034
17177
  var semicolon = ";".charCodeAt(0);
18035
17178
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -18193,8 +17336,6 @@ function encode(decoded) {
18193
17336
  }
18194
17337
  return writer.flush();
18195
17338
  }
18196
- //#endregion
18197
- //#region node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs
18198
17339
  var BitSet = class BitSet {
18199
17340
  constructor(arg) {
18200
17341
  this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
@@ -19128,8 +18269,6 @@ var MagicString = class MagicString {
19128
18269
  return this._replaceRegexp(searchValue, replacement);
19129
18270
  }
19130
18271
  };
19131
- //#endregion
19132
- //#region node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.mjs
19133
18272
  var import_js_tokens = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin(((exports, module) => {
19134
18273
  var HashbangComment, Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
19135
18274
  Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;
@@ -19549,31 +18688,34 @@ function stripLiteral(code, options) {
19549
18688
  for (const token of (0, import_js_tokens.default)(code, { jsx: false })) result += stripLiteralFromToken(token, _options.fillChar, _options.filter);
19550
18689
  return result;
19551
18690
  }
19552
- //#endregion
19553
- //#region node_modules/.pnpm/unimport@6.0.1/node_modules/unimport/dist/shared/unimport.CWY7iHFZ.mjs
19554
- const excludeRE = [
18691
+ const RE_EXCLUDE = [
19555
18692
  /\b(import|export)\b([\w$*{},\s]+?)\bfrom\s*["']/g,
19556
18693
  /\bfunction\s*([\w$]+)\s*\(/g,
19557
18694
  /\bclass\s*([\w$]+)\s*\{/g,
19558
- /\b(?:const|let|var)\s+?(\[.*?\]|\{.*?\}|.+?)\s*?[=;\n]/gs
18695
+ /\b(?:const|let|var)\s+?(\[.*?\]|\{.*?\}|.+?)\s*?(?:[=;\n]|\bof\b|\bin\b)/gs
19559
18696
  ];
19560
- const importAsRE = /^.*\sas\s+/;
19561
- const separatorRE = /[,[\]{}\n]|\b(?:import|export)\b/g;
19562
- const matchRE = /(^|\.\.\.|(?:\bcase|\?)\s+|[^\w$/)]|\bextends\s+)([\w$]+)\s*(?=[.()[\]}:;?+\-*&|`<>,\n]|\b(?:instanceof|in)\b|$|(?<=extends\s+\w+)\s+\{)/g;
19563
- const regexRE = /\/\S*?(?<!\\)(?<!\[[^\]]*)\/[gimsuy]*/g;
18697
+ const RE_IMPORT_AS = /^.*\sas\s+/;
18698
+ const RE_SEPARATOR = /[,[\]{}\n]|\b(?:import|export)\b/g;
18699
+ const RE_MATCH = /(^|\.\.\.|(?:\bcase|\?)\s+|[^\w$/)]|\bextends\s+)([\w$]+)\s*(?=[.()[\]}:;?+\-*&|`<>,\n]|\b(?:instanceof|in)\b|$|(?<=extends\s+\w+)\s+\{)/g;
18700
+ const RE_REGEX = /\/\S*?(?<!\\)(?<!\[[^\]]*)\/[gimsuy]*/g;
19564
18701
  function stripCommentsAndStrings(code, options) {
19565
- return stripLiteral(code, options).replace(regexRE, "new RegExp(\"\")");
18702
+ return stripLiteral(code, options).replace(RE_REGEX, "new RegExp(\"\")");
19566
18703
  }
19567
18704
  function defineUnimportPreset(preset) {
19568
18705
  return preset;
19569
18706
  }
19570
- const identifierRE = /^[A-Z_$][\w$]*$/i;
19571
- const safePropertyName = /^[a-z$_][\w$]*$/i;
18707
+ const RE_IDENTIFIER = /^[A-Z_$][\w$]*$/i;
18708
+ const RE_SAFE_PROPERTY_NAME = /^[a-z$_][\w$]*$/i;
18709
+ const RE_FILE_EXT$1 = /\.[a-z]+$/i;
18710
+ const RE_RELATIVE_PATH = /^[./]/;
18711
+ const RE_DTS_EXT$1 = /\.d\.([cm]?)ts$/i;
18712
+ const RE_SHEBANG = /^#!.+/;
18713
+ const RE_IMPORT_BRACE = /^\s*import\s*\{/;
19572
18714
  function stringifyWith(withValues) {
19573
18715
  let withDefs = "";
19574
18716
  for (let entries = Object.entries(withValues), l = entries.length, i = 0; i < l; i++) {
19575
18717
  const [prop, value] = entries[i];
19576
- withDefs += safePropertyName.test(prop) ? prop : JSON.stringify(prop);
18718
+ withDefs += RE_SAFE_PROPERTY_NAME.test(prop) ? prop : JSON.stringify(prop);
19577
18719
  withDefs += `: ${JSON.stringify(String(value))}`;
19578
18720
  if (i + 1 !== l) withDefs += ", ";
19579
18721
  }
@@ -19627,37 +18769,62 @@ function stringifyImports(imports, isCJS = false) {
19627
18769
  return entries;
19628
18770
  }).join("\n");
19629
18771
  }
18772
+ function encodeImportName(name) {
18773
+ return `\uFFFF${name}\uFFFE`;
18774
+ }
19630
18775
  function dedupeImports(imports, warn) {
19631
- const map = /* @__PURE__ */ new Map();
19632
- const indexToRemove = /* @__PURE__ */ new Set();
19633
- imports.filter((i) => !i.disabled).forEach((i, idx) => {
19634
- if (i.declarationType === "enum" || i.declarationType === "const enum" || i.declarationType === "class") return;
19635
- const name = i.as ?? i.name;
19636
- if (!map.has(name)) {
19637
- map.set(name, idx);
19638
- return;
18776
+ const deduped = /* @__PURE__ */ new Map();
18777
+ for (let idx = imports.length - 1; idx >= 0; idx--) {
18778
+ const currImp = imports[idx];
18779
+ if (currImp.disabled || currImp.declarationType === "enum" || currImp.declarationType === "const enum" || currImp.declarationType === "class") {
18780
+ deduped.set(idx, currImp);
18781
+ continue;
19639
18782
  }
19640
- const other = imports[map.get(name)];
19641
- if (other.from === i.from) {
19642
- indexToRemove.add(idx);
19643
- return;
18783
+ const name = String(currImp.as ?? currImp.name);
18784
+ const prevImp = deduped.get(name);
18785
+ if (!prevImp) {
18786
+ deduped.set(name, currImp);
18787
+ continue;
19644
18788
  }
19645
- const diff = (other.priority || 1) - (i.priority || 1);
19646
- if (diff === 0) warn(`Duplicated imports "${name}", the one from "${other.from}" has been ignored and "${i.from}" is used`);
19647
- if (diff <= 0) {
19648
- indexToRemove.add(map.get(name));
19649
- map.set(name, idx);
19650
- } else indexToRemove.add(idx);
19651
- });
19652
- return imports.filter((_, idx) => !indexToRemove.has(idx));
18789
+ if (currImp.type || prevImp.type ? (currImp.typeFrom || currImp.from) === (prevImp.typeFrom || prevImp.from) : currImp.from === prevImp.from) {
18790
+ if (Boolean(currImp.type) === Boolean(prevImp.type)) {
18791
+ if ((currImp.priority ?? 1) > (prevImp.priority ?? 1)) {
18792
+ deduped.delete(name);
18793
+ deduped.set(name, currImp);
18794
+ }
18795
+ } else {
18796
+ const altName2 = encodeImportName(name);
18797
+ const prevImpComplement2 = deduped.get(altName2);
18798
+ if (!prevImpComplement2) deduped.set(altName2, currImp);
18799
+ else if ((currImp.priority ?? 1) > (prevImpComplement2.priority ?? 1)) {
18800
+ deduped.delete(altName2);
18801
+ deduped.set(altName2, currImp);
18802
+ }
18803
+ }
18804
+ continue;
18805
+ }
18806
+ const altName = encodeImportName(name);
18807
+ const prevImpComplement = deduped.get(altName);
18808
+ const prevPriority = prevImpComplement ? Math.max(prevImp.priority ?? 1, prevImpComplement.priority ?? 1) : prevImp.priority ?? 1;
18809
+ const priorityDiff = (currImp.priority ?? 1) - prevPriority;
18810
+ if (priorityDiff > 0) {
18811
+ deduped.delete(name);
18812
+ deduped.delete(altName);
18813
+ deduped.set(name, currImp);
18814
+ } else if (priorityDiff === 0) warn(`Duplicated imports "${name}", the one from "${currImp.from}" has been ignored and "${prevImp.from}" is used`);
18815
+ }
18816
+ let i = deduped.size;
18817
+ const dedupedImports = new Array(i);
18818
+ for (const imp of deduped.values()) dedupedImports[--i] = imp;
18819
+ return dedupedImports;
19653
18820
  }
19654
18821
  function toExports(imports, fileDir, includeType = false, options = {}) {
19655
18822
  const map = toImportModuleMap(imports, includeType, options);
19656
18823
  return Object.entries(map).flatMap(([name, imports2]) => {
19657
- if (isFilePath(name)) name = name.replace(/\.[a-z]+$/i, "");
18824
+ if (isFilePath(name)) name = name.replace(RE_FILE_EXT$1, "");
19658
18825
  if (fileDir && isAbsolute$2(name)) {
19659
18826
  name = relative$2(fileDir, name);
19660
- if (!name.match(/^[./]/)) name = `./${name}`;
18827
+ if (!RE_RELATIVE_PATH.test(name)) name = `./${name}`;
19661
18828
  }
19662
18829
  const entries = [];
19663
18830
  const filtered = Array.from(imports2).filter((i) => {
@@ -19667,12 +18834,19 @@ function toExports(imports, fileDir, includeType = false, options = {}) {
19667
18834
  }
19668
18835
  return true;
19669
18836
  });
19670
- if (filtered.length) entries.push(`export { ${filtered.map((i) => stringifyImportAlias(i, false)).join(", ")} } from '${name}';`);
18837
+ const byAlias = /* @__PURE__ */ new Map();
18838
+ for (const i of filtered) {
18839
+ const key = String(i.as ?? i.name);
18840
+ const existing = byAlias.get(key);
18841
+ if (!existing || existing.type && !i.type) byAlias.set(key, i);
18842
+ }
18843
+ const deduped = Array.from(byAlias.values());
18844
+ if (deduped.length) entries.push(`export { ${deduped.map((i) => stringifyImportAlias(i, false)).join(", ")} } from '${name}';`);
19671
18845
  return entries;
19672
18846
  }).join("\n");
19673
18847
  }
19674
18848
  function stripFileExtension(path) {
19675
- return path.replace(/\.[a-z]+$/i, "");
18849
+ return path.replace(RE_FILE_EXT$1, "");
19676
18850
  }
19677
18851
  function toTypeDeclarationItems(imports, options) {
19678
18852
  return imports.map((i) => {
@@ -19680,7 +18854,7 @@ function toTypeDeclarationItems(imports, options) {
19680
18854
  let typeDef = "";
19681
18855
  if (i.with) typeDef += `import('${from}', { with: ${stringifyWith(i.with)} })`;
19682
18856
  else typeDef += `import('${from}')`;
19683
- if (i.name !== "*" && i.name !== "=") typeDef += identifierRE.test(i.name) ? `.${i.name}` : `['${i.name}']`;
18857
+ if (i.name !== "*" && i.name !== "=") typeDef += RE_IDENTIFIER.test(i.name) ? `.${i.name}` : `['${i.name}']`;
19684
18858
  return `const ${i.as}: typeof ${typeDef}`;
19685
18859
  }).sort();
19686
18860
  }
@@ -19720,7 +18894,7 @@ function toTypeReExports(imports, options) {
19720
18894
  return `// for type re-export
19721
18895
  declare global {
19722
18896
  ${Array.from(importsMap).flatMap(([from, module]) => {
19723
- from = from.replace(/\.d\.([cm]?)ts$/i, ".$1js");
18897
+ from = from.replace(RE_DTS_EXT$1, ".$1js");
19724
18898
  const { starTypeImport, typeImports } = module;
19725
18899
  const strings = [];
19726
18900
  if (typeImports.size) {
@@ -19763,7 +18937,7 @@ function addImportToCode(code, imports, isCJS = false, mergeExisting = false, in
19763
18937
  return _staticImports;
19764
18938
  }
19765
18939
  function hasShebang() {
19766
- return /^#!.+/.test(s.original);
18940
+ return RE_SHEBANG.test(s.original);
19767
18941
  }
19768
18942
  if (mergeExisting && !isCJS) {
19769
18943
  const existingImports = findStaticImportsLazy();
@@ -19776,7 +18950,7 @@ function addImportToCode(code, imports, isCJS = false, mergeExisting = false, in
19776
18950
  });
19777
18951
  for (const [target, items] of map.entries()) {
19778
18952
  const strings = items.map((i) => `${stringifyImportAlias(i)}, `);
19779
- const importLength = target.code.match(/^\s*import\s*\{/)?.[0]?.length;
18953
+ const importLength = target.code.match(RE_IMPORT_BRACE)?.[0]?.length;
19780
18954
  if (importLength) s.appendLeft(target.start + importLength, ` ${strings.join("").trim()}`);
19781
18955
  }
19782
18956
  } else newImports = imports;
@@ -19808,7 +18982,7 @@ function normalizeImports(imports) {
19808
18982
  function isFilePath(path) {
19809
18983
  return path.startsWith(".") || isAbsolute$2(path) || path.includes("://");
19810
18984
  }
19811
- const contextRE$1 = /\b_ctx\.([$\w]+)\b/g;
18985
+ const RE_CONTEXT$1 = /\b_ctx\.([$\w]+)\b/g;
19812
18986
  const UNREF_KEY = "__unimport_unref_";
19813
18987
  const VUE_TEMPLATE_NAME = "unimport:vue-template";
19814
18988
  function vueTemplateAddon() {
@@ -19816,7 +18990,7 @@ function vueTemplateAddon() {
19816
18990
  name: VUE_TEMPLATE_NAME,
19817
18991
  async transform(s, id) {
19818
18992
  if (!s.original.includes("_ctx.") || s.original.includes(UNREF_KEY)) return s;
19819
- const matches = Array.from(s.original.matchAll(contextRE$1));
18993
+ const matches = Array.from(s.original.matchAll(RE_CONTEXT$1));
19820
18994
  const imports = await this.getImports();
19821
18995
  let targets = [];
19822
18996
  for (const match of matches) {
@@ -19827,7 +19001,7 @@ function vueTemplateAddon() {
19827
19001
  const end = start + match[0].length;
19828
19002
  const tempName = `__unimport_${name}`;
19829
19003
  s.overwrite(start, end, `(${JSON.stringify(name)} in _ctx ? _ctx.${name} : ${UNREF_KEY}(${tempName}))`);
19830
- if (!targets.find((i) => i.as === tempName)) targets.push({
19004
+ if (!targets.some((i) => i.as === tempName)) targets.push({
19831
19005
  ...item,
19832
19006
  as: tempName
19833
19007
  });
@@ -19868,9 +19042,10 @@ ${(await this.getImports()).map((i) => {
19868
19042
  };
19869
19043
  return self;
19870
19044
  }
19871
- const contextRE = /resolveDirective as _resolveDirective/;
19872
- const contextText = `${contextRE.source}, `;
19873
- const directiveRE = /(?:var|const) (\w+) = _resolveDirective\("([\w.-]+)"\);?\s*/g;
19045
+ const RE_BACKSLASH = /\\/g;
19046
+ const RE_CONTEXT = /resolveDirective as _resolveDirective/;
19047
+ const contextText = `${RE_CONTEXT.source}, `;
19048
+ const RE_DIRECTIVE = /(?:var|const) (\w+) = _resolveDirective\("([\w.-]+)"\);?\s*/g;
19874
19049
  const VUE_DIRECTIVES_NAME = "unimport:vue-directives";
19875
19050
  function vueDirectivesAddon(options = {}) {
19876
19051
  function isDirective(importEntry) {
@@ -19886,8 +19061,8 @@ function vueDirectivesAddon(options = {}) {
19886
19061
  const self = {
19887
19062
  name: VUE_DIRECTIVES_NAME,
19888
19063
  async transform(s, id) {
19889
- if (!s.original.match(contextRE)) return s;
19890
- const matches = Array.from(s.original.matchAll(directiveRE)).sort((a, b) => b.index - a.index);
19064
+ if (!RE_CONTEXT.test(s.original)) return s;
19065
+ const matches = Array.from(s.original.matchAll(RE_DIRECTIVE)).sort((a, b) => b.index - a.index);
19891
19066
  if (!matches.length) return s;
19892
19067
  let targets = [];
19893
19068
  for await (const [begin, end, importEntry] of findDirectives(isDirective, matches, this.getImports())) {
@@ -19895,7 +19070,7 @@ function vueDirectivesAddon(options = {}) {
19895
19070
  targets.push(importEntry);
19896
19071
  }
19897
19072
  if (!targets.length) return s;
19898
- if (!s.toString().match(directiveRE)) s.replace(contextText, "");
19073
+ if (!RE_DIRECTIVE.test(s.toString())) s.replace(contextText, "");
19899
19074
  for (const addon of this.addons) {
19900
19075
  if (addon === self) continue;
19901
19076
  targets = await addon.injectImportsResolved?.call(this, targets, s, id) ?? targets;
@@ -19939,7 +19114,7 @@ function resolvePath(cwd, path) {
19939
19114
  return path[0] === "." ? resolve$3(cwd, path) : path;
19940
19115
  }
19941
19116
  function normalizePath$1(cwd, path) {
19942
- return resolvePath(cwd, path).replace(/\\/g, "/");
19117
+ return resolvePath(cwd, path).replace(RE_BACKSLASH, "/");
19943
19118
  }
19944
19119
  async function* findDirectives(isDirective, regexArray, importsPromise) {
19945
19120
  const imports = (await importsPromise).filter(isDirective);
@@ -19991,8 +19166,6 @@ function* findDirective(imports, symbol, [begin, end, importName]) {
19991
19166
  }
19992
19167
  }
19993
19168
  }
19994
- //#endregion
19995
- //#region node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/index.mjs
19996
19169
  const GET_IS_ASYNC = Symbol.for("quansync.getIsAsync");
19997
19170
  var QuansyncError = class extends Error {
19998
19171
  constructor(message = "Unexpected promise in sync context") {
@@ -20075,11 +19248,7 @@ quansync$1({
20075
19248
  async: () => Promise.resolve(true),
20076
19249
  sync: () => false
20077
19250
  });
20078
- //#endregion
20079
- //#region node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/macro.mjs
20080
19251
  const quansync = quansync$1;
20081
- //#endregion
20082
- //#region node_modules/.pnpm/local-pkg@1.1.2/node_modules/local-pkg/dist/index.mjs
20083
19252
  const toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
20084
19253
  async function findUp$1(name, { cwd = process$1.cwd(), type = "file", stopAt } = {}) {
20085
19254
  let directory = path.resolve(toPath(cwd) ?? "");
@@ -20190,9 +19359,7 @@ quansync(function* (name, cwd) {
20190
19359
  const pkg = (yield loadPackageJSON(cwd)) || {};
20191
19360
  return name in (pkg.dependencies || {}) || name in (pkg.devDependencies || {});
20192
19361
  }).sync;
20193
- //#endregion
20194
- //#region node_modules/.pnpm/unimport@6.0.1/node_modules/unimport/dist/shared/unimport.Cyews8CQ.mjs
20195
- const version$1 = "6.0.1";
19362
+ const version$1 = "6.2.0";
20196
19363
  function configureAddons(opts) {
20197
19364
  const addons = [];
20198
19365
  if (Array.isArray(opts.addons)) addons.push(...opts.addons);
@@ -20225,7 +19392,7 @@ async function detectImportsRegex(code, ctx, options) {
20225
19392
  const occurrenceMap = /* @__PURE__ */ new Map();
20226
19393
  const map = await ctx.getImportMap();
20227
19394
  if (options?.autoImport !== false) {
20228
- Array.from(strippedCode.matchAll(matchRE)).forEach((i) => {
19395
+ Array.from(strippedCode.matchAll(RE_MATCH)).forEach((i) => {
20229
19396
  if (i[1] === ".") return null;
20230
19397
  const end = strippedCode[i.index + i[0].length];
20231
19398
  const before = strippedCode[i.index - 1];
@@ -20234,10 +19401,10 @@ async function detectImportsRegex(code, ctx, options) {
20234
19401
  const occurrence = i.index + i[1].length;
20235
19402
  if (occurrenceMap.get(name) || Number.POSITIVE_INFINITY > occurrence) occurrenceMap.set(name, occurrence);
20236
19403
  });
20237
- for (const regex of excludeRE) for (const match of strippedCode.matchAll(regex)) {
20238
- const segments = [...match[1]?.split(separatorRE) || [], ...match[2]?.split(separatorRE) || []];
19404
+ for (const regex of RE_EXCLUDE) for (const match of strippedCode.matchAll(regex)) {
19405
+ const segments = [...match[1]?.split(RE_SEPARATOR) || [], ...match[2]?.split(RE_SEPARATOR) || []];
20239
19406
  for (const segment of segments) {
20240
- const identifier = segment.replace(importAsRE, "").trim();
19407
+ const identifier = segment.replace(RE_IMPORT_AS, "").trim();
20241
19408
  occurrenceMap.delete(identifier);
20242
19409
  }
20243
19410
  }
@@ -20287,8 +19454,11 @@ function parseVirtualImportsRegex(strippedCode, importMap, virtualImports) {
20287
19454
  };
20288
19455
  }
20289
19456
  async function detectImports(code, ctx, options) {
20290
- if (options?.parser === "acorn") return import("../_libs/_6.mjs").then((r) => r.detectImportsAcorn(code, ctx, options));
20291
- return detectImportsRegex(code, ctx, options);
19457
+ switch (options?.parser) {
19458
+ case "acorn": return import("../_libs/unimport+unplugin+oxc-parser.mjs").then((n) => n.r).then((r) => r.detectImportsAcorn(code, ctx, options));
19459
+ case "oxc": return import("../_libs/unimport+unplugin+oxc-parser.mjs").then((n) => n.n).then((r) => r.detectImportsOxc(code, ctx, options));
19460
+ default: return detectImportsRegex(code, ctx, options);
19461
+ }
20292
19462
  }
20293
19463
  const JS_RESERVED_WORDS = /* @__PURE__ */ new Set([
20294
19464
  "abstract",
@@ -20355,8 +19525,12 @@ const FileExtensionLookup = [
20355
19525
  "jsx"
20356
19526
  ];
20357
19527
  const FileLookupPatterns = `*.{${FileExtensionLookup.join(",")}}`;
19528
+ const RE_EXCLAMATION_PREFIX = /^!/;
19529
+ const RE_FILE_EXT = /\.\w+$/;
19530
+ const RE_NAME_SEPARATOR = /[-_.]/;
19531
+ const RE_DTS_EXT = /\.d\.[mc]?ts$/;
20358
19532
  function resolveGlobsExclude(glob2, cwd) {
20359
- return `${glob2.startsWith("!") ? "!" : ""}${resolve$3(cwd, glob2.replace(/^!/, ""))}`;
19533
+ return `${glob2.startsWith("!") ? "!" : ""}${resolve$3(cwd, glob2.replace(RE_EXCLAMATION_PREFIX, ""))}`;
20360
19534
  }
20361
19535
  function joinGlobFilePattern(glob2, filePattern) {
20362
19536
  return join$2(basename$2(glob2) === "*" ? dirname$2(glob2) : glob2, filePattern);
@@ -20369,7 +19543,7 @@ function normalizeScanDirs(dirs, options) {
20369
19543
  const isString = typeof dir === "string";
20370
19544
  const glob2 = resolveGlobsExclude(isString ? dir : dir.glob, cwd);
20371
19545
  const types = isString ? topLevelTypes : dir.types ?? topLevelTypes;
20372
- if (glob2.match(/\.\w+$/)) return {
19546
+ if (RE_FILE_EXT.test(glob2)) return {
20373
19547
  glob: glob2,
20374
19548
  types
20375
19549
  };
@@ -20412,7 +19586,7 @@ function dedupeDtsExports(exports) {
20412
19586
  return exports.filter((i) => {
20413
19587
  if (!i.type) return true;
20414
19588
  if (i.declarationType === "enum" || i.declarationType === "const enum" || i.declarationType === "class") return true;
20415
- return !exports.find((e) => e.as === i.as && e.name === i.name && !e.type);
19589
+ return !exports.some((e) => e.as === i.as && e.name === i.name && !e.type);
20416
19590
  });
20417
19591
  }
20418
19592
  async function scanExports(filepath, includeTypes, seen = /* @__PURE__ */ new Set()) {
@@ -20427,7 +19601,7 @@ async function scanExports(filepath, includeTypes, seen = /* @__PURE__ */ new Se
20427
19601
  if (exports.find((i) => i.type === "default")) {
20428
19602
  let name = parse$1(filepath).name;
20429
19603
  if (name === "index") name = parse$1(filepath.split("/").slice(0, -1).join("/")).name;
20430
- const as = /[-_.]/.test(name) ? camelCase(name) : name;
19604
+ const as = RE_NAME_SEPARATOR.test(name) ? camelCase(name) : name;
20431
19605
  imports.push({
20432
19606
  name: "default",
20433
19607
  as,
@@ -20492,7 +19666,7 @@ async function scanExports(filepath, includeTypes, seen = /* @__PURE__ */ new Se
20492
19666
  })) : nested);
20493
19667
  }
20494
19668
  }
20495
- if (filepath.match(/\.d\.[mc]?ts$/)) {
19669
+ if (filepath.match(RE_DTS_EXT)) {
20496
19670
  if (includeTypes) {
20497
19671
  await toImport(exports, { type: true });
20498
19672
  await toImport(findTypeExports(code), { type: true });
@@ -21291,27 +20465,13 @@ const vueuseCore = () => {
21291
20465
  }
21292
20466
  return _cache;
21293
20467
  };
21294
- const vueuseHead = defineUnimportPreset({
21295
- from: "@vueuse/head",
21296
- imports: ["useHead"]
21297
- });
21298
- const vuex = defineUnimportPreset({
21299
- from: "vuex",
21300
- imports: [
21301
- "createStore",
21302
- "createLogger",
21303
- "mapState",
21304
- "mapGetters",
21305
- "mapActions",
21306
- "mapMutations",
21307
- "createNamespacedHelpers",
21308
- "useStore"
21309
- ]
21310
- });
21311
20468
  const builtinPresets = {
21312
20469
  "@vue/composition-api": vueCompositionApi,
21313
20470
  "@vueuse/core": vueuseCore,
21314
- "@vueuse/head": vueuseHead,
20471
+ "@vueuse/head": defineUnimportPreset({
20472
+ from: "@vueuse/head",
20473
+ imports: ["useHead"]
20474
+ }),
21315
20475
  "pinia": pinia,
21316
20476
  "preact": preact,
21317
20477
  "quasar": quasar,
@@ -21332,7 +20492,19 @@ const builtinPresets = {
21332
20492
  "vue-router-composables": vueRouterComposables,
21333
20493
  "vue": vue,
21334
20494
  "vue/macros": vueMacros,
21335
- "vuex": vuex,
20495
+ "vuex": defineUnimportPreset({
20496
+ from: "vuex",
20497
+ imports: [
20498
+ "createStore",
20499
+ "createLogger",
20500
+ "mapState",
20501
+ "mapGetters",
20502
+ "mapActions",
20503
+ "mapMutations",
20504
+ "createNamespacedHelpers",
20505
+ "useStore"
20506
+ ]
20507
+ }),
21336
20508
  "vitest": vitest,
21337
20509
  "uni-app": uniApp,
21338
20510
  "solid-js": solid,
@@ -21455,14 +20627,18 @@ function createInternalContext(opts) {
21455
20627
  opts.commentsDisable = opts.commentsDisable ?? ["@unimport-disable", "@imports-disable"];
21456
20628
  opts.commentsDebug = opts.commentsDebug ?? ["@unimport-debug", "@imports-debug"];
21457
20629
  let metadata;
21458
- if (opts.collectMeta) metadata = {
21459
- injectionsUsageMap: /* @__PURE__ */ new Map(),
21460
- get injectionUsage() {
21461
- const stack = (/* @__PURE__ */ new Error()).stack;
21462
- console.warn("[unimport] `injectionUsage` is deprecated, use `injectionsUsageMap` instead", stack);
21463
- return Object.fromEntries(this.injectionsUsageMap);
21464
- }
21465
- };
20630
+ if (opts.collectMeta) {
20631
+ metadata = { injectionsUsageMap: /* @__PURE__ */ new Map() };
20632
+ Object.defineProperty(metadata, "injectionUsage", {
20633
+ enumerable: false,
20634
+ configurable: true,
20635
+ get() {
20636
+ const stack = (/* @__PURE__ */ new Error()).stack;
20637
+ console.warn("[unimport] `injectionUsage` is deprecated, use `injectionsUsageMap` instead", stack);
20638
+ return Object.fromEntries(this.injectionsUsageMap);
20639
+ }
20640
+ });
20641
+ }
21466
20642
  let resolvePromise;
21467
20643
  const ctx = {
21468
20644
  version: version$1,
@@ -21557,14 +20733,10 @@ async function resolveImports(ctx, imports, id) {
21557
20733
  };
21558
20734
  }))).filter(Boolean);
21559
20735
  }
21560
- //#endregion
21561
- //#region node_modules/.pnpm/unimport@6.0.1/node_modules/unimport/dist/index.mjs
21562
20736
  var dist_exports = /* @__PURE__ */ __exportAll({
21563
20737
  createUnimport: () => createUnimport,
21564
20738
  version: () => version$1
21565
20739
  });
21566
- //#endregion
21567
- //#region src/build/types.ts
21568
20740
  async function writeTypes(nitro) {
21569
20741
  const types = { routes: {} };
21570
20742
  const generatedTypesDir = resolve$3(nitro.options.rootDir, nitro.options.typescript.generatedTypesDir || "node_modules/.nitro/types");
@@ -21643,7 +20815,11 @@ async function writeTypes(nitro) {
21643
20815
  const config = [
21644
20816
  "// Generated by nitro",
21645
20817
  `declare module "nitro/types" {`,
21646
- nitro.options.typescript.generateRuntimeConfigTypes ? generateTypes(await resolveSchema(Object.fromEntries(Object.entries(nitro.options.runtimeConfig).filter(([key]) => !["app", "nitro"].includes(key)))), {
20818
+ nitro.options.typescript.generateRuntimeConfigTypes ? generateTypes(await resolveSchema(Object.fromEntries(Object.entries(nitro.options.runtimeConfig).filter(([key]) => ![
20819
+ "app",
20820
+ "nitro",
20821
+ "wrangler"
20822
+ ].includes(key)))), {
21647
20823
  interfaceName: "NitroRuntimeConfig",
21648
20824
  addExport: false,
21649
20825
  addDefaults: false,
@@ -21731,8 +20907,6 @@ function relativeWithDot(from, to) {
21731
20907
  const rel = relative$2(from, to);
21732
20908
  return RELATIVE_RE.test(rel) ? rel : "./" + rel;
21733
20909
  }
21734
- //#endregion
21735
- //#region src/presets/_types.gen.ts
21736
20910
  const presetsWithConfig = [
21737
20911
  "awsAmplify",
21738
20912
  "awsLambda",
@@ -21743,8 +20917,6 @@ const presetsWithConfig = [
21743
20917
  "vercel",
21744
20918
  "zephyr"
21745
20919
  ];
21746
- //#endregion
21747
- //#region src/build/info.ts
21748
20920
  const NITRO_WELLKNOWN_DIR = "node_modules/.nitro";
21749
20921
  async function getBuildInfo(root) {
21750
20922
  const outputDir = await findLastBuildDir(root);
@@ -21794,8 +20966,6 @@ async function writeDevBuildInfo(nitro, addr) {
21794
20966
  };
21795
20967
  await writeFile$1(buildInfoPath, JSON.stringify(buildInfo, null, 2));
21796
20968
  }
21797
- //#endregion
21798
- //#region src/utils/parallel.ts
21799
20969
  async function runParallel(inputs, cb, opts) {
21800
20970
  const errors = [];
21801
20971
  const tasks = /* @__PURE__ */ new Set();
@@ -21820,24 +20990,6 @@ async function runParallel(inputs, cb, opts) {
21820
20990
  await refillQueue();
21821
20991
  return { errors };
21822
20992
  }
21823
- //#endregion
21824
- //#region src/utils/regex.ts
21825
- function escapeRegExp$1(string) {
21826
- return string.replace(/[-\\^$*+?.()|[\]{}]/g, String.raw`\$&`);
21827
- }
21828
- function pathRegExp(string) {
21829
- if (S$3) string = string.replace(/\\/g, "/");
21830
- let escaped = escapeRegExp$1(string);
21831
- if (S$3) escaped = escaped.replace(/\//g, String.raw`[/\\]`);
21832
- return escaped;
21833
- }
21834
- function toPathRegExp(input) {
21835
- if (input instanceof RegExp) return input;
21836
- if (typeof input === "string") return new RegExp(pathRegExp(input));
21837
- throw new TypeError("Expected a string or RegExp", { cause: input });
21838
- }
21839
- //#endregion
21840
- //#region src/build/config.ts
21841
20993
  function baseBuildConfig(nitro) {
21842
20994
  const extensions = [
21843
20995
  ".ts",
@@ -21910,8 +21062,6 @@ function resolveAliases(_aliases) {
21910
21062
  }
21911
21063
  return aliases;
21912
21064
  }
21913
- //#endregion
21914
- //#region src/build/chunks.ts
21915
21065
  const virtualRe = /^(?:\0|#|virtual:)/;
21916
21066
  const NODE_MODULES_RE$1 = /node_modules[/\\](?!(?:nitro|nitro-nightly)[/\\])[^.]/;
21917
21067
  function libChunkName(id) {
@@ -21954,8 +21104,6 @@ function joinPkgNames(moduleIds) {
21954
21104
  function routeToFsPath(route) {
21955
21105
  return route.split("/").slice(1).map((s) => s.replace(/:(\w+)/g, "[$1]").replace(/\*+/g, "[...]").replace(/[^a-zA-Z0-9_.[\]]/g, "_")).join("/") || "index";
21956
21106
  }
21957
- //#endregion
21958
- //#region src/build/virtual/database.ts
21959
21107
  function database(nitro) {
21960
21108
  return {
21961
21109
  id: "#nitro/virtual/database",
@@ -21977,8 +21125,6 @@ export const connectionConfigs = {
21977
21125
  }
21978
21126
  };
21979
21127
  }
21980
- //#endregion
21981
- //#region src/build/virtual/error-handler.ts
21982
21128
  function errorHandler(nitro) {
21983
21129
  return {
21984
21130
  id: "#nitro/virtual/error-handler",
@@ -22010,8 +21156,6 @@ export default async function(error, event) {
22010
21156
  }
22011
21157
  };
22012
21158
  }
22013
- //#endregion
22014
- //#region src/build/virtual/feature-flags.ts
22015
21159
  function featureFlags(nitro) {
22016
21160
  return {
22017
21161
  id: "#nitro/virtual/feature-flags",
@@ -22028,8 +21172,6 @@ function featureFlags(nitro) {
22028
21172
  }
22029
21173
  };
22030
21174
  }
22031
- //#endregion
22032
- //#region src/build/virtual/plugins.ts
22033
21175
  function plugins(nitro) {
22034
21176
  return {
22035
21177
  id: "#nitro/virtual/plugins",
@@ -22045,8 +21187,6 @@ function plugins(nitro) {
22045
21187
  }
22046
21188
  };
22047
21189
  }
22048
- //#endregion
22049
- //#region src/build/virtual/polyfills.ts
22050
21190
  function polyfills(_nitro, polyfills) {
22051
21191
  return {
22052
21192
  id: "#nitro/virtual/polyfills",
@@ -22056,46 +21196,16 @@ function polyfills(_nitro, polyfills) {
22056
21196
  }
22057
21197
  };
22058
21198
  }
22059
- //#endregion
22060
- //#region src/build/virtual/public-assets.ts
22061
21199
  var import_etag = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin(((exports, module) => {
22062
- /**
22063
- * Module exports.
22064
- * @public
22065
- */
22066
21200
  module.exports = etag;
22067
- /**
22068
- * Module dependencies.
22069
- * @private
22070
- */
22071
21201
  var crypto = __require$1("crypto");
22072
21202
  var Stats$1 = __require$1("fs").Stats;
22073
- /**
22074
- * Module variables.
22075
- * @private
22076
- */
22077
21203
  var toString = Object.prototype.toString;
22078
- /**
22079
- * Generate an entity tag.
22080
- *
22081
- * @param {Buffer|string} entity
22082
- * @return {string}
22083
- * @private
22084
- */
22085
21204
  function entitytag(entity) {
22086
21205
  if (entity.length === 0) return "\"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk\"";
22087
21206
  var hash = crypto.createHash("sha1").update(entity, "utf8").digest("base64").substring(0, 27);
22088
21207
  return "\"" + (typeof entity === "string" ? Buffer.byteLength(entity, "utf8") : entity.length).toString(16) + "-" + hash + "\"";
22089
21208
  }
22090
- /**
22091
- * Create a simple ETag.
22092
- *
22093
- * @param {string|Buffer|Stats} entity
22094
- * @param {object} [options]
22095
- * @param {boolean} [options.weak]
22096
- * @return {String}
22097
- * @public
22098
- */
22099
21209
  function etag(entity, options) {
22100
21210
  if (entity == null) throw new TypeError("argument entity is required");
22101
21211
  var isStats = isstats(entity);
@@ -22104,24 +21214,10 @@ var import_etag = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin(((exp
22104
21214
  var tag = isStats ? stattag(entity) : entitytag(entity);
22105
21215
  return weak ? "W/" + tag : tag;
22106
21216
  }
22107
- /**
22108
- * Determine if object is a Stats object.
22109
- *
22110
- * @param {object} obj
22111
- * @return {boolean}
22112
- * @api private
22113
- */
22114
21217
  function isstats(obj) {
22115
21218
  if (typeof Stats$1 === "function" && obj instanceof Stats$1) return true;
22116
21219
  return obj && typeof obj === "object" && "ctime" in obj && toString.call(obj.ctime) === "[object Date]" && "mtime" in obj && toString.call(obj.mtime) === "[object Date]" && "ino" in obj && typeof obj.ino === "number" && "size" in obj && typeof obj.size === "number";
22117
21220
  }
22118
- /**
22119
- * Generate a tag for a stat.
22120
- *
22121
- * @param {object} stat
22122
- * @return {string}
22123
- * @private
22124
- */
22125
21221
  function stattag(stat) {
22126
21222
  var mtime = stat.mtime.getTime().toString(16);
22127
21223
  return "\"" + stat.size.toString(16) + "-" + mtime + "\"";
@@ -22253,8 +21349,6 @@ export function readAsset (id) {
22253
21349
  }
22254
21350
  ];
22255
21351
  }
22256
- //#endregion
22257
- //#region src/build/virtual/renderer-template.ts
22258
21352
  function rendererTemplate(nitro) {
22259
21353
  return {
22260
21354
  id: "#nitro/virtual/renderer-template",
@@ -22286,17 +21380,15 @@ function rendererTemplate(nitro) {
22286
21380
  }
22287
21381
  };
22288
21382
  }
22289
- //#endregion
22290
- //#region src/build/virtual/routing-meta.ts
22291
21383
  function routingMeta(nitro) {
22292
21384
  return {
22293
21385
  id: "#nitro/virtual/routing-meta",
22294
21386
  template: () => {
22295
- const routeHandlers = uniqueBy$1(Object.values(nitro.routing.routes.routes).flatMap((h) => h.data), "_importHash");
21387
+ const handlers = Object.values(nitro.routing.routes.routes).flatMap((h) => h.data);
22296
21388
  return `
22297
- ${routeHandlers.map((h) => `import ${h._importHash}Meta from "${h.handler}?meta";`).join("\n")}
21389
+ ${uniqueBy$1(handlers, "_importHash").map((h) => `import ${h._importHash}Meta from "${h.handler}?meta";`).join("\n")}
22298
21390
  export const handlersMeta = [
22299
- ${routeHandlers.map((h) => `{ route: ${JSON.stringify(h.route)}, method: ${JSON.stringify(h.method?.toLowerCase())}, meta: ${h._importHash}Meta }`).join(",\n")}
21391
+ ${handlers.map((h) => `{ route: ${JSON.stringify(h.route)}, method: ${JSON.stringify(h.method?.toLowerCase())}, meta: ${h._importHash}Meta }`).join(",\n")}
22300
21392
  ];
22301
21393
  `.trim();
22302
21394
  }
@@ -22305,8 +21397,6 @@ export const handlersMeta = [
22305
21397
  function uniqueBy$1(arr, key) {
22306
21398
  return [...new Map(arr.map((item) => [item[key], item])).values()];
22307
21399
  }
22308
- //#endregion
22309
- //#region src/build/virtual/routing.ts
22310
21400
  const RuntimeRouteRules = [
22311
21401
  "headers",
22312
21402
  "redirect",
@@ -22388,8 +21478,6 @@ function serializeRouteRule(h) {
22388
21478
  ].filter(Boolean).join(",")}}`;
22389
21479
  }).join(",")}]`;
22390
21480
  }
22391
- //#endregion
22392
- //#region src/build/virtual/runtime-config.ts
22393
21481
  function runtimeConfig(nitro) {
22394
21482
  return {
22395
21483
  id: "#nitro/virtual/runtime-config",
@@ -22398,8 +21486,6 @@ function runtimeConfig(nitro) {
22398
21486
  }
22399
21487
  };
22400
21488
  }
22401
- //#endregion
22402
- //#region src/build/virtual/server-assets.ts
22403
21489
  function serverAssets(nitro) {
22404
21490
  return {
22405
21491
  id: "#nitro/virtual/server-assets",
@@ -22463,8 +21549,6 @@ export const assets = {
22463
21549
  }
22464
21550
  };
22465
21551
  }
22466
- //#endregion
22467
- //#region src/build/virtual/storage.ts
22468
21552
  function storage(nitro) {
22469
21553
  return {
22470
21554
  id: "#nitro/virtual/storage",
@@ -22482,24 +21566,25 @@ function storage(nitro) {
22482
21566
  opts: driverOpts
22483
21567
  });
22484
21568
  }
21569
+ const driverImports = [...new Set(mounts.map((m) => m.driver))];
21570
+ const tracingEnabled = !!(typeof nitro.options.tracingChannel === "object" && nitro.options.tracingChannel?.unstorage);
22485
21571
  return `
22486
21572
  import { createStorage } from 'unstorage'
21573
+ ${tracingEnabled ? `import { withTracing } from 'unstorage/tracing'` : ""}
22487
21574
  import { assets } from '#nitro/virtual/server-assets'
22488
21575
 
22489
- ${[...new Set(mounts.map((m) => m.driver))].map((i) => genImport(i, genSafeVariableName(i))).join("\n")}
21576
+ ${driverImports.map((i) => genImport(i, genSafeVariableName(i))).join("\n")}
22490
21577
 
22491
21578
  export function initStorage() {
22492
21579
  const storage = createStorage({})
22493
21580
  storage.mount('/assets', assets)
22494
21581
  ${mounts.map((m) => `storage.mount('${m.path}', ${genSafeVariableName(m.driver)}(${JSON.stringify(m.opts)}))`).join("\n")}
22495
- return storage
21582
+ return ${tracingEnabled ? "withTracing(storage)" : "storage"}
22496
21583
  }
22497
21584
  `;
22498
21585
  }
22499
21586
  };
22500
21587
  }
22501
- //#endregion
22502
- //#region src/build/virtual/tasks.ts
22503
21588
  function tasks(nitro) {
22504
21589
  return {
22505
21590
  id: "#nitro/virtual/tasks",
@@ -22531,8 +21616,28 @@ export const tasks = {
22531
21616
  }
22532
21617
  };
22533
21618
  }
22534
- //#endregion
22535
- //#region src/build/virtual/_all.ts
21619
+ function tracing(nitro) {
21620
+ return {
21621
+ id: "#nitro/virtual/tracing",
21622
+ template: () => {
21623
+ const { srvx, h3 } = nitro.options.tracingChannel || {};
21624
+ const imports = [];
21625
+ const setup = [];
21626
+ if (srvx) imports.push(`import { tracingPlugin as srvxTracing } from "srvx/tracing";`);
21627
+ if (h3) {
21628
+ imports.push(`import { tracingPlugin as h3Tracing } from "h3/tracing";`);
21629
+ setup.push(` h3Tracing()(nitroApp.h3);`);
21630
+ }
21631
+ return [
21632
+ ...imports,
21633
+ `export const tracingSrvxPlugins = [${srvx ? "srvxTracing()" : ""}];`,
21634
+ `export default function tracing(nitroApp) {`,
21635
+ ...setup,
21636
+ `};`
21637
+ ].join("\n");
21638
+ }
21639
+ };
21640
+ }
22536
21641
  function virtualTemplates(nitro, _polyfills) {
22537
21642
  const nitroTemplates = [
22538
21643
  database,
@@ -22547,7 +21652,8 @@ function virtualTemplates(nitro, _polyfills) {
22547
21652
  runtimeConfig,
22548
21653
  serverAssets,
22549
21654
  storage,
22550
- tasks
21655
+ tasks,
21656
+ tracing
22551
21657
  ].flatMap((t) => t(nitro, _polyfills));
22552
21658
  const customTemplates = Object.entries(nitro.options.virtual).map(([id, template]) => ({
22553
21659
  id,
@@ -22555,81 +21661,32 @@ function virtualTemplates(nitro, _polyfills) {
22555
21661
  }));
22556
21662
  return [...nitroTemplates, ...customTemplates];
22557
21663
  }
22558
- //#endregion
22559
- //#region node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/esm/estree-walker.js
22560
- /** @typedef { import('estree').BaseNode} BaseNode */
22561
- /** @typedef {{
22562
- skip: () => void;
22563
- remove: () => void;
22564
- replace: (node: BaseNode) => void;
22565
- }} WalkerContext */
22566
21664
  var WalkerBase = class {
22567
21665
  constructor() {
22568
- /** @type {boolean} */
22569
21666
  this.should_skip = false;
22570
- /** @type {boolean} */
22571
21667
  this.should_remove = false;
22572
- /** @type {BaseNode | null} */
22573
21668
  this.replacement = null;
22574
- /** @type {WalkerContext} */
22575
21669
  this.context = {
22576
21670
  skip: () => this.should_skip = true,
22577
21671
  remove: () => this.should_remove = true,
22578
21672
  replace: (node) => this.replacement = node
22579
21673
  };
22580
21674
  }
22581
- /**
22582
- *
22583
- * @param {any} parent
22584
- * @param {string} prop
22585
- * @param {number} index
22586
- * @param {BaseNode} node
22587
- */
22588
21675
  replace(parent, prop, index, node) {
22589
21676
  if (parent) if (index !== null) parent[prop][index] = node;
22590
21677
  else parent[prop] = node;
22591
21678
  }
22592
- /**
22593
- *
22594
- * @param {any} parent
22595
- * @param {string} prop
22596
- * @param {number} index
22597
- */
22598
21679
  remove(parent, prop, index) {
22599
21680
  if (parent) if (index !== null) parent[prop].splice(index, 1);
22600
21681
  else delete parent[prop];
22601
21682
  }
22602
21683
  };
22603
- /** @typedef { import('estree').BaseNode} BaseNode */
22604
- /** @typedef { import('./walker.js').WalkerContext} WalkerContext */
22605
- /** @typedef {(
22606
- * this: WalkerContext,
22607
- * node: BaseNode,
22608
- * parent: BaseNode,
22609
- * key: string,
22610
- * index: number
22611
- * ) => void} SyncHandler */
22612
21684
  var SyncWalker = class extends WalkerBase {
22613
- /**
22614
- *
22615
- * @param {SyncHandler} enter
22616
- * @param {SyncHandler} leave
22617
- */
22618
21685
  constructor(enter, leave) {
22619
21686
  super();
22620
- /** @type {SyncHandler} */
22621
21687
  this.enter = enter;
22622
- /** @type {SyncHandler} */
22623
21688
  this.leave = leave;
22624
21689
  }
22625
- /**
22626
- *
22627
- * @param {BaseNode} node
22628
- * @param {BaseNode} parent
22629
- * @param {string} [prop]
22630
- * @param {number} [index]
22631
- * @returns {BaseNode}
22632
- */
22633
21690
  visit(node, parent, prop, index) {
22634
21691
  if (node) {
22635
21692
  if (this.enter) {
@@ -22682,23 +21739,9 @@ var SyncWalker = class extends WalkerBase {
22682
21739
  return node;
22683
21740
  }
22684
21741
  };
22685
- /** @typedef { import('estree').BaseNode} BaseNode */
22686
- /** @typedef { import('./sync.js').SyncHandler} SyncHandler */
22687
- /** @typedef { import('./async.js').AsyncHandler} AsyncHandler */
22688
- /**
22689
- *
22690
- * @param {BaseNode} ast
22691
- * @param {{
22692
- * enter?: SyncHandler
22693
- * leave?: SyncHandler
22694
- * }} walker
22695
- * @returns {BaseNode}
22696
- */
22697
21742
  function walk(ast, { enter, leave }) {
22698
21743
  return new SyncWalker(enter, leave).visit(ast, null);
22699
21744
  }
22700
- //#endregion
22701
- //#region node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.59.0/node_modules/@rollup/pluginutils/dist/es/index.js
22702
21745
  const extractors = {
22703
21746
  ArrayPattern(names, param) {
22704
21747
  for (const element of param.elements) if (element) extractors[element.type](names, element);
@@ -22930,8 +21973,6 @@ const dataToEsm = function dataToEsm(data, options = {}) {
22930
21973
  const defaultExportCode = `export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`;
22931
21974
  return `${namedExportCode}${arbitraryExportCode}${defaultExportCode}`;
22932
21975
  };
22933
- //#endregion
22934
- //#region node_modules/.pnpm/@rollup+plugin-replace@6.0.3_rollup@4.59.0/node_modules/@rollup/plugin-replace/dist/es/index.js
22935
21976
  function escape(str) {
22936
21977
  return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
22937
21978
  }
@@ -23029,8 +22070,6 @@ function replace(options) {
23029
22070
  return options.sourceMap !== false && options.sourcemap !== false;
23030
22071
  }
23031
22072
  }
23032
- //#endregion
23033
- //#region node_modules/.pnpm/unwasm@0.5.3/node_modules/unwasm/dist/plugin/index.mjs
23034
22073
  var __create = Object.create;
23035
22074
  var __defProp = Object.defineProperty;
23036
22075
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -28625,7 +27664,6 @@ async function getWasmESMBinding(asset, opts) {
28625
27664
  const instantiateCode = opts.esmImport ? getESMImportInstantiate(asset, autoImports.code) : getBase64Instantiate(asset, autoImports.code);
28626
27665
  return opts.lazy !== true && autoImports.resolved ? getExports(asset, instantiateCode) : getLazyExports(asset, instantiateCode);
28627
27666
  }
28628
- /** Generate WebAssembly.Module binding for compatibility */
28629
27667
  function getWasmModuleBinding(asset, opts) {
28630
27668
  return opts.esmImport ? `
28631
27669
  const _mod = ${opts.lazy === true ? "" : `await`} import("${UNWASM_EXTERNAL_PREFIX}${asset.name}").then(r => r.default || r);
@@ -28637,7 +27675,6 @@ const _mod = new WebAssembly.Module(_data);
28637
27675
  export default _mod;
28638
27676
  `;
28639
27677
  }
28640
- /** Get the code to instantiate module with direct import */
28641
27678
  function getESMImportInstantiate(asset, importsCode) {
28642
27679
  return `
28643
27680
  ${importsCode}
@@ -28648,7 +27685,6 @@ return WebAssembly.instantiate(_mod, imports)
28648
27685
  }
28649
27686
  `;
28650
27687
  }
28651
- /** Get the code to instantiate module from inlined base64 data */
28652
27688
  function getBase64Instantiate(asset, importsCode) {
28653
27689
  return `
28654
27690
  import { base64ToUint8Array } from "${UMWASM_HELPERS_ID}";
@@ -28660,7 +27696,6 @@ function _instantiate(imports = _imports) {
28660
27696
  return WebAssembly.instantiate(_data, imports) }
28661
27697
  `;
28662
27698
  }
28663
- /** Get the exports code with top level await support */
28664
27699
  function getExports(asset, instantiateCode) {
28665
27700
  return `
28666
27701
  import { getExports } from "${UMWASM_HELPERS_ID}";
@@ -28676,7 +27711,6 @@ ${asset.exports.map((name) => `defaultExport["${name}"] = $exports.${name};`).jo
28676
27711
  export default defaultExport;
28677
27712
  `;
28678
27713
  }
28679
- /** Proxied exports when imports are needed or we can't have top-level await */
28680
27714
  function getLazyExports(asset, instantiateCode) {
28681
27715
  return `
28682
27716
  import { createLazyWasmModule } from "${UMWASM_HELPERS_ID}";
@@ -28914,11 +27948,9 @@ function unwasm(opts) {
28914
27948
  }
28915
27949
  };
28916
27950
  }
28917
- //#endregion
28918
- //#region src/build/plugins/route-meta.ts
28919
27951
  const PREFIX$1 = "\0nitro:route-meta:";
28920
27952
  async function routeMeta(nitro) {
28921
- const { transformSync } = await import("rolldown/experimental");
27953
+ const { transformSync } = await import("rolldown/utils");
28922
27954
  return {
28923
27955
  name: "nitro:route-meta",
28924
27956
  resolveId: {
@@ -28946,7 +27978,7 @@ async function routeMeta(nitro) {
28946
27978
  async handler(code, id) {
28947
27979
  let meta = null;
28948
27980
  try {
28949
- const transformRes = transformSync(id, code);
27981
+ const transformRes = transformSync(id, code, { tsconfig: false });
28950
27982
  if (transformRes.errors?.length > 0) {
28951
27983
  for (const error of transformRes.errors) this.warn(error);
28952
27984
  return {
@@ -28984,8 +28016,6 @@ function astToObject(node) {
28984
28016
  case "Literal": return node.value;
28985
28017
  }
28986
28018
  }
28987
- //#endregion
28988
- //#region src/build/plugins/server-main.ts
28989
28019
  function serverMain(nitro) {
28990
28020
  return {
28991
28021
  name: "nitro:server-main",
@@ -28997,8 +28027,6 @@ function serverMain(nitro) {
28997
28027
  }
28998
28028
  };
28999
28029
  }
29000
- //#endregion
29001
- //#region src/build/plugins/virtual.ts
29002
28030
  function virtual(input) {
29003
28031
  const modules = /* @__PURE__ */ new Map();
29004
28032
  for (const mod of input) {
@@ -29061,8 +28089,6 @@ function virtualDeps() {
29061
28089
  }
29062
28090
  };
29063
28091
  }
29064
- //#endregion
29065
- //#region src/build/plugins/sourcemap-min.ts
29066
28092
  function sourcemapMinify() {
29067
28093
  return {
29068
28094
  name: "nitro:sourcemap-minify",
@@ -29078,8 +28104,6 @@ function sourcemapMinify() {
29078
28104
  }
29079
28105
  };
29080
28106
  }
29081
- //#endregion
29082
- //#region src/build/plugins/raw.ts
29083
28107
  const HELPER_ID = "virtual:nitro-raw-helpers";
29084
28108
  const RESOLVED_PREFIX = "virtual:nitro:raw:";
29085
28109
  const PREFIX = "raw:";
@@ -29153,11 +28177,10 @@ function rawAssetMap(id) {
29153
28177
  mappings: ""
29154
28178
  };
29155
28179
  }
29156
- //#endregion
29157
- //#region src/build/plugins/externals.ts
29158
28180
  const PLUGIN_NAME = "nitro:externals";
29159
28181
  function externals(opts) {
29160
- const include = opts?.include ? opts.include.map((p) => toPathRegExp(p)) : void 0;
28182
+ const resolved = opts.trace ? resolveTraceDeps(opts.include) : void 0;
28183
+ const include = resolved?.includePattern ? [resolved.includePattern] : void 0;
29161
28184
  const exclude = [/^(?:[\0#~.]|[a-z0-9]{2,}:)|\?/, ...(opts?.exclude || []).map((p) => toPathRegExp(p))];
29162
28185
  const filter = (id) => {
29163
28186
  if (include && !include.some((r) => r.test(id))) return false;
@@ -29170,7 +28193,7 @@ function externals(opts) {
29170
28193
  conditions: opts.conditions
29171
28194
  });
29172
28195
  const tracedPaths = /* @__PURE__ */ new Set();
29173
- if (include && include.length === 0) return { name: PLUGIN_NAME };
28196
+ if (opts.trace && !resolved?.includePattern) return { name: PLUGIN_NAME };
29174
28197
  return {
29175
28198
  name: PLUGIN_NAME,
29176
28199
  resolveId: {
@@ -29223,22 +28246,27 @@ function externals(opts) {
29223
28246
  order: "post",
29224
28247
  async handler() {
29225
28248
  if (!opts.trace || tracedPaths.size === 0) return;
28249
+ const { hooks: userHooks, ...traceOpts } = opts.trace;
29226
28250
  const { traceNodeModules } = await import("nf3");
29227
28251
  const traceTime = Date.now();
29228
28252
  let traceFilesCount = 0;
29229
28253
  let tracedPkgsCount = 0;
29230
28254
  await traceNodeModules([...tracedPaths], {
29231
- ...opts.trace,
28255
+ ...traceOpts,
28256
+ fullTraceInclude: resolved?.fullTraceInclude,
29232
28257
  conditions: opts.conditions,
29233
28258
  rootDir: opts.rootDir,
29234
28259
  writePackageJson: true,
29235
28260
  hooks: {
29236
- tracedFiles(result) {
28261
+ ...userHooks,
28262
+ tracedFiles: async (result) => {
29237
28263
  traceFilesCount = Object.keys(result).length;
28264
+ await userHooks?.tracedFiles?.(result);
29238
28265
  },
29239
- tracedPackages: (pkgs) => {
28266
+ tracedPackages: async (pkgs) => {
29240
28267
  tracedPkgsCount = Object.keys(pkgs).length;
29241
28268
  consola.info(`Tracing dependencies:\n${Object.entries(pkgs).map(([name, versions]) => `- \`${name}\` (${Object.keys(versions.versions).join(", ")})`).join("\n")}`);
28269
+ await userHooks?.tracedPackages?.(pkgs);
29242
28270
  }
29243
28271
  }
29244
28272
  });
@@ -29248,6 +28276,27 @@ function externals(opts) {
29248
28276
  }
29249
28277
  };
29250
28278
  }
28279
+ function resolveTraceDeps(traceDeps, opts = {}) {
28280
+ const builtinPackages = opts.builtinPackages ?? [...NodeNativePackages, ...NonBundleablePackages];
28281
+ const builtinFullTrace = opts.builtinFullTrace ?? FullTracePackages;
28282
+ const negated = /* @__PURE__ */ new Set();
28283
+ const userTraceDeps = [];
28284
+ const userFullTrace = [];
28285
+ for (const d of traceDeps) if (typeof d !== "string") userTraceDeps.push(d);
28286
+ else if (d === "!" || d === "*" || d === "") throw new Error(`Invalid traceDeps selector: "${d}"`);
28287
+ else if (d.startsWith("!")) negated.add(d.slice(1));
28288
+ else if (d.endsWith("*")) {
28289
+ const name = d.slice(0, -1);
28290
+ userFullTrace.push(name);
28291
+ userTraceDeps.push(name);
28292
+ } else userTraceDeps.push(d);
28293
+ const tracePattern = [...new Set([...builtinPackages, ...userTraceDeps])].filter((d) => typeof d !== "string" || !negated.has(d)).map((d) => d instanceof RegExp ? d.source : escapeRegExp$1(d)).join("|");
28294
+ const fullTraceInclude = [...new Set([...builtinFullTrace, ...userFullTrace])].filter((d) => !negated.has(d));
28295
+ return {
28296
+ includePattern: tracePattern ? new RegExp(`(?:^|[/\\\\]node_modules[/\\\\])(?:${tracePattern})(?:[/\\\\]|$)`) : void 0,
28297
+ fullTraceInclude: fullTraceInclude.length > 0 ? fullTraceInclude : void 0
28298
+ };
28299
+ }
29251
28300
  const NODE_MODULES_RE = /^(?<dir>.+[\\/]node_modules[\\/])(?<name>[^@\\/]+|@[^\\/]+[\\/][^\\/]+)(?:[\\/](?<subpath>.+))?$/;
29252
28301
  const IMPORT_RE = /^(?!\.)(?<name>[^@/\\]+|@[^/\\]+[/\\][^/\\]+)(?:[/\\](?<subpath>.+))?$/;
29253
28302
  function toImport(id) {
@@ -29294,15 +28343,13 @@ function flattenExports(exports = {}, parentSubpath = "./") {
29294
28343
  return typeof value === "object" ? flattenExports(value, _subPath) : [];
29295
28344
  });
29296
28345
  }
29297
- //#endregion
29298
- //#region src/build/plugins.ts
29299
28346
  async function baseBuildPlugins(nitro, base) {
29300
28347
  const plugins = [];
29301
28348
  const virtualPlugin = virtual(virtualTemplates(nitro, [...base.env.polyfill]));
29302
28349
  nitro.vfs = virtualPlugin.api.modules;
29303
28350
  plugins.push(virtualPlugin, virtualDeps());
29304
28351
  if (nitro.options.imports) {
29305
- const unimportPlugin = await import("../_libs/_7.mjs");
28352
+ const unimportPlugin = await import("../_libs/unimport+unplugin+oxc-parser.mjs").then((n) => n.t);
29306
28353
  plugins.push(unimportPlugin.default.rollup(nitro.options.imports));
29307
28354
  }
29308
28355
  if (nitro.options.wasm !== false) plugins.push(unwasm(nitro.options.wasm || {}));
@@ -29315,27 +28362,22 @@ async function baseBuildPlugins(nitro, base) {
29315
28362
  }));
29316
28363
  if (nitro.options.node && nitro.options.noExternals !== true) {
29317
28364
  const isDevOrPrerender = nitro.options.dev || nitro.options.preset === "nitro-prerender";
29318
- const { NodeNativePackages, NonBundleablePackages } = await import("nf3/db");
29319
- const traceDeps = [...new Set([
29320
- ...NodeNativePackages,
29321
- ...NonBundleablePackages,
29322
- ...nitro.options.traceDeps || []
29323
- ])];
29324
28365
  plugins.push(externals({
29325
28366
  rootDir: nitro.options.rootDir,
29326
28367
  conditions: nitro.options.exportConditions,
28368
+ include: nitro.options.traceDeps || [],
29327
28369
  exclude: [...base.noExternal],
29328
- include: isDevOrPrerender ? void 0 : [new RegExp(`^(?:${traceDeps.join("|")})|[/\\\\]node_modules[/\\\\](?:${traceDeps.join("|")})(?:[/\\\\])`)],
29329
- trace: isDevOrPrerender ? false : { outDir: nitro.options.output.serverDir }
28370
+ trace: isDevOrPrerender ? false : {
28371
+ ...nitro.options.traceOpts,
28372
+ outDir: nitro.options.output.serverDir
28373
+ }
29330
28374
  }));
29331
28375
  }
29332
28376
  if (nitro.options.sourcemap && !nitro.options.dev && nitro.options.experimental.sourcemapMinify !== false) plugins.push(sourcemapMinify());
29333
28377
  return plugins;
29334
28378
  }
29335
- //#endregion
29336
- //#region src/build/plugins/oxc.ts
29337
28379
  async function oxc(options) {
29338
- const { minifySync, transformSync } = await import("rolldown/experimental");
28380
+ const { minifySync, transformSync } = await import("rolldown/utils");
29339
28381
  return {
29340
28382
  name: "nitro:oxc",
29341
28383
  transform: {
@@ -29343,6 +28385,7 @@ async function oxc(options) {
29343
28385
  handler(code, id) {
29344
28386
  const res = transformSync(id, code, {
29345
28387
  sourcemap: options.sourcemap,
28388
+ tsconfig: false,
29346
28389
  ...options.transform
29347
28390
  });
29348
28391
  if (res.errors?.length > 0) this.error(res.errors.join("\n"));
@@ -29357,5 +28400,4 @@ async function oxc(options) {
29357
28400
  }
29358
28401
  };
29359
28402
  }
29360
- //#endregion
29361
- export { jsonc_exports as $, src_default as A, f$1 as B, decode as C, copyPublicAssets as D, prepare as E, prettyPath as F, findNearestFile$1 as G, v$2 as H, resolveNitroPath as I, readPackageJSON$1 as J, findWorkspaceDir as K, writeFile$1 as L, glob as M, require_picomatch as N, scanUnprefixedPublicAssets as O, Builder as P, yaml_exports as Q, R$1 as R, MagicString as S, parse as T, dist_exports$1 as U, m$2 as V, findFile$1 as W, toml_exports as X, i$3 as Y, a$3 as Z, writeTypes as _, dataToEsm as a, dirname$2 as at, getMagicString as b, walk as c, join$2 as ct, libChunkName as d, resolve$3 as dt, r$5 as et, baseBuildConfig as f, writeDevBuildInfo as g, writeBuildInfo as h, createFilter as i, basename$2 as it, build as j, compressPublicAssets as k, NODE_MODULES_RE$1 as l, normalize$2 as lt, getBuildInfo as m, baseBuildPlugins as n, resolveModulePath as nt, extractAssignedNames as o, extname$4 as ot, runParallel as p, readGitConfig as q, attachScopes as r, resolveModuleURL as rt, makeLegalIdentifier as s, isAbsolute$2 as st, oxc as t, json5_exports as tt, getChunkName as u, relative$2 as ut, dist_exports as v, encode as w, stripLiteral as x, createUnimport as y, _$2 as z };
28403
+ export { yaml_exports as $, src_default as A, _$2 as B, decode as C, copyPublicAssets as D, prepare as E, prettyPath as F, findFile$1 as G, m$2 as H, resolveNitroPath as I, readGitConfig as J, findNearestFile$1 as K, writeFile$1 as L, glob as M, require_picomatch as N, scanUnprefixedPublicAssets as O, Builder as P, a$3 as Q, escapeRegExp$1 as R, MagicString as S, parse as T, v$2 as U, f$1 as V, dist_exports$1 as W, i$3 as X, readPackageJSON$1 as Y, toml_exports as Z, writeTypes as _, dataToEsm as a, basename$2 as at, getMagicString as b, walk as c, isAbsolute$2 as ct, libChunkName as d, relative$2 as dt, jsonc_exports as et, baseBuildConfig as f, resolve$3 as ft, writeDevBuildInfo as g, writeBuildInfo as h, createFilter as i, resolveModuleURL as it, build as j, compressPublicAssets as k, NODE_MODULES_RE$1 as l, join$2 as lt, getBuildInfo as m, baseBuildPlugins as n, json5_exports as nt, extractAssignedNames as o, dirname$2 as ot, runParallel as p, findWorkspaceDir as q, attachScopes as r, resolveModulePath as rt, makeLegalIdentifier as s, extname$4 as st, oxc as t, r$5 as tt, getChunkName as u, normalize$2 as ut, dist_exports as v, encode as w, stripLiteral as x, createUnimport as y, R$1 as z };