@cloudflare/vite-plugin 1.14.1 → 1.15.0

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["util","path","request: Request | undefined","request","MiniflareResponse","MiniflareRequest","exportTypes: ExportTypes","#sharedContext","sharedContext","#resolvedPluginConfig","#resolvedViteConfig","invalid: string[]","path","fs","deployConfig: DeployConfig","entryWorkerConfigPath: string | undefined","auxiliaryWorkers: DeployConfig[\"auxiliaryWorkers\"]","i","TokenType","types$1","hasOwnProperty","toString","Position","n","SourceLocation","Parser","ref","DestructuringErrors","list","isAsync","ecmaVersion","i$1","list$1","TokContext","types","Scope","Node","BranchID","RegExpValidationState","Token","withTrailingSlash","path","path","types","request","target","fileURLToPath$1","extname","format","tries","i","pathToFileURL$1","packageJsonUrl","packageConfig","fileURLToPath","pathToFileURL","#env","#getEntries","#getInjects","#injectsByModule","#virtualModulePathToSpecifier","module","path","environmentName: string","resolvedViteConfig: vite.ResolvedConfig","nonApplicable: NonApplicableConfigMap","config: Optional<RawWorkerConfig, \"build\" | \"define\">","lines","path","lines: string[]","fs","configPath","path","staticRouting: StaticRouting | undefined","environmentNameToWorkerMap: Map<string, Worker>","auxiliaryWorkersResolvedConfigs: WorkerResolvedConfig[]","i","relative","n","btoa","i","segment","replacement","magicString: MagicString | undefined","source: Buffer","path","moduleRules: ModuleRules","staticRedirects: MetadataStaticRedirects","dynamicRedirects: MetadataRedirects","rules: MetadataHeaders","configuredRule: MetadataHeaders[string]","path","rules: HeadersRule[]","invalid: InvalidHeadersRule[]","rule: (HeadersRule & { line: string }) | undefined","i","path","rules: RedirectRule[]","invalid: InvalidRedirectRule[]","i","isString","path","cache","types","path","Mime","standardTypes","otherTypes","e: unknown","util","data","i","path","errorMap","target","version","ctx","result","issues","types","elements","processed","logger: Logger","path","path","fs","movedAssetPaths: string[]","client: vite.HotChannelClient","#webSocketContainer","define","hasNodeJsCompat","path","disallowedEnvironmentOptions: DisallowedEnvironmentOptions","resolve","port","request","#cancelHandlers","#promise","#isResolved","#isRejected","#isCancelled","#resolve","resolve","#reject","OpenAPI: OpenAPIConfig","qs: string[]","process","path","headers","result: any","request: RequestInit","request","result: ApiResult","__request","readFileSync","resolve: () => void","reject: (err: unknown) => void","spawn","resolve: (args: { aborted: boolean }) => void","reject: (err: unknown) => void","statSync","path","request","path","name: string","assetWorkers: Array<WorkerOptions>","fs","request","MiniflareResponse","containerTagToOptionsMap: ContainerTagToOptionsMap","containerBuildId: string | undefined","contents: Buffer","workers: Array<WorkerOptions>","i","request","exitCallback","preMiddleware: vite.Connect.NextHandleFunction | undefined","staticRouting: StaticRouting | undefined","request","exitCallback","path","outputConfig: Unstable_RawConfig | undefined","path","request","request","sharedContext: SharedContext"],"sources":["../src/utils.ts","../src/export-types.ts","../src/context.ts","../../workers-shared/utils/configuration/constants.ts","../../workers-shared/utils/configuration/parseStaticRouting.ts","../src/deploy-config.ts","../../../node_modules/.pnpm/acorn@8.14.0/node_modules/acorn/dist/acorn.mjs","../../../node_modules/.pnpm/ufo@1.5.4/node_modules/ufo/dist/index.mjs","../../../node_modules/.pnpm/pathe@2.0.1/node_modules/pathe/dist/shared/pathe.BLwDEnA5.mjs","../../../node_modules/.pnpm/mlly@1.7.4/node_modules/mlly/dist/index.mjs","../src/nodejs-compat.ts","../src/workers-configs.ts","../src/plugin-config.ts","../../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs","../../../node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.mjs","../src/plugins/additional-modules.ts","../../workers-shared/utils/configuration/constructConfiguration.ts","../../workers-shared/utils/configuration/validateURL.ts","../../workers-shared/utils/configuration/parseHeaders.ts","../../workers-shared/utils/configuration/parseRedirects.ts","../../workers-shared/utils/constants.ts","../../../node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js","../../../node_modules/.pnpm/mime@4.0.7/node_modules/mime/dist/types/other.js","../../../node_modules/.pnpm/mime@4.0.7/node_modules/mime/dist/types/standard.js","../../../node_modules/.pnpm/mime@4.0.7/node_modules/mime/dist/src/Mime.js","../../../node_modules/.pnpm/mime@4.0.7/node_modules/mime/dist/src/index.js","../../workers-shared/utils/helpers.ts","../../../node_modules/.pnpm/zod@3.22.3/node_modules/zod/lib/index.mjs","../../workers-shared/utils/types.ts","../src/asset-config.ts","../src/shared.ts","../src/plugins/virtual-modules.ts","../src/build.ts","../src/cloudflare-environment.ts","../src/dev-vars.ts","../src/vite-config.ts","../src/plugins/config.ts","../src/debug.ts","../src/plugins/debug.ts","../../containers-shared/src/client/core/ApiError.ts","../../containers-shared/src/client/core/CancelablePromise.ts","../../containers-shared/src/client/core/OpenAPI.ts","../../containers-shared/src/client/models/ApplicationRollout.ts","../../containers-shared/src/client/models/BadRequestWithCodeError.ts","../../containers-shared/src/client/models/CreateApplicationRolloutRequest.ts","../../containers-shared/src/client/models/DeploymentNotFoundError.ts","../../containers-shared/src/client/models/ImageRegistryAlreadyExistsError.ts","../../containers-shared/src/client/models/ImageRegistryIsPublic.ts","../../containers-shared/src/client/models/ImageRegistryNotAllowedError.ts","../../containers-shared/src/client/models/ImageRegistryNotFoundError.ts","../../containers-shared/src/client/models/ImageRegistryPermissions.ts","../../containers-shared/src/client/models/ImageRegistryProtocolAlreadyExists.ts","../../containers-shared/src/client/models/ImageRegistryProtocolIsReferencedError.ts","../../containers-shared/src/client/models/ImageRegistryProtocolNotFound.ts","../../containers-shared/src/client/models/ProvisionerConfiguration.ts","../../containers-shared/src/client/models/RolloutStep.ts","../../containers-shared/src/client/models/SecretNameAlreadyExists.ts","../../containers-shared/src/client/models/SecretNotFound.ts","../../containers-shared/src/client/models/SSHPublicKeyNotFoundError.ts","../../containers-shared/src/client/models/UpdateApplicationRolloutRequest.ts","../../containers-shared/src/client/core/request.ts","../../containers-shared/src/client/services/ImageRegistriesService.ts","../../containers-shared/src/error.ts","../../containers-shared/src/build.ts","../../containers-shared/src/login.ts","../../containers-shared/src/registry.ts","../../containers-shared/src/knobs.ts","../../containers-shared/src/inspect.ts","../../containers-shared/src/utils.ts","../../containers-shared/src/images.ts","../../workers-shared/asset-worker/src/utils/rules-engine.ts","../src/constants.ts","../src/containers.ts","../src/miniflare-options.ts","../src/websockets.ts","../src/plugins/dev.ts","../src/plugins/nodejs-compat.ts","../src/plugins/output-config.ts","../src/plugins/preview.ts","../src/plugins/trigger-handlers.ts","../src/plugins/wasm.ts","../src/index.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport * as util from \"node:util\";\nimport { createRequest, sendResponse } from \"@remix-run/node-fetch-server\";\nimport {\n\tCoreHeaders,\n\tRequest as MiniflareRequest,\n\tResponse as MiniflareResponse,\n} from \"miniflare\";\nimport type { PluginContext } from \"./context\";\nimport type * as http from \"node:http\";\nimport type * as vite from \"vite\";\n\nexport const debuglog = util.debuglog(\"@cloudflare:vite-plugin\");\n\n/**\n * Creates an internal plugin to be used inside the main `vite-plugin-cloudflare` plugin.\n * The provided `name` will be prefixed with `vite-plugin-cloudflare:`.\n */\nexport function createPlugin(\n\tname: string,\n\tpluginFactory: (ctx: PluginContext) => Omit<vite.Plugin, \"name\">\n): (ctx: PluginContext) => vite.Plugin {\n\treturn (ctx) => {\n\t\treturn {\n\t\t\tname: `vite-plugin-cloudflare:${name}`,\n\t\t\tsharedDuringBuild: true,\n\t\t\t...pluginFactory(ctx),\n\t\t};\n\t};\n}\n\nexport function getOutputDirectory(\n\tuserConfig: vite.UserConfig,\n\tenvironmentName: string\n) {\n\tconst rootOutputDirectory = userConfig.build?.outDir ?? \"dist\";\n\n\treturn (\n\t\tuserConfig.environments?.[environmentName]?.build?.outDir ??\n\t\tpath.join(rootOutputDirectory, environmentName)\n\t);\n}\n\nconst postfixRE = /[?#].*$/;\nexport function cleanUrl(url: string): string {\n\treturn url.replace(postfixRE, \"\");\n}\n\nexport type Optional<T, K extends keyof T> = Omit<T, K> & Pick<Partial<T>, K>;\n\nexport type MaybePromise<T> = Promise<T> | T;\n\nexport type Defined<T> = Exclude<T, undefined>;\n\nexport function withTrailingSlash(path: string): string {\n\treturn path.endsWith(\"/\") ? path : `${path}/`;\n}\n\nexport function createRequestHandler(\n\thandler: (\n\t\trequest: MiniflareRequest,\n\t\treq: vite.Connect.IncomingMessage\n\t) => Promise<MiniflareResponse>\n): (\n\treq: vite.Connect.IncomingMessage,\n\tres: http.ServerResponse,\n\tnext: vite.Connect.NextFunction\n) => Promise<void> {\n\treturn async (req, res, next) => {\n\t\tlet request: Request | undefined;\n\n\t\ttry {\n\t\t\t// Built in vite middleware trims out the base path when passing in the request\n\t\t\t// We can restore it by using the `originalUrl` property\n\t\t\t// This makes sure the worker receives the correct url in both dev using vite and production\n\t\t\tif (req.originalUrl) {\n\t\t\t\treq.url = req.originalUrl;\n\t\t\t}\n\t\t\trequest = createRequest(req, res);\n\n\t\t\tlet response = await handler(toMiniflareRequest(request), req);\n\n\t\t\t// Vite uses HTTP/2 when `server.https` or `preview.https` is enabled\n\t\t\tif (req.httpVersionMajor === 2) {\n\t\t\t\tresponse = new MiniflareResponse(response.body, response);\n\t\t\t\t// HTTP/2 disallows use of the `transfer-encoding` header\n\t\t\t\tresponse.headers.delete(\"transfer-encoding\");\n\t\t\t}\n\n\t\t\tawait sendResponse(res, response as unknown as Response);\n\t\t} catch (error) {\n\t\t\tif (request?.signal.aborted) {\n\t\t\t\t// If the request was aborted, ignore the error\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tnext(error);\n\t\t}\n\t};\n}\n\nfunction toMiniflareRequest(request: Request): MiniflareRequest {\n\tconst host = request.headers.get(\"Host\");\n\tconst xForwardedHost = request.headers.get(\"X-Forwarded-Host\");\n\n\tif (host && !xForwardedHost) {\n\t\t// Set the `x-forwarded-host` header to the host of the Vite server if it is not already set\n\t\t// Note that the `host` header inside the Worker will contain the workerd host\n\t\t// TODO: reconsider this when adopting `miniflare.dispatchFetch` as it may be possible to provide the Vite server host in the `host` header\n\t\trequest.headers.set(\"X-Forwarded-Host\", host);\n\t}\n\n\t// Undici sets the `Sec-Fetch-Mode` header to `cors` so we capture it in a custom header to be converted back later.\n\tconst secFetchMode = request.headers.get(\"Sec-Fetch-Mode\");\n\tif (secFetchMode) {\n\t\trequest.headers.set(CoreHeaders.SEC_FETCH_MODE, secFetchMode);\n\t}\n\treturn new MiniflareRequest(request.url, {\n\t\tmethod: request.method,\n\t\theaders: [[\"accept-encoding\", \"identity\"], ...request.headers],\n\t\tbody: request.body,\n\t\tduplex: \"half\",\n\t\tsignal: request.signal,\n\t});\n}\n","import assert from \"node:assert\";\nimport { unstable_getDurableObjectClassNameToUseSQLiteMap } from \"wrangler\";\nimport { debuglog } from \"./utils\";\nimport type { CloudflareDevEnvironment } from \"./cloudflare-environment\";\nimport type { Worker, WorkersResolvedConfig } from \"./plugin-config\";\nimport type { Miniflare } from \"miniflare\";\nimport type * as vite from \"vite\";\n\nexport type ExportTypes = Record<\n\tstring,\n\t\"DurableObject\" | \"WorkerEntrypoint\" | \"WorkflowEntrypoint\"\n>;\n\nfunction getWorkerNameToWorkerEntrypointExportsMap(\n\tworkers: Worker[]\n): Map<string, Set<string>> {\n\tconst workerNameToWorkerEntrypointExportsMap = new Map(\n\t\tworkers.map((worker) => [worker.config.name, new Set<string>()])\n\t);\n\n\tfor (const worker of workers) {\n\t\tfor (const value of worker.config.services ?? []) {\n\t\t\tif (value.entrypoint !== undefined && value.entrypoint !== \"default\") {\n\t\t\t\tconst exportNames = workerNameToWorkerEntrypointExportsMap.get(\n\t\t\t\t\tvalue.service\n\t\t\t\t);\n\n\t\t\t\texportNames?.add(value.entrypoint);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn workerNameToWorkerEntrypointExportsMap;\n}\n\nfunction getWorkerNameToDurableObjectExportsMap(\n\tworkers: Worker[]\n): Map<string, Set<string>> {\n\tconst workerNameToDurableObjectExportsMap = new Map(\n\t\tworkers.map((worker) => [\n\t\t\tworker.config.name,\n\t\t\tnew Set(\n\t\t\t\tunstable_getDurableObjectClassNameToUseSQLiteMap(\n\t\t\t\t\tworker.config.migrations\n\t\t\t\t).keys()\n\t\t\t),\n\t\t])\n\t);\n\n\tfor (const worker of workers) {\n\t\tfor (const value of worker.config.durable_objects.bindings) {\n\t\t\tif (value.script_name) {\n\t\t\t\tconst exportNames = workerNameToDurableObjectExportsMap.get(\n\t\t\t\t\tvalue.script_name\n\t\t\t\t);\n\n\t\t\t\texportNames?.add(value.class_name);\n\t\t\t} else {\n\t\t\t\tconst exportNames = workerNameToDurableObjectExportsMap.get(\n\t\t\t\t\tworker.config.name\n\t\t\t\t);\n\n\t\t\t\texportNames?.add(value.class_name);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn workerNameToDurableObjectExportsMap;\n}\n\nfunction getWorkerNameToWorkflowEntrypointExportsMap(\n\tworkers: Worker[]\n): Map<string, Set<string>> {\n\tconst workerNameToWorkflowEntrypointExportsMap = new Map(\n\t\tworkers.map((worker) => [worker.config.name, new Set<string>()])\n\t);\n\n\tfor (const worker of workers) {\n\t\tfor (const value of worker.config.workflows) {\n\t\t\tif (value.script_name) {\n\t\t\t\tconst exportNames = workerNameToWorkflowEntrypointExportsMap.get(\n\t\t\t\t\tvalue.script_name\n\t\t\t\t);\n\n\t\t\t\texportNames?.add(value.class_name);\n\t\t\t} else {\n\t\t\t\tconst exportNames = workerNameToWorkflowEntrypointExportsMap.get(\n\t\t\t\t\tworker.config.name\n\t\t\t\t);\n\n\t\t\t\texportNames?.add(value.class_name);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn workerNameToWorkflowEntrypointExportsMap;\n}\n\n/**\n * Derives initial export types for all Workers from the Worker config files and returns them in a Map\n */\nexport function getInitialWorkerNameToExportTypesMap(\n\tresolvedPluginConfig: WorkersResolvedConfig\n): Map<string, ExportTypes> {\n\tconst workers = [...resolvedPluginConfig.environmentNameToWorkerMap.values()];\n\tconst workerNameToWorkerEntrypointExportsMap =\n\t\tgetWorkerNameToWorkerEntrypointExportsMap(workers);\n\tconst workerNameToDurableObjectExportsMap =\n\t\tgetWorkerNameToDurableObjectExportsMap(workers);\n\tconst workerNameToWorkflowEntrypointExportsMap =\n\t\tgetWorkerNameToWorkflowEntrypointExportsMap(workers);\n\n\treturn new Map(\n\t\tworkers.map((worker) => {\n\t\t\tconst workerEntrypointExports =\n\t\t\t\tworkerNameToWorkerEntrypointExportsMap.get(worker.config.name);\n\t\t\tassert(\n\t\t\t\tworkerEntrypointExports,\n\t\t\t\t`WorkerEntrypoint exports not found for Worker \"${worker.config.name}\"`\n\t\t\t);\n\t\t\tconst durableObjectExports = workerNameToDurableObjectExportsMap.get(\n\t\t\t\tworker.config.name\n\t\t\t);\n\t\t\tassert(\n\t\t\t\tdurableObjectExports,\n\t\t\t\t`DurableObject exports not found for Worker \"${worker.config.name}\"`\n\t\t\t);\n\t\t\tconst workflowEntrypointExports =\n\t\t\t\tworkerNameToWorkflowEntrypointExportsMap.get(worker.config.name);\n\t\t\tassert(\n\t\t\t\tworkflowEntrypointExports,\n\t\t\t\t`WorkflowEntrypoint exports not found for Worker \"${worker.config.name}\"`\n\t\t\t);\n\n\t\t\tconst exportTypes: ExportTypes = {};\n\n\t\t\tfor (const exportName of workerEntrypointExports) {\n\t\t\t\texportTypes[exportName] = \"WorkerEntrypoint\";\n\t\t\t}\n\n\t\t\tfor (const exportName of durableObjectExports) {\n\t\t\t\texportTypes[exportName] = \"DurableObject\";\n\t\t\t}\n\n\t\t\tfor (const exportName of workflowEntrypointExports) {\n\t\t\t\texportTypes[exportName] = \"WorkflowEntrypoint\";\n\t\t\t}\n\n\t\t\treturn [worker.config.name, exportTypes];\n\t\t})\n\t);\n}\n\n/**\n * Fetches the export types for all Workers and returns them in a Map\n */\nexport async function getCurrentWorkerNameToExportTypesMap(\n\tresolvedPluginConfig: WorkersResolvedConfig,\n\tviteDevServer: vite.ViteDevServer,\n\tminiflare: Miniflare\n): Promise<Map<string, ExportTypes>> {\n\tconst results = await Promise.all(\n\t\t[...resolvedPluginConfig.environmentNameToWorkerMap].map(\n\t\t\tasync ([environmentName, worker]) => {\n\t\t\t\tdebuglog(`Fetching export types for worker \"${worker.config.name}\"`);\n\t\t\t\tconst exportTypes = await (\n\t\t\t\t\tviteDevServer.environments[\n\t\t\t\t\t\tenvironmentName\n\t\t\t\t\t] as CloudflareDevEnvironment\n\t\t\t\t).fetchWorkerExportTypes(miniflare, worker.config);\n\n\t\t\t\treturn [worker.config.name, exportTypes] as const;\n\t\t\t}\n\t\t)\n\t);\n\n\treturn new Map(results);\n}\n\n/**\n * Compares the export types for all Workers and returns `true` if any have changed\n */\nexport function compareWorkerNameToExportTypesMaps(\n\toldWorkerNameToExportTypesMap: Map<string, ExportTypes>,\n\tnewWorkerNameToExportTypesMap: Map<string, ExportTypes>\n): boolean {\n\tfor (const workerName of newWorkerNameToExportTypesMap.keys()) {\n\t\tconst oldExportTypes = oldWorkerNameToExportTypesMap.get(workerName);\n\t\tassert(oldExportTypes, \"Expected old export types to be defined\");\n\t\tconst newExportTypes = newWorkerNameToExportTypesMap.get(workerName);\n\t\tassert(newExportTypes, \"Expected new export types to be defined\");\n\t\tconst hasChanged = compareExportTypes(oldExportTypes, newExportTypes);\n\n\t\tif (hasChanged) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Compares two `ExportTypes` objects and returns true if they do not match.\n * Checks for added/removed exports and changed export types.\n */\nexport function compareExportTypes(\n\toldExportTypes: ExportTypes,\n\tnewExportTypes: ExportTypes\n): boolean {\n\tconst oldKeys = Object.keys(oldExportTypes);\n\tconst newKeys = Object.keys(newExportTypes);\n\n\t// Check if number of exports has changed\n\tif (oldKeys.length !== newKeys.length) {\n\t\treturn true;\n\t}\n\n\t// Check if any keys were added or removed, or if any values changed\n\tfor (const key of newKeys) {\n\t\tif (\n\t\t\t!(key in oldExportTypes) ||\n\t\t\toldExportTypes[key] !== newExportTypes[key]\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n","import assert from \"node:assert\";\nimport { Miniflare } from \"miniflare\";\nimport { getInitialWorkerNameToExportTypesMap } from \"./export-types\";\nimport { debuglog } from \"./utils\";\nimport type { ExportTypes } from \"./export-types\";\nimport type { NodeJsCompat } from \"./nodejs-compat\";\nimport type {\n\tAssetsOnlyResolvedConfig,\n\tPreviewResolvedConfig,\n\tResolvedPluginConfig,\n\tWorkerConfig,\n\tWorkersResolvedConfig,\n} from \"./plugin-config\";\nimport type { MiniflareOptions } from \"miniflare\";\nimport type * as vite from \"vite\";\n\n/**\n * Used to store state that should persist across server restarts.\n * This is then accessed via `PluginContext`.\n */\nexport interface SharedContext {\n\tminiflare?: Miniflare;\n\tworkerNameToExportTypesMap?: Map<string, ExportTypes>;\n\thasShownWorkerConfigWarnings: boolean;\n\t/** Used to track whether hooks are being called because of a server restart or a server close event */\n\tisRestartingDevServer: boolean;\n}\n\n/**\n * Used to provide context to internal plugins.\n * It should be reinstantiated each time the main plugin is created.\n */\nexport class PluginContext {\n\t#sharedContext: SharedContext;\n\t#resolvedPluginConfig?: ResolvedPluginConfig;\n\t#resolvedViteConfig?: vite.ResolvedConfig;\n\n\tconstructor(sharedContext: SharedContext) {\n\t\tthis.#sharedContext = sharedContext;\n\t}\n\n\t/** Creates a new Miniflare instance or updates the existing instance */\n\tasync startOrUpdateMiniflare(options: MiniflareOptions): Promise<void> {\n\t\tif (!this.#sharedContext.miniflare) {\n\t\t\tdebuglog(\"Creating new Miniflare instance\");\n\t\t\tthis.#sharedContext.miniflare = new Miniflare(options);\n\t\t} else {\n\t\t\tdebuglog(\"Updating the existing Miniflare instance\");\n\t\t\tawait this.#sharedContext.miniflare.setOptions(options);\n\t\t}\n\t\tdebuglog(\"Miniflare is ready\");\n\t}\n\n\tasync disposeMiniflare(): Promise<void> {\n\t\tawait this.#sharedContext.miniflare?.dispose();\n\t\tthis.#sharedContext.miniflare = undefined;\n\t}\n\n\tget miniflare(): Miniflare {\n\t\tassert(this.#sharedContext.miniflare, \"Expected `miniflare` to be defined\");\n\n\t\treturn this.#sharedContext.miniflare;\n\t}\n\n\t/**\n\t * Gets the resolved inspector port provided by Miniflare\n\t */\n\tasync getResolvedInspectorPort(): Promise<number | null> {\n\t\tif (\n\t\t\tthis.resolvedPluginConfig.inspectorPort === false ||\n\t\t\t!this.#sharedContext.miniflare\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst miniflareInspectorUrl =\n\t\t\tawait this.#sharedContext.miniflare.getInspectorURL();\n\n\t\treturn Number.parseInt(miniflareInspectorUrl.port);\n\t}\n\n\tsetWorkerNameToExportTypesMap(\n\t\tworkerNameToExportTypesMap: Map<string, ExportTypes>\n\t): void {\n\t\tthis.#sharedContext.workerNameToExportTypesMap = workerNameToExportTypesMap;\n\t}\n\n\tget workerNameToExportTypesMap(): Map<string, ExportTypes> {\n\t\tif (!this.#sharedContext.workerNameToExportTypesMap) {\n\t\t\tif (this.resolvedPluginConfig.type !== \"workers\") {\n\t\t\t\treturn new Map();\n\t\t\t}\n\n\t\t\treturn getInitialWorkerNameToExportTypesMap(this.resolvedPluginConfig);\n\t\t}\n\n\t\treturn this.#sharedContext.workerNameToExportTypesMap;\n\t}\n\n\tsetHasShownWorkerConfigWarnings(hasShownWorkerConfigWarnings: boolean): void {\n\t\tthis.#sharedContext.hasShownWorkerConfigWarnings =\n\t\t\thasShownWorkerConfigWarnings;\n\t}\n\n\tget hasShownWorkerConfigWarnings(): boolean {\n\t\treturn this.#sharedContext.hasShownWorkerConfigWarnings;\n\t}\n\n\tsetIsRestartingDevServer(isRestartingDevServer: boolean): void {\n\t\tthis.#sharedContext.isRestartingDevServer = isRestartingDevServer;\n\t}\n\n\tget isRestartingDevServer(): boolean {\n\t\treturn this.#sharedContext.isRestartingDevServer;\n\t}\n\n\tsetResolvedPluginConfig(resolvedPluginConfig: ResolvedPluginConfig): void {\n\t\tthis.#resolvedPluginConfig = resolvedPluginConfig;\n\t}\n\n\tget resolvedPluginConfig(): ResolvedPluginConfig {\n\t\tassert(\n\t\t\tthis.#resolvedPluginConfig,\n\t\t\t\"Expected `resolvedPluginConfig` to be defined\"\n\t\t);\n\n\t\treturn this.#resolvedPluginConfig;\n\t}\n\n\tsetResolvedViteConfig(resolvedViteConfig: vite.ResolvedConfig): void {\n\t\tthis.#resolvedViteConfig = resolvedViteConfig;\n\t}\n\n\tget resolvedViteConfig(): vite.ResolvedConfig {\n\t\tassert(\n\t\t\tthis.#resolvedViteConfig,\n\t\t\t\"Expected `resolvedViteConfig` to be defined\"\n\t\t);\n\n\t\treturn this.#resolvedViteConfig;\n\t}\n\n\tgetWorkerConfig(environmentName: string): WorkerConfig | undefined {\n\t\treturn this.resolvedPluginConfig.type === \"workers\"\n\t\t\t? this.resolvedPluginConfig.environmentNameToWorkerMap.get(\n\t\t\t\t\tenvironmentName\n\t\t\t\t)?.config\n\t\t\t: undefined;\n\t}\n\n\tget entryWorkerConfig(): WorkerConfig | undefined {\n\t\tif (this.resolvedPluginConfig.type !== \"workers\") {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.resolvedPluginConfig.environmentNameToWorkerMap.get(\n\t\t\tthis.resolvedPluginConfig.entryWorkerEnvironmentName\n\t\t)?.config;\n\t}\n\n\tgetNodeJsCompat(environmentName: string): NodeJsCompat | undefined {\n\t\treturn this.resolvedPluginConfig.type === \"workers\"\n\t\t\t? this.resolvedPluginConfig.environmentNameToWorkerMap.get(\n\t\t\t\t\tenvironmentName\n\t\t\t\t)?.nodeJsCompat\n\t\t\t: undefined;\n\t}\n}\n\ninterface NarrowedPluginContext<T extends ResolvedPluginConfig>\n\textends PluginContext {\n\treadonly resolvedPluginConfig: T;\n}\n\nexport type AssetsOnlyPluginContext =\n\tNarrowedPluginContext<AssetsOnlyResolvedConfig>;\nexport type WorkersPluginContext = NarrowedPluginContext<WorkersResolvedConfig>;\nexport type PreviewPluginContext = NarrowedPluginContext<PreviewResolvedConfig>;\n\nexport function assertIsNotPreview(\n\tctx: PluginContext\n): asserts ctx is AssetsOnlyPluginContext | WorkersPluginContext {\n\tassert(\n\t\tctx.resolvedPluginConfig.type !== \"preview\",\n\t\t`Expected \"assets-only\" or \"workers\" plugin config`\n\t);\n}\n\nexport function assertIsPreview(\n\tctx: PluginContext\n): asserts ctx is PreviewPluginContext {\n\tassert(\n\t\tctx.resolvedPluginConfig.type === \"preview\",\n\t\t`Expected \"preview\" plugin config`\n\t);\n}\n","export const REDIRECTS_VERSION = 1;\nexport const HEADERS_VERSION = 2;\n\nexport const PERMITTED_STATUS_CODES = new Set([200, 301, 302, 303, 307, 308]);\nexport const HEADER_SEPARATOR = \":\";\nexport const MAX_LINE_LENGTH = 2000;\nexport const MAX_HEADER_RULES = 100;\nexport const MAX_DYNAMIC_REDIRECT_RULES = 100;\nexport const MAX_STATIC_REDIRECT_RULES = 2000;\nexport const UNSET_OPERATOR = \"! \";\n\nexport const SPLAT_REGEX = /\\*/g;\nexport const PLACEHOLDER_REGEX = /:[A-Za-z]\\w*/g;\n\n/** Max number of rules in `run_worker_first` */\nexport const MAX_ROUTES_RULES = 100;\n/** Max char length of each rule in `run_worker_first` */\nexport const MAX_ROUTES_RULE_LENGTH = 100;\n","import { MAX_ROUTES_RULE_LENGTH, MAX_ROUTES_RULES } from \"./constants\";\nimport type { StaticRouting } from \"../types\";\n\n// copy of what EWC does. Wrangler uploads the rules in one array (so the API is consistent with Wrangler config),\n// but router Worker expects the rules to be split into two arrays, which we do here.\n// This logic is translated from assets/staticrouting.go.\n\nexport function parseStaticRouting(input: string[]): StaticRouting {\n\tif (input.length === 0) {\n\t\tthrow new Error(\n\t\t\t\"No `run_worker_first` rules were provided; must provide at least 1 rule.\"\n\t\t);\n\t}\n\tif (input.length > MAX_ROUTES_RULES) {\n\t\tthrow new Error(\n\t\t\t`Too many \\`run_worker_first\\` rules were provided; ${input.length} rules provided exceeds max of ${MAX_ROUTES_RULES}.`\n\t\t);\n\t}\n\n\tconst rawAssetWorkerRules = [];\n\tconst assetWorkerRules = [];\n\tconst userWorkerRules = [];\n\tconst invalidRules = [];\n\n\tfor (const rule of input) {\n\t\tif (rule.startsWith(\"!/\")) {\n\t\t\tassetWorkerRules.push(rule.slice(1)); // Remove leading !\n\t\t\trawAssetWorkerRules.push(rule);\n\t\t} else if (rule.startsWith(\"/\")) {\n\t\t\tuserWorkerRules.push(rule);\n\t\t} else if (rule.startsWith(\"!\")) {\n\t\t\tinvalidRules.push(`'${rule}': negative rules must start with '!/'`);\n\t\t} else {\n\t\t\tinvalidRules.push(`'${rule}': rules must start with '/' or '!/'`);\n\t\t}\n\t}\n\n\tif (assetWorkerRules.length > 0 && userWorkerRules.length === 0) {\n\t\tthrow new Error(\n\t\t\t\"Only negative `run_worker_first` rules were provided; must provide at least 1 non-negative rule\"\n\t\t);\n\t}\n\n\tconst invalidAssetWorkerRules =\n\t\tvalidateStaticRoutingRules(rawAssetWorkerRules);\n\tconst invalidUserWorkerRules = validateStaticRoutingRules(userWorkerRules);\n\tconst errorMessage = formatInvalidRoutes([\n\t\t...invalidRules,\n\t\t...invalidUserWorkerRules,\n\t\t...invalidAssetWorkerRules,\n\t]);\n\n\tif (errorMessage) {\n\t\tthrow new Error(errorMessage);\n\t}\n\n\treturn { asset_worker: assetWorkerRules, user_worker: userWorkerRules };\n}\n\nfunction validateStaticRoutingRules(rules: string[]): string[] {\n\tconst invalid: string[] = [];\n\tconst seen = new Set<string>();\n\tfor (const rule of rules) {\n\t\tif (rule.length > MAX_ROUTES_RULE_LENGTH) {\n\t\t\tinvalid.push(\n\t\t\t\t`'${rule}': all rules must be less than ${MAX_ROUTES_RULE_LENGTH} characters in length`\n\t\t\t);\n\t\t}\n\t\tif (seen.has(rule)) {\n\t\t\tinvalid.push(`'${rule}': rule is a duplicate; rules must be unique`);\n\t\t}\n\t\tif (rule.endsWith(\"*\")) {\n\t\t\t// Check for redundant rules due to a glob\n\t\t\tfor (const otherRule of rules) {\n\t\t\t\tif (otherRule !== rule && otherRule.startsWith(rule.slice(0, -1))) {\n\t\t\t\t\tinvalid.push(`'${otherRule}': rule '${rule}' makes it redundant`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tseen.add(rule);\n\t}\n\treturn invalid;\n}\n\nconst formatInvalidRoutes = (invalidRules: string[]) => {\n\tif (invalidRules.length === 0) {\n\t\treturn undefined;\n\t}\n\treturn `Invalid routes in \\`run_worker_first\\`:\\n` + invalidRules.join(\"\\n\");\n};\n","import assert from \"node:assert\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport * as vite from \"vite\";\nimport { unstable_readConfig } from \"wrangler\";\nimport type {\n\tAssetsOnlyResolvedConfig,\n\tWorkersResolvedConfig,\n} from \"./plugin-config\";\n\ninterface DeployConfig {\n\tconfigPath: string;\n\tauxiliaryWorkers: Array<{ configPath: string }>;\n}\n\nfunction getDeployConfigPath(root: string) {\n\treturn path.resolve(root, \".wrangler\", \"deploy\", \"config.json\");\n}\n\nexport function getWorkerConfigs(root: string) {\n\tconst deployConfigPath = getDeployConfigPath(root);\n\tconst deployConfig = JSON.parse(\n\t\tfs.readFileSync(deployConfigPath, \"utf-8\")\n\t) as DeployConfig;\n\n\treturn [\n\t\t{ configPath: deployConfig.configPath },\n\t\t...deployConfig.auxiliaryWorkers,\n\t].map(({ configPath }) => {\n\t\tconst resolvedConfigPath = path.resolve(\n\t\t\tpath.dirname(deployConfigPath),\n\t\t\tconfigPath\n\t\t);\n\t\treturn unstable_readConfig({ config: resolvedConfigPath });\n\t});\n}\n\nfunction getRelativePathToWorkerConfig(\n\tdeployConfigDirectory: string,\n\troot: string,\n\toutputDirectory: string\n) {\n\treturn path.relative(\n\t\tdeployConfigDirectory,\n\t\tpath.resolve(root, outputDirectory, \"wrangler.json\")\n\t);\n}\n\nexport function writeDeployConfig(\n\tresolvedPluginConfig: AssetsOnlyResolvedConfig | WorkersResolvedConfig,\n\tresolvedViteConfig: vite.ResolvedConfig\n) {\n\tconst deployConfigPath = getDeployConfigPath(resolvedViteConfig.root);\n\tconst deployConfigDirectory = path.dirname(deployConfigPath);\n\n\tfs.mkdirSync(deployConfigDirectory, { recursive: true });\n\n\tif (resolvedPluginConfig.type === \"assets-only\") {\n\t\tconst clientOutputDirectory =\n\t\t\tresolvedViteConfig.environments.client?.build.outDir;\n\n\t\tassert(\n\t\t\tclientOutputDirectory,\n\t\t\t\"Unexpected error: client environment output directory is undefined\"\n\t\t);\n\n\t\tconst deployConfig: DeployConfig = {\n\t\t\tconfigPath: getRelativePathToWorkerConfig(\n\t\t\t\tdeployConfigDirectory,\n\t\t\t\tresolvedViteConfig.root,\n\t\t\t\tclientOutputDirectory\n\t\t\t),\n\t\t\tauxiliaryWorkers: [],\n\t\t};\n\n\t\tfs.writeFileSync(deployConfigPath, JSON.stringify(deployConfig));\n\t} else {\n\t\tlet entryWorkerConfigPath: string | undefined;\n\t\tconst auxiliaryWorkers: DeployConfig[\"auxiliaryWorkers\"] = [];\n\n\t\tfor (const environmentName of resolvedPluginConfig.environmentNameToWorkerMap.keys()) {\n\t\t\tconst outputDirectory =\n\t\t\t\tresolvedViteConfig.environments[environmentName]?.build.outDir;\n\n\t\t\tassert(\n\t\t\t\toutputDirectory,\n\t\t\t\t`Unexpected error: ${environmentName} environment output directory is undefined`\n\t\t\t);\n\n\t\t\tconst configPath = getRelativePathToWorkerConfig(\n\t\t\t\tdeployConfigDirectory,\n\t\t\t\tresolvedViteConfig.root,\n\t\t\t\toutputDirectory\n\t\t\t);\n\n\t\t\tif (environmentName === resolvedPluginConfig.entryWorkerEnvironmentName) {\n\t\t\t\tentryWorkerConfigPath = configPath;\n\t\t\t} else {\n\t\t\t\tauxiliaryWorkers.push({ configPath });\n\t\t\t}\n\t\t}\n\n\t\tassert(\n\t\t\tentryWorkerConfigPath,\n\t\t\t`Unexpected error: entryWorkerConfigPath is undefined`\n\t\t);\n\n\t\tconst deployConfig: DeployConfig = {\n\t\t\tconfigPath: entryWorkerConfigPath,\n\t\t\tauxiliaryWorkers,\n\t\t};\n\n\t\tfs.writeFileSync(deployConfigPath, JSON.stringify(deployConfig));\n\t}\n}\n","// This file was generated. Do not modify manually!\nvar astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];\n\n// This file was generated. Do not modify manually!\nvar astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];\n\n// This file was generated. Do not modify manually!\nvar nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0897-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65\";\n\n// This file was generated. Do not modify manually!\nvar nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0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33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c8a\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7cd\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7dc\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n\n// These are a run-length and offset encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range.\n\n// Reserved word lists for various dialects of the language\n\nvar reservedWords = {\n 3: \"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile\",\n 5: \"class enum extends super const export import\",\n 6: \"enum\",\n strict: \"implements interface let package private protected public static yield\",\n strictBind: \"eval arguments\"\n};\n\n// And the keywords\n\nvar ecma5AndLessKeywords = \"break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this\";\n\nvar keywords$1 = {\n 5: ecma5AndLessKeywords,\n \"5module\": ecma5AndLessKeywords + \" export import\",\n 6: ecma5AndLessKeywords + \" const class extends export import super\"\n};\n\nvar keywordRelationalOperator = /^in(stanceof)?$/;\n\n// ## Character categories\n\nvar nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\");\nvar nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\");\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code, set) {\n var pos = 0x10000;\n for (var i = 0; i < set.length; i += 2) {\n pos += set[i];\n if (pos > code) { return false }\n pos += set[i + 1];\n if (pos >= code) { return true }\n }\n return false\n}\n\n// Test whether a given character code starts an identifier.\n\nfunction isIdentifierStart(code, astral) {\n if (code < 65) { return code === 36 }\n if (code < 91) { return true }\n if (code < 97) { return code === 95 }\n if (code < 123) { return true }\n if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) }\n if (astral === false) { return false }\n return isInAstralSet(code, astralIdentifierStartCodes)\n}\n\n// Test whether a given character is part of an identifier.\n\nfunction isIdentifierChar(code, astral) {\n if (code < 48) { return code === 36 }\n if (code < 58) { return true }\n if (code < 65) { return false }\n if (code < 91) { return true }\n if (code < 97) { return code === 95 }\n if (code < 123) { return true }\n if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) }\n if (astral === false) { return false }\n return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)\n}\n\n// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between regular\n// expressions and divisions. It is set on all token types that can\n// be followed by an expression (thus, a slash after them would be a\n// regular expression).\n//\n// The `startsExpr` property is used to check if the token ends a\n// `yield` expression. It is set on all token types that either can\n// directly start an expression (like a quotation mark) or can\n// continue an expression (like the body of a string).\n//\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nvar TokenType = function TokenType(label, conf) {\n if ( conf === void 0 ) conf = {};\n\n this.label = label;\n this.keyword = conf.keyword;\n this.beforeExpr = !!conf.beforeExpr;\n this.startsExpr = !!conf.startsExpr;\n this.isLoop = !!conf.isLoop;\n this.isAssign = !!conf.isAssign;\n this.prefix = !!conf.prefix;\n this.postfix = !!conf.postfix;\n this.binop = conf.binop || null;\n this.updateContext = null;\n};\n\nfunction binop(name, prec) {\n return new TokenType(name, {beforeExpr: true, binop: prec})\n}\nvar beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true};\n\n// Map keyword names to token types.\n\nvar keywords = {};\n\n// Succinct definitions of keyword token types\nfunction kw(name, options) {\n if ( options === void 0 ) options = {};\n\n options.keyword = name;\n return keywords[name] = new TokenType(name, options)\n}\n\nvar types$1 = {\n num: new TokenType(\"num\", startsExpr),\n regexp: new TokenType(\"regexp\", startsExpr),\n string: new TokenType(\"string\", startsExpr),\n name: new TokenType(\"name\", startsExpr),\n privateId: new TokenType(\"privateId\", startsExpr),\n eof: new TokenType(\"eof\"),\n\n // Punctuation token types.\n bracketL: new TokenType(\"[\", {beforeExpr: true, startsExpr: true}),\n bracketR: new TokenType(\"]\"),\n braceL: new TokenType(\"{\", {beforeExpr: true, startsExpr: true}),\n braceR: new TokenType(\"}\"),\n parenL: new TokenType(\"(\", {beforeExpr: true, startsExpr: true}),\n parenR: new TokenType(\")\"),\n comma: new TokenType(\",\", beforeExpr),\n semi: new TokenType(\";\", beforeExpr),\n colon: new TokenType(\":\", beforeExpr),\n dot: new TokenType(\".\"),\n question: new TokenType(\"?\", beforeExpr),\n questionDot: new TokenType(\"?.\"),\n arrow: new TokenType(\"=>\", beforeExpr),\n template: new TokenType(\"template\"),\n invalidTemplate: new TokenType(\"invalidTemplate\"),\n ellipsis: new TokenType(\"...\", beforeExpr),\n backQuote: new TokenType(\"`\", startsExpr),\n dollarBraceL: new TokenType(\"${\", {beforeExpr: true, startsExpr: true}),\n\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n\n eq: new TokenType(\"=\", {beforeExpr: true, isAssign: true}),\n assign: new TokenType(\"_=\", {beforeExpr: true, isAssign: true}),\n incDec: new TokenType(\"++/--\", {prefix: true, postfix: true, startsExpr: true}),\n prefix: new TokenType(\"!/~\", {beforeExpr: true, prefix: true, startsExpr: true}),\n logicalOR: binop(\"||\", 1),\n logicalAND: binop(\"&&\", 2),\n bitwiseOR: binop(\"|\", 3),\n bitwiseXOR: binop(\"^\", 4),\n bitwiseAND: binop(\"&\", 5),\n equality: binop(\"==/!=/===/!==\", 6),\n relational: binop(\"</>/<=/>=\", 7),\n bitShift: binop(\"<</>>/>>>\", 8),\n plusMin: new TokenType(\"+/-\", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),\n modulo: binop(\"%\", 10),\n star: binop(\"*\", 10),\n slash: binop(\"/\", 10),\n starstar: new TokenType(\"**\", {beforeExpr: true}),\n coalesce: binop(\"??\", 1),\n\n // Keyword token types.\n _break: kw(\"break\"),\n _case: kw(\"case\", beforeExpr),\n _catch: kw(\"catch\"),\n _continue: kw(\"continue\"),\n _debugger: kw(\"debugger\"),\n _default: kw(\"default\", beforeExpr),\n _do: kw(\"do\", {isLoop: true, beforeExpr: true}),\n _else: kw(\"else\", beforeExpr),\n _finally: kw(\"finally\"),\n _for: kw(\"for\", {isLoop: true}),\n _function: kw(\"function\", startsExpr),\n _if: kw(\"if\"),\n _return: kw(\"return\", beforeExpr),\n _switch: kw(\"switch\"),\n _throw: kw(\"throw\", beforeExpr),\n _try: kw(\"try\"),\n _var: kw(\"var\"),\n _const: kw(\"const\"),\n _while: kw(\"while\", {isLoop: true}),\n _with: kw(\"with\"),\n _new: kw(\"new\", {beforeExpr: true, startsExpr: true}),\n _this: kw(\"this\", startsExpr),\n _super: kw(\"super\", startsExpr),\n _class: kw(\"class\", startsExpr),\n _extends: kw(\"extends\", beforeExpr),\n _export: kw(\"export\"),\n _import: kw(\"import\", startsExpr),\n _null: kw(\"null\", startsExpr),\n _true: kw(\"true\", startsExpr),\n _false: kw(\"false\", startsExpr),\n _in: kw(\"in\", {beforeExpr: true, binop: 7}),\n _instanceof: kw(\"instanceof\", {beforeExpr: true, binop: 7}),\n _typeof: kw(\"typeof\", {beforeExpr: true, prefix: true, startsExpr: true}),\n _void: kw(\"void\", {beforeExpr: true, prefix: true, startsExpr: true}),\n _delete: kw(\"delete\", {beforeExpr: true, prefix: true, startsExpr: true})\n};\n\n// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\n\nvar lineBreak = /\\r\\n?|\\n|\\u2028|\\u2029/;\nvar lineBreakG = new RegExp(lineBreak.source, \"g\");\n\nfunction isNewLine(code) {\n return code === 10 || code === 13 || code === 0x2028 || code === 0x2029\n}\n\nfunction nextLineBreak(code, from, end) {\n if ( end === void 0 ) end = code.length;\n\n for (var i = from; i < end; i++) {\n var next = code.charCodeAt(i);\n if (isNewLine(next))\n { return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1 }\n }\n return -1\n}\n\nvar nonASCIIwhitespace = /[\\u1680\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff]/;\n\nvar skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\n\nvar ref = Object.prototype;\nvar hasOwnProperty = ref.hasOwnProperty;\nvar toString = ref.toString;\n\nvar hasOwn = Object.hasOwn || (function (obj, propName) { return (\n hasOwnProperty.call(obj, propName)\n); });\n\nvar isArray = Array.isArray || (function (obj) { return (\n toString.call(obj) === \"[object Array]\"\n); });\n\nvar regexpCache = Object.create(null);\n\nfunction wordsRegexp(words) {\n return regexpCache[words] || (regexpCache[words] = new RegExp(\"^(?:\" + words.replace(/ /g, \"|\") + \")$\"))\n}\n\nfunction codePointToString(code) {\n // UTF-16 Decoding\n if (code <= 0xFFFF) { return String.fromCharCode(code) }\n code -= 0x10000;\n return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)\n}\n\nvar loneSurrogate = /(?:[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/;\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nvar Position = function Position(line, col) {\n this.line = line;\n this.column = col;\n};\n\nPosition.prototype.offset = function offset (n) {\n return new Position(this.line, this.column + n)\n};\n\nvar SourceLocation = function SourceLocation(p, start, end) {\n this.start = start;\n this.end = end;\n if (p.sourceFile !== null) { this.source = p.sourceFile; }\n};\n\n// The `getLineInfo` function is mostly useful when the\n// `locations` option is off (for performance reasons) and you\n// want to find the line/column position for a given character\n// offset. `input` should be the code string that the offset refers\n// into.\n\nfunction getLineInfo(input, offset) {\n for (var line = 1, cur = 0;;) {\n var nextBreak = nextLineBreak(input, cur, offset);\n if (nextBreak < 0) { return new Position(line, offset - cur) }\n ++line;\n cur = nextBreak;\n }\n}\n\n// A second argument must be given to configure the parser process.\n// These options are recognized (only `ecmaVersion` is required):\n\nvar defaultOptions = {\n // `ecmaVersion` indicates the ECMAScript version to parse. Must be\n // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10\n // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `\"latest\"`\n // (the latest version the library supports). This influences\n // support for strict mode, the set of reserved words, and support\n // for new syntax features.\n ecmaVersion: null,\n // `sourceType` indicates the mode the code should be parsed in.\n // Can be either `\"script\"` or `\"module\"`. This influences global\n // strict mode and parsing of `import` and `export` declarations.\n sourceType: \"script\",\n // `onInsertedSemicolon` can be a callback that will be called when\n // a semicolon is automatically inserted. It will be passed the\n // position of the inserted semicolon as an offset, and if\n // `locations` is enabled, it is given the location as a `{line,\n // column}` object as second argument.\n onInsertedSemicolon: null,\n // `onTrailingComma` is similar to `onInsertedSemicolon`, but for\n // trailing commas.\n onTrailingComma: null,\n // By default, reserved words are only enforced if ecmaVersion >= 5.\n // Set `allowReserved` to a boolean value to explicitly turn this on\n // an off. When this option has the value \"never\", reserved words\n // and keywords can also not be used as property names.\n allowReserved: null,\n // When enabled, a return at the top level is not considered an\n // error.\n allowReturnOutsideFunction: false,\n // When enabled, import/export statements are not constrained to\n // appearing at the top of the program, and an import.meta expression\n // in a script isn't considered an error.\n allowImportExportEverywhere: false,\n // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022.\n // When enabled, await identifiers are allowed to appear at the top-level scope,\n // but they are still not allowed in non-async functions.\n allowAwaitOutsideFunction: null,\n // When enabled, super identifiers are not constrained to\n // appearing in methods and do not raise an error when they appear elsewhere.\n allowSuperOutsideMethod: null,\n // When enabled, hashbang directive in the beginning of file is\n // allowed and treated as a line comment. Enabled by default when\n // `ecmaVersion` >= 2023.\n allowHashBang: false,\n // By default, the parser will verify that private properties are\n // only used in places where they are valid and have been declared.\n // Set this to false to turn such checks off.\n checkPrivateFields: true,\n // When `locations` is on, `loc` properties holding objects with\n // `start` and `end` properties in `{line, column}` form (with\n // line being 1-based and column 0-based) will be attached to the\n // nodes.\n locations: false,\n // A function can be passed as `onToken` option, which will\n // cause Acorn to call that function with object in the same\n // format as tokens returned from `tokenizer().getToken()`. Note\n // that you are not allowed to call the parser from the\n // callback—that will corrupt its internal state.\n onToken: null,\n // A function can be passed as `onComment` option, which will\n // cause Acorn to call that function with `(block, text, start,\n // end)` parameters whenever a comment is skipped. `block` is a\n // boolean indicating whether this is a block (`/* */`) comment,\n // `text` is the content of the comment, and `start` and `end` are\n // character offsets that denote the start and end of the comment.\n // When the `locations` option is on, two more parameters are\n // passed, the full `{line, column}` locations of the start and\n // end of the comments. Note that you are not allowed to call the\n // parser from the callback—that will corrupt its internal state.\n // When this option has an array as value, objects representing the\n // comments are pushed to it.\n onComment: null,\n // Nodes have their start and end characters offsets recorded in\n // `start` and `end` properties (directly on the node, rather than\n // the `loc` object, which holds line/column data. To also add a\n // [semi-standardized][range] `range` property holding a `[start,\n // end]` array with the same numbers, set the `ranges` option to\n // `true`.\n //\n // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678\n ranges: false,\n // It is possible to parse multiple files into a single AST by\n // passing the tree produced by parsing the first file as\n // `program` option in subsequent parses. This will add the\n // toplevel forms of the parsed file to the `Program` (top) node\n // of an existing parse tree.\n program: null,\n // When `locations` is on, you can pass this to record the source\n // file in every node's `loc` object.\n sourceFile: null,\n // This value, if given, is stored in every node, whether\n // `locations` is on or off.\n directSourceFile: null,\n // When enabled, parenthesized expressions are represented by\n // (non-standard) ParenthesizedExpression nodes\n preserveParens: false\n};\n\n// Interpret and default an options object\n\nvar warnedAboutEcmaVersion = false;\n\nfunction getOptions(opts) {\n var options = {};\n\n for (var opt in defaultOptions)\n { options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]; }\n\n if (options.ecmaVersion === \"latest\") {\n options.ecmaVersion = 1e8;\n } else if (options.ecmaVersion == null) {\n if (!warnedAboutEcmaVersion && typeof console === \"object\" && console.warn) {\n warnedAboutEcmaVersion = true;\n console.warn(\"Since Acorn 8.0.0, options.ecmaVersion is required.\\nDefaulting to 2020, but this will stop working in the future.\");\n }\n options.ecmaVersion = 11;\n } else if (options.ecmaVersion >= 2015) {\n options.ecmaVersion -= 2009;\n }\n\n if (options.allowReserved == null)\n { options.allowReserved = options.ecmaVersion < 5; }\n\n if (!opts || opts.allowHashBang == null)\n { options.allowHashBang = options.ecmaVersion >= 14; }\n\n if (isArray(options.onToken)) {\n var tokens = options.onToken;\n options.onToken = function (token) { return tokens.push(token); };\n }\n if (isArray(options.onComment))\n { options.onComment = pushComment(options, options.onComment); }\n\n return options\n}\n\nfunction pushComment(options, array) {\n return function(block, text, start, end, startLoc, endLoc) {\n var comment = {\n type: block ? \"Block\" : \"Line\",\n value: text,\n start: start,\n end: end\n };\n if (options.locations)\n { comment.loc = new SourceLocation(this, startLoc, endLoc); }\n if (options.ranges)\n { comment.range = [start, end]; }\n array.push(comment);\n }\n}\n\n// Each scope gets a bitset that may contain these flags\nvar\n SCOPE_TOP = 1,\n SCOPE_FUNCTION = 2,\n SCOPE_ASYNC = 4,\n SCOPE_GENERATOR = 8,\n SCOPE_ARROW = 16,\n SCOPE_SIMPLE_CATCH = 32,\n SCOPE_SUPER = 64,\n SCOPE_DIRECT_SUPER = 128,\n SCOPE_CLASS_STATIC_BLOCK = 256,\n SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;\n\nfunction functionFlags(async, generator) {\n return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0)\n}\n\n// Used in checkLVal* and declareName to determine the type of a binding\nvar\n BIND_NONE = 0, // Not a binding\n BIND_VAR = 1, // Var-style binding\n BIND_LEXICAL = 2, // Let- or const-style binding\n BIND_FUNCTION = 3, // Function declaration\n BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding\n BIND_OUTSIDE = 5; // Special case for function names as bound inside the function\n\nvar Parser = function Parser(options, input, startPos) {\n this.options = options = getOptions(options);\n this.sourceFile = options.sourceFile;\n this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === \"module\" ? \"5module\" : 5]);\n var reserved = \"\";\n if (options.allowReserved !== true) {\n reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3];\n if (options.sourceType === \"module\") { reserved += \" await\"; }\n }\n this.reservedWords = wordsRegexp(reserved);\n var reservedStrict = (reserved ? reserved + \" \" : \"\") + reservedWords.strict;\n this.reservedWordsStrict = wordsRegexp(reservedStrict);\n this.reservedWordsStrictBind = wordsRegexp(reservedStrict + \" \" + reservedWords.strictBind);\n this.input = String(input);\n\n // Used to signal to callers of `readWord1` whether the word\n // contained any escape sequences. This is needed because words with\n // escape sequences must not be interpreted as keywords.\n this.containsEsc = false;\n\n // Set up token state\n\n // The current position of the tokenizer in the input.\n if (startPos) {\n this.pos = startPos;\n this.lineStart = this.input.lastIndexOf(\"\\n\", startPos - 1) + 1;\n this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;\n } else {\n this.pos = this.lineStart = 0;\n this.curLine = 1;\n }\n\n // Properties of the current token:\n // Its type\n this.type = types$1.eof;\n // For tokens that include more information than their type, the value\n this.value = null;\n // Its start and end offset\n this.start = this.end = this.pos;\n // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n this.startLoc = this.endLoc = this.curPosition();\n\n // Position information for the previous token\n this.lastTokEndLoc = this.lastTokStartLoc = null;\n this.lastTokStart = this.lastTokEnd = this.pos;\n\n // The context stack is used to superficially track syntactic\n // context to predict whether a regular expression is allowed in a\n // given position.\n this.context = this.initialContext();\n this.exprAllowed = true;\n\n // Figure out if it's a module code.\n this.inModule = options.sourceType === \"module\";\n this.strict = this.inModule || this.strictDirective(this.pos);\n\n // Used to signify the start of a potential arrow function\n this.potentialArrowAt = -1;\n this.potentialArrowInForAwait = false;\n\n // Positions to delayed-check that yield/await does not exist in default parameters.\n this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;\n // Labels in scope.\n this.labels = [];\n // Thus-far undefined exports.\n this.undefinedExports = Object.create(null);\n\n // If enabled, skip leading hashbang line.\n if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === \"#!\")\n { this.skipLineComment(2); }\n\n // Scope tracking for duplicate variable names (see scope.js)\n this.scopeStack = [];\n this.enterScope(SCOPE_TOP);\n\n // For RegExp validation\n this.regexpState = null;\n\n // The stack of private names.\n // Each element has two properties: 'declared' and 'used'.\n // When it exited from the outermost class definition, all used private names must be declared.\n this.privateNameStack = [];\n};\n\nvar prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },canAwait: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true },allowNewDotTarget: { configurable: true },inClassStaticBlock: { configurable: true } };\n\nParser.prototype.parse = function parse () {\n var node = this.options.program || this.startNode();\n this.nextToken();\n return this.parseTopLevel(node)\n};\n\nprototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 };\n\nprototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit };\n\nprototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit };\n\nprototypeAccessors.canAwait.get = function () {\n for (var i = this.scopeStack.length - 1; i >= 0; i--) {\n var scope = this.scopeStack[i];\n if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) { return false }\n if (scope.flags & SCOPE_FUNCTION) { return (scope.flags & SCOPE_ASYNC) > 0 }\n }\n return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction\n};\n\nprototypeAccessors.allowSuper.get = function () {\n var ref = this.currentThisScope();\n var flags = ref.flags;\n var inClassFieldInit = ref.inClassFieldInit;\n return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod\n};\n\nprototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 };\n\nprototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) };\n\nprototypeAccessors.allowNewDotTarget.get = function () {\n var ref = this.currentThisScope();\n var flags = ref.flags;\n var inClassFieldInit = ref.inClassFieldInit;\n return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit\n};\n\nprototypeAccessors.inClassStaticBlock.get = function () {\n return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0\n};\n\nParser.extend = function extend () {\n var plugins = [], len = arguments.length;\n while ( len-- ) plugins[ len ] = arguments[ len ];\n\n var cls = this;\n for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); }\n return cls\n};\n\nParser.parse = function parse (input, options) {\n return new this(options, input).parse()\n};\n\nParser.parseExpressionAt = function parseExpressionAt (input, pos, options) {\n var parser = new this(options, input, pos);\n parser.nextToken();\n return parser.parseExpression()\n};\n\nParser.tokenizer = function tokenizer (input, options) {\n return new this(options, input)\n};\n\nObject.defineProperties( Parser.prototype, prototypeAccessors );\n\nvar pp$9 = Parser.prototype;\n\n// ## Parser utilities\n\nvar literal = /^(?:'((?:\\\\[^]|[^'\\\\])*?)'|\"((?:\\\\[^]|[^\"\\\\])*?)\")/;\npp$9.strictDirective = function(start) {\n if (this.options.ecmaVersion < 5) { return false }\n for (;;) {\n // Try to find string literal.\n skipWhiteSpace.lastIndex = start;\n start += skipWhiteSpace.exec(this.input)[0].length;\n var match = literal.exec(this.input.slice(start));\n if (!match) { return false }\n if ((match[1] || match[2]) === \"use strict\") {\n skipWhiteSpace.lastIndex = start + match[0].length;\n var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;\n var next = this.input.charAt(end);\n return next === \";\" || next === \"}\" ||\n (lineBreak.test(spaceAfter[0]) &&\n !(/[(`.[+\\-/*%<>=,?^&]/.test(next) || next === \"!\" && this.input.charAt(end + 1) === \"=\"))\n }\n start += match[0].length;\n\n // Skip semicolon, if any.\n skipWhiteSpace.lastIndex = start;\n start += skipWhiteSpace.exec(this.input)[0].length;\n if (this.input[start] === \";\")\n { start++; }\n }\n};\n\n// Predicate that tests whether the next token is of the given\n// type, and if yes, consumes it as a side effect.\n\npp$9.eat = function(type) {\n if (this.type === type) {\n this.next();\n return true\n } else {\n return false\n }\n};\n\n// Tests whether parsed token is a contextual keyword.\n\npp$9.isContextual = function(name) {\n return this.type === types$1.name && this.value === name && !this.containsEsc\n};\n\n// Consumes contextual keyword if possible.\n\npp$9.eatContextual = function(name) {\n if (!this.isContextual(name)) { return false }\n this.next();\n return true\n};\n\n// Asserts that following token is given contextual keyword.\n\npp$9.expectContextual = function(name) {\n if (!this.eatContextual(name)) { this.unexpected(); }\n};\n\n// Test whether a semicolon can be inserted at the current position.\n\npp$9.canInsertSemicolon = function() {\n return this.type === types$1.eof ||\n this.type === types$1.braceR ||\n lineBreak.test(this.input.slice(this.lastTokEnd, this.start))\n};\n\npp$9.insertSemicolon = function() {\n if (this.canInsertSemicolon()) {\n if (this.options.onInsertedSemicolon)\n { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); }\n return true\n }\n};\n\n// Consume a semicolon, or, failing that, see if we are allowed to\n// pretend that there is a semicolon at this position.\n\npp$9.semicolon = function() {\n if (!this.eat(types$1.semi) && !this.insertSemicolon()) { this.unexpected(); }\n};\n\npp$9.afterTrailingComma = function(tokType, notNext) {\n if (this.type === tokType) {\n if (this.options.onTrailingComma)\n { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); }\n if (!notNext)\n { this.next(); }\n return true\n }\n};\n\n// Expect a token of a given type. If found, consume it, otherwise,\n// raise an unexpected token error.\n\npp$9.expect = function(type) {\n this.eat(type) || this.unexpected();\n};\n\n// Raise an unexpected token error.\n\npp$9.unexpected = function(pos) {\n this.raise(pos != null ? pos : this.start, \"Unexpected token\");\n};\n\nvar DestructuringErrors = function DestructuringErrors() {\n this.shorthandAssign =\n this.trailingComma =\n this.parenthesizedAssign =\n this.parenthesizedBind =\n this.doubleProto =\n -1;\n};\n\npp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) {\n if (!refDestructuringErrors) { return }\n if (refDestructuringErrors.trailingComma > -1)\n { this.raiseRecoverable(refDestructuringErrors.trailingComma, \"Comma is not permitted after the rest element\"); }\n var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;\n if (parens > -1) { this.raiseRecoverable(parens, isAssign ? \"Assigning to rvalue\" : \"Parenthesized pattern\"); }\n};\n\npp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) {\n if (!refDestructuringErrors) { return false }\n var shorthandAssign = refDestructuringErrors.shorthandAssign;\n var doubleProto = refDestructuringErrors.doubleProto;\n if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 }\n if (shorthandAssign >= 0)\n { this.raise(shorthandAssign, \"Shorthand property assignments are valid only in destructuring patterns\"); }\n if (doubleProto >= 0)\n { this.raiseRecoverable(doubleProto, \"Redefinition of __proto__ property\"); }\n};\n\npp$9.checkYieldAwaitInDefaultParams = function() {\n if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))\n { this.raise(this.yieldPos, \"Yield expression cannot be a default value\"); }\n if (this.awaitPos)\n { this.raise(this.awaitPos, \"Await expression cannot be a default value\"); }\n};\n\npp$9.isSimpleAssignTarget = function(expr) {\n if (expr.type === \"ParenthesizedExpression\")\n { return this.isSimpleAssignTarget(expr.expression) }\n return expr.type === \"Identifier\" || expr.type === \"MemberExpression\"\n};\n\nvar pp$8 = Parser.prototype;\n\n// ### Statement parsing\n\n// Parse a program. Initializes the parser, reads any number of\n// statements, and wraps them in a Program node. Optionally takes a\n// `program` argument. If present, the statements will be appended\n// to its body instead of creating a new node.\n\npp$8.parseTopLevel = function(node) {\n var exports = Object.create(null);\n if (!node.body) { node.body = []; }\n while (this.type !== types$1.eof) {\n var stmt = this.parseStatement(null, true, exports);\n node.body.push(stmt);\n }\n if (this.inModule)\n { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1)\n {\n var name = list[i];\n\n this.raiseRecoverable(this.undefinedExports[name].start, (\"Export '\" + name + \"' is not defined\"));\n } }\n this.adaptDirectivePrologue(node.body);\n this.next();\n node.sourceType = this.options.sourceType;\n return this.finishNode(node, \"Program\")\n};\n\nvar loopLabel = {kind: \"loop\"}, switchLabel = {kind: \"switch\"};\n\npp$8.isLet = function(context) {\n if (this.options.ecmaVersion < 6 || !this.isContextual(\"let\")) { return false }\n skipWhiteSpace.lastIndex = this.pos;\n var skip = skipWhiteSpace.exec(this.input);\n var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);\n // For ambiguous cases, determine if a LexicalDeclaration (or only a\n // Statement) is allowed here. If context is not empty then only a Statement\n // is allowed. However, `let [` is an explicit negative lookahead for\n // ExpressionStatement, so special-case it first.\n if (nextCh === 91 || nextCh === 92) { return true } // '[', '\\'\n if (context) { return false }\n\n if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral\n if (isIdentifierStart(nextCh, true)) {\n var pos = next + 1;\n while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; }\n if (nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true }\n var ident = this.input.slice(next, pos);\n if (!keywordRelationalOperator.test(ident)) { return true }\n }\n return false\n};\n\n// check 'async [no LineTerminator here] function'\n// - 'async /*foo*/ function' is OK.\n// - 'async /*\\n*/ function' is invalid.\npp$8.isAsyncFunction = function() {\n if (this.options.ecmaVersion < 8 || !this.isContextual(\"async\"))\n { return false }\n\n skipWhiteSpace.lastIndex = this.pos;\n var skip = skipWhiteSpace.exec(this.input);\n var next = this.pos + skip[0].length, after;\n return !lineBreak.test(this.input.slice(this.pos, next)) &&\n this.input.slice(next, next + 8) === \"function\" &&\n (next + 8 === this.input.length ||\n !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 0xd7ff && after < 0xdc00))\n};\n\n// Parse a single statement.\n//\n// If expecting a statement and finding a slash operator, parse a\n// regular expression literal. This is to handle cases like\n// `if (foo) /blah/.exec(foo)`, where looking at the previous token\n// does not help.\n\npp$8.parseStatement = function(context, topLevel, exports) {\n var starttype = this.type, node = this.startNode(), kind;\n\n if (this.isLet(context)) {\n starttype = types$1._var;\n kind = \"let\";\n }\n\n // Most types of statements are recognized by the keyword they\n // start with. Many are trivial to parse, some require a bit of\n // complexity.\n\n switch (starttype) {\n case types$1._break: case types$1._continue: return this.parseBreakContinueStatement(node, starttype.keyword)\n case types$1._debugger: return this.parseDebuggerStatement(node)\n case types$1._do: return this.parseDoStatement(node)\n case types$1._for: return this.parseForStatement(node)\n case types$1._function:\n // Function as sole body of either an if statement or a labeled statement\n // works, but not when it is part of a labeled statement that is the sole\n // body of an if statement.\n if ((context && (this.strict || context !== \"if\" && context !== \"label\")) && this.options.ecmaVersion >= 6) { this.unexpected(); }\n return this.parseFunctionStatement(node, false, !context)\n case types$1._class:\n if (context) { this.unexpected(); }\n return this.parseClass(node, true)\n case types$1._if: return this.parseIfStatement(node)\n case types$1._return: return this.parseReturnStatement(node)\n case types$1._switch: return this.parseSwitchStatement(node)\n case types$1._throw: return this.parseThrowStatement(node)\n case types$1._try: return this.parseTryStatement(node)\n case types$1._const: case types$1._var:\n kind = kind || this.value;\n if (context && kind !== \"var\") { this.unexpected(); }\n return this.parseVarStatement(node, kind)\n case types$1._while: return this.parseWhileStatement(node)\n case types$1._with: return this.parseWithStatement(node)\n case types$1.braceL: return this.parseBlock(true, node)\n case types$1.semi: return this.parseEmptyStatement(node)\n case types$1._export:\n case types$1._import:\n if (this.options.ecmaVersion > 10 && starttype === types$1._import) {\n skipWhiteSpace.lastIndex = this.pos;\n var skip = skipWhiteSpace.exec(this.input);\n var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);\n if (nextCh === 40 || nextCh === 46) // '(' or '.'\n { return this.parseExpressionStatement(node, this.parseExpression()) }\n }\n\n if (!this.options.allowImportExportEverywhere) {\n if (!topLevel)\n { this.raise(this.start, \"'import' and 'export' may only appear at the top level\"); }\n if (!this.inModule)\n { this.raise(this.start, \"'import' and 'export' may appear only with 'sourceType: module'\"); }\n }\n return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports)\n\n // If the statement does not start with a statement keyword or a\n // brace, it's an ExpressionStatement or LabeledStatement. We\n // simply start parsing an expression, and afterwards, if the\n // next token is a colon and the expression was a simple\n // Identifier node, we switch to interpreting it as a label.\n default:\n if (this.isAsyncFunction()) {\n if (context) { this.unexpected(); }\n this.next();\n return this.parseFunctionStatement(node, true, !context)\n }\n\n var maybeName = this.value, expr = this.parseExpression();\n if (starttype === types$1.name && expr.type === \"Identifier\" && this.eat(types$1.colon))\n { return this.parseLabeledStatement(node, maybeName, expr, context) }\n else { return this.parseExpressionStatement(node, expr) }\n }\n};\n\npp$8.parseBreakContinueStatement = function(node, keyword) {\n var isBreak = keyword === \"break\";\n this.next();\n if (this.eat(types$1.semi) || this.insertSemicolon()) { node.label = null; }\n else if (this.type !== types$1.name) { this.unexpected(); }\n else {\n node.label = this.parseIdent();\n this.semicolon();\n }\n\n // Verify that there is an actual destination to break or\n // continue to.\n var i = 0;\n for (; i < this.labels.length; ++i) {\n var lab = this.labels[i];\n if (node.label == null || lab.name === node.label.name) {\n if (lab.kind != null && (isBreak || lab.kind === \"loop\")) { break }\n if (node.label && isBreak) { break }\n }\n }\n if (i === this.labels.length) { this.raise(node.start, \"Unsyntactic \" + keyword); }\n return this.finishNode(node, isBreak ? \"BreakStatement\" : \"ContinueStatement\")\n};\n\npp$8.parseDebuggerStatement = function(node) {\n this.next();\n this.semicolon();\n return this.finishNode(node, \"DebuggerStatement\")\n};\n\npp$8.parseDoStatement = function(node) {\n this.next();\n this.labels.push(loopLabel);\n node.body = this.parseStatement(\"do\");\n this.labels.pop();\n this.expect(types$1._while);\n node.test = this.parseParenExpression();\n if (this.options.ecmaVersion >= 6)\n { this.eat(types$1.semi); }\n else\n { this.semicolon(); }\n return this.finishNode(node, \"DoWhileStatement\")\n};\n\n// Disambiguating between a `for` and a `for`/`in` or `for`/`of`\n// loop is non-trivial. Basically, we have to parse the init `var`\n// statement or expression, disallowing the `in` operator (see\n// the second parameter to `parseExpression`), and then check\n// whether the next token is `in` or `of`. When there is no init\n// part (semicolon immediately after the opening parenthesis), it\n// is a regular `for` loop.\n\npp$8.parseForStatement = function(node) {\n this.next();\n var awaitAt = (this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual(\"await\")) ? this.lastTokStart : -1;\n this.labels.push(loopLabel);\n this.enterScope(0);\n this.expect(types$1.parenL);\n if (this.type === types$1.semi) {\n if (awaitAt > -1) { this.unexpected(awaitAt); }\n return this.parseFor(node, null)\n }\n var isLet = this.isLet();\n if (this.type === types$1._var || this.type === types$1._const || isLet) {\n var init$1 = this.startNode(), kind = isLet ? \"let\" : this.value;\n this.next();\n this.parseVar(init$1, true, kind);\n this.finishNode(init$1, \"VariableDeclaration\");\n if ((this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual(\"of\"))) && init$1.declarations.length === 1) {\n if (this.options.ecmaVersion >= 9) {\n if (this.type === types$1._in) {\n if (awaitAt > -1) { this.unexpected(awaitAt); }\n } else { node.await = awaitAt > -1; }\n }\n return this.parseForIn(node, init$1)\n }\n if (awaitAt > -1) { this.unexpected(awaitAt); }\n return this.parseFor(node, init$1)\n }\n var startsWithLet = this.isContextual(\"let\"), isForOf = false;\n var containsEsc = this.containsEsc;\n var refDestructuringErrors = new DestructuringErrors;\n var initPos = this.start;\n var init = awaitAt > -1\n ? this.parseExprSubscripts(refDestructuringErrors, \"await\")\n : this.parseExpression(true, refDestructuringErrors);\n if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual(\"of\"))) {\n if (awaitAt > -1) { // implies `ecmaVersion >= 9` (see declaration of awaitAt)\n if (this.type === types$1._in) { this.unexpected(awaitAt); }\n node.await = true;\n } else if (isForOf && this.options.ecmaVersion >= 8) {\n if (init.start === initPos && !containsEsc && init.type === \"Identifier\" && init.name === \"async\") { this.unexpected(); }\n else if (this.options.ecmaVersion >= 9) { node.await = false; }\n }\n if (startsWithLet && isForOf) { this.raise(init.start, \"The left-hand side of a for-of loop may not start with 'let'.\"); }\n this.toAssignable(init, false, refDestructuringErrors);\n this.checkLValPattern(init);\n return this.parseForIn(node, init)\n } else {\n this.checkExpressionErrors(refDestructuringErrors, true);\n }\n if (awaitAt > -1) { this.unexpected(awaitAt); }\n return this.parseFor(node, init)\n};\n\npp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {\n this.next();\n return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync)\n};\n\npp$8.parseIfStatement = function(node) {\n this.next();\n node.test = this.parseParenExpression();\n // allow function declarations in branches, but only in non-strict mode\n node.consequent = this.parseStatement(\"if\");\n node.alternate = this.eat(types$1._else) ? this.parseStatement(\"if\") : null;\n return this.finishNode(node, \"IfStatement\")\n};\n\npp$8.parseReturnStatement = function(node) {\n if (!this.inFunction && !this.options.allowReturnOutsideFunction)\n { this.raise(this.start, \"'return' outside of function\"); }\n this.next();\n\n // In `return` (and `break`/`continue`), the keywords with\n // optional arguments, we eagerly look for a semicolon or the\n // possibility to insert one.\n\n if (this.eat(types$1.semi) || this.insertSemicolon()) { node.argument = null; }\n else { node.argument = this.parseExpression(); this.semicolon(); }\n return this.finishNode(node, \"ReturnStatement\")\n};\n\npp$8.parseSwitchStatement = function(node) {\n this.next();\n node.discriminant = this.parseParenExpression();\n node.cases = [];\n this.expect(types$1.braceL);\n this.labels.push(switchLabel);\n this.enterScope(0);\n\n // Statements under must be grouped (by label) in SwitchCase\n // nodes. `cur` is used to keep the node that we are currently\n // adding statements to.\n\n var cur;\n for (var sawDefault = false; this.type !== types$1.braceR;) {\n if (this.type === types$1._case || this.type === types$1._default) {\n var isCase = this.type === types$1._case;\n if (cur) { this.finishNode(cur, \"SwitchCase\"); }\n node.cases.push(cur = this.startNode());\n cur.consequent = [];\n this.next();\n if (isCase) {\n cur.test = this.parseExpression();\n } else {\n if (sawDefault) { this.raiseRecoverable(this.lastTokStart, \"Multiple default clauses\"); }\n sawDefault = true;\n cur.test = null;\n }\n this.expect(types$1.colon);\n } else {\n if (!cur) { this.unexpected(); }\n cur.consequent.push(this.parseStatement(null));\n }\n }\n this.exitScope();\n if (cur) { this.finishNode(cur, \"SwitchCase\"); }\n this.next(); // Closing brace\n this.labels.pop();\n return this.finishNode(node, \"SwitchStatement\")\n};\n\npp$8.parseThrowStatement = function(node) {\n this.next();\n if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))\n { this.raise(this.lastTokEnd, \"Illegal newline after throw\"); }\n node.argument = this.parseExpression();\n this.semicolon();\n return this.finishNode(node, \"ThrowStatement\")\n};\n\n// Reused empty array added for node fields that are always empty.\n\nvar empty$1 = [];\n\npp$8.parseCatchClauseParam = function() {\n var param = this.parseBindingAtom();\n var simple = param.type === \"Identifier\";\n this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0);\n this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL);\n this.expect(types$1.parenR);\n\n return param\n};\n\npp$8.parseTryStatement = function(node) {\n this.next();\n node.block = this.parseBlock();\n node.handler = null;\n if (this.type === types$1._catch) {\n var clause = this.startNode();\n this.next();\n if (this.eat(types$1.parenL)) {\n clause.param = this.parseCatchClauseParam();\n } else {\n if (this.options.ecmaVersion < 10) { this.unexpected(); }\n clause.param = null;\n this.enterScope(0);\n }\n clause.body = this.parseBlock(false);\n this.exitScope();\n node.handler = this.finishNode(clause, \"CatchClause\");\n }\n node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null;\n if (!node.handler && !node.finalizer)\n { this.raise(node.start, \"Missing catch or finally clause\"); }\n return this.finishNode(node, \"TryStatement\")\n};\n\npp$8.parseVarStatement = function(node, kind, allowMissingInitializer) {\n this.next();\n this.parseVar(node, false, kind, allowMissingInitializer);\n this.semicolon();\n return this.finishNode(node, \"VariableDeclaration\")\n};\n\npp$8.parseWhileStatement = function(node) {\n this.next();\n node.test = this.parseParenExpression();\n this.labels.push(loopLabel);\n node.body = this.parseStatement(\"while\");\n this.labels.pop();\n return this.finishNode(node, \"WhileStatement\")\n};\n\npp$8.parseWithStatement = function(node) {\n if (this.strict) { this.raise(this.start, \"'with' in strict mode\"); }\n this.next();\n node.object = this.parseParenExpression();\n node.body = this.parseStatement(\"with\");\n return this.finishNode(node, \"WithStatement\")\n};\n\npp$8.parseEmptyStatement = function(node) {\n this.next();\n return this.finishNode(node, \"EmptyStatement\")\n};\n\npp$8.parseLabeledStatement = function(node, maybeName, expr, context) {\n for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1)\n {\n var label = list[i$1];\n\n if (label.name === maybeName)\n { this.raise(expr.start, \"Label '\" + maybeName + \"' is already declared\");\n } }\n var kind = this.type.isLoop ? \"loop\" : this.type === types$1._switch ? \"switch\" : null;\n for (var i = this.labels.length - 1; i >= 0; i--) {\n var label$1 = this.labels[i];\n if (label$1.statementStart === node.start) {\n // Update information about previous labels on this node\n label$1.statementStart = this.start;\n label$1.kind = kind;\n } else { break }\n }\n this.labels.push({name: maybeName, kind: kind, statementStart: this.start});\n node.body = this.parseStatement(context ? context.indexOf(\"label\") === -1 ? context + \"label\" : context : \"label\");\n this.labels.pop();\n node.label = expr;\n return this.finishNode(node, \"LabeledStatement\")\n};\n\npp$8.parseExpressionStatement = function(node, expr) {\n node.expression = expr;\n this.semicolon();\n return this.finishNode(node, \"ExpressionStatement\")\n};\n\n// Parse a semicolon-enclosed block of statements, handling `\"use\n// strict\"` declarations when `allowStrict` is true (used for\n// function bodies).\n\npp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) {\n if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true;\n if ( node === void 0 ) node = this.startNode();\n\n node.body = [];\n this.expect(types$1.braceL);\n if (createNewLexicalScope) { this.enterScope(0); }\n while (this.type !== types$1.braceR) {\n var stmt = this.parseStatement(null);\n node.body.push(stmt);\n }\n if (exitStrict) { this.strict = false; }\n this.next();\n if (createNewLexicalScope) { this.exitScope(); }\n return this.finishNode(node, \"BlockStatement\")\n};\n\n// Parse a regular `for` loop. The disambiguation code in\n// `parseStatement` will already have parsed the init statement or\n// expression.\n\npp$8.parseFor = function(node, init) {\n node.init = init;\n this.expect(types$1.semi);\n node.test = this.type === types$1.semi ? null : this.parseExpression();\n this.expect(types$1.semi);\n node.update = this.type === types$1.parenR ? null : this.parseExpression();\n this.expect(types$1.parenR);\n node.body = this.parseStatement(\"for\");\n this.exitScope();\n this.labels.pop();\n return this.finishNode(node, \"ForStatement\")\n};\n\n// Parse a `for`/`in` and `for`/`of` loop, which are almost\n// same from parser's perspective.\n\npp$8.parseForIn = function(node, init) {\n var isForIn = this.type === types$1._in;\n this.next();\n\n if (\n init.type === \"VariableDeclaration\" &&\n init.declarations[0].init != null &&\n (\n !isForIn ||\n this.options.ecmaVersion < 8 ||\n this.strict ||\n init.kind !== \"var\" ||\n init.declarations[0].id.type !== \"Identifier\"\n )\n ) {\n this.raise(\n init.start,\n ((isForIn ? \"for-in\" : \"for-of\") + \" loop variable declaration may not have an initializer\")\n );\n }\n node.left = init;\n node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();\n this.expect(types$1.parenR);\n node.body = this.parseStatement(\"for\");\n this.exitScope();\n this.labels.pop();\n return this.finishNode(node, isForIn ? \"ForInStatement\" : \"ForOfStatement\")\n};\n\n// Parse a list of variable declarations.\n\npp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) {\n node.declarations = [];\n node.kind = kind;\n for (;;) {\n var decl = this.startNode();\n this.parseVarId(decl, kind);\n if (this.eat(types$1.eq)) {\n decl.init = this.parseMaybeAssign(isFor);\n } else if (!allowMissingInitializer && kind === \"const\" && !(this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual(\"of\")))) {\n this.unexpected();\n } else if (!allowMissingInitializer && decl.id.type !== \"Identifier\" && !(isFor && (this.type === types$1._in || this.isContextual(\"of\")))) {\n this.raise(this.lastTokEnd, \"Complex binding patterns require an initialization value\");\n } else {\n decl.init = null;\n }\n node.declarations.push(this.finishNode(decl, \"VariableDeclarator\"));\n if (!this.eat(types$1.comma)) { break }\n }\n return node\n};\n\npp$8.parseVarId = function(decl, kind) {\n decl.id = this.parseBindingAtom();\n this.checkLValPattern(decl.id, kind === \"var\" ? BIND_VAR : BIND_LEXICAL, false);\n};\n\nvar FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4;\n\n// Parse a function declaration or literal (depending on the\n// `statement & FUNC_STATEMENT`).\n\n// Remove `allowExpressionBody` for 7.0.0, as it is only called with false\npp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {\n this.initFunction(node);\n if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {\n if (this.type === types$1.star && (statement & FUNC_HANGING_STATEMENT))\n { this.unexpected(); }\n node.generator = this.eat(types$1.star);\n }\n if (this.options.ecmaVersion >= 8)\n { node.async = !!isAsync; }\n\n if (statement & FUNC_STATEMENT) {\n node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types$1.name ? null : this.parseIdent();\n if (node.id && !(statement & FUNC_HANGING_STATEMENT))\n // If it is a regular function declaration in sloppy mode, then it is\n // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding\n // mode depends on properties of the current scope (see\n // treatFunctionsAsVar).\n { this.checkLValSimple(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); }\n }\n\n var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n this.enterScope(functionFlags(node.async, node.generator));\n\n if (!(statement & FUNC_STATEMENT))\n { node.id = this.type === types$1.name ? this.parseIdent() : null; }\n\n this.parseFunctionParams(node);\n this.parseFunctionBody(node, allowExpressionBody, false, forInit);\n\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.finishNode(node, (statement & FUNC_STATEMENT) ? \"FunctionDeclaration\" : \"FunctionExpression\")\n};\n\npp$8.parseFunctionParams = function(node) {\n this.expect(types$1.parenL);\n node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);\n this.checkYieldAwaitInDefaultParams();\n};\n\n// Parse a class declaration or literal (depending on the\n// `isStatement` parameter).\n\npp$8.parseClass = function(node, isStatement) {\n this.next();\n\n // ecma-262 14.6 Class Definitions\n // A class definition is always strict mode code.\n var oldStrict = this.strict;\n this.strict = true;\n\n this.parseClassId(node, isStatement);\n this.parseClassSuper(node);\n var privateNameMap = this.enterClassBody();\n var classBody = this.startNode();\n var hadConstructor = false;\n classBody.body = [];\n this.expect(types$1.braceL);\n while (this.type !== types$1.braceR) {\n var element = this.parseClassElement(node.superClass !== null);\n if (element) {\n classBody.body.push(element);\n if (element.type === \"MethodDefinition\" && element.kind === \"constructor\") {\n if (hadConstructor) { this.raiseRecoverable(element.start, \"Duplicate constructor in the same class\"); }\n hadConstructor = true;\n } else if (element.key && element.key.type === \"PrivateIdentifier\" && isPrivateNameConflicted(privateNameMap, element)) {\n this.raiseRecoverable(element.key.start, (\"Identifier '#\" + (element.key.name) + \"' has already been declared\"));\n }\n }\n }\n this.strict = oldStrict;\n this.next();\n node.body = this.finishNode(classBody, \"ClassBody\");\n this.exitClassBody();\n return this.finishNode(node, isStatement ? \"ClassDeclaration\" : \"ClassExpression\")\n};\n\npp$8.parseClassElement = function(constructorAllowsSuper) {\n if (this.eat(types$1.semi)) { return null }\n\n var ecmaVersion = this.options.ecmaVersion;\n var node = this.startNode();\n var keyName = \"\";\n var isGenerator = false;\n var isAsync = false;\n var kind = \"method\";\n var isStatic = false;\n\n if (this.eatContextual(\"static\")) {\n // Parse static init block\n if (ecmaVersion >= 13 && this.eat(types$1.braceL)) {\n this.parseClassStaticBlock(node);\n return node\n }\n if (this.isClassElementNameStart() || this.type === types$1.star) {\n isStatic = true;\n } else {\n keyName = \"static\";\n }\n }\n node.static = isStatic;\n if (!keyName && ecmaVersion >= 8 && this.eatContextual(\"async\")) {\n if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) {\n isAsync = true;\n } else {\n keyName = \"async\";\n }\n }\n if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) {\n isGenerator = true;\n }\n if (!keyName && !isAsync && !isGenerator) {\n var lastValue = this.value;\n if (this.eatContextual(\"get\") || this.eatContextual(\"set\")) {\n if (this.isClassElementNameStart()) {\n kind = lastValue;\n } else {\n keyName = lastValue;\n }\n }\n }\n\n // Parse element name\n if (keyName) {\n // 'async', 'get', 'set', or 'static' were not a keyword contextually.\n // The last token is any of those. Make it the element name.\n node.computed = false;\n node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc);\n node.key.name = keyName;\n this.finishNode(node.key, \"Identifier\");\n } else {\n this.parseClassElementName(node);\n }\n\n // Parse element value\n if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== \"method\" || isGenerator || isAsync) {\n var isConstructor = !node.static && checkKeyName(node, \"constructor\");\n var allowsDirectSuper = isConstructor && constructorAllowsSuper;\n // Couldn't move this check into the 'parseClassMethod' method for backward compatibility.\n if (isConstructor && kind !== \"method\") { this.raise(node.key.start, \"Constructor can't have get/set modifier\"); }\n node.kind = isConstructor ? \"constructor\" : kind;\n this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper);\n } else {\n this.parseClassField(node);\n }\n\n return node\n};\n\npp$8.isClassElementNameStart = function() {\n return (\n this.type === types$1.name ||\n this.type === types$1.privateId ||\n this.type === types$1.num ||\n this.type === types$1.string ||\n this.type === types$1.bracketL ||\n this.type.keyword\n )\n};\n\npp$8.parseClassElementName = function(element) {\n if (this.type === types$1.privateId) {\n if (this.value === \"constructor\") {\n this.raise(this.start, \"Classes can't have an element named '#constructor'\");\n }\n element.computed = false;\n element.key = this.parsePrivateIdent();\n } else {\n this.parsePropertyName(element);\n }\n};\n\npp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {\n // Check key and flags\n var key = method.key;\n if (method.kind === \"constructor\") {\n if (isGenerator) { this.raise(key.start, \"Constructor can't be a generator\"); }\n if (isAsync) { this.raise(key.start, \"Constructor can't be an async method\"); }\n } else if (method.static && checkKeyName(method, \"prototype\")) {\n this.raise(key.start, \"Classes may not have a static property named prototype\");\n }\n\n // Parse value\n var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);\n\n // Check value\n if (method.kind === \"get\" && value.params.length !== 0)\n { this.raiseRecoverable(value.start, \"getter should have no params\"); }\n if (method.kind === \"set\" && value.params.length !== 1)\n { this.raiseRecoverable(value.start, \"setter should have exactly one param\"); }\n if (method.kind === \"set\" && value.params[0].type === \"RestElement\")\n { this.raiseRecoverable(value.params[0].start, \"Setter cannot use rest params\"); }\n\n return this.finishNode(method, \"MethodDefinition\")\n};\n\npp$8.parseClassField = function(field) {\n if (checkKeyName(field, \"constructor\")) {\n this.raise(field.key.start, \"Classes can't have a field named 'constructor'\");\n } else if (field.static && checkKeyName(field, \"prototype\")) {\n this.raise(field.key.start, \"Classes can't have a static field named 'prototype'\");\n }\n\n if (this.eat(types$1.eq)) {\n // To raise SyntaxError if 'arguments' exists in the initializer.\n var scope = this.currentThisScope();\n var inClassFieldInit = scope.inClassFieldInit;\n scope.inClassFieldInit = true;\n field.value = this.parseMaybeAssign();\n scope.inClassFieldInit = inClassFieldInit;\n } else {\n field.value = null;\n }\n this.semicolon();\n\n return this.finishNode(field, \"PropertyDefinition\")\n};\n\npp$8.parseClassStaticBlock = function(node) {\n node.body = [];\n\n var oldLabels = this.labels;\n this.labels = [];\n this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER);\n while (this.type !== types$1.braceR) {\n var stmt = this.parseStatement(null);\n node.body.push(stmt);\n }\n this.next();\n this.exitScope();\n this.labels = oldLabels;\n\n return this.finishNode(node, \"StaticBlock\")\n};\n\npp$8.parseClassId = function(node, isStatement) {\n if (this.type === types$1.name) {\n node.id = this.parseIdent();\n if (isStatement)\n { this.checkLValSimple(node.id, BIND_LEXICAL, false); }\n } else {\n if (isStatement === true)\n { this.unexpected(); }\n node.id = null;\n }\n};\n\npp$8.parseClassSuper = function(node) {\n node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null;\n};\n\npp$8.enterClassBody = function() {\n var element = {declared: Object.create(null), used: []};\n this.privateNameStack.push(element);\n return element.declared\n};\n\npp$8.exitClassBody = function() {\n var ref = this.privateNameStack.pop();\n var declared = ref.declared;\n var used = ref.used;\n if (!this.options.checkPrivateFields) { return }\n var len = this.privateNameStack.length;\n var parent = len === 0 ? null : this.privateNameStack[len - 1];\n for (var i = 0; i < used.length; ++i) {\n var id = used[i];\n if (!hasOwn(declared, id.name)) {\n if (parent) {\n parent.used.push(id);\n } else {\n this.raiseRecoverable(id.start, (\"Private field '#\" + (id.name) + \"' must be declared in an enclosing class\"));\n }\n }\n }\n};\n\nfunction isPrivateNameConflicted(privateNameMap, element) {\n var name = element.key.name;\n var curr = privateNameMap[name];\n\n var next = \"true\";\n if (element.type === \"MethodDefinition\" && (element.kind === \"get\" || element.kind === \"set\")) {\n next = (element.static ? \"s\" : \"i\") + element.kind;\n }\n\n // `class { get #a(){}; static set #a(_){} }` is also conflict.\n if (\n curr === \"iget\" && next === \"iset\" ||\n curr === \"iset\" && next === \"iget\" ||\n curr === \"sget\" && next === \"sset\" ||\n curr === \"sset\" && next === \"sget\"\n ) {\n privateNameMap[name] = \"true\";\n return false\n } else if (!curr) {\n privateNameMap[name] = next;\n return false\n } else {\n return true\n }\n}\n\nfunction checkKeyName(node, name) {\n var computed = node.computed;\n var key = node.key;\n return !computed && (\n key.type === \"Identifier\" && key.name === name ||\n key.type === \"Literal\" && key.value === name\n )\n}\n\n// Parses module export declaration.\n\npp$8.parseExportAllDeclaration = function(node, exports) {\n if (this.options.ecmaVersion >= 11) {\n if (this.eatContextual(\"as\")) {\n node.exported = this.parseModuleExportName();\n this.checkExport(exports, node.exported, this.lastTokStart);\n } else {\n node.exported = null;\n }\n }\n this.expectContextual(\"from\");\n if (this.type !== types$1.string) { this.unexpected(); }\n node.source = this.parseExprAtom();\n if (this.options.ecmaVersion >= 16)\n { node.attributes = this.parseWithClause(); }\n this.semicolon();\n return this.finishNode(node, \"ExportAllDeclaration\")\n};\n\npp$8.parseExport = function(node, exports) {\n this.next();\n // export * from '...'\n if (this.eat(types$1.star)) {\n return this.parseExportAllDeclaration(node, exports)\n }\n if (this.eat(types$1._default)) { // export default ...\n this.checkExport(exports, \"default\", this.lastTokStart);\n node.declaration = this.parseExportDefaultDeclaration();\n return this.finishNode(node, \"ExportDefaultDeclaration\")\n }\n // export var|const|let|function|class ...\n if (this.shouldParseExportStatement()) {\n node.declaration = this.parseExportDeclaration(node);\n if (node.declaration.type === \"VariableDeclaration\")\n { this.checkVariableExport(exports, node.declaration.declarations); }\n else\n { this.checkExport(exports, node.declaration.id, node.declaration.id.start); }\n node.specifiers = [];\n node.source = null;\n } else { // export { x, y as z } [from '...']\n node.declaration = null;\n node.specifiers = this.parseExportSpecifiers(exports);\n if (this.eatContextual(\"from\")) {\n if (this.type !== types$1.string) { this.unexpected(); }\n node.source = this.parseExprAtom();\n if (this.options.ecmaVersion >= 16)\n { node.attributes = this.parseWithClause(); }\n } else {\n for (var i = 0, list = node.specifiers; i < list.length; i += 1) {\n // check for keywords used as local names\n var spec = list[i];\n\n this.checkUnreserved(spec.local);\n // check if export is defined\n this.checkLocalExport(spec.local);\n\n if (spec.local.type === \"Literal\") {\n this.raise(spec.local.start, \"A string literal cannot be used as an exported binding without `from`.\");\n }\n }\n\n node.source = null;\n }\n this.semicolon();\n }\n return this.finishNode(node, \"ExportNamedDeclaration\")\n};\n\npp$8.parseExportDeclaration = function(node) {\n return this.parseStatement(null)\n};\n\npp$8.parseExportDefaultDeclaration = function() {\n var isAsync;\n if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) {\n var fNode = this.startNode();\n this.next();\n if (isAsync) { this.next(); }\n return this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync)\n } else if (this.type === types$1._class) {\n var cNode = this.startNode();\n return this.parseClass(cNode, \"nullableID\")\n } else {\n var declaration = this.parseMaybeAssign();\n this.semicolon();\n return declaration\n }\n};\n\npp$8.checkExport = function(exports, name, pos) {\n if (!exports) { return }\n if (typeof name !== \"string\")\n { name = name.type === \"Identifier\" ? name.name : name.value; }\n if (hasOwn(exports, name))\n { this.raiseRecoverable(pos, \"Duplicate export '\" + name + \"'\"); }\n exports[name] = true;\n};\n\npp$8.checkPatternExport = function(exports, pat) {\n var type = pat.type;\n if (type === \"Identifier\")\n { this.checkExport(exports, pat, pat.start); }\n else if (type === \"ObjectPattern\")\n { for (var i = 0, list = pat.properties; i < list.length; i += 1)\n {\n var prop = list[i];\n\n this.checkPatternExport(exports, prop);\n } }\n else if (type === \"ArrayPattern\")\n { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {\n var elt = list$1[i$1];\n\n if (elt) { this.checkPatternExport(exports, elt); }\n } }\n else if (type === \"Property\")\n { this.checkPatternExport(exports, pat.value); }\n else if (type === \"AssignmentPattern\")\n { this.checkPatternExport(exports, pat.left); }\n else if (type === \"RestElement\")\n { this.checkPatternExport(exports, pat.argument); }\n};\n\npp$8.checkVariableExport = function(exports, decls) {\n if (!exports) { return }\n for (var i = 0, list = decls; i < list.length; i += 1)\n {\n var decl = list[i];\n\n this.checkPatternExport(exports, decl.id);\n }\n};\n\npp$8.shouldParseExportStatement = function() {\n return this.type.keyword === \"var\" ||\n this.type.keyword === \"const\" ||\n this.type.keyword === \"class\" ||\n this.type.keyword === \"function\" ||\n this.isLet() ||\n this.isAsyncFunction()\n};\n\n// Parses a comma-separated list of module exports.\n\npp$8.parseExportSpecifier = function(exports) {\n var node = this.startNode();\n node.local = this.parseModuleExportName();\n\n node.exported = this.eatContextual(\"as\") ? this.parseModuleExportName() : node.local;\n this.checkExport(\n exports,\n node.exported,\n node.exported.start\n );\n\n return this.finishNode(node, \"ExportSpecifier\")\n};\n\npp$8.parseExportSpecifiers = function(exports) {\n var nodes = [], first = true;\n // export { x, y as z } [from '...']\n this.expect(types$1.braceL);\n while (!this.eat(types$1.braceR)) {\n if (!first) {\n this.expect(types$1.comma);\n if (this.afterTrailingComma(types$1.braceR)) { break }\n } else { first = false; }\n\n nodes.push(this.parseExportSpecifier(exports));\n }\n return nodes\n};\n\n// Parses import declaration.\n\npp$8.parseImport = function(node) {\n this.next();\n\n // import '...'\n if (this.type === types$1.string) {\n node.specifiers = empty$1;\n node.source = this.parseExprAtom();\n } else {\n node.specifiers = this.parseImportSpecifiers();\n this.expectContextual(\"from\");\n node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected();\n }\n if (this.options.ecmaVersion >= 16)\n { node.attributes = this.parseWithClause(); }\n this.semicolon();\n return this.finishNode(node, \"ImportDeclaration\")\n};\n\n// Parses a comma-separated list of module imports.\n\npp$8.parseImportSpecifier = function() {\n var node = this.startNode();\n node.imported = this.parseModuleExportName();\n\n if (this.eatContextual(\"as\")) {\n node.local = this.parseIdent();\n } else {\n this.checkUnreserved(node.imported);\n node.local = node.imported;\n }\n this.checkLValSimple(node.local, BIND_LEXICAL);\n\n return this.finishNode(node, \"ImportSpecifier\")\n};\n\npp$8.parseImportDefaultSpecifier = function() {\n // import defaultObj, { x, y as z } from '...'\n var node = this.startNode();\n node.local = this.parseIdent();\n this.checkLValSimple(node.local, BIND_LEXICAL);\n return this.finishNode(node, \"ImportDefaultSpecifier\")\n};\n\npp$8.parseImportNamespaceSpecifier = function() {\n var node = this.startNode();\n this.next();\n this.expectContextual(\"as\");\n node.local = this.parseIdent();\n this.checkLValSimple(node.local, BIND_LEXICAL);\n return this.finishNode(node, \"ImportNamespaceSpecifier\")\n};\n\npp$8.parseImportSpecifiers = function() {\n var nodes = [], first = true;\n if (this.type === types$1.name) {\n nodes.push(this.parseImportDefaultSpecifier());\n if (!this.eat(types$1.comma)) { return nodes }\n }\n if (this.type === types$1.star) {\n nodes.push(this.parseImportNamespaceSpecifier());\n return nodes\n }\n this.expect(types$1.braceL);\n while (!this.eat(types$1.braceR)) {\n if (!first) {\n this.expect(types$1.comma);\n if (this.afterTrailingComma(types$1.braceR)) { break }\n } else { first = false; }\n\n nodes.push(this.parseImportSpecifier());\n }\n return nodes\n};\n\npp$8.parseWithClause = function() {\n var nodes = [];\n if (!this.eat(types$1._with)) {\n return nodes\n }\n this.expect(types$1.braceL);\n var attributeKeys = {};\n var first = true;\n while (!this.eat(types$1.braceR)) {\n if (!first) {\n this.expect(types$1.comma);\n if (this.afterTrailingComma(types$1.braceR)) { break }\n } else { first = false; }\n\n var attr = this.parseImportAttribute();\n var keyName = attr.key.type === \"Identifier\" ? attr.key.name : attr.key.value;\n if (hasOwn(attributeKeys, keyName))\n { this.raiseRecoverable(attr.key.start, \"Duplicate attribute key '\" + keyName + \"'\"); }\n attributeKeys[keyName] = true;\n nodes.push(attr);\n }\n return nodes\n};\n\npp$8.parseImportAttribute = function() {\n var node = this.startNode();\n node.key = this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== \"never\");\n this.expect(types$1.colon);\n if (this.type !== types$1.string) {\n this.unexpected();\n }\n node.value = this.parseExprAtom();\n return this.finishNode(node, \"ImportAttribute\")\n};\n\npp$8.parseModuleExportName = function() {\n if (this.options.ecmaVersion >= 13 && this.type === types$1.string) {\n var stringLiteral = this.parseLiteral(this.value);\n if (loneSurrogate.test(stringLiteral.value)) {\n this.raise(stringLiteral.start, \"An export name cannot include a lone surrogate.\");\n }\n return stringLiteral\n }\n return this.parseIdent(true)\n};\n\n// Set `ExpressionStatement#directive` property for directive prologues.\npp$8.adaptDirectivePrologue = function(statements) {\n for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {\n statements[i].directive = statements[i].expression.raw.slice(1, -1);\n }\n};\npp$8.isDirectiveCandidate = function(statement) {\n return (\n this.options.ecmaVersion >= 5 &&\n statement.type === \"ExpressionStatement\" &&\n statement.expression.type === \"Literal\" &&\n typeof statement.expression.value === \"string\" &&\n // Reject parenthesized strings.\n (this.input[statement.start] === \"\\\"\" || this.input[statement.start] === \"'\")\n )\n};\n\nvar pp$7 = Parser.prototype;\n\n// Convert existing expression atom to assignable pattern\n// if possible.\n\npp$7.toAssignable = function(node, isBinding, refDestructuringErrors) {\n if (this.options.ecmaVersion >= 6 && node) {\n switch (node.type) {\n case \"Identifier\":\n if (this.inAsync && node.name === \"await\")\n { this.raise(node.start, \"Cannot use 'await' as identifier inside an async function\"); }\n break\n\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"AssignmentPattern\":\n case \"RestElement\":\n break\n\n case \"ObjectExpression\":\n node.type = \"ObjectPattern\";\n if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }\n for (var i = 0, list = node.properties; i < list.length; i += 1) {\n var prop = list[i];\n\n this.toAssignable(prop, isBinding);\n // Early error:\n // AssignmentRestProperty[Yield, Await] :\n // `...` DestructuringAssignmentTarget[Yield, Await]\n //\n // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|.\n if (\n prop.type === \"RestElement\" &&\n (prop.argument.type === \"ArrayPattern\" || prop.argument.type === \"ObjectPattern\")\n ) {\n this.raise(prop.argument.start, \"Unexpected token\");\n }\n }\n break\n\n case \"Property\":\n // AssignmentProperty has type === \"Property\"\n if (node.kind !== \"init\") { this.raise(node.key.start, \"Object pattern can't contain getter or setter\"); }\n this.toAssignable(node.value, isBinding);\n break\n\n case \"ArrayExpression\":\n node.type = \"ArrayPattern\";\n if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }\n this.toAssignableList(node.elements, isBinding);\n break\n\n case \"SpreadElement\":\n node.type = \"RestElement\";\n this.toAssignable(node.argument, isBinding);\n if (node.argument.type === \"AssignmentPattern\")\n { this.raise(node.argument.start, \"Rest elements cannot have a default value\"); }\n break\n\n case \"AssignmentExpression\":\n if (node.operator !== \"=\") { this.raise(node.left.end, \"Only '=' operator can be used for specifying default value.\"); }\n node.type = \"AssignmentPattern\";\n delete node.operator;\n this.toAssignable(node.left, isBinding);\n break\n\n case \"ParenthesizedExpression\":\n this.toAssignable(node.expression, isBinding, refDestructuringErrors);\n break\n\n case \"ChainExpression\":\n this.raiseRecoverable(node.start, \"Optional chaining cannot appear in left-hand side\");\n break\n\n case \"MemberExpression\":\n if (!isBinding) { break }\n\n default:\n this.raise(node.start, \"Assigning to rvalue\");\n }\n } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }\n return node\n};\n\n// Convert list of expression atoms to binding list.\n\npp$7.toAssignableList = function(exprList, isBinding) {\n var end = exprList.length;\n for (var i = 0; i < end; i++) {\n var elt = exprList[i];\n if (elt) { this.toAssignable(elt, isBinding); }\n }\n if (end) {\n var last = exprList[end - 1];\n if (this.options.ecmaVersion === 6 && isBinding && last && last.type === \"RestElement\" && last.argument.type !== \"Identifier\")\n { this.unexpected(last.argument.start); }\n }\n return exprList\n};\n\n// Parses spread element.\n\npp$7.parseSpread = function(refDestructuringErrors) {\n var node = this.startNode();\n this.next();\n node.argument = this.parseMaybeAssign(false, refDestructuringErrors);\n return this.finishNode(node, \"SpreadElement\")\n};\n\npp$7.parseRestBinding = function() {\n var node = this.startNode();\n this.next();\n\n // RestElement inside of a function parameter must be an identifier\n if (this.options.ecmaVersion === 6 && this.type !== types$1.name)\n { this.unexpected(); }\n\n node.argument = this.parseBindingAtom();\n\n return this.finishNode(node, \"RestElement\")\n};\n\n// Parses lvalue (assignable) atom.\n\npp$7.parseBindingAtom = function() {\n if (this.options.ecmaVersion >= 6) {\n switch (this.type) {\n case types$1.bracketL:\n var node = this.startNode();\n this.next();\n node.elements = this.parseBindingList(types$1.bracketR, true, true);\n return this.finishNode(node, \"ArrayPattern\")\n\n case types$1.braceL:\n return this.parseObj(true)\n }\n }\n return this.parseIdent()\n};\n\npp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) {\n var elts = [], first = true;\n while (!this.eat(close)) {\n if (first) { first = false; }\n else { this.expect(types$1.comma); }\n if (allowEmpty && this.type === types$1.comma) {\n elts.push(null);\n } else if (allowTrailingComma && this.afterTrailingComma(close)) {\n break\n } else if (this.type === types$1.ellipsis) {\n var rest = this.parseRestBinding();\n this.parseBindingListItem(rest);\n elts.push(rest);\n if (this.type === types$1.comma) { this.raiseRecoverable(this.start, \"Comma is not permitted after the rest element\"); }\n this.expect(close);\n break\n } else {\n elts.push(this.parseAssignableListItem(allowModifiers));\n }\n }\n return elts\n};\n\npp$7.parseAssignableListItem = function(allowModifiers) {\n var elem = this.parseMaybeDefault(this.start, this.startLoc);\n this.parseBindingListItem(elem);\n return elem\n};\n\npp$7.parseBindingListItem = function(param) {\n return param\n};\n\n// Parses assignment pattern around given atom if possible.\n\npp$7.parseMaybeDefault = function(startPos, startLoc, left) {\n left = left || this.parseBindingAtom();\n if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) { return left }\n var node = this.startNodeAt(startPos, startLoc);\n node.left = left;\n node.right = this.parseMaybeAssign();\n return this.finishNode(node, \"AssignmentPattern\")\n};\n\n// The following three functions all verify that a node is an lvalue —\n// something that can be bound, or assigned to. In order to do so, they perform\n// a variety of checks:\n//\n// - Check that none of the bound/assigned-to identifiers are reserved words.\n// - Record name declarations for bindings in the appropriate scope.\n// - Check duplicate argument names, if checkClashes is set.\n//\n// If a complex binding pattern is encountered (e.g., object and array\n// destructuring), the entire pattern is recursively checked.\n//\n// There are three versions of checkLVal*() appropriate for different\n// circumstances:\n//\n// - checkLValSimple() shall be used if the syntactic construct supports\n// nothing other than identifiers and member expressions. Parenthesized\n// expressions are also correctly handled. This is generally appropriate for\n// constructs for which the spec says\n//\n// > It is a Syntax Error if AssignmentTargetType of [the production] is not\n// > simple.\n//\n// It is also appropriate for checking if an identifier is valid and not\n// defined elsewhere, like import declarations or function/class identifiers.\n//\n// Examples where this is used include:\n// a += …;\n// import a from '…';\n// where a is the node to be checked.\n//\n// - checkLValPattern() shall be used if the syntactic construct supports\n// anything checkLValSimple() supports, as well as object and array\n// destructuring patterns. This is generally appropriate for constructs for\n// which the spec says\n//\n// > It is a Syntax Error if [the production] is neither an ObjectLiteral nor\n// > an ArrayLiteral and AssignmentTargetType of [the production] is not\n// > simple.\n//\n// Examples where this is used include:\n// (a = …);\n// const a = …;\n// try { … } catch (a) { … }\n// where a is the node to be checked.\n//\n// - checkLValInnerPattern() shall be used if the syntactic construct supports\n// anything checkLValPattern() supports, as well as default assignment\n// patterns, rest elements, and other constructs that may appear within an\n// object or array destructuring pattern.\n//\n// As a special case, function parameters also use checkLValInnerPattern(),\n// as they also support defaults and rest constructs.\n//\n// These functions deliberately support both assignment and binding constructs,\n// as the logic for both is exceedingly similar. If the node is the target of\n// an assignment, then bindingType should be set to BIND_NONE. Otherwise, it\n// should be set to the appropriate BIND_* constant, like BIND_VAR or\n// BIND_LEXICAL.\n//\n// If the function is called with a non-BIND_NONE bindingType, then\n// additionally a checkClashes object may be specified to allow checking for\n// duplicate argument names. checkClashes is ignored if the provided construct\n// is an assignment (i.e., bindingType is BIND_NONE).\n\npp$7.checkLValSimple = function(expr, bindingType, checkClashes) {\n if ( bindingType === void 0 ) bindingType = BIND_NONE;\n\n var isBind = bindingType !== BIND_NONE;\n\n switch (expr.type) {\n case \"Identifier\":\n if (this.strict && this.reservedWordsStrictBind.test(expr.name))\n { this.raiseRecoverable(expr.start, (isBind ? \"Binding \" : \"Assigning to \") + expr.name + \" in strict mode\"); }\n if (isBind) {\n if (bindingType === BIND_LEXICAL && expr.name === \"let\")\n { this.raiseRecoverable(expr.start, \"let is disallowed as a lexically bound name\"); }\n if (checkClashes) {\n if (hasOwn(checkClashes, expr.name))\n { this.raiseRecoverable(expr.start, \"Argument name clash\"); }\n checkClashes[expr.name] = true;\n }\n if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); }\n }\n break\n\n case \"ChainExpression\":\n this.raiseRecoverable(expr.start, \"Optional chaining cannot appear in left-hand side\");\n break\n\n case \"MemberExpression\":\n if (isBind) { this.raiseRecoverable(expr.start, \"Binding member expression\"); }\n break\n\n case \"ParenthesizedExpression\":\n if (isBind) { this.raiseRecoverable(expr.start, \"Binding parenthesized expression\"); }\n return this.checkLValSimple(expr.expression, bindingType, checkClashes)\n\n default:\n this.raise(expr.start, (isBind ? \"Binding\" : \"Assigning to\") + \" rvalue\");\n }\n};\n\npp$7.checkLValPattern = function(expr, bindingType, checkClashes) {\n if ( bindingType === void 0 ) bindingType = BIND_NONE;\n\n switch (expr.type) {\n case \"ObjectPattern\":\n for (var i = 0, list = expr.properties; i < list.length; i += 1) {\n var prop = list[i];\n\n this.checkLValInnerPattern(prop, bindingType, checkClashes);\n }\n break\n\n case \"ArrayPattern\":\n for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {\n var elem = list$1[i$1];\n\n if (elem) { this.checkLValInnerPattern(elem, bindingType, checkClashes); }\n }\n break\n\n default:\n this.checkLValSimple(expr, bindingType, checkClashes);\n }\n};\n\npp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) {\n if ( bindingType === void 0 ) bindingType = BIND_NONE;\n\n switch (expr.type) {\n case \"Property\":\n // AssignmentProperty has type === \"Property\"\n this.checkLValInnerPattern(expr.value, bindingType, checkClashes);\n break\n\n case \"AssignmentPattern\":\n this.checkLValPattern(expr.left, bindingType, checkClashes);\n break\n\n case \"RestElement\":\n this.checkLValPattern(expr.argument, bindingType, checkClashes);\n break\n\n default:\n this.checkLValPattern(expr, bindingType, checkClashes);\n }\n};\n\n// The algorithm used to determine whether a regexp can appear at a\n// given point in the program is loosely based on sweet.js' approach.\n// See https://github.com/mozilla/sweet.js/wiki/design\n\n\nvar TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) {\n this.token = token;\n this.isExpr = !!isExpr;\n this.preserveSpace = !!preserveSpace;\n this.override = override;\n this.generator = !!generator;\n};\n\nvar types = {\n b_stat: new TokContext(\"{\", false),\n b_expr: new TokContext(\"{\", true),\n b_tmpl: new TokContext(\"${\", false),\n p_stat: new TokContext(\"(\", false),\n p_expr: new TokContext(\"(\", true),\n q_tmpl: new TokContext(\"`\", true, true, function (p) { return p.tryReadTemplateToken(); }),\n f_stat: new TokContext(\"function\", false),\n f_expr: new TokContext(\"function\", true),\n f_expr_gen: new TokContext(\"function\", true, false, null, true),\n f_gen: new TokContext(\"function\", false, false, null, true)\n};\n\nvar pp$6 = Parser.prototype;\n\npp$6.initialContext = function() {\n return [types.b_stat]\n};\n\npp$6.curContext = function() {\n return this.context[this.context.length - 1]\n};\n\npp$6.braceIsBlock = function(prevType) {\n var parent = this.curContext();\n if (parent === types.f_expr || parent === types.f_stat)\n { return true }\n if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr))\n { return !parent.isExpr }\n\n // The check for `tt.name && exprAllowed` detects whether we are\n // after a `yield` or `of` construct. See the `updateContext` for\n // `tt.name`.\n if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed)\n { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) }\n if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow)\n { return true }\n if (prevType === types$1.braceL)\n { return parent === types.b_stat }\n if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name)\n { return false }\n return !this.exprAllowed\n};\n\npp$6.inGeneratorContext = function() {\n for (var i = this.context.length - 1; i >= 1; i--) {\n var context = this.context[i];\n if (context.token === \"function\")\n { return context.generator }\n }\n return false\n};\n\npp$6.updateContext = function(prevType) {\n var update, type = this.type;\n if (type.keyword && prevType === types$1.dot)\n { this.exprAllowed = false; }\n else if (update = type.updateContext)\n { update.call(this, prevType); }\n else\n { this.exprAllowed = type.beforeExpr; }\n};\n\n// Used to handle edge cases when token context could not be inferred correctly during tokenization phase\n\npp$6.overrideContext = function(tokenCtx) {\n if (this.curContext() !== tokenCtx) {\n this.context[this.context.length - 1] = tokenCtx;\n }\n};\n\n// Token-specific context update code\n\ntypes$1.parenR.updateContext = types$1.braceR.updateContext = function() {\n if (this.context.length === 1) {\n this.exprAllowed = true;\n return\n }\n var out = this.context.pop();\n if (out === types.b_stat && this.curContext().token === \"function\") {\n out = this.context.pop();\n }\n this.exprAllowed = !out.isExpr;\n};\n\ntypes$1.braceL.updateContext = function(prevType) {\n this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);\n this.exprAllowed = true;\n};\n\ntypes$1.dollarBraceL.updateContext = function() {\n this.context.push(types.b_tmpl);\n this.exprAllowed = true;\n};\n\ntypes$1.parenL.updateContext = function(prevType) {\n var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while;\n this.context.push(statementParens ? types.p_stat : types.p_expr);\n this.exprAllowed = true;\n};\n\ntypes$1.incDec.updateContext = function() {\n // tokExprAllowed stays unchanged\n};\n\ntypes$1._function.updateContext = types$1._class.updateContext = function(prevType) {\n if (prevType.beforeExpr && prevType !== types$1._else &&\n !(prevType === types$1.semi && this.curContext() !== types.p_stat) &&\n !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) &&\n !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat))\n { this.context.push(types.f_expr); }\n else\n { this.context.push(types.f_stat); }\n this.exprAllowed = false;\n};\n\ntypes$1.colon.updateContext = function() {\n if (this.curContext().token === \"function\") { this.context.pop(); }\n this.exprAllowed = true;\n};\n\ntypes$1.backQuote.updateContext = function() {\n if (this.curContext() === types.q_tmpl)\n { this.context.pop(); }\n else\n { this.context.push(types.q_tmpl); }\n this.exprAllowed = false;\n};\n\ntypes$1.star.updateContext = function(prevType) {\n if (prevType === types$1._function) {\n var index = this.context.length - 1;\n if (this.context[index] === types.f_expr)\n { this.context[index] = types.f_expr_gen; }\n else\n { this.context[index] = types.f_gen; }\n }\n this.exprAllowed = true;\n};\n\ntypes$1.name.updateContext = function(prevType) {\n var allowed = false;\n if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) {\n if (this.value === \"of\" && !this.exprAllowed ||\n this.value === \"yield\" && this.inGeneratorContext())\n { allowed = true; }\n }\n this.exprAllowed = allowed;\n};\n\n// A recursive descent parser operates by defining functions for all\n// syntactic elements, and recursively calling those, each function\n// advancing the input stream and returning an AST node. Precedence\n// of constructs (for example, the fact that `!x[1]` means `!(x[1])`\n// instead of `(!x)[1]` is handled by the fact that the parser\n// function that parses unary prefix operators is called first, and\n// in turn calls the function that parses `[]` subscripts — that\n// way, it'll receive the node for `x[1]` already parsed, and wraps\n// *that* in the unary operator node.\n//\n// Acorn uses an [operator precedence parser][opp] to handle binary\n// operator precedence, because it is much more compact than using\n// the technique outlined above, which uses different, nesting\n// functions to specify precedence, for all of the ten binary\n// precedence levels that JavaScript defines.\n//\n// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser\n\n\nvar pp$5 = Parser.prototype;\n\n// Check if property name clashes with already added.\n// Object/class getters and setters are not allowed to clash —\n// either with each other or with an init property — and in\n// strict mode, init properties are also not allowed to be repeated.\n\npp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {\n if (this.options.ecmaVersion >= 9 && prop.type === \"SpreadElement\")\n { return }\n if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))\n { return }\n var key = prop.key;\n var name;\n switch (key.type) {\n case \"Identifier\": name = key.name; break\n case \"Literal\": name = String(key.value); break\n default: return\n }\n var kind = prop.kind;\n if (this.options.ecmaVersion >= 6) {\n if (name === \"__proto__\" && kind === \"init\") {\n if (propHash.proto) {\n if (refDestructuringErrors) {\n if (refDestructuringErrors.doubleProto < 0) {\n refDestructuringErrors.doubleProto = key.start;\n }\n } else {\n this.raiseRecoverable(key.start, \"Redefinition of __proto__ property\");\n }\n }\n propHash.proto = true;\n }\n return\n }\n name = \"$\" + name;\n var other = propHash[name];\n if (other) {\n var redefinition;\n if (kind === \"init\") {\n redefinition = this.strict && other.init || other.get || other.set;\n } else {\n redefinition = other.init || other[kind];\n }\n if (redefinition)\n { this.raiseRecoverable(key.start, \"Redefinition of property\"); }\n } else {\n other = propHash[name] = {\n init: false,\n get: false,\n set: false\n };\n }\n other[kind] = true;\n};\n\n// ### Expression parsing\n\n// These nest, from the most general expression type at the top to\n// 'atomic', nondivisible expression types at the bottom. Most of\n// the functions will simply let the function(s) below them parse,\n// and, *if* the syntactic construct they handle is present, wrap\n// the AST node that the inner parser gave them in another node.\n\n// Parse a full expression. The optional arguments are used to\n// forbid the `in` operator (in for loops initalization expressions)\n// and provide reference for storing '=' operator inside shorthand\n// property assignment in contexts where both object expression\n// and object pattern might appear (so it's possible to raise\n// delayed syntax error at correct position).\n\npp$5.parseExpression = function(forInit, refDestructuringErrors) {\n var startPos = this.start, startLoc = this.startLoc;\n var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);\n if (this.type === types$1.comma) {\n var node = this.startNodeAt(startPos, startLoc);\n node.expressions = [expr];\n while (this.eat(types$1.comma)) { node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors)); }\n return this.finishNode(node, \"SequenceExpression\")\n }\n return expr\n};\n\n// Parse an assignment expression. This includes applications of\n// operators like `+=`.\n\npp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {\n if (this.isContextual(\"yield\")) {\n if (this.inGenerator) { return this.parseYield(forInit) }\n // The tokenizer will assume an expression is allowed after\n // `yield`, but this isn't that kind of yield\n else { this.exprAllowed = false; }\n }\n\n var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;\n if (refDestructuringErrors) {\n oldParenAssign = refDestructuringErrors.parenthesizedAssign;\n oldTrailingComma = refDestructuringErrors.trailingComma;\n oldDoubleProto = refDestructuringErrors.doubleProto;\n refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;\n } else {\n refDestructuringErrors = new DestructuringErrors;\n ownDestructuringErrors = true;\n }\n\n var startPos = this.start, startLoc = this.startLoc;\n if (this.type === types$1.parenL || this.type === types$1.name) {\n this.potentialArrowAt = this.start;\n this.potentialArrowInForAwait = forInit === \"await\";\n }\n var left = this.parseMaybeConditional(forInit, refDestructuringErrors);\n if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); }\n if (this.type.isAssign) {\n var node = this.startNodeAt(startPos, startLoc);\n node.operator = this.value;\n if (this.type === types$1.eq)\n { left = this.toAssignable(left, false, refDestructuringErrors); }\n if (!ownDestructuringErrors) {\n refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;\n }\n if (refDestructuringErrors.shorthandAssign >= left.start)\n { refDestructuringErrors.shorthandAssign = -1; } // reset because shorthand default was used correctly\n if (this.type === types$1.eq)\n { this.checkLValPattern(left); }\n else\n { this.checkLValSimple(left); }\n node.left = left;\n this.next();\n node.right = this.parseMaybeAssign(forInit);\n if (oldDoubleProto > -1) { refDestructuringErrors.doubleProto = oldDoubleProto; }\n return this.finishNode(node, \"AssignmentExpression\")\n } else {\n if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); }\n }\n if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; }\n if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; }\n return left\n};\n\n// Parse a ternary conditional (`?:`) operator.\n\npp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {\n var startPos = this.start, startLoc = this.startLoc;\n var expr = this.parseExprOps(forInit, refDestructuringErrors);\n if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }\n if (this.eat(types$1.question)) {\n var node = this.startNodeAt(startPos, startLoc);\n node.test = expr;\n node.consequent = this.parseMaybeAssign();\n this.expect(types$1.colon);\n node.alternate = this.parseMaybeAssign(forInit);\n return this.finishNode(node, \"ConditionalExpression\")\n }\n return expr\n};\n\n// Start the precedence parser.\n\npp$5.parseExprOps = function(forInit, refDestructuringErrors) {\n var startPos = this.start, startLoc = this.startLoc;\n var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit);\n if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }\n return expr.start === startPos && expr.type === \"ArrowFunctionExpression\" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit)\n};\n\n// Parse binary operators with the operator precedence parsing\n// algorithm. `left` is the left-hand side of the operator.\n// `minPrec` provides context that allows the function to stop and\n// defer further parser to one of its callers when it encounters an\n// operator that has a lower precedence than the set it is parsing.\n\npp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {\n var prec = this.type.binop;\n if (prec != null && (!forInit || this.type !== types$1._in)) {\n if (prec > minPrec) {\n var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND;\n var coalesce = this.type === types$1.coalesce;\n if (coalesce) {\n // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions.\n // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error.\n prec = types$1.logicalAND.binop;\n }\n var op = this.value;\n this.next();\n var startPos = this.start, startLoc = this.startLoc;\n var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit);\n var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);\n if ((logical && this.type === types$1.coalesce) || (coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND))) {\n this.raiseRecoverable(this.start, \"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses\");\n }\n return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit)\n }\n }\n return left\n};\n\npp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) {\n if (right.type === \"PrivateIdentifier\") { this.raise(right.start, \"Private identifier can only be left side of binary expression\"); }\n var node = this.startNodeAt(startPos, startLoc);\n node.left = left;\n node.operator = op;\n node.right = right;\n return this.finishNode(node, logical ? \"LogicalExpression\" : \"BinaryExpression\")\n};\n\n// Parse unary operators, both prefix and postfix.\n\npp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {\n var startPos = this.start, startLoc = this.startLoc, expr;\n if (this.isContextual(\"await\") && this.canAwait) {\n expr = this.parseAwait(forInit);\n sawUnary = true;\n } else if (this.type.prefix) {\n var node = this.startNode(), update = this.type === types$1.incDec;\n node.operator = this.value;\n node.prefix = true;\n this.next();\n node.argument = this.parseMaybeUnary(null, true, update, forInit);\n this.checkExpressionErrors(refDestructuringErrors, true);\n if (update) { this.checkLValSimple(node.argument); }\n else if (this.strict && node.operator === \"delete\" && isLocalVariableAccess(node.argument))\n { this.raiseRecoverable(node.start, \"Deleting local variable in strict mode\"); }\n else if (node.operator === \"delete\" && isPrivateFieldAccess(node.argument))\n { this.raiseRecoverable(node.start, \"Private fields can not be deleted\"); }\n else { sawUnary = true; }\n expr = this.finishNode(node, update ? \"UpdateExpression\" : \"UnaryExpression\");\n } else if (!sawUnary && this.type === types$1.privateId) {\n if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) { this.unexpected(); }\n expr = this.parsePrivateIdent();\n // only could be private fields in 'in', such as #x in obj\n if (this.type !== types$1._in) { this.unexpected(); }\n } else {\n expr = this.parseExprSubscripts(refDestructuringErrors, forInit);\n if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }\n while (this.type.postfix && !this.canInsertSemicolon()) {\n var node$1 = this.startNodeAt(startPos, startLoc);\n node$1.operator = this.value;\n node$1.prefix = false;\n node$1.argument = expr;\n this.checkLValSimple(expr);\n this.next();\n expr = this.finishNode(node$1, \"UpdateExpression\");\n }\n }\n\n if (!incDec && this.eat(types$1.starstar)) {\n if (sawUnary)\n { this.unexpected(this.lastTokStart); }\n else\n { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), \"**\", false) }\n } else {\n return expr\n }\n};\n\nfunction isLocalVariableAccess(node) {\n return (\n node.type === \"Identifier\" ||\n node.type === \"ParenthesizedExpression\" && isLocalVariableAccess(node.expression)\n )\n}\n\nfunction isPrivateFieldAccess(node) {\n return (\n node.type === \"MemberExpression\" && node.property.type === \"PrivateIdentifier\" ||\n node.type === \"ChainExpression\" && isPrivateFieldAccess(node.expression) ||\n node.type === \"ParenthesizedExpression\" && isPrivateFieldAccess(node.expression)\n )\n}\n\n// Parse call, dot, and `[]`-subscript expressions.\n\npp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {\n var startPos = this.start, startLoc = this.startLoc;\n var expr = this.parseExprAtom(refDestructuringErrors, forInit);\n if (expr.type === \"ArrowFunctionExpression\" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== \")\")\n { return expr }\n var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit);\n if (refDestructuringErrors && result.type === \"MemberExpression\") {\n if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; }\n if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; }\n if (refDestructuringErrors.trailingComma >= result.start) { refDestructuringErrors.trailingComma = -1; }\n }\n return result\n};\n\npp$5.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) {\n var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === \"Identifier\" && base.name === \"async\" &&\n this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 &&\n this.potentialArrowAt === base.start;\n var optionalChained = false;\n\n while (true) {\n var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);\n\n if (element.optional) { optionalChained = true; }\n if (element === base || element.type === \"ArrowFunctionExpression\") {\n if (optionalChained) {\n var chainNode = this.startNodeAt(startPos, startLoc);\n chainNode.expression = element;\n element = this.finishNode(chainNode, \"ChainExpression\");\n }\n return element\n }\n\n base = element;\n }\n};\n\npp$5.shouldParseAsyncArrow = function() {\n return !this.canInsertSemicolon() && this.eat(types$1.arrow)\n};\n\npp$5.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) {\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit)\n};\n\npp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {\n var optionalSupported = this.options.ecmaVersion >= 11;\n var optional = optionalSupported && this.eat(types$1.questionDot);\n if (noCalls && optional) { this.raise(this.lastTokStart, \"Optional chaining cannot appear in the callee of new expressions\"); }\n\n var computed = this.eat(types$1.bracketL);\n if (computed || (optional && this.type !== types$1.parenL && this.type !== types$1.backQuote) || this.eat(types$1.dot)) {\n var node = this.startNodeAt(startPos, startLoc);\n node.object = base;\n if (computed) {\n node.property = this.parseExpression();\n this.expect(types$1.bracketR);\n } else if (this.type === types$1.privateId && base.type !== \"Super\") {\n node.property = this.parsePrivateIdent();\n } else {\n node.property = this.parseIdent(this.options.allowReserved !== \"never\");\n }\n node.computed = !!computed;\n if (optionalSupported) {\n node.optional = optional;\n }\n base = this.finishNode(node, \"MemberExpression\");\n } else if (!noCalls && this.eat(types$1.parenL)) {\n var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);\n if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) {\n this.checkPatternErrors(refDestructuringErrors, false);\n this.checkYieldAwaitInDefaultParams();\n if (this.awaitIdentPos > 0)\n { this.raise(this.awaitIdentPos, \"Cannot use 'await' as identifier inside an async function\"); }\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit)\n }\n this.checkExpressionErrors(refDestructuringErrors, true);\n this.yieldPos = oldYieldPos || this.yieldPos;\n this.awaitPos = oldAwaitPos || this.awaitPos;\n this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;\n var node$1 = this.startNodeAt(startPos, startLoc);\n node$1.callee = base;\n node$1.arguments = exprList;\n if (optionalSupported) {\n node$1.optional = optional;\n }\n base = this.finishNode(node$1, \"CallExpression\");\n } else if (this.type === types$1.backQuote) {\n if (optional || optionalChained) {\n this.raise(this.start, \"Optional chaining cannot appear in the tag of tagged template expressions\");\n }\n var node$2 = this.startNodeAt(startPos, startLoc);\n node$2.tag = base;\n node$2.quasi = this.parseTemplate({isTagged: true});\n base = this.finishNode(node$2, \"TaggedTemplateExpression\");\n }\n return base\n};\n\n// Parse an atomic expression — either a single token that is an\n// expression, an expression started by a keyword like `function` or\n// `new`, or an expression wrapped in punctuation like `()`, `[]`,\n// or `{}`.\n\npp$5.parseExprAtom = function(refDestructuringErrors, forInit, forNew) {\n // If a division operator appears in an expression position, the\n // tokenizer got confused, and we force it to read a regexp instead.\n if (this.type === types$1.slash) { this.readRegexp(); }\n\n var node, canBeArrow = this.potentialArrowAt === this.start;\n switch (this.type) {\n case types$1._super:\n if (!this.allowSuper)\n { this.raise(this.start, \"'super' keyword outside a method\"); }\n node = this.startNode();\n this.next();\n if (this.type === types$1.parenL && !this.allowDirectSuper)\n { this.raise(node.start, \"super() call outside constructor of a subclass\"); }\n // The `super` keyword can appear at below:\n // SuperProperty:\n // super [ Expression ]\n // super . IdentifierName\n // SuperCall:\n // super ( Arguments )\n if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL)\n { this.unexpected(); }\n return this.finishNode(node, \"Super\")\n\n case types$1._this:\n node = this.startNode();\n this.next();\n return this.finishNode(node, \"ThisExpression\")\n\n case types$1.name:\n var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;\n var id = this.parseIdent(false);\n if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === \"async\" && !this.canInsertSemicolon() && this.eat(types$1._function)) {\n this.overrideContext(types.f_expr);\n return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit)\n }\n if (canBeArrow && !this.canInsertSemicolon()) {\n if (this.eat(types$1.arrow))\n { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit) }\n if (this.options.ecmaVersion >= 8 && id.name === \"async\" && this.type === types$1.name && !containsEsc &&\n (!this.potentialArrowInForAwait || this.value !== \"of\" || this.containsEsc)) {\n id = this.parseIdent(false);\n if (this.canInsertSemicolon() || !this.eat(types$1.arrow))\n { this.unexpected(); }\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit)\n }\n }\n return id\n\n case types$1.regexp:\n var value = this.value;\n node = this.parseLiteral(value.value);\n node.regex = {pattern: value.pattern, flags: value.flags};\n return node\n\n case types$1.num: case types$1.string:\n return this.parseLiteral(this.value)\n\n case types$1._null: case types$1._true: case types$1._false:\n node = this.startNode();\n node.value = this.type === types$1._null ? null : this.type === types$1._true;\n node.raw = this.type.keyword;\n this.next();\n return this.finishNode(node, \"Literal\")\n\n case types$1.parenL:\n var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);\n if (refDestructuringErrors) {\n if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr))\n { refDestructuringErrors.parenthesizedAssign = start; }\n if (refDestructuringErrors.parenthesizedBind < 0)\n { refDestructuringErrors.parenthesizedBind = start; }\n }\n return expr\n\n case types$1.bracketL:\n node = this.startNode();\n this.next();\n node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors);\n return this.finishNode(node, \"ArrayExpression\")\n\n case types$1.braceL:\n this.overrideContext(types.b_expr);\n return this.parseObj(false, refDestructuringErrors)\n\n case types$1._function:\n node = this.startNode();\n this.next();\n return this.parseFunction(node, 0)\n\n case types$1._class:\n return this.parseClass(this.startNode(), false)\n\n case types$1._new:\n return this.parseNew()\n\n case types$1.backQuote:\n return this.parseTemplate()\n\n case types$1._import:\n if (this.options.ecmaVersion >= 11) {\n return this.parseExprImport(forNew)\n } else {\n return this.unexpected()\n }\n\n default:\n return this.parseExprAtomDefault()\n }\n};\n\npp$5.parseExprAtomDefault = function() {\n this.unexpected();\n};\n\npp$5.parseExprImport = function(forNew) {\n var node = this.startNode();\n\n // Consume `import` as an identifier for `import.meta`.\n // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`.\n if (this.containsEsc) { this.raiseRecoverable(this.start, \"Escape sequence in keyword import\"); }\n this.next();\n\n if (this.type === types$1.parenL && !forNew) {\n return this.parseDynamicImport(node)\n } else if (this.type === types$1.dot) {\n var meta = this.startNodeAt(node.start, node.loc && node.loc.start);\n meta.name = \"import\";\n node.meta = this.finishNode(meta, \"Identifier\");\n return this.parseImportMeta(node)\n } else {\n this.unexpected();\n }\n};\n\npp$5.parseDynamicImport = function(node) {\n this.next(); // skip `(`\n\n // Parse node.source.\n node.source = this.parseMaybeAssign();\n\n if (this.options.ecmaVersion >= 16) {\n if (!this.eat(types$1.parenR)) {\n this.expect(types$1.comma);\n if (!this.afterTrailingComma(types$1.parenR)) {\n node.options = this.parseMaybeAssign();\n if (!this.eat(types$1.parenR)) {\n this.expect(types$1.comma);\n if (!this.afterTrailingComma(types$1.parenR)) {\n this.unexpected();\n }\n }\n } else {\n node.options = null;\n }\n } else {\n node.options = null;\n }\n } else {\n // Verify ending.\n if (!this.eat(types$1.parenR)) {\n var errorPos = this.start;\n if (this.eat(types$1.comma) && this.eat(types$1.parenR)) {\n this.raiseRecoverable(errorPos, \"Trailing comma is not allowed in import()\");\n } else {\n this.unexpected(errorPos);\n }\n }\n }\n\n return this.finishNode(node, \"ImportExpression\")\n};\n\npp$5.parseImportMeta = function(node) {\n this.next(); // skip `.`\n\n var containsEsc = this.containsEsc;\n node.property = this.parseIdent(true);\n\n if (node.property.name !== \"meta\")\n { this.raiseRecoverable(node.property.start, \"The only valid meta property for import is 'import.meta'\"); }\n if (containsEsc)\n { this.raiseRecoverable(node.start, \"'import.meta' must not contain escaped characters\"); }\n if (this.options.sourceType !== \"module\" && !this.options.allowImportExportEverywhere)\n { this.raiseRecoverable(node.start, \"Cannot use 'import.meta' outside a module\"); }\n\n return this.finishNode(node, \"MetaProperty\")\n};\n\npp$5.parseLiteral = function(value) {\n var node = this.startNode();\n node.value = value;\n node.raw = this.input.slice(this.start, this.end);\n if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, \"\"); }\n this.next();\n return this.finishNode(node, \"Literal\")\n};\n\npp$5.parseParenExpression = function() {\n this.expect(types$1.parenL);\n var val = this.parseExpression();\n this.expect(types$1.parenR);\n return val\n};\n\npp$5.shouldParseArrow = function(exprList) {\n return !this.canInsertSemicolon()\n};\n\npp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {\n var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;\n if (this.options.ecmaVersion >= 6) {\n this.next();\n\n var innerStartPos = this.start, innerStartLoc = this.startLoc;\n var exprList = [], first = true, lastIsComma = false;\n var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;\n this.yieldPos = 0;\n this.awaitPos = 0;\n // Do not save awaitIdentPos to allow checking awaits nested in parameters\n while (this.type !== types$1.parenR) {\n first ? first = false : this.expect(types$1.comma);\n if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) {\n lastIsComma = true;\n break\n } else if (this.type === types$1.ellipsis) {\n spreadStart = this.start;\n exprList.push(this.parseParenItem(this.parseRestBinding()));\n if (this.type === types$1.comma) {\n this.raiseRecoverable(\n this.start,\n \"Comma is not permitted after the rest element\"\n );\n }\n break\n } else {\n exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));\n }\n }\n var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;\n this.expect(types$1.parenR);\n\n if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$1.arrow)) {\n this.checkPatternErrors(refDestructuringErrors, false);\n this.checkYieldAwaitInDefaultParams();\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n return this.parseParenArrowList(startPos, startLoc, exprList, forInit)\n }\n\n if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); }\n if (spreadStart) { this.unexpected(spreadStart); }\n this.checkExpressionErrors(refDestructuringErrors, true);\n this.yieldPos = oldYieldPos || this.yieldPos;\n this.awaitPos = oldAwaitPos || this.awaitPos;\n\n if (exprList.length > 1) {\n val = this.startNodeAt(innerStartPos, innerStartLoc);\n val.expressions = exprList;\n this.finishNodeAt(val, \"SequenceExpression\", innerEndPos, innerEndLoc);\n } else {\n val = exprList[0];\n }\n } else {\n val = this.parseParenExpression();\n }\n\n if (this.options.preserveParens) {\n var par = this.startNodeAt(startPos, startLoc);\n par.expression = val;\n return this.finishNode(par, \"ParenthesizedExpression\")\n } else {\n return val\n }\n};\n\npp$5.parseParenItem = function(item) {\n return item\n};\n\npp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit)\n};\n\n// New's precedence is slightly tricky. It must allow its argument to\n// be a `[]` or dot subscript expression, but not a call — at least,\n// not without wrapping it in parentheses. Thus, it uses the noCalls\n// argument to parseSubscripts to prevent it from consuming the\n// argument list.\n\nvar empty = [];\n\npp$5.parseNew = function() {\n if (this.containsEsc) { this.raiseRecoverable(this.start, \"Escape sequence in keyword new\"); }\n var node = this.startNode();\n this.next();\n if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) {\n var meta = this.startNodeAt(node.start, node.loc && node.loc.start);\n meta.name = \"new\";\n node.meta = this.finishNode(meta, \"Identifier\");\n this.next();\n var containsEsc = this.containsEsc;\n node.property = this.parseIdent(true);\n if (node.property.name !== \"target\")\n { this.raiseRecoverable(node.property.start, \"The only valid meta property for new is 'new.target'\"); }\n if (containsEsc)\n { this.raiseRecoverable(node.start, \"'new.target' must not contain escaped characters\"); }\n if (!this.allowNewDotTarget)\n { this.raiseRecoverable(node.start, \"'new.target' can only be used in functions and class static block\"); }\n return this.finishNode(node, \"MetaProperty\")\n }\n var startPos = this.start, startLoc = this.startLoc;\n node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false);\n if (this.eat(types$1.parenL)) { node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false); }\n else { node.arguments = empty; }\n return this.finishNode(node, \"NewExpression\")\n};\n\n// Parse template expression.\n\npp$5.parseTemplateElement = function(ref) {\n var isTagged = ref.isTagged;\n\n var elem = this.startNode();\n if (this.type === types$1.invalidTemplate) {\n if (!isTagged) {\n this.raiseRecoverable(this.start, \"Bad escape sequence in untagged template literal\");\n }\n elem.value = {\n raw: this.value.replace(/\\r\\n?/g, \"\\n\"),\n cooked: null\n };\n } else {\n elem.value = {\n raw: this.input.slice(this.start, this.end).replace(/\\r\\n?/g, \"\\n\"),\n cooked: this.value\n };\n }\n this.next();\n elem.tail = this.type === types$1.backQuote;\n return this.finishNode(elem, \"TemplateElement\")\n};\n\npp$5.parseTemplate = function(ref) {\n if ( ref === void 0 ) ref = {};\n var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false;\n\n var node = this.startNode();\n this.next();\n node.expressions = [];\n var curElt = this.parseTemplateElement({isTagged: isTagged});\n node.quasis = [curElt];\n while (!curElt.tail) {\n if (this.type === types$1.eof) { this.raise(this.pos, \"Unterminated template literal\"); }\n this.expect(types$1.dollarBraceL);\n node.expressions.push(this.parseExpression());\n this.expect(types$1.braceR);\n node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged}));\n }\n this.next();\n return this.finishNode(node, \"TemplateLiteral\")\n};\n\npp$5.isAsyncProp = function(prop) {\n return !prop.computed && prop.key.type === \"Identifier\" && prop.key.name === \"async\" &&\n (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types$1.star)) &&\n !lineBreak.test(this.input.slice(this.lastTokEnd, this.start))\n};\n\n// Parse an object literal or binding pattern.\n\npp$5.parseObj = function(isPattern, refDestructuringErrors) {\n var node = this.startNode(), first = true, propHash = {};\n node.properties = [];\n this.next();\n while (!this.eat(types$1.braceR)) {\n if (!first) {\n this.expect(types$1.comma);\n if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) { break }\n } else { first = false; }\n\n var prop = this.parseProperty(isPattern, refDestructuringErrors);\n if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); }\n node.properties.push(prop);\n }\n return this.finishNode(node, isPattern ? \"ObjectPattern\" : \"ObjectExpression\")\n};\n\npp$5.parseProperty = function(isPattern, refDestructuringErrors) {\n var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;\n if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) {\n if (isPattern) {\n prop.argument = this.parseIdent(false);\n if (this.type === types$1.comma) {\n this.raiseRecoverable(this.start, \"Comma is not permitted after the rest element\");\n }\n return this.finishNode(prop, \"RestElement\")\n }\n // Parse argument.\n prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);\n // To disallow trailing comma via `this.toAssignable()`.\n if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {\n refDestructuringErrors.trailingComma = this.start;\n }\n // Finish\n return this.finishNode(prop, \"SpreadElement\")\n }\n if (this.options.ecmaVersion >= 6) {\n prop.method = false;\n prop.shorthand = false;\n if (isPattern || refDestructuringErrors) {\n startPos = this.start;\n startLoc = this.startLoc;\n }\n if (!isPattern)\n { isGenerator = this.eat(types$1.star); }\n }\n var containsEsc = this.containsEsc;\n this.parsePropertyName(prop);\n if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {\n isAsync = true;\n isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star);\n this.parsePropertyName(prop);\n } else {\n isAsync = false;\n }\n this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);\n return this.finishNode(prop, \"Property\")\n};\n\npp$5.parseGetterSetter = function(prop) {\n prop.kind = prop.key.name;\n this.parsePropertyName(prop);\n prop.value = this.parseMethod(false);\n var paramCount = prop.kind === \"get\" ? 0 : 1;\n if (prop.value.params.length !== paramCount) {\n var start = prop.value.start;\n if (prop.kind === \"get\")\n { this.raiseRecoverable(start, \"getter should have no params\"); }\n else\n { this.raiseRecoverable(start, \"setter should have exactly one param\"); }\n } else {\n if (prop.kind === \"set\" && prop.value.params[0].type === \"RestElement\")\n { this.raiseRecoverable(prop.value.params[0].start, \"Setter cannot use rest params\"); }\n }\n};\n\npp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {\n if ((isGenerator || isAsync) && this.type === types$1.colon)\n { this.unexpected(); }\n\n if (this.eat(types$1.colon)) {\n prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);\n prop.kind = \"init\";\n } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) {\n if (isPattern) { this.unexpected(); }\n prop.kind = \"init\";\n prop.method = true;\n prop.value = this.parseMethod(isGenerator, isAsync);\n } else if (!isPattern && !containsEsc &&\n this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === \"Identifier\" &&\n (prop.key.name === \"get\" || prop.key.name === \"set\") &&\n (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) {\n if (isGenerator || isAsync) { this.unexpected(); }\n this.parseGetterSetter(prop);\n } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === \"Identifier\") {\n if (isGenerator || isAsync) { this.unexpected(); }\n this.checkUnreserved(prop.key);\n if (prop.key.name === \"await\" && !this.awaitIdentPos)\n { this.awaitIdentPos = startPos; }\n prop.kind = \"init\";\n if (isPattern) {\n prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));\n } else if (this.type === types$1.eq && refDestructuringErrors) {\n if (refDestructuringErrors.shorthandAssign < 0)\n { refDestructuringErrors.shorthandAssign = this.start; }\n prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));\n } else {\n prop.value = this.copyNode(prop.key);\n }\n prop.shorthand = true;\n } else { this.unexpected(); }\n};\n\npp$5.parsePropertyName = function(prop) {\n if (this.options.ecmaVersion >= 6) {\n if (this.eat(types$1.bracketL)) {\n prop.computed = true;\n prop.key = this.parseMaybeAssign();\n this.expect(types$1.bracketR);\n return prop.key\n } else {\n prop.computed = false;\n }\n }\n return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== \"never\")\n};\n\n// Initialize empty function node.\n\npp$5.initFunction = function(node) {\n node.id = null;\n if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; }\n if (this.options.ecmaVersion >= 8) { node.async = false; }\n};\n\n// Parse object or class method.\n\npp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {\n var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;\n\n this.initFunction(node);\n if (this.options.ecmaVersion >= 6)\n { node.generator = isGenerator; }\n if (this.options.ecmaVersion >= 8)\n { node.async = !!isAsync; }\n\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));\n\n this.expect(types$1.parenL);\n node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);\n this.checkYieldAwaitInDefaultParams();\n this.parseFunctionBody(node, false, true, false);\n\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.finishNode(node, \"FunctionExpression\")\n};\n\n// Parse arrow function expression with given parameters.\n\npp$5.parseArrowExpression = function(node, params, isAsync, forInit) {\n var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;\n\n this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);\n this.initFunction(node);\n if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; }\n\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n\n node.params = this.toAssignableList(params, true);\n this.parseFunctionBody(node, true, false, forInit);\n\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.finishNode(node, \"ArrowFunctionExpression\")\n};\n\n// Parse function body and check parameters.\n\npp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) {\n var isExpression = isArrowFunction && this.type !== types$1.braceL;\n var oldStrict = this.strict, useStrict = false;\n\n if (isExpression) {\n node.body = this.parseMaybeAssign(forInit);\n node.expression = true;\n this.checkParams(node, false);\n } else {\n var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);\n if (!oldStrict || nonSimple) {\n useStrict = this.strictDirective(this.end);\n // If this is a strict mode function, verify that argument names\n // are not repeated, and it does not try to bind the words `eval`\n // or `arguments`.\n if (useStrict && nonSimple)\n { this.raiseRecoverable(node.start, \"Illegal 'use strict' directive in function with non-simple parameter list\"); }\n }\n // Start a new scope with regard to labels and the `inFunction`\n // flag (restore them to their old value afterwards).\n var oldLabels = this.labels;\n this.labels = [];\n if (useStrict) { this.strict = true; }\n\n // Add the params to varDeclaredNames to ensure that an error is thrown\n // if a let/const declaration in the function clashes with one of the params.\n this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));\n // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'\n if (this.strict && node.id) { this.checkLValSimple(node.id, BIND_OUTSIDE); }\n node.body = this.parseBlock(false, undefined, useStrict && !oldStrict);\n node.expression = false;\n this.adaptDirectivePrologue(node.body.body);\n this.labels = oldLabels;\n }\n this.exitScope();\n};\n\npp$5.isSimpleParamList = function(params) {\n for (var i = 0, list = params; i < list.length; i += 1)\n {\n var param = list[i];\n\n if (param.type !== \"Identifier\") { return false\n } }\n return true\n};\n\n// Checks function params for various disallowed patterns such as using \"eval\"\n// or \"arguments\" and duplicate parameters.\n\npp$5.checkParams = function(node, allowDuplicates) {\n var nameHash = Object.create(null);\n for (var i = 0, list = node.params; i < list.length; i += 1)\n {\n var param = list[i];\n\n this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash);\n }\n};\n\n// Parses a comma-separated list of expressions, and returns them as\n// an array. `close` is the token type that ends the list, and\n// `allowEmpty` can be turned on to allow subsequent commas with\n// nothing in between them to be parsed as `null` (which is needed\n// for array literals).\n\npp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {\n var elts = [], first = true;\n while (!this.eat(close)) {\n if (!first) {\n this.expect(types$1.comma);\n if (allowTrailingComma && this.afterTrailingComma(close)) { break }\n } else { first = false; }\n\n var elt = (void 0);\n if (allowEmpty && this.type === types$1.comma)\n { elt = null; }\n else if (this.type === types$1.ellipsis) {\n elt = this.parseSpread(refDestructuringErrors);\n if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0)\n { refDestructuringErrors.trailingComma = this.start; }\n } else {\n elt = this.parseMaybeAssign(false, refDestructuringErrors);\n }\n elts.push(elt);\n }\n return elts\n};\n\npp$5.checkUnreserved = function(ref) {\n var start = ref.start;\n var end = ref.end;\n var name = ref.name;\n\n if (this.inGenerator && name === \"yield\")\n { this.raiseRecoverable(start, \"Cannot use 'yield' as identifier inside a generator\"); }\n if (this.inAsync && name === \"await\")\n { this.raiseRecoverable(start, \"Cannot use 'await' as identifier inside an async function\"); }\n if (this.currentThisScope().inClassFieldInit && name === \"arguments\")\n { this.raiseRecoverable(start, \"Cannot use 'arguments' in class field initializer\"); }\n if (this.inClassStaticBlock && (name === \"arguments\" || name === \"await\"))\n { this.raise(start, (\"Cannot use \" + name + \" in class static initialization block\")); }\n if (this.keywords.test(name))\n { this.raise(start, (\"Unexpected keyword '\" + name + \"'\")); }\n if (this.options.ecmaVersion < 6 &&\n this.input.slice(start, end).indexOf(\"\\\\\") !== -1) { return }\n var re = this.strict ? this.reservedWordsStrict : this.reservedWords;\n if (re.test(name)) {\n if (!this.inAsync && name === \"await\")\n { this.raiseRecoverable(start, \"Cannot use keyword 'await' outside an async function\"); }\n this.raiseRecoverable(start, (\"The keyword '\" + name + \"' is reserved\"));\n }\n};\n\n// Parse the next token as an identifier. If `liberal` is true (used\n// when parsing properties), it will also convert keywords into\n// identifiers.\n\npp$5.parseIdent = function(liberal) {\n var node = this.parseIdentNode();\n this.next(!!liberal);\n this.finishNode(node, \"Identifier\");\n if (!liberal) {\n this.checkUnreserved(node);\n if (node.name === \"await\" && !this.awaitIdentPos)\n { this.awaitIdentPos = node.start; }\n }\n return node\n};\n\npp$5.parseIdentNode = function() {\n var node = this.startNode();\n if (this.type === types$1.name) {\n node.name = this.value;\n } else if (this.type.keyword) {\n node.name = this.type.keyword;\n\n // To fix https://github.com/acornjs/acorn/issues/575\n // `class` and `function` keywords push new context into this.context.\n // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name.\n // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword\n if ((node.name === \"class\" || node.name === \"function\") &&\n (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {\n this.context.pop();\n }\n this.type = types$1.name;\n } else {\n this.unexpected();\n }\n return node\n};\n\npp$5.parsePrivateIdent = function() {\n var node = this.startNode();\n if (this.type === types$1.privateId) {\n node.name = this.value;\n } else {\n this.unexpected();\n }\n this.next();\n this.finishNode(node, \"PrivateIdentifier\");\n\n // For validating existence\n if (this.options.checkPrivateFields) {\n if (this.privateNameStack.length === 0) {\n this.raise(node.start, (\"Private field '#\" + (node.name) + \"' must be declared in an enclosing class\"));\n } else {\n this.privateNameStack[this.privateNameStack.length - 1].used.push(node);\n }\n }\n\n return node\n};\n\n// Parses yield expression inside generator.\n\npp$5.parseYield = function(forInit) {\n if (!this.yieldPos) { this.yieldPos = this.start; }\n\n var node = this.startNode();\n this.next();\n if (this.type === types$1.semi || this.canInsertSemicolon() || (this.type !== types$1.star && !this.type.startsExpr)) {\n node.delegate = false;\n node.argument = null;\n } else {\n node.delegate = this.eat(types$1.star);\n node.argument = this.parseMaybeAssign(forInit);\n }\n return this.finishNode(node, \"YieldExpression\")\n};\n\npp$5.parseAwait = function(forInit) {\n if (!this.awaitPos) { this.awaitPos = this.start; }\n\n var node = this.startNode();\n this.next();\n node.argument = this.parseMaybeUnary(null, true, false, forInit);\n return this.finishNode(node, \"AwaitExpression\")\n};\n\nvar pp$4 = Parser.prototype;\n\n// This function is used to raise exceptions on parse errors. It\n// takes an offset integer (into the current `input`) to indicate\n// the location of the error, attaches the position to the end\n// of the error message, and then raises a `SyntaxError` with that\n// message.\n\npp$4.raise = function(pos, message) {\n var loc = getLineInfo(this.input, pos);\n message += \" (\" + loc.line + \":\" + loc.column + \")\";\n var err = new SyntaxError(message);\n err.pos = pos; err.loc = loc; err.raisedAt = this.pos;\n throw err\n};\n\npp$4.raiseRecoverable = pp$4.raise;\n\npp$4.curPosition = function() {\n if (this.options.locations) {\n return new Position(this.curLine, this.pos - this.lineStart)\n }\n};\n\nvar pp$3 = Parser.prototype;\n\nvar Scope = function Scope(flags) {\n this.flags = flags;\n // A list of var-declared names in the current lexical scope\n this.var = [];\n // A list of lexically-declared names in the current lexical scope\n this.lexical = [];\n // A list of lexically-declared FunctionDeclaration names in the current lexical scope\n this.functions = [];\n // A switch to disallow the identifier reference 'arguments'\n this.inClassFieldInit = false;\n};\n\n// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.\n\npp$3.enterScope = function(flags) {\n this.scopeStack.push(new Scope(flags));\n};\n\npp$3.exitScope = function() {\n this.scopeStack.pop();\n};\n\n// The spec says:\n// > At the top level of a function, or script, function declarations are\n// > treated like var declarations rather than like lexical declarations.\npp$3.treatFunctionsAsVarInScope = function(scope) {\n return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP)\n};\n\npp$3.declareName = function(name, bindingType, pos) {\n var redeclared = false;\n if (bindingType === BIND_LEXICAL) {\n var scope = this.currentScope();\n redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;\n scope.lexical.push(name);\n if (this.inModule && (scope.flags & SCOPE_TOP))\n { delete this.undefinedExports[name]; }\n } else if (bindingType === BIND_SIMPLE_CATCH) {\n var scope$1 = this.currentScope();\n scope$1.lexical.push(name);\n } else if (bindingType === BIND_FUNCTION) {\n var scope$2 = this.currentScope();\n if (this.treatFunctionsAsVar)\n { redeclared = scope$2.lexical.indexOf(name) > -1; }\n else\n { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; }\n scope$2.functions.push(name);\n } else {\n for (var i = this.scopeStack.length - 1; i >= 0; --i) {\n var scope$3 = this.scopeStack[i];\n if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) ||\n !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) {\n redeclared = true;\n break\n }\n scope$3.var.push(name);\n if (this.inModule && (scope$3.flags & SCOPE_TOP))\n { delete this.undefinedExports[name]; }\n if (scope$3.flags & SCOPE_VAR) { break }\n }\n }\n if (redeclared) { this.raiseRecoverable(pos, (\"Identifier '\" + name + \"' has already been declared\")); }\n};\n\npp$3.checkLocalExport = function(id) {\n // scope.functions must be empty as Module code is always strict.\n if (this.scopeStack[0].lexical.indexOf(id.name) === -1 &&\n this.scopeStack[0].var.indexOf(id.name) === -1) {\n this.undefinedExports[id.name] = id;\n }\n};\n\npp$3.currentScope = function() {\n return this.scopeStack[this.scopeStack.length - 1]\n};\n\npp$3.currentVarScope = function() {\n for (var i = this.scopeStack.length - 1;; i--) {\n var scope = this.scopeStack[i];\n if (scope.flags & SCOPE_VAR) { return scope }\n }\n};\n\n// Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\npp$3.currentThisScope = function() {\n for (var i = this.scopeStack.length - 1;; i--) {\n var scope = this.scopeStack[i];\n if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope }\n }\n};\n\nvar Node = function Node(parser, pos, loc) {\n this.type = \"\";\n this.start = pos;\n this.end = 0;\n if (parser.options.locations)\n { this.loc = new SourceLocation(parser, loc); }\n if (parser.options.directSourceFile)\n { this.sourceFile = parser.options.directSourceFile; }\n if (parser.options.ranges)\n { this.range = [pos, 0]; }\n};\n\n// Start an AST node, attaching a start offset.\n\nvar pp$2 = Parser.prototype;\n\npp$2.startNode = function() {\n return new Node(this, this.start, this.startLoc)\n};\n\npp$2.startNodeAt = function(pos, loc) {\n return new Node(this, pos, loc)\n};\n\n// Finish an AST node, adding `type` and `end` properties.\n\nfunction finishNodeAt(node, type, pos, loc) {\n node.type = type;\n node.end = pos;\n if (this.options.locations)\n { node.loc.end = loc; }\n if (this.options.ranges)\n { node.range[1] = pos; }\n return node\n}\n\npp$2.finishNode = function(node, type) {\n return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)\n};\n\n// Finish node at given position\n\npp$2.finishNodeAt = function(node, type, pos, loc) {\n return finishNodeAt.call(this, node, type, pos, loc)\n};\n\npp$2.copyNode = function(node) {\n var newNode = new Node(this, node.start, this.startLoc);\n for (var prop in node) { newNode[prop] = node[prop]; }\n return newNode\n};\n\n// This file was generated by \"bin/generate-unicode-script-values.js\". Do not modify manually!\nvar scriptValuesAddedInUnicode = \"Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz\";\n\n// This file contains Unicode properties extracted from the ECMAScript specification.\n// The lists are extracted like so:\n// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText)\n\n// #table-binary-unicode-properties\nvar ecma9BinaryProperties = \"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS\";\nvar ecma10BinaryProperties = ecma9BinaryProperties + \" Extended_Pictographic\";\nvar ecma11BinaryProperties = ecma10BinaryProperties;\nvar ecma12BinaryProperties = ecma11BinaryProperties + \" EBase EComp EMod EPres ExtPict\";\nvar ecma13BinaryProperties = ecma12BinaryProperties;\nvar ecma14BinaryProperties = ecma13BinaryProperties;\n\nvar unicodeBinaryProperties = {\n 9: ecma9BinaryProperties,\n 10: ecma10BinaryProperties,\n 11: ecma11BinaryProperties,\n 12: ecma12BinaryProperties,\n 13: ecma13BinaryProperties,\n 14: ecma14BinaryProperties\n};\n\n// #table-binary-unicode-properties-of-strings\nvar ecma14BinaryPropertiesOfStrings = \"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji\";\n\nvar unicodeBinaryPropertiesOfStrings = {\n 9: \"\",\n 10: \"\",\n 11: \"\",\n 12: \"\",\n 13: \"\",\n 14: ecma14BinaryPropertiesOfStrings\n};\n\n// #table-unicode-general-category-values\nvar 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\";\n\n// #table-unicode-script-values\nvar 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\";\nvar ecma10ScriptValues = ecma9ScriptValues + \" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd\";\nvar ecma11ScriptValues = ecma10ScriptValues + \" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho\";\nvar ecma12ScriptValues = ecma11ScriptValues + \" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi\";\nvar ecma13ScriptValues = ecma12ScriptValues + \" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith\";\nvar ecma14ScriptValues = ecma13ScriptValues + \" \" + scriptValuesAddedInUnicode;\n\nvar unicodeScriptValues = {\n 9: ecma9ScriptValues,\n 10: ecma10ScriptValues,\n 11: ecma11ScriptValues,\n 12: ecma12ScriptValues,\n 13: ecma13ScriptValues,\n 14: ecma14ScriptValues\n};\n\nvar data = {};\nfunction buildUnicodeData(ecmaVersion) {\n var d = data[ecmaVersion] = {\n binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + \" \" + unicodeGeneralCategoryValues),\n binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion]),\n nonBinary: {\n General_Category: wordsRegexp(unicodeGeneralCategoryValues),\n Script: wordsRegexp(unicodeScriptValues[ecmaVersion])\n }\n };\n d.nonBinary.Script_Extensions = d.nonBinary.Script;\n\n d.nonBinary.gc = d.nonBinary.General_Category;\n d.nonBinary.sc = d.nonBinary.Script;\n d.nonBinary.scx = d.nonBinary.Script_Extensions;\n}\n\nfor (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) {\n var ecmaVersion = list[i];\n\n buildUnicodeData(ecmaVersion);\n}\n\nvar pp$1 = Parser.prototype;\n\n// Track disjunction structure to determine whether a duplicate\n// capture group name is allowed because it is in a separate branch.\nvar BranchID = function BranchID(parent, base) {\n // Parent disjunction branch\n this.parent = parent;\n // Identifies this set of sibling branches\n this.base = base || this;\n};\n\nBranchID.prototype.separatedFrom = function separatedFrom (alt) {\n // A branch is separate from another branch if they or any of\n // their parents are siblings in a given disjunction\n for (var self = this; self; self = self.parent) {\n for (var other = alt; other; other = other.parent) {\n if (self.base === other.base && self !== other) { return true }\n }\n }\n return false\n};\n\nBranchID.prototype.sibling = function sibling () {\n return new BranchID(this.parent, this.base)\n};\n\nvar RegExpValidationState = function RegExpValidationState(parser) {\n this.parser = parser;\n this.validFlags = \"gim\" + (parser.options.ecmaVersion >= 6 ? \"uy\" : \"\") + (parser.options.ecmaVersion >= 9 ? \"s\" : \"\") + (parser.options.ecmaVersion >= 13 ? \"d\" : \"\") + (parser.options.ecmaVersion >= 15 ? \"v\" : \"\");\n this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion];\n this.source = \"\";\n this.flags = \"\";\n this.start = 0;\n this.switchU = false;\n this.switchV = false;\n this.switchN = false;\n this.pos = 0;\n this.lastIntValue = 0;\n this.lastStringValue = \"\";\n this.lastAssertionIsQuantifiable = false;\n this.numCapturingParens = 0;\n this.maxBackReference = 0;\n this.groupNames = Object.create(null);\n this.backReferenceNames = [];\n this.branchID = null;\n};\n\nRegExpValidationState.prototype.reset = function reset (start, pattern, flags) {\n var unicodeSets = flags.indexOf(\"v\") !== -1;\n var unicode = flags.indexOf(\"u\") !== -1;\n this.start = start | 0;\n this.source = pattern + \"\";\n this.flags = flags;\n if (unicodeSets && this.parser.options.ecmaVersion >= 15) {\n this.switchU = true;\n this.switchV = true;\n this.switchN = true;\n } else {\n this.switchU = unicode && this.parser.options.ecmaVersion >= 6;\n this.switchV = false;\n this.switchN = unicode && this.parser.options.ecmaVersion >= 9;\n }\n};\n\nRegExpValidationState.prototype.raise = function raise (message) {\n this.parser.raiseRecoverable(this.start, (\"Invalid regular expression: /\" + (this.source) + \"/: \" + message));\n};\n\n// If u flag is given, this returns the code point at the index (it combines a surrogate pair).\n// Otherwise, this returns the code unit of the index (can be a part of a surrogate pair).\nRegExpValidationState.prototype.at = function at (i, forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n var s = this.source;\n var l = s.length;\n if (i >= l) {\n return -1\n }\n var c = s.charCodeAt(i);\n if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {\n return c\n }\n var next = s.charCodeAt(i + 1);\n return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c\n};\n\nRegExpValidationState.prototype.nextIndex = function nextIndex (i, forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n var s = this.source;\n var l = s.length;\n if (i >= l) {\n return l\n }\n var c = s.charCodeAt(i), next;\n if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l ||\n (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) {\n return i + 1\n }\n return i + 2\n};\n\nRegExpValidationState.prototype.current = function current (forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n return this.at(this.pos, forceU)\n};\n\nRegExpValidationState.prototype.lookahead = function lookahead (forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n return this.at(this.nextIndex(this.pos, forceU), forceU)\n};\n\nRegExpValidationState.prototype.advance = function advance (forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n this.pos = this.nextIndex(this.pos, forceU);\n};\n\nRegExpValidationState.prototype.eat = function eat (ch, forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n if (this.current(forceU) === ch) {\n this.advance(forceU);\n return true\n }\n return false\n};\n\nRegExpValidationState.prototype.eatChars = function eatChars (chs, forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n var pos = this.pos;\n for (var i = 0, list = chs; i < list.length; i += 1) {\n var ch = list[i];\n\n var current = this.at(pos, forceU);\n if (current === -1 || current !== ch) {\n return false\n }\n pos = this.nextIndex(pos, forceU);\n }\n this.pos = pos;\n return true\n};\n\n/**\n * Validate the flags part of a given RegExpLiteral.\n *\n * @param {RegExpValidationState} state The state to validate RegExp.\n * @returns {void}\n */\npp$1.validateRegExpFlags = function(state) {\n var validFlags = state.validFlags;\n var flags = state.flags;\n\n var u = false;\n var v = false;\n\n for (var i = 0; i < flags.length; i++) {\n var flag = flags.charAt(i);\n if (validFlags.indexOf(flag) === -1) {\n this.raise(state.start, \"Invalid regular expression flag\");\n }\n if (flags.indexOf(flag, i + 1) > -1) {\n this.raise(state.start, \"Duplicate regular expression flag\");\n }\n if (flag === \"u\") { u = true; }\n if (flag === \"v\") { v = true; }\n }\n if (this.options.ecmaVersion >= 15 && u && v) {\n this.raise(state.start, \"Invalid regular expression flag\");\n }\n};\n\nfunction hasProp(obj) {\n for (var _ in obj) { return true }\n return false\n}\n\n/**\n * Validate the pattern part of a given RegExpLiteral.\n *\n * @param {RegExpValidationState} state The state to validate RegExp.\n * @returns {void}\n */\npp$1.validateRegExpPattern = function(state) {\n this.regexp_pattern(state);\n\n // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of\n // parsing contains a |GroupName|, reparse with the goal symbol\n // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*\n // exception if _P_ did not conform to the grammar, if any elements of _P_\n // were not matched by the parse, or if any Early Error conditions exist.\n if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {\n state.switchN = true;\n this.regexp_pattern(state);\n }\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern\npp$1.regexp_pattern = function(state) {\n state.pos = 0;\n state.lastIntValue = 0;\n state.lastStringValue = \"\";\n state.lastAssertionIsQuantifiable = false;\n state.numCapturingParens = 0;\n state.maxBackReference = 0;\n state.groupNames = Object.create(null);\n state.backReferenceNames.length = 0;\n state.branchID = null;\n\n this.regexp_disjunction(state);\n\n if (state.pos !== state.source.length) {\n // Make the same messages as V8.\n if (state.eat(0x29 /* ) */)) {\n state.raise(\"Unmatched ')'\");\n }\n if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) {\n state.raise(\"Lone quantifier brackets\");\n }\n }\n if (state.maxBackReference > state.numCapturingParens) {\n state.raise(\"Invalid escape\");\n }\n for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {\n var name = list[i];\n\n if (!state.groupNames[name]) {\n state.raise(\"Invalid named capture referenced\");\n }\n }\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction\npp$1.regexp_disjunction = function(state) {\n var trackDisjunction = this.options.ecmaVersion >= 16;\n if (trackDisjunction) { state.branchID = new BranchID(state.branchID, null); }\n this.regexp_alternative(state);\n while (state.eat(0x7C /* | */)) {\n if (trackDisjunction) { state.branchID = state.branchID.sibling(); }\n this.regexp_alternative(state);\n }\n if (trackDisjunction) { state.branchID = state.branchID.parent; }\n\n // Make the same message as V8.\n if (this.regexp_eatQuantifier(state, true)) {\n state.raise(\"Nothing to repeat\");\n }\n if (state.eat(0x7B /* { */)) {\n state.raise(\"Lone quantifier brackets\");\n }\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative\npp$1.regexp_alternative = function(state) {\n while (state.pos < state.source.length && this.regexp_eatTerm(state)) {}\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term\npp$1.regexp_eatTerm = function(state) {\n if (this.regexp_eatAssertion(state)) {\n // Handle `QuantifiableAssertion Quantifier` alternative.\n // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion\n // is a QuantifiableAssertion.\n if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {\n // Make the same message as V8.\n if (state.switchU) {\n state.raise(\"Invalid quantifier\");\n }\n }\n return true\n }\n\n if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {\n this.regexp_eatQuantifier(state);\n return true\n }\n\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion\npp$1.regexp_eatAssertion = function(state) {\n var start = state.pos;\n state.lastAssertionIsQuantifiable = false;\n\n // ^, $\n if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) {\n return true\n }\n\n // \\b \\B\n if (state.eat(0x5C /* \\ */)) {\n if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) {\n return true\n }\n state.pos = start;\n }\n\n // Lookahead / Lookbehind\n if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) {\n var lookbehind = false;\n if (this.options.ecmaVersion >= 9) {\n lookbehind = state.eat(0x3C /* < */);\n }\n if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) {\n this.regexp_disjunction(state);\n if (!state.eat(0x29 /* ) */)) {\n state.raise(\"Unterminated group\");\n }\n state.lastAssertionIsQuantifiable = !lookbehind;\n return true\n }\n }\n\n state.pos = start;\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier\npp$1.regexp_eatQuantifier = function(state, noError) {\n if ( noError === void 0 ) noError = false;\n\n if (this.regexp_eatQuantifierPrefix(state, noError)) {\n state.eat(0x3F /* ? */);\n return true\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix\npp$1.regexp_eatQuantifierPrefix = function(state, noError) {\n return (\n state.eat(0x2A /* * */) ||\n state.eat(0x2B /* + */) ||\n state.eat(0x3F /* ? */) ||\n this.regexp_eatBracedQuantifier(state, noError)\n )\n};\npp$1.regexp_eatBracedQuantifier = function(state, noError) {\n var start = state.pos;\n if (state.eat(0x7B /* { */)) {\n var min = 0, max = -1;\n if (this.regexp_eatDecimalDigits(state)) {\n min = state.lastIntValue;\n if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) {\n max = state.lastIntValue;\n }\n if (state.eat(0x7D /* } */)) {\n // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term\n if (max !== -1 && max < min && !noError) {\n state.raise(\"numbers out of order in {} quantifier\");\n }\n return true\n }\n }\n if (state.switchU && !noError) {\n state.raise(\"Incomplete quantifier\");\n }\n state.pos = start;\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Atom\npp$1.regexp_eatAtom = function(state) {\n return (\n this.regexp_eatPatternCharacters(state) ||\n state.eat(0x2E /* . */) ||\n this.regexp_eatReverseSolidusAtomEscape(state) ||\n this.regexp_eatCharacterClass(state) ||\n this.regexp_eatUncapturingGroup(state) ||\n this.regexp_eatCapturingGroup(state)\n )\n};\npp$1.regexp_eatReverseSolidusAtomEscape = function(state) {\n var start = state.pos;\n if (state.eat(0x5C /* \\ */)) {\n if (this.regexp_eatAtomEscape(state)) {\n return true\n }\n state.pos = start;\n }\n return false\n};\npp$1.regexp_eatUncapturingGroup = function(state) {\n var start = state.pos;\n if (state.eat(0x28 /* ( */)) {\n if (state.eat(0x3F /* ? */)) {\n if (this.options.ecmaVersion >= 16) {\n var addModifiers = this.regexp_eatModifiers(state);\n var hasHyphen = state.eat(0x2D /* - */);\n if (addModifiers || hasHyphen) {\n for (var i = 0; i < addModifiers.length; i++) {\n var modifier = addModifiers.charAt(i);\n if (addModifiers.indexOf(modifier, i + 1) > -1) {\n state.raise(\"Duplicate regular expression modifiers\");\n }\n }\n if (hasHyphen) {\n var removeModifiers = this.regexp_eatModifiers(state);\n if (!addModifiers && !removeModifiers && state.current() === 0x3A /* : */) {\n state.raise(\"Invalid regular expression modifiers\");\n }\n for (var i$1 = 0; i$1 < removeModifiers.length; i$1++) {\n var modifier$1 = removeModifiers.charAt(i$1);\n if (\n removeModifiers.indexOf(modifier$1, i$1 + 1) > -1 ||\n addModifiers.indexOf(modifier$1) > -1\n ) {\n state.raise(\"Duplicate regular expression modifiers\");\n }\n }\n }\n }\n }\n if (state.eat(0x3A /* : */)) {\n this.regexp_disjunction(state);\n if (state.eat(0x29 /* ) */)) {\n return true\n }\n state.raise(\"Unterminated group\");\n }\n }\n state.pos = start;\n }\n return false\n};\npp$1.regexp_eatCapturingGroup = function(state) {\n if (state.eat(0x28 /* ( */)) {\n if (this.options.ecmaVersion >= 9) {\n this.regexp_groupSpecifier(state);\n } else if (state.current() === 0x3F /* ? */) {\n state.raise(\"Invalid group\");\n }\n this.regexp_disjunction(state);\n if (state.eat(0x29 /* ) */)) {\n state.numCapturingParens += 1;\n return true\n }\n state.raise(\"Unterminated group\");\n }\n return false\n};\n// RegularExpressionModifiers ::\n// [empty]\n// RegularExpressionModifiers RegularExpressionModifier\npp$1.regexp_eatModifiers = function(state) {\n var modifiers = \"\";\n var ch = 0;\n while ((ch = state.current()) !== -1 && isRegularExpressionModifier(ch)) {\n modifiers += codePointToString(ch);\n state.advance();\n }\n return modifiers\n};\n// RegularExpressionModifier :: one of\n// `i` `m` `s`\nfunction isRegularExpressionModifier(ch) {\n return ch === 0x69 /* i */ || ch === 0x6d /* m */ || ch === 0x73 /* s */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom\npp$1.regexp_eatExtendedAtom = function(state) {\n return (\n state.eat(0x2E /* . */) ||\n this.regexp_eatReverseSolidusAtomEscape(state) ||\n this.regexp_eatCharacterClass(state) ||\n this.regexp_eatUncapturingGroup(state) ||\n this.regexp_eatCapturingGroup(state) ||\n this.regexp_eatInvalidBracedQuantifier(state) ||\n this.regexp_eatExtendedPatternCharacter(state)\n )\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier\npp$1.regexp_eatInvalidBracedQuantifier = function(state) {\n if (this.regexp_eatBracedQuantifier(state, true)) {\n state.raise(\"Nothing to repeat\");\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter\npp$1.regexp_eatSyntaxCharacter = function(state) {\n var ch = state.current();\n if (isSyntaxCharacter(ch)) {\n state.lastIntValue = ch;\n state.advance();\n return true\n }\n return false\n};\nfunction isSyntaxCharacter(ch) {\n return (\n ch === 0x24 /* $ */ ||\n ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ ||\n ch === 0x2E /* . */ ||\n ch === 0x3F /* ? */ ||\n ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ ||\n ch >= 0x7B /* { */ && ch <= 0x7D /* } */\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter\n// But eat eager.\npp$1.regexp_eatPatternCharacters = function(state) {\n var start = state.pos;\n var ch = 0;\n while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {\n state.advance();\n }\n return state.pos !== start\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter\npp$1.regexp_eatExtendedPatternCharacter = function(state) {\n var ch = state.current();\n if (\n ch !== -1 &&\n ch !== 0x24 /* $ */ &&\n !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) &&\n ch !== 0x2E /* . */ &&\n ch !== 0x3F /* ? */ &&\n ch !== 0x5B /* [ */ &&\n ch !== 0x5E /* ^ */ &&\n ch !== 0x7C /* | */\n ) {\n state.advance();\n return true\n }\n return false\n};\n\n// GroupSpecifier ::\n// [empty]\n// `?` GroupName\npp$1.regexp_groupSpecifier = function(state) {\n if (state.eat(0x3F /* ? */)) {\n if (!this.regexp_eatGroupName(state)) { state.raise(\"Invalid group\"); }\n var trackDisjunction = this.options.ecmaVersion >= 16;\n var known = state.groupNames[state.lastStringValue];\n if (known) {\n if (trackDisjunction) {\n for (var i = 0, list = known; i < list.length; i += 1) {\n var altID = list[i];\n\n if (!altID.separatedFrom(state.branchID))\n { state.raise(\"Duplicate capture group name\"); }\n }\n } else {\n state.raise(\"Duplicate capture group name\");\n }\n }\n if (trackDisjunction) {\n (known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID);\n } else {\n state.groupNames[state.lastStringValue] = true;\n }\n }\n};\n\n// GroupName ::\n// `<` RegExpIdentifierName `>`\n// Note: this updates `state.lastStringValue` property with the eaten name.\npp$1.regexp_eatGroupName = function(state) {\n state.lastStringValue = \"\";\n if (state.eat(0x3C /* < */)) {\n if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) {\n return true\n }\n state.raise(\"Invalid capture group name\");\n }\n return false\n};\n\n// RegExpIdentifierName ::\n// RegExpIdentifierStart\n// RegExpIdentifierName RegExpIdentifierPart\n// Note: this updates `state.lastStringValue` property with the eaten name.\npp$1.regexp_eatRegExpIdentifierName = function(state) {\n state.lastStringValue = \"\";\n if (this.regexp_eatRegExpIdentifierStart(state)) {\n state.lastStringValue += codePointToString(state.lastIntValue);\n while (this.regexp_eatRegExpIdentifierPart(state)) {\n state.lastStringValue += codePointToString(state.lastIntValue);\n }\n return true\n }\n return false\n};\n\n// RegExpIdentifierStart ::\n// UnicodeIDStart\n// `$`\n// `_`\n// `\\` RegExpUnicodeEscapeSequence[+U]\npp$1.regexp_eatRegExpIdentifierStart = function(state) {\n var start = state.pos;\n var forceU = this.options.ecmaVersion >= 11;\n var ch = state.current(forceU);\n state.advance(forceU);\n\n if (ch === 0x5C /* \\ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {\n ch = state.lastIntValue;\n }\n if (isRegExpIdentifierStart(ch)) {\n state.lastIntValue = ch;\n return true\n }\n\n state.pos = start;\n return false\n};\nfunction isRegExpIdentifierStart(ch) {\n return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */\n}\n\n// RegExpIdentifierPart ::\n// UnicodeIDContinue\n// `$`\n// `_`\n// `\\` RegExpUnicodeEscapeSequence[+U]\n// <ZWNJ>\n// <ZWJ>\npp$1.regexp_eatRegExpIdentifierPart = function(state) {\n var start = state.pos;\n var forceU = this.options.ecmaVersion >= 11;\n var ch = state.current(forceU);\n state.advance(forceU);\n\n if (ch === 0x5C /* \\ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {\n ch = state.lastIntValue;\n }\n if (isRegExpIdentifierPart(ch)) {\n state.lastIntValue = ch;\n return true\n }\n\n state.pos = start;\n return false\n};\nfunction isRegExpIdentifierPart(ch) {\n return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* <ZWNJ> */ || ch === 0x200D /* <ZWJ> */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape\npp$1.regexp_eatAtomEscape = function(state) {\n if (\n this.regexp_eatBackReference(state) ||\n this.regexp_eatCharacterClassEscape(state) ||\n this.regexp_eatCharacterEscape(state) ||\n (state.switchN && this.regexp_eatKGroupName(state))\n ) {\n return true\n }\n if (state.switchU) {\n // Make the same message as V8.\n if (state.current() === 0x63 /* c */) {\n state.raise(\"Invalid unicode escape\");\n }\n state.raise(\"Invalid escape\");\n }\n return false\n};\npp$1.regexp_eatBackReference = function(state) {\n var start = state.pos;\n if (this.regexp_eatDecimalEscape(state)) {\n var n = state.lastIntValue;\n if (state.switchU) {\n // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape\n if (n > state.maxBackReference) {\n state.maxBackReference = n;\n }\n return true\n }\n if (n <= state.numCapturingParens) {\n return true\n }\n state.pos = start;\n }\n return false\n};\npp$1.regexp_eatKGroupName = function(state) {\n if (state.eat(0x6B /* k */)) {\n if (this.regexp_eatGroupName(state)) {\n state.backReferenceNames.push(state.lastStringValue);\n return true\n }\n state.raise(\"Invalid named reference\");\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape\npp$1.regexp_eatCharacterEscape = function(state) {\n return (\n this.regexp_eatControlEscape(state) ||\n this.regexp_eatCControlLetter(state) ||\n this.regexp_eatZero(state) ||\n this.regexp_eatHexEscapeSequence(state) ||\n this.regexp_eatRegExpUnicodeEscapeSequence(state, false) ||\n (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) ||\n this.regexp_eatIdentityEscape(state)\n )\n};\npp$1.regexp_eatCControlLetter = function(state) {\n var start = state.pos;\n if (state.eat(0x63 /* c */)) {\n if (this.regexp_eatControlLetter(state)) {\n return true\n }\n state.pos = start;\n }\n return false\n};\npp$1.regexp_eatZero = function(state) {\n if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) {\n state.lastIntValue = 0;\n state.advance();\n return true\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape\npp$1.regexp_eatControlEscape = function(state) {\n var ch = state.current();\n if (ch === 0x74 /* t */) {\n state.lastIntValue = 0x09; /* \\t */\n state.advance();\n return true\n }\n if (ch === 0x6E /* n */) {\n state.lastIntValue = 0x0A; /* \\n */\n state.advance();\n return true\n }\n if (ch === 0x76 /* v */) {\n state.lastIntValue = 0x0B; /* \\v */\n state.advance();\n return true\n }\n if (ch === 0x66 /* f */) {\n state.lastIntValue = 0x0C; /* \\f */\n state.advance();\n return true\n }\n if (ch === 0x72 /* r */) {\n state.lastIntValue = 0x0D; /* \\r */\n state.advance();\n return true\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter\npp$1.regexp_eatControlLetter = function(state) {\n var ch = state.current();\n if (isControlLetter(ch)) {\n state.lastIntValue = ch % 0x20;\n state.advance();\n return true\n }\n return false\n};\nfunction isControlLetter(ch) {\n return (\n (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) ||\n (ch >= 0x61 /* a */ && ch <= 0x7A /* z */)\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence\npp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {\n if ( forceU === void 0 ) forceU = false;\n\n var start = state.pos;\n var switchU = forceU || state.switchU;\n\n if (state.eat(0x75 /* u */)) {\n if (this.regexp_eatFixedHexDigits(state, 4)) {\n var lead = state.lastIntValue;\n if (switchU && lead >= 0xD800 && lead <= 0xDBFF) {\n var leadSurrogateEnd = state.pos;\n if (state.eat(0x5C /* \\ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) {\n var trail = state.lastIntValue;\n if (trail >= 0xDC00 && trail <= 0xDFFF) {\n state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n return true\n }\n }\n state.pos = leadSurrogateEnd;\n state.lastIntValue = lead;\n }\n return true\n }\n if (\n switchU &&\n state.eat(0x7B /* { */) &&\n this.regexp_eatHexDigits(state) &&\n state.eat(0x7D /* } */) &&\n isValidUnicode(state.lastIntValue)\n ) {\n return true\n }\n if (switchU) {\n state.raise(\"Invalid unicode escape\");\n }\n state.pos = start;\n }\n\n return false\n};\nfunction isValidUnicode(ch) {\n return ch >= 0 && ch <= 0x10FFFF\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape\npp$1.regexp_eatIdentityEscape = function(state) {\n if (state.switchU) {\n if (this.regexp_eatSyntaxCharacter(state)) {\n return true\n }\n if (state.eat(0x2F /* / */)) {\n state.lastIntValue = 0x2F; /* / */\n return true\n }\n return false\n }\n\n var ch = state.current();\n if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) {\n state.lastIntValue = ch;\n state.advance();\n return true\n }\n\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape\npp$1.regexp_eatDecimalEscape = function(state) {\n state.lastIntValue = 0;\n var ch = state.current();\n if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) {\n do {\n state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */);\n state.advance();\n } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */)\n return true\n }\n return false\n};\n\n// Return values used by character set parsing methods, needed to\n// forbid negation of sets that can match strings.\nvar CharSetNone = 0; // Nothing parsed\nvar CharSetOk = 1; // Construct parsed, cannot contain strings\nvar CharSetString = 2; // Construct parsed, can contain strings\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape\npp$1.regexp_eatCharacterClassEscape = function(state) {\n var ch = state.current();\n\n if (isCharacterClassEscape(ch)) {\n state.lastIntValue = -1;\n state.advance();\n return CharSetOk\n }\n\n var negate = false;\n if (\n state.switchU &&\n this.options.ecmaVersion >= 9 &&\n ((negate = ch === 0x50 /* P */) || ch === 0x70 /* p */)\n ) {\n state.lastIntValue = -1;\n state.advance();\n var result;\n if (\n state.eat(0x7B /* { */) &&\n (result = this.regexp_eatUnicodePropertyValueExpression(state)) &&\n state.eat(0x7D /* } */)\n ) {\n if (negate && result === CharSetString) { state.raise(\"Invalid property name\"); }\n return result\n }\n state.raise(\"Invalid property name\");\n }\n\n return CharSetNone\n};\n\nfunction isCharacterClassEscape(ch) {\n return (\n ch === 0x64 /* d */ ||\n ch === 0x44 /* D */ ||\n ch === 0x73 /* s */ ||\n ch === 0x53 /* S */ ||\n ch === 0x77 /* w */ ||\n ch === 0x57 /* W */\n )\n}\n\n// UnicodePropertyValueExpression ::\n// UnicodePropertyName `=` UnicodePropertyValue\n// LoneUnicodePropertyNameOrValue\npp$1.regexp_eatUnicodePropertyValueExpression = function(state) {\n var start = state.pos;\n\n // UnicodePropertyName `=` UnicodePropertyValue\n if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) {\n var name = state.lastStringValue;\n if (this.regexp_eatUnicodePropertyValue(state)) {\n var value = state.lastStringValue;\n this.regexp_validateUnicodePropertyNameAndValue(state, name, value);\n return CharSetOk\n }\n }\n state.pos = start;\n\n // LoneUnicodePropertyNameOrValue\n if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {\n var nameOrValue = state.lastStringValue;\n return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue)\n }\n return CharSetNone\n};\n\npp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {\n if (!hasOwn(state.unicodeProperties.nonBinary, name))\n { state.raise(\"Invalid property name\"); }\n if (!state.unicodeProperties.nonBinary[name].test(value))\n { state.raise(\"Invalid property value\"); }\n};\n\npp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {\n if (state.unicodeProperties.binary.test(nameOrValue)) { return CharSetOk }\n if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue)) { return CharSetString }\n state.raise(\"Invalid property name\");\n};\n\n// UnicodePropertyName ::\n// UnicodePropertyNameCharacters\npp$1.regexp_eatUnicodePropertyName = function(state) {\n var ch = 0;\n state.lastStringValue = \"\";\n while (isUnicodePropertyNameCharacter(ch = state.current())) {\n state.lastStringValue += codePointToString(ch);\n state.advance();\n }\n return state.lastStringValue !== \"\"\n};\n\nfunction isUnicodePropertyNameCharacter(ch) {\n return isControlLetter(ch) || ch === 0x5F /* _ */\n}\n\n// UnicodePropertyValue ::\n// UnicodePropertyValueCharacters\npp$1.regexp_eatUnicodePropertyValue = function(state) {\n var ch = 0;\n state.lastStringValue = \"\";\n while (isUnicodePropertyValueCharacter(ch = state.current())) {\n state.lastStringValue += codePointToString(ch);\n state.advance();\n }\n return state.lastStringValue !== \"\"\n};\nfunction isUnicodePropertyValueCharacter(ch) {\n return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch)\n}\n\n// LoneUnicodePropertyNameOrValue ::\n// UnicodePropertyValueCharacters\npp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {\n return this.regexp_eatUnicodePropertyValue(state)\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass\npp$1.regexp_eatCharacterClass = function(state) {\n if (state.eat(0x5B /* [ */)) {\n var negate = state.eat(0x5E /* ^ */);\n var result = this.regexp_classContents(state);\n if (!state.eat(0x5D /* ] */))\n { state.raise(\"Unterminated character class\"); }\n if (negate && result === CharSetString)\n { state.raise(\"Negated character class may contain strings\"); }\n return true\n }\n return false\n};\n\n// https://tc39.es/ecma262/#prod-ClassContents\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges\npp$1.regexp_classContents = function(state) {\n if (state.current() === 0x5D /* ] */) { return CharSetOk }\n if (state.switchV) { return this.regexp_classSetExpression(state) }\n this.regexp_nonEmptyClassRanges(state);\n return CharSetOk\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges\n// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash\npp$1.regexp_nonEmptyClassRanges = function(state) {\n while (this.regexp_eatClassAtom(state)) {\n var left = state.lastIntValue;\n if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) {\n var right = state.lastIntValue;\n if (state.switchU && (left === -1 || right === -1)) {\n state.raise(\"Invalid character class\");\n }\n if (left !== -1 && right !== -1 && left > right) {\n state.raise(\"Range out of order in character class\");\n }\n }\n }\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash\npp$1.regexp_eatClassAtom = function(state) {\n var start = state.pos;\n\n if (state.eat(0x5C /* \\ */)) {\n if (this.regexp_eatClassEscape(state)) {\n return true\n }\n if (state.switchU) {\n // Make the same message as V8.\n var ch$1 = state.current();\n if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) {\n state.raise(\"Invalid class escape\");\n }\n state.raise(\"Invalid escape\");\n }\n state.pos = start;\n }\n\n var ch = state.current();\n if (ch !== 0x5D /* ] */) {\n state.lastIntValue = ch;\n state.advance();\n return true\n }\n\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape\npp$1.regexp_eatClassEscape = function(state) {\n var start = state.pos;\n\n if (state.eat(0x62 /* b */)) {\n state.lastIntValue = 0x08; /* <BS> */\n return true\n }\n\n if (state.switchU && state.eat(0x2D /* - */)) {\n state.lastIntValue = 0x2D; /* - */\n return true\n }\n\n if (!state.switchU && state.eat(0x63 /* c */)) {\n if (this.regexp_eatClassControlLetter(state)) {\n return true\n }\n state.pos = start;\n }\n\n return (\n this.regexp_eatCharacterClassEscape(state) ||\n this.regexp_eatCharacterEscape(state)\n )\n};\n\n// https://tc39.es/ecma262/#prod-ClassSetExpression\n// https://tc39.es/ecma262/#prod-ClassUnion\n// https://tc39.es/ecma262/#prod-ClassIntersection\n// https://tc39.es/ecma262/#prod-ClassSubtraction\npp$1.regexp_classSetExpression = function(state) {\n var result = CharSetOk, subResult;\n if (this.regexp_eatClassSetRange(state)) ; else if (subResult = this.regexp_eatClassSetOperand(state)) {\n if (subResult === CharSetString) { result = CharSetString; }\n // https://tc39.es/ecma262/#prod-ClassIntersection\n var start = state.pos;\n while (state.eatChars([0x26, 0x26] /* && */)) {\n if (\n state.current() !== 0x26 /* & */ &&\n (subResult = this.regexp_eatClassSetOperand(state))\n ) {\n if (subResult !== CharSetString) { result = CharSetOk; }\n continue\n }\n state.raise(\"Invalid character in character class\");\n }\n if (start !== state.pos) { return result }\n // https://tc39.es/ecma262/#prod-ClassSubtraction\n while (state.eatChars([0x2D, 0x2D] /* -- */)) {\n if (this.regexp_eatClassSetOperand(state)) { continue }\n state.raise(\"Invalid character in character class\");\n }\n if (start !== state.pos) { return result }\n } else {\n state.raise(\"Invalid character in character class\");\n }\n // https://tc39.es/ecma262/#prod-ClassUnion\n for (;;) {\n if (this.regexp_eatClassSetRange(state)) { continue }\n subResult = this.regexp_eatClassSetOperand(state);\n if (!subResult) { return result }\n if (subResult === CharSetString) { result = CharSetString; }\n }\n};\n\n// https://tc39.es/ecma262/#prod-ClassSetRange\npp$1.regexp_eatClassSetRange = function(state) {\n var start = state.pos;\n if (this.regexp_eatClassSetCharacter(state)) {\n var left = state.lastIntValue;\n if (state.eat(0x2D /* - */) && this.regexp_eatClassSetCharacter(state)) {\n var right = state.lastIntValue;\n if (left !== -1 && right !== -1 && left > right) {\n state.raise(\"Range out of order in character class\");\n }\n return true\n }\n state.pos = start;\n }\n return false\n};\n\n// https://tc39.es/ecma262/#prod-ClassSetOperand\npp$1.regexp_eatClassSetOperand = function(state) {\n if (this.regexp_eatClassSetCharacter(state)) { return CharSetOk }\n return this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state)\n};\n\n// https://tc39.es/ecma262/#prod-NestedClass\npp$1.regexp_eatNestedClass = function(state) {\n var start = state.pos;\n if (state.eat(0x5B /* [ */)) {\n var negate = state.eat(0x5E /* ^ */);\n var result = this.regexp_classContents(state);\n if (state.eat(0x5D /* ] */)) {\n if (negate && result === CharSetString) {\n state.raise(\"Negated character class may contain strings\");\n }\n return result\n }\n state.pos = start;\n }\n if (state.eat(0x5C /* \\ */)) {\n var result$1 = this.regexp_eatCharacterClassEscape(state);\n if (result$1) {\n return result$1\n }\n state.pos = start;\n }\n return null\n};\n\n// https://tc39.es/ecma262/#prod-ClassStringDisjunction\npp$1.regexp_eatClassStringDisjunction = function(state) {\n var start = state.pos;\n if (state.eatChars([0x5C, 0x71] /* \\q */)) {\n if (state.eat(0x7B /* { */)) {\n var result = this.regexp_classStringDisjunctionContents(state);\n if (state.eat(0x7D /* } */)) {\n return result\n }\n } else {\n // Make the same message as V8.\n state.raise(\"Invalid escape\");\n }\n state.pos = start;\n }\n return null\n};\n\n// https://tc39.es/ecma262/#prod-ClassStringDisjunctionContents\npp$1.regexp_classStringDisjunctionContents = function(state) {\n var result = this.regexp_classString(state);\n while (state.eat(0x7C /* | */)) {\n if (this.regexp_classString(state) === CharSetString) { result = CharSetString; }\n }\n return result\n};\n\n// https://tc39.es/ecma262/#prod-ClassString\n// https://tc39.es/ecma262/#prod-NonEmptyClassString\npp$1.regexp_classString = function(state) {\n var count = 0;\n while (this.regexp_eatClassSetCharacter(state)) { count++; }\n return count === 1 ? CharSetOk : CharSetString\n};\n\n// https://tc39.es/ecma262/#prod-ClassSetCharacter\npp$1.regexp_eatClassSetCharacter = function(state) {\n var start = state.pos;\n if (state.eat(0x5C /* \\ */)) {\n if (\n this.regexp_eatCharacterEscape(state) ||\n this.regexp_eatClassSetReservedPunctuator(state)\n ) {\n return true\n }\n if (state.eat(0x62 /* b */)) {\n state.lastIntValue = 0x08; /* <BS> */\n return true\n }\n state.pos = start;\n return false\n }\n var ch = state.current();\n if (ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter(ch)) { return false }\n if (isClassSetSyntaxCharacter(ch)) { return false }\n state.advance();\n state.lastIntValue = ch;\n return true\n};\n\n// https://tc39.es/ecma262/#prod-ClassSetReservedDoublePunctuator\nfunction isClassSetReservedDoublePunctuatorCharacter(ch) {\n return (\n ch === 0x21 /* ! */ ||\n ch >= 0x23 /* # */ && ch <= 0x26 /* & */ ||\n ch >= 0x2A /* * */ && ch <= 0x2C /* , */ ||\n ch === 0x2E /* . */ ||\n ch >= 0x3A /* : */ && ch <= 0x40 /* @ */ ||\n ch === 0x5E /* ^ */ ||\n ch === 0x60 /* ` */ ||\n ch === 0x7E /* ~ */\n )\n}\n\n// https://tc39.es/ecma262/#prod-ClassSetSyntaxCharacter\nfunction isClassSetSyntaxCharacter(ch) {\n return (\n ch === 0x28 /* ( */ ||\n ch === 0x29 /* ) */ ||\n ch === 0x2D /* - */ ||\n ch === 0x2F /* / */ ||\n ch >= 0x5B /* [ */ && ch <= 0x5D /* ] */ ||\n ch >= 0x7B /* { */ && ch <= 0x7D /* } */\n )\n}\n\n// https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator\npp$1.regexp_eatClassSetReservedPunctuator = function(state) {\n var ch = state.current();\n if (isClassSetReservedPunctuator(ch)) {\n state.lastIntValue = ch;\n state.advance();\n return true\n }\n return false\n};\n\n// https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator\nfunction isClassSetReservedPunctuator(ch) {\n return (\n ch === 0x21 /* ! */ ||\n ch === 0x23 /* # */ ||\n ch === 0x25 /* % */ ||\n ch === 0x26 /* & */ ||\n ch === 0x2C /* , */ ||\n ch === 0x2D /* - */ ||\n ch >= 0x3A /* : */ && ch <= 0x3E /* > */ ||\n ch === 0x40 /* @ */ ||\n ch === 0x60 /* ` */ ||\n ch === 0x7E /* ~ */\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter\npp$1.regexp_eatClassControlLetter = function(state) {\n var ch = state.current();\n if (isDecimalDigit(ch) || ch === 0x5F /* _ */) {\n state.lastIntValue = ch % 0x20;\n state.advance();\n return true\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence\npp$1.regexp_eatHexEscapeSequence = function(state) {\n var start = state.pos;\n if (state.eat(0x78 /* x */)) {\n if (this.regexp_eatFixedHexDigits(state, 2)) {\n return true\n }\n if (state.switchU) {\n state.raise(\"Invalid escape\");\n }\n state.pos = start;\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits\npp$1.regexp_eatDecimalDigits = function(state) {\n var start = state.pos;\n var ch = 0;\n state.lastIntValue = 0;\n while (isDecimalDigit(ch = state.current())) {\n state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */);\n state.advance();\n }\n return state.pos !== start\n};\nfunction isDecimalDigit(ch) {\n return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits\npp$1.regexp_eatHexDigits = function(state) {\n var start = state.pos;\n var ch = 0;\n state.lastIntValue = 0;\n while (isHexDigit(ch = state.current())) {\n state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);\n state.advance();\n }\n return state.pos !== start\n};\nfunction isHexDigit(ch) {\n return (\n (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) ||\n (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) ||\n (ch >= 0x61 /* a */ && ch <= 0x66 /* f */)\n )\n}\nfunction hexToInt(ch) {\n if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) {\n return 10 + (ch - 0x41 /* A */)\n }\n if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) {\n return 10 + (ch - 0x61 /* a */)\n }\n return ch - 0x30 /* 0 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence\n// Allows only 0-377(octal) i.e. 0-255(decimal).\npp$1.regexp_eatLegacyOctalEscapeSequence = function(state) {\n if (this.regexp_eatOctalDigit(state)) {\n var n1 = state.lastIntValue;\n if (this.regexp_eatOctalDigit(state)) {\n var n2 = state.lastIntValue;\n if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {\n state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;\n } else {\n state.lastIntValue = n1 * 8 + n2;\n }\n } else {\n state.lastIntValue = n1;\n }\n return true\n }\n return false\n};\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit\npp$1.regexp_eatOctalDigit = function(state) {\n var ch = state.current();\n if (isOctalDigit(ch)) {\n state.lastIntValue = ch - 0x30; /* 0 */\n state.advance();\n return true\n }\n state.lastIntValue = 0;\n return false\n};\nfunction isOctalDigit(ch) {\n return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit\n// And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence\npp$1.regexp_eatFixedHexDigits = function(state, length) {\n var start = state.pos;\n state.lastIntValue = 0;\n for (var i = 0; i < length; ++i) {\n var ch = state.current();\n if (!isHexDigit(ch)) {\n state.pos = start;\n return false\n }\n state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);\n state.advance();\n }\n return true\n};\n\n// Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\nvar Token = function Token(p) {\n this.type = p.type;\n this.value = p.value;\n this.start = p.start;\n this.end = p.end;\n if (p.options.locations)\n { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); }\n if (p.options.ranges)\n { this.range = [p.start, p.end]; }\n};\n\n// ## Tokenizer\n\nvar pp = Parser.prototype;\n\n// Move to the next token\n\npp.next = function(ignoreEscapeSequenceInKeyword) {\n if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc)\n { this.raiseRecoverable(this.start, \"Escape sequence in keyword \" + this.type.keyword); }\n if (this.options.onToken)\n { this.options.onToken(new Token(this)); }\n\n this.lastTokEnd = this.end;\n this.lastTokStart = this.start;\n this.lastTokEndLoc = this.endLoc;\n this.lastTokStartLoc = this.startLoc;\n this.nextToken();\n};\n\npp.getToken = function() {\n this.next();\n return new Token(this)\n};\n\n// If we're in an ES6 environment, make parsers iterable\nif (typeof Symbol !== \"undefined\")\n { pp[Symbol.iterator] = function() {\n var this$1$1 = this;\n\n return {\n next: function () {\n var token = this$1$1.getToken();\n return {\n done: token.type === types$1.eof,\n value: token\n }\n }\n }\n }; }\n\n// Toggle strict mode. Re-reads the next number or string to please\n// pedantic tests (`\"use strict\"; 010;` should fail).\n\n// Read a single token, updating the parser object's token-related\n// properties.\n\npp.nextToken = function() {\n var curContext = this.curContext();\n if (!curContext || !curContext.preserveSpace) { this.skipSpace(); }\n\n this.start = this.pos;\n if (this.options.locations) { this.startLoc = this.curPosition(); }\n if (this.pos >= this.input.length) { return this.finishToken(types$1.eof) }\n\n if (curContext.override) { return curContext.override(this) }\n else { this.readToken(this.fullCharCodeAtPos()); }\n};\n\npp.readToken = function(code) {\n // Identifier or keyword. '\\uXXXX' sequences are allowed in\n // identifiers, so '\\' also dispatches to that.\n if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\\' */)\n { return this.readWord() }\n\n return this.getTokenFromCode(code)\n};\n\npp.fullCharCodeAtPos = function() {\n var code = this.input.charCodeAt(this.pos);\n if (code <= 0xd7ff || code >= 0xdc00) { return code }\n var next = this.input.charCodeAt(this.pos + 1);\n return next <= 0xdbff || next >= 0xe000 ? code : (code << 10) + next - 0x35fdc00\n};\n\npp.skipBlockComment = function() {\n var startLoc = this.options.onComment && this.curPosition();\n var start = this.pos, end = this.input.indexOf(\"*/\", this.pos += 2);\n if (end === -1) { this.raise(this.pos - 2, \"Unterminated comment\"); }\n this.pos = end + 2;\n if (this.options.locations) {\n for (var nextBreak = (void 0), pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;) {\n ++this.curLine;\n pos = this.lineStart = nextBreak;\n }\n }\n if (this.options.onComment)\n { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,\n startLoc, this.curPosition()); }\n};\n\npp.skipLineComment = function(startSkip) {\n var start = this.pos;\n var startLoc = this.options.onComment && this.curPosition();\n var ch = this.input.charCodeAt(this.pos += startSkip);\n while (this.pos < this.input.length && !isNewLine(ch)) {\n ch = this.input.charCodeAt(++this.pos);\n }\n if (this.options.onComment)\n { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,\n startLoc, this.curPosition()); }\n};\n\n// Called at the start of the parse and after every token. Skips\n// whitespace and comments, and.\n\npp.skipSpace = function() {\n loop: while (this.pos < this.input.length) {\n var ch = this.input.charCodeAt(this.pos);\n switch (ch) {\n case 32: case 160: // ' '\n ++this.pos;\n break\n case 13:\n if (this.input.charCodeAt(this.pos + 1) === 10) {\n ++this.pos;\n }\n case 10: case 8232: case 8233:\n ++this.pos;\n if (this.options.locations) {\n ++this.curLine;\n this.lineStart = this.pos;\n }\n break\n case 47: // '/'\n switch (this.input.charCodeAt(this.pos + 1)) {\n case 42: // '*'\n this.skipBlockComment();\n break\n case 47:\n this.skipLineComment(2);\n break\n default:\n break loop\n }\n break\n default:\n if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {\n ++this.pos;\n } else {\n break loop\n }\n }\n }\n};\n\n// Called at the end of every token. Sets `end`, `val`, and\n// maintains `context` and `exprAllowed`, and skips the space after\n// the token, so that the next one's `start` will point at the\n// right position.\n\npp.finishToken = function(type, val) {\n this.end = this.pos;\n if (this.options.locations) { this.endLoc = this.curPosition(); }\n var prevType = this.type;\n this.type = type;\n this.value = val;\n\n this.updateContext(prevType);\n};\n\n// ### Token reading\n\n// This is the function that is called to fetch the next token. It\n// is somewhat obscure, because it works in character codes rather\n// than characters, and because operator parsing has been inlined\n// into it.\n//\n// All in the name of speed.\n//\npp.readToken_dot = function() {\n var next = this.input.charCodeAt(this.pos + 1);\n if (next >= 48 && next <= 57) { return this.readNumber(true) }\n var next2 = this.input.charCodeAt(this.pos + 2);\n if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'\n this.pos += 3;\n return this.finishToken(types$1.ellipsis)\n } else {\n ++this.pos;\n return this.finishToken(types$1.dot)\n }\n};\n\npp.readToken_slash = function() { // '/'\n var next = this.input.charCodeAt(this.pos + 1);\n if (this.exprAllowed) { ++this.pos; return this.readRegexp() }\n if (next === 61) { return this.finishOp(types$1.assign, 2) }\n return this.finishOp(types$1.slash, 1)\n};\n\npp.readToken_mult_modulo_exp = function(code) { // '%*'\n var next = this.input.charCodeAt(this.pos + 1);\n var size = 1;\n var tokentype = code === 42 ? types$1.star : types$1.modulo;\n\n // exponentiation operator ** and **=\n if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) {\n ++size;\n tokentype = types$1.starstar;\n next = this.input.charCodeAt(this.pos + 2);\n }\n\n if (next === 61) { return this.finishOp(types$1.assign, size + 1) }\n return this.finishOp(tokentype, size)\n};\n\npp.readToken_pipe_amp = function(code) { // '|&'\n var next = this.input.charCodeAt(this.pos + 1);\n if (next === code) {\n if (this.options.ecmaVersion >= 12) {\n var next2 = this.input.charCodeAt(this.pos + 2);\n if (next2 === 61) { return this.finishOp(types$1.assign, 3) }\n }\n return this.finishOp(code === 124 ? types$1.logicalOR : types$1.logicalAND, 2)\n }\n if (next === 61) { return this.finishOp(types$1.assign, 2) }\n return this.finishOp(code === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1)\n};\n\npp.readToken_caret = function() { // '^'\n var next = this.input.charCodeAt(this.pos + 1);\n if (next === 61) { return this.finishOp(types$1.assign, 2) }\n return this.finishOp(types$1.bitwiseXOR, 1)\n};\n\npp.readToken_plus_min = function(code) { // '+-'\n var next = this.input.charCodeAt(this.pos + 1);\n if (next === code) {\n if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 &&\n (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {\n // A `-->` line comment\n this.skipLineComment(3);\n this.skipSpace();\n return this.nextToken()\n }\n return this.finishOp(types$1.incDec, 2)\n }\n if (next === 61) { return this.finishOp(types$1.assign, 2) }\n return this.finishOp(types$1.plusMin, 1)\n};\n\npp.readToken_lt_gt = function(code) { // '<>'\n var next = this.input.charCodeAt(this.pos + 1);\n var size = 1;\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;\n if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) }\n return this.finishOp(types$1.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `<!--`, an XML-style comment that should be interpreted as a line comment\n this.skipLineComment(4);\n this.skipSpace();\n return this.nextToken()\n }\n if (next === 61) { size = 2; }\n return this.finishOp(types$1.relational, size)\n};\n\npp.readToken_eq_excl = function(code) { // '=!'\n var next = this.input.charCodeAt(this.pos + 1);\n if (next === 61) { return this.finishOp(types$1.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) }\n if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'\n this.pos += 2;\n return this.finishToken(types$1.arrow)\n }\n return this.finishOp(code === 61 ? types$1.eq : types$1.prefix, 1)\n};\n\npp.readToken_question = function() { // '?'\n var ecmaVersion = this.options.ecmaVersion;\n if (ecmaVersion >= 11) {\n var next = this.input.charCodeAt(this.pos + 1);\n if (next === 46) {\n var next2 = this.input.charCodeAt(this.pos + 2);\n if (next2 < 48 || next2 > 57) { return this.finishOp(types$1.questionDot, 2) }\n }\n if (next === 63) {\n if (ecmaVersion >= 12) {\n var next2$1 = this.input.charCodeAt(this.pos + 2);\n if (next2$1 === 61) { return this.finishOp(types$1.assign, 3) }\n }\n return this.finishOp(types$1.coalesce, 2)\n }\n }\n return this.finishOp(types$1.question, 1)\n};\n\npp.readToken_numberSign = function() { // '#'\n var ecmaVersion = this.options.ecmaVersion;\n var code = 35; // '#'\n if (ecmaVersion >= 13) {\n ++this.pos;\n code = this.fullCharCodeAtPos();\n if (isIdentifierStart(code, true) || code === 92 /* '\\' */) {\n return this.finishToken(types$1.privateId, this.readWord1())\n }\n }\n\n this.raise(this.pos, \"Unexpected character '\" + codePointToString(code) + \"'\");\n};\n\npp.getTokenFromCode = function(code) {\n switch (code) {\n // The interpretation of a dot depends on whether it is followed\n // by a digit or another two dots.\n case 46: // '.'\n return this.readToken_dot()\n\n // Punctuation tokens.\n case 40: ++this.pos; return this.finishToken(types$1.parenL)\n case 41: ++this.pos; return this.finishToken(types$1.parenR)\n case 59: ++this.pos; return this.finishToken(types$1.semi)\n case 44: ++this.pos; return this.finishToken(types$1.comma)\n case 91: ++this.pos; return this.finishToken(types$1.bracketL)\n case 93: ++this.pos; return this.finishToken(types$1.bracketR)\n case 123: ++this.pos; return this.finishToken(types$1.braceL)\n case 125: ++this.pos; return this.finishToken(types$1.braceR)\n case 58: ++this.pos; return this.finishToken(types$1.colon)\n\n case 96: // '`'\n if (this.options.ecmaVersion < 6) { break }\n ++this.pos;\n return this.finishToken(types$1.backQuote)\n\n case 48: // '0'\n var next = this.input.charCodeAt(this.pos + 1);\n if (next === 120 || next === 88) { return this.readRadixNumber(16) } // '0x', '0X' - hex number\n if (this.options.ecmaVersion >= 6) {\n if (next === 111 || next === 79) { return this.readRadixNumber(8) } // '0o', '0O' - octal number\n if (next === 98 || next === 66) { return this.readRadixNumber(2) } // '0b', '0B' - binary number\n }\n\n // Anything else beginning with a digit is an integer, octal\n // number, or float.\n case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9\n return this.readNumber(false)\n\n // Quotes produce strings.\n case 34: case 39: // '\"', \"'\"\n return this.readString(code)\n\n // Operators are parsed inline in tiny state machines. '=' (61) is\n // often referred to. `finishOp` simply skips the amount of\n // characters it is given as second argument, and returns a token\n // of the type given by its first argument.\n case 47: // '/'\n return this.readToken_slash()\n\n case 37: case 42: // '%*'\n return this.readToken_mult_modulo_exp(code)\n\n case 124: case 38: // '|&'\n return this.readToken_pipe_amp(code)\n\n case 94: // '^'\n return this.readToken_caret()\n\n case 43: case 45: // '+-'\n return this.readToken_plus_min(code)\n\n case 60: case 62: // '<>'\n return this.readToken_lt_gt(code)\n\n case 61: case 33: // '=!'\n return this.readToken_eq_excl(code)\n\n case 63: // '?'\n return this.readToken_question()\n\n case 126: // '~'\n return this.finishOp(types$1.prefix, 1)\n\n case 35: // '#'\n return this.readToken_numberSign()\n }\n\n this.raise(this.pos, \"Unexpected character '\" + codePointToString(code) + \"'\");\n};\n\npp.finishOp = function(type, size) {\n var str = this.input.slice(this.pos, this.pos + size);\n this.pos += size;\n return this.finishToken(type, str)\n};\n\npp.readRegexp = function() {\n var escaped, inClass, start = this.pos;\n for (;;) {\n if (this.pos >= this.input.length) { this.raise(start, \"Unterminated regular expression\"); }\n var ch = this.input.charAt(this.pos);\n if (lineBreak.test(ch)) { this.raise(start, \"Unterminated regular expression\"); }\n if (!escaped) {\n if (ch === \"[\") { inClass = true; }\n else if (ch === \"]\" && inClass) { inClass = false; }\n else if (ch === \"/\" && !inClass) { break }\n escaped = ch === \"\\\\\";\n } else { escaped = false; }\n ++this.pos;\n }\n var pattern = this.input.slice(start, this.pos);\n ++this.pos;\n var flagsStart = this.pos;\n var flags = this.readWord1();\n if (this.containsEsc) { this.unexpected(flagsStart); }\n\n // Validate pattern\n var state = this.regexpState || (this.regexpState = new RegExpValidationState(this));\n state.reset(start, pattern, flags);\n this.validateRegExpFlags(state);\n this.validateRegExpPattern(state);\n\n // Create Literal#value property value.\n var value = null;\n try {\n value = new RegExp(pattern, flags);\n } catch (e) {\n // ESTree requires null if it failed to instantiate RegExp object.\n // https://github.com/estree/estree/blob/a27003adf4fd7bfad44de9cef372a2eacd527b1c/es5.md#regexpliteral\n }\n\n return this.finishToken(types$1.regexp, {pattern: pattern, flags: flags, value: value})\n};\n\n// Read an integer in the given radix. Return null if zero digits\n// were read, the integer value otherwise. When `len` is given, this\n// will return `null` unless the integer has exactly `len` digits.\n\npp.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {\n // `len` is used for character escape sequences. In that case, disallow separators.\n var allowSeparators = this.options.ecmaVersion >= 12 && len === undefined;\n\n // `maybeLegacyOctalNumericLiteral` is true if it doesn't have prefix (0x,0o,0b)\n // and isn't fraction part nor exponent part. In that case, if the first digit\n // is zero then disallow separators.\n var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48;\n\n var start = this.pos, total = 0, lastCode = 0;\n for (var i = 0, e = len == null ? Infinity : len; i < e; ++i, ++this.pos) {\n var code = this.input.charCodeAt(this.pos), val = (void 0);\n\n if (allowSeparators && code === 95) {\n if (isLegacyOctalNumericLiteral) { this.raiseRecoverable(this.pos, \"Numeric separator is not allowed in legacy octal numeric literals\"); }\n if (lastCode === 95) { this.raiseRecoverable(this.pos, \"Numeric separator must be exactly one underscore\"); }\n if (i === 0) { this.raiseRecoverable(this.pos, \"Numeric separator is not allowed at the first of digits\"); }\n lastCode = code;\n continue\n }\n\n if (code >= 97) { val = code - 97 + 10; } // a\n else if (code >= 65) { val = code - 65 + 10; } // A\n else if (code >= 48 && code <= 57) { val = code - 48; } // 0-9\n else { val = Infinity; }\n if (val >= radix) { break }\n lastCode = code;\n total = total * radix + val;\n }\n\n if (allowSeparators && lastCode === 95) { this.raiseRecoverable(this.pos - 1, \"Numeric separator is not allowed at the last of digits\"); }\n if (this.pos === start || len != null && this.pos - start !== len) { return null }\n\n return total\n};\n\nfunction stringToNumber(str, isLegacyOctalNumericLiteral) {\n if (isLegacyOctalNumericLiteral) {\n return parseInt(str, 8)\n }\n\n // `parseFloat(value)` stops parsing at the first numeric separator then returns a wrong value.\n return parseFloat(str.replace(/_/g, \"\"))\n}\n\nfunction stringToBigInt(str) {\n if (typeof BigInt !== \"function\") {\n return null\n }\n\n // `BigInt(value)` throws syntax error if the string contains numeric separators.\n return BigInt(str.replace(/_/g, \"\"))\n}\n\npp.readRadixNumber = function(radix) {\n var start = this.pos;\n this.pos += 2; // 0x\n var val = this.readInt(radix);\n if (val == null) { this.raise(this.start + 2, \"Expected number in radix \" + radix); }\n if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) {\n val = stringToBigInt(this.input.slice(start, this.pos));\n ++this.pos;\n } else if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, \"Identifier directly after number\"); }\n return this.finishToken(types$1.num, val)\n};\n\n// Read an integer, octal integer, or floating-point number.\n\npp.readNumber = function(startsWithDot) {\n var start = this.pos;\n if (!startsWithDot && this.readInt(10, undefined, true) === null) { this.raise(start, \"Invalid number\"); }\n var octal = this.pos - start >= 2 && this.input.charCodeAt(start) === 48;\n if (octal && this.strict) { this.raise(start, \"Invalid number\"); }\n var next = this.input.charCodeAt(this.pos);\n if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {\n var val$1 = stringToBigInt(this.input.slice(start, this.pos));\n ++this.pos;\n if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, \"Identifier directly after number\"); }\n return this.finishToken(types$1.num, val$1)\n }\n if (octal && /[89]/.test(this.input.slice(start, this.pos))) { octal = false; }\n if (next === 46 && !octal) { // '.'\n ++this.pos;\n this.readInt(10);\n next = this.input.charCodeAt(this.pos);\n }\n if ((next === 69 || next === 101) && !octal) { // 'eE'\n next = this.input.charCodeAt(++this.pos);\n if (next === 43 || next === 45) { ++this.pos; } // '+-'\n if (this.readInt(10) === null) { this.raise(start, \"Invalid number\"); }\n }\n if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, \"Identifier directly after number\"); }\n\n var val = stringToNumber(this.input.slice(start, this.pos), octal);\n return this.finishToken(types$1.num, val)\n};\n\n// Read a string value, interpreting backslash-escapes.\n\npp.readCodePoint = function() {\n var ch = this.input.charCodeAt(this.pos), code;\n\n if (ch === 123) { // '{'\n if (this.options.ecmaVersion < 6) { this.unexpected(); }\n var codePos = ++this.pos;\n code = this.readHexChar(this.input.indexOf(\"}\", this.pos) - this.pos);\n ++this.pos;\n if (code > 0x10FFFF) { this.invalidStringToken(codePos, \"Code point out of bounds\"); }\n } else {\n code = this.readHexChar(4);\n }\n return code\n};\n\npp.readString = function(quote) {\n var out = \"\", chunkStart = ++this.pos;\n for (;;) {\n if (this.pos >= this.input.length) { this.raise(this.start, \"Unterminated string constant\"); }\n var ch = this.input.charCodeAt(this.pos);\n if (ch === quote) { break }\n if (ch === 92) { // '\\'\n out += this.input.slice(chunkStart, this.pos);\n out += this.readEscapedChar(false);\n chunkStart = this.pos;\n } else if (ch === 0x2028 || ch === 0x2029) {\n if (this.options.ecmaVersion < 10) { this.raise(this.start, \"Unterminated string constant\"); }\n ++this.pos;\n if (this.options.locations) {\n this.curLine++;\n this.lineStart = this.pos;\n }\n } else {\n if (isNewLine(ch)) { this.raise(this.start, \"Unterminated string constant\"); }\n ++this.pos;\n }\n }\n out += this.input.slice(chunkStart, this.pos++);\n return this.finishToken(types$1.string, out)\n};\n\n// Reads template string tokens.\n\nvar INVALID_TEMPLATE_ESCAPE_ERROR = {};\n\npp.tryReadTemplateToken = function() {\n this.inTemplateElement = true;\n try {\n this.readTmplToken();\n } catch (err) {\n if (err === INVALID_TEMPLATE_ESCAPE_ERROR) {\n this.readInvalidTemplateToken();\n } else {\n throw err\n }\n }\n\n this.inTemplateElement = false;\n};\n\npp.invalidStringToken = function(position, message) {\n if (this.inTemplateElement && this.options.ecmaVersion >= 9) {\n throw INVALID_TEMPLATE_ESCAPE_ERROR\n } else {\n this.raise(position, message);\n }\n};\n\npp.readTmplToken = function() {\n var out = \"\", chunkStart = this.pos;\n for (;;) {\n if (this.pos >= this.input.length) { this.raise(this.start, \"Unterminated template\"); }\n var ch = this.input.charCodeAt(this.pos);\n if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { // '`', '${'\n if (this.pos === this.start && (this.type === types$1.template || this.type === types$1.invalidTemplate)) {\n if (ch === 36) {\n this.pos += 2;\n return this.finishToken(types$1.dollarBraceL)\n } else {\n ++this.pos;\n return this.finishToken(types$1.backQuote)\n }\n }\n out += this.input.slice(chunkStart, this.pos);\n return this.finishToken(types$1.template, out)\n }\n if (ch === 92) { // '\\'\n out += this.input.slice(chunkStart, this.pos);\n out += this.readEscapedChar(true);\n chunkStart = this.pos;\n } else if (isNewLine(ch)) {\n out += this.input.slice(chunkStart, this.pos);\n ++this.pos;\n switch (ch) {\n case 13:\n if (this.input.charCodeAt(this.pos) === 10) { ++this.pos; }\n case 10:\n out += \"\\n\";\n break\n default:\n out += String.fromCharCode(ch);\n break\n }\n if (this.options.locations) {\n ++this.curLine;\n this.lineStart = this.pos;\n }\n chunkStart = this.pos;\n } else {\n ++this.pos;\n }\n }\n};\n\n// Reads a template token to search for the end, without validating any escape sequences\npp.readInvalidTemplateToken = function() {\n for (; this.pos < this.input.length; this.pos++) {\n switch (this.input[this.pos]) {\n case \"\\\\\":\n ++this.pos;\n break\n\n case \"$\":\n if (this.input[this.pos + 1] !== \"{\") { break }\n // fall through\n case \"`\":\n return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos))\n\n case \"\\r\":\n if (this.input[this.pos + 1] === \"\\n\") { ++this.pos; }\n // fall through\n case \"\\n\": case \"\\u2028\": case \"\\u2029\":\n ++this.curLine;\n this.lineStart = this.pos + 1;\n break\n }\n }\n this.raise(this.start, \"Unterminated template\");\n};\n\n// Used to read escaped characters\n\npp.readEscapedChar = function(inTemplate) {\n var ch = this.input.charCodeAt(++this.pos);\n ++this.pos;\n switch (ch) {\n case 110: return \"\\n\" // 'n' -> '\\n'\n case 114: return \"\\r\" // 'r' -> '\\r'\n case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'\n case 117: return codePointToString(this.readCodePoint()) // 'u'\n case 116: return \"\\t\" // 't' -> '\\t'\n case 98: return \"\\b\" // 'b' -> '\\b'\n case 118: return \"\\u000b\" // 'v' -> '\\u000b'\n case 102: return \"\\f\" // 'f' -> '\\f'\n case 13: if (this.input.charCodeAt(this.pos) === 10) { ++this.pos; } // '\\r\\n'\n case 10: // ' \\n'\n if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; }\n return \"\"\n case 56:\n case 57:\n if (this.strict) {\n this.invalidStringToken(\n this.pos - 1,\n \"Invalid escape sequence\"\n );\n }\n if (inTemplate) {\n var codePos = this.pos - 1;\n\n this.invalidStringToken(\n codePos,\n \"Invalid escape sequence in template string\"\n );\n }\n default:\n if (ch >= 48 && ch <= 55) {\n var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];\n var octal = parseInt(octalStr, 8);\n if (octal > 255) {\n octalStr = octalStr.slice(0, -1);\n octal = parseInt(octalStr, 8);\n }\n this.pos += octalStr.length - 1;\n ch = this.input.charCodeAt(this.pos);\n if ((octalStr !== \"0\" || ch === 56 || ch === 57) && (this.strict || inTemplate)) {\n this.invalidStringToken(\n this.pos - 1 - octalStr.length,\n inTemplate\n ? \"Octal literal in template string\"\n : \"Octal literal in strict mode\"\n );\n }\n return String.fromCharCode(octal)\n }\n if (isNewLine(ch)) {\n // Unicode new line characters after \\ get removed from output in both\n // template literals and strings\n if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; }\n return \"\"\n }\n return String.fromCharCode(ch)\n }\n};\n\n// Used to read character escape sequences ('\\x', '\\u', '\\U').\n\npp.readHexChar = function(len) {\n var codePos = this.pos;\n var n = this.readInt(16, len);\n if (n === null) { this.invalidStringToken(codePos, \"Bad character escape sequence\"); }\n return n\n};\n\n// Read an identifier, and return it as a string. Sets `this.containsEsc`\n// to whether the word contained a '\\u' escape.\n//\n// Incrementally adds only escaped chars, adding other chunks as-is\n// as a micro-optimization.\n\npp.readWord1 = function() {\n this.containsEsc = false;\n var word = \"\", first = true, chunkStart = this.pos;\n var astral = this.options.ecmaVersion >= 6;\n while (this.pos < this.input.length) {\n var ch = this.fullCharCodeAtPos();\n if (isIdentifierChar(ch, astral)) {\n this.pos += ch <= 0xffff ? 1 : 2;\n } else if (ch === 92) { // \"\\\"\n this.containsEsc = true;\n word += this.input.slice(chunkStart, this.pos);\n var escStart = this.pos;\n if (this.input.charCodeAt(++this.pos) !== 117) // \"u\"\n { this.invalidStringToken(this.pos, \"Expecting Unicode escape sequence \\\\uXXXX\"); }\n ++this.pos;\n var esc = this.readCodePoint();\n if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))\n { this.invalidStringToken(escStart, \"Invalid Unicode escape\"); }\n word += codePointToString(esc);\n chunkStart = this.pos;\n } else {\n break\n }\n first = false;\n }\n return word + this.input.slice(chunkStart, this.pos)\n};\n\n// Read an identifier or keyword token. Will check for reserved\n// words when necessary.\n\npp.readWord = function() {\n var word = this.readWord1();\n var type = types$1.name;\n if (this.keywords.test(word)) {\n type = keywords[word];\n }\n return this.finishToken(type, word)\n};\n\n// Acorn is a tiny, fast JavaScript parser written in JavaScript.\n//\n// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and\n// various contributors and released under an MIT license.\n//\n// Git repositories for Acorn are available at\n//\n// http://marijnhaverbeke.nl/git/acorn\n// https://github.com/acornjs/acorn.git\n//\n// Please use the [github bug tracker][ghbt] to report issues.\n//\n// [ghbt]: https://github.com/acornjs/acorn/issues\n//\n// [walk]: util/walk.js\n\n\nvar version = \"8.14.0\";\n\nParser.acorn = {\n Parser: Parser,\n version: version,\n defaultOptions: defaultOptions,\n Position: Position,\n SourceLocation: SourceLocation,\n getLineInfo: getLineInfo,\n Node: Node,\n TokenType: TokenType,\n tokTypes: types$1,\n keywordTypes: keywords,\n TokContext: TokContext,\n tokContexts: types,\n isIdentifierChar: isIdentifierChar,\n isIdentifierStart: isIdentifierStart,\n Token: Token,\n isNewLine: isNewLine,\n lineBreak: lineBreak,\n lineBreakG: lineBreakG,\n nonASCIIwhitespace: nonASCIIwhitespace\n};\n\n// The main exported interface (under `self.acorn` when in the\n// browser) is a `parse` function that takes a code string and returns\n// an abstract syntax tree as specified by the [ESTree spec][estree].\n//\n// [estree]: https://github.com/estree/estree\n\nfunction parse(input, options) {\n return Parser.parse(input, options)\n}\n\n// This function tries to parse a single expression at a given\n// offset in a string. Useful for parsing mixed-language formats\n// that embed JavaScript expressions.\n\nfunction parseExpressionAt(input, pos, options) {\n return Parser.parseExpressionAt(input, pos, options)\n}\n\n// Acorn is organized as a tokenizer and a recursive-descent parser.\n// The `tokenizer` export provides an interface to the tokenizer.\n\nfunction tokenizer(input, options) {\n return Parser.tokenizer(input, options)\n}\n\nexport { Node, Parser, Position, SourceLocation, TokContext, Token, TokenType, defaultOptions, getLineInfo, isIdentifierChar, isIdentifierStart, isNewLine, keywords as keywordTypes, lineBreak, lineBreakG, nonASCIIwhitespace, parse, parseExpressionAt, types as tokContexts, types$1 as tokTypes, tokenizer, version };\n","const n = /[^\\0-\\x7E]/;\nconst t = /[\\x2E\\u3002\\uFF0E\\uFF61]/g;\nconst o = {\n overflow: \"Overflow Error\",\n \"not-basic\": \"Illegal Input\",\n \"invalid-input\": \"Invalid Input\"\n};\nconst e = Math.floor;\nconst r = String.fromCharCode;\nfunction s(n2) {\n throw new RangeError(o[n2]);\n}\nconst c = function(n2, t2) {\n return n2 + 22 + 75 * (n2 < 26) - ((t2 != 0) << 5);\n};\nconst u = function(n2, t2, o2) {\n let r2 = 0;\n for (n2 = o2 ? e(n2 / 700) : n2 >> 1, n2 += e(n2 / t2); n2 > 455; r2 += 36) {\n n2 = e(n2 / 35);\n }\n return e(r2 + 36 * n2 / (n2 + 38));\n};\nfunction toASCII(o2) {\n return function(n2, o3) {\n const e2 = n2.split(\"@\");\n let r2 = \"\";\n e2.length > 1 && (r2 = e2[0] + \"@\", n2 = e2[1]);\n const s2 = function(n3, t2) {\n const o4 = [];\n let e3 = n3.length;\n for (; e3--; ) {\n o4[e3] = t2(n3[e3]);\n }\n return o4;\n }((n2 = n2.replace(t, \".\")).split(\".\"), o3).join(\".\");\n return r2 + s2;\n }(o2, function(t2) {\n return n.test(t2) ? \"xn--\" + function(n2) {\n const t3 = [];\n const o3 = (n2 = function(n3) {\n const t4 = [];\n let o4 = 0;\n const e2 = n3.length;\n for (; o4 < e2; ) {\n const r2 = n3.charCodeAt(o4++);\n if (r2 >= 55296 && r2 <= 56319 && o4 < e2) {\n const e3 = n3.charCodeAt(o4++);\n (64512 & e3) == 56320 ? t4.push(((1023 & r2) << 10) + (1023 & e3) + 65536) : (t4.push(r2), o4--);\n } else {\n t4.push(r2);\n }\n }\n return t4;\n }(n2)).length;\n let f = 128;\n let i = 0;\n let l = 72;\n for (const o4 of n2) {\n o4 < 128 && t3.push(r(o4));\n }\n const h = t3.length;\n let p = h;\n for (h && t3.push(\"-\"); p < o3; ) {\n let o4 = 2147483647;\n for (const t4 of n2) {\n t4 >= f && t4 < o4 && (o4 = t4);\n }\n const a = p + 1;\n o4 - f > e((2147483647 - i) / a) && s(\"overflow\"), i += (o4 - f) * a, f = o4;\n for (const o5 of n2) {\n if (o5 < f && ++i > 2147483647 && s(\"overflow\"), o5 == f) {\n let n3 = i;\n for (let o6 = 36; ; o6 += 36) {\n const s2 = o6 <= l ? 1 : o6 >= l + 26 ? 26 : o6 - l;\n if (n3 < s2) {\n break;\n }\n const u2 = n3 - s2;\n const f2 = 36 - s2;\n t3.push(r(c(s2 + u2 % f2, 0))), n3 = e(u2 / f2);\n }\n t3.push(r(c(n3, 0))), l = u(i, a, p == h), i = 0, ++p;\n }\n }\n ++i, ++f;\n }\n return t3.join(\"\");\n }(t2) : t2;\n });\n}\n\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_CARET_RE = /%5e/gi;\nconst ENC_BACKTICK_RE = /%60/gi;\nconst ENC_CURLY_OPEN_RE = /%7b/gi;\nconst ENC_PIPE_RE = /%7c/gi;\nconst ENC_CURLY_CLOSE_RE = /%7d/gi;\nconst ENC_SPACE_RE = /%20/gi;\nconst ENC_SLASH_RE = /%2f/gi;\nconst ENC_ENC_SLASH_RE = /%252f/gi;\nfunction encode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\");\n}\nfunction encodeHash(text) {\n return encode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(input) {\n return encode(typeof input === \"string\" ? input : JSON.stringify(input)).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CARET_RE, \"^\").replace(SLASH_RE, \"%2F\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return encode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\").replace(ENC_ENC_SLASH_RE, \"%2F\").replace(AMPERSAND_RE, \"%26\").replace(PLUS_RE, \"%2B\");\n}\nfunction encodeParam(text) {\n return encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text = \"\") {\n try {\n return decodeURIComponent(\"\" + text);\n } catch {\n return \"\" + text;\n }\n}\nfunction decodePath(text) {\n return decode(text.replace(ENC_SLASH_RE, \"%252F\"));\n}\nfunction decodeQueryKey(text) {\n return decode(text.replace(PLUS_RE, \" \"));\n}\nfunction decodeQueryValue(text) {\n return decode(text.replace(PLUS_RE, \" \"));\n}\nfunction encodeHost(name = \"\") {\n return toASCII(name);\n}\n\nfunction parseQuery(parametersString = \"\") {\n const object = {};\n if (parametersString[0] === \"?\") {\n parametersString = parametersString.slice(1);\n }\n for (const parameter of parametersString.split(\"&\")) {\n const s = parameter.match(/([^=]+)=?(.*)/) || [];\n if (s.length < 2) {\n continue;\n }\n const key = decodeQueryKey(s[1]);\n if (key === \"__proto__\" || key === \"constructor\") {\n continue;\n }\n const value = decodeQueryValue(s[2] || \"\");\n if (object[key] === void 0) {\n object[key] = value;\n } else if (Array.isArray(object[key])) {\n object[key].push(value);\n } else {\n object[key] = [object[key], value];\n }\n }\n return object;\n}\nfunction encodeQueryItem(key, value) {\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n value = String(value);\n }\n if (!value) {\n return encodeQueryKey(key);\n }\n if (Array.isArray(value)) {\n return value.map((_value) => `${encodeQueryKey(key)}=${encodeQueryValue(_value)}`).join(\"&\");\n }\n return `${encodeQueryKey(key)}=${encodeQueryValue(value)}`;\n}\nfunction stringifyQuery(query) {\n return Object.keys(query).filter((k) => query[k] !== void 0).map((k) => encodeQueryItem(k, query[k])).filter(Boolean).join(\"&\");\n}\n\nconst PROTOCOL_STRICT_REGEX = /^[\\s\\w\\0+.-]{2,}:([/\\\\]{1,2})/;\nconst PROTOCOL_REGEX = /^[\\s\\w\\0+.-]{2,}:([/\\\\]{2})?/;\nconst PROTOCOL_RELATIVE_REGEX = /^([/\\\\]\\s*){2,}[^/\\\\]/;\nconst PROTOCOL_SCRIPT_RE = /^[\\s\\0]*(blob|data|javascript|vbscript):$/i;\nconst TRAILING_SLASH_RE = /\\/$|\\/\\?|\\/#/;\nconst JOIN_LEADING_SLASH_RE = /^\\.?\\//;\nfunction isRelative(inputString) {\n return [\"./\", \"../\"].some((string_) => inputString.startsWith(string_));\n}\nfunction hasProtocol(inputString, opts = {}) {\n if (typeof opts === \"boolean\") {\n opts = { acceptRelative: opts };\n }\n if (opts.strict) {\n return PROTOCOL_STRICT_REGEX.test(inputString);\n }\n return PROTOCOL_REGEX.test(inputString) || (opts.acceptRelative ? PROTOCOL_RELATIVE_REGEX.test(inputString) : false);\n}\nfunction isScriptProtocol(protocol) {\n return !!protocol && PROTOCOL_SCRIPT_RE.test(protocol);\n}\nfunction hasTrailingSlash(input = \"\", respectQueryAndFragment) {\n if (!respectQueryAndFragment) {\n return input.endsWith(\"/\");\n }\n return TRAILING_SLASH_RE.test(input);\n}\nfunction withoutTrailingSlash(input = \"\", respectQueryAndFragment) {\n if (!respectQueryAndFragment) {\n return (hasTrailingSlash(input) ? input.slice(0, -1) : input) || \"/\";\n }\n if (!hasTrailingSlash(input, true)) {\n return input || \"/\";\n }\n let path = input;\n let fragment = \"\";\n const fragmentIndex = input.indexOf(\"#\");\n if (fragmentIndex >= 0) {\n path = input.slice(0, fragmentIndex);\n fragment = input.slice(fragmentIndex);\n }\n const [s0, ...s] = path.split(\"?\");\n const cleanPath = s0.endsWith(\"/\") ? s0.slice(0, -1) : s0;\n return (cleanPath || \"/\") + (s.length > 0 ? `?${s.join(\"?\")}` : \"\") + fragment;\n}\nfunction withTrailingSlash(input = \"\", respectQueryAndFragment) {\n if (!respectQueryAndFragment) {\n return input.endsWith(\"/\") ? input : input + \"/\";\n }\n if (hasTrailingSlash(input, true)) {\n return input || \"/\";\n }\n let path = input;\n let fragment = \"\";\n const fragmentIndex = input.indexOf(\"#\");\n if (fragmentIndex >= 0) {\n path = input.slice(0, fragmentIndex);\n fragment = input.slice(fragmentIndex);\n if (!path) {\n return fragment;\n }\n }\n const [s0, ...s] = path.split(\"?\");\n return s0 + \"/\" + (s.length > 0 ? `?${s.join(\"?\")}` : \"\") + fragment;\n}\nfunction hasLeadingSlash(input = \"\") {\n return input.startsWith(\"/\");\n}\nfunction withoutLeadingSlash(input = \"\") {\n return (hasLeadingSlash(input) ? input.slice(1) : input) || \"/\";\n}\nfunction withLeadingSlash(input = \"\") {\n return hasLeadingSlash(input) ? input : \"/\" + input;\n}\nfunction cleanDoubleSlashes(input = \"\") {\n return input.split(\"://\").map((string_) => string_.replace(/\\/{2,}/g, \"/\")).join(\"://\");\n}\nfunction withBase(input, base) {\n if (isEmptyURL(base) || hasProtocol(input)) {\n return input;\n }\n const _base = withoutTrailingSlash(base);\n if (input.startsWith(_base)) {\n return input;\n }\n return joinURL(_base, input);\n}\nfunction withoutBase(input, base) {\n if (isEmptyURL(base)) {\n return input;\n }\n const _base = withoutTrailingSlash(base);\n if (!input.startsWith(_base)) {\n return input;\n }\n const trimmed = input.slice(_base.length);\n return trimmed[0] === \"/\" ? trimmed : \"/\" + trimmed;\n}\nfunction withQuery(input, query) {\n const parsed = parseURL(input);\n const mergedQuery = { ...parseQuery(parsed.search), ...query };\n parsed.search = stringifyQuery(mergedQuery);\n return stringifyParsedURL(parsed);\n}\nfunction getQuery(input) {\n return parseQuery(parseURL(input).search);\n}\nfunction isEmptyURL(url) {\n return !url || url === \"/\";\n}\nfunction isNonEmptyURL(url) {\n return url && url !== \"/\";\n}\nfunction joinURL(base, ...input) {\n let url = base || \"\";\n for (const segment of input.filter((url2) => isNonEmptyURL(url2))) {\n if (url) {\n const _segment = segment.replace(JOIN_LEADING_SLASH_RE, \"\");\n url = withTrailingSlash(url) + _segment;\n } else {\n url = segment;\n }\n }\n return url;\n}\nfunction joinRelativeURL(..._input) {\n const JOIN_SEGMENT_SPLIT_RE = /\\/(?!\\/)/;\n const input = _input.filter(Boolean);\n const segments = [];\n let segmentsDepth = 0;\n for (const i of input) {\n if (!i || i === \"/\") {\n continue;\n }\n for (const [sindex, s] of i.split(JOIN_SEGMENT_SPLIT_RE).entries()) {\n if (!s || s === \".\") {\n continue;\n }\n if (s === \"..\") {\n if (segments.length === 1 && hasProtocol(segments[0])) {\n continue;\n }\n segments.pop();\n segmentsDepth--;\n continue;\n }\n if (sindex === 1 && segments[segments.length - 1]?.endsWith(\":/\")) {\n segments[segments.length - 1] += \"/\" + s;\n continue;\n }\n segments.push(s);\n segmentsDepth++;\n }\n }\n let url = segments.join(\"/\");\n if (segmentsDepth >= 0) {\n if (input[0]?.startsWith(\"/\") && !url.startsWith(\"/\")) {\n url = \"/\" + url;\n } else if (input[0]?.startsWith(\"./\") && !url.startsWith(\"./\")) {\n url = \"./\" + url;\n }\n } else {\n url = \"../\".repeat(-1 * segmentsDepth) + url;\n }\n if (input[input.length - 1]?.endsWith(\"/\") && !url.endsWith(\"/\")) {\n url += \"/\";\n }\n return url;\n}\nfunction withHttp(input) {\n return withProtocol(input, \"http://\");\n}\nfunction withHttps(input) {\n return withProtocol(input, \"https://\");\n}\nfunction withoutProtocol(input) {\n return withProtocol(input, \"\");\n}\nfunction withProtocol(input, protocol) {\n let match = input.match(PROTOCOL_REGEX);\n if (!match) {\n match = input.match(/^\\/{2,}/);\n }\n if (!match) {\n return protocol + input;\n }\n return protocol + input.slice(match[0].length);\n}\nfunction normalizeURL(input) {\n const parsed = parseURL(input);\n parsed.pathname = encodePath(decodePath(parsed.pathname));\n parsed.hash = encodeHash(decode(parsed.hash));\n parsed.host = encodeHost(decode(parsed.host));\n parsed.search = stringifyQuery(parseQuery(parsed.search));\n return stringifyParsedURL(parsed);\n}\nfunction resolveURL(base = \"\", ...inputs) {\n if (typeof base !== \"string\") {\n throw new TypeError(\n `URL input should be string received ${typeof base} (${base})`\n );\n }\n const filteredInputs = inputs.filter((input) => isNonEmptyURL(input));\n if (filteredInputs.length === 0) {\n return base;\n }\n const url = parseURL(base);\n for (const inputSegment of filteredInputs) {\n const urlSegment = parseURL(inputSegment);\n if (urlSegment.pathname) {\n url.pathname = withTrailingSlash(url.pathname) + withoutLeadingSlash(urlSegment.pathname);\n }\n if (urlSegment.hash && urlSegment.hash !== \"#\") {\n url.hash = urlSegment.hash;\n }\n if (urlSegment.search && urlSegment.search !== \"?\") {\n if (url.search && url.search !== \"?\") {\n const queryString = stringifyQuery({\n ...parseQuery(url.search),\n ...parseQuery(urlSegment.search)\n });\n url.search = queryString.length > 0 ? \"?\" + queryString : \"\";\n } else {\n url.search = urlSegment.search;\n }\n }\n }\n return stringifyParsedURL(url);\n}\nfunction isSamePath(p1, p2) {\n return decode(withoutTrailingSlash(p1)) === decode(withoutTrailingSlash(p2));\n}\nfunction isEqual(a, b, options = {}) {\n if (!options.trailingSlash) {\n a = withTrailingSlash(a);\n b = withTrailingSlash(b);\n }\n if (!options.leadingSlash) {\n a = withLeadingSlash(a);\n b = withLeadingSlash(b);\n }\n if (!options.encoding) {\n a = decode(a);\n b = decode(b);\n }\n return a === b;\n}\nfunction withFragment(input, hash) {\n if (!hash || hash === \"#\") {\n return input;\n }\n const parsed = parseURL(input);\n parsed.hash = hash === \"\" ? \"\" : \"#\" + encodeHash(hash);\n return stringifyParsedURL(parsed);\n}\nfunction withoutFragment(input) {\n return stringifyParsedURL({ ...parseURL(input), hash: \"\" });\n}\nfunction withoutHost(input) {\n const parsed = parseURL(input);\n return (parsed.pathname || \"/\") + parsed.search + parsed.hash;\n}\n\nconst protocolRelative = Symbol.for(\"ufo:protocolRelative\");\nfunction parseURL(input = \"\", defaultProto) {\n const _specialProtoMatch = input.match(\n /^[\\s\\0]*(blob:|data:|javascript:|vbscript:)(.*)/i\n );\n if (_specialProtoMatch) {\n const [, _proto, _pathname = \"\"] = _specialProtoMatch;\n return {\n protocol: _proto.toLowerCase(),\n pathname: _pathname,\n href: _proto + _pathname,\n auth: \"\",\n host: \"\",\n search: \"\",\n hash: \"\"\n };\n }\n if (!hasProtocol(input, { acceptRelative: true })) {\n return defaultProto ? parseURL(defaultProto + input) : parsePath(input);\n }\n const [, protocol = \"\", auth, hostAndPath = \"\"] = input.replace(/\\\\/g, \"/\").match(/^[\\s\\0]*([\\w+.-]{2,}:)?\\/\\/([^/@]+@)?(.*)/) || [];\n let [, host = \"\", path = \"\"] = hostAndPath.match(/([^#/?]*)(.*)?/) || [];\n if (protocol === \"file:\") {\n path = path.replace(/\\/(?=[A-Za-z]:)/, \"\");\n }\n const { pathname, search, hash } = parsePath(path);\n return {\n protocol: protocol.toLowerCase(),\n auth: auth ? auth.slice(0, Math.max(0, auth.length - 1)) : \"\",\n host,\n pathname,\n search,\n hash,\n [protocolRelative]: !protocol\n };\n}\nfunction parsePath(input = \"\") {\n const [pathname = \"\", search = \"\", hash = \"\"] = (input.match(/([^#?]*)(\\?[^#]*)?(#.*)?/) || []).splice(1);\n return {\n pathname,\n search,\n hash\n };\n}\nfunction parseAuth(input = \"\") {\n const [username, password] = input.split(\":\");\n return {\n username: decode(username),\n password: decode(password)\n };\n}\nfunction parseHost(input = \"\") {\n const [hostname, port] = (input.match(/([^/:]*):?(\\d+)?/) || []).splice(1);\n return {\n hostname: decode(hostname),\n port\n };\n}\nfunction stringifyParsedURL(parsed) {\n const pathname = parsed.pathname || \"\";\n const search = parsed.search ? (parsed.search.startsWith(\"?\") ? \"\" : \"?\") + parsed.search : \"\";\n const hash = parsed.hash || \"\";\n const auth = parsed.auth ? parsed.auth + \"@\" : \"\";\n const host = parsed.host || \"\";\n const proto = parsed.protocol || parsed[protocolRelative] ? (parsed.protocol || \"\") + \"//\" : \"\";\n return proto + auth + host + pathname + search + hash;\n}\nconst FILENAME_STRICT_REGEX = /\\/([^/]+\\.[^/]+)$/;\nconst FILENAME_REGEX = /\\/([^/]+)$/;\nfunction parseFilename(input = \"\", { strict }) {\n const { pathname } = parseURL(input);\n const matches = strict ? pathname.match(FILENAME_STRICT_REGEX) : pathname.match(FILENAME_REGEX);\n return matches ? matches[1] : void 0;\n}\n\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass $URL {\n constructor(input = \"\") {\n __publicField(this, \"protocol\");\n __publicField(this, \"host\");\n __publicField(this, \"auth\");\n __publicField(this, \"pathname\");\n __publicField(this, \"query\", {});\n __publicField(this, \"hash\");\n if (typeof input !== \"string\") {\n throw new TypeError(\n `URL input should be string received ${typeof input} (${input})`\n );\n }\n const parsed = parseURL(input);\n this.protocol = decode(parsed.protocol);\n this.host = decode(parsed.host);\n this.auth = decode(parsed.auth);\n this.pathname = decodePath(parsed.pathname);\n this.query = parseQuery(parsed.search);\n this.hash = decode(parsed.hash);\n }\n get hostname() {\n return parseHost(this.host).hostname;\n }\n get port() {\n return parseHost(this.host).port || \"\";\n }\n get username() {\n return parseAuth(this.auth).username;\n }\n get password() {\n return parseAuth(this.auth).password || \"\";\n }\n get hasProtocol() {\n return this.protocol.length;\n }\n get isAbsolute() {\n return this.hasProtocol || this.pathname[0] === \"/\";\n }\n get search() {\n const q = stringifyQuery(this.query);\n return q.length > 0 ? \"?\" + q : \"\";\n }\n get searchParams() {\n const p = new URLSearchParams();\n for (const name in this.query) {\n const value = this.query[name];\n if (Array.isArray(value)) {\n for (const v of value) {\n p.append(name, v);\n }\n } else {\n p.append(\n name,\n typeof value === \"string\" ? value : JSON.stringify(value)\n );\n }\n }\n return p;\n }\n get origin() {\n return (this.protocol ? this.protocol + \"//\" : \"\") + encodeHost(this.host);\n }\n get fullpath() {\n return encodePath(this.pathname) + this.search + encodeHash(this.hash);\n }\n get encodedAuth() {\n if (!this.auth) {\n return \"\";\n }\n const { username, password } = parseAuth(this.auth);\n return encodeURIComponent(username) + (password ? \":\" + encodeURIComponent(password) : \"\");\n }\n get href() {\n const auth = this.encodedAuth;\n const originWithAuth = (this.protocol ? this.protocol + \"//\" : \"\") + (auth ? auth + \"@\" : \"\") + encodeHost(this.host);\n return this.hasProtocol && this.isAbsolute ? originWithAuth + this.fullpath : this.fullpath;\n }\n append(url) {\n if (url.hasProtocol) {\n throw new Error(\"Cannot append a URL with protocol\");\n }\n Object.assign(this.query, url.query);\n if (url.pathname) {\n this.pathname = withTrailingSlash(this.pathname) + withoutLeadingSlash(url.pathname);\n }\n if (url.hash) {\n this.hash = url.hash;\n }\n }\n toJSON() {\n return this.href;\n }\n toString() {\n return this.href;\n }\n}\nfunction createURL(input) {\n return new $URL(input);\n}\n\nexport { $URL, cleanDoubleSlashes, createURL, decode, decodePath, decodeQueryKey, decodeQueryValue, encode, encodeHash, encodeHost, encodeParam, encodePath, encodeQueryItem, encodeQueryKey, encodeQueryValue, getQuery, hasLeadingSlash, hasProtocol, hasTrailingSlash, isEmptyURL, isEqual, isNonEmptyURL, isRelative, isSamePath, isScriptProtocol, joinRelativeURL, joinURL, normalizeURL, parseAuth, parseFilename, parseHost, parsePath, parseQuery, parseURL, resolveURL, stringifyParsedURL, stringifyQuery, withBase, withFragment, withHttp, withHttps, withLeadingSlash, withProtocol, withQuery, withTrailingSlash, withoutBase, withoutFragment, withoutHost, withoutLeadingSlash, withoutProtocol, withoutTrailingSlash };\n","let _lazyMatch = () => { var __lib__=(()=>{var m=Object.defineProperty,V=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,T=Object.prototype.hasOwnProperty,q=(r,e)=>{for(var n in e)m(r,n,{get:e[n],enumerable:!0});},H=(r,e,n,t)=>{if(typeof e==\"object\"||typeof e==\"function\")for(let a of G(e))!T.call(r,a)&&a!==n&&m(r,a,{get:()=>e[a],enumerable:!(t=V(e,a))||t.enumerable});return r},J=r=>H(m({},\"__esModule\",{value:!0}),r),w={};q(w,{zeptomatch:()=>re});var A=r=>Array.isArray(r),d=r=>typeof r==\"function\",Q=r=>r.length===0,W=r=>typeof r==\"number\",K=r=>typeof r==\"object\"&&r!==null,X=r=>r instanceof RegExp,b=r=>typeof r==\"string\",h=r=>r===void 0,Y=r=>{const e=new Map;return n=>{const t=e.get(n);if(t)return t;const a=r(n);return e.set(n,a),a}},rr=(r,e,n={})=>{const t={cache:{},input:r,index:0,indexMax:0,options:n,output:[]};if(v(e)(t)&&t.index===r.length)return t.output;throw new Error(`Failed to parse at index ${t.indexMax}`)},i=(r,e)=>A(r)?er(r,e):b(r)?tr(r,e):nr(r,e),er=(r,e)=>{const n={};for(const t of r){if(t.length!==1)throw new Error(`Invalid character: \"${t}\"`);const a=t.charCodeAt(0);n[a]=!0;}return t=>{const a=t.index,o=t.input;for(;t.index<o.length&&o.charCodeAt(t.index)in n;)t.index+=1;const u=t.index;if(u>a){if(!h(e)&&!t.options.silent){const s=t.input.slice(a,u),c=d(e)?e(s,o,String(a)):e;h(c)||t.output.push(c);}t.indexMax=Math.max(t.indexMax,t.index);}return !0}},nr=(r,e)=>{const n=r.source,t=r.flags.replace(/y|$/,\"y\"),a=new RegExp(n,t);return g(o=>{a.lastIndex=o.index;const u=a.exec(o.input);if(u){if(!h(e)&&!o.options.silent){const s=d(e)?e(...u,o.input,String(o.index)):e;h(s)||o.output.push(s);}return o.index+=u[0].length,o.indexMax=Math.max(o.indexMax,o.index),!0}else return !1})},tr=(r,e)=>n=>{if(n.input.startsWith(r,n.index)){if(!h(e)&&!n.options.silent){const a=d(e)?e(r,n.input,String(n.index)):e;h(a)||n.output.push(a);}return n.index+=r.length,n.indexMax=Math.max(n.indexMax,n.index),!0}else return !1},C=(r,e,n,t)=>{const a=v(r);return g(_(M(o=>{let u=0;for(;u<n;){const s=o.index;if(!a(o)||(u+=1,o.index===s))break}return u>=e})))},ar=(r,e)=>C(r,0,1),f=(r,e)=>C(r,0,1/0),x=(r,e)=>{const n=r.map(v);return g(_(M(t=>{for(let a=0,o=n.length;a<o;a++)if(!n[a](t))return !1;return !0})))},l=(r,e)=>{const n=r.map(v);return g(_(t=>{for(let a=0,o=n.length;a<o;a++)if(n[a](t))return !0;return !1}))},M=(r,e=!1)=>{const n=v(r);return t=>{const a=t.index,o=t.output.length,u=n(t);return (!u||e)&&(t.index=a,t.output.length!==o&&(t.output.length=o)),u}},_=(r,e)=>{const n=v(r);return n},g=(()=>{let r=0;return e=>{const n=v(e),t=r+=1;return a=>{var o;if(a.options.memoization===!1)return n(a);const u=a.index,s=(o=a.cache)[t]||(o[t]=new Map),c=s.get(u);if(c===!1)return !1;if(W(c))return a.index=c,!0;if(c)return a.index=c.index,c.output?.length&&a.output.push(...c.output),!0;{const Z=a.output.length;if(n(a)){const D=a.index,U=a.output.length;if(U>Z){const ee=a.output.slice(Z,U);s.set(u,{index:D,output:ee});}else s.set(u,D);return !0}else return s.set(u,!1),!1}}}})(),E=r=>{let e;return n=>(e||(e=v(r())),e(n))},v=Y(r=>{if(d(r))return Q(r)?E(r):r;if(b(r)||X(r))return i(r);if(A(r))return x(r);if(K(r))return l(Object.values(r));throw new Error(\"Invalid rule\")}),P=\"abcdefghijklmnopqrstuvwxyz\",ir=r=>{let e=\"\";for(;r>0;){const n=(r-1)%26;e=P[n]+e,r=Math.floor((r-1)/26);}return e},z=r=>{let e=0;for(let n=0,t=r.length;n<t;n++)e=e*26+P.indexOf(r[n])+1;return e},S=(r,e)=>{if(e<r)return S(e,r);const n=[];for(;r<=e;)n.push(r++);return n},or=(r,e,n)=>S(r,e).map(t=>String(t).padStart(n,\"0\")),O=(r,e)=>S(z(r),z(e)).map(ir),p=r=>r,R=r=>ur(e=>rr(e,r,{memoization:!1}).join(\"\")),ur=r=>{const e={};return n=>e[n]??(e[n]=r(n))},sr=i(/^\\*\\*\\/\\*$/,\".*\"),cr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]+)$/,(r,e,n)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}`),lr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]*)\\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\\}$/,(r,e,n,t)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}(?:${t.replaceAll(\",\",\"|\").replaceAll(\".\",\"\\\\.\")})`),y=i(/\\\\./,p),pr=i(/[$.*+?^(){}[\\]\\|]/,r=>`\\\\${r}`),vr=i(/./,p),hr=i(/^(?:!!)*!(.*)$/,(r,e)=>`(?!^${L(e)}$).*?`),dr=i(/^(!!)+/,\"\"),fr=l([hr,dr]),xr=i(/\\/(\\*\\*\\/)+/,\"(?:/.+/|/)\"),gr=i(/^(\\*\\*\\/)+/,\"(?:^|.*/)\"),mr=i(/\\/(\\*\\*)$/,\"(?:/.*|$)\"),_r=i(/\\*\\*/,\".*\"),j=l([xr,gr,mr,_r]),Sr=i(/\\*\\/(?!\\*\\*\\/)/,\"[^/]*/\"),yr=i(/\\*/,\"[^/]*\"),N=l([Sr,yr]),k=i(\"?\",\"[^/]\"),$r=i(\"[\",p),wr=i(\"]\",p),Ar=i(/[!^]/,\"^/\"),br=i(/[a-z]-[a-z]|[0-9]-[0-9]/i,p),Cr=i(/[$.*+?^(){}[\\|]/,r=>`\\\\${r}`),Mr=i(/[^\\]]/,p),Er=l([y,Cr,br,Mr]),B=x([$r,ar(Ar),f(Er),wr]),Pr=i(\"{\",\"(?:\"),zr=i(\"}\",\")\"),Or=i(/(\\d+)\\.\\.(\\d+)/,(r,e,n)=>or(+e,+n,Math.min(e.length,n.length)).join(\"|\")),Rr=i(/([a-z]+)\\.\\.([a-z]+)/,(r,e,n)=>O(e,n).join(\"|\")),jr=i(/([A-Z]+)\\.\\.([A-Z]+)/,(r,e,n)=>O(e.toLowerCase(),n.toLowerCase()).join(\"|\").toUpperCase()),Nr=l([Or,Rr,jr]),I=x([Pr,Nr,zr]),kr=i(\"{\",\"(?:\"),Br=i(\"}\",\")\"),Ir=i(\",\",\"|\"),Fr=i(/[$.*+?^(){[\\]\\|]/,r=>`\\\\${r}`),Lr=i(/[^}]/,p),Zr=E(()=>F),Dr=l([j,N,k,B,I,Zr,y,Fr,Ir,Lr]),F=x([kr,f(Dr),Br]),Ur=f(l([sr,cr,lr,fr,j,N,k,B,I,F,y,pr,vr])),Vr=Ur,Gr=R(Vr),L=Gr,Tr=i(/\\\\./,p),qr=i(/./,p),Hr=i(/\\*\\*\\*+/,\"*\"),Jr=i(/([^/{[(!])\\*\\*/,(r,e)=>`${e}*`),Qr=i(/(^|.)\\*\\*(?=[^*/)\\]}])/,(r,e)=>`${e}*`),Wr=f(l([Tr,Hr,Jr,Qr,qr])),Kr=Wr,Xr=R(Kr),Yr=Xr,$=(r,e)=>{const n=Array.isArray(r)?r:[r];if(!n.length)return !1;const t=n.map($.compile),a=n.every(s=>/(\\/(?:\\*\\*)?|\\[\\/\\])$/.test(s)),o=e.replace(/[\\\\\\/]+/g,\"/\").replace(/\\/$/,a?\"/\":\"\");return t.some(s=>s.test(o))};$.compile=r=>new RegExp(`^${L(Yr(r))}$`,\"s\");var re=$;return J(w)})();\n return __lib__.default || __lib__; };\nlet _match;\nconst zeptomatch = (path, pattern) => {\n if (!_match) {\n _match = _lazyMatch();\n _lazyMatch = null;\n }\n return _match(path, pattern);\n};\n\nconst _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n return input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\n\nconst _UNC_REGEX = /^[/\\\\]{2}/;\nconst _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/;\nconst _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nconst _ROOT_FOLDER_RE = /^\\/([A-Za-z]:)?$/;\nconst _EXTNAME_RE = /.(\\.[^./]+)$/;\nconst _PATH_ROOT_RE = /^[/\\\\]|^[a-zA-Z]:[/\\\\]/;\nconst sep = \"/\";\nconst normalize = function(path) {\n if (path.length === 0) {\n return \".\";\n }\n path = normalizeWindowsPath(path);\n const isUNCPath = path.match(_UNC_REGEX);\n const isPathAbsolute = isAbsolute(path);\n const trailingSeparator = path[path.length - 1] === \"/\";\n path = normalizeString(path, !isPathAbsolute);\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n if (trailingSeparator) {\n path += \"/\";\n }\n if (_DRIVE_LETTER_RE.test(path)) {\n path += \"/\";\n }\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n};\nconst join = function(...segments) {\n let path = \"\";\n for (const seg of segments) {\n if (!seg) {\n continue;\n }\n if (path.length > 0) {\n const pathTrailing = path[path.length - 1] === \"/\";\n const segLeading = seg[0] === \"/\";\n const both = pathTrailing && segLeading;\n if (both) {\n path += seg.slice(1);\n } else {\n path += pathTrailing || segLeading ? seg : `/${seg}`;\n }\n } else {\n path += seg;\n }\n }\n return normalize(path);\n};\nfunction cwd() {\n if (typeof process !== \"undefined\" && typeof process.cwd === \"function\") {\n return process.cwd().replace(/\\\\/g, \"/\");\n }\n return \"/\";\n}\nconst resolve = function(...arguments_) {\n arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n let resolvedPath = \"\";\n let resolvedAbsolute = false;\n for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n const path = index >= 0 ? arguments_[index] : cwd();\n if (!path || path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = isAbsolute(path);\n }\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);\n if (resolvedAbsolute && !isAbsolute(resolvedPath)) {\n return `/${resolvedPath}`;\n }\n return resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n char = path[index];\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\nconst isAbsolute = function(p) {\n return _IS_ABSOLUTE_RE.test(p);\n};\nconst toNamespacedPath = function(p) {\n return normalizeWindowsPath(p);\n};\nconst extname = function(p) {\n const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));\n return match && match[1] || \"\";\n};\nconst relative = function(from, to) {\n const _from = resolve(from).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n const _to = resolve(to).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n if (_to[0][1] === \":\" && _from[0][1] === \":\" && _from[0] !== _to[0]) {\n return _to.join(\"/\");\n }\n const _fromCopy = [..._from];\n for (const segment of _fromCopy) {\n if (_to[0] !== segment) {\n break;\n }\n _from.shift();\n _to.shift();\n }\n return [..._from.map(() => \"..\"), ..._to].join(\"/\");\n};\nconst dirname = function(p) {\n const segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {\n segments[0] += \"/\";\n }\n return segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n};\nconst format = function(p) {\n const segments = [p.root, p.dir, p.base ?? p.name + p.ext].filter(Boolean);\n return normalizeWindowsPath(\n p.root ? resolve(...segments) : segments.join(\"/\")\n );\n};\nconst basename = function(p, extension) {\n const segments = normalizeWindowsPath(p).split(\"/\");\n let lastSegment = \"\";\n for (let i = segments.length - 1; i >= 0; i--) {\n const val = segments[i];\n if (val) {\n lastSegment = val;\n break;\n }\n }\n return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;\n};\nconst parse = function(p) {\n const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\\\/g, \"/\") || \"\";\n const base = basename(p);\n const extension = extname(base);\n return {\n root,\n dir: dirname(p),\n base,\n ext: extension,\n name: base.slice(0, base.length - extension.length)\n };\n};\nconst matchesGlob = (path, pattern) => {\n return zeptomatch(pattern, normalize(path));\n};\n\nconst _path = {\n __proto__: null,\n basename: basename,\n dirname: dirname,\n extname: extname,\n format: format,\n isAbsolute: isAbsolute,\n join: join,\n matchesGlob: matchesGlob,\n normalize: normalize,\n normalizeString: normalizeString,\n parse: parse,\n relative: relative,\n resolve: resolve,\n sep: sep,\n toNamespacedPath: toNamespacedPath\n};\n\nexport { _path as _, normalizeString as a, relative as b, basename as c, dirname as d, extname as e, format as f, normalizeWindowsPath as g, isAbsolute as i, join as j, matchesGlob as m, normalize as n, parse as p, resolve as r, sep as s, toNamespacedPath as t };\n","import { tokenizer } from 'acorn';\nimport { builtinModules, createRequire } from 'node:module';\nimport fs, { realpathSync, statSync, promises } from 'node:fs';\nimport { joinURL } from 'ufo';\nimport { normalize, isAbsolute, extname as extname$1 } from 'pathe';\nimport { readPackageJSON } from 'pkg-types';\nimport { fileURLToPath as fileURLToPath$1, URL as URL$1, pathToFileURL as pathToFileURL$1 } from 'node:url';\nimport assert from 'node:assert';\nimport process$1 from 'node:process';\nimport path, { dirname } from 'node:path';\nimport v8 from 'node:v8';\nimport { format, inspect } from 'node:util';\n\nconst BUILTIN_MODULES = new Set(builtinModules);\nfunction normalizeSlash(path) {\n return path.replace(/\\\\/g, \"/\");\n}\nfunction isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nfunction matchAll(regex, string, addition) {\n const matches = [];\n for (const match of string.matchAll(regex)) {\n matches.push({\n ...addition,\n ...match.groups,\n code: match[0],\n start: match.index,\n end: (match.index || 0) + match[0].length\n });\n }\n return matches;\n}\nfunction clearImports(imports) {\n return (imports || \"\").replace(/(\\/\\/[^\\n]*\\n|\\/\\*.*\\*\\/)/g, \"\").replace(/\\s+/g, \" \");\n}\nfunction getImportNames(cleanedImports) {\n const topLevelImports = cleanedImports.replace(/{([^}]*)}/, \"\");\n const namespacedImport = topLevelImports.match(/\\* as \\s*(\\S*)/)?.[1];\n const defaultImport = topLevelImports.split(\",\").find((index) => !/[*{}]/.test(index))?.trim() || undefined;\n return {\n namespacedImport,\n defaultImport\n };\n}\n\n/**\n * @typedef ErrnoExceptionFields\n * @property {number | undefined} [errnode]\n * @property {string | undefined} [code]\n * @property {string | undefined} [path]\n * @property {string | undefined} [syscall]\n * @property {string | undefined} [url]\n *\n * @typedef {Error & ErrnoExceptionFields} ErrnoException\n */\n\n\nconst own$1 = {}.hasOwnProperty;\n\nconst classRegExp = /^([A-Z][a-z\\d]*)+$/;\n// Sorted by a rough estimate on most frequently used entries.\nconst kTypes = new Set([\n 'string',\n 'function',\n 'number',\n 'object',\n // Accept 'Function' and 'Object' as alternative to the lower cased version.\n 'Function',\n 'Object',\n 'boolean',\n 'bigint',\n 'symbol'\n]);\n\nconst codes = {};\n\n/**\n * Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.\n * We cannot use Intl.ListFormat because it's not available in\n * --without-intl builds.\n *\n * @param {Array<string>} array\n * An array of strings.\n * @param {string} [type]\n * The list type to be inserted before the last element.\n * @returns {string}\n */\nfunction formatList(array, type = 'and') {\n return array.length < 3\n ? array.join(` ${type} `)\n : `${array.slice(0, -1).join(', ')}, ${type} ${array[array.length - 1]}`\n}\n\n/** @type {Map<string, MessageFunction | string>} */\nconst messages = new Map();\nconst nodeInternalPrefix = '__node_internal_';\n/** @type {number} */\nlet userStackTraceLimit;\n\ncodes.ERR_INVALID_ARG_TYPE = createError(\n 'ERR_INVALID_ARG_TYPE',\n /**\n * @param {string} name\n * @param {Array<string> | string} expected\n * @param {unknown} actual\n */\n (name, expected, actual) => {\n assert(typeof name === 'string', \"'name' must be a string\");\n if (!Array.isArray(expected)) {\n expected = [expected];\n }\n\n let message = 'The ';\n if (name.endsWith(' argument')) {\n // For cases like 'first argument'\n message += `${name} `;\n } else {\n const type = name.includes('.') ? 'property' : 'argument';\n message += `\"${name}\" ${type} `;\n }\n\n message += 'must be ';\n\n /** @type {Array<string>} */\n const types = [];\n /** @type {Array<string>} */\n const instances = [];\n /** @type {Array<string>} */\n const other = [];\n\n for (const value of expected) {\n assert(\n typeof value === 'string',\n 'All expected entries have to be of type string'\n );\n\n if (kTypes.has(value)) {\n types.push(value.toLowerCase());\n } else if (classRegExp.exec(value) === null) {\n assert(\n value !== 'object',\n 'The value \"object\" should be written as \"Object\"'\n );\n other.push(value);\n } else {\n instances.push(value);\n }\n }\n\n // Special handle `object` in case other instances are allowed to outline\n // the differences between each other.\n if (instances.length > 0) {\n const pos = types.indexOf('object');\n if (pos !== -1) {\n types.slice(pos, 1);\n instances.push('Object');\n }\n }\n\n if (types.length > 0) {\n message += `${types.length > 1 ? 'one of type' : 'of type'} ${formatList(\n types,\n 'or'\n )}`;\n if (instances.length > 0 || other.length > 0) message += ' or ';\n }\n\n if (instances.length > 0) {\n message += `an instance of ${formatList(instances, 'or')}`;\n if (other.length > 0) message += ' or ';\n }\n\n if (other.length > 0) {\n if (other.length > 1) {\n message += `one of ${formatList(other, 'or')}`;\n } else {\n if (other[0].toLowerCase() !== other[0]) message += 'an ';\n message += `${other[0]}`;\n }\n }\n\n message += `. Received ${determineSpecificType(actual)}`;\n\n return message\n },\n TypeError\n);\n\ncodes.ERR_INVALID_MODULE_SPECIFIER = createError(\n 'ERR_INVALID_MODULE_SPECIFIER',\n /**\n * @param {string} request\n * @param {string} reason\n * @param {string} [base]\n */\n (request, reason, base = undefined) => {\n return `Invalid module \"${request}\" ${reason}${\n base ? ` imported from ${base}` : ''\n }`\n },\n TypeError\n);\n\ncodes.ERR_INVALID_PACKAGE_CONFIG = createError(\n 'ERR_INVALID_PACKAGE_CONFIG',\n /**\n * @param {string} path\n * @param {string} [base]\n * @param {string} [message]\n */\n (path, base, message) => {\n return `Invalid package config ${path}${\n base ? ` while importing ${base}` : ''\n }${message ? `. ${message}` : ''}`\n },\n Error\n);\n\ncodes.ERR_INVALID_PACKAGE_TARGET = createError(\n 'ERR_INVALID_PACKAGE_TARGET',\n /**\n * @param {string} packagePath\n * @param {string} key\n * @param {unknown} target\n * @param {boolean} [isImport=false]\n * @param {string} [base]\n */\n (packagePath, key, target, isImport = false, base = undefined) => {\n const relatedError =\n typeof target === 'string' &&\n !isImport &&\n target.length > 0 &&\n !target.startsWith('./');\n if (key === '.') {\n assert(isImport === false);\n return (\n `Invalid \"exports\" main target ${JSON.stringify(target)} defined ` +\n `in the package config ${packagePath}package.json${\n base ? ` imported from ${base}` : ''\n }${relatedError ? '; targets must start with \"./\"' : ''}`\n )\n }\n\n return `Invalid \"${\n isImport ? 'imports' : 'exports'\n }\" target ${JSON.stringify(\n target\n )} defined for '${key}' in the package config ${packagePath}package.json${\n base ? ` imported from ${base}` : ''\n }${relatedError ? '; targets must start with \"./\"' : ''}`\n },\n Error\n);\n\ncodes.ERR_MODULE_NOT_FOUND = createError(\n 'ERR_MODULE_NOT_FOUND',\n /**\n * @param {string} path\n * @param {string} base\n * @param {boolean} [exactUrl]\n */\n (path, base, exactUrl = false) => {\n return `Cannot find ${\n exactUrl ? 'module' : 'package'\n } '${path}' imported from ${base}`\n },\n Error\n);\n\ncodes.ERR_NETWORK_IMPORT_DISALLOWED = createError(\n 'ERR_NETWORK_IMPORT_DISALLOWED',\n \"import of '%s' by %s is not supported: %s\",\n Error\n);\n\ncodes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(\n 'ERR_PACKAGE_IMPORT_NOT_DEFINED',\n /**\n * @param {string} specifier\n * @param {string} packagePath\n * @param {string} base\n */\n (specifier, packagePath, base) => {\n return `Package import specifier \"${specifier}\" is not defined${\n packagePath ? ` in package ${packagePath}package.json` : ''\n } imported from ${base}`\n },\n TypeError\n);\n\ncodes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError(\n 'ERR_PACKAGE_PATH_NOT_EXPORTED',\n /**\n * @param {string} packagePath\n * @param {string} subpath\n * @param {string} [base]\n */\n (packagePath, subpath, base = undefined) => {\n if (subpath === '.')\n return `No \"exports\" main defined in ${packagePath}package.json${\n base ? ` imported from ${base}` : ''\n }`\n return `Package subpath '${subpath}' is not defined by \"exports\" in ${packagePath}package.json${\n base ? ` imported from ${base}` : ''\n }`\n },\n Error\n);\n\ncodes.ERR_UNSUPPORTED_DIR_IMPORT = createError(\n 'ERR_UNSUPPORTED_DIR_IMPORT',\n \"Directory import '%s' is not supported \" +\n 'resolving ES modules imported from %s',\n Error\n);\n\ncodes.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError(\n 'ERR_UNSUPPORTED_RESOLVE_REQUEST',\n 'Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.',\n TypeError\n);\n\ncodes.ERR_UNKNOWN_FILE_EXTENSION = createError(\n 'ERR_UNKNOWN_FILE_EXTENSION',\n /**\n * @param {string} extension\n * @param {string} path\n */\n (extension, path) => {\n return `Unknown file extension \"${extension}\" for ${path}`\n },\n TypeError\n);\n\ncodes.ERR_INVALID_ARG_VALUE = createError(\n 'ERR_INVALID_ARG_VALUE',\n /**\n * @param {string} name\n * @param {unknown} value\n * @param {string} [reason='is invalid']\n */\n (name, value, reason = 'is invalid') => {\n let inspected = inspect(value);\n\n if (inspected.length > 128) {\n inspected = `${inspected.slice(0, 128)}...`;\n }\n\n const type = name.includes('.') ? 'property' : 'argument';\n\n return `The ${type} '${name}' ${reason}. Received ${inspected}`\n },\n TypeError\n // Note: extra classes have been shaken out.\n // , RangeError\n);\n\n/**\n * Utility function for registering the error codes. Only used here. Exported\n * *only* to allow for testing.\n * @param {string} sym\n * @param {MessageFunction | string} value\n * @param {ErrorConstructor} constructor\n * @returns {new (...parameters: Array<any>) => Error}\n */\nfunction createError(sym, value, constructor) {\n // Special case for SystemError that formats the error message differently\n // The SystemErrors only have SystemError as their base classes.\n messages.set(sym, value);\n\n return makeNodeErrorWithCode(constructor, sym)\n}\n\n/**\n * @param {ErrorConstructor} Base\n * @param {string} key\n * @returns {ErrorConstructor}\n */\nfunction makeNodeErrorWithCode(Base, key) {\n // @ts-expect-error It’s a Node error.\n return NodeError\n /**\n * @param {Array<unknown>} parameters\n */\n function NodeError(...parameters) {\n const limit = Error.stackTraceLimit;\n if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;\n const error = new Base();\n // Reset the limit and setting the name property.\n if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;\n const message = getMessage(key, parameters, error);\n Object.defineProperties(error, {\n // Note: no need to implement `kIsNodeError` symbol, would be hard,\n // probably.\n message: {\n value: message,\n enumerable: false,\n writable: true,\n configurable: true\n },\n toString: {\n /** @this {Error} */\n value() {\n return `${this.name} [${key}]: ${this.message}`\n },\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n captureLargerStackTrace(error);\n // @ts-expect-error It’s a Node error.\n error.code = key;\n return error\n }\n}\n\n/**\n * @returns {boolean}\n */\nfunction isErrorStackTraceLimitWritable() {\n // Do no touch Error.stackTraceLimit as V8 would attempt to install\n // it again during deserialization.\n try {\n if (v8.startupSnapshot.isBuildingSnapshot()) {\n return false\n }\n } catch {}\n\n const desc = Object.getOwnPropertyDescriptor(Error, 'stackTraceLimit');\n if (desc === undefined) {\n return Object.isExtensible(Error)\n }\n\n return own$1.call(desc, 'writable') && desc.writable !== undefined\n ? desc.writable\n : desc.set !== undefined\n}\n\n/**\n * This function removes unnecessary frames from Node.js core errors.\n * @template {(...parameters: unknown[]) => unknown} T\n * @param {T} wrappedFunction\n * @returns {T}\n */\nfunction hideStackFrames(wrappedFunction) {\n // We rename the functions that will be hidden to cut off the stacktrace\n // at the outermost one\n const hidden = nodeInternalPrefix + wrappedFunction.name;\n Object.defineProperty(wrappedFunction, 'name', {value: hidden});\n return wrappedFunction\n}\n\nconst captureLargerStackTrace = hideStackFrames(\n /**\n * @param {Error} error\n * @returns {Error}\n */\n // @ts-expect-error: fine\n function (error) {\n const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();\n if (stackTraceLimitIsWritable) {\n userStackTraceLimit = Error.stackTraceLimit;\n Error.stackTraceLimit = Number.POSITIVE_INFINITY;\n }\n\n Error.captureStackTrace(error);\n\n // Reset the limit\n if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;\n\n return error\n }\n);\n\n/**\n * @param {string} key\n * @param {Array<unknown>} parameters\n * @param {Error} self\n * @returns {string}\n */\nfunction getMessage(key, parameters, self) {\n const message = messages.get(key);\n assert(message !== undefined, 'expected `message` to be found');\n\n if (typeof message === 'function') {\n assert(\n message.length <= parameters.length, // Default options do not count.\n `Code: ${key}; The provided arguments length (${parameters.length}) does not ` +\n `match the required ones (${message.length}).`\n );\n return Reflect.apply(message, self, parameters)\n }\n\n const regex = /%[dfijoOs]/g;\n let expectedLength = 0;\n while (regex.exec(message) !== null) expectedLength++;\n assert(\n expectedLength === parameters.length,\n `Code: ${key}; The provided arguments length (${parameters.length}) does not ` +\n `match the required ones (${expectedLength}).`\n );\n if (parameters.length === 0) return message\n\n parameters.unshift(message);\n return Reflect.apply(format, null, parameters)\n}\n\n/**\n * Determine the specific type of a value for type-mismatch errors.\n * @param {unknown} value\n * @returns {string}\n */\nfunction determineSpecificType(value) {\n if (value === null || value === undefined) {\n return String(value)\n }\n\n if (typeof value === 'function' && value.name) {\n return `function ${value.name}`\n }\n\n if (typeof value === 'object') {\n if (value.constructor && value.constructor.name) {\n return `an instance of ${value.constructor.name}`\n }\n\n return `${inspect(value, {depth: -1})}`\n }\n\n let inspected = inspect(value, {colors: false});\n\n if (inspected.length > 28) {\n inspected = `${inspected.slice(0, 25)}...`;\n }\n\n return `type ${typeof value} (${inspected})`\n}\n\n// Manually “tree shaken” from:\n// <https://github.com/nodejs/node/blob/7c3dce0/lib/internal/modules/package_json_reader.js>\n// Last checked on: Apr 29, 2023.\n// Removed the native dependency.\n// Also: no need to cache, we do that in resolve already.\n\n\nconst hasOwnProperty$1 = {}.hasOwnProperty;\n\nconst {ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1} = codes;\n\n/** @type {Map<string, PackageConfig>} */\nconst cache = new Map();\n\n/**\n * @param {string} jsonPath\n * @param {{specifier: URL | string, base?: URL}} options\n * @returns {PackageConfig}\n */\nfunction read(jsonPath, {base, specifier}) {\n const existing = cache.get(jsonPath);\n\n if (existing) {\n return existing\n }\n\n /** @type {string | undefined} */\n let string;\n\n try {\n string = fs.readFileSync(path.toNamespacedPath(jsonPath), 'utf8');\n } catch (error) {\n const exception = /** @type {ErrnoException} */ (error);\n\n if (exception.code !== 'ENOENT') {\n throw exception\n }\n }\n\n /** @type {PackageConfig} */\n const result = {\n exists: false,\n pjsonPath: jsonPath,\n main: undefined,\n name: undefined,\n type: 'none', // Ignore unknown types for forwards compatibility\n exports: undefined,\n imports: undefined\n };\n\n if (string !== undefined) {\n /** @type {Record<string, unknown>} */\n let parsed;\n\n try {\n parsed = JSON.parse(string);\n } catch (error_) {\n const cause = /** @type {ErrnoException} */ (error_);\n const error = new ERR_INVALID_PACKAGE_CONFIG$1(\n jsonPath,\n (base ? `\"${specifier}\" from ` : '') + fileURLToPath$1(base || specifier),\n cause.message\n );\n error.cause = cause;\n throw error\n }\n\n result.exists = true;\n\n if (\n hasOwnProperty$1.call(parsed, 'name') &&\n typeof parsed.name === 'string'\n ) {\n result.name = parsed.name;\n }\n\n if (\n hasOwnProperty$1.call(parsed, 'main') &&\n typeof parsed.main === 'string'\n ) {\n result.main = parsed.main;\n }\n\n if (hasOwnProperty$1.call(parsed, 'exports')) {\n // @ts-expect-error: assume valid.\n result.exports = parsed.exports;\n }\n\n if (hasOwnProperty$1.call(parsed, 'imports')) {\n // @ts-expect-error: assume valid.\n result.imports = parsed.imports;\n }\n\n // Ignore unknown types for forwards compatibility\n if (\n hasOwnProperty$1.call(parsed, 'type') &&\n (parsed.type === 'commonjs' || parsed.type === 'module')\n ) {\n result.type = parsed.type;\n }\n }\n\n cache.set(jsonPath, result);\n\n return result\n}\n\n/**\n * @param {URL | string} resolved\n * @returns {PackageConfig}\n */\nfunction getPackageScopeConfig(resolved) {\n // Note: in Node, this is now a native module.\n let packageJSONUrl = new URL('package.json', resolved);\n\n while (true) {\n const packageJSONPath = packageJSONUrl.pathname;\n if (packageJSONPath.endsWith('node_modules/package.json')) {\n break\n }\n\n const packageConfig = read(fileURLToPath$1(packageJSONUrl), {\n specifier: resolved\n });\n\n if (packageConfig.exists) {\n return packageConfig\n }\n\n const lastPackageJSONUrl = packageJSONUrl;\n packageJSONUrl = new URL('../package.json', packageJSONUrl);\n\n // Terminates at root where ../package.json equals ../../package.json\n // (can't just check \"/package.json\" for Windows support).\n if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) {\n break\n }\n }\n\n const packageJSONPath = fileURLToPath$1(packageJSONUrl);\n // ^^ Note: in Node, this is now a native module.\n\n return {\n pjsonPath: packageJSONPath,\n exists: false,\n type: 'none'\n }\n}\n\n/**\n * Returns the package type for a given URL.\n * @param {URL} url - The URL to get the package type for.\n * @returns {PackageType}\n */\nfunction getPackageType(url) {\n // To do @anonrig: Write a C++ function that returns only \"type\".\n return getPackageScopeConfig(url).type\n}\n\n// Manually “tree shaken” from:\n// <https://github.com/nodejs/node/blob/7c3dce0/lib/internal/modules/esm/get_format.js>\n// Last checked on: Apr 29, 2023.\n\n\nconst {ERR_UNKNOWN_FILE_EXTENSION} = codes;\n\nconst hasOwnProperty = {}.hasOwnProperty;\n\n/** @type {Record<string, string>} */\nconst extensionFormatMap = {\n // @ts-expect-error: hush.\n __proto__: null,\n '.cjs': 'commonjs',\n '.js': 'module',\n '.json': 'json',\n '.mjs': 'module'\n};\n\n/**\n * @param {string | null} mime\n * @returns {string | null}\n */\nfunction mimeToFormat(mime) {\n if (\n mime &&\n /\\s*(text|application)\\/javascript\\s*(;\\s*charset=utf-?8\\s*)?/i.test(mime)\n )\n return 'module'\n if (mime === 'application/json') return 'json'\n return null\n}\n\n/**\n * @callback ProtocolHandler\n * @param {URL} parsed\n * @param {{parentURL: string, source?: Buffer}} context\n * @param {boolean} ignoreErrors\n * @returns {string | null | void}\n */\n\n/**\n * @type {Record<string, ProtocolHandler>}\n */\nconst protocolHandlers = {\n // @ts-expect-error: hush.\n __proto__: null,\n 'data:': getDataProtocolModuleFormat,\n 'file:': getFileProtocolModuleFormat,\n 'http:': getHttpProtocolModuleFormat,\n 'https:': getHttpProtocolModuleFormat,\n 'node:'() {\n return 'builtin'\n }\n};\n\n/**\n * @param {URL} parsed\n */\nfunction getDataProtocolModuleFormat(parsed) {\n const {1: mime} = /^([^/]+\\/[^;,]+)[^,]*?(;base64)?,/.exec(\n parsed.pathname\n ) || [null, null, null];\n return mimeToFormat(mime)\n}\n\n/**\n * Returns the file extension from a URL.\n *\n * Should give similar result to\n * `require('node:path').extname(require('node:url').fileURLToPath(url))`\n * when used with a `file:` URL.\n *\n * @param {URL} url\n * @returns {string}\n */\nfunction extname(url) {\n const pathname = url.pathname;\n let index = pathname.length;\n\n while (index--) {\n const code = pathname.codePointAt(index);\n\n if (code === 47 /* `/` */) {\n return ''\n }\n\n if (code === 46 /* `.` */) {\n return pathname.codePointAt(index - 1) === 47 /* `/` */\n ? ''\n : pathname.slice(index)\n }\n }\n\n return ''\n}\n\n/**\n * @type {ProtocolHandler}\n */\nfunction getFileProtocolModuleFormat(url, _context, ignoreErrors) {\n const value = extname(url);\n\n if (value === '.js') {\n const packageType = getPackageType(url);\n\n if (packageType !== 'none') {\n return packageType\n }\n\n return 'commonjs'\n }\n\n if (value === '') {\n const packageType = getPackageType(url);\n\n // Legacy behavior\n if (packageType === 'none' || packageType === 'commonjs') {\n return 'commonjs'\n }\n\n // Note: we don’t implement WASM, so we don’t need\n // `getFormatOfExtensionlessFile` from `formats`.\n return 'module'\n }\n\n const format = extensionFormatMap[value];\n if (format) return format\n\n // Explicit undefined return indicates load hook should rerun format check\n if (ignoreErrors) {\n return undefined\n }\n\n const filepath = fileURLToPath$1(url);\n throw new ERR_UNKNOWN_FILE_EXTENSION(value, filepath)\n}\n\nfunction getHttpProtocolModuleFormat() {\n // To do: HTTPS imports.\n}\n\n/**\n * @param {URL} url\n * @param {{parentURL: string}} context\n * @returns {string | null}\n */\nfunction defaultGetFormatWithoutErrors(url, context) {\n const protocol = url.protocol;\n\n if (!hasOwnProperty.call(protocolHandlers, protocol)) {\n return null\n }\n\n return protocolHandlers[protocol](url, context, true) || null\n}\n\n// Manually “tree shaken” from:\n// <https://github.com/nodejs/node/blob/81a9a97/lib/internal/modules/esm/resolve.js>\n// Last checked on: Apr 29, 2023.\n\n\nconst RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];\n\nconst {\n ERR_NETWORK_IMPORT_DISALLOWED,\n ERR_INVALID_MODULE_SPECIFIER,\n ERR_INVALID_PACKAGE_CONFIG,\n ERR_INVALID_PACKAGE_TARGET,\n ERR_MODULE_NOT_FOUND,\n ERR_PACKAGE_IMPORT_NOT_DEFINED,\n ERR_PACKAGE_PATH_NOT_EXPORTED,\n ERR_UNSUPPORTED_DIR_IMPORT,\n ERR_UNSUPPORTED_RESOLVE_REQUEST\n} = codes;\n\nconst own = {}.hasOwnProperty;\n\nconst invalidSegmentRegEx =\n /(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\\\|\\/|$)/i;\nconst deprecatedInvalidSegmentRegEx =\n /(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\\\|\\/|$)/i;\nconst invalidPackageNameRegEx = /^\\.|%|\\\\/;\nconst patternRegEx = /\\*/g;\nconst encodedSeparatorRegEx = /%2f|%5c/i;\n/** @type {Set<string>} */\nconst emittedPackageWarnings = new Set();\n\nconst doubleSlashRegEx = /[/\\\\]{2}/;\n\n/**\n *\n * @param {string} target\n * @param {string} request\n * @param {string} match\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} base\n * @param {boolean} isTarget\n */\nfunction emitInvalidSegmentDeprecation(\n target,\n request,\n match,\n packageJsonUrl,\n internal,\n base,\n isTarget\n) {\n // @ts-expect-error: apparently it does exist, TS.\n if (process$1.noDeprecation) {\n return\n }\n\n const pjsonPath = fileURLToPath$1(packageJsonUrl);\n const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;\n process$1.emitWarning(\n `Use of deprecated ${\n double ? 'double slash' : 'leading or trailing slash matching'\n } resolving \"${target}\" for module ` +\n `request \"${request}\" ${\n request === match ? '' : `matched to \"${match}\" `\n }in the \"${\n internal ? 'imports' : 'exports'\n }\" field module resolution of the package at ${pjsonPath}${\n base ? ` imported from ${fileURLToPath$1(base)}` : ''\n }.`,\n 'DeprecationWarning',\n 'DEP0166'\n );\n}\n\n/**\n * @param {URL} url\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @param {string} [main]\n * @returns {void}\n */\nfunction emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {\n // @ts-expect-error: apparently it does exist, TS.\n if (process$1.noDeprecation) {\n return\n }\n\n const format = defaultGetFormatWithoutErrors(url, {parentURL: base.href});\n if (format !== 'module') return\n const urlPath = fileURLToPath$1(url.href);\n const packagePath = fileURLToPath$1(new URL$1('.', packageJsonUrl));\n const basePath = fileURLToPath$1(base);\n if (!main) {\n process$1.emitWarning(\n `No \"main\" or \"exports\" field defined in the package.json for ${packagePath} resolving the main entry point \"${urlPath.slice(\n packagePath.length\n )}\", imported from ${basePath}.\\nDefault \"index\" lookups for the main are deprecated for ES modules.`,\n 'DeprecationWarning',\n 'DEP0151'\n );\n } else if (path.resolve(packagePath, main) !== urlPath) {\n process$1.emitWarning(\n `Package ${packagePath} has a \"main\" field set to \"${main}\", ` +\n `excluding the full filename and extension to the resolved file at \"${urlPath.slice(\n packagePath.length\n )}\", imported from ${basePath}.\\n Automatic extension resolution of the \"main\" field is ` +\n 'deprecated for ES modules.',\n 'DeprecationWarning',\n 'DEP0151'\n );\n }\n}\n\n/**\n * @param {string} path\n * @returns {Stats | undefined}\n */\nfunction tryStatSync(path) {\n // Note: from Node 15 onwards we can use `throwIfNoEntry: false` instead.\n try {\n return statSync(path)\n } catch {\n // Note: in Node code this returns `new Stats`,\n // but in Node 22 that’s marked as a deprecated internal API.\n // Which, well, we kinda are, but still to prevent that warning,\n // just yield `undefined`.\n }\n}\n\n/**\n * Legacy CommonJS main resolution:\n * 1. let M = pkg_url + (json main field)\n * 2. TRY(M, M.js, M.json, M.node)\n * 3. TRY(M/index.js, M/index.json, M/index.node)\n * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)\n * 5. NOT_FOUND\n *\n * @param {URL} url\n * @returns {boolean}\n */\nfunction fileExists(url) {\n const stats = statSync(url, {throwIfNoEntry: false});\n const isFile = stats ? stats.isFile() : undefined;\n return isFile === null || isFile === undefined ? false : isFile\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {PackageConfig} packageConfig\n * @param {URL} base\n * @returns {URL}\n */\nfunction legacyMainResolve(packageJsonUrl, packageConfig, base) {\n /** @type {URL | undefined} */\n let guess;\n if (packageConfig.main !== undefined) {\n guess = new URL$1(packageConfig.main, packageJsonUrl);\n // Note: fs check redundances will be handled by Descriptor cache here.\n if (fileExists(guess)) return guess\n\n const tries = [\n `./${packageConfig.main}.js`,\n `./${packageConfig.main}.json`,\n `./${packageConfig.main}.node`,\n `./${packageConfig.main}/index.js`,\n `./${packageConfig.main}/index.json`,\n `./${packageConfig.main}/index.node`\n ];\n let i = -1;\n\n while (++i < tries.length) {\n guess = new URL$1(tries[i], packageJsonUrl);\n if (fileExists(guess)) break\n guess = undefined;\n }\n\n if (guess) {\n emitLegacyIndexDeprecation(\n guess,\n packageJsonUrl,\n base,\n packageConfig.main\n );\n return guess\n }\n // Fallthrough.\n }\n\n const tries = ['./index.js', './index.json', './index.node'];\n let i = -1;\n\n while (++i < tries.length) {\n guess = new URL$1(tries[i], packageJsonUrl);\n if (fileExists(guess)) break\n guess = undefined;\n }\n\n if (guess) {\n emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);\n return guess\n }\n\n // Not found.\n throw new ERR_MODULE_NOT_FOUND(\n fileURLToPath$1(new URL$1('.', packageJsonUrl)),\n fileURLToPath$1(base)\n )\n}\n\n/**\n * @param {URL} resolved\n * @param {URL} base\n * @param {boolean} [preserveSymlinks]\n * @returns {URL}\n */\nfunction finalizeResolution(resolved, base, preserveSymlinks) {\n if (encodedSeparatorRegEx.exec(resolved.pathname) !== null) {\n throw new ERR_INVALID_MODULE_SPECIFIER(\n resolved.pathname,\n 'must not include encoded \"/\" or \"\\\\\" characters',\n fileURLToPath$1(base)\n )\n }\n\n /** @type {string} */\n let filePath;\n\n try {\n filePath = fileURLToPath$1(resolved);\n } catch (error) {\n const cause = /** @type {ErrnoException} */ (error);\n Object.defineProperty(cause, 'input', {value: String(resolved)});\n Object.defineProperty(cause, 'module', {value: String(base)});\n throw cause\n }\n\n const stats = tryStatSync(\n filePath.endsWith('/') ? filePath.slice(-1) : filePath\n );\n\n if (stats && stats.isDirectory()) {\n const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath$1(base));\n // @ts-expect-error Add this for `import.meta.resolve`.\n error.url = String(resolved);\n throw error\n }\n\n if (!stats || !stats.isFile()) {\n const error = new ERR_MODULE_NOT_FOUND(\n filePath || resolved.pathname,\n base && fileURLToPath$1(base),\n true\n );\n // @ts-expect-error Add this for `import.meta.resolve`.\n error.url = String(resolved);\n throw error\n }\n\n {\n const real = realpathSync(filePath);\n const {search, hash} = resolved;\n resolved = pathToFileURL$1(real + (filePath.endsWith(path.sep) ? '/' : ''));\n resolved.search = search;\n resolved.hash = hash;\n }\n\n return resolved\n}\n\n/**\n * @param {string} specifier\n * @param {URL | undefined} packageJsonUrl\n * @param {URL} base\n * @returns {Error}\n */\nfunction importNotDefined(specifier, packageJsonUrl, base) {\n return new ERR_PACKAGE_IMPORT_NOT_DEFINED(\n specifier,\n packageJsonUrl && fileURLToPath$1(new URL$1('.', packageJsonUrl)),\n fileURLToPath$1(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @returns {Error}\n */\nfunction exportsNotFound(subpath, packageJsonUrl, base) {\n return new ERR_PACKAGE_PATH_NOT_EXPORTED(\n fileURLToPath$1(new URL$1('.', packageJsonUrl)),\n subpath,\n base && fileURLToPath$1(base)\n )\n}\n\n/**\n * @param {string} request\n * @param {string} match\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} [base]\n * @returns {never}\n */\nfunction throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {\n const reason = `request is not a valid match in pattern \"${match}\" for the \"${\n internal ? 'imports' : 'exports'\n }\" resolution of ${fileURLToPath$1(packageJsonUrl)}`;\n throw new ERR_INVALID_MODULE_SPECIFIER(\n request,\n reason,\n base && fileURLToPath$1(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {unknown} target\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} [base]\n * @returns {Error}\n */\nfunction invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {\n target =\n typeof target === 'object' && target !== null\n ? JSON.stringify(target, null, '')\n : `${target}`;\n\n return new ERR_INVALID_PACKAGE_TARGET(\n fileURLToPath$1(new URL$1('.', packageJsonUrl)),\n subpath,\n target,\n internal,\n base && fileURLToPath$1(base)\n )\n}\n\n/**\n * @param {string} target\n * @param {string} subpath\n * @param {string} match\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @param {boolean} pattern\n * @param {boolean} internal\n * @param {boolean} isPathMap\n * @param {Set<string> | undefined} conditions\n * @returns {URL}\n */\nfunction resolvePackageTargetString(\n target,\n subpath,\n match,\n packageJsonUrl,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n) {\n if (subpath !== '' && !pattern && target[target.length - 1] !== '/')\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n\n if (!target.startsWith('./')) {\n if (internal && !target.startsWith('../') && !target.startsWith('/')) {\n let isURL = false;\n\n try {\n new URL$1(target);\n isURL = true;\n } catch {\n // Continue regardless of error.\n }\n\n if (!isURL) {\n const exportTarget = pattern\n ? RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n target,\n () => subpath\n )\n : target + subpath;\n\n return packageResolve(exportTarget, packageJsonUrl, conditions)\n }\n }\n\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n }\n\n if (invalidSegmentRegEx.exec(target.slice(2)) !== null) {\n if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) {\n if (!isPathMap) {\n const request = pattern\n ? match.replace('*', () => subpath)\n : match + subpath;\n const resolvedTarget = pattern\n ? RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n target,\n () => subpath\n )\n : target;\n emitInvalidSegmentDeprecation(\n resolvedTarget,\n request,\n match,\n packageJsonUrl,\n internal,\n base,\n true\n );\n }\n } else {\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n }\n }\n\n const resolved = new URL$1(target, packageJsonUrl);\n const resolvedPath = resolved.pathname;\n const packagePath = new URL$1('.', packageJsonUrl).pathname;\n\n if (!resolvedPath.startsWith(packagePath))\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n\n if (subpath === '') return resolved\n\n if (invalidSegmentRegEx.exec(subpath) !== null) {\n const request = pattern\n ? match.replace('*', () => subpath)\n : match + subpath;\n if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) {\n if (!isPathMap) {\n const resolvedTarget = pattern\n ? RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n target,\n () => subpath\n )\n : target;\n emitInvalidSegmentDeprecation(\n resolvedTarget,\n request,\n match,\n packageJsonUrl,\n internal,\n base,\n false\n );\n }\n } else {\n throwInvalidSubpath(request, match, packageJsonUrl, internal, base);\n }\n }\n\n if (pattern) {\n return new URL$1(\n RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n resolved.href,\n () => subpath\n )\n )\n }\n\n return new URL$1(subpath, resolved)\n}\n\n/**\n * @param {string} key\n * @returns {boolean}\n */\nfunction isArrayIndex(key) {\n const keyNumber = Number(key);\n if (`${keyNumber}` !== key) return false\n return keyNumber >= 0 && keyNumber < 0xff_ff_ff_ff\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {unknown} target\n * @param {string} subpath\n * @param {string} packageSubpath\n * @param {URL} base\n * @param {boolean} pattern\n * @param {boolean} internal\n * @param {boolean} isPathMap\n * @param {Set<string> | undefined} conditions\n * @returns {URL | null}\n */\nfunction resolvePackageTarget(\n packageJsonUrl,\n target,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n) {\n if (typeof target === 'string') {\n return resolvePackageTargetString(\n target,\n subpath,\n packageSubpath,\n packageJsonUrl,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n )\n }\n\n if (Array.isArray(target)) {\n /** @type {Array<unknown>} */\n const targetList = target;\n if (targetList.length === 0) return null\n\n /** @type {ErrnoException | null | undefined} */\n let lastException;\n let i = -1;\n\n while (++i < targetList.length) {\n const targetItem = targetList[i];\n /** @type {URL | null} */\n let resolveResult;\n try {\n resolveResult = resolvePackageTarget(\n packageJsonUrl,\n targetItem,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n );\n } catch (error) {\n const exception = /** @type {ErrnoException} */ (error);\n lastException = exception;\n if (exception.code === 'ERR_INVALID_PACKAGE_TARGET') continue\n throw error\n }\n\n if (resolveResult === undefined) continue\n\n if (resolveResult === null) {\n lastException = null;\n continue\n }\n\n return resolveResult\n }\n\n if (lastException === undefined || lastException === null) {\n return null\n }\n\n throw lastException\n }\n\n if (typeof target === 'object' && target !== null) {\n const keys = Object.getOwnPropertyNames(target);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (isArrayIndex(key)) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n fileURLToPath$1(packageJsonUrl),\n base,\n '\"exports\" cannot contain numeric property keys.'\n )\n }\n }\n\n i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (key === 'default' || (conditions && conditions.has(key))) {\n // @ts-expect-error: indexable.\n const conditionalTarget = /** @type {unknown} */ (target[key]);\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n conditionalTarget,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n );\n if (resolveResult === undefined) continue\n return resolveResult\n }\n }\n\n return null\n }\n\n if (target === null) {\n return null\n }\n\n throw invalidPackageTarget(\n packageSubpath,\n target,\n packageJsonUrl,\n internal,\n base\n )\n}\n\n/**\n * @param {unknown} exports\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @returns {boolean}\n */\nfunction isConditionalExportsMainSugar(exports, packageJsonUrl, base) {\n if (typeof exports === 'string' || Array.isArray(exports)) return true\n if (typeof exports !== 'object' || exports === null) return false\n\n const keys = Object.getOwnPropertyNames(exports);\n let isConditionalSugar = false;\n let i = 0;\n let keyIndex = -1;\n while (++keyIndex < keys.length) {\n const key = keys[keyIndex];\n const currentIsConditionalSugar = key === '' || key[0] !== '.';\n if (i++ === 0) {\n isConditionalSugar = currentIsConditionalSugar;\n } else if (isConditionalSugar !== currentIsConditionalSugar) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n fileURLToPath$1(packageJsonUrl),\n base,\n '\"exports\" cannot contain some keys starting with \\'.\\' and some not.' +\n ' The exports object must either be an object of package subpath keys' +\n ' or an object of main entry condition name keys only.'\n )\n }\n }\n\n return isConditionalSugar\n}\n\n/**\n * @param {string} match\n * @param {URL} pjsonUrl\n * @param {URL} base\n */\nfunction emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {\n // @ts-expect-error: apparently it does exist, TS.\n if (process$1.noDeprecation) {\n return\n }\n\n const pjsonPath = fileURLToPath$1(pjsonUrl);\n if (emittedPackageWarnings.has(pjsonPath + '|' + match)) return\n emittedPackageWarnings.add(pjsonPath + '|' + match);\n process$1.emitWarning(\n `Use of deprecated trailing slash pattern mapping \"${match}\" in the ` +\n `\"exports\" field module resolution of the package at ${pjsonPath}${\n base ? ` imported from ${fileURLToPath$1(base)}` : ''\n }. Mapping specifiers ending in \"/\" is no longer supported.`,\n 'DeprecationWarning',\n 'DEP0155'\n );\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {string} packageSubpath\n * @param {Record<string, unknown>} packageConfig\n * @param {URL} base\n * @param {Set<string> | undefined} conditions\n * @returns {URL}\n */\nfunction packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n) {\n let exports = packageConfig.exports;\n\n if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) {\n exports = {'.': exports};\n }\n\n if (\n own.call(exports, packageSubpath) &&\n !packageSubpath.includes('*') &&\n !packageSubpath.endsWith('/')\n ) {\n // @ts-expect-error: indexable.\n const target = exports[packageSubpath];\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n target,\n '',\n packageSubpath,\n base,\n false,\n false,\n false,\n conditions\n );\n if (resolveResult === null || resolveResult === undefined) {\n throw exportsNotFound(packageSubpath, packageJsonUrl, base)\n }\n\n return resolveResult\n }\n\n let bestMatch = '';\n let bestMatchSubpath = '';\n const keys = Object.getOwnPropertyNames(exports);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n const patternIndex = key.indexOf('*');\n\n if (\n patternIndex !== -1 &&\n packageSubpath.startsWith(key.slice(0, patternIndex))\n ) {\n // When this reaches EOL, this can throw at the top of the whole function:\n //\n // if (StringPrototypeEndsWith(packageSubpath, '/'))\n // throwInvalidSubpath(packageSubpath)\n //\n // To match \"imports\" and the spec.\n if (packageSubpath.endsWith('/')) {\n emitTrailingSlashPatternDeprecation(\n packageSubpath,\n packageJsonUrl,\n base\n );\n }\n\n const patternTrailer = key.slice(patternIndex + 1);\n\n if (\n packageSubpath.length >= key.length &&\n packageSubpath.endsWith(patternTrailer) &&\n patternKeyCompare(bestMatch, key) === 1 &&\n key.lastIndexOf('*') === patternIndex\n ) {\n bestMatch = key;\n bestMatchSubpath = packageSubpath.slice(\n patternIndex,\n packageSubpath.length - patternTrailer.length\n );\n }\n }\n }\n\n if (bestMatch) {\n // @ts-expect-error: indexable.\n const target = /** @type {unknown} */ (exports[bestMatch]);\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n target,\n bestMatchSubpath,\n bestMatch,\n base,\n true,\n false,\n packageSubpath.endsWith('/'),\n conditions\n );\n\n if (resolveResult === null || resolveResult === undefined) {\n throw exportsNotFound(packageSubpath, packageJsonUrl, base)\n }\n\n return resolveResult\n }\n\n throw exportsNotFound(packageSubpath, packageJsonUrl, base)\n}\n\n/**\n * @param {string} a\n * @param {string} b\n */\nfunction patternKeyCompare(a, b) {\n const aPatternIndex = a.indexOf('*');\n const bPatternIndex = b.indexOf('*');\n const baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;\n const baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;\n if (baseLengthA > baseLengthB) return -1\n if (baseLengthB > baseLengthA) return 1\n if (aPatternIndex === -1) return 1\n if (bPatternIndex === -1) return -1\n if (a.length > b.length) return -1\n if (b.length > a.length) return 1\n return 0\n}\n\n/**\n * @param {string} name\n * @param {URL} base\n * @param {Set<string>} [conditions]\n * @returns {URL}\n */\nfunction packageImportsResolve(name, base, conditions) {\n if (name === '#' || name.startsWith('#/') || name.endsWith('/')) {\n const reason = 'is not a valid internal imports specifier name';\n throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath$1(base))\n }\n\n /** @type {URL | undefined} */\n let packageJsonUrl;\n\n const packageConfig = getPackageScopeConfig(base);\n\n if (packageConfig.exists) {\n packageJsonUrl = pathToFileURL$1(packageConfig.pjsonPath);\n const imports = packageConfig.imports;\n if (imports) {\n if (own.call(imports, name) && !name.includes('*')) {\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n imports[name],\n '',\n name,\n base,\n false,\n true,\n false,\n conditions\n );\n if (resolveResult !== null && resolveResult !== undefined) {\n return resolveResult\n }\n } else {\n let bestMatch = '';\n let bestMatchSubpath = '';\n const keys = Object.getOwnPropertyNames(imports);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n const patternIndex = key.indexOf('*');\n\n if (patternIndex !== -1 && name.startsWith(key.slice(0, -1))) {\n const patternTrailer = key.slice(patternIndex + 1);\n if (\n name.length >= key.length &&\n name.endsWith(patternTrailer) &&\n patternKeyCompare(bestMatch, key) === 1 &&\n key.lastIndexOf('*') === patternIndex\n ) {\n bestMatch = key;\n bestMatchSubpath = name.slice(\n patternIndex,\n name.length - patternTrailer.length\n );\n }\n }\n }\n\n if (bestMatch) {\n const target = imports[bestMatch];\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n target,\n bestMatchSubpath,\n bestMatch,\n base,\n true,\n true,\n false,\n conditions\n );\n\n if (resolveResult !== null && resolveResult !== undefined) {\n return resolveResult\n }\n }\n }\n }\n }\n\n throw importNotDefined(name, packageJsonUrl, base)\n}\n\n/**\n * @param {string} specifier\n * @param {URL} base\n */\nfunction parsePackageName(specifier, base) {\n let separatorIndex = specifier.indexOf('/');\n let validPackageName = true;\n let isScoped = false;\n if (specifier[0] === '@') {\n isScoped = true;\n if (separatorIndex === -1 || specifier.length === 0) {\n validPackageName = false;\n } else {\n separatorIndex = specifier.indexOf('/', separatorIndex + 1);\n }\n }\n\n const packageName =\n separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);\n\n // Package name cannot have leading . and cannot have percent-encoding or\n // \\\\ separators.\n if (invalidPackageNameRegEx.exec(packageName) !== null) {\n validPackageName = false;\n }\n\n if (!validPackageName) {\n throw new ERR_INVALID_MODULE_SPECIFIER(\n specifier,\n 'is not a valid package name',\n fileURLToPath$1(base)\n )\n }\n\n const packageSubpath =\n '.' + (separatorIndex === -1 ? '' : specifier.slice(separatorIndex));\n\n return {packageName, packageSubpath, isScoped}\n}\n\n/**\n * @param {string} specifier\n * @param {URL} base\n * @param {Set<string> | undefined} conditions\n * @returns {URL}\n */\nfunction packageResolve(specifier, base, conditions) {\n if (builtinModules.includes(specifier)) {\n return new URL$1('node:' + specifier)\n }\n\n const {packageName, packageSubpath, isScoped} = parsePackageName(\n specifier,\n base\n );\n\n // ResolveSelf\n const packageConfig = getPackageScopeConfig(base);\n\n // Can’t test.\n /* c8 ignore next 16 */\n if (packageConfig.exists) {\n const packageJsonUrl = pathToFileURL$1(packageConfig.pjsonPath);\n if (\n packageConfig.name === packageName &&\n packageConfig.exports !== undefined &&\n packageConfig.exports !== null\n ) {\n return packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n )\n }\n }\n\n let packageJsonUrl = new URL$1(\n './node_modules/' + packageName + '/package.json',\n base\n );\n let packageJsonPath = fileURLToPath$1(packageJsonUrl);\n /** @type {string} */\n let lastPath;\n do {\n const stat = tryStatSync(packageJsonPath.slice(0, -13));\n if (!stat || !stat.isDirectory()) {\n lastPath = packageJsonPath;\n packageJsonUrl = new URL$1(\n (isScoped ? '../../../../node_modules/' : '../../../node_modules/') +\n packageName +\n '/package.json',\n packageJsonUrl\n );\n packageJsonPath = fileURLToPath$1(packageJsonUrl);\n continue\n }\n\n // Package match.\n const packageConfig = read(packageJsonPath, {base, specifier});\n if (packageConfig.exports !== undefined && packageConfig.exports !== null) {\n return packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n )\n }\n\n if (packageSubpath === '.') {\n return legacyMainResolve(packageJsonUrl, packageConfig, base)\n }\n\n return new URL$1(packageSubpath, packageJsonUrl)\n // Cross-platform root check.\n } while (packageJsonPath.length !== lastPath.length)\n\n throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath$1(base), false)\n}\n\n/**\n * @param {string} specifier\n * @returns {boolean}\n */\nfunction isRelativeSpecifier(specifier) {\n if (specifier[0] === '.') {\n if (specifier.length === 1 || specifier[1] === '/') return true\n if (\n specifier[1] === '.' &&\n (specifier.length === 2 || specifier[2] === '/')\n ) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * @param {string} specifier\n * @returns {boolean}\n */\nfunction shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {\n if (specifier === '') return false\n if (specifier[0] === '/') return true\n return isRelativeSpecifier(specifier)\n}\n\n/**\n * The “Resolver Algorithm Specification” as detailed in the Node docs (which is\n * sync and slightly lower-level than `resolve`).\n *\n * @param {string} specifier\n * `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.\n * @param {URL} base\n * Full URL (to a file) that `specifier` is resolved relative from.\n * @param {Set<string>} [conditions]\n * Conditions.\n * @param {boolean} [preserveSymlinks]\n * Keep symlinks instead of resolving them.\n * @returns {URL}\n * A URL object to the found thing.\n */\nfunction moduleResolve(specifier, base, conditions, preserveSymlinks) {\n // Note: The Node code supports `base` as a string (in this internal API) too,\n // we don’t.\n const protocol = base.protocol;\n const isData = protocol === 'data:';\n const isRemote = isData || protocol === 'http:' || protocol === 'https:';\n // Order swapped from spec for minor perf gain.\n // Ok since relative URLs cannot parse as URLs.\n /** @type {URL | undefined} */\n let resolved;\n\n if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {\n try {\n resolved = new URL$1(specifier, base);\n } catch (error_) {\n const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);\n error.cause = error_;\n throw error\n }\n } else if (protocol === 'file:' && specifier[0] === '#') {\n resolved = packageImportsResolve(specifier, base, conditions);\n } else {\n try {\n resolved = new URL$1(specifier);\n } catch (error_) {\n // Note: actual code uses `canBeRequiredWithoutScheme`.\n if (isRemote && !builtinModules.includes(specifier)) {\n const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);\n error.cause = error_;\n throw error\n }\n\n resolved = packageResolve(specifier, base, conditions);\n }\n }\n\n assert(resolved !== undefined, 'expected to be defined');\n\n if (resolved.protocol !== 'file:') {\n return resolved\n }\n\n return finalizeResolution(resolved, base)\n}\n\nfunction fileURLToPath(id) {\n if (typeof id === \"string\" && !id.startsWith(\"file://\")) {\n return normalizeSlash(id);\n }\n return normalizeSlash(fileURLToPath$1(id));\n}\nfunction pathToFileURL(id) {\n return pathToFileURL$1(fileURLToPath(id)).toString();\n}\nconst INVALID_CHAR_RE = /[\\u0000-\\u001F\"#$&*+,/:;<=>?@[\\]^`{|}\\u007F]+/g;\nfunction sanitizeURIComponent(name = \"\", replacement = \"_\") {\n return name.replace(INVALID_CHAR_RE, replacement).replace(/%../g, replacement);\n}\nfunction sanitizeFilePath(filePath = \"\") {\n return filePath.replace(/\\?.*$/, \"\").split(/[/\\\\]/g).map((p) => sanitizeURIComponent(p)).join(\"/\").replace(/^([A-Za-z])_\\//, \"$1:/\");\n}\nfunction normalizeid(id) {\n if (typeof id !== \"string\") {\n id = id.toString();\n }\n if (/(node|data|http|https|file):/.test(id)) {\n return id;\n }\n if (BUILTIN_MODULES.has(id)) {\n return \"node:\" + id;\n }\n return \"file://\" + encodeURI(normalizeSlash(id));\n}\nasync function loadURL(url) {\n const code = await promises.readFile(fileURLToPath(url), \"utf8\");\n return code;\n}\nfunction toDataURL(code) {\n const base64 = Buffer.from(code).toString(\"base64\");\n return `data:text/javascript;base64,${base64}`;\n}\nfunction isNodeBuiltin(id = \"\") {\n id = id.replace(/^node:/, \"\").split(\"/\")[0];\n return BUILTIN_MODULES.has(id);\n}\nconst ProtocolRegex = /^(?<proto>.{2,}?):.+$/;\nfunction getProtocol(id) {\n const proto = id.match(ProtocolRegex);\n return proto ? proto.groups?.proto : undefined;\n}\n\nconst DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set([\"node\", \"import\"]);\nconst DEFAULT_EXTENSIONS = [\".mjs\", \".cjs\", \".js\", \".json\"];\nconst NOT_FOUND_ERRORS = /* @__PURE__ */ new Set([\n \"ERR_MODULE_NOT_FOUND\",\n \"ERR_UNSUPPORTED_DIR_IMPORT\",\n \"MODULE_NOT_FOUND\",\n \"ERR_PACKAGE_PATH_NOT_EXPORTED\"\n]);\nfunction _tryModuleResolve(id, url, conditions) {\n try {\n return moduleResolve(id, url, conditions);\n } catch (error) {\n if (!NOT_FOUND_ERRORS.has(error?.code)) {\n throw error;\n }\n }\n}\nfunction _resolve(id, options = {}) {\n if (typeof id !== \"string\") {\n if (id instanceof URL) {\n id = fileURLToPath(id);\n } else {\n throw new TypeError(\"input must be a `string` or `URL`\");\n }\n }\n if (/(node|data|http|https):/.test(id)) {\n return id;\n }\n if (BUILTIN_MODULES.has(id)) {\n return \"node:\" + id;\n }\n if (id.startsWith(\"file://\")) {\n id = fileURLToPath(id);\n }\n if (isAbsolute(id)) {\n try {\n const stat = statSync(id);\n if (stat.isFile()) {\n return pathToFileURL(id);\n }\n } catch (error) {\n if (error?.code !== \"ENOENT\") {\n throw error;\n }\n }\n }\n const conditionsSet = options.conditions ? new Set(options.conditions) : DEFAULT_CONDITIONS_SET;\n const _urls = (Array.isArray(options.url) ? options.url : [options.url]).filter(Boolean).map((url) => new URL(normalizeid(url.toString())));\n if (_urls.length === 0) {\n _urls.push(new URL(pathToFileURL(process.cwd())));\n }\n const urls = [..._urls];\n for (const url of _urls) {\n if (url.protocol === \"file:\") {\n urls.push(\n new URL(\"./\", url),\n // If url is directory\n new URL(joinURL(url.pathname, \"_index.js\"), url),\n // TODO: Remove in next major version?\n new URL(\"node_modules\", url)\n );\n }\n }\n let resolved;\n for (const url of urls) {\n resolved = _tryModuleResolve(id, url, conditionsSet);\n if (resolved) {\n break;\n }\n for (const prefix of [\"\", \"/index\"]) {\n for (const extension of options.extensions || DEFAULT_EXTENSIONS) {\n resolved = _tryModuleResolve(\n joinURL(id, prefix) + extension,\n url,\n conditionsSet\n );\n if (resolved) {\n break;\n }\n }\n if (resolved) {\n break;\n }\n }\n if (resolved) {\n break;\n }\n }\n if (!resolved) {\n const error = new Error(\n `Cannot find module ${id} imported from ${urls.join(\", \")}`\n );\n error.code = \"ERR_MODULE_NOT_FOUND\";\n throw error;\n }\n return pathToFileURL(resolved);\n}\nfunction resolveSync(id, options) {\n return _resolve(id, options);\n}\nfunction resolve(id, options) {\n try {\n return Promise.resolve(resolveSync(id, options));\n } catch (error) {\n return Promise.reject(error);\n }\n}\nfunction resolvePathSync(id, options) {\n return fileURLToPath(resolveSync(id, options));\n}\nfunction resolvePath(id, options) {\n try {\n return Promise.resolve(resolvePathSync(id, options));\n } catch (error) {\n return Promise.reject(error);\n }\n}\nfunction createResolve(defaults) {\n return (id, url) => {\n return resolve(id, { url, ...defaults });\n };\n}\nconst NODE_MODULES_RE = /^(.+\\/node_modules\\/)([^/@]+|@[^/]+\\/[^/]+)(\\/?.*?)?$/;\nfunction parseNodeModulePath(path) {\n if (!path) {\n return {};\n }\n path = normalize(fileURLToPath(path));\n const match = NODE_MODULES_RE.exec(path);\n if (!match) {\n return {};\n }\n const [, dir, name, subpath] = match;\n return {\n dir,\n name,\n subpath: subpath ? `.${subpath}` : undefined\n };\n}\nasync function lookupNodeModuleSubpath(path) {\n path = normalize(fileURLToPath(path));\n const { name, subpath } = parseNodeModulePath(path);\n if (!name || !subpath) {\n return subpath;\n }\n const { exports } = await readPackageJSON(path).catch(() => {\n }) || {};\n if (exports) {\n const resolvedSubpath = _findSubpath(subpath, exports);\n if (resolvedSubpath) {\n return resolvedSubpath;\n }\n }\n return subpath;\n}\nfunction _findSubpath(subpath, exports) {\n if (typeof exports === \"string\") {\n exports = { \".\": exports };\n }\n if (!subpath.startsWith(\".\")) {\n subpath = subpath.startsWith(\"/\") ? `.${subpath}` : `./${subpath}`;\n }\n if (subpath in (exports || {})) {\n return subpath;\n }\n return _flattenExports(exports).find((p) => p.fsPath === subpath)?.subpath;\n}\nfunction _flattenExports(exports = {}, parentSubpath = \"./\") {\n return Object.entries(exports).flatMap(([key, value]) => {\n const [subpath, condition] = key.startsWith(\".\") ? [key.slice(1), undefined] : [\"\", key];\n const _subPath = joinURL(parentSubpath, subpath);\n if (typeof value === \"string\") {\n return [{ subpath: _subPath, fsPath: value, condition }];\n } else {\n return _flattenExports(value, _subPath);\n }\n });\n}\n\nconst ESM_STATIC_IMPORT_RE = /(?<=\\s|^|;|\\})import\\s*([\\s\"']*(?<imports>[\\p{L}\\p{M}\\w\\t\\n\\r $*,/{}@.]+)from\\s*)?[\"']\\s*(?<specifier>(?<=\"\\s*)[^\"]*[^\\s\"](?=\\s*\")|(?<='\\s*)[^']*[^\\s'](?=\\s*'))\\s*[\"'][\\s;]*/gmu;\nconst DYNAMIC_IMPORT_RE = /import\\s*\\((?<expression>(?:[^()]+|\\((?:[^()]+|\\([^()]*\\))*\\))*)\\)/gm;\nconst IMPORT_NAMED_TYPE_RE = /(?<=\\s|^|;|})import\\s*type\\s+([\\s\"']*(?<imports>[\\w\\t\\n\\r $*,/{}]+)from\\s*)?[\"']\\s*(?<specifier>(?<=\"\\s*)[^\"]*[^\\s\"](?=\\s*\")|(?<='\\s*)[^']*[^\\s'](?=\\s*'))\\s*[\"'][\\s;]*/gm;\nconst EXPORT_DECAL_RE = /\\bexport\\s+(?<declaration>(async function\\s*\\*?|function\\s*\\*?|let|const enum|const|enum|var|class))\\s+\\*?(?<name>[\\w$]+)(?<extraNames>.*,\\s*[\\s\\w:[\\]{}]*[\\w$\\]}]+)*/g;\nconst EXPORT_DECAL_TYPE_RE = /\\bexport\\s+(?<declaration>(interface|type|declare (async function|function|let|const enum|const|enum|var|class)))\\s+(?<name>[\\w$]+)/g;\nconst EXPORT_NAMED_RE = /\\bexport\\s*{(?<exports>[^}]+?)[\\s,]*}(\\s*from\\s*[\"']\\s*(?<specifier>(?<=\"\\s*)[^\"]*[^\\s\"](?=\\s*\")|(?<='\\s*)[^']*[^\\s'](?=\\s*'))\\s*[\"'][^\\n;]*)?/g;\nconst EXPORT_NAMED_TYPE_RE = /\\bexport\\s+type\\s*{(?<exports>[^}]+?)[\\s,]*}(\\s*from\\s*[\"']\\s*(?<specifier>(?<=\"\\s*)[^\"]*[^\\s\"](?=\\s*\")|(?<='\\s*)[^']*[^\\s'](?=\\s*'))\\s*[\"'][^\\n;]*)?/g;\nconst EXPORT_NAMED_DESTRUCT = /\\bexport\\s+(let|var|const)\\s+(?:{(?<exports1>[^}]+?)[\\s,]*}|\\[(?<exports2>[^\\]]+?)[\\s,]*])\\s+=/gm;\nconst EXPORT_STAR_RE = /\\bexport\\s*(\\*)(\\s*as\\s+(?<name>[\\w$]+)\\s+)?\\s*(\\s*from\\s*[\"']\\s*(?<specifier>(?<=\"\\s*)[^\"]*[^\\s\"](?=\\s*\")|(?<='\\s*)[^']*[^\\s'](?=\\s*'))\\s*[\"'][^\\n;]*)?/g;\nconst EXPORT_DEFAULT_RE = /\\bexport\\s+default\\s+(async function|function|class|true|false|\\W|\\d)|\\bexport\\s+default\\s+(?<defaultName>.*)/g;\nconst TYPE_RE = /^\\s*?type\\s/;\nfunction findStaticImports(code) {\n return _filterStatement(\n _tryGetLocations(code, \"import\"),\n matchAll(ESM_STATIC_IMPORT_RE, code, { type: \"static\" })\n );\n}\nfunction findDynamicImports(code) {\n return _filterStatement(\n _tryGetLocations(code, \"import\"),\n matchAll(DYNAMIC_IMPORT_RE, code, { type: \"dynamic\" })\n );\n}\nfunction findTypeImports(code) {\n return [\n ...matchAll(IMPORT_NAMED_TYPE_RE, code, { type: \"type\" }),\n ...matchAll(ESM_STATIC_IMPORT_RE, code, { type: \"static\" }).filter(\n (match) => /[^A-Za-z]type\\s/.test(match.imports)\n )\n ];\n}\nfunction parseStaticImport(matched) {\n const cleanedImports = clearImports(matched.imports);\n const namedImports = {};\n const _matches = cleanedImports.match(/{([^}]*)}/)?.[1]?.split(\",\") || [];\n for (const namedImport of _matches) {\n const _match = namedImport.match(/^\\s*(\\S*) as (\\S*)\\s*$/);\n const source = _match?.[1] || namedImport.trim();\n const importName = _match?.[2] || source;\n if (source && !TYPE_RE.test(source)) {\n namedImports[source] = importName;\n }\n }\n const { namespacedImport, defaultImport } = getImportNames(cleanedImports);\n return {\n ...matched,\n defaultImport,\n namespacedImport,\n namedImports\n };\n}\nfunction parseTypeImport(matched) {\n if (matched.type === \"type\") {\n return parseStaticImport(matched);\n }\n const cleanedImports = clearImports(matched.imports);\n const namedImports = {};\n const _matches = cleanedImports.match(/{([^}]*)}/)?.[1]?.split(\",\") || [];\n for (const namedImport of _matches) {\n const _match = /\\s+as\\s+/.test(namedImport) ? namedImport.match(/^\\s*type\\s+(\\S*) as (\\S*)\\s*$/) : namedImport.match(/^\\s*type\\s+(\\S*)\\s*$/);\n const source = _match?.[1] || namedImport.trim();\n const importName = _match?.[2] || source;\n if (source && TYPE_RE.test(namedImport)) {\n namedImports[source] = importName;\n }\n }\n const { namespacedImport, defaultImport } = getImportNames(cleanedImports);\n return {\n ...matched,\n defaultImport,\n namespacedImport,\n namedImports\n };\n}\nfunction findExports(code) {\n const declaredExports = matchAll(EXPORT_DECAL_RE, code, {\n type: \"declaration\"\n });\n for (const declaredExport of declaredExports) {\n const extraNamesStr = declaredExport.extraNames;\n if (extraNamesStr) {\n const extraNames = matchAll(\n /({.*?})|(\\[.*?])|(,\\s*(?<name>\\w+))/g,\n extraNamesStr,\n {}\n ).map((m) => m.name).filter(Boolean);\n declaredExport.names = [declaredExport.name, ...extraNames];\n }\n delete declaredExport.extraNames;\n }\n const namedExports = normalizeNamedExports(\n matchAll(EXPORT_NAMED_RE, code, {\n type: \"named\"\n })\n );\n const destructuredExports = matchAll(\n EXPORT_NAMED_DESTRUCT,\n code,\n { type: \"named\" }\n );\n for (const namedExport of destructuredExports) {\n namedExport.exports = namedExport.exports1 || namedExport.exports2;\n namedExport.names = namedExport.exports.replace(/^\\r?\\n?/, \"\").split(/\\s*,\\s*/g).filter((name) => !TYPE_RE.test(name)).map(\n (name) => name.replace(/^.*?\\s*:\\s*/, \"\").replace(/\\s*=\\s*.*$/, \"\").trim()\n );\n }\n const defaultExport = matchAll(EXPORT_DEFAULT_RE, code, {\n type: \"default\",\n name: \"default\"\n });\n const starExports = matchAll(EXPORT_STAR_RE, code, {\n type: \"star\"\n });\n const exports = normalizeExports([\n ...declaredExports,\n ...namedExports,\n ...destructuredExports,\n ...defaultExport,\n ...starExports\n ]);\n if (exports.length === 0) {\n return [];\n }\n const exportLocations = _tryGetLocations(code, \"export\");\n if (exportLocations && exportLocations.length === 0) {\n return [];\n }\n return (\n // Filter false positive export matches\n _filterStatement(exportLocations, exports).filter((exp, index, exports2) => {\n const nextExport = exports2[index + 1];\n return !nextExport || exp.type !== nextExport.type || !exp.name || exp.name !== nextExport.name;\n })\n );\n}\nfunction findTypeExports(code) {\n const declaredExports = matchAll(\n EXPORT_DECAL_TYPE_RE,\n code,\n { type: \"declaration\" }\n );\n const namedExports = normalizeNamedExports(\n matchAll(EXPORT_NAMED_TYPE_RE, code, {\n type: \"named\"\n })\n );\n const exports = normalizeExports([\n ...declaredExports,\n ...namedExports\n ]);\n if (exports.length === 0) {\n return [];\n }\n const exportLocations = _tryGetLocations(code, \"export\");\n if (exportLocations && exportLocations.length === 0) {\n return [];\n }\n return (\n // Filter false positive export matches\n _filterStatement(exportLocations, exports).filter((exp, index, exports2) => {\n const nextExport = exports2[index + 1];\n return !nextExport || exp.type !== nextExport.type || !exp.name || exp.name !== nextExport.name;\n })\n );\n}\nfunction normalizeExports(exports) {\n for (const exp of exports) {\n if (!exp.name && exp.names && exp.names.length === 1) {\n exp.name = exp.names[0];\n }\n if (exp.name === \"default\" && exp.type !== \"default\") {\n exp._type = exp.type;\n exp.type = \"default\";\n }\n if (!exp.names && exp.name) {\n exp.names = [exp.name];\n }\n if (exp.type === \"declaration\" && exp.declaration) {\n exp.declarationType = exp.declaration.replace(\n /^declare\\s*/,\n \"\"\n );\n }\n }\n return exports;\n}\nfunction normalizeNamedExports(namedExports) {\n for (const namedExport of namedExports) {\n namedExport.names = namedExport.exports.replace(/^\\r?\\n?/, \"\").split(/\\s*,\\s*/g).filter((name) => !TYPE_RE.test(name)).map((name) => name.replace(/^.*?\\sas\\s/, \"\").trim());\n }\n return namedExports;\n}\nfunction findExportNames(code) {\n return findExports(code).flatMap((exp) => exp.names).filter(Boolean);\n}\nasync function resolveModuleExportNames(id, options) {\n const url = await resolvePath(id, options);\n const code = await loadURL(url);\n const exports = findExports(code);\n const exportNames = new Set(\n exports.flatMap((exp) => exp.names).filter(Boolean)\n );\n for (const exp of exports) {\n if (exp.type !== \"star\" || !exp.specifier) {\n continue;\n }\n const subExports = await resolveModuleExportNames(exp.specifier, {\n ...options,\n url\n });\n for (const subExport of subExports) {\n exportNames.add(subExport);\n }\n }\n return [...exportNames];\n}\nfunction _filterStatement(locations, statements) {\n return statements.filter((exp) => {\n return !locations || locations.some((location) => {\n return exp.start <= location.start && exp.end >= location.end;\n });\n });\n}\nfunction _tryGetLocations(code, label) {\n try {\n return _getLocations(code, label);\n } catch {\n }\n}\nfunction _getLocations(code, label) {\n const tokens = tokenizer(code, {\n ecmaVersion: \"latest\",\n sourceType: \"module\",\n allowHashBang: true,\n allowAwaitOutsideFunction: true,\n allowImportExportEverywhere: true\n });\n const locations = [];\n for (const token of tokens) {\n if (token.type.label === label) {\n locations.push({\n start: token.start,\n end: token.end\n });\n }\n }\n return locations;\n}\n\nfunction createCommonJS(url) {\n const __filename = fileURLToPath(url);\n const __dirname = dirname(__filename);\n let _nativeRequire;\n const getNativeRequire = () => {\n if (!_nativeRequire) {\n _nativeRequire = createRequire(url);\n }\n return _nativeRequire;\n };\n function require(id) {\n return getNativeRequire()(id);\n }\n require.resolve = function requireResolve(id, options) {\n return getNativeRequire().resolve(id, options);\n };\n return {\n __filename,\n __dirname,\n require\n };\n}\nfunction interopDefault(sourceModule, opts = {}) {\n if (!isObject(sourceModule) || !(\"default\" in sourceModule)) {\n return sourceModule;\n }\n const defaultValue = sourceModule.default;\n if (defaultValue === undefined || defaultValue === null) {\n return sourceModule;\n }\n const _defaultType = typeof defaultValue;\n if (_defaultType !== \"object\" && !(_defaultType === \"function\" && !opts.preferNamespace)) {\n return opts.preferNamespace ? sourceModule : defaultValue;\n }\n for (const key in sourceModule) {\n try {\n if (!(key in defaultValue)) {\n Object.defineProperty(defaultValue, key, {\n enumerable: key !== \"default\",\n configurable: key !== \"default\",\n get() {\n return sourceModule[key];\n }\n });\n }\n } catch {\n }\n }\n return defaultValue;\n}\n\nconst EVAL_ESM_IMPORT_RE = /(?<=import .* from [\"'])([^\"']+)(?=[\"'])|(?<=export .* from [\"'])([^\"']+)(?=[\"'])|(?<=import\\s*[\"'])([^\"']+)(?=[\"'])|(?<=import\\s*\\([\"'])([^\"']+)(?=[\"']\\))/g;\nasync function loadModule(id, options = {}) {\n const url = await resolve(id, options);\n const code = await loadURL(url);\n return evalModule(code, { ...options, url });\n}\nasync function evalModule(code, options = {}) {\n const transformed = await transformModule(code, options);\n const dataURL = toDataURL(transformed);\n return import(dataURL).catch((error) => {\n error.stack = error.stack.replace(\n new RegExp(dataURL, \"g\"),\n options.url || \"_mlly_eval_\"\n );\n throw error;\n });\n}\nfunction transformModule(code, options = {}) {\n if (options.url && options.url.endsWith(\".json\")) {\n return Promise.resolve(\"export default \" + code);\n }\n if (options.url) {\n code = code.replace(/import\\.meta\\.url/g, `'${options.url}'`);\n }\n return Promise.resolve(code);\n}\nasync function resolveImports(code, options) {\n const imports = [...code.matchAll(EVAL_ESM_IMPORT_RE)].map((m) => m[0]);\n if (imports.length === 0) {\n return code;\n }\n const uniqueImports = [...new Set(imports)];\n const resolved = /* @__PURE__ */ new Map();\n await Promise.all(\n uniqueImports.map(async (id) => {\n let url = await resolve(id, options);\n if (url.endsWith(\".json\")) {\n const code2 = await loadURL(url);\n url = toDataURL(await transformModule(code2, { url }));\n }\n resolved.set(id, url);\n })\n );\n const re = new RegExp(\n uniqueImports.map((index) => `(${index})`).join(\"|\"),\n \"g\"\n );\n return code.replace(re, (id) => resolved.get(id));\n}\n\nconst 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;\nconst CJS_RE = /([\\s;]|^)(module.exports\\b|exports\\.\\w|require\\s*\\(|global\\.\\w)/m;\nconst COMMENT_RE = /\\/\\*.+?\\*\\/|\\/\\/.*(?=[nr])/g;\nconst BUILTIN_EXTENSIONS = /* @__PURE__ */ new Set([\".mjs\", \".cjs\", \".node\", \".wasm\"]);\nfunction hasESMSyntax(code, opts = {}) {\n if (opts.stripComments) {\n code = code.replace(COMMENT_RE, \"\");\n }\n return ESM_RE.test(code);\n}\nfunction hasCJSSyntax(code, opts = {}) {\n if (opts.stripComments) {\n code = code.replace(COMMENT_RE, \"\");\n }\n return CJS_RE.test(code);\n}\nfunction detectSyntax(code, opts = {}) {\n if (opts.stripComments) {\n code = code.replace(COMMENT_RE, \"\");\n }\n const hasESM = hasESMSyntax(code, {});\n const hasCJS = hasCJSSyntax(code, {});\n return {\n hasESM,\n hasCJS,\n isMixed: hasESM && hasCJS\n };\n}\nconst validNodeImportDefaults = {\n allowedProtocols: [\"node\", \"file\", \"data\"]\n};\nasync function isValidNodeImport(id, _options = {}) {\n if (isNodeBuiltin(id)) {\n return true;\n }\n const options = { ...validNodeImportDefaults, ..._options };\n const proto = getProtocol(id);\n if (proto && !options.allowedProtocols?.includes(proto)) {\n return false;\n }\n if (proto === \"data\") {\n return true;\n }\n const resolvedPath = await resolvePath(id, options);\n const extension = extname$1(resolvedPath);\n if (BUILTIN_EXTENSIONS.has(extension)) {\n return true;\n }\n if (extension !== \".js\") {\n return false;\n }\n const package_ = await readPackageJSON(resolvedPath).catch(() => {\n });\n if (package_?.type === \"module\") {\n return true;\n }\n if (/\\.(\\w+-)?esm?(-\\w+)?\\.js$|\\/(esm?)\\//.test(resolvedPath)) {\n return false;\n }\n const code = options.code || await promises.readFile(resolvedPath, \"utf8\").catch(() => {\n }) || \"\";\n return !hasESMSyntax(code, { stripComments: options.stripComments });\n}\n\nexport { DYNAMIC_IMPORT_RE, ESM_STATIC_IMPORT_RE, EXPORT_DECAL_RE, EXPORT_DECAL_TYPE_RE, createCommonJS, createResolve, detectSyntax, evalModule, fileURLToPath, findDynamicImports, findExportNames, findExports, findStaticImports, findTypeExports, findTypeImports, getProtocol, hasCJSSyntax, hasESMSyntax, interopDefault, isNodeBuiltin, isValidNodeImport, loadModule, loadURL, lookupNodeModuleSubpath, normalizeid, parseNodeModulePath, parseStaticImport, parseTypeImport, pathToFileURL, resolve, resolveImports, resolveModuleExportNames, resolvePath, resolvePathSync, resolveSync, sanitizeFilePath, sanitizeURIComponent, toDataURL, transformModule };\n","import assert from \"node:assert\";\nimport { builtinModules } from \"node:module\";\nimport * as path from \"node:path\";\nimport { getCloudflarePreset } from \"@cloudflare/unenv-preset\";\nimport { getNodeCompat } from \"miniflare\";\nimport { resolvePathSync } from \"mlly\";\nimport { defineEnv } from \"unenv\";\nimport * as vite from \"vite\";\nimport type { WorkerConfig } from \"./plugin-config\";\nimport type { ResolvedEnvironment } from \"unenv\";\n\ntype InjectsByModule = Map<\n\tstring,\n\tArray<{ injectedName: string; exportName: string; importName: string }>\n>;\ntype VirtualModulePathToSpecifier = Map<string, string>;\n\nexport class NodeJsCompat {\n\texternals: Set<string>;\n\tentries: Set<string>;\n\t#env: ResolvedEnvironment;\n\t/**\n\t * Map of module identifiers to an array of:\n\t * - `injectedName`: the name injected on `globalThis`\n\t * - `exportName`: the export name from the module\n\t * - `importName`: the imported name\n\t */\n\t#injectsByModule: InjectsByModule;\n\t/**\n\t * Map of virtual module to injectable module ID,\n\t * which then maps via `injectsByModule` to the global code to be injected.\n\t */\n\t#virtualModulePathToSpecifier: VirtualModulePathToSpecifier;\n\n\tconstructor(workerConfig: WorkerConfig) {\n\t\tconst { env } = defineEnv({\n\t\t\tpresets: [\n\t\t\t\tgetCloudflarePreset({\n\t\t\t\t\tcompatibilityDate: workerConfig.compatibility_date,\n\t\t\t\t\tcompatibilityFlags: workerConfig.compatibility_flags,\n\t\t\t\t}),\n\t\t\t],\n\t\t});\n\n\t\tthis.#env = env;\n\t\tthis.externals = new Set(env.external);\n\t\tthis.entries = this.#getEntries();\n\t\tconst { injectsByModule, virtualModulePathToSpecifier } =\n\t\t\tthis.#getInjects();\n\t\tthis.#injectsByModule = injectsByModule;\n\t\tthis.#virtualModulePathToSpecifier = virtualModulePathToSpecifier;\n\t}\n\n\t/**\n\t * Gets a set of module specifiers for all possible Node.js compat polyfill entry-points\n\t */\n\t#getEntries(): Set<string> {\n\t\t// Include all the alias targets\n\t\tconst entries = new Set(Object.values(this.#env.alias));\n\n\t\t// Include all the injection targets\n\t\tfor (const globalInject of Object.values(this.#env.inject)) {\n\t\t\tif (typeof globalInject === \"string\") {\n\t\t\t\tentries.add(globalInject);\n\t\t\t} else {\n\t\t\t\tassert(\n\t\t\t\t\tglobalInject[0] !== undefined,\n\t\t\t\t\t\"Expected first element of globalInject to be defined\"\n\t\t\t\t);\n\t\t\t\tentries.add(globalInject[0]);\n\t\t\t}\n\t\t}\n\n\t\t// Include all the polyfills\n\t\tthis.#env.polyfill.forEach((polyfill) => entries.add(polyfill));\n\n\t\t// Exclude all the externals\n\t\tthis.externals.forEach((external) => entries.delete(external));\n\n\t\treturn entries;\n\t}\n\n\t#getInjects(): {\n\t\tinjectsByModule: InjectsByModule;\n\t\tvirtualModulePathToSpecifier: VirtualModulePathToSpecifier;\n\t} {\n\t\tconst injectsByModule = new Map<\n\t\t\tstring,\n\t\t\t{ injectedName: string; exportName: string; importName: string }[]\n\t\t>();\n\t\tconst virtualModulePathToSpecifier = new Map<string, string>();\n\t\tconst virtualModulePrefix = `\\0_nodejs_global_inject-`;\n\n\t\tfor (const [injectedName, moduleSpecifier] of Object.entries(\n\t\t\tthis.#env.inject\n\t\t)) {\n\t\t\tconst [module, exportName, importName] = Array.isArray(moduleSpecifier)\n\t\t\t\t? [moduleSpecifier[0], moduleSpecifier[1], moduleSpecifier[1]]\n\t\t\t\t: [moduleSpecifier, \"default\", \"defaultExport\"];\n\n\t\t\tif (!injectsByModule.has(module)) {\n\t\t\t\tinjectsByModule.set(module, []);\n\t\t\t\tvirtualModulePathToSpecifier.set(\n\t\t\t\t\t`${virtualModulePrefix}${module.replaceAll(\"/\", \"-\")}`,\n\t\t\t\t\tmodule\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst injects = injectsByModule.get(module);\n\t\t\tassert(injects, `expected injects for \"${module}\" to be defined`);\n\t\t\tinjects.push({ injectedName, exportName, importName });\n\t\t}\n\n\t\treturn { injectsByModule, virtualModulePathToSpecifier };\n\t}\n\n\t/**\n\t * Does the given module ID resolve to a virtual module corresponding to a global injection module?\n\t */\n\tisGlobalVirtualModule(source: string): boolean {\n\t\treturn this.#virtualModulePathToSpecifier.has(source);\n\t}\n\n\t/**\n\t * Get the contents of the virtual module corresponding to a global injection module.\n\t */\n\tgetGlobalVirtualModule(source: string): string | undefined {\n\t\tconst module = this.#virtualModulePathToSpecifier.get(source);\n\n\t\tif (!module) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst injects = this.#injectsByModule.get(module);\n\t\tassert(injects, `expected injects for \"${module}\" to be defined`);\n\t\tconst imports = injects.map(({ exportName, importName }) =>\n\t\t\timportName === exportName ? exportName : `${exportName} as ${importName}`\n\t\t);\n\n\t\treturn [\n\t\t\t`import { ${imports.join(\", \")} } from \"${module}\";`,\n\t\t\t...injects.map(\n\t\t\t\t({ injectedName, importName }) =>\n\t\t\t\t\t`globalThis.${injectedName} = ${importName};`\n\t\t\t),\n\t\t].join(\"\\n\");\n\t}\n\n\t/**\n\t * Gets the necessary global polyfills to inject into the entry-point of the user's code.\n\t */\n\tinjectGlobalCode(): string {\n\t\tconst injectedCode = Array.from(this.#virtualModulePathToSpecifier.keys())\n\t\t\t.map((moduleId) => `import \"${moduleId}\";`)\n\t\t\t.join(\"\\n\");\n\t\t// Some globals are not injected using the approach above but are added to globalThis via side-effect imports of polyfills from the unenv-preset.\n\t\tconst polyfillCode = this.#env.polyfill\n\t\t\t.map((polyfillPath) => `import \"${polyfillPath}\";`)\n\t\t\t.join(\"\\n\");\n\n\t\treturn `${injectedCode}${polyfillCode}`;\n\t}\n\n\t/**\n\t * Resolves the `source` to a Node.js compat alias if possible.\n\t *\n\t * If there is an alias, the return value is an object with:\n\t * - `unresolved`: a bare import path to the polyfill (e.g. `unenv/runtime/node/crypto`)\n\t * - `resolved`: an absolute path to the polyfill (e.g. `/path/to/project/node_modules/unenv/runtime/node/child_process/index.mjs`)\n\t */\n\tresolveNodeJsImport(\n\t\tsource: string\n\t): { unresolved: string; resolved: string } | undefined {\n\t\tconst alias = this.#env.alias[source];\n\n\t\t// These aliases must be resolved from the context of this plugin since the alias will refer to one of the\n\t\t// `@cloudflare/unenv-preset` or the `unenv` packages, which are direct dependencies of this package,\n\t\t// and not the user's project.\n\t\t// We exclude `externals` as these should be externalized rather than optimized.\n\t\tif (alias && !this.externals.has(alias)) {\n\t\t\treturn {\n\t\t\t\tunresolved: alias,\n\t\t\t\tresolved: resolvePathSync(alias, { url: import.meta.url }),\n\t\t\t};\n\t\t}\n\n\t\tif (this.entries.has(source)) {\n\t\t\treturn {\n\t\t\t\tunresolved: source,\n\t\t\t\tresolved: resolvePathSync(source, { url: import.meta.url }),\n\t\t\t};\n\t\t}\n\t}\n}\n\n/**\n * Returns `true` if the given combination of compat dates and flags enables Node.js compatibility.\n */\nexport function hasNodeJsCompat(workerConfig: WorkerConfig) {\n\tconst nodeCompatMode = getNodeCompat(\n\t\tworkerConfig.compatibility_date,\n\t\tworkerConfig.compatibility_flags ?? []\n\t).mode;\n\n\tif (nodeCompatMode === \"v2\") {\n\t\treturn true;\n\t}\n\n\tif (nodeCompatMode === \"v1\") {\n\t\tthrow new Error(\n\t\t\t`Unsupported Node.js compat mode (v1). Only the v2 mode is supported, either change your compat date to \"2024-09-23\" or later, or set the \"nodejs_compat_v2\" compatibility flag`\n\t\t);\n\t}\n\n\treturn false;\n}\n\n/**\n * Returns true if Node.js async local storage (ALS) is enabled (and not full Node.js compatibility mode).\n */\nexport function hasNodeJsAls(workerConfig: WorkerConfig | undefined) {\n\treturn (\n\t\tworkerConfig !== undefined &&\n\t\tgetNodeCompat(\n\t\t\tworkerConfig.compatibility_date,\n\t\t\tworkerConfig.compatibility_flags ?? []\n\t\t).mode === \"als\"\n\t);\n}\n\n/**\n * All the Node.js modules including their `node:...` aliases.\n */\nexport const nodeJsBuiltins = new Set([\n\t...builtinModules,\n\t...builtinModules.map((m) => `node:${m}`),\n]);\n\nexport const NODEJS_MODULES_RE = new RegExp(\n\t`^(node:)?(${builtinModules.join(\"|\")})$`\n);\n\nexport function isNodeAlsModule(path: string) {\n\treturn /^(node:)?async_hooks$/.test(path);\n}\n\nexport function assertHasNodeJsCompat(\n\tnodeJsCompat: NodeJsCompat | undefined\n): asserts nodeJsCompat is NodeJsCompat {\n\tassert(nodeJsCompat, `expected nodeJsCompat to be defined`);\n}\n\nexport class NodeJsCompatWarnings {\n\tprivate sources = new Map<string, Set<string>>();\n\tprivate timer: NodeJS.Timeout | undefined;\n\n\tconstructor(\n\t\tprivate readonly environmentName: string,\n\t\tprivate readonly resolvedViteConfig: vite.ResolvedConfig\n\t) {}\n\n\tregisterImport(source: string, importer = \"<unknown>\") {\n\t\tconst importers = this.sources.get(source) ?? new Set();\n\t\tthis.sources.set(source, importers);\n\t\timporters.add(importer);\n\t\tthis.renderWarningsOnIdle();\n\t}\n\n\tprivate renderWarningsOnIdle() {\n\t\tif (this.timer) {\n\t\t\tclearTimeout(this.timer);\n\t\t}\n\t\tthis.timer = setTimeout(() => {\n\t\t\tthis.renderWarnings();\n\t\t\tthis.timer = undefined;\n\t\t}, 500);\n\t}\n\n\trenderWarnings() {\n\t\tif (this.sources.size > 0) {\n\t\t\tlet message =\n\t\t\t\t`Unexpected Node.js imports for environment \"${this.environmentName}\". ` +\n\t\t\t\t`Do you need to enable the \"nodejs_compat\" compatibility flag? ` +\n\t\t\t\t\"Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details.\\n\";\n\t\t\tthis.sources.forEach((importers, source) => {\n\t\t\t\timporters.forEach((importer) => {\n\t\t\t\t\tmessage += ` - \"${source}\" imported from \"${path.relative(this.resolvedViteConfig.root, importer)}\"\\n`;\n\t\t\t\t});\n\t\t\t});\n\t\t\tthis.resolvedViteConfig.logger.warn(message, {\n\t\t\t\ttimestamp: true,\n\t\t\t});\n\t\t\tthis.sources.clear();\n\t\t}\n\t}\n}\n","import assert from \"node:assert\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { unstable_readConfig } from \"wrangler\";\nimport type { AssetsOnlyConfig, WorkerConfig } from \"./plugin-config\";\nimport type { Optional } from \"./utils\";\nimport type { Unstable_Config as RawWorkerConfig } from \"wrangler\";\n\nexport type WorkerResolvedConfig =\n\t| AssetsOnlyWorkerResolvedConfig\n\t| WorkerWithServerLogicResolvedConfig;\n\nexport interface AssetsOnlyWorkerResolvedConfig\n\textends WorkerBaseResolvedConfig {\n\ttype: \"assets-only\";\n\tconfig: AssetsOnlyConfig;\n}\n\nexport interface WorkerWithServerLogicResolvedConfig\n\textends WorkerBaseResolvedConfig {\n\ttype: \"worker\";\n\tconfig: WorkerConfig;\n}\n\ninterface WorkerBaseResolvedConfig {\n\traw: RawWorkerConfig;\n\tnonApplicable: NonApplicableConfigMap;\n}\n\nexport type SanitizedWorkerConfig = Omit<\n\tRawWorkerConfig,\n\tkeyof NonApplicableConfig\n>;\n\ntype NonApplicableConfigMap = {\n\treplacedByVite: Set<\n\t\tExtract<\n\t\t\tkeyof RawWorkerConfig,\n\t\t\tkeyof NonApplicableWorkerConfigsInfo[\"replacedByVite\"]\n\t\t>\n\t>;\n\tnotRelevant: Set<\n\t\tExtract<\n\t\t\tkeyof RawWorkerConfig,\n\t\t\tNonApplicableWorkerConfigsInfo[\"notRelevant\"][number]\n\t\t>\n\t>;\n};\n\ntype NonApplicableWorkerConfigsInfo = typeof nonApplicableWorkerConfigs;\n\ntype NonApplicableConfig =\n\t| NonApplicableConfigReplacedByVite\n\t| NonApplicableConfigNotRelevant;\n\ntype NonApplicableConfigReplacedByVite =\n\tkeyof NonApplicableWorkerConfigsInfo[\"replacedByVite\"];\n\ntype NonApplicableConfigNotRelevant =\n\tNonApplicableWorkerConfigsInfo[\"notRelevant\"][number];\n\n/**\n * Set of worker config options that are not applicable when using Vite\n */\nexport const nonApplicableWorkerConfigs = {\n\t/**\n\t * Object containing configs that have a vite replacement, the object's field contain details about the config's replacement\n\t */\n\treplacedByVite: {\n\t\talias: {\n\t\t\tviteReplacement: \"resolve.alias\",\n\t\t\tviteDocs: \"https://vite.dev/config/shared-options.html#resolve-alias\",\n\t\t},\n\t\tdefine: {\n\t\t\tviteReplacement: \"define\",\n\t\t\tviteDocs: \"https://vite.dev/config/shared-options.html#define\",\n\t\t},\n\t\tminify: {\n\t\t\tviteReplacement: \"build.minify\",\n\t\t\tviteDocs: \"https://vite.dev/config/build-options.html#build-minify\",\n\t\t},\n\t},\n\t/**\n\t * All the configs that are not relevant when using Vite (meaning that in the context of a Vite\n\t * application they lose their purpose/meaning)\n\t */\n\tnotRelevant: [\n\t\t\"base_dir\",\n\t\t\"build\",\n\t\t\"find_additional_modules\",\n\t\t\"no_bundle\",\n\t\t\"preserve_file_names\",\n\t\t\"rules\",\n\t\t\"site\",\n\t\t\"tsconfig\",\n\t],\n} as const;\n\n/**\n * The non applicable configs that can be and default to `undefined`\n */\nconst nullableNonApplicable = [\n\t\"alias\",\n\t\"base_dir\",\n\t\"find_additional_modules\",\n\t\"minify\",\n\t\"no_bundle\",\n\t\"preserve_file_names\",\n\t\"site\",\n\t\"tsconfig\",\n] as const;\n\nfunction readWorkerConfig(\n\tconfigPath: string,\n\tenv: string | undefined\n): {\n\traw: RawWorkerConfig;\n\tconfig: SanitizedWorkerConfig;\n\tnonApplicable: NonApplicableConfigMap;\n} {\n\tconst nonApplicable: NonApplicableConfigMap = {\n\t\treplacedByVite: new Set(),\n\t\tnotRelevant: new Set(),\n\t};\n\tconst config: Optional<RawWorkerConfig, \"build\" | \"define\"> =\n\t\tunstable_readConfig(\n\t\t\t{ config: configPath, env },\n\t\t\t// Preserve the original `main` value so that Vite can resolve it\n\t\t\t{ preserveOriginalMain: true }\n\t\t);\n\tconst raw = structuredClone(config) as RawWorkerConfig;\n\n\tnullableNonApplicable.forEach((prop) => {\n\t\tif (config[prop] !== undefined) {\n\t\t\tif (isReplacedByVite(prop)) {\n\t\t\t\tnonApplicable.replacedByVite.add(prop);\n\t\t\t}\n\n\t\t\tif (isNotRelevant(prop)) {\n\t\t\t\tnonApplicable.notRelevant.add(prop);\n\t\t\t}\n\t\t}\n\t\tdelete config[prop];\n\t});\n\n\t// config.build is always defined as an object and by default it has the `command` and `cwd` fields\n\t// set to `undefined` but the `watch_dir` field set to `\"./src\"`, so to check if the user set it\n\t// we need to check `command` and `cwd`\n\tif (config.build && (config.build.command || config.build.cwd)) {\n\t\tnonApplicable.notRelevant.add(\"build\");\n\t}\n\tdelete config[\"build\"];\n\n\tif (config.define && Object.keys(config.define).length > 0) {\n\t\tnonApplicable.replacedByVite.add(\"define\");\n\t}\n\tdelete config[\"define\"];\n\n\tif (config.rules.length > 0) {\n\t\tnonApplicable.notRelevant.add(\"rules\");\n\t}\n\n\treturn {\n\t\traw,\n\t\tnonApplicable,\n\t\tconfig: config as SanitizedWorkerConfig,\n\t};\n}\n\nexport function getWarningForWorkersConfigs(\n\tconfigs:\n\t\t| {\n\t\t\t\tentryWorker: AssetsOnlyWorkerResolvedConfig;\n\t\t }\n\t\t| {\n\t\t\t\tentryWorker: WorkerWithServerLogicResolvedConfig;\n\t\t\t\tauxiliaryWorkers: WorkerResolvedConfig[];\n\t\t }\n): string | undefined {\n\tif (\n\t\t!(\"auxiliaryWorkers\" in configs) ||\n\t\tconfigs.auxiliaryWorkers.length === 0\n\t) {\n\t\tconst nonApplicableLines = getWorkerNonApplicableWarnLines(\n\t\t\tconfigs.entryWorker,\n\t\t\t` - `\n\t\t);\n\n\t\tif (nonApplicableLines.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lines = [\n\t\t\t`\\n\\n\\x1b[43mWARNING\\x1b[0m: your worker config${configs.entryWorker.config.configPath ? ` (at \\`${path.relative(\"\", configs.entryWorker.config.configPath)}\\`)` : \"\"} contains` +\n\t\t\t\t\" the following configuration options which are ignored since they are not applicable when using Vite:\",\n\t\t];\n\n\t\tnonApplicableLines.forEach((line) => lines.push(line));\n\n\t\tlines.push(\"\");\n\t\treturn lines.join(\"\\n\");\n\t}\n\n\tconst lines: string[] = [];\n\n\tconst processWorkerConfig = (\n\t\tworkerConfig: WorkerResolvedConfig,\n\t\tisEntryWorker = false\n\t) => {\n\t\tconst nonApplicableLines = getWorkerNonApplicableWarnLines(\n\t\t\tworkerConfig,\n\t\t\t` - `\n\t\t);\n\n\t\tif (nonApplicableLines.length > 0) {\n\t\t\tlines.push(\n\t\t\t\t` - (${isEntryWorker ? \"entry\" : \"auxiliary\"}) worker${workerConfig.config.name ? ` \"${workerConfig.config.name}\"` : \"\"}${workerConfig.config.configPath ? ` (config at \\`${path.relative(\"\", workerConfig.config.configPath)}\\`)` : \"\"}`\n\t\t\t);\n\t\t\tnonApplicableLines.forEach((line) => lines.push(line));\n\t\t}\n\t};\n\n\tprocessWorkerConfig(configs.entryWorker, true);\n\tconfigs.auxiliaryWorkers.forEach((config) => processWorkerConfig(config));\n\n\tif (lines.length === 0) {\n\t\treturn;\n\t}\n\n\treturn [\n\t\t\"\\n\\x1b[43mWARNING\\x1b[0m: your workers configs contain configuration options which are ignored since they are not applicable when using Vite:\",\n\t\t...lines,\n\t\t\"\",\n\t].join(\"\\n\");\n}\n\nfunction getWorkerNonApplicableWarnLines(\n\tworkerConfig: WorkerResolvedConfig,\n\tlinePrefix: string\n): string[] {\n\tconst lines: string[] = [];\n\n\tconst { replacedByVite, notRelevant } = workerConfig.nonApplicable;\n\n\tfor (const config of replacedByVite) {\n\t\tlines.push(\n\t\t\t`${linePrefix}\\`${config}\\` which is replaced by Vite's \\`${nonApplicableWorkerConfigs.replacedByVite[config].viteReplacement}\\` (docs: ${nonApplicableWorkerConfigs.replacedByVite[config].viteDocs})`\n\t\t);\n\t}\n\n\tif (notRelevant.size > 0)\n\t\tlines.push(\n\t\t\t`${linePrefix}${[...notRelevant].map((config) => `\\`${config}\\``).join(\", \")} which ${notRelevant.size > 1 ? \"are\" : \"is\"} not relevant in the context of a Vite project`\n\t\t);\n\n\treturn lines;\n}\n\nfunction isReplacedByVite(\n\tconfigName: string\n): configName is NonApplicableConfigReplacedByVite {\n\treturn configName in nonApplicableWorkerConfigs[\"replacedByVite\"];\n}\n\nfunction isNotRelevant(\n\tconfigName: string\n): configName is NonApplicableConfigNotRelevant {\n\treturn nonApplicableWorkerConfigs.notRelevant.includes(configName as any);\n}\n\nfunction missingFieldErrorMessage(\n\tfield: string,\n\tconfigPath: string,\n\tenv: string | undefined\n) {\n\treturn `No ${field} field provided in '${configPath}'${env ? ` for '${env}' environment` : \"\"}`;\n}\n\nexport function getWorkerConfig(\n\tconfigPath: string,\n\tenv: string | undefined,\n\topts?: {\n\t\tvisitedConfigPaths?: Set<string>;\n\t\tisEntryWorker?: boolean;\n\t}\n): WorkerResolvedConfig {\n\tif (opts?.visitedConfigPaths?.has(configPath)) {\n\t\tthrow new Error(`Duplicate Wrangler config path found: ${configPath}`);\n\t}\n\n\tconst { raw, config, nonApplicable } = readWorkerConfig(configPath, env);\n\n\topts?.visitedConfigPaths?.add(configPath);\n\n\tif (!config.name) {\n\t\tthrow new Error(missingFieldErrorMessage(`'name'`, configPath, env));\n\t}\n\n\tif (!config.topLevelName) {\n\t\tthrow new Error(\n\t\t\tmissingFieldErrorMessage(`top-level 'name'`, configPath, env)\n\t\t);\n\t}\n\n\tif (!config.compatibility_date) {\n\t\tthrow new Error(\n\t\t\tmissingFieldErrorMessage(`'compatibility_date`, configPath, env)\n\t\t);\n\t}\n\n\tconst requiredFields = {\n\t\ttopLevelName: config.topLevelName,\n\t\tname: config.name,\n\t\tcompatibility_date: config.compatibility_date,\n\t};\n\n\tif (opts?.isEntryWorker && !config.main) {\n\t\treturn {\n\t\t\ttype: \"assets-only\",\n\t\t\traw,\n\t\t\tconfig: {\n\t\t\t\t...config,\n\t\t\t\t...requiredFields,\n\t\t\t},\n\t\t\tnonApplicable,\n\t\t};\n\t}\n\n\tif (!config.main) {\n\t\tthrow new Error(missingFieldErrorMessage(`'main'`, configPath, env));\n\t}\n\n\treturn {\n\t\ttype: \"worker\",\n\t\traw,\n\t\tconfig: {\n\t\t\t...config,\n\t\t\t...requiredFields,\n\t\t\tmain: maybeResolveMain(config.main, configPath),\n\t\t},\n\t\tnonApplicable,\n\t};\n}\n\nconst ENTRY_MODULE_EXTENSIONS = [\".js\", \".mjs\", \".ts\", \".mts\", \".jsx\", \".tsx\"];\n\n/**\n * If `main` ends with a valid file extension it is resolved to an absolute path.\n * Else `main` is returned as is so that it can be resolved by Vite.\n * This enables resolving entry modules relative to the Worker config while also supporting virtual modules and package exports.\n */\nfunction maybeResolveMain(main: string, configPath: string): string {\n\tif (!ENTRY_MODULE_EXTENSIONS.some((extension) => main.endsWith(extension))) {\n\t\treturn main;\n\t}\n\n\t// Resolve `main` to an absolute path\n\tconst resolvedMain = path.resolve(path.dirname(configPath), main);\n\n\tif (!fs.existsSync(resolvedMain)) {\n\t\tthrow new Error(\n\t\t\t`The provided Wrangler config main field (${resolvedMain}) doesn't point to an existing file`\n\t\t);\n\t}\n\n\treturn resolvedMain;\n}\n\n/**\n * Returns the path to a wrangler config for a worker after having it validated\n * (throws appropriate errors in case the validation fails)\n *\n * @param root the root of the vite project\n * @param requestedConfigPath the requested config path, if any\n * @param isForAuxiliaryWorker whether the config path is being requested for an auxiliary worker\n * @returns a valid path to a config file\n */\nexport function getValidatedWranglerConfigPath(\n\troot: string,\n\trequestedConfigPath: string | undefined,\n\tisForAuxiliaryWorker = false\n) {\n\tif (requestedConfigPath) {\n\t\tconst configPath = path.resolve(root, requestedConfigPath);\n\n\t\tconst forAuxiliaryWorkerErrorMessage = isForAuxiliaryWorker\n\t\t\t? \" requested for one of your auxiliary workers\"\n\t\t\t: \"\";\n\n\t\tconst errorMessagePrefix = `The provided configPath (${configPath})${forAuxiliaryWorkerErrorMessage}`;\n\n\t\tconst fileExtension = path.extname(configPath).slice(1);\n\n\t\tif (!allowedWranglerConfigExtensions.includes(fileExtension)) {\n\t\t\tconst foundExtensionMessage = !fileExtension\n\t\t\t\t? \"no extension found\"\n\t\t\t\t: `\"${fileExtension}\" found`;\n\t\t\tthrow new Error(\n\t\t\t\t`${errorMessagePrefix} doesn't point to a file with the correct file extension. It should point to a jsonc, json or toml file (${foundExtensionMessage} instead)`\n\t\t\t);\n\t\t}\n\n\t\tconst mainStat = fs.statSync(configPath, { throwIfNoEntry: false });\n\t\tif (!mainStat) {\n\t\t\tthrow new Error(\n\t\t\t\t`${errorMessagePrefix} doesn't point to an existing file`\n\t\t\t);\n\t\t}\n\t\tif (mainStat.isDirectory()) {\n\t\t\tthrow new Error(\n\t\t\t\t`${errorMessagePrefix} points to a directory. It should point to a file.`\n\t\t\t);\n\t\t}\n\n\t\treturn configPath;\n\t}\n\n\t// the plugin's API requires auxiliary workers to always specify their config paths\n\tassert(\n\t\tisForAuxiliaryWorker === false,\n\t\t\"Unexpected Error: trying to find the wrangler config for an auxiliary worker\"\n\t);\n\n\tconst configPath = findWranglerConfig(root);\n\n\tif (!configPath) {\n\t\tthrow new Error(\n\t\t\t`No config file found in the ${root} directory. Please add a wrangler.(jsonc|json|toml) file.`\n\t\t);\n\t}\n\n\treturn configPath;\n}\n\n// We can't rely on `readConfig` from Wrangler to find the config as it may be relative to a different root that's set by the user.\nfunction findWranglerConfig(root: string): string | undefined {\n\tfor (const extension of allowedWranglerConfigExtensions) {\n\t\tconst configPath = path.join(root, `wrangler.${extension}`);\n\n\t\tif (fs.existsSync(configPath)) {\n\t\t\treturn configPath;\n\t\t}\n\t}\n}\n\nconst allowedWranglerConfigExtensions = [\"jsonc\", \"json\", \"toml\"];\n","import assert from \"node:assert\";\nimport * as path from \"node:path\";\nimport { parseStaticRouting } from \"@cloudflare/workers-shared/utils/configuration/parseStaticRouting\";\nimport * as vite from \"vite\";\nimport { getWorkerConfigs } from \"./deploy-config\";\nimport { hasNodeJsCompat, NodeJsCompat } from \"./nodejs-compat\";\nimport {\n\tgetValidatedWranglerConfigPath,\n\tgetWorkerConfig,\n} from \"./workers-configs\";\nimport type { Defined } from \"./utils\";\nimport type {\n\tAssetsOnlyWorkerResolvedConfig,\n\tSanitizedWorkerConfig,\n\tWorkerResolvedConfig,\n\tWorkerWithServerLogicResolvedConfig,\n} from \"./workers-configs\";\nimport type { StaticRouting } from \"@cloudflare/workers-shared/utils/types\";\nimport type { Unstable_Config } from \"wrangler\";\n\nexport type PersistState = boolean | { path: string };\n\ninterface BaseWorkerConfig {\n\tviteEnvironment?: { name?: string };\n}\n\ninterface EntryWorkerConfig extends BaseWorkerConfig {\n\tconfigPath?: string;\n}\n\ninterface AuxiliaryWorkerConfig extends BaseWorkerConfig {\n\tconfigPath: string;\n}\n\ninterface Experimental {\n\t/** Experimental support for handling the _headers and _redirects files during Vite dev mode. */\n\theadersAndRedirectsDevModeSupport?: boolean;\n}\n\nexport interface PluginConfig extends EntryWorkerConfig {\n\tauxiliaryWorkers?: AuxiliaryWorkerConfig[];\n\tpersistState?: PersistState;\n\tinspectorPort?: number | false;\n\tremoteBindings?: boolean;\n\texperimental?: Experimental;\n}\n\nexport interface AssetsOnlyConfig extends SanitizedWorkerConfig {\n\ttopLevelName: Defined<SanitizedWorkerConfig[\"topLevelName\"]>;\n\tname: Defined<SanitizedWorkerConfig[\"name\"]>;\n\tcompatibility_date: Defined<SanitizedWorkerConfig[\"compatibility_date\"]>;\n}\n\nexport interface WorkerConfig extends AssetsOnlyConfig {\n\tmain: Defined<SanitizedWorkerConfig[\"main\"]>;\n}\n\nexport interface Worker {\n\tconfig: WorkerConfig;\n\tnodeJsCompat: NodeJsCompat | undefined;\n}\n\ninterface BaseResolvedConfig {\n\tpersistState: PersistState;\n\tinspectorPort: number | false | undefined;\n\texperimental: Experimental;\n\tremoteBindings: boolean;\n}\n\nexport interface AssetsOnlyResolvedConfig extends BaseResolvedConfig {\n\ttype: \"assets-only\";\n\tconfigPaths: Set<string>;\n\tcloudflareEnv: string | undefined;\n\tconfig: AssetsOnlyConfig;\n\trawConfigs: {\n\t\tentryWorker: AssetsOnlyWorkerResolvedConfig;\n\t};\n}\n\nexport interface WorkersResolvedConfig extends BaseResolvedConfig {\n\ttype: \"workers\";\n\tconfigPaths: Set<string>;\n\tcloudflareEnv: string | undefined;\n\tenvironmentNameToWorkerMap: Map<string, Worker>;\n\tentryWorkerEnvironmentName: string;\n\tstaticRouting: StaticRouting | undefined;\n\trawConfigs: {\n\t\tentryWorker: WorkerWithServerLogicResolvedConfig;\n\t\tauxiliaryWorkers: WorkerResolvedConfig[];\n\t};\n}\n\nexport interface PreviewResolvedConfig extends BaseResolvedConfig {\n\ttype: \"preview\";\n\tworkers: Unstable_Config[];\n}\n\nexport type ResolvedPluginConfig =\n\t| AssetsOnlyResolvedConfig\n\t| WorkersResolvedConfig\n\t| PreviewResolvedConfig;\n\nexport function resolvePluginConfig(\n\tpluginConfig: PluginConfig,\n\tuserConfig: vite.UserConfig,\n\tviteEnv: vite.ConfigEnv\n): ResolvedPluginConfig {\n\tconst shared = {\n\t\tpersistState: pluginConfig.persistState ?? true,\n\t\tinspectorPort: pluginConfig.inspectorPort,\n\t\texperimental: pluginConfig.experimental ?? {},\n\t};\n\tconst root = userConfig.root ? path.resolve(userConfig.root) : process.cwd();\n\tconst prefixedEnv = vite.loadEnv(viteEnv.mode, root, [\n\t\t\"CLOUDFLARE_\",\n\t\t// TODO: Remove deprecated WRANGLER prefix support in next major version\n\t\t\"WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_\",\n\t]);\n\n\t// Merge the loaded env variables into process.env so that they are available to\n\t// wrangler when it loads the worker configuration files.\n\tObject.assign(process.env, prefixedEnv);\n\n\tif (viteEnv.isPreview) {\n\t\treturn {\n\t\t\t...shared,\n\t\t\tremoteBindings: pluginConfig.remoteBindings ?? true,\n\t\t\ttype: \"preview\",\n\t\t\tworkers: getWorkerConfigs(root),\n\t\t};\n\t}\n\n\tconst configPaths = new Set<string>();\n\tconst cloudflareEnv = prefixedEnv.CLOUDFLARE_ENV;\n\tconst entryWorkerConfigPath = getValidatedWranglerConfigPath(\n\t\troot,\n\t\tpluginConfig.configPath\n\t);\n\n\tconst entryWorkerResolvedConfig = getWorkerConfig(\n\t\tentryWorkerConfigPath,\n\t\tcloudflareEnv,\n\t\t{\n\t\t\tvisitedConfigPaths: configPaths,\n\t\t\tisEntryWorker: true,\n\t\t}\n\t);\n\n\tif (entryWorkerResolvedConfig.type === \"assets-only\") {\n\t\treturn {\n\t\t\t...shared,\n\t\t\ttype: \"assets-only\",\n\t\t\tcloudflareEnv,\n\t\t\tconfig: entryWorkerResolvedConfig.config,\n\t\t\tconfigPaths,\n\t\t\tremoteBindings: pluginConfig.remoteBindings ?? true,\n\t\t\trawConfigs: {\n\t\t\t\tentryWorker: entryWorkerResolvedConfig,\n\t\t\t},\n\t\t};\n\t}\n\n\tconst entryWorkerConfig = entryWorkerResolvedConfig.config;\n\n\tconst entryWorkerEnvironmentName =\n\t\tpluginConfig.viteEnvironment?.name ??\n\t\tworkerNameToEnvironmentName(entryWorkerConfig.topLevelName);\n\n\tlet staticRouting: StaticRouting | undefined;\n\n\tif (Array.isArray(entryWorkerConfig.assets?.run_worker_first)) {\n\t\tstaticRouting = parseStaticRouting(\n\t\t\tentryWorkerConfig.assets.run_worker_first\n\t\t);\n\t}\n\n\tconst environmentNameToWorkerMap: Map<string, Worker> = new Map([\n\t\t[entryWorkerEnvironmentName, resolveWorker(entryWorkerConfig)],\n\t]);\n\n\tconst auxiliaryWorkersResolvedConfigs: WorkerResolvedConfig[] = [];\n\n\tfor (const auxiliaryWorker of pluginConfig.auxiliaryWorkers ?? []) {\n\t\tconst workerConfigPath = getValidatedWranglerConfigPath(\n\t\t\troot,\n\t\t\tauxiliaryWorker.configPath,\n\t\t\ttrue\n\t\t);\n\t\tconst workerResolvedConfig = getWorkerConfig(\n\t\t\tworkerConfigPath,\n\t\t\tcloudflareEnv,\n\t\t\t{\n\t\t\t\tvisitedConfigPaths: configPaths,\n\t\t\t}\n\t\t);\n\n\t\tauxiliaryWorkersResolvedConfigs.push(workerResolvedConfig);\n\n\t\tassert(\n\t\t\tworkerResolvedConfig.type === \"worker\",\n\t\t\t\"Unexpected error: received AssetsOnlyResult with auxiliary workers.\"\n\t\t);\n\n\t\tconst workerConfig = workerResolvedConfig.config;\n\n\t\tconst workerEnvironmentName =\n\t\t\tauxiliaryWorker.viteEnvironment?.name ??\n\t\t\tworkerNameToEnvironmentName(workerConfig.topLevelName);\n\n\t\tif (environmentNameToWorkerMap.has(workerEnvironmentName)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Duplicate Vite environment name found: ${workerEnvironmentName}`\n\t\t\t);\n\t\t}\n\n\t\tenvironmentNameToWorkerMap.set(\n\t\t\tworkerEnvironmentName,\n\t\t\tresolveWorker(workerConfig)\n\t\t);\n\t}\n\n\treturn {\n\t\t...shared,\n\t\ttype: \"workers\",\n\t\tcloudflareEnv,\n\t\tconfigPaths,\n\t\tenvironmentNameToWorkerMap,\n\t\tentryWorkerEnvironmentName,\n\t\tstaticRouting,\n\t\tremoteBindings: pluginConfig.remoteBindings ?? true,\n\t\trawConfigs: {\n\t\t\tentryWorker: entryWorkerResolvedConfig,\n\t\t\tauxiliaryWorkers: auxiliaryWorkersResolvedConfigs,\n\t\t},\n\t};\n}\n\n// Worker names can only contain alphanumeric characters and '-' whereas environment names can only contain alphanumeric characters and '$', '_'\nfunction workerNameToEnvironmentName(workerName: string) {\n\treturn workerName.replaceAll(\"-\", \"_\");\n}\n\nfunction resolveWorker(workerConfig: WorkerConfig) {\n\treturn {\n\t\tconfig: workerConfig,\n\t\tnodeJsCompat: hasNodeJsCompat(workerConfig)\n\t\t\t? new NodeJsCompat(workerConfig)\n\t\t\t: undefined,\n\t};\n}\n","const comma = ','.charCodeAt(0);\nconst semicolon = ';'.charCodeAt(0);\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n return relative + value;\n}\nfunction encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0)\n clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max)\n return false;\n return reader.peek() !== comma;\n}\n\nconst bufLength = 1024 * 16;\n// Provide a fallback for older environments.\nconst td = typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf) {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\nclass StringWriter {\n constructor() {\n this.pos = 0;\n this.out = '';\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\nclass StringReader {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n\nconst EMPTY = [];\nfunction decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]);\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n}\nfunction encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length;) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n}\nfunction _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0)\n writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6)\n encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length;) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n}\nfunction decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0);\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n }\n else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0);\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n }\n else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n}\nfunction encodeGeneratedRanges(ranges) {\n if (ranges.length === 0)\n return '';\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length;) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n}\nfunction _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n }\n else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n }\n else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1)\n encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length;) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n }\n else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n}\nfunction catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(';');\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol)\n sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n }\n else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n }\n else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted)\n sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0)\n writer.write(semicolon);\n if (line.length === 0)\n continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0)\n writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1)\n continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4)\n continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n}\n\nexport { decode, decodeGeneratedRanges, decodeOriginalScopes, encode, encodeGeneratedRanges, encodeOriginalScopes };\n//# sourceMappingURL=sourcemap-codec.mjs.map\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nclass BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n\nclass Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\t{\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n\nfunction getBtoa() {\n\tif (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {\n\t\treturn (str) => globalThis.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nclass SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t\tif (typeof properties.debugId !== 'undefined') {\n\t\t\tthis.debugId = properties.debugId;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n\nfunction guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n\nfunction getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n\nconst toString = Object.prototype.toString;\n\nfunction isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n\nfunction getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n\nconst wordRegex = /\\w/;\n\nclass Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst contentLengthMinusOne = content.length - 1;\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\t// Loop through each line in the content and add a segment, but stop if the last line is empty,\n\t\t\t// else code afterwards would fill one line too many\n\t\t\twhile (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t\tcharInHiresBoundary = false;\n\t\t\t} else {\n\t\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nclass MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t\toffset: { writable: true, value: options.offset || 0 },\n\t\t});\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t);\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t);\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\t\tindex = index + this.offset;\n\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t);\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\t\treturn this;\n\t}\n\n\treset(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.reset();\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length - this.offset) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null) {\n\t\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null) {\n\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tconst previous = original.slice(index, index + stringLength);\n\t\t\tif (previous !== replacement) this.overwrite(index, index + stringLength, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nclass Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n\nexport { Bundle, SourceMap, MagicString as default };\n//# sourceMappingURL=magic-string.es.mjs.map\n","import assert from \"node:assert\";\nimport * as fsp from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport MagicString from \"magic-string\";\nimport * as vite from \"vite\";\nimport { cleanUrl, createPlugin } from \"../utils\";\n\n/**\n * Plugin to support additional module types (`CompiledWasm`, `Data` and `Text`)\n */\nexport const additionalModulesPlugin = createPlugin(\n\t\"additional-modules\",\n\t(ctx) => {\n\t\tconst additionalModulePaths = new Set<string>();\n\n\t\treturn {\n\t\t\t// We set `enforce: \"pre\"` so that this plugin runs before the Vite core plugins.\n\t\t\t// Otherwise the `vite:wasm-fallback` plugin prevents the `.wasm` extension being used for module imports.\n\t\t\tenforce: \"pre\",\n\t\t\tapplyToEnvironment(environment) {\n\t\t\t\treturn ctx.getWorkerConfig(environment.name) !== undefined;\n\t\t\t},\n\t\t\tasync resolveId(source, importer, options) {\n\t\t\t\tconst additionalModuleType = matchAdditionalModule(source);\n\n\t\t\t\tif (!additionalModuleType) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// We clean the module URL here as the default rules include `.wasm?module`.\n\t\t\t\t// We therefore need the match to include the query param but remove it before resolving the ID.\n\t\t\t\tconst resolved = await this.resolve(\n\t\t\t\t\tcleanUrl(source),\n\t\t\t\t\timporter,\n\t\t\t\t\toptions\n\t\t\t\t);\n\n\t\t\t\tif (!resolved) {\n\t\t\t\t\tthrow new Error(`Import \"${source}\" not found. Does the file exist?`);\n\t\t\t\t}\n\n\t\t\t\t// Add the path to the additional module so that we can identify the module in the `hotUpdate` hook\n\t\t\t\tadditionalModulePaths.add(resolved.id);\n\n\t\t\t\treturn {\n\t\t\t\t\texternal: true,\n\t\t\t\t\tid: createModuleReference(additionalModuleType, resolved.id),\n\t\t\t\t};\n\t\t\t},\n\t\t\thotUpdate(options) {\n\t\t\t\tif (additionalModulePaths.has(options.file)) {\n\t\t\t\t\toptions.server.restart();\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync renderChunk(code, chunk) {\n\t\t\t\tconst matches = code.matchAll(additionalModuleGlobalRE);\n\t\t\t\tlet magicString: MagicString | undefined;\n\n\t\t\t\tfor (const match of matches) {\n\t\t\t\t\tmagicString ??= new MagicString(code);\n\t\t\t\t\tconst [full, _, modulePath] = match;\n\n\t\t\t\t\tassert(\n\t\t\t\t\t\tmodulePath,\n\t\t\t\t\t\t`Unexpected error: module path not found in reference ${full}.`\n\t\t\t\t\t);\n\n\t\t\t\t\tlet source: Buffer;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsource = await fsp.readFile(modulePath);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`Import \"${modulePath}\" not found. Does the file exist?`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst referenceId = this.emitFile({\n\t\t\t\t\t\ttype: \"asset\",\n\t\t\t\t\t\tname: path.basename(modulePath),\n\t\t\t\t\t\toriginalFileName: modulePath,\n\t\t\t\t\t\tsource,\n\t\t\t\t\t});\n\n\t\t\t\t\tconst emittedFileName = this.getFileName(referenceId);\n\t\t\t\t\tconst relativePath = vite.normalizePath(\n\t\t\t\t\t\tpath.relative(path.dirname(chunk.fileName), emittedFileName)\n\t\t\t\t\t);\n\t\t\t\t\tconst importPath = relativePath.startsWith(\".\")\n\t\t\t\t\t\t? relativePath\n\t\t\t\t\t\t: `./${relativePath}`;\n\n\t\t\t\t\tmagicString.update(\n\t\t\t\t\t\tmatch.index,\n\t\t\t\t\t\tmatch.index + full.length,\n\t\t\t\t\t\timportPath\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (magicString) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcode: magicString.toString(),\n\t\t\t\t\t\tmap: this.environment.config.build.sourcemap\n\t\t\t\t\t\t\t? magicString.generateMap({ hires: \"boundary\" })\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t}\n);\n\nconst ADDITIONAL_MODULE_TYPES = [\"CompiledWasm\", \"Data\", \"Text\"] as const;\ntype AdditionalModuleType = (typeof ADDITIONAL_MODULE_TYPES)[number];\n\nconst ADDITIONAL_MODULE_PATTERN = `__CLOUDFLARE_MODULE__(${ADDITIONAL_MODULE_TYPES.join(\"|\")})__(.*?)__CLOUDFLARE_MODULE__`;\nexport const additionalModuleRE = new RegExp(ADDITIONAL_MODULE_PATTERN);\nconst additionalModuleGlobalRE = new RegExp(ADDITIONAL_MODULE_PATTERN, \"g\");\n\ntype ModuleRules = Array<{\n\ttype: AdditionalModuleType;\n\textensions: string[];\n}>;\n\nconst moduleRules: ModuleRules = [\n\t{ type: \"CompiledWasm\", extensions: [\".wasm\", \".wasm?module\"] },\n\t{ type: \"Data\", extensions: [\".bin\"] },\n\t{ type: \"Text\", extensions: [\".txt\", \".html\"] },\n];\n\nfunction matchAdditionalModule(source: string) {\n\tfor (const rule of moduleRules) {\n\t\tfor (const extension of rule.extensions) {\n\t\t\tif (source.endsWith(extension)) {\n\t\t\t\treturn rule.type;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n\nfunction createModuleReference(type: AdditionalModuleType, id: string) {\n\treturn `__CLOUDFLARE_MODULE__${type}__${id}__CLOUDFLARE_MODULE__`;\n}\n","import { relative } from \"node:path\";\nimport {\n\tHEADERS_VERSION,\n\tPLACEHOLDER_REGEX,\n\tREDIRECTS_VERSION,\n\tSPLAT_REGEX,\n} from \"./constants\";\nimport type {\n\tAssetConfig,\n\tMetadataHeaders,\n\tMetadataRedirects,\n\tMetadataStaticRedirects,\n} from \"../types\";\nimport type { Logger, ParsedHeaders, ParsedRedirects } from \"./types\";\n\nexport function constructRedirects({\n\tredirects,\n\tredirectsFile,\n\tlogger,\n}: {\n\tredirects?: ParsedRedirects;\n\tredirectsFile?: string;\n\tlogger: Logger;\n}): Pick<AssetConfig, \"redirects\"> {\n\tif (!redirects) {\n\t\treturn {};\n\t}\n\n\tconst num_valid = redirects.rules.length;\n\tconst num_invalid = redirects.invalid.length;\n\n\t// exhaustive check, since we could not have parsed `redirects` out of\n\t// a non-existing redirects file\n\tconst redirectsRelativePath = redirectsFile\n\t\t? relative(process.cwd(), redirectsFile)\n\t\t: \"\";\n\n\tlogger.log(\n\t\t`✨ Parsed ${num_valid} valid redirect rule${num_valid === 1 ? \"\" : \"s\"}.`\n\t);\n\n\tif (num_invalid > 0) {\n\t\tlet invalidRedirectRulesList = ``;\n\n\t\tfor (const { line, lineNumber, message } of redirects.invalid) {\n\t\t\tinvalidRedirectRulesList += `▶︎ ${message}\\n`;\n\n\t\t\tif (line) {\n\t\t\t\tinvalidRedirectRulesList += ` at ${redirectsRelativePath}${lineNumber ? `:${lineNumber}` : \"\"} | ${line}\\n\\n`;\n\t\t\t}\n\t\t}\n\n\t\tlogger.warn(\n\t\t\t`Found ${num_invalid} invalid redirect rule${num_invalid === 1 ? \"\" : \"s\"}:\\n` +\n\t\t\t\t`${invalidRedirectRulesList}`\n\t\t);\n\t}\n\n\t/* Better to return no Redirects object at all than one with empty rules */\n\tif (num_valid === 0) {\n\t\treturn {};\n\t}\n\n\tconst staticRedirects: MetadataStaticRedirects = {};\n\tconst dynamicRedirects: MetadataRedirects = {};\n\tlet canCreateStaticRule = true;\n\tfor (const rule of redirects.rules) {\n\t\tif (!rule.from.match(SPLAT_REGEX) && !rule.from.match(PLACEHOLDER_REGEX)) {\n\t\t\tif (canCreateStaticRule) {\n\t\t\t\tstaticRedirects[rule.from] = {\n\t\t\t\t\tstatus: rule.status,\n\t\t\t\t\tto: rule.to,\n\t\t\t\t\tlineNumber: rule.lineNumber,\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tlogger.info(\n\t\t\t\t\t`The redirect rule ${rule.from} → ${rule.status} ${rule.to} could be made more performant by bringing it above any lines with splats or placeholders.`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tdynamicRedirects[rule.from] = { status: rule.status, to: rule.to };\n\t\tcanCreateStaticRule = false;\n\t}\n\n\treturn {\n\t\tredirects: {\n\t\t\tversion: REDIRECTS_VERSION,\n\t\t\tstaticRules: staticRedirects,\n\t\t\trules: dynamicRedirects,\n\t\t},\n\t};\n}\n\nexport function constructHeaders({\n\theaders,\n\theadersFile,\n\tlogger,\n}: {\n\theaders?: ParsedHeaders;\n\theadersFile?: string;\n\tlogger: Logger;\n}): Pick<AssetConfig, \"headers\"> {\n\tif (!headers) {\n\t\treturn {};\n\t}\n\n\tconst num_valid = headers.rules.length;\n\tconst num_invalid = headers.invalid.length;\n\n\t// exhaustive check, since we could not have parsed `headers` out of\n\t// a non-existing headers file\n\tconst headersRelativePath = headersFile\n\t\t? relative(process.cwd(), headersFile)\n\t\t: \"\";\n\n\tlogger.log(\n\t\t`✨ Parsed ${num_valid} valid header rule${num_valid === 1 ? \"\" : \"s\"}.`\n\t);\n\n\tif (num_invalid > 0) {\n\t\tlet invalidHeaderRulesList = ``;\n\n\t\tfor (const { line, lineNumber, message } of headers.invalid) {\n\t\t\tinvalidHeaderRulesList += `▶︎ ${message}\\n`;\n\n\t\t\tif (line) {\n\t\t\t\tinvalidHeaderRulesList += ` at ${headersRelativePath}${lineNumber ? `:${lineNumber}` : \"\"} | ${line}\\n\\n`;\n\t\t\t}\n\t\t}\n\n\t\tlogger.warn(\n\t\t\t`Found ${num_invalid} invalid header rule${num_invalid === 1 ? \"\" : \"s\"}:\\n` +\n\t\t\t\t`${invalidHeaderRulesList}`\n\t\t);\n\t}\n\n\t/* Better to return no Headers object at all than one with empty rules */\n\tif (num_valid === 0) {\n\t\treturn {};\n\t}\n\n\tconst rules: MetadataHeaders = {};\n\tfor (const rule of headers.rules) {\n\t\tconst configuredRule: MetadataHeaders[string] = {};\n\n\t\tif (Object.keys(rule.headers).length) {\n\t\t\tconfiguredRule.set = rule.headers;\n\t\t}\n\t\tif (rule.unsetHeaders.length) {\n\t\t\tconfiguredRule.unset = rule.unsetHeaders;\n\t\t}\n\n\t\trules[rule.path] = configuredRule;\n\t}\n\n\treturn {\n\t\theaders: {\n\t\t\tversion: HEADERS_VERSION,\n\t\t\trules,\n\t\t},\n\t};\n}\n","export const extractPathname = (\n\tpath = \"/\",\n\tincludeSearch: boolean,\n\tincludeHash: boolean\n): string => {\n\tif (!path.startsWith(\"/\")) {\n\t\tpath = `/${path}`;\n\t}\n\tconst url = new URL(`//${path}`, \"relative://\");\n\treturn `${url.pathname}${includeSearch ? url.search : \"\"}${\n\t\tincludeHash ? url.hash : \"\"\n\t}`;\n};\n\nconst URL_REGEX = /^https:\\/\\/+(?<host>[^/]+)\\/?(?<path>.*)/;\nconst HOST_WITH_PORT_REGEX = /.*:\\d+$/;\nconst PATH_REGEX = /^\\//;\n\nexport const validateUrl = (\n\ttoken: string,\n\tonlyRelative = false,\n\tdisallowPorts = false,\n\tincludeSearch = false,\n\tincludeHash = false\n): [undefined, string] | [string, undefined] => {\n\tconst host = URL_REGEX.exec(token);\n\tif (host && host.groups && host.groups.host) {\n\t\tif (onlyRelative) {\n\t\t\treturn [\n\t\t\t\tundefined,\n\t\t\t\t`Only relative URLs are allowed. Skipping absolute URL ${token}.`,\n\t\t\t];\n\t\t}\n\n\t\tif (disallowPorts && host.groups.host.match(HOST_WITH_PORT_REGEX)) {\n\t\t\treturn [\n\t\t\t\tundefined,\n\t\t\t\t`Specifying ports is not supported. Skipping absolute URL ${token}.`,\n\t\t\t];\n\t\t}\n\n\t\treturn [\n\t\t\t`https://${host.groups.host}${extractPathname(\n\t\t\t\thost.groups.path,\n\t\t\t\tincludeSearch,\n\t\t\t\tincludeHash\n\t\t\t)}`,\n\t\t\tundefined,\n\t\t];\n\t} else {\n\t\tif (!token.startsWith(\"/\") && onlyRelative) {\n\t\t\ttoken = `/${token}`;\n\t\t}\n\n\t\tconst path = PATH_REGEX.exec(token);\n\t\tif (path) {\n\t\t\ttry {\n\t\t\t\treturn [extractPathname(token, includeSearch, includeHash), undefined];\n\t\t\t} catch {\n\t\t\t\treturn [undefined, `Error parsing URL segment ${token}. Skipping.`];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn [\n\t\tundefined,\n\t\tonlyRelative\n\t\t\t? \"URLs should begin with a forward-slash.\"\n\t\t\t: 'URLs should either be relative (e.g. begin with a forward-slash), or use HTTPS (e.g. begin with \"https://\").',\n\t];\n};\n\nexport function urlHasHost(token: string): boolean {\n\tconst host = URL_REGEX.exec(token);\n\treturn Boolean(host && host.groups && host.groups.host);\n}\n","import {\n\tHEADER_SEPARATOR,\n\tMAX_HEADER_RULES,\n\tMAX_LINE_LENGTH,\n\tUNSET_OPERATOR,\n} from \"./constants\";\nimport { validateUrl } from \"./validateURL\";\nimport type { HeadersRule, InvalidHeadersRule, ParsedHeaders } from \"./types\";\n\n// Not strictly necessary to check for all protocols-like beginnings, since _technically_ that could be a legit header (e.g. name=http, value=://I'm a value).\n// But we're checking here since some people might be caught out and it'll help 99.9% of people who get it wrong.\n// We do the proper validation in `validateUrl` anyway :)\nconst LINE_IS_PROBABLY_A_PATH = new RegExp(/^([^\\s]+:\\/\\/|^\\/)/);\n\nexport function parseHeaders(\n\tinput: string,\n\t{\n\t\tmaxRules = MAX_HEADER_RULES,\n\t\tmaxLineLength = MAX_LINE_LENGTH,\n\t}: { maxRules?: number; maxLineLength?: number } = {}\n): ParsedHeaders {\n\tconst lines = input.split(\"\\n\");\n\tconst rules: HeadersRule[] = [];\n\tconst invalid: InvalidHeadersRule[] = [];\n\n\tlet rule: (HeadersRule & { line: string }) | undefined = undefined;\n\n\tfor (let i = 0; i < lines.length; i++) {\n\t\tconst line = (lines[i] || \"\").trim();\n\t\tif (line.length === 0 || line.startsWith(\"#\")) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (line.length > maxLineLength) {\n\t\t\tinvalid.push({\n\t\t\t\tmessage: `Ignoring line ${\n\t\t\t\t\ti + 1\n\t\t\t\t} as it exceeds the maximum allowed length of ${maxLineLength}.`,\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (LINE_IS_PROBABLY_A_PATH.test(line)) {\n\t\t\tif (rules.length >= maxRules) {\n\t\t\t\tinvalid.push({\n\t\t\t\t\tmessage: `Maximum number of rules supported is ${maxRules}. Skipping remaining ${\n\t\t\t\t\t\tlines.length - i\n\t\t\t\t\t} lines of file.`,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (rule) {\n\t\t\t\tif (isValidRule(rule)) {\n\t\t\t\t\trules.push({\n\t\t\t\t\t\tpath: rule.path,\n\t\t\t\t\t\theaders: rule.headers,\n\t\t\t\t\t\tunsetHeaders: rule.unsetHeaders,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tinvalid.push({\n\t\t\t\t\t\tline: rule.line,\n\t\t\t\t\t\tlineNumber: i + 1,\n\t\t\t\t\t\tmessage: \"No headers specified\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst [path, pathError] = validateUrl(line, false, true);\n\t\t\tif (pathError) {\n\t\t\t\tinvalid.push({\n\t\t\t\t\tline,\n\t\t\t\t\tlineNumber: i + 1,\n\t\t\t\t\tmessage: pathError,\n\t\t\t\t});\n\t\t\t\trule = undefined;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trule = {\n\t\t\t\tpath: path as string,\n\t\t\t\tline,\n\t\t\t\theaders: {},\n\t\t\t\tunsetHeaders: [],\n\t\t\t};\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!line.includes(HEADER_SEPARATOR)) {\n\t\t\tif (!rule) {\n\t\t\t\tinvalid.push({\n\t\t\t\t\tline,\n\t\t\t\t\tlineNumber: i + 1,\n\t\t\t\t\tmessage: \"Expected a path beginning with at least one forward-slash\",\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (line.trim().startsWith(UNSET_OPERATOR)) {\n\t\t\t\t\trule.unsetHeaders.push(line.trim().replace(UNSET_OPERATOR, \"\"));\n\t\t\t\t} else {\n\t\t\t\t\tinvalid.push({\n\t\t\t\t\t\tline,\n\t\t\t\t\t\tlineNumber: i + 1,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"Expected a colon-separated header pair (e.g. name: value)\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst [rawName, ...rawValue] = line.split(HEADER_SEPARATOR);\n\t\tconst name = (rawName || \"\").trim().toLowerCase();\n\n\t\tif (name.includes(\" \")) {\n\t\t\tinvalid.push({\n\t\t\t\tline,\n\t\t\t\tlineNumber: i + 1,\n\t\t\t\tmessage: \"Header name cannot include spaces\",\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst value = rawValue.join(HEADER_SEPARATOR).trim();\n\n\t\tif (name === \"\") {\n\t\t\tinvalid.push({\n\t\t\t\tline,\n\t\t\t\tlineNumber: i + 1,\n\t\t\t\tmessage: \"No header name specified\",\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (value === \"\") {\n\t\t\tinvalid.push({\n\t\t\t\tline,\n\t\t\t\tlineNumber: i + 1,\n\t\t\t\tmessage: \"No header value specified\",\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!rule) {\n\t\t\tinvalid.push({\n\t\t\t\tline,\n\t\t\t\tlineNumber: i + 1,\n\t\t\t\tmessage: `Path should come before header (${name}: ${value})`,\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst existingValues = rule.headers[name];\n\t\trule.headers[name] = existingValues ? `${existingValues}, ${value}` : value;\n\t}\n\n\tif (rule) {\n\t\tif (isValidRule(rule)) {\n\t\t\trules.push({\n\t\t\t\tpath: rule.path,\n\t\t\t\theaders: rule.headers,\n\t\t\t\tunsetHeaders: rule.unsetHeaders,\n\t\t\t});\n\t\t} else {\n\t\t\tinvalid.push({ line: rule.line, message: \"No headers specified\" });\n\t\t}\n\t}\n\n\treturn {\n\t\trules,\n\t\tinvalid,\n\t};\n}\n\nfunction isValidRule(rule: HeadersRule) {\n\treturn Object.keys(rule.headers).length > 0 || rule.unsetHeaders.length > 0;\n}\n","import {\n\tMAX_DYNAMIC_REDIRECT_RULES,\n\tMAX_LINE_LENGTH,\n\tMAX_STATIC_REDIRECT_RULES,\n\tPERMITTED_STATUS_CODES,\n\tPLACEHOLDER_REGEX,\n\tSPLAT_REGEX,\n} from \"./constants\";\nimport { urlHasHost, validateUrl } from \"./validateURL\";\nimport type {\n\tInvalidRedirectRule,\n\tParsedRedirects,\n\tRedirectLine,\n\tRedirectRule,\n} from \"./types\";\n\nexport function parseRedirects(\n\tinput: string,\n\t{\n\t\tmaxStaticRules = MAX_STATIC_REDIRECT_RULES,\n\t\tmaxDynamicRules = MAX_DYNAMIC_REDIRECT_RULES,\n\t\tmaxLineLength = MAX_LINE_LENGTH,\n\t}: {\n\t\tmaxStaticRules?: number;\n\t\tmaxDynamicRules?: number;\n\t\tmaxLineLength?: number;\n\t} = {}\n): ParsedRedirects {\n\tconst lines = input.split(\"\\n\");\n\tconst rules: RedirectRule[] = [];\n\tconst seen_paths = new Set<string>();\n\tconst invalid: InvalidRedirectRule[] = [];\n\n\tlet staticRules = 0;\n\tlet dynamicRules = 0;\n\tlet canCreateStaticRule = true;\n\n\tfor (let i = 0; i < lines.length; i++) {\n\t\tconst line = (lines[i] || \"\").trim();\n\t\tif (line.length === 0 || line.startsWith(\"#\")) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (line.length > maxLineLength) {\n\t\t\tinvalid.push({\n\t\t\t\tmessage: `Ignoring line ${\n\t\t\t\t\ti + 1\n\t\t\t\t} as it exceeds the maximum allowed length of ${maxLineLength}.`,\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst tokens = line.split(/\\s+/);\n\n\t\tif (tokens.length < 2 || tokens.length > 3) {\n\t\t\tinvalid.push({\n\t\t\t\tline,\n\t\t\t\tlineNumber: i + 1,\n\t\t\t\tmessage: `Expected exactly 2 or 3 whitespace-separated tokens. Got ${tokens.length}.`,\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst [str_from, str_to, str_status = \"302\"] = tokens as RedirectLine;\n\n\t\tconst fromResult = validateUrl(str_from, true, true, false, false);\n\t\tif (fromResult[0] === undefined) {\n\t\t\tinvalid.push({\n\t\t\t\tline,\n\t\t\t\tlineNumber: i + 1,\n\t\t\t\tmessage: fromResult[1],\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst from = fromResult[0];\n\n\t\tif (\n\t\t\tcanCreateStaticRule &&\n\t\t\t!from.match(SPLAT_REGEX) &&\n\t\t\t!from.match(PLACEHOLDER_REGEX)\n\t\t) {\n\t\t\tstaticRules += 1;\n\n\t\t\tif (staticRules > maxStaticRules) {\n\t\t\t\tinvalid.push({\n\t\t\t\t\tmessage: `Maximum number of static rules supported is ${maxStaticRules}. Skipping line.`,\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t} else {\n\t\t\tdynamicRules += 1;\n\t\t\tcanCreateStaticRule = false;\n\n\t\t\tif (dynamicRules > maxDynamicRules) {\n\t\t\t\tinvalid.push({\n\t\t\t\t\tmessage: `Maximum number of dynamic rules supported is ${maxDynamicRules}. Skipping remaining ${\n\t\t\t\t\t\tlines.length - i\n\t\t\t\t\t} lines of file.`,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tconst toResult = validateUrl(str_to, false, false, true, true);\n\t\tif (toResult[0] === undefined) {\n\t\t\tinvalid.push({\n\t\t\t\tline,\n\t\t\t\tlineNumber: i + 1,\n\t\t\t\tmessage: toResult[1],\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst to = toResult[0];\n\n\t\tconst status = Number(str_status);\n\t\tif (isNaN(status) || !PERMITTED_STATUS_CODES.has(status)) {\n\t\t\tinvalid.push({\n\t\t\t\tline,\n\t\t\t\tlineNumber: i + 1,\n\t\t\t\tmessage: `Valid status codes are 200, 301, 302 (default), 303, 307, or 308. Got ${str_status}.`,\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\t// We want to always block the `/* /index.html` redirect - this will cause TOO_MANY_REDIRECTS errors as\n\t\t// the asset worker will redirect it back to `/`, removing the `/index.html`. This is the case for regular\n\t\t// redirects, as well as proxied (200) rewrites. We only want to run this on relative urls\n\t\tif (/\\/\\*?$/.test(from) && /\\/index(.html)?$/.test(to) && !urlHasHost(to)) {\n\t\t\tinvalid.push({\n\t\t\t\tline,\n\t\t\t\tlineNumber: i + 1,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Infinite loop detected in this rule and has been ignored. This will cause a redirect to strip `.html` or `/index` and end up triggering this rule again. Please fix or remove this rule to silence this warning.\",\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (seen_paths.has(from)) {\n\t\t\tinvalid.push({\n\t\t\t\tline,\n\t\t\t\tlineNumber: i + 1,\n\t\t\t\tmessage: `Ignoring duplicate rule for path ${from}.`,\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseen_paths.add(from);\n\n\t\tif (status === 200) {\n\t\t\tif (urlHasHost(to)) {\n\t\t\t\tinvalid.push({\n\t\t\t\t\tline,\n\t\t\t\t\tlineNumber: i + 1,\n\t\t\t\t\tmessage: `Proxy (200) redirects can only point to relative paths. Got ${to}`,\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\trules.push({ from, to, status, lineNumber: i + 1 });\n\t}\n\n\treturn {\n\t\trules,\n\t\tinvalid,\n\t};\n}\n","// -- Constants for manifest encoding/decoding --\n// (header and tails are not currently being used for anything afaik)\n// NB these all refer to bytes\n\n/** Reserved header at the start of the whole manifest, NOT in each entry (currently unused)\n * manifest = [HEADER, [ entry = PATH_HASH, CONTENT_HASH, TAIL], [entry], ... , [entry] ]\n */\nexport const HEADER_SIZE = 20;\n/** manifest = [HEADER, [ entry = PATH_HASH, CONTENT_HASH, TAIL], [entry], ... , [entry] ] */\nexport const PATH_HASH_SIZE = 16;\n/** manifest = [HEADER, [ entry = PATH_HASH, CONTENT_HASH, TAIL], [entry], ... , [entry] ] */\nexport const CONTENT_HASH_SIZE = 16;\n/** manifest = [HEADER, [ entry = PATH_HASH, CONTENT_HASH, TAIL], [entry], ... , [entry] ] */\nexport const TAIL_SIZE = 8;\n/** offset of PATH_HASH from start of each entry\n * manifest = [HEADER, [ entry = PATH_HASH, CONTENT_HASH, TAIL], [entry], ... , [entry] ] */\nexport const PATH_HASH_OFFSET = 0;\n/** offset of CONTENT_HASH from start of each entry\n * manifest = [HEADER, [ entry = PATH_HASH, CONTENT_HASH, TAIL], [entry], ... , [entry] ] */\nexport const CONTENT_HASH_OFFSET = PATH_HASH_SIZE;\n/** manifest = [HEADER, [ entry = PATH_HASH, CONTENT_HASH, TAIL], [entry], ... , [entry] ] */\nexport const ENTRY_SIZE = PATH_HASH_SIZE + CONTENT_HASH_SIZE + TAIL_SIZE;\n\n// -- Manifest creation constants --\n// used in wrangler dev and deploy\n/**\n * Maximum number of assets that can be deployed with a Worker; this is a global\n * ceiling, and may vary by the user's subscription.\n */\nexport const MAX_ASSET_COUNT = 100_000;\n/** Maximum size per asset that can be deployed with a Worker */\nexport const MAX_ASSET_SIZE = 25 * 1024 * 1024;\n\nexport const CF_ASSETS_IGNORE_FILENAME = \".assetsignore\";\nexport const REDIRECTS_FILENAME = \"_redirects\";\nexport const HEADERS_FILENAME = \"_headers\";\n","// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst EMPTY = ''\nconst SPACE = ' '\nconst ESCAPE = '\\\\'\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\\\]|^)\\\\$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n// /foo,\n// ./foo,\n// ../foo,\n// .\n// ..\nconst REGEX_TEST_INVALID_PATH = /^\\.*\\/|^\\.+$/\n\nconst SLASH = '/'\n\n// Do not use ternary expression here, since \"istanbul ignore next\" is buggy\nlet TMP_KEY_IGNORE = 'node-ignore'\n/* istanbul ignore else */\nif (typeof Symbol !== 'undefined') {\n TMP_KEY_IGNORE = Symbol.for('node-ignore')\n}\nconst KEY_IGNORE = TMP_KEY_IGNORE\n\nconst define = (object, key, value) =>\n Object.defineProperty(object, key, {value})\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\nconst RETURN_FALSE = () => false\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : EMPTY\n)\n\n// See fixtures #59\nconst cleanRangeBackSlash = slashes => {\n const {length} = slashes\n return slashes.slice(0, length - length % 2)\n}\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst REPLACERS = [\n\n [\n // remove BOM\n // TODO:\n // Other similar zero-width characters?\n /^\\uFEFF/,\n () => EMPTY\n ],\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /\\\\?\\s+$/,\n match => match.indexOf('\\\\') === 0\n ? SPACE\n : EMPTY\n ],\n\n // replace (\\ ) with ' '\n [\n /\\\\\\s/g,\n () => SPACE\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\$.|*+(){^]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ],\n\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n // If has a slash `/` at the beginning or middle\n return !/\\/(?!$)/.test(this)\n // > Prior to 2.22.1\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n\n // After 2.22.1 (compatible but clearer)\n // > If there is a separator at the beginning or middle (or both)\n // > of the pattern, then the pattern is relative to the directory\n // > level of the particular .gitignore file itself.\n // > Otherwise the pattern may also match at any level below\n // > the .gitignore level.\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // normal intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule,\n // coz trailing single wildcard will be handed by [trailing wildcard]\n /(^|[^\\\\]+)(\\\\\\*)+(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1, p2) => {\n // 1.\n // > An asterisk \"*\" matches anything except a slash.\n // 2.\n // > Other consecutive asterisks are considered regular asterisks\n // > and will match according to the previous rules.\n const unescaped = p2.replace(/\\\\\\*/g, '[^\\\\/]*')\n return p1 + unescaped\n }\n ],\n\n [\n // unescape, revert step 3 except for back slash\n // For example, if a user escape a '\\\\*',\n // after step 3, the result will be '\\\\\\\\\\\\*'\n /\\\\\\\\\\\\(?=[$.|*+(){^])/g,\n () => ESCAPE\n ],\n\n [\n // '\\\\\\\\' -> '\\\\'\n /\\\\\\\\/g,\n () => ESCAPE\n ],\n\n [\n // > The range notation, e.g. [a-zA-Z],\n // > can be used to match one of the characters in a range.\n\n // `\\` is escaped by step 3\n /(\\\\)?\\[([^\\]/]*?)(\\\\*)($|\\])/g,\n (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE\n // '\\\\[bar]' -> '\\\\\\\\[bar\\\\]'\n ? `\\\\[${range}${cleanRangeBackSlash(endEscape)}${close}`\n : close === ']'\n ? endEscape.length % 2 === 0\n // A normal case, and it is a range notation\n // '[bar]'\n // '[bar\\\\\\\\]'\n ? `[${sanitizeRange(range)}${endEscape}]`\n // Invalid range notaton\n // '[bar\\\\]' -> '[bar\\\\\\\\]'\n : '[]'\n : '[]'\n ],\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*])$/,\n\n // WTF!\n // https://git-scm.com/docs/gitignore\n // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)\n // which re-fixes #24, #38\n\n // > If there is a separator at the end of the pattern then the pattern\n // > will only match directories, otherwise the pattern can match both\n // > files and directories.\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => /\\/$/.test(match)\n // foo/ will not match 'foo'\n ? `${match}$`\n // foo matches 'foo' and 'foo/'\n : `${match}(?=$|\\\\/$)`\n ],\n\n // trailing wildcard\n [\n /(\\^|\\\\\\/)?\\\\\\*$/,\n (_, p1) => {\n const prefix = p1\n // '\\^':\n // '/*' does not match EMPTY\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n ],\n]\n\n// A simple cache, because an ignore rule only has only one certain meaning\nconst regexCache = Object.create(null)\n\n// @param {pattern}\nconst makeRegex = (pattern, ignoreCase) => {\n let source = regexCache[pattern]\n\n if (!source) {\n source = REPLACERS.reduce(\n (prev, current) => prev.replace(current[0], current[1].bind(pattern)),\n pattern\n )\n regexCache[pattern] = source\n }\n\n return ignoreCase\n ? new RegExp(source, 'i')\n : new RegExp(source)\n}\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF)\n\nclass IgnoreRule {\n constructor (\n origin,\n pattern,\n negative,\n regex\n ) {\n this.origin = origin\n this.pattern = pattern\n this.negative = negative\n this.regex = regex\n }\n}\n\nconst createRule = (pattern, ignoreCase) => {\n const origin = pattern\n let negative = false\n\n // > An optional prefix \"!\" which negates the pattern;\n if (pattern.indexOf('!') === 0) {\n negative = true\n pattern = pattern.substr(1)\n }\n\n pattern = pattern\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regex = makeRegex(pattern, ignoreCase)\n\n return new IgnoreRule(\n origin,\n pattern,\n negative,\n regex\n )\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst checkPath = (path, originalPath, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${originalPath}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore EMPTY, so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n // Check if it is a relative path\n if (checkPath.isNotRelative(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${originalPath}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nconst isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)\n\ncheckPath.isNotRelative = isNotRelative\ncheckPath.convert = p => p\n\nclass Ignore {\n constructor ({\n ignorecase = true,\n ignoreCase = ignorecase,\n allowRelativePaths = false\n } = {}) {\n define(this, KEY_IGNORE, true)\n\n this._rules = []\n this._ignoreCase = ignoreCase\n this._allowRelativePaths = allowRelativePaths\n this._initCache()\n }\n\n _initCache () {\n this._ignoreCache = Object.create(null)\n this._testCache = Object.create(null)\n }\n\n _addPattern (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules)\n this._added = true\n return\n }\n\n if (checkPattern(pattern)) {\n const rule = createRule(pattern, this._ignoreCase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array<string> | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._addPattern, this)\n\n // Some rules have just added to the ignore,\n // making the behavior changed.\n if (this._added) {\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // | ignored : unignored\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n\n // @param {boolean} whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n\n // @returns {TestResult} true if a file is ignored\n _testOne (path, checkUnignored) {\n let ignored = false\n let unignored = false\n\n this._rules.forEach(rule => {\n const {negative} = rule\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule.regex.test(path)\n\n if (matched) {\n ignored = !negative\n unignored = negative\n }\n })\n\n return {\n ignored,\n unignored\n }\n }\n\n // @returns {TestResult}\n _test (originalPath, cache, checkUnignored, slices) {\n const path = originalPath\n // Supports nullable path\n && checkPath.convert(originalPath)\n\n checkPath(\n path,\n originalPath,\n this._allowRelativePaths\n ? RETURN_FALSE\n : throwError\n )\n\n return this._t(path, cache, checkUnignored, slices)\n }\n\n _t (path, cache, checkUnignored, slices) {\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._testOne(path, checkUnignored)\n }\n\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._testOne(path, checkUnignored)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst isPathValid = path =>\n checkPath(path && checkPath.convert(path), path, RETURN_FALSE)\n\nfactory.isPathValid = isPathValid\n\n// Fixes typescript\nfactory.default = factory\n\nmodule.exports = factory\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore if */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && (\n process.env && process.env.IGNORE_TEST_WIN32\n || process.platform === 'win32'\n )\n) {\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n checkPath.convert = makePosix\n\n // 'C:\\\\foo' <- 'C:\\\\foo' has been converted to 'C:/'\n // 'd:\\\\foo'\n const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\\//i\n checkPath.isNotRelative = path =>\n REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path)\n || isNotRelative(path)\n}\n","const types = {\n 'application/prs.cww': ['cww'],\n 'application/prs.xsf+xml': ['xsf'],\n 'application/vnd.1000minds.decision-model+xml': ['1km'],\n 'application/vnd.3gpp.pic-bw-large': ['plb'],\n 'application/vnd.3gpp.pic-bw-small': ['psb'],\n 'application/vnd.3gpp.pic-bw-var': ['pvb'],\n 'application/vnd.3gpp2.tcap': ['tcap'],\n 'application/vnd.3m.post-it-notes': ['pwn'],\n 'application/vnd.accpac.simply.aso': ['aso'],\n 'application/vnd.accpac.simply.imp': ['imp'],\n 'application/vnd.acucobol': ['acu'],\n 'application/vnd.acucorp': ['atc', 'acutc'],\n 'application/vnd.adobe.air-application-installer-package+zip': ['air'],\n 'application/vnd.adobe.formscentral.fcdt': ['fcdt'],\n 'application/vnd.adobe.fxp': ['fxp', 'fxpl'],\n 'application/vnd.adobe.xdp+xml': ['xdp'],\n 'application/vnd.adobe.xfdf': ['*xfdf'],\n 'application/vnd.age': ['age'],\n 'application/vnd.ahead.space': ['ahead'],\n 'application/vnd.airzip.filesecure.azf': ['azf'],\n 'application/vnd.airzip.filesecure.azs': ['azs'],\n 'application/vnd.amazon.ebook': ['azw'],\n 'application/vnd.americandynamics.acc': ['acc'],\n 'application/vnd.amiga.ami': ['ami'],\n 'application/vnd.android.package-archive': ['apk'],\n 'application/vnd.anser-web-certificate-issue-initiation': ['cii'],\n 'application/vnd.anser-web-funds-transfer-initiation': ['fti'],\n 'application/vnd.antix.game-component': ['atx'],\n 'application/vnd.apple.installer+xml': ['mpkg'],\n 'application/vnd.apple.keynote': ['key'],\n 'application/vnd.apple.mpegurl': ['m3u8'],\n 'application/vnd.apple.numbers': ['numbers'],\n 'application/vnd.apple.pages': ['pages'],\n 'application/vnd.apple.pkpass': ['pkpass'],\n 'application/vnd.aristanetworks.swi': ['swi'],\n 'application/vnd.astraea-software.iota': ['iota'],\n 'application/vnd.audiograph': ['aep'],\n 'application/vnd.autodesk.fbx': ['fbx'],\n 'application/vnd.balsamiq.bmml+xml': ['bmml'],\n 'application/vnd.blueice.multipass': ['mpm'],\n 'application/vnd.bmi': ['bmi'],\n 'application/vnd.businessobjects': ['rep'],\n 'application/vnd.chemdraw+xml': ['cdxml'],\n 'application/vnd.chipnuts.karaoke-mmd': ['mmd'],\n 'application/vnd.cinderella': ['cdy'],\n 'application/vnd.citationstyles.style+xml': ['csl'],\n 'application/vnd.claymore': ['cla'],\n 'application/vnd.cloanto.rp9': ['rp9'],\n 'application/vnd.clonk.c4group': ['c4g', 'c4d', 'c4f', 'c4p', 'c4u'],\n 'application/vnd.cluetrust.cartomobile-config': ['c11amc'],\n 'application/vnd.cluetrust.cartomobile-config-pkg': ['c11amz'],\n 'application/vnd.commonspace': ['csp'],\n 'application/vnd.contact.cmsg': ['cdbcmsg'],\n 'application/vnd.cosmocaller': ['cmc'],\n 'application/vnd.crick.clicker': ['clkx'],\n 'application/vnd.crick.clicker.keyboard': ['clkk'],\n 'application/vnd.crick.clicker.palette': ['clkp'],\n 'application/vnd.crick.clicker.template': ['clkt'],\n 'application/vnd.crick.clicker.wordbank': ['clkw'],\n 'application/vnd.criticaltools.wbs+xml': ['wbs'],\n 'application/vnd.ctc-posml': ['pml'],\n 'application/vnd.cups-ppd': ['ppd'],\n 'application/vnd.curl.car': ['car'],\n 'application/vnd.curl.pcurl': ['pcurl'],\n 'application/vnd.dart': ['dart'],\n 'application/vnd.data-vision.rdz': ['rdz'],\n 'application/vnd.dbf': ['dbf'],\n 'application/vnd.dcmp+xml': ['dcmp'],\n 'application/vnd.dece.data': ['uvf', 'uvvf', 'uvd', 'uvvd'],\n 'application/vnd.dece.ttml+xml': ['uvt', 'uvvt'],\n 'application/vnd.dece.unspecified': ['uvx', 'uvvx'],\n 'application/vnd.dece.zip': ['uvz', 'uvvz'],\n 'application/vnd.denovo.fcselayout-link': ['fe_launch'],\n 'application/vnd.dna': ['dna'],\n 'application/vnd.dolby.mlp': ['mlp'],\n 'application/vnd.dpgraph': ['dpg'],\n 'application/vnd.dreamfactory': ['dfac'],\n 'application/vnd.ds-keypoint': ['kpxx'],\n 'application/vnd.dvb.ait': ['ait'],\n 'application/vnd.dvb.service': ['svc'],\n 'application/vnd.dynageo': ['geo'],\n 'application/vnd.ecowin.chart': ['mag'],\n 'application/vnd.enliven': ['nml'],\n 'application/vnd.epson.esf': ['esf'],\n 'application/vnd.epson.msf': ['msf'],\n 'application/vnd.epson.quickanime': ['qam'],\n 'application/vnd.epson.salt': ['slt'],\n 'application/vnd.epson.ssf': ['ssf'],\n 'application/vnd.eszigno3+xml': ['es3', 'et3'],\n 'application/vnd.ezpix-album': ['ez2'],\n 'application/vnd.ezpix-package': ['ez3'],\n 'application/vnd.fdf': ['*fdf'],\n 'application/vnd.fdsn.mseed': ['mseed'],\n 'application/vnd.fdsn.seed': ['seed', 'dataless'],\n 'application/vnd.flographit': ['gph'],\n 'application/vnd.fluxtime.clip': ['ftc'],\n 'application/vnd.framemaker': ['fm', 'frame', 'maker', 'book'],\n 'application/vnd.frogans.fnc': ['fnc'],\n 'application/vnd.frogans.ltf': ['ltf'],\n 'application/vnd.fsc.weblaunch': ['fsc'],\n 'application/vnd.fujitsu.oasys': ['oas'],\n 'application/vnd.fujitsu.oasys2': ['oa2'],\n 'application/vnd.fujitsu.oasys3': ['oa3'],\n 'application/vnd.fujitsu.oasysgp': ['fg5'],\n 'application/vnd.fujitsu.oasysprs': ['bh2'],\n 'application/vnd.fujixerox.ddd': ['ddd'],\n 'application/vnd.fujixerox.docuworks': ['xdw'],\n 'application/vnd.fujixerox.docuworks.binder': ['xbd'],\n 'application/vnd.fuzzysheet': ['fzs'],\n 'application/vnd.genomatix.tuxedo': ['txd'],\n 'application/vnd.geogebra.file': ['ggb'],\n 'application/vnd.geogebra.slides': ['ggs'],\n 'application/vnd.geogebra.tool': ['ggt'],\n 'application/vnd.geometry-explorer': ['gex', 'gre'],\n 'application/vnd.geonext': ['gxt'],\n 'application/vnd.geoplan': ['g2w'],\n 'application/vnd.geospace': ['g3w'],\n 'application/vnd.gmx': ['gmx'],\n 'application/vnd.google-apps.document': ['gdoc'],\n 'application/vnd.google-apps.drawing': ['gdraw'],\n 'application/vnd.google-apps.form': ['gform'],\n 'application/vnd.google-apps.jam': ['gjam'],\n 'application/vnd.google-apps.map': ['gmap'],\n 'application/vnd.google-apps.presentation': ['gslides'],\n 'application/vnd.google-apps.script': ['gscript'],\n 'application/vnd.google-apps.site': ['gsite'],\n 'application/vnd.google-apps.spreadsheet': ['gsheet'],\n 'application/vnd.google-earth.kml+xml': ['kml'],\n 'application/vnd.google-earth.kmz': ['kmz'],\n 'application/vnd.gov.sk.xmldatacontainer+xml': ['xdcf'],\n 'application/vnd.grafeq': ['gqf', 'gqs'],\n 'application/vnd.groove-account': ['gac'],\n 'application/vnd.groove-help': ['ghf'],\n 'application/vnd.groove-identity-message': ['gim'],\n 'application/vnd.groove-injector': ['grv'],\n 'application/vnd.groove-tool-message': ['gtm'],\n 'application/vnd.groove-tool-template': ['tpl'],\n 'application/vnd.groove-vcard': ['vcg'],\n 'application/vnd.hal+xml': ['hal'],\n 'application/vnd.handheld-entertainment+xml': ['zmm'],\n 'application/vnd.hbci': ['hbci'],\n 'application/vnd.hhe.lesson-player': ['les'],\n 'application/vnd.hp-hpgl': ['hpgl'],\n 'application/vnd.hp-hpid': ['hpid'],\n 'application/vnd.hp-hps': ['hps'],\n 'application/vnd.hp-jlyt': ['jlt'],\n 'application/vnd.hp-pcl': ['pcl'],\n 'application/vnd.hp-pclxl': ['pclxl'],\n 'application/vnd.hydrostatix.sof-data': ['sfd-hdstx'],\n 'application/vnd.ibm.minipay': ['mpy'],\n 'application/vnd.ibm.modcap': ['afp', 'listafp', 'list3820'],\n 'application/vnd.ibm.rights-management': ['irm'],\n 'application/vnd.ibm.secure-container': ['sc'],\n 'application/vnd.iccprofile': ['icc', 'icm'],\n 'application/vnd.igloader': ['igl'],\n 'application/vnd.immervision-ivp': ['ivp'],\n 'application/vnd.immervision-ivu': ['ivu'],\n 'application/vnd.insors.igm': ['igm'],\n 'application/vnd.intercon.formnet': ['xpw', 'xpx'],\n 'application/vnd.intergeo': ['i2g'],\n 'application/vnd.intu.qbo': ['qbo'],\n 'application/vnd.intu.qfx': ['qfx'],\n 'application/vnd.ipunplugged.rcprofile': ['rcprofile'],\n 'application/vnd.irepository.package+xml': ['irp'],\n 'application/vnd.is-xpr': ['xpr'],\n 'application/vnd.isac.fcs': ['fcs'],\n 'application/vnd.jam': ['jam'],\n 'application/vnd.jcp.javame.midlet-rms': ['rms'],\n 'application/vnd.jisp': ['jisp'],\n 'application/vnd.joost.joda-archive': ['joda'],\n 'application/vnd.kahootz': ['ktz', 'ktr'],\n 'application/vnd.kde.karbon': ['karbon'],\n 'application/vnd.kde.kchart': ['chrt'],\n 'application/vnd.kde.kformula': ['kfo'],\n 'application/vnd.kde.kivio': ['flw'],\n 'application/vnd.kde.kontour': ['kon'],\n 'application/vnd.kde.kpresenter': ['kpr', 'kpt'],\n 'application/vnd.kde.kspread': ['ksp'],\n 'application/vnd.kde.kword': ['kwd', 'kwt'],\n 'application/vnd.kenameaapp': ['htke'],\n 'application/vnd.kidspiration': ['kia'],\n 'application/vnd.kinar': ['kne', 'knp'],\n 'application/vnd.koan': ['skp', 'skd', 'skt', 'skm'],\n 'application/vnd.kodak-descriptor': ['sse'],\n 'application/vnd.las.las+xml': ['lasxml'],\n 'application/vnd.llamagraphics.life-balance.desktop': ['lbd'],\n 'application/vnd.llamagraphics.life-balance.exchange+xml': ['lbe'],\n 'application/vnd.lotus-1-2-3': ['123'],\n 'application/vnd.lotus-approach': ['apr'],\n 'application/vnd.lotus-freelance': ['pre'],\n 'application/vnd.lotus-notes': ['nsf'],\n 'application/vnd.lotus-organizer': ['org'],\n 'application/vnd.lotus-screencam': ['scm'],\n 'application/vnd.lotus-wordpro': ['lwp'],\n 'application/vnd.macports.portpkg': ['portpkg'],\n 'application/vnd.mapbox-vector-tile': ['mvt'],\n 'application/vnd.mcd': ['mcd'],\n 'application/vnd.medcalcdata': ['mc1'],\n 'application/vnd.mediastation.cdkey': ['cdkey'],\n 'application/vnd.mfer': ['mwf'],\n 'application/vnd.mfmp': ['mfm'],\n 'application/vnd.micrografx.flo': ['flo'],\n 'application/vnd.micrografx.igx': ['igx'],\n 'application/vnd.mif': ['mif'],\n 'application/vnd.mobius.daf': ['daf'],\n 'application/vnd.mobius.dis': ['dis'],\n 'application/vnd.mobius.mbk': ['mbk'],\n 'application/vnd.mobius.mqy': ['mqy'],\n 'application/vnd.mobius.msl': ['msl'],\n 'application/vnd.mobius.plc': ['plc'],\n 'application/vnd.mobius.txf': ['txf'],\n 'application/vnd.mophun.application': ['mpn'],\n 'application/vnd.mophun.certificate': ['mpc'],\n 'application/vnd.mozilla.xul+xml': ['xul'],\n 'application/vnd.ms-artgalry': ['cil'],\n 'application/vnd.ms-cab-compressed': ['cab'],\n 'application/vnd.ms-excel': ['xls', 'xlm', 'xla', 'xlc', 'xlt', 'xlw'],\n 'application/vnd.ms-excel.addin.macroenabled.12': ['xlam'],\n 'application/vnd.ms-excel.sheet.binary.macroenabled.12': ['xlsb'],\n 'application/vnd.ms-excel.sheet.macroenabled.12': ['xlsm'],\n 'application/vnd.ms-excel.template.macroenabled.12': ['xltm'],\n 'application/vnd.ms-fontobject': ['eot'],\n 'application/vnd.ms-htmlhelp': ['chm'],\n 'application/vnd.ms-ims': ['ims'],\n 'application/vnd.ms-lrm': ['lrm'],\n 'application/vnd.ms-officetheme': ['thmx'],\n 'application/vnd.ms-outlook': ['msg'],\n 'application/vnd.ms-pki.seccat': ['cat'],\n 'application/vnd.ms-pki.stl': ['*stl'],\n 'application/vnd.ms-powerpoint': ['ppt', 'pps', 'pot'],\n 'application/vnd.ms-powerpoint.addin.macroenabled.12': ['ppam'],\n 'application/vnd.ms-powerpoint.presentation.macroenabled.12': ['pptm'],\n 'application/vnd.ms-powerpoint.slide.macroenabled.12': ['sldm'],\n 'application/vnd.ms-powerpoint.slideshow.macroenabled.12': ['ppsm'],\n 'application/vnd.ms-powerpoint.template.macroenabled.12': ['potm'],\n 'application/vnd.ms-project': ['*mpp', 'mpt'],\n 'application/vnd.ms-visio.viewer': ['vdx'],\n 'application/vnd.ms-word.document.macroenabled.12': ['docm'],\n 'application/vnd.ms-word.template.macroenabled.12': ['dotm'],\n 'application/vnd.ms-works': ['wps', 'wks', 'wcm', 'wdb'],\n 'application/vnd.ms-wpl': ['wpl'],\n 'application/vnd.ms-xpsdocument': ['xps'],\n 'application/vnd.mseq': ['mseq'],\n 'application/vnd.musician': ['mus'],\n 'application/vnd.muvee.style': ['msty'],\n 'application/vnd.mynfc': ['taglet'],\n 'application/vnd.nato.bindingdataobject+xml': ['bdo'],\n 'application/vnd.neurolanguage.nlu': ['nlu'],\n 'application/vnd.nitf': ['ntf', 'nitf'],\n 'application/vnd.noblenet-directory': ['nnd'],\n 'application/vnd.noblenet-sealer': ['nns'],\n 'application/vnd.noblenet-web': ['nnw'],\n 'application/vnd.nokia.n-gage.ac+xml': ['*ac'],\n 'application/vnd.nokia.n-gage.data': ['ngdat'],\n 'application/vnd.nokia.n-gage.symbian.install': ['n-gage'],\n 'application/vnd.nokia.radio-preset': ['rpst'],\n 'application/vnd.nokia.radio-presets': ['rpss'],\n 'application/vnd.novadigm.edm': ['edm'],\n 'application/vnd.novadigm.edx': ['edx'],\n 'application/vnd.novadigm.ext': ['ext'],\n 'application/vnd.oasis.opendocument.chart': ['odc'],\n 'application/vnd.oasis.opendocument.chart-template': ['otc'],\n 'application/vnd.oasis.opendocument.database': ['odb'],\n 'application/vnd.oasis.opendocument.formula': ['odf'],\n 'application/vnd.oasis.opendocument.formula-template': ['odft'],\n 'application/vnd.oasis.opendocument.graphics': ['odg'],\n 'application/vnd.oasis.opendocument.graphics-template': ['otg'],\n 'application/vnd.oasis.opendocument.image': ['odi'],\n 'application/vnd.oasis.opendocument.image-template': ['oti'],\n 'application/vnd.oasis.opendocument.presentation': ['odp'],\n 'application/vnd.oasis.opendocument.presentation-template': ['otp'],\n 'application/vnd.oasis.opendocument.spreadsheet': ['ods'],\n 'application/vnd.oasis.opendocument.spreadsheet-template': ['ots'],\n 'application/vnd.oasis.opendocument.text': ['odt'],\n 'application/vnd.oasis.opendocument.text-master': ['odm'],\n 'application/vnd.oasis.opendocument.text-template': ['ott'],\n 'application/vnd.oasis.opendocument.text-web': ['oth'],\n 'application/vnd.olpc-sugar': ['xo'],\n 'application/vnd.oma.dd2+xml': ['dd2'],\n 'application/vnd.openblox.game+xml': ['obgx'],\n 'application/vnd.openofficeorg.extension': ['oxt'],\n 'application/vnd.openstreetmap.data+xml': ['osm'],\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation': [\n 'pptx',\n ],\n 'application/vnd.openxmlformats-officedocument.presentationml.slide': [\n 'sldx',\n ],\n 'application/vnd.openxmlformats-officedocument.presentationml.slideshow': [\n 'ppsx',\n ],\n 'application/vnd.openxmlformats-officedocument.presentationml.template': [\n 'potx',\n ],\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ['xlsx'],\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.template': [\n 'xltx',\n ],\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': [\n 'docx',\n ],\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.template': [\n 'dotx',\n ],\n 'application/vnd.osgeo.mapguide.package': ['mgp'],\n 'application/vnd.osgi.dp': ['dp'],\n 'application/vnd.osgi.subsystem': ['esa'],\n 'application/vnd.palm': ['pdb', 'pqa', 'oprc'],\n 'application/vnd.pawaafile': ['paw'],\n 'application/vnd.pg.format': ['str'],\n 'application/vnd.pg.osasli': ['ei6'],\n 'application/vnd.picsel': ['efif'],\n 'application/vnd.pmi.widget': ['wg'],\n 'application/vnd.pocketlearn': ['plf'],\n 'application/vnd.powerbuilder6': ['pbd'],\n 'application/vnd.previewsystems.box': ['box'],\n 'application/vnd.procrate.brushset': ['brushset'],\n 'application/vnd.procreate.brush': ['brush'],\n 'application/vnd.procreate.dream': ['drm'],\n 'application/vnd.proteus.magazine': ['mgz'],\n 'application/vnd.publishare-delta-tree': ['qps'],\n 'application/vnd.pvi.ptid1': ['ptid'],\n 'application/vnd.pwg-xhtml-print+xml': ['xhtm'],\n 'application/vnd.quark.quarkxpress': [\n 'qxd',\n 'qxt',\n 'qwd',\n 'qwt',\n 'qxl',\n 'qxb',\n ],\n 'application/vnd.rar': ['rar'],\n 'application/vnd.realvnc.bed': ['bed'],\n 'application/vnd.recordare.musicxml': ['mxl'],\n 'application/vnd.recordare.musicxml+xml': ['musicxml'],\n 'application/vnd.rig.cryptonote': ['cryptonote'],\n 'application/vnd.rim.cod': ['cod'],\n 'application/vnd.rn-realmedia': ['rm'],\n 'application/vnd.rn-realmedia-vbr': ['rmvb'],\n 'application/vnd.route66.link66+xml': ['link66'],\n 'application/vnd.sailingtracker.track': ['st'],\n 'application/vnd.seemail': ['see'],\n 'application/vnd.sema': ['sema'],\n 'application/vnd.semd': ['semd'],\n 'application/vnd.semf': ['semf'],\n 'application/vnd.shana.informed.formdata': ['ifm'],\n 'application/vnd.shana.informed.formtemplate': ['itp'],\n 'application/vnd.shana.informed.interchange': ['iif'],\n 'application/vnd.shana.informed.package': ['ipk'],\n 'application/vnd.simtech-mindmapper': ['twd', 'twds'],\n 'application/vnd.smaf': ['mmf'],\n 'application/vnd.smart.teacher': ['teacher'],\n 'application/vnd.software602.filler.form+xml': ['fo'],\n 'application/vnd.solent.sdkm+xml': ['sdkm', 'sdkd'],\n 'application/vnd.spotfire.dxp': ['dxp'],\n 'application/vnd.spotfire.sfs': ['sfs'],\n 'application/vnd.stardivision.calc': ['sdc'],\n 'application/vnd.stardivision.draw': ['sda'],\n 'application/vnd.stardivision.impress': ['sdd'],\n 'application/vnd.stardivision.math': ['smf'],\n 'application/vnd.stardivision.writer': ['sdw', 'vor'],\n 'application/vnd.stardivision.writer-global': ['sgl'],\n 'application/vnd.stepmania.package': ['smzip'],\n 'application/vnd.stepmania.stepchart': ['sm'],\n 'application/vnd.sun.wadl+xml': ['wadl'],\n 'application/vnd.sun.xml.calc': ['sxc'],\n 'application/vnd.sun.xml.calc.template': ['stc'],\n 'application/vnd.sun.xml.draw': ['sxd'],\n 'application/vnd.sun.xml.draw.template': ['std'],\n 'application/vnd.sun.xml.impress': ['sxi'],\n 'application/vnd.sun.xml.impress.template': ['sti'],\n 'application/vnd.sun.xml.math': ['sxm'],\n 'application/vnd.sun.xml.writer': ['sxw'],\n 'application/vnd.sun.xml.writer.global': ['sxg'],\n 'application/vnd.sun.xml.writer.template': ['stw'],\n 'application/vnd.sus-calendar': ['sus', 'susp'],\n 'application/vnd.svd': ['svd'],\n 'application/vnd.symbian.install': ['sis', 'sisx'],\n 'application/vnd.syncml+xml': ['xsm'],\n 'application/vnd.syncml.dm+wbxml': ['bdm'],\n 'application/vnd.syncml.dm+xml': ['xdm'],\n 'application/vnd.syncml.dmddf+xml': ['ddf'],\n 'application/vnd.tao.intent-module-archive': ['tao'],\n 'application/vnd.tcpdump.pcap': ['pcap', 'cap', 'dmp'],\n 'application/vnd.tmobile-livetv': ['tmo'],\n 'application/vnd.trid.tpt': ['tpt'],\n 'application/vnd.triscape.mxs': ['mxs'],\n 'application/vnd.trueapp': ['tra'],\n 'application/vnd.ufdl': ['ufd', 'ufdl'],\n 'application/vnd.uiq.theme': ['utz'],\n 'application/vnd.umajin': ['umj'],\n 'application/vnd.unity': ['unityweb'],\n 'application/vnd.uoml+xml': ['uoml', 'uo'],\n 'application/vnd.vcx': ['vcx'],\n 'application/vnd.visio': ['vsd', 'vst', 'vss', 'vsw', 'vsdx', 'vtx'],\n 'application/vnd.visionary': ['vis'],\n 'application/vnd.vsf': ['vsf'],\n 'application/vnd.wap.wbxml': ['wbxml'],\n 'application/vnd.wap.wmlc': ['wmlc'],\n 'application/vnd.wap.wmlscriptc': ['wmlsc'],\n 'application/vnd.webturbo': ['wtb'],\n 'application/vnd.wolfram.player': ['nbp'],\n 'application/vnd.wordperfect': ['wpd'],\n 'application/vnd.wqd': ['wqd'],\n 'application/vnd.wt.stf': ['stf'],\n 'application/vnd.xara': ['xar'],\n 'application/vnd.xfdl': ['xfdl'],\n 'application/vnd.yamaha.hv-dic': ['hvd'],\n 'application/vnd.yamaha.hv-script': ['hvs'],\n 'application/vnd.yamaha.hv-voice': ['hvp'],\n 'application/vnd.yamaha.openscoreformat': ['osf'],\n 'application/vnd.yamaha.openscoreformat.osfpvg+xml': ['osfpvg'],\n 'application/vnd.yamaha.smaf-audio': ['saf'],\n 'application/vnd.yamaha.smaf-phrase': ['spf'],\n 'application/vnd.yellowriver-custom-menu': ['cmp'],\n 'application/vnd.zul': ['zir', 'zirz'],\n 'application/vnd.zzazz.deck+xml': ['zaz'],\n 'application/x-7z-compressed': ['7z'],\n 'application/x-abiword': ['abw'],\n 'application/x-ace-compressed': ['ace'],\n 'application/x-apple-diskimage': ['*dmg'],\n 'application/x-arj': ['arj'],\n 'application/x-authorware-bin': ['aab', 'x32', 'u32', 'vox'],\n 'application/x-authorware-map': ['aam'],\n 'application/x-authorware-seg': ['aas'],\n 'application/x-bcpio': ['bcpio'],\n 'application/x-bdoc': ['*bdoc'],\n 'application/x-bittorrent': ['torrent'],\n 'application/x-blender': ['blend'],\n 'application/x-blorb': ['blb', 'blorb'],\n 'application/x-bzip': ['bz'],\n 'application/x-bzip2': ['bz2', 'boz'],\n 'application/x-cbr': ['cbr', 'cba', 'cbt', 'cbz', 'cb7'],\n 'application/x-cdlink': ['vcd'],\n 'application/x-cfs-compressed': ['cfs'],\n 'application/x-chat': ['chat'],\n 'application/x-chess-pgn': ['pgn'],\n 'application/x-chrome-extension': ['crx'],\n 'application/x-cocoa': ['cco'],\n 'application/x-compressed': ['*rar'],\n 'application/x-conference': ['nsc'],\n 'application/x-cpio': ['cpio'],\n 'application/x-csh': ['csh'],\n 'application/x-debian-package': ['*deb', 'udeb'],\n 'application/x-dgc-compressed': ['dgc'],\n 'application/x-director': [\n 'dir',\n 'dcr',\n 'dxr',\n 'cst',\n 'cct',\n 'cxt',\n 'w3d',\n 'fgd',\n 'swa',\n ],\n 'application/x-doom': ['wad'],\n 'application/x-dtbncx+xml': ['ncx'],\n 'application/x-dtbook+xml': ['dtb'],\n 'application/x-dtbresource+xml': ['res'],\n 'application/x-dvi': ['dvi'],\n 'application/x-envoy': ['evy'],\n 'application/x-eva': ['eva'],\n 'application/x-font-bdf': ['bdf'],\n 'application/x-font-ghostscript': ['gsf'],\n 'application/x-font-linux-psf': ['psf'],\n 'application/x-font-pcf': ['pcf'],\n 'application/x-font-snf': ['snf'],\n 'application/x-font-type1': ['pfa', 'pfb', 'pfm', 'afm'],\n 'application/x-freearc': ['arc'],\n 'application/x-futuresplash': ['spl'],\n 'application/x-gca-compressed': ['gca'],\n 'application/x-glulx': ['ulx'],\n 'application/x-gnumeric': ['gnumeric'],\n 'application/x-gramps-xml': ['gramps'],\n 'application/x-gtar': ['gtar'],\n 'application/x-hdf': ['hdf'],\n 'application/x-httpd-php': ['php'],\n 'application/x-install-instructions': ['install'],\n 'application/x-ipynb+json': ['ipynb'],\n 'application/x-iso9660-image': ['*iso'],\n 'application/x-iwork-keynote-sffkey': ['*key'],\n 'application/x-iwork-numbers-sffnumbers': ['*numbers'],\n 'application/x-iwork-pages-sffpages': ['*pages'],\n 'application/x-java-archive-diff': ['jardiff'],\n 'application/x-java-jnlp-file': ['jnlp'],\n 'application/x-keepass2': ['kdbx'],\n 'application/x-latex': ['latex'],\n 'application/x-lua-bytecode': ['luac'],\n 'application/x-lzh-compressed': ['lzh', 'lha'],\n 'application/x-makeself': ['run'],\n 'application/x-mie': ['mie'],\n 'application/x-mobipocket-ebook': ['*prc', 'mobi'],\n 'application/x-ms-application': ['application'],\n 'application/x-ms-shortcut': ['lnk'],\n 'application/x-ms-wmd': ['wmd'],\n 'application/x-ms-wmz': ['wmz'],\n 'application/x-ms-xbap': ['xbap'],\n 'application/x-msaccess': ['mdb'],\n 'application/x-msbinder': ['obd'],\n 'application/x-mscardfile': ['crd'],\n 'application/x-msclip': ['clp'],\n 'application/x-msdos-program': ['*exe'],\n 'application/x-msdownload': ['*exe', '*dll', 'com', 'bat', '*msi'],\n 'application/x-msmediaview': ['mvb', 'm13', 'm14'],\n 'application/x-msmetafile': ['*wmf', '*wmz', '*emf', 'emz'],\n 'application/x-msmoney': ['mny'],\n 'application/x-mspublisher': ['pub'],\n 'application/x-msschedule': ['scd'],\n 'application/x-msterminal': ['trm'],\n 'application/x-mswrite': ['wri'],\n 'application/x-netcdf': ['nc', 'cdf'],\n 'application/x-ns-proxy-autoconfig': ['pac'],\n 'application/x-nzb': ['nzb'],\n 'application/x-perl': ['pl', 'pm'],\n 'application/x-pilot': ['*prc', '*pdb'],\n 'application/x-pkcs12': ['p12', 'pfx'],\n 'application/x-pkcs7-certificates': ['p7b', 'spc'],\n 'application/x-pkcs7-certreqresp': ['p7r'],\n 'application/x-rar-compressed': ['*rar'],\n 'application/x-redhat-package-manager': ['rpm'],\n 'application/x-research-info-systems': ['ris'],\n 'application/x-sea': ['sea'],\n 'application/x-sh': ['sh'],\n 'application/x-shar': ['shar'],\n 'application/x-shockwave-flash': ['swf'],\n 'application/x-silverlight-app': ['xap'],\n 'application/x-sql': ['*sql'],\n 'application/x-stuffit': ['sit'],\n 'application/x-stuffitx': ['sitx'],\n 'application/x-subrip': ['srt'],\n 'application/x-sv4cpio': ['sv4cpio'],\n 'application/x-sv4crc': ['sv4crc'],\n 'application/x-t3vm-image': ['t3'],\n 'application/x-tads': ['gam'],\n 'application/x-tar': ['tar'],\n 'application/x-tcl': ['tcl', 'tk'],\n 'application/x-tex': ['tex'],\n 'application/x-tex-tfm': ['tfm'],\n 'application/x-texinfo': ['texinfo', 'texi'],\n 'application/x-tgif': ['*obj'],\n 'application/x-ustar': ['ustar'],\n 'application/x-virtualbox-hdd': ['hdd'],\n 'application/x-virtualbox-ova': ['ova'],\n 'application/x-virtualbox-ovf': ['ovf'],\n 'application/x-virtualbox-vbox': ['vbox'],\n 'application/x-virtualbox-vbox-extpack': ['vbox-extpack'],\n 'application/x-virtualbox-vdi': ['vdi'],\n 'application/x-virtualbox-vhd': ['vhd'],\n 'application/x-virtualbox-vmdk': ['vmdk'],\n 'application/x-wais-source': ['src'],\n 'application/x-web-app-manifest+json': ['webapp'],\n 'application/x-x509-ca-cert': ['der', 'crt', 'pem'],\n 'application/x-xfig': ['fig'],\n 'application/x-xliff+xml': ['*xlf'],\n 'application/x-xpinstall': ['xpi'],\n 'application/x-xz': ['xz'],\n 'application/x-zip-compressed': ['*zip'],\n 'application/x-zmachine': ['z1', 'z2', 'z3', 'z4', 'z5', 'z6', 'z7', 'z8'],\n 'audio/vnd.dece.audio': ['uva', 'uvva'],\n 'audio/vnd.digital-winds': ['eol'],\n 'audio/vnd.dra': ['dra'],\n 'audio/vnd.dts': ['dts'],\n 'audio/vnd.dts.hd': ['dtshd'],\n 'audio/vnd.lucent.voice': ['lvp'],\n 'audio/vnd.ms-playready.media.pya': ['pya'],\n 'audio/vnd.nuera.ecelp4800': ['ecelp4800'],\n 'audio/vnd.nuera.ecelp7470': ['ecelp7470'],\n 'audio/vnd.nuera.ecelp9600': ['ecelp9600'],\n 'audio/vnd.rip': ['rip'],\n 'audio/x-aac': ['*aac'],\n 'audio/x-aiff': ['aif', 'aiff', 'aifc'],\n 'audio/x-caf': ['caf'],\n 'audio/x-flac': ['flac'],\n 'audio/x-m4a': ['*m4a'],\n 'audio/x-matroska': ['mka'],\n 'audio/x-mpegurl': ['m3u'],\n 'audio/x-ms-wax': ['wax'],\n 'audio/x-ms-wma': ['wma'],\n 'audio/x-pn-realaudio': ['ram', 'ra'],\n 'audio/x-pn-realaudio-plugin': ['rmp'],\n 'audio/x-realaudio': ['*ra'],\n 'audio/x-wav': ['*wav'],\n 'chemical/x-cdx': ['cdx'],\n 'chemical/x-cif': ['cif'],\n 'chemical/x-cmdf': ['cmdf'],\n 'chemical/x-cml': ['cml'],\n 'chemical/x-csml': ['csml'],\n 'chemical/x-xyz': ['xyz'],\n 'image/prs.btif': ['btif', 'btf'],\n 'image/prs.pti': ['pti'],\n 'image/vnd.adobe.photoshop': ['psd'],\n 'image/vnd.airzip.accelerator.azv': ['azv'],\n 'image/vnd.dece.graphic': ['uvi', 'uvvi', 'uvg', 'uvvg'],\n 'image/vnd.djvu': ['djvu', 'djv'],\n 'image/vnd.dvb.subtitle': ['*sub'],\n 'image/vnd.dwg': ['dwg'],\n 'image/vnd.dxf': ['dxf'],\n 'image/vnd.fastbidsheet': ['fbs'],\n 'image/vnd.fpx': ['fpx'],\n 'image/vnd.fst': ['fst'],\n 'image/vnd.fujixerox.edmics-mmr': ['mmr'],\n 'image/vnd.fujixerox.edmics-rlc': ['rlc'],\n 'image/vnd.microsoft.icon': ['ico'],\n 'image/vnd.ms-dds': ['dds'],\n 'image/vnd.ms-modi': ['mdi'],\n 'image/vnd.ms-photo': ['wdp'],\n 'image/vnd.net-fpx': ['npx'],\n 'image/vnd.pco.b16': ['b16'],\n 'image/vnd.tencent.tap': ['tap'],\n 'image/vnd.valve.source.texture': ['vtf'],\n 'image/vnd.wap.wbmp': ['wbmp'],\n 'image/vnd.xiff': ['xif'],\n 'image/vnd.zbrush.pcx': ['pcx'],\n 'image/x-3ds': ['3ds'],\n 'image/x-adobe-dng': ['dng'],\n 'image/x-cmu-raster': ['ras'],\n 'image/x-cmx': ['cmx'],\n 'image/x-freehand': ['fh', 'fhc', 'fh4', 'fh5', 'fh7'],\n 'image/x-icon': ['*ico'],\n 'image/x-jng': ['jng'],\n 'image/x-mrsid-image': ['sid'],\n 'image/x-ms-bmp': ['*bmp'],\n 'image/x-pcx': ['*pcx'],\n 'image/x-pict': ['pic', 'pct'],\n 'image/x-portable-anymap': ['pnm'],\n 'image/x-portable-bitmap': ['pbm'],\n 'image/x-portable-graymap': ['pgm'],\n 'image/x-portable-pixmap': ['ppm'],\n 'image/x-rgb': ['rgb'],\n 'image/x-tga': ['tga'],\n 'image/x-xbitmap': ['xbm'],\n 'image/x-xpixmap': ['xpm'],\n 'image/x-xwindowdump': ['xwd'],\n 'message/vnd.wfa.wsc': ['wsc'],\n 'model/vnd.bary': ['bary'],\n 'model/vnd.cld': ['cld'],\n 'model/vnd.collada+xml': ['dae'],\n 'model/vnd.dwf': ['dwf'],\n 'model/vnd.gdl': ['gdl'],\n 'model/vnd.gtw': ['gtw'],\n 'model/vnd.mts': ['*mts'],\n 'model/vnd.opengex': ['ogex'],\n 'model/vnd.parasolid.transmit.binary': ['x_b'],\n 'model/vnd.parasolid.transmit.text': ['x_t'],\n 'model/vnd.pytha.pyox': ['pyo', 'pyox'],\n 'model/vnd.sap.vds': ['vds'],\n 'model/vnd.usda': ['usda'],\n 'model/vnd.usdz+zip': ['usdz'],\n 'model/vnd.valve.source.compiled-map': ['bsp'],\n 'model/vnd.vtu': ['vtu'],\n 'text/prs.lines.tag': ['dsc'],\n 'text/vnd.curl': ['curl'],\n 'text/vnd.curl.dcurl': ['dcurl'],\n 'text/vnd.curl.mcurl': ['mcurl'],\n 'text/vnd.curl.scurl': ['scurl'],\n 'text/vnd.dvb.subtitle': ['sub'],\n 'text/vnd.familysearch.gedcom': ['ged'],\n 'text/vnd.fly': ['fly'],\n 'text/vnd.fmi.flexstor': ['flx'],\n 'text/vnd.graphviz': ['gv'],\n 'text/vnd.in3d.3dml': ['3dml'],\n 'text/vnd.in3d.spot': ['spot'],\n 'text/vnd.sun.j2me.app-descriptor': ['jad'],\n 'text/vnd.wap.wml': ['wml'],\n 'text/vnd.wap.wmlscript': ['wmls'],\n 'text/x-asm': ['s', 'asm'],\n 'text/x-c': ['c', 'cc', 'cxx', 'cpp', 'h', 'hh', 'dic'],\n 'text/x-component': ['htc'],\n 'text/x-fortran': ['f', 'for', 'f77', 'f90'],\n 'text/x-handlebars-template': ['hbs'],\n 'text/x-java-source': ['java'],\n 'text/x-lua': ['lua'],\n 'text/x-markdown': ['mkd'],\n 'text/x-nfo': ['nfo'],\n 'text/x-opml': ['opml'],\n 'text/x-org': ['*org'],\n 'text/x-pascal': ['p', 'pas'],\n 'text/x-processing': ['pde'],\n 'text/x-sass': ['sass'],\n 'text/x-scss': ['scss'],\n 'text/x-setext': ['etx'],\n 'text/x-sfv': ['sfv'],\n 'text/x-suse-ymp': ['ymp'],\n 'text/x-uuencode': ['uu'],\n 'text/x-vcalendar': ['vcs'],\n 'text/x-vcard': ['vcf'],\n 'video/vnd.dece.hd': ['uvh', 'uvvh'],\n 'video/vnd.dece.mobile': ['uvm', 'uvvm'],\n 'video/vnd.dece.pd': ['uvp', 'uvvp'],\n 'video/vnd.dece.sd': ['uvs', 'uvvs'],\n 'video/vnd.dece.video': ['uvv', 'uvvv'],\n 'video/vnd.dvb.file': ['dvb'],\n 'video/vnd.fvt': ['fvt'],\n 'video/vnd.mpegurl': ['mxu', 'm4u'],\n 'video/vnd.ms-playready.media.pyv': ['pyv'],\n 'video/vnd.uvvu.mp4': ['uvu', 'uvvu'],\n 'video/vnd.vivo': ['viv'],\n 'video/x-f4v': ['f4v'],\n 'video/x-fli': ['fli'],\n 'video/x-flv': ['flv'],\n 'video/x-m4v': ['m4v'],\n 'video/x-matroska': ['mkv', 'mk3d', 'mks'],\n 'video/x-mng': ['mng'],\n 'video/x-ms-asf': ['asf', 'asx'],\n 'video/x-ms-vob': ['vob'],\n 'video/x-ms-wm': ['wm'],\n 'video/x-ms-wmv': ['wmv'],\n 'video/x-ms-wmx': ['wmx'],\n 'video/x-ms-wvx': ['wvx'],\n 'video/x-msvideo': ['avi'],\n 'video/x-sgi-movie': ['movie'],\n 'video/x-smv': ['smv'],\n 'x-conference/x-cooltalk': ['ice'],\n};\nObject.freeze(types);\nexport default types;\n","const types = {\n 'application/andrew-inset': ['ez'],\n 'application/appinstaller': ['appinstaller'],\n 'application/applixware': ['aw'],\n 'application/appx': ['appx'],\n 'application/appxbundle': ['appxbundle'],\n 'application/atom+xml': ['atom'],\n 'application/atomcat+xml': ['atomcat'],\n 'application/atomdeleted+xml': ['atomdeleted'],\n 'application/atomsvc+xml': ['atomsvc'],\n 'application/atsc-dwd+xml': ['dwd'],\n 'application/atsc-held+xml': ['held'],\n 'application/atsc-rsat+xml': ['rsat'],\n 'application/automationml-aml+xml': ['aml'],\n 'application/automationml-amlx+zip': ['amlx'],\n 'application/bdoc': ['bdoc'],\n 'application/calendar+xml': ['xcs'],\n 'application/ccxml+xml': ['ccxml'],\n 'application/cdfx+xml': ['cdfx'],\n 'application/cdmi-capability': ['cdmia'],\n 'application/cdmi-container': ['cdmic'],\n 'application/cdmi-domain': ['cdmid'],\n 'application/cdmi-object': ['cdmio'],\n 'application/cdmi-queue': ['cdmiq'],\n 'application/cpl+xml': ['cpl'],\n 'application/cu-seeme': ['cu'],\n 'application/cwl': ['cwl'],\n 'application/dash+xml': ['mpd'],\n 'application/dash-patch+xml': ['mpp'],\n 'application/davmount+xml': ['davmount'],\n 'application/dicom': ['dcm'],\n 'application/docbook+xml': ['dbk'],\n 'application/dssc+der': ['dssc'],\n 'application/dssc+xml': ['xdssc'],\n 'application/ecmascript': ['ecma'],\n 'application/emma+xml': ['emma'],\n 'application/emotionml+xml': ['emotionml'],\n 'application/epub+zip': ['epub'],\n 'application/exi': ['exi'],\n 'application/express': ['exp'],\n 'application/fdf': ['fdf'],\n 'application/fdt+xml': ['fdt'],\n 'application/font-tdpfr': ['pfr'],\n 'application/geo+json': ['geojson'],\n 'application/gml+xml': ['gml'],\n 'application/gpx+xml': ['gpx'],\n 'application/gxf': ['gxf'],\n 'application/gzip': ['gz'],\n 'application/hjson': ['hjson'],\n 'application/hyperstudio': ['stk'],\n 'application/inkml+xml': ['ink', 'inkml'],\n 'application/ipfix': ['ipfix'],\n 'application/its+xml': ['its'],\n 'application/java-archive': ['jar', 'war', 'ear'],\n 'application/java-serialized-object': ['ser'],\n 'application/java-vm': ['class'],\n 'application/javascript': ['*js'],\n 'application/json': ['json', 'map'],\n 'application/json5': ['json5'],\n 'application/jsonml+json': ['jsonml'],\n 'application/ld+json': ['jsonld'],\n 'application/lgr+xml': ['lgr'],\n 'application/lost+xml': ['lostxml'],\n 'application/mac-binhex40': ['hqx'],\n 'application/mac-compactpro': ['cpt'],\n 'application/mads+xml': ['mads'],\n 'application/manifest+json': ['webmanifest'],\n 'application/marc': ['mrc'],\n 'application/marcxml+xml': ['mrcx'],\n 'application/mathematica': ['ma', 'nb', 'mb'],\n 'application/mathml+xml': ['mathml'],\n 'application/mbox': ['mbox'],\n 'application/media-policy-dataset+xml': ['mpf'],\n 'application/mediaservercontrol+xml': ['mscml'],\n 'application/metalink+xml': ['metalink'],\n 'application/metalink4+xml': ['meta4'],\n 'application/mets+xml': ['mets'],\n 'application/mmt-aei+xml': ['maei'],\n 'application/mmt-usd+xml': ['musd'],\n 'application/mods+xml': ['mods'],\n 'application/mp21': ['m21', 'mp21'],\n 'application/mp4': ['*mp4', '*mpg4', 'mp4s', 'm4p'],\n 'application/msix': ['msix'],\n 'application/msixbundle': ['msixbundle'],\n 'application/msword': ['doc', 'dot'],\n 'application/mxf': ['mxf'],\n 'application/n-quads': ['nq'],\n 'application/n-triples': ['nt'],\n 'application/node': ['cjs'],\n 'application/octet-stream': [\n 'bin',\n 'dms',\n 'lrf',\n 'mar',\n 'so',\n 'dist',\n 'distz',\n 'pkg',\n 'bpk',\n 'dump',\n 'elc',\n 'deploy',\n 'exe',\n 'dll',\n 'deb',\n 'dmg',\n 'iso',\n 'img',\n 'msi',\n 'msp',\n 'msm',\n 'buffer',\n ],\n 'application/oda': ['oda'],\n 'application/oebps-package+xml': ['opf'],\n 'application/ogg': ['ogx'],\n 'application/omdoc+xml': ['omdoc'],\n 'application/onenote': [\n 'onetoc',\n 'onetoc2',\n 'onetmp',\n 'onepkg',\n 'one',\n 'onea',\n ],\n 'application/oxps': ['oxps'],\n 'application/p2p-overlay+xml': ['relo'],\n 'application/patch-ops-error+xml': ['xer'],\n 'application/pdf': ['pdf'],\n 'application/pgp-encrypted': ['pgp'],\n 'application/pgp-keys': ['asc'],\n 'application/pgp-signature': ['sig', '*asc'],\n 'application/pics-rules': ['prf'],\n 'application/pkcs10': ['p10'],\n 'application/pkcs7-mime': ['p7m', 'p7c'],\n 'application/pkcs7-signature': ['p7s'],\n 'application/pkcs8': ['p8'],\n 'application/pkix-attr-cert': ['ac'],\n 'application/pkix-cert': ['cer'],\n 'application/pkix-crl': ['crl'],\n 'application/pkix-pkipath': ['pkipath'],\n 'application/pkixcmp': ['pki'],\n 'application/pls+xml': ['pls'],\n 'application/postscript': ['ai', 'eps', 'ps'],\n 'application/provenance+xml': ['provx'],\n 'application/pskc+xml': ['pskcxml'],\n 'application/raml+yaml': ['raml'],\n 'application/rdf+xml': ['rdf', 'owl'],\n 'application/reginfo+xml': ['rif'],\n 'application/relax-ng-compact-syntax': ['rnc'],\n 'application/resource-lists+xml': ['rl'],\n 'application/resource-lists-diff+xml': ['rld'],\n 'application/rls-services+xml': ['rs'],\n 'application/route-apd+xml': ['rapd'],\n 'application/route-s-tsid+xml': ['sls'],\n 'application/route-usd+xml': ['rusd'],\n 'application/rpki-ghostbusters': ['gbr'],\n 'application/rpki-manifest': ['mft'],\n 'application/rpki-roa': ['roa'],\n 'application/rsd+xml': ['rsd'],\n 'application/rss+xml': ['rss'],\n 'application/rtf': ['rtf'],\n 'application/sbml+xml': ['sbml'],\n 'application/scvp-cv-request': ['scq'],\n 'application/scvp-cv-response': ['scs'],\n 'application/scvp-vp-request': ['spq'],\n 'application/scvp-vp-response': ['spp'],\n 'application/sdp': ['sdp'],\n 'application/senml+xml': ['senmlx'],\n 'application/sensml+xml': ['sensmlx'],\n 'application/set-payment-initiation': ['setpay'],\n 'application/set-registration-initiation': ['setreg'],\n 'application/shf+xml': ['shf'],\n 'application/sieve': ['siv', 'sieve'],\n 'application/smil+xml': ['smi', 'smil'],\n 'application/sparql-query': ['rq'],\n 'application/sparql-results+xml': ['srx'],\n 'application/sql': ['sql'],\n 'application/srgs': ['gram'],\n 'application/srgs+xml': ['grxml'],\n 'application/sru+xml': ['sru'],\n 'application/ssdl+xml': ['ssdl'],\n 'application/ssml+xml': ['ssml'],\n 'application/swid+xml': ['swidtag'],\n 'application/tei+xml': ['tei', 'teicorpus'],\n 'application/thraud+xml': ['tfi'],\n 'application/timestamped-data': ['tsd'],\n 'application/toml': ['toml'],\n 'application/trig': ['trig'],\n 'application/ttml+xml': ['ttml'],\n 'application/ubjson': ['ubj'],\n 'application/urc-ressheet+xml': ['rsheet'],\n 'application/urc-targetdesc+xml': ['td'],\n 'application/voicexml+xml': ['vxml'],\n 'application/wasm': ['wasm'],\n 'application/watcherinfo+xml': ['wif'],\n 'application/widget': ['wgt'],\n 'application/winhlp': ['hlp'],\n 'application/wsdl+xml': ['wsdl'],\n 'application/wspolicy+xml': ['wspolicy'],\n 'application/xaml+xml': ['xaml'],\n 'application/xcap-att+xml': ['xav'],\n 'application/xcap-caps+xml': ['xca'],\n 'application/xcap-diff+xml': ['xdf'],\n 'application/xcap-el+xml': ['xel'],\n 'application/xcap-ns+xml': ['xns'],\n 'application/xenc+xml': ['xenc'],\n 'application/xfdf': ['xfdf'],\n 'application/xhtml+xml': ['xhtml', 'xht'],\n 'application/xliff+xml': ['xlf'],\n 'application/xml': ['xml', 'xsl', 'xsd', 'rng'],\n 'application/xml-dtd': ['dtd'],\n 'application/xop+xml': ['xop'],\n 'application/xproc+xml': ['xpl'],\n 'application/xslt+xml': ['*xsl', 'xslt'],\n 'application/xspf+xml': ['xspf'],\n 'application/xv+xml': ['mxml', 'xhvml', 'xvml', 'xvm'],\n 'application/yang': ['yang'],\n 'application/yin+xml': ['yin'],\n 'application/zip': ['zip'],\n 'application/zip+dotlottie': ['lottie'],\n 'audio/3gpp': ['*3gpp'],\n 'audio/aac': ['adts', 'aac'],\n 'audio/adpcm': ['adp'],\n 'audio/amr': ['amr'],\n 'audio/basic': ['au', 'snd'],\n 'audio/midi': ['mid', 'midi', 'kar', 'rmi'],\n 'audio/mobile-xmf': ['mxmf'],\n 'audio/mp3': ['*mp3'],\n 'audio/mp4': ['m4a', 'mp4a', 'm4b'],\n 'audio/mpeg': ['mpga', 'mp2', 'mp2a', 'mp3', 'm2a', 'm3a'],\n 'audio/ogg': ['oga', 'ogg', 'spx', 'opus'],\n 'audio/s3m': ['s3m'],\n 'audio/silk': ['sil'],\n 'audio/wav': ['wav'],\n 'audio/wave': ['*wav'],\n 'audio/webm': ['weba'],\n 'audio/xm': ['xm'],\n 'font/collection': ['ttc'],\n 'font/otf': ['otf'],\n 'font/ttf': ['ttf'],\n 'font/woff': ['woff'],\n 'font/woff2': ['woff2'],\n 'image/aces': ['exr'],\n 'image/apng': ['apng'],\n 'image/avci': ['avci'],\n 'image/avcs': ['avcs'],\n 'image/avif': ['avif'],\n 'image/bmp': ['bmp', 'dib'],\n 'image/cgm': ['cgm'],\n 'image/dicom-rle': ['drle'],\n 'image/dpx': ['dpx'],\n 'image/emf': ['emf'],\n 'image/fits': ['fits'],\n 'image/g3fax': ['g3'],\n 'image/gif': ['gif'],\n 'image/heic': ['heic'],\n 'image/heic-sequence': ['heics'],\n 'image/heif': ['heif'],\n 'image/heif-sequence': ['heifs'],\n 'image/hej2k': ['hej2'],\n 'image/ief': ['ief'],\n 'image/jaii': ['jaii'],\n 'image/jais': ['jais'],\n 'image/jls': ['jls'],\n 'image/jp2': ['jp2', 'jpg2'],\n 'image/jpeg': ['jpg', 'jpeg', 'jpe'],\n 'image/jph': ['jph'],\n 'image/jphc': ['jhc'],\n 'image/jpm': ['jpm', 'jpgm'],\n 'image/jpx': ['jpx', 'jpf'],\n 'image/jxl': ['jxl'],\n 'image/jxr': ['jxr'],\n 'image/jxra': ['jxra'],\n 'image/jxrs': ['jxrs'],\n 'image/jxs': ['jxs'],\n 'image/jxsc': ['jxsc'],\n 'image/jxsi': ['jxsi'],\n 'image/jxss': ['jxss'],\n 'image/ktx': ['ktx'],\n 'image/ktx2': ['ktx2'],\n 'image/pjpeg': ['jfif'],\n 'image/png': ['png'],\n 'image/sgi': ['sgi'],\n 'image/svg+xml': ['svg', 'svgz'],\n 'image/t38': ['t38'],\n 'image/tiff': ['tif', 'tiff'],\n 'image/tiff-fx': ['tfx'],\n 'image/webp': ['webp'],\n 'image/wmf': ['wmf'],\n 'message/disposition-notification': ['disposition-notification'],\n 'message/global': ['u8msg'],\n 'message/global-delivery-status': ['u8dsn'],\n 'message/global-disposition-notification': ['u8mdn'],\n 'message/global-headers': ['u8hdr'],\n 'message/rfc822': ['eml', 'mime', 'mht', 'mhtml'],\n 'model/3mf': ['3mf'],\n 'model/gltf+json': ['gltf'],\n 'model/gltf-binary': ['glb'],\n 'model/iges': ['igs', 'iges'],\n 'model/jt': ['jt'],\n 'model/mesh': ['msh', 'mesh', 'silo'],\n 'model/mtl': ['mtl'],\n 'model/obj': ['obj'],\n 'model/prc': ['prc'],\n 'model/step': ['step', 'stp', 'stpnc', 'p21', '210'],\n 'model/step+xml': ['stpx'],\n 'model/step+zip': ['stpz'],\n 'model/step-xml+zip': ['stpxz'],\n 'model/stl': ['stl'],\n 'model/u3d': ['u3d'],\n 'model/vrml': ['wrl', 'vrml'],\n 'model/x3d+binary': ['*x3db', 'x3dbz'],\n 'model/x3d+fastinfoset': ['x3db'],\n 'model/x3d+vrml': ['*x3dv', 'x3dvz'],\n 'model/x3d+xml': ['x3d', 'x3dz'],\n 'model/x3d-vrml': ['x3dv'],\n 'text/cache-manifest': ['appcache', 'manifest'],\n 'text/calendar': ['ics', 'ifb'],\n 'text/coffeescript': ['coffee', 'litcoffee'],\n 'text/css': ['css'],\n 'text/csv': ['csv'],\n 'text/html': ['html', 'htm', 'shtml'],\n 'text/jade': ['jade'],\n 'text/javascript': ['js', 'mjs'],\n 'text/jsx': ['jsx'],\n 'text/less': ['less'],\n 'text/markdown': ['md', 'markdown'],\n 'text/mathml': ['mml'],\n 'text/mdx': ['mdx'],\n 'text/n3': ['n3'],\n 'text/plain': ['txt', 'text', 'conf', 'def', 'list', 'log', 'in', 'ini'],\n 'text/richtext': ['rtx'],\n 'text/rtf': ['*rtf'],\n 'text/sgml': ['sgml', 'sgm'],\n 'text/shex': ['shex'],\n 'text/slim': ['slim', 'slm'],\n 'text/spdx': ['spdx'],\n 'text/stylus': ['stylus', 'styl'],\n 'text/tab-separated-values': ['tsv'],\n 'text/troff': ['t', 'tr', 'roff', 'man', 'me', 'ms'],\n 'text/turtle': ['ttl'],\n 'text/uri-list': ['uri', 'uris', 'urls'],\n 'text/vcard': ['vcard'],\n 'text/vtt': ['vtt'],\n 'text/wgsl': ['wgsl'],\n 'text/xml': ['*xml'],\n 'text/yaml': ['yaml', 'yml'],\n 'video/3gpp': ['3gp', '3gpp'],\n 'video/3gpp2': ['3g2'],\n 'video/h261': ['h261'],\n 'video/h263': ['h263'],\n 'video/h264': ['h264'],\n 'video/iso.segment': ['m4s'],\n 'video/jpeg': ['jpgv'],\n 'video/jpm': ['*jpm', '*jpgm'],\n 'video/mj2': ['mj2', 'mjp2'],\n 'video/mp2t': ['ts', 'm2t', 'm2ts', 'mts'],\n 'video/mp4': ['mp4', 'mp4v', 'mpg4'],\n 'video/mpeg': ['mpeg', 'mpg', 'mpe', 'm1v', 'm2v'],\n 'video/ogg': ['ogv'],\n 'video/quicktime': ['qt', 'mov'],\n 'video/webm': ['webm'],\n};\nObject.freeze(types);\nexport default types;\n","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n 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\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _Mime_extensionToType, _Mime_typeToExtension, _Mime_typeToExtensions;\nclass Mime {\n constructor(...args) {\n _Mime_extensionToType.set(this, new Map());\n _Mime_typeToExtension.set(this, new Map());\n _Mime_typeToExtensions.set(this, new Map());\n for (const arg of args) {\n this.define(arg);\n }\n }\n define(typeMap, force = false) {\n for (let [type, extensions] of Object.entries(typeMap)) {\n type = type.toLowerCase();\n extensions = extensions.map((ext) => ext.toLowerCase());\n if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, \"f\").has(type)) {\n __classPrivateFieldGet(this, _Mime_typeToExtensions, \"f\").set(type, new Set());\n }\n const allExtensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, \"f\").get(type);\n let first = true;\n for (let extension of extensions) {\n const starred = extension.startsWith('*');\n extension = starred ? extension.slice(1) : extension;\n allExtensions?.add(extension);\n if (first) {\n __classPrivateFieldGet(this, _Mime_typeToExtension, \"f\").set(type, extension);\n }\n first = false;\n if (starred)\n continue;\n const currentType = __classPrivateFieldGet(this, _Mime_extensionToType, \"f\").get(extension);\n if (currentType && currentType != type && !force) {\n throw new Error(`\"${type} -> ${extension}\" conflicts with \"${currentType} -> ${extension}\". Pass \\`force=true\\` to override this definition.`);\n }\n __classPrivateFieldGet(this, _Mime_extensionToType, \"f\").set(extension, type);\n }\n }\n return this;\n }\n getType(path) {\n if (typeof path !== 'string')\n return null;\n const last = path.replace(/^.*[/\\\\]/s, '').toLowerCase();\n const ext = last.replace(/^.*\\./s, '').toLowerCase();\n const hasPath = last.length < path.length;\n const hasDot = ext.length < last.length - 1;\n if (!hasDot && hasPath)\n return null;\n return __classPrivateFieldGet(this, _Mime_extensionToType, \"f\").get(ext) ?? null;\n }\n getExtension(type) {\n if (typeof type !== 'string')\n return null;\n type = type?.split?.(';')[0];\n return ((type && __classPrivateFieldGet(this, _Mime_typeToExtension, \"f\").get(type.trim().toLowerCase())) ?? null);\n }\n getAllExtensions(type) {\n if (typeof type !== 'string')\n return null;\n return __classPrivateFieldGet(this, _Mime_typeToExtensions, \"f\").get(type.toLowerCase()) ?? null;\n }\n _freeze() {\n this.define = () => {\n throw new Error('define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances');\n };\n Object.freeze(this);\n for (const extensions of __classPrivateFieldGet(this, _Mime_typeToExtensions, \"f\").values()) {\n Object.freeze(extensions);\n }\n return this;\n }\n _getTestState() {\n return {\n types: __classPrivateFieldGet(this, _Mime_extensionToType, \"f\"),\n extensions: __classPrivateFieldGet(this, _Mime_typeToExtension, \"f\"),\n };\n }\n}\n_Mime_extensionToType = new WeakMap(), _Mime_typeToExtension = new WeakMap(), _Mime_typeToExtensions = new WeakMap();\nexport default Mime;\n","import otherTypes from '../types/other.js';\nimport standardTypes from '../types/standard.js';\nimport Mime from './Mime.js';\nexport { default as Mime } from './Mime.js';\nexport default new Mime(standardTypes, otherTypes)._freeze();\n","import { readFileSync } from \"node:fs\";\nimport { isAbsolute, resolve, sep } from \"node:path\";\nimport ignore from \"ignore\";\nimport mime from \"mime\";\nimport {\n\tCF_ASSETS_IGNORE_FILENAME,\n\tHEADERS_FILENAME,\n\tREDIRECTS_FILENAME,\n} from \"./constants\";\nimport type { PathOrFileDescriptor } from \"node:fs\";\n\n/** normalises sep for windows and prefix with `/` */\nexport const normalizeFilePath = (relativeFilepath: string) => {\n\tif (isAbsolute(relativeFilepath)) {\n\t\tthrow new Error(`Expected relative path`);\n\t}\n\treturn \"/\" + relativeFilepath.split(sep).join(\"/\");\n};\n\nexport const getContentType = (absFilePath: string) => {\n\tlet contentType = mime.getType(absFilePath);\n\tif (\n\t\tcontentType &&\n\t\tcontentType.startsWith(\"text/\") &&\n\t\t!contentType.includes(\"charset\")\n\t) {\n\t\tcontentType = `${contentType}; charset=utf-8`;\n\t}\n\treturn contentType;\n};\n\n/**\n * Generate a function that can match relative filepaths against a list of gitignore formatted patterns.\n */\nexport function createPatternMatcher(\n\tpatterns: string[],\n\texclude: boolean\n): (filePath: string) => boolean {\n\tif (patterns.length === 0) {\n\t\treturn (_filePath) => !exclude;\n\t} else {\n\t\tconst ignorer = ignore().add(patterns);\n\t\treturn (filePath) => ignorer.test(filePath).ignored;\n\t}\n}\n\nexport function thrownIsDoesNotExistError(\n\tthrown: unknown\n): thrown is Error & { code: \"ENOENT\" } {\n\treturn (\n\t\tthrown instanceof Error && \"code\" in thrown && thrown.code === \"ENOENT\"\n\t);\n}\n\nexport function maybeGetFile(filePath: PathOrFileDescriptor) {\n\ttry {\n\t\treturn readFileSync(filePath, \"utf8\");\n\t} catch (e: unknown) {\n\t\tif (!thrownIsDoesNotExistError(e)) {\n\t\t\tthrow e;\n\t\t}\n\t}\n}\n\n/**\n * Create a function for filtering out ignored assets.\n *\n * The generated function takes an asset path, relative to the asset directory,\n * and returns true if the asset should not be ignored.\n */\nexport async function createAssetsIgnoreFunction(dir: string) {\n\tconst cfAssetIgnorePath = resolve(dir, CF_ASSETS_IGNORE_FILENAME);\n\n\tconst ignorePatterns = [\n\t\t// Ignore the `.assetsignore` file and other metafiles by default.\n\t\t// The ignore lib expects unix-style paths for its patterns\n\t\t`/${CF_ASSETS_IGNORE_FILENAME}`,\n\t\t`/${REDIRECTS_FILENAME}`,\n\t\t`/${HEADERS_FILENAME}`,\n\t];\n\n\tlet assetsIgnoreFilePresent = false;\n\tconst assetsIgnore = maybeGetFile(cfAssetIgnorePath);\n\tif (assetsIgnore !== undefined) {\n\t\tassetsIgnoreFilePresent = true;\n\t\tignorePatterns.push(...assetsIgnore.split(\"\\n\"));\n\t}\n\n\treturn {\n\t\tassetsIgnoreFunction: createPatternMatcher(ignorePatterns, true),\n\t\tassetsIgnoreFilePresent,\n\t};\n}\n","var util;\n(function (util) {\n util.assertEqual = (val) => val;\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array\n .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n .join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (util = {}));\nvar objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (objectUtil = {}));\nconst ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nconst getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then &&\n typeof data.then === \"function\" &&\n data.catch &&\n typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n};\n\nconst ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nclass ZodError extends Error {\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n get errors() {\n return this.issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `smaller than or equal to`\n : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\n\nlet overrideErrorMap = errorMap;\nfunction setErrorMap(map) {\n overrideErrorMap = map;\n}\nfunction getErrorMap() {\n return overrideErrorMap;\n}\n\nconst makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message || errorMessage,\n };\n};\nconst EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n const issue = makeIssue({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nclass ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n syncPairs.push({\n key: await pair.key,\n value: await pair.value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" &&\n (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nconst INVALID = Object.freeze({\n status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nconst OK = (value) => ({ status: \"valid\", value });\nconst isAborted = (x) => x.status === \"aborted\";\nconst isDirty = (x) => x.status === \"dirty\";\nconst isValid = (x) => x.status === \"valid\";\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n\nvar errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil || (errorUtil = {}));\n\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (this._key instanceof Array) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n if (typeof ctx.data === \"undefined\") {\n return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };\n }\n return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nclass ZodType {\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n }\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n var _a;\n const ctx = {\n common: {\n issues: [],\n async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n async: true,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult)\n ? maybeAsyncResult\n : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\"\n ? refinementData(val, ctx)\n : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this, this._def);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[a-z][a-z0-9]*$/;\nconst ulidRegex = /[0-9A-HJKMNP-TV-Z]{26}/;\n// const uuidRegex =\n// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n// /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n// /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_+-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n// /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst emojiRegex = /^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$/u;\nconst ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;\nconst ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\n// Adapted from https://stackoverflow.com/a/3143231\nconst datetimeRegex = (args) => {\n if (args.precision) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}Z$`);\n }\n }\n else if (args.precision === 0) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}Z$`);\n }\n }\n else {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?Z$`);\n }\n }\n};\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nclass ZodString extends ZodType {\n constructor() {\n super(...arguments);\n this._regex = (regex, validation, message) => this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message),\n });\n /**\n * @deprecated Use z.string().min(1) instead.\n * @see {@link ZodString.min}\n */\n this.nonempty = (message) => this.min(1, errorUtil.errToObj(message));\n this.trim = () => new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n this.toLowerCase = () => new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n this.toUpperCase = () => new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx.parsedType,\n }\n //\n );\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch (_a) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n var _a;\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options === null || options === void 0 ? void 0 : options.position,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message),\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodString.create = (params) => {\n var _a;\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null, min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" ||\n ch.kind === \"int\" ||\n ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = BigInt(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodBigInt.create = (params) => {\n var _a;\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\nclass ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_date,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nclass ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nclass ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nclass ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nclass ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nclass ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nclass ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n}\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nclass ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nclass ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nclass ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape<T, Augmentation>,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util.objectKeys(shape);\n return (this._cached = { shape, keys });\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever &&\n this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") ;\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n syncPairs.push({\n key,\n value: await pair.value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n var _a, _b, _c, _d;\n const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // <Def extends ZodObjectDef>(def: Def) =>\n // <Augmentation extends ZodRawShape>(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape<ReturnType<Def[\"shape\"]>, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge<Incoming extends AnyZodObject>(\n // merging: Incoming\n // ): //ZodObject<T & Incoming[\"_shape\"], UnknownKeys, Catchall> = (merging) => {\n // ZodObject<\n // extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n util.objectKeys(mask).forEach((key) => {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n}\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nclass ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError(issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return Object.keys(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else {\n return null;\n }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nfunction mergeValues(a, b) {\n const aType = getParsedType(a);\n const bType = getParsedType(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b);\n const sharedKeys = util\n .objectKeys(a)\n .filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === ZodParsedType.date &&\n bType === ZodParsedType.date &&\n +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nclass ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types,\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\nclass ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nclass ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nclass ZodMap extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nclass ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nclass ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(async function (...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args\n .parseAsync(args, params)\n .catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(function (...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args\n ? args\n : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nclass ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nclass ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nclass ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (this._def.values.indexOf(input.data) === -1) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values) {\n return ZodEnum.create(values);\n }\n exclude(values) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));\n }\n}\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string &&\n ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (nativeEnumValues.indexOf(input.data) === -1) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nclass ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise &&\n ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise\n ? ctx.data\n : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nclass ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.issues.length) {\n return {\n status: \"dirty\",\n value: ctx.data,\n };\n }\n if (ctx.common.async) {\n return Promise.resolve(processed).then((processed) => {\n return this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n });\n }\n else {\n return this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc\n // effect: RefinementEffect<any>\n ) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!isValid(base))\n return base;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((base) => {\n if (!isValid(base))\n return base;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n });\n }\n }\n util.assertNever(effect);\n }\n}\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nclass ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nclass ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nclass ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\"\n ? params.default\n : () => params.default,\n ...processCreateParams(params),\n });\n};\nclass ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if (isAsync(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nclass ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nconst BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nclass ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nclass ZodReadonly extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n if (isValid(result)) {\n result.value = Object.freeze(result.value);\n }\n return result;\n }\n}\nZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params),\n });\n};\nconst custom = (check, params = {}, \n/*\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) => {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n var _a, _b;\n if (!check(data)) {\n const p = typeof params === \"function\"\n ? params(data)\n : typeof params === \"string\"\n ? { message: params }\n : params;\n const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n ctx.addIssue({ code: \"custom\", ...p2, fatal: _fatal });\n }\n });\n return ZodAny.create();\n};\nconst late = {\n object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\nconst instanceOfType = (\n// const instanceOfType = <T extends new (...args: any[]) => any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nconst coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nconst NEVER = INVALID;\n\nvar z = /*#__PURE__*/Object.freeze({\n __proto__: null,\n defaultErrorMap: errorMap,\n setErrorMap: setErrorMap,\n getErrorMap: getErrorMap,\n makeIssue: makeIssue,\n EMPTY_PATH: EMPTY_PATH,\n addIssueToContext: addIssueToContext,\n ParseStatus: ParseStatus,\n INVALID: INVALID,\n DIRTY: DIRTY,\n OK: OK,\n isAborted: isAborted,\n isDirty: isDirty,\n isValid: isValid,\n isAsync: isAsync,\n get util () { return util; },\n get objectUtil () { return objectUtil; },\n ZodParsedType: ZodParsedType,\n getParsedType: getParsedType,\n ZodType: ZodType,\n ZodString: ZodString,\n ZodNumber: ZodNumber,\n ZodBigInt: ZodBigInt,\n ZodBoolean: ZodBoolean,\n ZodDate: ZodDate,\n ZodSymbol: ZodSymbol,\n ZodUndefined: ZodUndefined,\n ZodNull: ZodNull,\n ZodAny: ZodAny,\n ZodUnknown: ZodUnknown,\n ZodNever: ZodNever,\n ZodVoid: ZodVoid,\n ZodArray: ZodArray,\n ZodObject: ZodObject,\n ZodUnion: ZodUnion,\n ZodDiscriminatedUnion: ZodDiscriminatedUnion,\n ZodIntersection: ZodIntersection,\n ZodTuple: ZodTuple,\n ZodRecord: ZodRecord,\n ZodMap: ZodMap,\n ZodSet: ZodSet,\n ZodFunction: ZodFunction,\n ZodLazy: ZodLazy,\n ZodLiteral: ZodLiteral,\n ZodEnum: ZodEnum,\n ZodNativeEnum: ZodNativeEnum,\n ZodPromise: ZodPromise,\n ZodEffects: ZodEffects,\n ZodTransformer: ZodEffects,\n ZodOptional: ZodOptional,\n ZodNullable: ZodNullable,\n ZodDefault: ZodDefault,\n ZodCatch: ZodCatch,\n ZodNaN: ZodNaN,\n BRAND: BRAND,\n ZodBranded: ZodBranded,\n ZodPipeline: ZodPipeline,\n ZodReadonly: ZodReadonly,\n custom: custom,\n Schema: ZodType,\n ZodSchema: ZodType,\n late: late,\n get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },\n coerce: coerce,\n any: anyType,\n array: arrayType,\n bigint: bigIntType,\n boolean: booleanType,\n date: dateType,\n discriminatedUnion: discriminatedUnionType,\n effect: effectsType,\n 'enum': enumType,\n 'function': functionType,\n 'instanceof': instanceOfType,\n intersection: intersectionType,\n lazy: lazyType,\n literal: literalType,\n map: mapType,\n nan: nanType,\n nativeEnum: nativeEnumType,\n never: neverType,\n 'null': nullType,\n nullable: nullableType,\n number: numberType,\n object: objectType,\n oboolean: oboolean,\n onumber: onumber,\n optional: optionalType,\n ostring: ostring,\n pipeline: pipelineType,\n preprocess: preprocessType,\n promise: promiseType,\n record: recordType,\n set: setType,\n strictObject: strictObjectType,\n string: stringType,\n symbol: symbolType,\n transformer: effectsType,\n tuple: tupleType,\n 'undefined': undefinedType,\n union: unionType,\n unknown: unknownType,\n 'void': voidType,\n NEVER: NEVER,\n ZodIssueCode: ZodIssueCode,\n quotelessJson: quotelessJson,\n ZodError: ZodError\n});\n\nexport { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodReadonly, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z };\n","import { z } from \"zod\";\n\nconst InternalConfigSchema = z.object({\n\taccount_id: z.number().optional(),\n\tscript_id: z.number().optional(),\n\tdebug: z.boolean().optional(),\n});\n\nconst StaticRoutingSchema = z.object({\n\tuser_worker: z.array(z.string()),\n\tasset_worker: z.array(z.string()).optional(),\n});\n\nexport type StaticRouting = z.infer<typeof StaticRoutingSchema>;\n\nexport const RouterConfigSchema = z.object({\n\tinvoke_user_worker_ahead_of_assets: z.boolean().optional(),\n\tstatic_routing: StaticRoutingSchema.optional(),\n\thas_user_worker: z.boolean().optional(),\n\t...InternalConfigSchema.shape,\n});\n\nexport const EyeballRouterConfigSchema = z.union([\n\tz.object({\n\t\tlimitedAssetsOnly: z.boolean().optional(),\n\t}),\n\tz.null(),\n]);\n\nconst MetadataStaticRedirectEntry = z.object({\n\tstatus: z.number(),\n\tto: z.string(),\n\tlineNumber: z.number(),\n});\n\nconst MetadataRedirectEntry = z.object({\n\tstatus: z.number(),\n\tto: z.string(),\n});\n\nconst MetadataStaticRedirects = z.record(MetadataStaticRedirectEntry);\nexport type MetadataStaticRedirects = z.infer<typeof MetadataStaticRedirects>;\nconst MetadataRedirects = z.record(MetadataRedirectEntry);\nexport type MetadataRedirects = z.infer<typeof MetadataRedirects>;\n\nconst MetadataHeaderEntry = z.object({\n\tset: z.record(z.string()).optional(),\n\tunset: z.array(z.string()).optional(),\n});\n\nconst MetadataHeaders = z.record(MetadataHeaderEntry);\nexport type MetadataHeaders = z.infer<typeof MetadataHeaders>;\n\nexport const RedirectsSchema = z\n\t.object({\n\t\tversion: z.literal(1),\n\t\tstaticRules: MetadataStaticRedirects,\n\t\trules: MetadataRedirects,\n\t})\n\t.optional();\n\nexport const HeadersSchema = z\n\t.object({\n\t\tversion: z.literal(2),\n\t\trules: MetadataHeaders,\n\t})\n\t.optional();\n\nexport const AssetConfigSchema = z.object({\n\tcompatibility_date: z.string().optional(),\n\tcompatibility_flags: z.array(z.string()).optional(),\n\thtml_handling: z\n\t\t.enum([\n\t\t\t\"auto-trailing-slash\",\n\t\t\t\"force-trailing-slash\",\n\t\t\t\"drop-trailing-slash\",\n\t\t\t\"none\",\n\t\t])\n\t\t.optional(),\n\tnot_found_handling: z\n\t\t.enum([\"single-page-application\", \"404-page\", \"none\"])\n\t\t.optional(),\n\tredirects: RedirectsSchema,\n\theaders: HeadersSchema,\n\thas_static_routing: z.boolean().optional(),\n\t...InternalConfigSchema.shape,\n});\n\nexport type EyeballRouterConfig = z.infer<typeof EyeballRouterConfigSchema>;\nexport type RouterConfig = z.infer<typeof RouterConfigSchema>;\nexport type AssetConfig = z.infer<typeof AssetConfigSchema>;\n\nexport interface UnsafePerformanceTimer {\n\treadonly timeOrigin: number;\n\tnow: () => number;\n}\n\nexport interface JaegerTracing {\n\tenterSpan<T extends unknown[], R = void>(\n\t\tname: string,\n\t\tspan: (s: Span, ...args: T) => R,\n\t\t...args: T\n\t): R;\n\tgetSpanContext(): SpanContext | null;\n\trunWithSpanContext<T extends unknown[]>(\n\t\tspanContext: SpanContext | null,\n\t\tcallback: (...args: T) => unknown,\n\t\t...args: T\n\t): unknown;\n\n\treadonly traceId: string | null;\n\treadonly spanId: string | null;\n\treadonly parentSpanId: string | null;\n\treadonly cfTraceIdHeader: string | null;\n}\n\nexport interface Span {\n\taddLogs(logs: JaegerRecord): void;\n\tsetTags(tags: JaegerRecord): void;\n\tend(): void;\n\n\tisRecording: boolean;\n}\n\nexport interface SpanContext {\n\ttraceId: string;\n\tspanId: string;\n\tparentSpanId: string;\n\ttraceFlags: number;\n}\n\nexport type JaegerValue = string | number | boolean;\nexport type JaegerRecord = Record<string, JaegerValue>;\n\nexport interface ColoMetadata {\n\tmetalId: number;\n\tcoloId: number;\n\tcoloRegion: string;\n\tcoloTier: number;\n}\n","import * as path from \"node:path\";\nimport {\n\tconstructHeaders,\n\tconstructRedirects,\n} from \"@cloudflare/workers-shared/utils/configuration/constructConfiguration\";\nimport { parseHeaders } from \"@cloudflare/workers-shared/utils/configuration/parseHeaders\";\nimport { parseRedirects } from \"@cloudflare/workers-shared/utils/configuration/parseRedirects\";\nimport {\n\tHEADERS_FILENAME,\n\tREDIRECTS_FILENAME,\n} from \"@cloudflare/workers-shared/utils/constants\";\nimport { maybeGetFile } from \"@cloudflare/workers-shared/utils/helpers\";\nimport {\n\tHeadersSchema,\n\tRedirectsSchema,\n} from \"@cloudflare/workers-shared/utils/types\";\nimport type {\n\tAssetsOnlyResolvedConfig,\n\tWorkersResolvedConfig,\n} from \"./plugin-config\";\nimport type { Logger } from \"@cloudflare/workers-shared/utils/configuration/types\";\nimport type { AssetConfig } from \"@cloudflare/workers-shared/utils/types\";\nimport type * as vite from \"vite\";\nimport type { Unstable_Config } from \"wrangler\";\n\n/**\n * Returns true if the `changedFile` matches one of the _headers or _redirects files,\n * and the experimental support for these files is turned on.\n */\nexport function hasAssetsConfigChanged(\n\tresolvedPluginConfig: AssetsOnlyResolvedConfig | WorkersResolvedConfig,\n\tresolvedViteConfig: vite.ResolvedConfig,\n\tchangedFilePath: string\n) {\n\tif (!resolvedPluginConfig.experimental?.headersAndRedirectsDevModeSupport) {\n\t\treturn false;\n\t}\n\treturn [\n\t\tgetRedirectsConfigPath(resolvedViteConfig),\n\t\tgetHeadersConfigPath(resolvedViteConfig),\n\t].includes(changedFilePath);\n}\n\n/**\n * Computes the assets config that will be passed to Miniflare,\n * taking into account whether experimental _headers and _redirects support is on.\n */\nexport function getAssetsConfig(\n\tresolvedPluginConfig: AssetsOnlyResolvedConfig | WorkersResolvedConfig,\n\tentryWorkerConfig: Unstable_Config | undefined,\n\tresolvedConfig: vite.ResolvedConfig\n): AssetConfig {\n\tconst assetsConfig =\n\t\tresolvedPluginConfig.type === \"assets-only\"\n\t\t\t? resolvedPluginConfig.config.assets\n\t\t\t: entryWorkerConfig?.assets;\n\n\tconst compatibilityOptions =\n\t\tresolvedPluginConfig.type === \"assets-only\"\n\t\t\t? {\n\t\t\t\t\tcompatibility_date: resolvedPluginConfig.config.compatibility_date,\n\t\t\t\t\tcompatibility_flags: resolvedPluginConfig.config.compatibility_flags,\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\t...(entryWorkerConfig?.compatibility_date\n\t\t\t\t\t\t? { compatibility_date: entryWorkerConfig.compatibility_date }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\t...(entryWorkerConfig?.compatibility_flags\n\t\t\t\t\t\t? { compatibility_flags: entryWorkerConfig.compatibility_flags }\n\t\t\t\t\t\t: {}),\n\t\t\t\t};\n\n\tconst config = {\n\t\t...compatibilityOptions,\n\t\t...assetsConfig,\n\t\thas_static_routing:\n\t\t\tresolvedPluginConfig.type === \"workers\" &&\n\t\t\tresolvedPluginConfig.staticRouting\n\t\t\t\t? true\n\t\t\t\t: false,\n\t} satisfies AssetConfig;\n\n\tif (!resolvedPluginConfig.experimental?.headersAndRedirectsDevModeSupport) {\n\t\treturn config;\n\t}\n\n\tconst logger: Logger = {\n\t\tdebug() {\n\t\t\t/* No debug log in Vite. */\n\t\t},\n\t\tlog(message: string) {\n\t\t\tresolvedConfig.logger.info(message);\n\t\t},\n\t\tinfo(message: string) {\n\t\t\tresolvedConfig.logger.info(message);\n\t\t},\n\t\twarn(message: string) {\n\t\t\tresolvedConfig.logger.warn(message);\n\t\t},\n\t\terror(error: Error) {\n\t\t\tresolvedConfig.logger.error(error.message, { error });\n\t\t},\n\t};\n\n\tconst redirectsFile = getRedirectsConfigPath(resolvedConfig);\n\tconst redirectsContents = maybeGetFile(redirectsFile);\n\tconst redirects =\n\t\tredirectsContents &&\n\t\tRedirectsSchema.parse(\n\t\t\tconstructRedirects({\n\t\t\t\tredirects: parseRedirects(redirectsContents),\n\t\t\t\tredirectsFile,\n\t\t\t\tlogger,\n\t\t\t}).redirects\n\t\t);\n\n\tconst headersFile = getHeadersConfigPath(resolvedConfig);\n\tconst headersContents = maybeGetFile(headersFile);\n\tconst headers =\n\t\theadersContents &&\n\t\tHeadersSchema.parse(\n\t\t\tconstructHeaders({\n\t\t\t\theaders: parseHeaders(headersContents),\n\t\t\t\theadersFile,\n\t\t\t\tlogger,\n\t\t\t}).headers\n\t\t);\n\n\treturn {\n\t\t...config,\n\t\t...(redirects ? { redirects } : {}),\n\t\t...(headers ? { headers } : {}),\n\t};\n}\n\nfunction getRedirectsConfigPath(config: vite.ResolvedConfig): string {\n\treturn path.join(config.publicDir, REDIRECTS_FILENAME);\n}\n\nfunction getHeadersConfigPath(config: vite.ResolvedConfig): string {\n\treturn path.join(config.publicDir, HEADERS_FILENAME);\n}\n","export const UNKNOWN_HOST = \"http://localhost\";\n\n// pathnames\nexport const INIT_PATH = \"/__vite_plugin_cloudflare_init__\";\nexport const GET_EXPORT_TYPES_PATH =\n\t\"/__vite_plugin_cloudflare_get_export_types__\";\n\n// headers\nexport const WORKER_ENTRY_PATH_HEADER = \"__VITE_WORKER_ENTRY_PATH__\";\nexport const IS_ENTRY_WORKER_HEADER = \"__VITE_IS_ENTRY_WORKER__\";\n\n// virtual modules\nexport const virtualPrefix = \"virtual:cloudflare/\";\nexport const VIRTUAL_WORKER_ENTRY = `${virtualPrefix}worker-entry`;\nexport const VIRTUAL_EXPORT_TYPES = `${virtualPrefix}export-types`;\n","import assert from \"node:assert\";\nimport {\n\tVIRTUAL_EXPORT_TYPES,\n\tVIRTUAL_WORKER_ENTRY,\n\tvirtualPrefix,\n} from \"../shared\";\nimport { createPlugin } from \"../utils\";\n\nexport const VIRTUAL_USER_ENTRY = `${virtualPrefix}user-entry`;\nexport const VIRTUAL_CLIENT_FALLBACK_ENTRY = `${virtualPrefix}client-fallback-entry`;\n\n/**\n * Plugin to provide virtual modules\n */\nexport const virtualModulesPlugin = createPlugin(\"virtual-modules\", (ctx) => {\n\treturn {\n\t\tapplyToEnvironment(environment) {\n\t\t\treturn ctx.getWorkerConfig(environment.name) !== undefined;\n\t\t},\n\t\tresolveId(source) {\n\t\t\tif (source === VIRTUAL_WORKER_ENTRY || source === VIRTUAL_EXPORT_TYPES) {\n\t\t\t\treturn `\\0${source}`;\n\t\t\t}\n\n\t\t\tif (source === VIRTUAL_USER_ENTRY) {\n\t\t\t\tconst workerConfig = ctx.getWorkerConfig(this.environment.name);\n\t\t\t\tassert(workerConfig, \"Expected `workerConfig` to be defined\");\n\n\t\t\t\treturn this.resolve(workerConfig.main);\n\t\t\t}\n\t\t},\n\t\tload(id) {\n\t\t\tif (id === `\\0${VIRTUAL_WORKER_ENTRY}`) {\n\t\t\t\tconst nodeJsCompat = ctx.getNodeJsCompat(this.environment.name);\n\n\t\t\t\treturn `\n${nodeJsCompat ? nodeJsCompat.injectGlobalCode() : \"\"}\nimport { getExportTypes } from \"${VIRTUAL_EXPORT_TYPES}\";\nimport * as mod from \"${VIRTUAL_USER_ENTRY}\";\nexport * from \"${VIRTUAL_USER_ENTRY}\";\nexport default mod.default ?? {};\nif (import.meta.hot) {\n\timport.meta.hot.accept((module) => {\n\t\tconst exportTypes = getExportTypes(module);\n\t\timport.meta.hot.send(\"vite-plugin-cloudflare:worker-export-types\", exportTypes);\n\t});\n}\n\t\t\t\t`;\n\t\t\t}\n\n\t\t\tif (id === `\\0${VIRTUAL_EXPORT_TYPES}`) {\n\t\t\t\treturn `\nimport {\n\tWorkerEntrypoint,\n\tDurableObject,\n\tWorkflowEntrypoint,\n} from \"cloudflare:workers\";\n\nconst baseClasses = new Map([\n\t[\"WorkerEntrypoint\", WorkerEntrypoint],\n\t[\"DurableObject\", DurableObject],\n\t[\"WorkflowEntrypoint\", WorkflowEntrypoint],\n]);\n\nexport function getExportTypes(module) {\n\tconst exportTypes = {};\n\n\tfor (const [key, value] of Object.entries(module)) {\n\t\tif (key === \"default\") {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet exportType\n\n\t\tif (typeof value === \"function\") {\n\t\t\tfor (const [type, baseClass] of baseClasses) {\n\t\t\t\tif (baseClass.prototype.isPrototypeOf(value.prototype)) {\n\t\t\t\t\texportType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\texportTypes[key] = exportType;\n\t}\n\n\treturn exportTypes;\n}\n\t\t\t\t`;\n\t\t\t}\n\t\t},\n\t};\n});\n\n/**\n * Plugin to provide a virtual fallback entry file for the `client` environment.\n * This is used as the entry file for the client build when only the `public` directory is present.\n */\nexport const virtualClientFallbackPlugin = createPlugin(\n\t\"virtual-client-fallback\",\n\t() => {\n\t\treturn {\n\t\t\tapplyToEnvironment(environment) {\n\t\t\t\treturn environment.name === \"client\";\n\t\t\t},\n\t\t\tresolveId(source) {\n\t\t\t\tif (source === VIRTUAL_CLIENT_FALLBACK_ENTRY) {\n\t\t\t\t\treturn `\\0${VIRTUAL_CLIENT_FALLBACK_ENTRY}`;\n\t\t\t\t}\n\t\t\t},\n\t\t\tload(id) {\n\t\t\t\tif (id === `\\0${VIRTUAL_CLIENT_FALLBACK_ENTRY}`) {\n\t\t\t\t\treturn ``;\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t}\n);\n","import assert from \"node:assert\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport colors from \"picocolors\";\nimport { VIRTUAL_CLIENT_FALLBACK_ENTRY } from \"./plugins/virtual-modules\";\nimport type {\n\tAssetsOnlyResolvedConfig,\n\tWorkersResolvedConfig,\n} from \"./plugin-config\";\nimport type * as vite from \"vite\";\nimport type { Unstable_Config } from \"wrangler\";\n\nconst CLIENT_FALLBACK_ENTRY_NAME = \"__cloudflare_fallback_entry__\";\n\nexport function createBuildApp(\n\tresolvedPluginConfig: AssetsOnlyResolvedConfig | WorkersResolvedConfig\n): (builder: vite.ViteBuilder) => Promise<void> {\n\treturn async (builder) => {\n\t\tconst clientEnvironment = builder.environments.client;\n\t\tassert(clientEnvironment, `No \"client\" environment`);\n\t\tconst defaultHtmlPath = path.resolve(builder.config.root, \"index.html\");\n\t\tconst hasClientEntry =\n\t\t\tclientEnvironment.config.build.rollupOptions.input ||\n\t\t\tfs.existsSync(defaultHtmlPath);\n\n\t\tif (resolvedPluginConfig.type === \"assets-only\") {\n\t\t\tif (hasClientEntry) {\n\t\t\t\tawait builder.build(clientEnvironment);\n\t\t\t} else if (getHasPublicAssets(builder.config)) {\n\t\t\t\tawait fallbackBuild(builder, clientEnvironment);\n\t\t\t}\n\n\t\t\t// Return early as there are no Workers to build\n\t\t\treturn;\n\t\t}\n\n\t\tconst workerEnvironments = [\n\t\t\t...resolvedPluginConfig.environmentNameToWorkerMap.keys(),\n\t\t].map((environmentName) => {\n\t\t\tconst environment = builder.environments[environmentName];\n\t\t\tassert(environment, `\"${environmentName}\" environment not found`);\n\n\t\t\treturn environment;\n\t\t});\n\n\t\tawait Promise.all(\n\t\t\tworkerEnvironments.map((environment) => builder.build(environment))\n\t\t);\n\n\t\tconst { entryWorkerEnvironmentName } = resolvedPluginConfig;\n\t\tconst entryWorkerEnvironment =\n\t\t\tbuilder.environments[entryWorkerEnvironmentName];\n\t\tassert(\n\t\t\tentryWorkerEnvironment,\n\t\t\t`No \"${entryWorkerEnvironmentName}\" environment`\n\t\t);\n\t\tconst entryWorkerBuildDirectory = path.resolve(\n\t\t\tbuilder.config.root,\n\t\t\tentryWorkerEnvironment.config.build.outDir\n\t\t);\n\t\tconst entryWorkerManifest = loadViteManifest(entryWorkerBuildDirectory);\n\t\tconst importedAssetPaths = getImportedAssetPaths(entryWorkerManifest);\n\n\t\tif (hasClientEntry) {\n\t\t\tawait builder.build(clientEnvironment);\n\t\t} else if (importedAssetPaths.size || getHasPublicAssets(builder.config)) {\n\t\t\tawait fallbackBuild(builder, clientEnvironment);\n\t\t} else {\n\t\t\tconst entryWorkerConfigPath = path.join(\n\t\t\t\tentryWorkerBuildDirectory,\n\t\t\t\t\"wrangler.json\"\n\t\t\t);\n\t\t\tconst workerConfig = JSON.parse(\n\t\t\t\tfs.readFileSync(entryWorkerConfigPath, \"utf-8\")\n\t\t\t) as Unstable_Config;\n\t\t\t// Remove `assets` field as there are no assets\n\t\t\tworkerConfig.assets = undefined;\n\t\t\tfs.writeFileSync(entryWorkerConfigPath, JSON.stringify(workerConfig));\n\n\t\t\t// Return early as there is no client build\n\t\t\treturn;\n\t\t}\n\n\t\tconst clientBuildDirectory = path.resolve(\n\t\t\tbuilder.config.root,\n\t\t\tclientEnvironment.config.build.outDir\n\t\t);\n\t\tconst movedAssetPaths: string[] = [];\n\n\t\t// Move assets imported in the entry Worker to the client build\n\t\tfor (const assetPath of importedAssetPaths) {\n\t\t\tconst src = path.join(entryWorkerBuildDirectory, assetPath);\n\t\t\tconst dest = path.join(clientBuildDirectory, assetPath);\n\n\t\t\tif (!fs.existsSync(src)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (fs.existsSync(dest)) {\n\t\t\t\tfs.unlinkSync(src);\n\t\t\t} else {\n\t\t\t\tconst destDir = path.dirname(dest);\n\t\t\t\tfs.mkdirSync(destDir, { recursive: true });\n\t\t\t\tfs.renameSync(src, dest);\n\t\t\t\tmovedAssetPaths.push(dest);\n\t\t\t}\n\t\t}\n\n\t\tif (movedAssetPaths.length) {\n\t\t\tbuilder.config.logger.info(\n\t\t\t\t[\n\t\t\t\t\t`${colors.green(\"✓\")} ${movedAssetPaths.length} asset${movedAssetPaths.length > 1 ? \"s\" : \"\"} moved from \"${entryWorkerEnvironmentName}\" to \"client\" build output.`,\n\t\t\t\t\t...movedAssetPaths.map((assetPath) =>\n\t\t\t\t\t\tcolors.dim(path.relative(builder.config.root, assetPath))\n\t\t\t\t\t),\n\t\t\t\t].join(\"\\n\")\n\t\t\t);\n\t\t}\n\t};\n}\n\nfunction getHasPublicAssets({ publicDir }: vite.ResolvedConfig): boolean {\n\tlet hasPublicAssets = false;\n\n\tif (publicDir) {\n\t\ttry {\n\t\t\tconst files = fs.readdirSync(publicDir);\n\n\t\t\tif (files.length) {\n\t\t\t\thasPublicAssets = true;\n\t\t\t}\n\t\t} catch (error) {}\n\t}\n\n\treturn hasPublicAssets;\n}\n\nasync function fallbackBuild(\n\tbuilder: vite.ViteBuilder,\n\tenvironment: vite.BuildEnvironment\n): Promise<void> {\n\tenvironment.config.build.rollupOptions = {\n\t\tinput: VIRTUAL_CLIENT_FALLBACK_ENTRY,\n\t\tlogLevel: \"silent\",\n\t\toutput: {\n\t\t\tentryFileNames: CLIENT_FALLBACK_ENTRY_NAME,\n\t\t},\n\t};\n\n\tawait builder.build(environment);\n\n\tconst fallbackEntryPath = path.resolve(\n\t\tbuilder.config.root,\n\t\tenvironment.config.build.outDir,\n\t\tCLIENT_FALLBACK_ENTRY_NAME\n\t);\n\n\tfs.unlinkSync(fallbackEntryPath);\n}\n\nfunction loadViteManifest(directory: string) {\n\tconst contents = fs.readFileSync(\n\t\tpath.resolve(directory, \".vite\", \"manifest.json\"),\n\t\t\"utf-8\"\n\t);\n\n\treturn JSON.parse(contents) as vite.Manifest;\n}\n\nfunction getImportedAssetPaths(viteManifest: vite.Manifest): Set<string> {\n\tconst assetPaths = Object.values(viteManifest).flatMap(\n\t\t(chunk) => chunk.assets ?? []\n\t);\n\n\treturn new Set(assetPaths);\n}\n","import assert from \"node:assert\";\nimport { CoreHeaders } from \"miniflare\";\nimport * as vite from \"vite\";\nimport { additionalModuleRE } from \"./plugins/additional-modules\";\nimport {\n\tGET_EXPORT_TYPES_PATH,\n\tINIT_PATH,\n\tIS_ENTRY_WORKER_HEADER,\n\tUNKNOWN_HOST,\n\tVIRTUAL_WORKER_ENTRY,\n\tWORKER_ENTRY_PATH_HEADER,\n} from \"./shared\";\nimport { debuglog, getOutputDirectory } from \"./utils\";\nimport type { ExportTypes } from \"./export-types\";\nimport type { WorkerConfig, WorkersResolvedConfig } from \"./plugin-config\";\nimport type { MessageEvent, Miniflare, WebSocket } from \"miniflare\";\nimport type { FetchFunctionOptions } from \"vite/module-runner\";\n\nexport const MAIN_ENTRY_NAME = \"index\";\n\ninterface WebSocketContainer {\n\twebSocket?: WebSocket;\n}\n\nconst webSocketUndefinedError = \"The WebSocket is undefined\";\n\nfunction createHotChannel(\n\twebSocketContainer: WebSocketContainer\n): vite.HotChannel {\n\tconst listenersMap = new Map<string, Set<vite.HotChannelListener>>();\n\n\tconst client: vite.HotChannelClient = {\n\t\tsend(payload) {\n\t\t\tconst webSocket = webSocketContainer.webSocket;\n\t\t\tassert(webSocket, webSocketUndefinedError);\n\n\t\t\twebSocket.send(JSON.stringify(payload));\n\t\t},\n\t};\n\n\tfunction onMessage(event: MessageEvent) {\n\t\tconst payload = JSON.parse(event.data.toString()) as vite.CustomPayload;\n\t\tconst listeners = listenersMap.get(payload.event) ?? new Set();\n\n\t\tfor (const listener of listeners) {\n\t\t\tlistener(payload.data, client);\n\t\t}\n\t}\n\n\treturn {\n\t\tsend(payload) {\n\t\t\tconst webSocket = webSocketContainer.webSocket;\n\t\t\tassert(webSocket, webSocketUndefinedError);\n\n\t\t\twebSocket.send(JSON.stringify(payload));\n\t\t},\n\t\ton(event: string, listener: vite.HotChannelListener) {\n\t\t\tconst listeners = listenersMap.get(event) ?? new Set();\n\n\t\t\tlisteners.add(listener);\n\t\t\tlistenersMap.set(event, listeners);\n\t\t},\n\t\toff(event: string, listener: vite.HotChannelListener) {\n\t\t\tlistenersMap.get(event)?.delete(listener);\n\t\t},\n\t\tlisten() {\n\t\t\tconst webSocket = webSocketContainer.webSocket;\n\t\t\tassert(webSocket, webSocketUndefinedError);\n\n\t\t\twebSocket.addEventListener(\"message\", onMessage);\n\t\t},\n\t\tclose() {\n\t\t\tconst webSocket = webSocketContainer.webSocket;\n\t\t\tassert(webSocket, webSocketUndefinedError);\n\n\t\t\twebSocket.removeEventListener(\"message\", onMessage);\n\t\t},\n\t};\n}\n\nexport class CloudflareDevEnvironment extends vite.DevEnvironment {\n\t#webSocketContainer: { webSocket?: WebSocket };\n\n\tconstructor(name: string, config: vite.ResolvedConfig) {\n\t\t// It would be good if we could avoid passing this object around and mutating it\n\t\tconst webSocketContainer = {};\n\t\tsuper(name, config, {\n\t\t\thot: true,\n\t\t\ttransport: createHotChannel(webSocketContainer),\n\t\t});\n\t\tthis.#webSocketContainer = webSocketContainer;\n\t}\n\n\tasync initRunner(\n\t\tminiflare: Miniflare,\n\t\tworkerConfig: WorkerConfig,\n\t\tisEntryWorker: boolean\n\t): Promise<void> {\n\t\tconst response = await miniflare.dispatchFetch(\n\t\t\tnew URL(INIT_PATH, UNKNOWN_HOST),\n\t\t\t{\n\t\t\t\theaders: {\n\t\t\t\t\t[CoreHeaders.ROUTE_OVERRIDE]: workerConfig.name,\n\t\t\t\t\t[WORKER_ENTRY_PATH_HEADER]: encodeURIComponent(workerConfig.main),\n\t\t\t\t\t[IS_ENTRY_WORKER_HEADER]: String(isEntryWorker),\n\t\t\t\t\tupgrade: \"websocket\",\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t\tassert(\n\t\t\tresponse.ok,\n\t\t\t`Failed to initialize module runner, error: ${await response.text()}`\n\t\t);\n\t\tconst webSocket = response.webSocket;\n\t\tassert(webSocket, \"Failed to establish WebSocket\");\n\t\twebSocket.accept();\n\t\tthis.#webSocketContainer.webSocket = webSocket;\n\t}\n\n\tasync fetchWorkerExportTypes(\n\t\tminiflare: Miniflare,\n\t\tworkerConfig: WorkerConfig\n\t): Promise<ExportTypes> {\n\t\t// Wait for dependencies to be optimized before making the request\n\t\tawait this.depsOptimizer?.init();\n\n\t\tconst response = await miniflare.dispatchFetch(\n\t\t\tnew URL(GET_EXPORT_TYPES_PATH, UNKNOWN_HOST),\n\t\t\t{\n\t\t\t\theaders: {\n\t\t\t\t\t[CoreHeaders.ROUTE_OVERRIDE]: workerConfig.name,\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t\tconst json = await response.json();\n\n\t\treturn json as ExportTypes;\n\t}\n\n\toverride async fetchModule(\n\t\tid: string,\n\t\timporter?: string,\n\t\toptions?: FetchFunctionOptions\n\t): Promise<vite.FetchResult> {\n\t\t// Additional modules (CompiledWasm, Data, Text)\n\t\tif (additionalModuleRE.test(id)) {\n\t\t\treturn {\n\t\t\t\texternalize: id,\n\t\t\t\ttype: \"module\",\n\t\t\t};\n\t\t}\n\t\treturn super.fetchModule(id, importer, options);\n\t}\n}\n\nexport const cloudflareBuiltInModules = [\n\t\"cloudflare:email\",\n\t\"cloudflare:sockets\",\n\t\"cloudflare:workers\",\n\t\"cloudflare:workflows\",\n];\n\nconst defaultConditions = [\"workerd\", \"worker\", \"module\", \"browser\"];\nconst target = \"es2022\";\n\nexport function createCloudflareEnvironmentOptions({\n\tworkerConfig,\n\tuserConfig,\n\tmode,\n\tenvironmentName,\n\tisEntryWorker,\n\thasNodeJsCompat,\n}: {\n\tworkerConfig: WorkerConfig;\n\tuserConfig: vite.UserConfig;\n\tmode: vite.ConfigEnv[\"mode\"];\n\tenvironmentName: string;\n\tisEntryWorker: boolean;\n\thasNodeJsCompat: boolean;\n}): vite.EnvironmentOptions {\n\tconst define = getProcessEnvReplacements(hasNodeJsCompat, mode);\n\n\treturn {\n\t\tresolve: {\n\t\t\t// Note: in order for ssr pre-bundling to take effect we need to ask vite to treat all\n\t\t\t// dependencies as not external\n\t\t\tnoExternal: true,\n\t\t\t// We want to use `workerd` package exports if available (e.g. for postgres).\n\t\t\tconditions: [...defaultConditions, \"development|production\"],\n\t\t\t// The Cloudflare ones are proper builtins in the environment\n\t\t\tbuiltins: [...cloudflareBuiltInModules],\n\t\t},\n\t\tdefine,\n\t\tdev: {\n\t\t\tcreateEnvironment(name, config) {\n\t\t\t\treturn new CloudflareDevEnvironment(name, config);\n\t\t\t},\n\t\t},\n\t\tbuild: {\n\t\t\tcreateEnvironment(name, config) {\n\t\t\t\treturn new vite.BuildEnvironment(name, config);\n\t\t\t},\n\t\t\ttarget,\n\t\t\temitAssets: true,\n\t\t\tmanifest: isEntryWorker,\n\t\t\toutDir: getOutputDirectory(userConfig, environmentName),\n\t\t\tcopyPublicDir: false,\n\t\t\tssr: true,\n\t\t\trollupOptions: {\n\t\t\t\tinput: {\n\t\t\t\t\t[MAIN_ENTRY_NAME]: VIRTUAL_WORKER_ENTRY,\n\t\t\t\t},\n\t\t\t\t// workerd checks the types of the exports so we need to ensure that additional exports are not added to the entry module\n\t\t\t\tpreserveEntrySignatures: \"strict\",\n\t\t\t\t// rolldown-only option\n\t\t\t\t...(\"rolldownVersion\" in vite ? ({ platform: \"neutral\" } as any) : {}),\n\t\t\t},\n\t\t},\n\t\toptimizeDeps: {\n\t\t\t// Note: ssr pre-bundling is opt-in and we need to enable it by setting `noDiscovery` to false\n\t\t\tnoDiscovery: false,\n\t\t\t// We need to normalize the path as it is treated as a glob and backslashes are therefore treated as escape characters.\n\t\t\tentries: vite.normalizePath(workerConfig.main),\n\t\t\texclude: [...cloudflareBuiltInModules],\n\t\t\tesbuildOptions: {\n\t\t\t\tplatform: \"neutral\",\n\t\t\t\ttarget,\n\t\t\t\tconditions: [...defaultConditions, \"development\"],\n\t\t\t\tresolveExtensions: [\n\t\t\t\t\t\".mjs\",\n\t\t\t\t\t\".js\",\n\t\t\t\t\t\".mts\",\n\t\t\t\t\t\".ts\",\n\t\t\t\t\t\".jsx\",\n\t\t\t\t\t\".tsx\",\n\t\t\t\t\t\".json\",\n\t\t\t\t\t\".cjs\",\n\t\t\t\t\t\".cts\",\n\t\t\t\t\t\".ctx\",\n\t\t\t\t],\n\t\t\t\tdefine,\n\t\t\t},\n\t\t},\n\t\t// We manually set `process.env` replacements using `define`\n\t\tkeepProcessEnv: true,\n\t};\n}\n\n/**\n * Gets `process.env` replacement values.\n * `process.env.NODE_ENV` is always replaced.\n * `process.env` is replaced with an empty object if `nodejs_compat` is not enabled\n * @param hasNodeJsCompat - whether `nodejs_compat` is enabled\n * @param mode - the Vite mode\n * @returns replacement values\n */\nfunction getProcessEnvReplacements(\n\thasNodeJsCompat: boolean,\n\tmode: vite.ConfigEnv[\"mode\"]\n): Record<string, string> {\n\tconst nodeEnv = process.env.NODE_ENV || mode;\n\tconst nodeEnvReplacements = {\n\t\t\"process.env.NODE_ENV\": JSON.stringify(nodeEnv),\n\t\t\"global.process.env.NODE_ENV\": JSON.stringify(nodeEnv),\n\t\t\"globalThis.process.env.NODE_ENV\": JSON.stringify(nodeEnv),\n\t};\n\n\treturn hasNodeJsCompat\n\t\t? nodeEnvReplacements\n\t\t: {\n\t\t\t\t...nodeEnvReplacements,\n\t\t\t\t\"process.env\": \"{}\",\n\t\t\t\t\"global.process.env\": \"{}\",\n\t\t\t\t\"globalThis.process.env\": \"{}\",\n\t\t\t};\n}\n\nexport function initRunners(\n\tresolvedPluginConfig: WorkersResolvedConfig,\n\tviteDevServer: vite.ViteDevServer,\n\tminiflare: Miniflare\n): Promise<void[]> | undefined {\n\treturn Promise.all(\n\t\t[...resolvedPluginConfig.environmentNameToWorkerMap].map(\n\t\t\t([environmentName, worker]) => {\n\t\t\t\tdebuglog(\"Initializing worker:\", worker.config.name);\n\t\t\t\tconst isEntryWorker =\n\t\t\t\t\tenvironmentName === resolvedPluginConfig.entryWorkerEnvironmentName;\n\n\t\t\t\treturn (\n\t\t\t\t\tviteDevServer.environments[\n\t\t\t\t\t\tenvironmentName\n\t\t\t\t\t] as CloudflareDevEnvironment\n\t\t\t\t).initRunner(miniflare, worker.config, isEntryWorker);\n\t\t\t}\n\t\t)\n\t);\n}\n","import * as path from \"node:path\";\nimport { unstable_getVarsForDev } from \"wrangler\";\nimport type {\n\tAssetsOnlyResolvedConfig,\n\tWorkersResolvedConfig,\n} from \"./plugin-config\";\n\n/**\n * Gets any variables with which to augment the Worker config in preview mode.\n *\n * Calls `unstable_getVarsForDev` with the current Cloudflare environment to get local dev variables from the `.dev.vars` and `.env` files.\n */\nexport function getLocalDevVarsForPreview(\n\tconfigPath: string | undefined,\n\tcloudflareEnv: string | undefined\n): string | undefined {\n\tconst dotDevDotVars = unstable_getVarsForDev(\n\t\tconfigPath,\n\t\tundefined, // We don't currently support setting a list of custom `.env` files.\n\t\t{}, // Don't pass actual vars since these will be loaded from the wrangler.json.\n\t\tcloudflareEnv\n\t);\n\tconst dotDevDotVarsEntries = Array.from(Object.entries(dotDevDotVars));\n\tif (dotDevDotVarsEntries.length > 0) {\n\t\tconst dotDevDotVarsContent = dotDevDotVarsEntries\n\t\t\t.map(([key, value]) => {\n\t\t\t\treturn `${key} = \"${value?.toString().replaceAll(`\"`, `\\\\\"`)}\"\\n`;\n\t\t\t})\n\t\t\t.join(\"\");\n\t\treturn dotDevDotVarsContent;\n\t}\n}\n\n/**\n * Returns `true` if the `changedFile` matches a `.dev.vars` or `.env` file.\n */\nexport function hasLocalDevVarsFileChanged(\n\t{\n\t\tconfigPaths,\n\t\tcloudflareEnv,\n\t}: AssetsOnlyResolvedConfig | WorkersResolvedConfig,\n\tchangedFilePath: string\n) {\n\treturn [...configPaths].some((configPath) => {\n\t\tconst configDir = path.dirname(configPath);\n\t\treturn [\n\t\t\t\".dev.vars\",\n\t\t\t\".env\",\n\t\t\t...(cloudflareEnv\n\t\t\t\t? [`.dev.vars.${cloudflareEnv}`, `.env.${cloudflareEnv}`]\n\t\t\t\t: []),\n\t\t].some(\n\t\t\t(localDevFile) => changedFilePath === path.join(configDir, localDevFile)\n\t\t);\n\t});\n}\n","import assert from \"node:assert\";\nimport type { WorkersResolvedConfig } from \"./plugin-config\";\nimport type * as vite from \"vite\";\n\ninterface DisallowedEnvironmentOptions {\n\tresolveExternal?: vite.ResolveOptions[\"external\"];\n}\n\n/**\n * Throws an error if Worker environments include configuration options that are incompatible with the plugin.\n */\nexport function validateWorkerEnvironmentOptions(\n\tresolvedPluginConfig: WorkersResolvedConfig,\n\tresolvedViteConfig: vite.ResolvedConfig\n) {\n\tconst disallowedEnvironmentOptionsMap = new Map<\n\t\tstring,\n\t\tDisallowedEnvironmentOptions\n\t>();\n\n\tfor (const environmentName of resolvedPluginConfig.environmentNameToWorkerMap.keys()) {\n\t\tconst environmentOptions = resolvedViteConfig.environments[environmentName];\n\t\tassert(\n\t\t\tenvironmentOptions,\n\t\t\t`Missing environment config for \"${environmentName}\"`\n\t\t);\n\t\tconst { resolve } = environmentOptions;\n\t\tconst disallowedEnvironmentOptions: DisallowedEnvironmentOptions = {};\n\n\t\tif (resolve.external === true || resolve.external.length) {\n\t\t\tdisallowedEnvironmentOptions.resolveExternal = resolve.external;\n\t\t}\n\n\t\tif (Object.keys(disallowedEnvironmentOptions).length) {\n\t\t\tdisallowedEnvironmentOptionsMap.set(\n\t\t\t\tenvironmentName,\n\t\t\t\tdisallowedEnvironmentOptions\n\t\t\t);\n\t\t}\n\t}\n\n\tif (disallowedEnvironmentOptionsMap.size) {\n\t\tconst errorMessage = `The following environment options are incompatible with the Cloudflare Vite plugin:\\n${[\n\t\t\t...disallowedEnvironmentOptionsMap,\n\t\t]\n\t\t\t.map(\n\t\t\t\t([environmentName, disallowedEnvironmentOptions]) =>\n\t\t\t\t\tdisallowedEnvironmentOptions.resolveExternal &&\n\t\t\t\t\t`\t- \"${environmentName}\" environment: \\`resolve.external\\`: ${JSON.stringify(disallowedEnvironmentOptions.resolveExternal)}\\n`\n\t\t\t)\n\t\t\t.join(\n\t\t\t\t\"\"\n\t\t\t)}To resolve this issue, avoid setting \\`resolve.external\\` in your Cloudflare Worker environments.\\n`;\n\n\t\tthrow new Error(errorMessage);\n\t}\n}\n","import { hasAssetsConfigChanged } from \"../asset-config\";\nimport { createBuildApp } from \"../build\";\nimport {\n\tcloudflareBuiltInModules,\n\tcreateCloudflareEnvironmentOptions,\n} from \"../cloudflare-environment\";\nimport { assertIsNotPreview } from \"../context\";\nimport { hasLocalDevVarsFileChanged } from \"../dev-vars\";\nimport { createPlugin, debuglog, getOutputDirectory } from \"../utils\";\nimport { validateWorkerEnvironmentOptions } from \"../vite-config\";\nimport { getWarningForWorkersConfigs } from \"../workers-configs\";\n\n/**\n * Plugin to handle configuration and config file watching\n */\nexport const configPlugin = createPlugin(\"config\", (ctx) => {\n\treturn {\n\t\tconfig(userConfig, env) {\n\t\t\tif (ctx.resolvedPluginConfig.type === \"preview\") {\n\t\t\t\treturn { appType: \"custom\" };\n\t\t\t}\n\n\t\t\tif (!ctx.hasShownWorkerConfigWarnings) {\n\t\t\t\tctx.setHasShownWorkerConfigWarnings(true);\n\t\t\t\tconst workerConfigWarnings = getWarningForWorkersConfigs(\n\t\t\t\t\tctx.resolvedPluginConfig.rawConfigs\n\t\t\t\t);\n\t\t\t\tif (workerConfigWarnings) {\n\t\t\t\t\tconsole.warn(workerConfigWarnings);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst defaultDeniedFiles = [\n\t\t\t\t\".env\",\n\t\t\t\t\".env.*\",\n\t\t\t\t\"*.{crt,pem}\",\n\t\t\t\t\"**/.git/**\",\n\t\t\t];\n\n\t\t\treturn {\n\t\t\t\tappType: \"custom\",\n\t\t\t\tserver: {\n\t\t\t\t\tfs: {\n\t\t\t\t\t\tdeny: [...defaultDeniedFiles, \".dev.vars\", \".dev.vars.*\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tenvironments:\n\t\t\t\t\tctx.resolvedPluginConfig.type === \"workers\"\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t...Object.fromEntries(\n\t\t\t\t\t\t\t\t\t[...ctx.resolvedPluginConfig.environmentNameToWorkerMap].map(\n\t\t\t\t\t\t\t\t\t\t([environmentName, worker]) => {\n\t\t\t\t\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t\t\t\t\tenvironmentName,\n\t\t\t\t\t\t\t\t\t\t\t\tcreateCloudflareEnvironmentOptions({\n\t\t\t\t\t\t\t\t\t\t\t\t\tworkerConfig: worker.config,\n\t\t\t\t\t\t\t\t\t\t\t\t\tuserConfig,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmode: env.mode,\n\t\t\t\t\t\t\t\t\t\t\t\t\tenvironmentName,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisEntryWorker:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tctx.resolvedPluginConfig.type === \"workers\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvironmentName ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tctx.resolvedPluginConfig\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.entryWorkerEnvironmentName,\n\t\t\t\t\t\t\t\t\t\t\t\t\thasNodeJsCompat:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tctx.getNodeJsCompat(environmentName) !== undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tclient: {\n\t\t\t\t\t\t\t\t\tbuild: {\n\t\t\t\t\t\t\t\t\t\toutDir: getOutputDirectory(userConfig, \"client\"),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\toptimizeDeps: {\n\t\t\t\t\t\t\t\t\t\t// Some frameworks allow users to mix client and server code in the same file and then extract the server code.\n\t\t\t\t\t\t\t\t\t\t// As the dependency optimization may happen before the server code is extracted, we should exclude Cloudflare built-ins from client optimization.\n\t\t\t\t\t\t\t\t\t\texclude: [...cloudflareBuiltInModules],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: undefined,\n\t\t\t\tbuilder: {\n\t\t\t\t\tbuildApp:\n\t\t\t\t\t\tuserConfig.builder?.buildApp ??\n\t\t\t\t\t\tcreateBuildApp(ctx.resolvedPluginConfig),\n\t\t\t\t},\n\t\t\t};\n\t\t},\n\t\tconfigResolved(resolvedViteConfig) {\n\t\t\tctx.setResolvedViteConfig(resolvedViteConfig);\n\n\t\t\tif (ctx.resolvedPluginConfig.type === \"workers\") {\n\t\t\t\tvalidateWorkerEnvironmentOptions(\n\t\t\t\t\tctx.resolvedPluginConfig,\n\t\t\t\t\tctx.resolvedViteConfig\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\tbuildStart() {\n\t\t\tctx.setHasShownWorkerConfigWarnings(false);\n\t\t},\n\t\tconfigureServer(viteDevServer) {\n\t\t\tconst configChangedHandler = async (changedFilePath: string) => {\n\t\t\t\tassertIsNotPreview(ctx);\n\n\t\t\t\tif (\n\t\t\t\t\tctx.resolvedPluginConfig.configPaths.has(changedFilePath) ||\n\t\t\t\t\thasLocalDevVarsFileChanged(\n\t\t\t\t\t\tctx.resolvedPluginConfig,\n\t\t\t\t\t\tchangedFilePath\n\t\t\t\t\t) ||\n\t\t\t\t\thasAssetsConfigChanged(\n\t\t\t\t\t\tctx.resolvedPluginConfig,\n\t\t\t\t\t\tctx.resolvedViteConfig,\n\t\t\t\t\t\tchangedFilePath\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tdebuglog(\"Config changed: \" + changedFilePath);\n\t\t\t\t\tviteDevServer.watcher.off(\"change\", configChangedHandler);\n\t\t\t\t\tdebuglog(\"Restarting dev server and aborting previous setup\");\n\t\t\t\t\tawait viteDevServer.restart();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tviteDevServer.watcher.on(\"change\", configChangedHandler);\n\t\t},\n\t};\n});\n","import assert from \"node:assert\";\nimport getPort, { portNumbers } from \"get-port\";\nimport colors from \"picocolors\";\nimport type { PluginContext } from \"./context\";\nimport type * as vite from \"vite\";\n\nexport const DEBUG_PATH = \"/__debug\";\nconst DEFAULT_INSPECTOR_PORT = 9229;\n\n/**\n * Gets the inspector port option that should be passed to Miniflare based on the user's plugin config\n */\nexport async function getInputInspectorPort(\n\tctx: PluginContext,\n\tviteServer: vite.ViteDevServer | vite.PreviewServer\n) {\n\tif (\n\t\tctx.resolvedPluginConfig.inspectorPort === undefined ||\n\t\tctx.resolvedPluginConfig.inspectorPort === 0\n\t) {\n\t\tconst resolvedInspectorPort = await ctx.getResolvedInspectorPort();\n\n\t\tif (resolvedInspectorPort !== null) {\n\t\t\t// the user is not specifying an inspector port to use and we're already\n\t\t\t// using one (this is a server restart) so let's just reuse that\n\t\t\treturn resolvedInspectorPort;\n\t\t}\n\t}\n\n\tconst inputInspectorPort =\n\t\tctx.resolvedPluginConfig.inspectorPort ??\n\t\t(await getFirstAvailablePort(DEFAULT_INSPECTOR_PORT));\n\n\tif (\n\t\tctx.resolvedPluginConfig.inspectorPort === undefined &&\n\t\tinputInspectorPort !== DEFAULT_INSPECTOR_PORT\n\t) {\n\t\tviteServer.config.logger.warn(\n\t\t\tcolors.dim(\n\t\t\t\t`Default inspector port ${DEFAULT_INSPECTOR_PORT} not available, using ${inputInspectorPort} instead\\n`\n\t\t\t)\n\t\t);\n\t}\n\n\treturn inputInspectorPort;\n}\n\nfunction getFirstAvailablePort(start: number) {\n\treturn getPort({ port: portNumbers(start, 65535) });\n}\n\n/**\n * Modifies the URL printing logic to also include a URL that developers can use to open DevTools to debug their Worker(s)\n */\nexport function addDebugToVitePrintUrls(\n\tserver: vite.ViteDevServer | vite.PreviewServer\n) {\n\tconst originalPrintUrls = server.printUrls;\n\tserver.printUrls = () => {\n\t\toriginalPrintUrls();\n\n\t\tconst localUrl = server.resolvedUrls?.local[0];\n\n\t\tif (localUrl) {\n\t\t\tconst { protocol, hostname, port } = new URL(localUrl);\n\n\t\t\tconst colorDebugUrl = (url: string) =>\n\t\t\t\tcolors.dim(\n\t\t\t\t\tcolors.yellow(\n\t\t\t\t\t\turl.replace(/:(\\d+)\\//, (_, port) => `:${colors.bold(port)}/`)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tserver.config.logger.info(\n\t\t\t\t` ${colors.green(\"➜\")} ${colors.bold(\"Debug\")}: ${colorDebugUrl(`${protocol}//${hostname}:${port}${DEBUG_PATH}`)}`\n\t\t\t);\n\t\t}\n\t};\n}\n\n/**\n * Generate HTML that comprises a single script that:\n * - redirects the page to the DevTools for debugging the first available Worker\n * - opens tabs to the DevTools for all the remaining workers if any\n *\n * Note: this works based on the Miniflare inspector proxy logic (where Workers are available via\n * their names)\n */\nexport function getDebugPathHtml(workerNames: string[], inspectorPort: number) {\n\t// this function should always be called only when there is at least one worker to debug\n\tassert(workerNames.length >= 1, \"no workers present to debug\");\n\n\tconst workerDevtoolsUrls = workerNames.map((workerName) => {\n\t\tconst localhost = `localhost:${inspectorPort}/${workerName}`;\n\t\tconst searchParams = new URLSearchParams({\n\t\t\ttheme: \"systemPreferred\",\n\t\t\tdebugger: \"true\",\n\t\t\tws: localhost,\n\t\t\tdomain: workerName,\n\t\t});\n\t\tconst devtoolsFrontendUrl = `https://devtools.devprod.cloudflare.dev/js_app?${searchParams}`;\n\t\treturn devtoolsFrontendUrl;\n\t});\n\n\treturn `\n\t\t<script>\n\t\t\tconst workerUrls = ${JSON.stringify(workerDevtoolsUrls)};\n\t\t\tconst [firstUrl, ...rest] = workerUrls;\n\t\t\tfor (const workerUrl of rest) {\n\t\t\t\t// open new tabs for the devtools of the various workers\n\t\t\t\twindow.open(workerUrl);\n\t\t\t}\n\t\t\t// redirect the current tab to the devtools of the first worker\n\t\t\twindow.location.replace(firstUrl);\n\t\t</script>\n `;\n}\n","import assert from \"node:assert\";\nimport { assertIsNotPreview, assertIsPreview } from \"../context\";\nimport {\n\taddDebugToVitePrintUrls,\n\tDEBUG_PATH,\n\tgetDebugPathHtml,\n} from \"../debug\";\nimport { createPlugin } from \"../utils\";\n\n/**\n * Plugin to provide a `/__debug` path for debugging Workers\n */\nexport const debugPlugin = createPlugin(\"debug\", (ctx) => {\n\treturn {\n\t\tenforce: \"pre\",\n\t\tconfigureServer(viteDevServer) {\n\t\t\tassertIsNotPreview(ctx);\n\t\t\t// If we're in a JavaScript Debug terminal, Miniflare will send the inspector ports directly to VSCode for registration.\n\t\t\t// As such, we don't need our inspector proxy and in fact including it causes issues with multiple clients connected to the\n\t\t\t// inspector endpoint.\n\t\t\tconst isInVscodeJsDebugTerminal = !!process.env.VSCODE_INSPECTOR_OPTIONS;\n\n\t\t\tif (isInVscodeJsDebugTerminal) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tctx.resolvedPluginConfig.type === \"workers\" &&\n\t\t\t\tctx.resolvedPluginConfig.inspectorPort !== false\n\t\t\t) {\n\t\t\t\taddDebugToVitePrintUrls(viteDevServer);\n\t\t\t}\n\n\t\t\tconst workerNames =\n\t\t\t\tctx.resolvedPluginConfig.type === \"workers\"\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t...ctx.resolvedPluginConfig.environmentNameToWorkerMap.values(),\n\t\t\t\t\t\t].map((worker) => worker.config.name)\n\t\t\t\t\t: [];\n\n\t\t\tviteDevServer.middlewares.use(DEBUG_PATH, async (_, res, next) => {\n\t\t\t\tconst resolvedInspectorPort = await ctx.getResolvedInspectorPort();\n\n\t\t\t\tif (resolvedInspectorPort) {\n\t\t\t\t\tconst html = getDebugPathHtml(workerNames, resolvedInspectorPort);\n\t\t\t\t\tres.setHeader(\"Content-Type\", \"text/html\");\n\t\t\t\t\tres.end(html);\n\t\t\t\t} else {\n\t\t\t\t\tnext();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tasync configurePreviewServer(vitePreviewServer) {\n\t\t\tassertIsPreview(ctx);\n\t\t\t// If we're in a JavaScript Debug terminal, Miniflare will send the inspector ports directly to VSCode for registration.\n\t\t\t// As such, we don't need our inspector proxy and in fact including it causes issues with multiple clients connected to the\n\t\t\t// inspector endpoint.\n\t\t\tconst isInVscodeJsDebugTerminal = !!process.env.VSCODE_INSPECTOR_OPTIONS;\n\n\t\t\tif (isInVscodeJsDebugTerminal) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tctx.resolvedPluginConfig.workers.length >= 1 &&\n\t\t\t\tctx.resolvedPluginConfig.inspectorPort !== false\n\t\t\t) {\n\t\t\t\taddDebugToVitePrintUrls(vitePreviewServer);\n\t\t\t}\n\n\t\t\tconst workerNames = ctx.resolvedPluginConfig.workers.map((worker) => {\n\t\t\t\tassert(worker.name, \"Expected the Worker to have a name\");\n\t\t\t\treturn worker.name;\n\t\t\t});\n\n\t\t\tvitePreviewServer.middlewares.use(DEBUG_PATH, async (_, res, next) => {\n\t\t\t\tconst resolvedInspectorPort = await ctx.getResolvedInspectorPort();\n\n\t\t\t\tif (resolvedInspectorPort) {\n\t\t\t\t\tconst html = getDebugPathHtml(workerNames, resolvedInspectorPort);\n\t\t\t\t\tres.setHeader(\"Content-Type\", \"text/html\");\n\t\t\t\t\tres.end(html);\n\t\t\t\t} else {\n\t\t\t\t\tnext();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t};\n});\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ApiRequestOptions } from \"./ApiRequestOptions\";\nimport type { ApiResult } from \"./ApiResult\";\n\nexport class ApiError extends Error {\n\tpublic readonly url: string;\n\tpublic readonly status: number;\n\tpublic readonly statusText: string;\n\tpublic readonly body: any;\n\tpublic readonly request: ApiRequestOptions;\n\n\tconstructor(\n\t\trequest: ApiRequestOptions,\n\t\tresponse: ApiResult,\n\t\tmessage: string\n\t) {\n\t\tsuper(message);\n\n\t\tthis.name = \"ApiError\";\n\t\tthis.url = response.url;\n\t\tthis.status = response.status;\n\t\tthis.statusText = response.statusText;\n\t\tthis.body = response.body;\n\t\tthis.request = request;\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport class CancelError extends Error {\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"CancelError\";\n\t}\n\n\tpublic get isCancelled(): boolean {\n\t\treturn true;\n\t}\n}\n\nexport interface OnCancel {\n\treadonly isResolved: boolean;\n\treadonly isRejected: boolean;\n\treadonly isCancelled: boolean;\n\n\t(cancelHandler: () => void): void;\n}\n\nexport class CancelablePromise<T> implements Promise<T> {\n\t#isResolved: boolean;\n\t#isRejected: boolean;\n\t#isCancelled: boolean;\n\treadonly #cancelHandlers: (() => void)[];\n\treadonly #promise: Promise<T>;\n\t#resolve?: (value: T | PromiseLike<T>) => void;\n\t#reject?: (reason?: any) => void;\n\n\tconstructor(\n\t\texecutor: (\n\t\t\tresolve: (value: T | PromiseLike<T>) => void,\n\t\t\treject: (reason?: any) => void,\n\t\t\tonCancel: OnCancel\n\t\t) => void\n\t) {\n\t\tthis.#isResolved = false;\n\t\tthis.#isRejected = false;\n\t\tthis.#isCancelled = false;\n\t\tthis.#cancelHandlers = [];\n\t\tthis.#promise = new Promise<T>((resolve, reject) => {\n\t\t\tthis.#resolve = resolve;\n\t\t\tthis.#reject = reject;\n\n\t\t\tconst onResolve = (value: T | PromiseLike<T>): void => {\n\t\t\t\tif (this.#isResolved || this.#isRejected || this.#isCancelled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.#isResolved = true;\n\t\t\t\tthis.#resolve?.(value);\n\t\t\t};\n\n\t\t\tconst onReject = (reason?: any): void => {\n\t\t\t\tif (this.#isResolved || this.#isRejected || this.#isCancelled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.#isRejected = true;\n\t\t\t\tthis.#reject?.(reason);\n\t\t\t};\n\n\t\t\tconst onCancel = (cancelHandler: () => void): void => {\n\t\t\t\tif (this.#isResolved || this.#isRejected || this.#isCancelled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.#cancelHandlers.push(cancelHandler);\n\t\t\t};\n\n\t\t\tObject.defineProperty(onCancel, \"isResolved\", {\n\t\t\t\tget: (): boolean => this.#isResolved,\n\t\t\t});\n\n\t\t\tObject.defineProperty(onCancel, \"isRejected\", {\n\t\t\t\tget: (): boolean => this.#isRejected,\n\t\t\t});\n\n\t\t\tObject.defineProperty(onCancel, \"isCancelled\", {\n\t\t\t\tget: (): boolean => this.#isCancelled,\n\t\t\t});\n\n\t\t\treturn executor(onResolve, onReject, onCancel as OnCancel);\n\t\t});\n\t}\n\n\tget [Symbol.toStringTag]() {\n\t\treturn \"Cancellable Promise\";\n\t}\n\n\tpublic then<TResult1 = T, TResult2 = never>(\n\t\tonFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n\t\tonRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null\n\t): Promise<TResult1 | TResult2> {\n\t\treturn this.#promise.then(onFulfilled, onRejected);\n\t}\n\n\tpublic catch<TResult = never>(\n\t\tonRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null\n\t): Promise<T | TResult> {\n\t\treturn this.#promise.catch(onRejected);\n\t}\n\n\tpublic finally(onFinally?: (() => void) | null): Promise<T> {\n\t\treturn this.#promise.finally(onFinally);\n\t}\n\n\tpublic cancel(): void {\n\t\tif (this.#isResolved || this.#isRejected || this.#isCancelled) {\n\t\t\treturn;\n\t\t}\n\t\tthis.#isCancelled = true;\n\t\tif (this.#cancelHandlers.length) {\n\t\t\ttry {\n\t\t\t\tfor (const cancelHandler of this.#cancelHandlers) {\n\t\t\t\t\tcancelHandler();\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.warn(\"Cancellation threw an error\", error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthis.#cancelHandlers.length = 0;\n\t\tthis.#reject?.(new CancelError(\"Request aborted\"));\n\t}\n\n\tpublic get isCancelled(): boolean {\n\t\treturn this.#isCancelled;\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\nimport type { Logger } from \"../../types\";\nimport type { ApiRequestOptions } from \"./ApiRequestOptions\";\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\ntype Headers = Record<string, string>;\n\nexport type OpenAPIConfig = {\n\tBASE: string;\n\tVERSION: string;\n\tWITH_CREDENTIALS: boolean;\n\tCREDENTIALS: \"include\" | \"omit\" | \"same-origin\";\n\tTOKEN?: string | Resolver<string>;\n\tUSERNAME?: string | Resolver<string>;\n\tPASSWORD?: string | Resolver<string>;\n\tHEADERS?: Headers | Resolver<Headers>;\n\tENCODE_PATH?: (path: string) => string;\n\tLOGGER?: Logger | undefined;\n};\n\nexport const OpenAPI: OpenAPIConfig = {\n\tBASE: \"\",\n\tVERSION: \"1.0.0\",\n\tWITH_CREDENTIALS: false,\n\tCREDENTIALS: \"include\",\n\tTOKEN: undefined,\n\tUSERNAME: undefined,\n\tPASSWORD: undefined,\n\tHEADERS: undefined,\n\tENCODE_PATH: undefined,\n\tLOGGER: undefined,\n};\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\nimport type { ApplicationHealth } from \"./ApplicationHealth\";\nimport type { ApplicationRolloutProgress } from \"./ApplicationRolloutProgress\";\nimport type { ISO8601Timestamp } from \"./ISO8601Timestamp\";\nimport type { ModifyUserDeploymentConfiguration } from \"./ModifyUserDeploymentConfiguration\";\nimport type { RolloutID } from \"./RolloutID\";\nimport type { RolloutStep } from \"./RolloutStep\";\n\n/**\n * Represents the status and metadata of a rollout process for an application.\n */\nexport type ApplicationRollout = {\n\tdescription: string;\n\tid: RolloutID;\n\tcreated_at: ISO8601Timestamp;\n\t/**\n\t * Timestamp of the most recent update to status, health, or progress\n\t */\n\tlast_updated_at: ISO8601Timestamp;\n\t/**\n\t * Kind of the rollout process.\n\t * - \"full_auto\": The default rollout mode, which starts progressing the steps upon rollout creation.\n\t * - \"full_manual\": Requires manually progressing each step in the rollout using the UpdateRollout's action paramater.\n\t * - \"durable_objects_auto\": Default when the application is a DO application.\n\t *\n\t */\n\tkind: ApplicationRollout.kind;\n\t/**\n\t * The rollout strategy\n\t */\n\tstrategy: ApplicationRollout.strategy;\n\t/**\n\t * Current application version before the rollout.\n\t */\n\tcurrent_version: number;\n\t/**\n\t * Target application version after the rollout is complete and applied to all current instances.\n\t */\n\ttarget_version: number;\n\tcurrent_configuration: ModifyUserDeploymentConfiguration;\n\ttarget_configuration: ModifyUserDeploymentConfiguration;\n\t/**\n\t * Current status of the rollout.\n\t */\n\tstatus: ApplicationRollout.status;\n\thealth: ApplicationHealth;\n\tsteps: Array<RolloutStep>;\n\tprogress: ApplicationRolloutProgress;\n\t/**\n\t * Timestamp when the rollout started.\n\t */\n\tstarted_at?: string;\n};\n\nexport namespace ApplicationRollout {\n\t/**\n\t * Kind of the rollout process.\n\t * - \"full_auto\": The default rollout mode, which starts progressing the steps upon rollout creation.\n\t * - \"full_manual\": Requires manually progressing each step in the rollout using the UpdateRollout's action paramater.\n\t * - \"durable_objects_auto\": Default when the application is a DO application.\n\t *\n\t */\n\texport enum kind {\n\t\tFULL_AUTO = \"full_auto\",\n\t\tFULL_MANUAL = \"full_manual\",\n\t\tDURABLE_OBJECTS_AUTO = \"durable_objects_auto\",\n\t}\n\n\t/**\n\t * The rollout strategy\n\t */\n\texport enum strategy {\n\t\tROLLING = \"rolling\",\n\t}\n\n\t/**\n\t * Current status of the rollout.\n\t */\n\texport enum status {\n\t\tPENDING = \"pending\",\n\t\tPROGRESSING = \"progressing\",\n\t\tCOMPLETED = \"completed\",\n\t\tREVERTED = \"reverted\",\n\t\tREPLACED = \"replaced\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\nexport type BadRequestWithCodeError = {\n\t/**\n\t * If VALIDATE_INPUT, you should see the inputs that were wrong in the details object.\n\t */\n\terror: BadRequestWithCodeError.error;\n\t/**\n\t * Details that might be filled depending on the error code.\n\t */\n\tdetails?: Record<string, any>;\n};\n\nexport namespace BadRequestWithCodeError {\n\t/**\n\t * If VALIDATE_INPUT, you should see the inputs that were wrong in the details object.\n\t */\n\texport enum error {\n\t\tVALIDATE_INPUT = \"VALIDATE_INPUT\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\nimport type { ModifyUserDeploymentConfiguration } from \"./ModifyUserDeploymentConfiguration\";\nimport type { RolloutStepRequest } from \"./RolloutStepRequest\";\n\n/**\n * Request body to create a new rollout for an application.\n */\nexport type CreateApplicationRolloutRequest = {\n\ttarget_configuration: ModifyUserDeploymentConfiguration;\n\t/**\n\t * Strategy used for the rollout. Currently supports only \"rolling\".\n\t */\n\tstrategy: CreateApplicationRolloutRequest.strategy;\n\t/**\n\t * Percentage of rollout to increase in each step when \"steps\" is not specificed. Applicable values are 5, 10, 20, 25, 50, 100.\n\t * These create rollouts with 20, 10, 5, 4, 2, 1 steps respectively.\n\t *\n\t */\n\tstep_percentage?: CreateApplicationRolloutRequest.step_percentage;\n\t/**\n\t * Steps defining the rollout process, when \"step_percentage\" is not defined.\n\t * Only one of \"step_percentage\" or \"steps\" can be defined when creating a rollout.\n\t * \"steps\" allow granular control over each step.\n\t *\n\t */\n\tsteps?: Array<RolloutStepRequest>;\n\t/**\n\t * Description of the rollout process.\n\t */\n\tdescription: string;\n\t/**\n\t * Kind of the rollout process.\n\t * - \"full_auto\": The default rollout mode, which starts progressing the steps upon rollout creation.\n\t * - \"full_manual\": Requires manually progressing each step in the rollout using the UpdateRollout's action paramater.\n\t *\n\t */\n\tkind?: CreateApplicationRolloutRequest.kind;\n};\n\nexport namespace CreateApplicationRolloutRequest {\n\t/**\n\t * Strategy used for the rollout. Currently supports only \"rolling\".\n\t */\n\texport enum strategy {\n\t\tROLLING = \"rolling\",\n\t}\n\n\t/**\n\t * Percentage of rollout to increase in each step when \"steps\" is not specificed. Applicable values are 5, 10, 20, 25, 50, 100.\n\t * These create rollouts with 20, 10, 5, 4, 2, 1 steps respectively.\n\t *\n\t */\n\texport enum step_percentage {\n\t\t\"_5\" = 5,\n\t\t\"_10\" = 10,\n\t\t\"_20\" = 20,\n\t\t\"_25\" = 25,\n\t\t\"_50\" = 50,\n\t\t\"_100\" = 100,\n\t}\n\n\t/**\n\t * Kind of the rollout process.\n\t * - \"full_auto\": The default rollout mode, which starts progressing the steps upon rollout creation.\n\t * - \"full_manual\": Requires manually progressing each step in the rollout using the UpdateRollout's action paramater.\n\t *\n\t */\n\texport enum kind {\n\t\tFULL_AUTO = \"full_auto\",\n\t\tFULL_MANUAL = \"full_manual\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\n/**\n * Response when the deployment that is backing the resource is not found.\n *\n */\nexport type DeploymentNotFoundError = {\n\terror: DeploymentNotFoundError.error;\n};\n\nexport namespace DeploymentNotFoundError {\n\texport enum error {\n\t\tDEPLOYMENT_NOT_FOUND = \"DEPLOYMENT_NOT_FOUND\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\n/**\n * The image registry already exists\n */\nexport type ImageRegistryAlreadyExistsError = {\n\t/**\n\t * The domain of the registry already exists\n\t */\n\terror: ImageRegistryAlreadyExistsError.error;\n\t/**\n\t * Details that might be filled depending on the error code.\n\t */\n\tdetails?: Record<string, any>;\n};\n\nexport namespace ImageRegistryAlreadyExistsError {\n\t/**\n\t * The domain of the registry already exists\n\t */\n\texport enum error {\n\t\tIMAGE_REGISTRY_ALREADY_EXISTS = \"IMAGE_REGISTRY_ALREADY_EXISTS\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\n/**\n * The image registry is configured to be public, so it does not have a public key\n */\nexport type ImageRegistryIsPublic = {\n\terror: ImageRegistryIsPublic.error;\n};\n\nexport namespace ImageRegistryIsPublic {\n\texport enum error {\n\t\tIMAGE_REGISTRY_IS_PUBLIC = \"IMAGE_REGISTRY_IS_PUBLIC\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\n/**\n * The registry is not allowed to be added\n */\nexport type ImageRegistryNotAllowedError = {\n\t/**\n\t * The domain of the registry is not allowed to be added\n\t */\n\terror: ImageRegistryNotAllowedError.error;\n\t/**\n\t * Details that might be filled depending on the error code.\n\t */\n\tdetails?: Record<string, any>;\n};\n\nexport namespace ImageRegistryNotAllowedError {\n\t/**\n\t * The domain of the registry is not allowed to be added\n\t */\n\texport enum error {\n\t\tIMAGE_REGISTRY_NOT_ALLOWED = \"IMAGE_REGISTRY_NOT_ALLOWED\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\n/**\n * The image registry does not exist\n */\nexport type ImageRegistryNotFoundError = {\n\terror: ImageRegistryNotFoundError.error;\n};\n\nexport namespace ImageRegistryNotFoundError {\n\texport enum error {\n\t\tIMAGE_REGISTRY_NOT_FOUND = \"IMAGE_REGISTRY_NOT_FOUND\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\nexport enum ImageRegistryPermissions {\n\tPULL = \"pull\",\n\tPUSH = \"push\",\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\nexport type ImageRegistryProtocolAlreadyExists = {\n\terror: ImageRegistryProtocolAlreadyExists.error;\n};\n\nexport namespace ImageRegistryProtocolAlreadyExists {\n\texport enum error {\n\t\tIMAGE_REGISTRY_PROTOCOL_ALREADY_EXISTS = \"IMAGE_REGISTRY_PROTOCOL_ALREADY_EXISTS\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\n/**\n * Returned when deleting an image registry protocol and it is referenced by a resource.\n */\nexport type ImageRegistryProtocolIsReferencedError = {\n\terror: ImageRegistryProtocolIsReferencedError.error;\n};\n\nexport namespace ImageRegistryProtocolIsReferencedError {\n\texport enum error {\n\t\tIMAGE_REGISTRY_PROTO_IS_REFERENCED = \"IMAGE_REGISTRY_PROTO_IS_REFERENCED\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\n/**\n * The image registry protocol does not exist\n */\nexport type ImageRegistryProtocolNotFound = {\n\terror: ImageRegistryProtocolNotFound.error;\n};\n\nexport namespace ImageRegistryProtocolNotFound {\n\texport enum error {\n\t\tIMAGE_REGISTRY_PROTOCOL_NOT_FOUND = \"IMAGE_REGISTRY_PROTOCOL_NOT_FOUND\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\n/**\n * Configuration for a VM provisioner.\n */\nexport type ProvisionerConfiguration = {\n\t/**\n\t * The provisioner to use.\n\t */\n\ttype: ProvisionerConfiguration.type;\n};\n\nexport namespace ProvisionerConfiguration {\n\t/**\n\t * The provisioner to use.\n\t */\n\texport enum type {\n\t\tNONE = \"none\",\n\t\tCLOUDINIT = \"cloudinit\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\nimport type { ISO8601Timestamp } from \"./ISO8601Timestamp\";\n\n/**\n * Steps within the rollout process.\n */\nexport type RolloutStep = {\n\t/**\n\t * The sequential order of the rollout step, automatically assigned starting from 1, based on the total number of steps in the rollout process.\n\t */\n\tid: number;\n\tstep_size: {\n\t\t/**\n\t\t * Percentage of instances affected in this step. Min 10% and Max 100%.\n\t\t */\n\t\tpercentage: number;\n\t};\n\t/**\n\t * Description of the rollout step.\n\t */\n\tdescription: string;\n\t/**\n\t * Status of the rollout step.\n\t */\n\tstatus: RolloutStep.status;\n\t/**\n\t * Reason why the step has the current status\n\t */\n\treason?: string;\n\tstarted_at?: ISO8601Timestamp;\n\tcompleted_at?: ISO8601Timestamp;\n};\n\nexport namespace RolloutStep {\n\t/**\n\t * Status of the rollout step.\n\t */\n\texport enum status {\n\t\tPENDING = \"pending\",\n\t\tPROGRESSING = \"progressing\",\n\t\tREVERTING = \"reverting\",\n\t\tCOMPLETED = \"completed\",\n\t\tREVERTED = \"reverted\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\nimport type { GenericErrorDetails } from \"./GenericErrorDetails\";\n\n/**\n * The secret name already exists\n */\nexport type SecretNameAlreadyExists = {\n\t/**\n\t * The secret name already exists in this account\n\t */\n\terror: SecretNameAlreadyExists.error;\n\tdetails?: GenericErrorDetails;\n};\n\nexport namespace SecretNameAlreadyExists {\n\t/**\n\t * The secret name already exists in this account\n\t */\n\texport enum error {\n\t\tSECRET_NAME_ALREADY_EXISTS = \"SECRET_NAME_ALREADY_EXISTS\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\n/**\n * The secret name does not exist\n */\nexport type SecretNotFound = {\n\terror: SecretNotFound.error;\n};\n\nexport namespace SecretNotFound {\n\texport enum error {\n\t\tSECRET_NAME_NOT_FOUND = \"SECRET_NAME_NOT_FOUND\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\n/**\n * The ssh public key does not exist\n */\nexport type SSHPublicKeyNotFoundError = {\n\terror: SSHPublicKeyNotFoundError.error;\n};\n\nexport namespace SSHPublicKeyNotFoundError {\n\texport enum error {\n\t\tSSH_PUBLIC_KEY_NOT_FOUND = \"SSH_PUBLIC_KEY_NOT_FOUND\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\n\n/**\n * Request body to update a rollout within an application.\n */\nexport type UpdateApplicationRolloutRequest = {\n\t/**\n\t * Action to perform on the rollout.\n\t * - next: The rollout will go forward one step. It will succeed if the current step is finished.\n\t * - previous: The rollout will go back one step.\n\t * - revert: The rollout goes back to the first step in one go.\n\t *\n\t */\n\taction: UpdateApplicationRolloutRequest.action;\n};\n\nexport namespace UpdateApplicationRolloutRequest {\n\t/**\n\t * Action to perform on the rollout.\n\t * - next: The rollout will go forward one step. It will succeed if the current step is finished.\n\t * - previous: The rollout will go back one step.\n\t * - revert: The rollout goes back to the first step in one go.\n\t *\n\t */\n\texport enum action {\n\t\tNEXT = \"next\",\n\t\tPREVIOUS = \"previous\",\n\t\tREVERT = \"revert\",\n\t}\n}\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport { ApiError } from \"./ApiError\";\nimport { CancelablePromise } from \"./CancelablePromise\";\nimport { type OpenAPIConfig } from \"./OpenAPI\";\nimport type { ApiRequestOptions } from \"./ApiRequestOptions\";\nimport type { ApiResult } from \"./ApiResult\";\nimport type { OnCancel } from \"./CancelablePromise\";\n\ntype FetchResponseInfo = {\n\tcode: number;\n\tmessage: string;\n};\n\ntype FetchResult<ResponseType = unknown> = {\n\tsuccess: boolean;\n\tresult?: ResponseType;\n\terrors?: FetchResponseInfo[];\n\tmessages?: FetchResponseInfo[];\n};\n\nconst isDefined = <T>(\n\tvalue: T | null | undefined\n): value is Exclude<T, null | undefined> => {\n\treturn value !== undefined && value !== null;\n};\n\nconst isString = (value: any): value is string => {\n\treturn typeof value === \"string\";\n};\n\nconst isStringWithValue = (value: any): value is string => {\n\treturn isString(value) && value !== \"\";\n};\n\nconst isBlob = (value: any): value is Blob => {\n\treturn (\n\t\ttypeof value === \"object\" &&\n\t\ttypeof value.type === \"string\" &&\n\t\ttypeof value.stream === \"function\" &&\n\t\ttypeof value.arrayBuffer === \"function\" &&\n\t\ttypeof value.constructor === \"function\" &&\n\t\ttypeof value.constructor.name === \"string\" &&\n\t\t/^(Blob|File)$/.test(value.constructor.name) &&\n\t\t/^(Blob|File)$/.test(value[Symbol.toStringTag])\n\t);\n};\n\nconst base64 = (str: string): string => {\n\ttry {\n\t\treturn btoa(str);\n\t} catch (err) {\n\t\t// @ts-ignore\n\t\treturn Buffer.from(str).toString(\"base64\");\n\t}\n};\n\nconst getQueryString = (params: Record<string, any>): string => {\n\tconst qs: string[] = [];\n\n\tconst append = (key: string, value: any) => {\n\t\tqs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n\t};\n\n\tconst process = (key: string, value: any) => {\n\t\tif (isDefined(value)) {\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tvalue.forEach((v) => {\n\t\t\t\t\tprocess(key, v);\n\t\t\t\t});\n\t\t\t} else if (typeof value === \"object\") {\n\t\t\t\tObject.entries(value).forEach(([k, v]) => {\n\t\t\t\t\tprocess(`${key}[${k}]`, v);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tappend(key, value);\n\t\t\t}\n\t\t}\n\t};\n\n\tObject.entries(params).forEach(([key, value]) => {\n\t\tprocess(key, value);\n\t});\n\n\tif (qs.length > 0) {\n\t\treturn `?${qs.join(\"&\")}`;\n\t}\n\n\treturn \"\";\n};\n\nconst getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {\n\tconst encoder = config.ENCODE_PATH || encodeURI;\n\n\tconst path = options.url\n\t\t.replace(\"{api-version}\", config.VERSION)\n\t\t.replace(/{(.*?)}/g, (substring: string, group: string) => {\n\t\t\tif (options.path?.hasOwnProperty(group)) {\n\t\t\t\treturn encoder(String(options.path[group]));\n\t\t\t}\n\t\t\treturn substring;\n\t\t});\n\n\tconst url = `${config.BASE}${path}`;\n\tif (options.query) {\n\t\treturn `${url}${getQueryString(options.query)}`;\n\t}\n\treturn url;\n};\n\nconst getFormData = (options: ApiRequestOptions): FormData | undefined => {\n\tif (options.formData) {\n\t\tconst formData = new FormData();\n\n\t\tconst process = async (key: string, value: any) => {\n\t\t\tif (isString(value)) {\n\t\t\t\tformData.append(key, value);\n\t\t\t} else {\n\t\t\t\tformData.append(key, JSON.stringify(value));\n\t\t\t}\n\t\t};\n\n\t\tObject.entries(options.formData)\n\t\t\t.filter(([_, value]) => isDefined(value))\n\t\t\t.forEach(([key, value]) => {\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\tvalue.forEach((v) => process(key, v));\n\t\t\t\t} else {\n\t\t\t\t\tprocess(key, value);\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn formData;\n\t}\n\treturn undefined;\n};\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\n\nconst resolve = async <T>(\n\toptions: ApiRequestOptions,\n\tresolver?: T | Resolver<T>\n): Promise<T | undefined> => {\n\tif (typeof resolver === \"function\") {\n\t\treturn (resolver as Resolver<T>)(options);\n\t}\n\treturn resolver;\n};\n\nconst getHeaders = async (\n\tconfig: OpenAPIConfig,\n\toptions: ApiRequestOptions\n): Promise<Headers> => {\n\tconst token = await resolve(options, config.TOKEN);\n\tconst username = await resolve(options, config.USERNAME);\n\tconst password = await resolve(options, config.PASSWORD);\n\tconst additionalHeaders = await resolve(options, config.HEADERS);\n\n\tconst headers = Object.entries({\n\t\tAccept: \"application/json\",\n\t\t...additionalHeaders,\n\t\t...options.headers,\n\t})\n\t\t.filter(([_, value]) => isDefined(value))\n\t\t.reduce(\n\t\t\t(headers, [key, value]) => ({\n\t\t\t\t...headers,\n\t\t\t\t[key]: String(value),\n\t\t\t}),\n\t\t\t{} as Record<string, string>\n\t\t);\n\n\tif (isStringWithValue(token)) {\n\t\theaders[\"Authorization\"] = `Bearer ${token}`;\n\t}\n\n\tif (isStringWithValue(username) && isStringWithValue(password)) {\n\t\tconst credentials = base64(`${username}:${password}`);\n\t\theaders[\"Authorization\"] = `Basic ${credentials}`;\n\t}\n\n\tif (options.body) {\n\t\tif (options.mediaType) {\n\t\t\theaders[\"Content-Type\"] = options.mediaType;\n\t\t} else if (isBlob(options.body)) {\n\t\t\theaders[\"Content-Type\"] = options.body.type || \"application/octet-stream\";\n\t\t} else if (isString(options.body)) {\n\t\t\theaders[\"Content-Type\"] = \"text/plain\";\n\t\t} else {\n\t\t\theaders[\"Content-Type\"] = \"application/json\";\n\t\t}\n\t}\n\n\treturn new Headers(headers);\n};\n\nconst getRequestBody = (options: ApiRequestOptions): any => {\n\tif (options.body !== undefined) {\n\t\tif (options.mediaType?.includes(\"/json\")) {\n\t\t\treturn JSON.stringify(options.body);\n\t\t} else if (isString(options.body) || isBlob(options.body)) {\n\t\t\treturn options.body;\n\t\t} else {\n\t\t\treturn JSON.stringify(options.body);\n\t\t}\n\t}\n\treturn undefined;\n};\n\nconst isResponseSchemaV4 = (\n\tconfig: OpenAPIConfig,\n\t_options: ApiRequestOptions\n): boolean => {\n\treturn config.BASE.endsWith(\"/containers\");\n};\n\nconst parseResponseSchemaV4 = <T>(\n\turl: string,\n\tresponse: Response,\n\tresponseHeader: string | undefined,\n\tresponseBody: any\n): ApiResult => {\n\tconst fetchResult = (\n\t\ttypeof responseBody === \"object\" ? responseBody : JSON.parse(responseBody)\n\t) as FetchResult<T>;\n\tconst ok = response.ok && fetchResult.success;\n\tlet result: any;\n\tif (ok) {\n\t\tif (fetchResult.result !== undefined) {\n\t\t\tresult = fetchResult.result;\n\t\t} else {\n\t\t\tresult = {};\n\t\t}\n\t} else {\n\t\tresult = { error: fetchResult.errors?.[0]?.message };\n\t}\n\treturn {\n\t\turl,\n\t\tok,\n\t\tstatus: response.status,\n\t\tstatusText: response.statusText,\n\t\tbody: responseHeader ?? result,\n\t};\n};\n\nexport const sendRequest = async (\n\tconfig: OpenAPIConfig,\n\toptions: ApiRequestOptions,\n\turl: string,\n\tbody: any,\n\tformData: FormData | undefined,\n\theaders: Headers,\n\tonCancel: OnCancel\n): Promise<Response> => {\n\tconst controller = new AbortController();\n\n\tconst request: RequestInit = {\n\t\theaders,\n\t\tbody: body ?? formData,\n\t\tmethod: options.method,\n\t\tsignal: controller.signal,\n\t};\n\n\tif (config.WITH_CREDENTIALS) {\n\t\t// :(\n\t\t// The vite-plugin is attempting to typecheck everything with worker types, which does not support request.credentials\n\t\t// Also note this is always set to \"omit\".\n\t\t// @ts-ignore\n\t\trequest.credentials = config.CREDENTIALS;\n\t}\n\n\tonCancel(() => controller.abort());\n\n\treturn await fetch(url, request);\n};\n\nconst getResponseHeader = (\n\tresponse: Response,\n\tresponseHeader?: string\n): string | undefined => {\n\tif (responseHeader) {\n\t\tconst content = response.headers.get(responseHeader);\n\t\tif (isString(content)) {\n\t\t\treturn content;\n\t\t}\n\t}\n\treturn undefined;\n};\n\nconst getResponseBody = async (response: Response): Promise<any> => {\n\tif (response.status !== 204) {\n\t\ttry {\n\t\t\tconst contentType = response.headers.get(\"Content-Type\");\n\t\t\tif (contentType) {\n\t\t\t\tconst jsonTypes = [\"application/json\", \"application/problem+json\"];\n\t\t\t\tconst isJSON = jsonTypes.some((type) =>\n\t\t\t\t\tcontentType.toLowerCase().startsWith(type)\n\t\t\t\t);\n\t\t\t\tif (isJSON) {\n\t\t\t\t\treturn await response.json();\n\t\t\t\t} else {\n\t\t\t\t\treturn await response.text();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\t}\n\treturn undefined;\n};\n\nconst catchErrorCodes = (\n\toptions: ApiRequestOptions,\n\tresult: ApiResult\n): void => {\n\tconst errors: Record<number, string> = {\n\t\t400: \"Bad Request\",\n\t\t401: \"Unauthorized\",\n\t\t403: \"Forbidden\",\n\t\t404: \"Not Found\",\n\t\t500: \"Internal Server Error\",\n\t\t502: \"Bad Gateway\",\n\t\t503: \"Service Unavailable\",\n\t\t...options.errors,\n\t};\n\n\tconst error = errors[result.status];\n\tif (error) {\n\t\tthrow new ApiError(options, result, error);\n\t}\n\n\tif (!result.ok) {\n\t\tthrow new ApiError(options, result, \"Generic Error\");\n\t}\n};\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(\n\tconfig: OpenAPIConfig,\n\toptions: ApiRequestOptions\n): CancelablePromise<T> => {\n\treturn new CancelablePromise(async (resolve, reject, onCancel) => {\n\t\ttry {\n\t\t\tconst url = getUrl(config, options);\n\t\t\tconst formData = getFormData(options);\n\t\t\tconst body = getRequestBody(options);\n\t\t\tconst headers = await getHeaders(config, options);\n\t\t\tdebugLogRequest(config, url, headers, formData ?? body ?? {});\n\n\t\t\tif (!onCancel.isCancelled) {\n\t\t\t\tconst response = await sendRequest(\n\t\t\t\t\tconfig,\n\t\t\t\t\toptions,\n\t\t\t\t\turl,\n\t\t\t\t\tbody,\n\t\t\t\t\tformData,\n\t\t\t\t\theaders,\n\t\t\t\t\tonCancel\n\t\t\t\t);\n\t\t\t\tconst responseBody = await getResponseBody(response);\n\t\t\t\tconst responseHeader = getResponseHeader(\n\t\t\t\t\tresponse,\n\t\t\t\t\toptions.responseHeader\n\t\t\t\t);\n\n\t\t\t\tlet result: ApiResult;\n\n\t\t\t\tif (isResponseSchemaV4(config, options)) {\n\t\t\t\t\tresult = parseResponseSchemaV4(\n\t\t\t\t\t\turl,\n\t\t\t\t\t\tresponse,\n\t\t\t\t\t\tresponseHeader,\n\t\t\t\t\t\tresponseBody\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tresult = {\n\t\t\t\t\t\turl,\n\t\t\t\t\t\tok: response.ok,\n\t\t\t\t\t\tstatus: response.status,\n\t\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\t\tbody: responseHeader ?? responseBody,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdebugLogResponse(config, result);\n\t\t\t\tcatchErrorCodes(options, result);\n\t\t\t\tresolve(result.body);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};\n\nconst debugLogRequest = async (\n\tconfig: OpenAPIConfig,\n\turl: string,\n\theaders: Headers,\n\tbody: FormData | unknown\n) => {\n\tconfig.LOGGER?.debug(`-- START CF API REQUEST: ${url}`);\n\tconst logHeaders = new Headers(headers);\n\tlogHeaders.delete(\"Authorization\");\n\tconfig.LOGGER?.debugWithSanitization(\n\t\t\"HEADERS:\",\n\t\tJSON.stringify(logHeaders, null, 2)\n\t);\n\tconfig.LOGGER?.debugWithSanitization(\n\t\t\"BODY:\",\n\t\tJSON.stringify(\n\t\t\tbody instanceof FormData ? await new Response(body).text() : body,\n\t\t\tnull,\n\t\t\t2\n\t\t)\n\t);\n\tconfig.LOGGER?.debug(\"-- END CF API REQUEST\");\n};\n\nconst debugLogResponse = (config: OpenAPIConfig, response: ApiResult) => {\n\tconfig.LOGGER?.debug(\n\t\t\"-- START CF API RESPONSE:\",\n\t\tresponse.statusText,\n\t\tresponse.status\n\t);\n\n\tconfig.LOGGER?.debugWithSanitization(\"RESPONSE:\", response.body);\n\tconfig.LOGGER?.debug(\"-- END CF API RESPONSE\");\n};\n","/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport { OpenAPI } from \"../core/OpenAPI\";\nimport { request as __request } from \"../core/request\";\nimport type { CancelablePromise } from \"../core/CancelablePromise\";\nimport type { AccountRegistryToken } from \"../models/AccountRegistryToken\";\nimport type { CreateImageRegistryRequestBody } from \"../models/CreateImageRegistryRequestBody\";\nimport type { CustomerImageRegistry } from \"../models/CustomerImageRegistry\";\nimport type { EmptyResponse } from \"../models/EmptyResponse\";\nimport type { ImageRegistryCredentialsConfiguration } from \"../models/ImageRegistryCredentialsConfiguration\";\nimport type { ImageRegistryProtocol } from \"../models/ImageRegistryProtocol\";\nimport type { ImageRegistryProtocols } from \"../models/ImageRegistryProtocols\";\n\nexport class ImageRegistriesService {\n\t/**\n\t * Create an image registry protocol that resolves to multiple domains.\n\t * @param requestBody\n\t * @returns ImageRegistryProtocol The image registry protocol was created\n\t * @throws ApiError\n\t */\n\tpublic static createImageRegistryProtocol(\n\t\trequestBody: ImageRegistryProtocol\n\t): CancelablePromise<ImageRegistryProtocol> {\n\t\treturn __request(OpenAPI, {\n\t\t\tmethod: \"POST\",\n\t\t\turl: \"/registries/protos\",\n\t\t\tbody: requestBody,\n\t\t\tmediaType: \"application/json\",\n\t\t\terrors: {\n\t\t\t\t400: `Bad Request that contains a specific constant code and details object about the error.`,\n\t\t\t\t403: `The registry that is being added is not allowed`,\n\t\t\t\t409: `Image registry protocol already exists`,\n\t\t\t\t500: `There has been an internal error`,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * List all image registry protocols.\n\t * @returns ImageRegistryProtocols The image registry protocols in the account\n\t * @throws ApiError\n\t */\n\tpublic static listImageRegistryProtocols(): CancelablePromise<ImageRegistryProtocols> {\n\t\treturn __request(OpenAPI, {\n\t\t\tmethod: \"GET\",\n\t\t\turl: \"/registries/protos\",\n\t\t\terrors: {\n\t\t\t\t500: `There has been an internal error`,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Modify an image registry protocol. The previous list of domains will be replaced by the ones you specify in this endpoint.\n\t * @param requestBody\n\t * @returns ImageRegistryProtocol The image registry protocol was modified\n\t * @throws ApiError\n\t */\n\tpublic static modifyImageRegistryProtocol(\n\t\trequestBody: ImageRegistryProtocol\n\t): CancelablePromise<ImageRegistryProtocol> {\n\t\treturn __request(OpenAPI, {\n\t\t\tmethod: \"PUT\",\n\t\t\turl: \"/registries/protos\",\n\t\t\tbody: requestBody,\n\t\t\tmediaType: \"application/json\",\n\t\t\terrors: {\n\t\t\t\t400: `Bad Request that contains a specific constant code and details object about the error.`,\n\t\t\t\t403: `The registry that is being added is not allowed`,\n\t\t\t\t404: `Image registry protocol doesn't exist`,\n\t\t\t\t500: `There has been an internal error`,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Delete an image registry protocol. Be careful, if there is deployments running referencing this protocol they won't be able to pull the image.\n\t * @param proto\n\t * @returns EmptyResponse Image registry protocol was deleted successfully\n\t * @throws ApiError\n\t */\n\tpublic static deleteImageRegistryProto(\n\t\tproto: string\n\t): CancelablePromise<EmptyResponse> {\n\t\treturn __request(OpenAPI, {\n\t\t\tmethod: \"DELETE\",\n\t\t\turl: \"/registries/protos/{proto}\",\n\t\t\tpath: {\n\t\t\t\tproto: proto,\n\t\t\t},\n\t\t\terrors: {\n\t\t\t\t400: `The image registry protocol couldn't be deleted because it's referenced by a deployment or application`,\n\t\t\t\t404: `Image registry protocol doesn't exist`,\n\t\t\t\t500: `There has been an internal error`,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Get a JWT to pull from the image registry\n\t * Get a JWT to pull from the image registry specifying its domain\n\t * @param domain\n\t * @param requestBody\n\t * @returns AccountRegistryToken Credentials with 'pull' or 'push' permissions to access the registry\n\t * @throws ApiError\n\t */\n\tpublic static generateImageRegistryCredentials(\n\t\tdomain: string,\n\t\trequestBody: ImageRegistryCredentialsConfiguration\n\t): CancelablePromise<AccountRegistryToken> {\n\t\treturn __request(OpenAPI, {\n\t\t\tmethod: \"POST\",\n\t\t\turl: \"/registries/{domain}/credentials\",\n\t\t\tpath: {\n\t\t\t\tdomain: domain,\n\t\t\t},\n\t\t\tbody: requestBody,\n\t\t\tmediaType: \"application/json\",\n\t\t\terrors: {\n\t\t\t\t400: `Bad Request that contains a specific constant code and details object about the error.`,\n\t\t\t\t404: `The image registry does not exist`,\n\t\t\t\t409: `The registry was configured as public, so credentials can not be generated`,\n\t\t\t\t500: `There has been an internal error`,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Delete a registry from the account\n\t * Delete a registry from the account, this will make Cloudchamber unable to pull images from the registry\n\t * @param domain\n\t * @returns EmptyResponse The image registry is deleted\n\t * @throws ApiError\n\t */\n\tpublic static deleteImageRegistry(\n\t\tdomain: string\n\t): CancelablePromise<EmptyResponse> {\n\t\treturn __request(OpenAPI, {\n\t\t\tmethod: \"DELETE\",\n\t\t\turl: \"/registries/{domain}\",\n\t\t\tpath: {\n\t\t\t\tdomain: domain,\n\t\t\t},\n\t\t\terrors: {\n\t\t\t\t404: `The image registry does not exist`,\n\t\t\t\t500: `There has been an internal error`,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Get the list of configured registries in the account\n\t * Get the list of configured registries in the account\n\t * @returns CustomerImageRegistry The list of registries that are added in the account\n\t * @throws ApiError\n\t */\n\tpublic static listImageRegistries(): CancelablePromise<\n\t\tArray<CustomerImageRegistry>\n\t> {\n\t\treturn __request(OpenAPI, {\n\t\t\tmethod: \"GET\",\n\t\t\turl: \"/registries\",\n\t\t\terrors: {\n\t\t\t\t500: `There has been an internal error`,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Add a new image registry configuration\n\t * Add a new image registry into your account, so then Cloudflare can pull docker images with public key JWT authentication\n\t * @param requestBody\n\t * @returns CustomerImageRegistry Created a new image registry in the account\n\t * @throws ApiError\n\t */\n\tpublic static createImageRegistry(\n\t\trequestBody: CreateImageRegistryRequestBody\n\t): CancelablePromise<CustomerImageRegistry> {\n\t\treturn __request(OpenAPI, {\n\t\t\tmethod: \"POST\",\n\t\t\turl: \"/registries\",\n\t\t\tbody: requestBody,\n\t\t\tmediaType: \"application/json\",\n\t\t\terrors: {\n\t\t\t\t400: `Image registry input is malformed, see the error details`,\n\t\t\t\t403: `The registry that is being added is not allowed`,\n\t\t\t\t409: `The image registry already exists in the account`,\n\t\t\t\t500: `There has been an internal error`,\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This is used to provide telemetry with a sanitised error\n * message that could not have any user-identifying information.\n * Set to `true` to duplicate `message`.\n * */\ntype TelemetryMessage = {\n\ttelemetryMessage?: string | true;\n};\n\n/**\n * Base class for errors where the user has done something wrong. These are not\n * reported to Sentry. API errors are intentionally *not* `UserError`s, and are\n * reported to Sentry. This will help us understand which API errors need better\n * messaging.\n */\nexport class UserError extends Error {\n\ttelemetryMessage: string | undefined;\n\tconstructor(\n\t\tmessage?: string | undefined,\n\t\toptions?:\n\t\t\t| ({\n\t\t\t\t\tcause?: unknown;\n\t\t\t } & TelemetryMessage)\n\t\t\t| undefined\n\t) {\n\t\tsuper(message, options);\n\t\t// Restore prototype chain:\n\t\t// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#support-for-newtarget\n\t\tObject.setPrototypeOf(this, new.target.prototype);\n\t\tthis.telemetryMessage =\n\t\t\toptions?.telemetryMessage === true ? message : options?.telemetryMessage;\n\t}\n}\n","import { spawn } from \"child_process\";\nimport { readFileSync } from \"fs\";\nimport { UserError } from \"./error\";\nimport type {\n\tBuildArgs,\n\tContainerDevOptions,\n\tImageURIConfig,\n\tLogger,\n} from \"./types\";\n\nexport async function constructBuildCommand(\n\toptions: BuildArgs,\n\tlogger?: Logger\n) {\n\tconst platform = options.platform ?? \"linux/amd64\";\n\tconst buildCmd = [\n\t\t\"build\",\n\t\t\"--load\",\n\t\t\"-t\",\n\t\toptions.tag,\n\t\t\"--platform\",\n\t\tplatform,\n\t\t\"--provenance=false\",\n\t];\n\n\tif (options.args) {\n\t\tfor (const arg in options.args) {\n\t\t\tbuildCmd.push(\"--build-arg\", `${arg}=${options.args[arg]}`);\n\t\t}\n\t}\n\tif (options.setNetworkToHost) {\n\t\tbuildCmd.push(\"--network\", \"host\");\n\t}\n\n\tconst dockerfile = readFileSync(options.pathToDockerfile, \"utf-8\");\n\t// pipe in the dockerfile\n\tbuildCmd.push(\"-f\", \"-\");\n\tbuildCmd.push(options.buildContext);\n\tlogger?.debug(`Building image with command: ${buildCmd.join(\" \")}`);\n\treturn { buildCmd, dockerfile };\n}\n\nexport function dockerBuild(\n\tdockerPath: string,\n\toptions: {\n\t\tbuildCmd: string[];\n\t\tdockerfile: string;\n\t}\n): { abort: () => void; ready: Promise<void> } {\n\tlet errorHandled = false;\n\tlet resolve: () => void;\n\tlet reject: (err: unknown) => void;\n\tconst ready = new Promise<void>((res, rej) => {\n\t\tresolve = res;\n\t\treject = rej;\n\t});\n\n\tconst child = spawn(dockerPath, options.buildCmd, {\n\t\tstdio: [\"pipe\", \"inherit\", \"inherit\"],\n\t\t// We need to set detached to true so that the child process\n\t\t// will control all of its child processed and we can kill\n\t\t// all of them in case we need to abort the build process\n\t\tdetached: true,\n\t});\n\tif (child.stdin !== null) {\n\t\tchild.stdin.write(options.dockerfile);\n\t\tchild.stdin.end();\n\t}\n\n\tchild.on(\"exit\", (code) => {\n\t\tif (code === 0) {\n\t\t\tresolve();\n\t\t} else if (!errorHandled) {\n\t\t\terrorHandled = true;\n\t\t\treject(new UserError(`Docker build exited with code: ${code}`));\n\t\t}\n\t});\n\tchild.on(\"error\", (err) => {\n\t\tif (!errorHandled) {\n\t\t\terrorHandled = true;\n\t\t\treject(err);\n\t\t}\n\t});\n\treturn {\n\t\tabort: () => {\n\t\t\tchild.unref();\n\t\t\tif (child.pid !== undefined) {\n\t\t\t\t// kill run on the negative PID kills the whole group controlled by the child process\n\t\t\t\tprocess.kill(-child.pid);\n\t\t\t}\n\t\t},\n\t\tready,\n\t};\n}\n\nexport async function buildImage(\n\tdockerPath: string,\n\toptions: Exclude<ContainerDevOptions, ImageURIConfig>\n) {\n\tconst { buildCmd, dockerfile } = await constructBuildCommand({\n\t\ttag: options.image_tag,\n\t\tpathToDockerfile: options.dockerfile,\n\t\tbuildContext: options.image_build_context,\n\t\targs: options.image_vars,\n\t\tplatform: \"linux/amd64\",\n\t});\n\n\treturn dockerBuild(dockerPath, { buildCmd, dockerfile });\n}\n","import { spawn } from \"node:child_process\";\nimport { ImageRegistriesService, ImageRegistryPermissions } from \"./client\";\nimport { UserError } from \"./error\";\n\n/**\n * Gets push and pull credentials for a configured image registry\n * and runs `docker login`, so subsequent image pushes or pulls are\n * authenticated\n */\nexport async function dockerLoginImageRegistry(\n\tpathToDocker: string,\n\tdomain: string\n) {\n\t// how long the credentials should be valid for\n\tconst expirationMinutes = 15;\n\n\tconst credentials =\n\t\tawait ImageRegistriesService.generateImageRegistryCredentials(domain, {\n\t\t\texpiration_minutes: expirationMinutes,\n\t\t\tpermissions: [\n\t\t\t\tImageRegistryPermissions.PUSH,\n\t\t\t\tImageRegistryPermissions.PULL,\n\t\t\t],\n\t\t});\n\n\tconst child = spawn(\n\t\tpathToDocker,\n\t\t[\"login\", \"--password-stdin\", \"--username\", credentials.username, domain],\n\t\t{ stdio: [\"pipe\", \"inherit\", \"inherit\"] }\n\t).on(\"error\", (err) => {\n\t\tthrow err;\n\t});\n\n\tchild.stdin.write(credentials.password);\n\tchild.stdin.end();\n\tawait new Promise<void>((resolve, reject) => {\n\t\tchild.on(\"close\", (code) => {\n\t\t\tif (code === 0) {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\treject(new UserError(`Login failed with code: ${code}`));\n\t\t\t}\n\t\t});\n\t});\n}\n","import { getCloudflareContainerRegistry } from \"./knobs\";\n\n// The Cloudflare managed registry is special in that the namesapces for repos should always\n// start with the Cloudflare Account tag\n// This is a helper to generate the image tag with correct namespace attached to the Cloudflare Registry host\nexport const getCloudflareRegistryWithAccountNamespace = (\n\taccountID: string,\n\ttag: string\n): string => {\n\treturn `${getCloudflareContainerRegistry()}/${accountID}/${tag}`;\n};\n\nexport const MF_DEV_CONTAINER_PREFIX = \"cloudflare-dev\";\n","import { MF_DEV_CONTAINER_PREFIX } from \"./registry\";\n\n// Will return the default cloudflare managed registry for either a staging or production envrionment\n// based on the env var WRANGLER_API_ENVIRONMENT. The default registry can be overriden with the env\n// var CLOUDFLARE_CONTAINER_REGISTRY.\nexport const getCloudflareContainerRegistry = () => {\n\t// previously defaulted to registry.cloudchamber.cfdata.org\n\treturn (\n\t\tprocess.env.CLOUDFLARE_CONTAINER_REGISTRY ??\n\t\t(process.env.WRANGLER_API_ENVIRONMENT === \"staging\"\n\t\t\t? \"staging.registry.cloudflare.com\"\n\t\t\t: \"registry.cloudflare.com\")\n\t);\n};\n\n/** Prefixes with the cloudflare-dev namespace. The name should be the container's DO classname, and the tag a build uuid. */\nexport const getDevContainerImageName = (name: string, tag: string) => {\n\treturn `${MF_DEV_CONTAINER_PREFIX}/${name.toLowerCase()}:${tag}`;\n};\n","import { spawn } from \"child_process\";\nimport { UserError } from \"./error\";\n\nexport async function dockerImageInspect(\n\tdockerPath: string,\n\toptions: { imageTag: string; formatString: string }\n): Promise<string> {\n\treturn new Promise((resolve, reject) => {\n\t\tconst proc = spawn(\n\t\t\tdockerPath,\n\t\t\t[\"image\", \"inspect\", options.imageTag, \"--format\", options.formatString],\n\t\t\t{\n\t\t\t\tstdio: [\"ignore\", \"pipe\", \"pipe\"],\n\t\t\t}\n\t\t);\n\n\t\tlet stdout = \"\";\n\t\tlet stderr = \"\";\n\n\t\tproc.stdout.on(\"data\", (chunk) => (stdout += chunk));\n\t\tproc.stderr.on(\"data\", (chunk) => (stderr += chunk));\n\n\t\tproc.on(\"close\", (code) => {\n\t\t\tif (code !== 0) {\n\t\t\t\treturn reject(\n\t\t\t\t\tnew UserError(`failed inspecting image locally: ${stderr.trim()}`)\n\t\t\t\t);\n\t\t\t}\n\t\t\tresolve(stdout.trim());\n\t\t});\n\t\tproc.on(\"error\", (err) => reject(err));\n\t});\n}\n","import { execFileSync, spawn } from \"child_process\";\nimport { randomUUID } from \"crypto\";\nimport { existsSync, statSync } from \"fs\";\nimport path from \"path\";\nimport { UserError } from \"./error\";\nimport { dockerImageInspect } from \"./inspect\";\nimport type { ContainerDevOptions } from \"./types\";\nimport type { StdioOptions } from \"child_process\";\n\n/** helper for simple docker command call that don't require any io handling */\nexport const runDockerCmd = (\n\tdockerPath: string,\n\targs: string[],\n\tstdio?: StdioOptions\n): {\n\tabort: () => void;\n\tready: Promise<{ aborted: boolean }>;\n\t// Note: we make the return type a thenable just for convenience so that callers can directly await it\n\tthen: (resolve: () => void, reject: () => void) => void;\n} => {\n\tlet aborted = false;\n\tlet resolve: (args: { aborted: boolean }) => void;\n\tlet reject: (err: unknown) => void;\n\tconst ready = new Promise<{ aborted: boolean }>((res, rej) => {\n\t\tresolve = res;\n\t\treject = rej;\n\t});\n\tconst child = spawn(dockerPath, args, {\n\t\tstdio: stdio ?? \"inherit\",\n\t\t// We need to set detached to true so that the child process\n\t\t// will control all of its child processed and we can kill\n\t\t// all of them in case we need to abort the build process\n\t\tdetached: true,\n\t});\n\tlet errorHandled = false;\n\n\tchild.on(\"close\", (code) => {\n\t\tif (code === 0 || aborted) {\n\t\t\tresolve({ aborted });\n\t\t} else if (!errorHandled) {\n\t\t\terrorHandled = true;\n\t\t\treject(new UserError(`Docker command exited with code: ${code}`));\n\t\t}\n\t});\n\tchild.on(\"error\", (err) => {\n\t\tif (!errorHandled) {\n\t\t\terrorHandled = true;\n\t\t\treject(new UserError(`Docker command failed: ${err.message}`));\n\t\t}\n\t});\n\treturn {\n\t\tabort: () => {\n\t\t\taborted = true;\n\t\t\tchild.unref();\n\t\t\tif (child.pid !== undefined) {\n\t\t\t\t// kill run on the negative PID kills the whole group controlled by the child process\n\t\t\t\tprocess.kill(-child.pid);\n\t\t\t}\n\t\t},\n\t\tready,\n\t\tthen: async (onResolve, onReject) => ready.then(onResolve).catch(onReject),\n\t};\n};\n\nexport const runDockerCmdWithOutput = (dockerPath: string, args: string[]) => {\n\ttry {\n\t\tconst stdout = execFileSync(dockerPath, args, { encoding: \"utf8\" });\n\t\treturn stdout.trim();\n\t} catch (error) {\n\t\tthrow new UserError(\n\t\t\t`Failed running docker command: ${(error as Error).message}. Command: ${dockerPath} ${args.join(\" \")}`\n\t\t);\n\t}\n};\n\n/** Checks whether docker is running on the system */\nexport const isDockerRunning = async (dockerPath: string) => {\n\ttry {\n\t\tawait runDockerCmd(dockerPath, [\"info\"], [\"inherit\", \"pipe\", \"pipe\"]);\n\t} catch {\n\t\t// We assume this command is unlikely to fail for reasons other than the Docker daemon not running, or the Docker CLI not being installed or in the PATH.\n\t\treturn false;\n\t}\n\treturn true;\n};\n\n/** throws when docker is not installed */\nexport const verifyDockerInstalled = async (\n\tdockerPath: string,\n\tisDev = true\n) => {\n\tconst dockerIsRunning = await isDockerRunning(dockerPath);\n\tif (!dockerIsRunning) {\n\t\tthrow new UserError(\n\t\t\t`The Docker CLI could not be launched. Please ensure that the Docker CLI is installed and the daemon is running.\\n` +\n\t\t\t\t`Other container tooling that is compatible with the Docker CLI and engine may work, but is not yet guaranteed to do so. You can specify an executable with the environment variable WRANGLER_DOCKER_BIN and a socket with DOCKER_HOST.` +\n\t\t\t\t`${isDev ? \"\\nTo suppress this error if you do not intend on triggering any container instances, set dev.enable_containers to false in your Wrangler config or passing in --enable-containers=false.\" : \"\"}`\n\t\t);\n\t}\n};\n\nexport function isDir(inputPath: string) {\n\tconst stats = statSync(inputPath);\n\treturn stats.isDirectory();\n}\n\n/** returns true if it is a dockerfile, false if it is a registry link, throws if neither */\nexport const isDockerfile = (\n\timage: string,\n\tconfigPath: string | undefined\n): boolean => {\n\tconst baseDir = configPath ? path.dirname(configPath) : process.cwd();\n\tconst maybeDockerfile = path.resolve(baseDir, image);\n\tif (existsSync(maybeDockerfile)) {\n\t\tif (isDir(maybeDockerfile)) {\n\t\t\tthrow new UserError(\n\t\t\t\t`${image} is a directory, you should specify a path to the Dockerfile`\n\t\t\t);\n\t\t}\n\t\treturn true;\n\t}\n\n\tconst errorPrefix = `The image \"${image}\" does not appear to be a valid path to a Dockerfile, or a valid image registry path:\\n`;\n\t// not found, not a dockerfile, let's try parsing the image ref as an URL?\n\ttry {\n\t\tnew URL(`https://${image}`);\n\t} catch (e) {\n\t\tif (e instanceof Error) {\n\t\t\tthrow new UserError(errorPrefix + e.message);\n\t\t}\n\t\tthrow e;\n\t}\n\tconst imageParts = image.split(\"/\");\n\n\tif (!imageParts[imageParts.length - 1]?.includes(\":\")) {\n\t\tthrow new UserError(\n\t\t\terrorPrefix +\n\t\t\t\t`If this is an image registry path, it needs to include at least a tag ':' (e.g: docker.io/httpd:1)`\n\t\t);\n\t}\n\t// validate URL\n\tif (image.includes(\"://\")) {\n\t\tthrow new UserError(\n\t\t\terrorPrefix +\n\t\t\t\t`Image reference should not include the protocol part (e.g: docker.io/httpd:1, not https://docker.io/httpd:1)`\n\t\t);\n\t}\n\treturn false;\n};\n\n/**\n * Kills and removes any containers which come from the given image tag\n */\nexport const cleanupContainers = (\n\tdockerPath: string,\n\timageTags: Set<string>\n) => {\n\ttry {\n\t\t// Find all containers (stopped and running) for each built image\n\t\tconst containerIds = getContainerIdsByImageTags(dockerPath, imageTags);\n\n\t\tif (containerIds.length === 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Workerd should have stopped all containers, but clean up any in case. Sends a sigkill.\n\t\trunDockerCmdWithOutput(dockerPath, [\"rm\", \"--force\", ...containerIds]);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n/**\n * See https://docs.docker.com/reference/cli/docker/container/ls/#ancestor\n *\n * @param dockerPath The path to the Docker executable\n * @param imageTags A set of ancestor image tags\n * @returns The ids of all containers that share the given image tags as ancestors.\n */\nexport function getContainerIdsByImageTags(\n\tdockerPath: string,\n\timageTags: Set<string>\n): string[] {\n\tconst ids = new Set<string>();\n\n\tfor (const imageTag of imageTags) {\n\t\tconst containerIdsFromImage = getContainerIdsFromImage(\n\t\t\tdockerPath,\n\t\t\timageTag\n\t\t);\n\t\tcontainerIdsFromImage.forEach((id) => ids.add(id));\n\t}\n\n\treturn Array.from(ids);\n}\n\nexport const getContainerIdsFromImage = (\n\tdockerPath: string,\n\tancestorImage: string\n) => {\n\tconst output = runDockerCmdWithOutput(dockerPath, [\n\t\t\"ps\",\n\t\t\"-a\",\n\t\t\"--filter\",\n\t\t`ancestor=${ancestorImage}`,\n\t\t\"--format\",\n\t\t\"{{.ID}}\",\n\t]);\n\treturn output.split(\"\\n\").filter((line) => line.trim());\n};\n\n/**\n * While all ports are exposed in prod, a limitation of local dev with docker is that\n * users will have to manually expose ports in their Dockerfile.\n * We want to fail early and clearly if a user tries to develop with a container\n * that has no ports exposed and is definitely not accessible.\n *\n * (A user could still use `getTCPPort()` on a port that is not exposed, but we leave that error for runtime.)\n */\nexport async function checkExposedPorts(\n\tdockerPath: string,\n\toptions: ContainerDevOptions\n) {\n\tconst output = await dockerImageInspect(dockerPath, {\n\t\timageTag: options.image_tag,\n\t\tformatString: \"{{ len .Config.ExposedPorts }}\",\n\t});\n\tif (output === \"0\") {\n\t\tthrow new UserError(\n\t\t\t`The container \"${options.class_name}\" does not expose any ports. In your Dockerfile, please expose any ports you intend to connect to.\\n` +\n\t\t\t\t\"For additional information please see: https://developers.cloudflare.com/containers/local-dev/#exposing-ports.\\n\"\n\t\t);\n\t}\n}\n\n/**\n * Generates a random container build id\n */\nexport function generateContainerBuildId() {\n\treturn randomUUID().slice(0, 8);\n}\n\n/**\n * Output of docker context ls --format json\n */\ntype DockerContext = {\n\tCurrent: boolean;\n\tDescription: string;\n\tDockerEndpoint: string;\n\tError: string;\n\tName: string;\n};\n\n/**\n * Run `docker context ls` to get the socket from the currently active Docker context\n * @returns The socket path or null if we are not able to determine it\n */\nexport function getDockerSocketFromContext(dockerPath: string): string | null {\n\ttry {\n\t\tconst output = runDockerCmdWithOutput(dockerPath, [\n\t\t\t\"context\",\n\t\t\t\"ls\",\n\t\t\t\"--format\",\n\t\t\t\"json\",\n\t\t]);\n\n\t\t// Parse each line as a separate JSON object\n\t\tconst lines = output.trim().split(\"\\n\");\n\t\tconst contexts: DockerContext[] = lines.map((line) => JSON.parse(line));\n\n\t\t// Find the current context\n\t\tconst currentContext = contexts.find((context) => context.Current === true);\n\n\t\tif (currentContext && currentContext.DockerEndpoint) {\n\t\t\treturn currentContext.DockerEndpoint;\n\t\t}\n\t} catch {\n\t\t// Fall back to null if docker context inspection fails so that we can use platform defaults\n\t}\n\treturn null;\n}\n/**\n * Resolve Docker host as follows:\n * 1. Check WRANGLER_DOCKER_HOST environment variable\n * 2. Check DOCKER_HOST environment variable\n * 3. Try to get socket from active Docker context\n * 4. Fall back to platform-specific defaults\n */\nexport function resolveDockerHost(dockerPath: string): string {\n\tif (process.env.WRANGLER_DOCKER_HOST) {\n\t\treturn process.env.WRANGLER_DOCKER_HOST;\n\t}\n\n\tif (process.env.DOCKER_HOST) {\n\t\treturn process.env.DOCKER_HOST;\n\t}\n\n\t// 3. Try to get socket from by running `docker context ls`\n\n\tconst contextSocket = getDockerSocketFromContext(dockerPath);\n\tif (contextSocket) {\n\t\treturn contextSocket;\n\t}\n\n\t// 4. Fall back to platform-specific defaults\n\t// (note windows doesn't work yet due to a runtime limitation)\n\treturn process.platform === \"win32\"\n\t\t? \"//./pipe/docker_engine\"\n\t\t: \"unix:///var/run/docker.sock\";\n}\n\n/**\n *\n * Get docker host from environment variables or platform defaults.\n * Does not use the docker context ls command, so we\n */\nexport const getDockerHostFromEnv = (): string => {\n\tconst fromEnv = process.env.WRANGLER_DOCKER_HOST ?? process.env.DOCKER_HOST;\n\n\treturn fromEnv ?? process.platform === \"win32\"\n\t\t? \"//./pipe/docker_engine\"\n\t\t: \"unix:///var/run/docker.sock\";\n};\n\n/**\n * Get all repository tags for a given image\n */\nexport async function getImageRepoTags(\n\tdockerPath: string,\n\timageTag: string\n): Promise<string[]> {\n\ttry {\n\t\tconst output = await dockerImageInspect(dockerPath, {\n\t\t\timageTag,\n\t\t\tformatString: \"{{ range .RepoTags }}{{ . }}\\n{{ end }}\",\n\t\t});\n\t\treturn output.split(\"\\n\").filter((tag) => tag.trim() !== \"\");\n\t} catch {\n\t\treturn [];\n\t}\n}\n\n/**\n * Checks if the given image has any duplicate tags from previous dev sessions,\n * and remove them if so.\n */\nexport async function cleanupDuplicateImageTags(\n\tdockerPath: string,\n\timageTag: string\n): Promise<void> {\n\ttry {\n\t\tconst repoTags = await getImageRepoTags(dockerPath, imageTag);\n\t\t// Remove all cloudflare-dev tags from previous sessions except the current one\n\t\tconst tagsToRemove = repoTags.filter(\n\t\t\t(tag) => tag !== imageTag && tag.startsWith(\"cloudflare-dev\")\n\t\t);\n\t\tif (tagsToRemove.length > 0) {\n\t\t\trunDockerCmdWithOutput(dockerPath, [\"rmi\", ...tagsToRemove]);\n\t\t}\n\t} catch {}\n}\n","import { buildImage } from \"./build\";\nimport { ExternalRegistryKind } from \"./client/models/ExternalRegistryKind\";\nimport { UserError } from \"./error\";\nimport { getCloudflareContainerRegistry } from \"./knobs\";\nimport { dockerLoginImageRegistry } from \"./login\";\nimport { getCloudflareRegistryWithAccountNamespace } from \"./registry\";\nimport {\n\tcheckExposedPorts,\n\tcleanupDuplicateImageTags,\n\trunDockerCmd,\n\tverifyDockerInstalled,\n} from \"./utils\";\nimport type { ContainerDevOptions, DockerfileConfig } from \"./types\";\n\nexport async function pullImage(\n\tdockerPath: string,\n\toptions: Exclude<ContainerDevOptions, DockerfileConfig>\n): Promise<{ abort: () => void; ready: Promise<void> }> {\n\tconst domain = new URL(`http://${options.image_uri}`).hostname;\n\tawait dockerLoginImageRegistry(dockerPath, domain);\n\tconst pull = runDockerCmd(dockerPath, [\n\t\t\"pull\",\n\t\toptions.image_uri,\n\t\t// All containers running on our platform need to be built for amd64 architecture, but by default docker pull seems to look for an image matching the host system, so we need to specify this here\n\t\t\"--platform\",\n\t\t\"linux/amd64\",\n\t]);\n\tconst ready = pull.ready.then(async ({ aborted }: { aborted: boolean }) => {\n\t\tif (!aborted) {\n\t\t\t// re-tag image with the expected dev-formatted image tag for consistency\n\t\t\tawait runDockerCmd(dockerPath, [\n\t\t\t\t\"tag\",\n\t\t\t\toptions.image_uri,\n\t\t\t\toptions.image_tag,\n\t\t\t]);\n\t\t}\n\t});\n\n\treturn {\n\t\tabort: () => {\n\t\t\tpull.abort();\n\t\t},\n\t\tready,\n\t};\n}\n\n/**\n *\n * Builds or pulls the container images for local development. This\n * will be called before starting the local development server, and by a rebuild\n * hotkey during development.\n *\n * Because this runs when local dev starts, we also do some validation here,\n * such as checking if the Docker CLI is installed, and if the container images\n * expose any ports.\n */\nexport async function prepareContainerImagesForDev(args: {\n\tdockerPath: string;\n\tcontainerOptions: ContainerDevOptions[];\n\tonContainerImagePreparationStart: (args: {\n\t\tcontainerOptions: ContainerDevOptions;\n\t\tabort: () => void;\n\t}) => void;\n\tonContainerImagePreparationEnd: (args: {\n\t\tcontainerOptions: ContainerDevOptions;\n\t}) => void;\n}) {\n\tconst {\n\t\tdockerPath,\n\t\tcontainerOptions,\n\t\tonContainerImagePreparationStart,\n\t\tonContainerImagePreparationEnd,\n\t} = args;\n\tlet aborted = false;\n\tif (process.platform === \"win32\") {\n\t\tthrow new UserError(\n\t\t\t\"Local development with containers is currently not supported on Windows. You should use WSL instead. You can also set `enable_containers` to false if you do not need to develop the container part of your application.\"\n\t\t);\n\t}\n\tawait verifyDockerInstalled(dockerPath);\n\tfor (const options of containerOptions) {\n\t\tif (\"dockerfile\" in options) {\n\t\t\tconst build = await buildImage(dockerPath, options);\n\t\t\tonContainerImagePreparationStart({\n\t\t\t\tcontainerOptions: options,\n\t\t\t\tabort: () => {\n\t\t\t\t\taborted = true;\n\t\t\t\t\tbuild.abort();\n\t\t\t\t},\n\t\t\t});\n\t\t\tawait build.ready;\n\n\t\t\tonContainerImagePreparationEnd({\n\t\t\t\tcontainerOptions: options,\n\t\t\t});\n\t\t} else {\n\t\t\tconst pull = await pullImage(dockerPath, options);\n\t\t\tonContainerImagePreparationStart({\n\t\t\t\tcontainerOptions: options,\n\t\t\t\tabort: () => {\n\t\t\t\t\taborted = true;\n\t\t\t\t\tpull.abort();\n\t\t\t\t},\n\t\t\t});\n\t\t\tawait pull.ready;\n\t\t\tonContainerImagePreparationEnd({\n\t\t\t\tcontainerOptions: options,\n\t\t\t});\n\t\t}\n\t\tif (!aborted) {\n\t\t\t// Clean up duplicate image tags. This is scoped to cloudflare-dev only\n\t\t\tawait cleanupDuplicateImageTags(dockerPath, options.image_tag);\n\n\t\t\tawait checkExposedPorts(dockerPath, options);\n\t\t}\n\t}\n}\n\n/**\n * Resolve an image name to the full unambiguous name.\n *\n * image:tag -> prepend registry.cloudflare.com/accountid/\n * registry.cloudflare.com/image:tag -> registry.cloudlfare.com/accountid/image:tag\n * registry.cloudflare.com/accountid/image:tag -> no change\n * anyother-registry.com/anything -> no change\n */\nexport function resolveImageName(accountId: string, image: string): string {\n\tlet url: URL | undefined;\n\ttry {\n\t\turl = new URL(`http://${image}`);\n\t} catch {\n\t\t// Invalid URL\n\t}\n\n\tif (\n\t\turl === undefined ||\n\t\t(!url.host.match(/[:.]/) && url.hostname !== \"localhost\")\n\t) {\n\t\t// Not a valid URL so assume it is in the format image:tag and prepend the registry\n\t\treturn getCloudflareRegistryWithAccountNamespace(accountId, image);\n\t}\n\n\tif (url.hostname !== getCloudflareContainerRegistry()) {\n\t\t// hostname not the managed registry, passthrough\n\t\treturn image;\n\t}\n\n\tif (url.pathname.startsWith(`/${accountId}`)) {\n\t\t// is managed registry and has the account id, passthrough\n\t\treturn image;\n\t}\n\n\t// check if already looks like it has an account id (32 char hex string)\n\tconst accountIdPattern = /^\\/([a-f0-9]{32})\\//;\n\tconst match = accountIdPattern.exec(url.pathname);\n\tif (match) {\n\t\tconst foundAccountId = match[1];\n\t\tif (foundAccountId !== accountId) {\n\t\t\tthrow new Error(\n\t\t\t\t`Image \"${image}\" does not belong to your account\\nImage appears to belong to account: \"${foundAccountId}\"\\nCurrent account: \"${accountId}\"`\n\t\t\t);\n\t\t}\n\t\treturn image;\n\t}\n\n\t// is managed registry and doesn't have the account id,add it to the path\n\treturn `${url.hostname}/${accountId}${url.pathname}`;\n}\n\n/**\n * get type of container registry, and validate\n * currently we support cloudflare managed registries and AWS ECR\n * when using cloudflare mananged registries we expect CLOUDFLARE_CONTAINER_REGISTRY to be set\n */\nexport const getAndValidateRegistryType = (domain: string): RegistryPattern => {\n\t// TODO: use parseImageName when that gets moved to this package\n\tif (domain.includes(\"://\")) {\n\t\tthrow new Error(\n\t\t\t`${domain} is invalid:\\nImage reference should not include the protocol part (e.g: registry.cloudflare.com rather than https://registry.cloudflare.com)`\n\t\t);\n\t}\n\tlet url: URL;\n\ttry {\n\t\turl = new URL(`http://${domain}`);\n\t} catch (e) {\n\t\tif (e instanceof Error) {\n\t\t\tthrow new Error(`${domain} is invalid:\\n${e.message}`);\n\t\t}\n\t\tthrow e;\n\t}\n\n\tconst acceptedRegistries: RegistryPattern[] = [\n\t\t{\n\t\t\ttype: ExternalRegistryKind.ECR,\n\t\t\tpattern: /^[0-9]{12}\\.dkr\\.ecr\\.[a-z0-9-]+\\.amazonaws\\.com$/,\n\t\t\tname: \"AWS ECR\",\n\t\t\tsecretType: \"AWS Secret Access Key\",\n\t\t},\n\t\t{\n\t\t\ttype: \"cloudflare\",\n\t\t\t// Make a regex based on the env var CLOUDFLARE_CONTAINER_REGISTRY\n\t\t\tpattern: new RegExp(\n\t\t\t\t`^${getCloudflareContainerRegistry().replace(/[\\\\.]/g, \"\\\\$&\")}$`\n\t\t\t),\n\t\t\tname: \"Cloudflare Containers Managed Registry\",\n\t\t},\n\t];\n\n\tconst match = acceptedRegistries.find((registry) =>\n\t\tregistry.pattern.test(url.hostname)\n\t);\n\n\tif (!match) {\n\t\tconst supportedRegistries = acceptedRegistries\n\t\t\t.filter((r) => r.type !== \"cloudflare\")\n\t\t\t.map((r) => r.name)\n\t\t\t.join(\", \");\n\t\tthrow new UserError(\n\t\t\t`${url.hostname} is not a supported image registry.\\nCurrently we support the following non-Cloudflare registries: ${supportedRegistries}.\\nTo use an existing image from another repository, see https://developers.cloudflare.com/containers/platform-details/image-management/#using-pre-built-container-images`\n\t\t);\n\t}\n\n\treturn match;\n};\n\ninterface RegistryPattern {\n\ttype: ExternalRegistryKind | \"cloudflare\";\n\tsecretType?: string;\n\tpattern: RegExp;\n\tname: string;\n}\n","// Taken from https://stackoverflow.com/a/3561711\n// which is everything from the tc39 proposal, plus the following two characters: ^/\n// It's also everything included in the URLPattern escape (https://wicg.github.io/urlpattern/#escape-a-regexp-string), plus the following: -\n\nimport { REDIRECTS_VERSION } from \"../handler\";\nimport type { AssetConfig } from \"../../../utils/types\";\n\n// As the answer says, there's no downside to escaping these extra characters, so better safe than sorry\nconst ESCAPE_REGEX_CHARACTERS = /[-/\\\\^$*+?.()|[\\]{}]/g;\nconst escapeRegex = (str: string) => {\n\treturn str.replace(ESCAPE_REGEX_CHARACTERS, \"\\\\$&\");\n};\n\n// Placeholder names must begin with a colon then a letter, be alphanumeric and optionally contain underscores.\n// e.g. :place_123_holder\nconst HOST_PLACEHOLDER_REGEX =\n\t/(?<=^https:\\\\\\/\\\\\\/[^/]*?):([A-Za-z]\\w*)(?=\\\\)/g;\nconst PLACEHOLDER_REGEX = /:([A-Za-z]\\w*)/g;\n\nexport type Replacements = Record<string, string>;\n\nexport type Removals = string[];\n\nexport const replacer = (str: string, replacements: Replacements) => {\n\tfor (const [replacement, value] of Object.entries(replacements)) {\n\t\tstr = str.replaceAll(`:${replacement}`, value);\n\t}\n\treturn str;\n};\n\nexport const generateGlobOnlyRuleRegExp = (rule: string) => {\n\t// Escape all regex characters other than globs (the \"*\" character) since that's all that's supported.\n\trule = rule.split(\"*\").map(escapeRegex).join(\".*\");\n\n\t// Wrap in line terminators to be safe.\n\trule = \"^\" + rule + \"$\";\n\n\treturn RegExp(rule);\n};\n\nexport const generateRuleRegExp = (rule: string) => {\n\t// Create :splat capturer then escape.\n\trule = rule.split(\"*\").map(escapeRegex).join(\"(?<splat>.*)\");\n\n\t// Create :placeholder capturers (already escaped).\n\t// For placeholders in the host, we separate at forward slashes and periods.\n\t// For placeholders in the path, we separate at forward slashes.\n\t// This matches the behavior of URLPattern.\n\t// e.g. https://:subdomain.domain/ -> https://(here).domain/\n\t// e.g. /static/:file -> /static/(image.jpg)\n\t// e.g. /blog/:post -> /blog/(an-exciting-post)\n\tconst host_matches = rule.matchAll(HOST_PLACEHOLDER_REGEX);\n\tfor (const host_match of host_matches) {\n\t\trule = rule.split(host_match[0]).join(`(?<${host_match[1]}>[^/.]+)`);\n\t}\n\n\tconst path_matches = rule.matchAll(PLACEHOLDER_REGEX);\n\tfor (const path_match of path_matches) {\n\t\trule = rule.split(path_match[0]).join(`(?<${path_match[1]}>[^/]+)`);\n\t}\n\n\t// Wrap in line terminators to be safe.\n\trule = \"^\" + rule + \"$\";\n\n\treturn RegExp(rule);\n};\n\nexport const generateRulesMatcher = <T>(\n\trules?: Record<string, T>,\n\treplacerFn: (match: T, replacements: Replacements) => T = (match) => match\n) => {\n\tif (!rules) {\n\t\treturn () => [];\n\t}\n\n\tconst compiledRules = Object.entries(rules)\n\t\t.map(([rule, match]) => {\n\t\t\tconst crossHost = rule.startsWith(\"https://\");\n\n\t\t\ttry {\n\t\t\t\tconst regExp = generateRuleRegExp(rule);\n\t\t\t\treturn [{ crossHost, regExp }, match];\n\t\t\t} catch {}\n\t\t})\n\t\t.filter((value) => value !== undefined) as [\n\t\t{ crossHost: boolean; regExp: RegExp },\n\t\tT,\n\t][];\n\n\treturn ({ request }: { request: Request }) => {\n\t\tconst { pathname, hostname } = new URL(request.url);\n\n\t\treturn compiledRules\n\t\t\t.map(([{ crossHost, regExp }, match]) => {\n\t\t\t\t// This, rather confusingly, means that although we enforce `https://` protocols in\n\t\t\t\t// the rules of `_headers`/`_redirects`, we don't actually respect that at all at runtime.\n\t\t\t\t// When processing a request against an absolute URL rule, we rewrite the protocol to `https://`.\n\t\t\t\t// This has the benefit of ensuring attackers can't specify a different protocol\n\t\t\t\t// to circumvent a developer's security rules (e.g. CORS), but it isn't obvious behavior.\n\t\t\t\t// We should consider different syntax in the future for developers when they specify rules.\n\t\t\t\t// For example, `*://example.com/path`, `://example.com/path` or `//example.com/`.\n\t\t\t\t// Though we'd need to be careful with that last one\n\t\t\t\t// as that would currently be read as a relative URL.\n\t\t\t\t// Perhaps, if we ever move the `_headers`/`_redirects` files to acting ahead of Functions,\n\t\t\t\t// this might be a good time for this change.\n\t\t\t\tconst test = crossHost ? `https://${hostname}${pathname}` : pathname;\n\t\t\t\tconst result = regExp.exec(test);\n\t\t\t\tif (result) {\n\t\t\t\t\treturn replacerFn(match, result.groups || {});\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter((value) => value !== undefined) as T[];\n\t};\n};\n\nexport const staticRedirectsMatcher = (\n\tconfiguration: Required<AssetConfig>,\n\thost: string,\n\tpathname: string\n) => {\n\tconst withHostMatch =\n\t\tconfiguration.redirects.staticRules[`https://${host}${pathname}`];\n\tconst withoutHostMatch = configuration.redirects.staticRules[pathname];\n\n\tif (withHostMatch && withoutHostMatch) {\n\t\tif (withHostMatch.lineNumber < withoutHostMatch.lineNumber) {\n\t\t\treturn withHostMatch;\n\t\t} else {\n\t\t\treturn withoutHostMatch;\n\t\t}\n\t}\n\n\treturn withHostMatch || withoutHostMatch;\n};\n\nexport const generateRedirectsMatcher = (\n\tconfiguration: Required<AssetConfig>\n) =>\n\tgenerateRulesMatcher(\n\t\tconfiguration.redirects.version === REDIRECTS_VERSION\n\t\t\t? configuration.redirects.rules\n\t\t\t: {},\n\t\t({ status, to }, replacements) => {\n\t\t\tconst target = replacer(to, replacements).trim();\n\t\t\tconst protoPattern = /^(\\w+:\\/\\/)/;\n\t\t\tif (protoPattern.test(target)) {\n\t\t\t\t// External redirects are not modified.\n\t\t\t\treturn {\n\t\t\t\t\tstatus,\n\t\t\t\t\tto: target,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Relative redirects are modified to remove multiple slashes.\n\t\t\t\treturn {\n\t\t\t\t\tstatus,\n\t\t\t\t\tto: target.replace(/\\/+/g, \"/\"),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t);\n\nexport const generateStaticRoutingRuleMatcher =\n\t(rules: string[]) =>\n\t({ request }: { request: Request }) => {\n\t\tconst { pathname } = new URL(request.url);\n\t\tfor (const rule of rules) {\n\t\t\ttry {\n\t\t\t\tconst regExp = generateGlobOnlyRuleRegExp(rule);\n\t\t\t\tif (regExp.test(pathname)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} catch {}\n\t\t}\n\n\t\treturn false;\n\t};\n","// Worker names\nexport const ROUTER_WORKER_NAME = \"__router-worker__\";\nexport const ASSET_WORKER_NAME = \"__asset-worker__\";\nexport const VITE_PROXY_WORKER_NAME = \"__vite_proxy_worker__\";\n\nexport const kRequestType = Symbol(\"kRequestType\");\n\ndeclare module \"http\" {\n\tinterface IncomingMessage {\n\t\t[kRequestType]?: \"asset\";\n\t}\n}\n","import path from \"node:path\";\nimport { getDevContainerImageName } from \"@cloudflare/containers-shared/src/knobs\";\nimport { isDockerfile } from \"@cloudflare/containers-shared/src/utils\";\nimport type { WorkerConfig } from \"./plugin-config\";\n\n/**\n * Returns the path to the Docker executable as defined by the\n * `WRANGLER_DOCKER_BIN` environment variable, or the default value\n * `\"docker\"`\n */\nexport function getDockerPath(): string {\n\tconst defaultDockerPath = \"docker\";\n\tconst dockerPathEnvVar = \"WRANGLER_DOCKER_BIN\";\n\n\treturn process.env[dockerPathEnvVar] || defaultDockerPath;\n}\n\n/**\n * @returns Container options suitable for building or pulling images,\n * with image tag set to well-known dev format, or undefined if\n * containers are not enabled or not configured.\n */\nexport function getContainerOptions(options: {\n\tcontainersConfig: WorkerConfig[\"containers\"];\n\tcontainerBuildId: string;\n\tconfigPath?: string;\n}) {\n\tconst { containersConfig, containerBuildId, configPath } = options;\n\n\tif (!containersConfig?.length) {\n\t\treturn undefined;\n\t}\n\n\treturn containersConfig.map((container) => {\n\t\tif (isDockerfile(container.image, configPath)) {\n\t\t\treturn {\n\t\t\t\tdockerfile: container.image,\n\t\t\t\timage_build_context:\n\t\t\t\t\tcontainer.image_build_context ?? path.dirname(container.image),\n\t\t\t\timage_vars: container.image_vars,\n\t\t\t\tclass_name: container.class_name,\n\t\t\t\timage_tag: getDevContainerImageName(\n\t\t\t\t\tcontainer.class_name,\n\t\t\t\t\tcontainerBuildId\n\t\t\t\t),\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\timage_uri: container.image,\n\t\t\t\tclass_name: container.class_name,\n\t\t\t\timage_tag: getDevContainerImageName(\n\t\t\t\t\tcontainer.class_name,\n\t\t\t\t\tcontainerBuildId\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t});\n}\n\nexport type ContainerTagToOptionsMap = Map<\n\tstring,\n\tNonNullable<ReturnType<typeof getContainerOptions>>[number]\n>;\n","import assert from \"node:assert\";\nimport * as fs from \"node:fs\";\nimport * as fsp from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport {\n\tgenerateContainerBuildId,\n\tresolveDockerHost,\n} from \"@cloudflare/containers-shared\";\nimport {\n\tgetDefaultDevRegistryPath,\n\tkUnsafeEphemeralUniqueKey,\n\tLog,\n\tLogLevel,\n\tResponse as MiniflareResponse,\n} from \"miniflare\";\nimport colors from \"picocolors\";\nimport { globSync } from \"tinyglobby\";\nimport * as vite from \"vite\";\nimport {\n\tmaybeStartOrUpdateRemoteProxySession,\n\tunstable_convertConfigBindingsToStartWorkerBindings,\n\tunstable_getMiniflareWorkerOptions,\n} from \"wrangler\";\nimport { getAssetsConfig } from \"./asset-config\";\nimport {\n\tASSET_WORKER_NAME,\n\tkRequestType,\n\tROUTER_WORKER_NAME,\n\tVITE_PROXY_WORKER_NAME,\n} from \"./constants\";\nimport { getContainerOptions, getDockerPath } from \"./containers\";\nimport { getInputInspectorPort } from \"./debug\";\nimport { additionalModuleRE } from \"./plugins/additional-modules\";\nimport { withTrailingSlash } from \"./utils\";\nimport type { CloudflareDevEnvironment } from \"./cloudflare-environment\";\nimport type { ContainerTagToOptionsMap } from \"./containers\";\nimport type {\n\tAssetsOnlyPluginContext,\n\tPreviewPluginContext,\n\tWorkersPluginContext,\n} from \"./context\";\nimport type { PersistState } from \"./plugin-config\";\nimport type {\n\tMiniflareOptions,\n\tWorkerdStructuredLog,\n\tWorkerOptions,\n} from \"miniflare\";\nimport type {\n\tBinding,\n\tRemoteProxySession,\n\tSourcelessWorkerOptions,\n} from \"wrangler\";\n\nconst INTERNAL_WORKERS_COMPATIBILITY_DATE = \"2024-10-04\";\n// Used to mark HTML assets as being in the public directory so that they can be resolved from their root relative paths\nconst PUBLIC_DIR_PREFIX = \"/__vite_public_dir__\";\n\nfunction getPersistenceRoot(\n\troot: string,\n\tpersistState: PersistState\n): string | undefined {\n\tif (persistState === false) {\n\t\treturn;\n\t}\n\n\tconst defaultPersistPath = \".wrangler/state\";\n\tconst persistPath = path.resolve(\n\t\troot,\n\t\ttypeof persistState === \"object\" ? persistState.path : defaultPersistPath,\n\t\t\"v3\"\n\t);\n\n\treturn persistPath;\n}\n\n// We want module names to be their absolute path without the leading slash\n// (i.e. the modules root should be the root directory). On Windows, we need\n// paths to include the drive letter (i.e. `C:/a/b/c/index.mjs`).\n// Internally, Miniflare uses `path.relative(modulesRoot, path)` to compute\n// module names. Setting `modulesRoot` to a drive letter and prepending this\n// to paths ensures correct names. This requires us to specify `contents` in\n// the miniflare module definitions though, as the new paths don't exist.\nconst miniflareModulesRoot = process.platform === \"win32\" ? \"Z:\\\\\" : \"/\";\nconst ROUTER_WORKER_PATH = \"./workers/router-worker.js\";\nconst ASSET_WORKER_PATH = \"./workers/asset-worker.js\";\nconst VITE_PROXY_WORKER_PATH = \"./workers/vite-proxy-worker.js\";\nconst RUNNER_PATH = \"./workers/runner-worker.js\";\nconst WRAPPER_PATH = \"__VITE_WORKER_ENTRY__\";\n\nfunction logUnknownTails(\n\ttails: WorkerOptions[\"tails\"],\n\tuserWorkers: { name?: string }[],\n\tlog: (msg: string) => void\n) {\n\t// Only connect the tail consumers that represent Workers that are defined in the Vite config. Warn that a tail might be omitted otherwise\n\t// This _differs from service bindings_ because tail consumers are \"optional\" in a sense, and shouldn't affect the runtime behaviour of a Worker\n\tfor (const tailService of tails ?? []) {\n\t\tlet name: string;\n\t\tif (typeof tailService === \"string\") {\n\t\t\tname = tailService;\n\t\t} else if (\n\t\t\ttypeof tailService === \"object\" &&\n\t\t\t\"name\" in tailService &&\n\t\t\ttypeof tailService.name === \"string\"\n\t\t) {\n\t\t\tname = tailService.name;\n\t\t} else {\n\t\t\t// Don't interfere with network-based tail connections (e.g. via the dev registry), or kCurrentWorker\n\t\t\tcontinue;\n\t\t}\n\t\tconst found = userWorkers.some((w) => w.name === name);\n\n\t\tif (!found) {\n\t\t\tlog(\n\t\t\t\tcolors.dim(\n\t\t\t\t\tcolors.yellow(\n\t\t\t\t\t\t`Tail consumer \"${name}\" was not found in your config. Make sure you add it to the config or run it in another dev session if you'd like to simulate receiving tail events locally.`\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n}\n\n/** Map that maps worker configPaths to their existing remote proxy session data (if any) */\nconst remoteProxySessionsDataMap = new Map<\n\tstring,\n\t{\n\t\tsession: RemoteProxySession;\n\t\tremoteBindings: Record<string, Binding>;\n\t} | null\n>();\n\nexport async function getDevMiniflareOptions(\n\tctx: AssetsOnlyPluginContext | WorkersPluginContext,\n\tviteDevServer: vite.ViteDevServer\n): Promise<{\n\tminiflareOptions: Extract<MiniflareOptions, { workers: WorkerOptions[] }>;\n\tcontainerTagToOptionsMap: ContainerTagToOptionsMap;\n}> {\n\tconst inputInspectorPort = await getInputInspectorPort(ctx, viteDevServer);\n\tconst { resolvedPluginConfig, resolvedViteConfig, entryWorkerConfig } = ctx;\n\n\tconst assetsConfig = getAssetsConfig(\n\t\tresolvedPluginConfig,\n\t\tentryWorkerConfig,\n\t\tresolvedViteConfig\n\t);\n\n\tconst assetWorkers: Array<WorkerOptions> = [\n\t\t{\n\t\t\tname: ROUTER_WORKER_NAME,\n\t\t\tcompatibilityDate: INTERNAL_WORKERS_COMPATIBILITY_DATE,\n\t\t\tmodulesRoot: miniflareModulesRoot,\n\t\t\tmodules: [\n\t\t\t\t{\n\t\t\t\t\ttype: \"ESModule\",\n\t\t\t\t\tpath: path.join(miniflareModulesRoot, ROUTER_WORKER_PATH),\n\t\t\t\t\tcontents: fs.readFileSync(\n\t\t\t\t\t\tfileURLToPath(new URL(ROUTER_WORKER_PATH, import.meta.url))\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t],\n\t\t\tbindings: {\n\t\t\t\tCONFIG: {\n\t\t\t\t\thas_user_worker: resolvedPluginConfig.type === \"workers\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tserviceBindings: {\n\t\t\t\tASSET_WORKER: ASSET_WORKER_NAME,\n\t\t\t\t...(entryWorkerConfig ? { USER_WORKER: entryWorkerConfig.name } : {}),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: ASSET_WORKER_NAME,\n\t\t\tcompatibilityDate: INTERNAL_WORKERS_COMPATIBILITY_DATE,\n\t\t\tmodulesRoot: miniflareModulesRoot,\n\t\t\tmodules: [\n\t\t\t\t{\n\t\t\t\t\ttype: \"ESModule\",\n\t\t\t\t\tpath: path.join(miniflareModulesRoot, ASSET_WORKER_PATH),\n\t\t\t\t\tcontents: fs.readFileSync(\n\t\t\t\t\t\tfileURLToPath(new URL(ASSET_WORKER_PATH, import.meta.url))\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t],\n\t\t\tbindings: {\n\t\t\t\tCONFIG: assetsConfig,\n\t\t\t\t__VITE_HEADERS__: JSON.stringify(viteDevServer.config.server.headers),\n\t\t\t},\n\t\t\tserviceBindings: {\n\t\t\t\t__VITE_HTML_EXISTS__: async (request) => {\n\t\t\t\t\tconst { pathname } = new URL(request.url);\n\n\t\t\t\t\tif (pathname.endsWith(\".html\")) {\n\t\t\t\t\t\tconst { root, publicDir } = resolvedViteConfig;\n\t\t\t\t\t\tconst publicDirInRoot = publicDir.startsWith(\n\t\t\t\t\t\t\twithTrailingSlash(root)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst publicPath = withTrailingSlash(publicDir.slice(root.length));\n\n\t\t\t\t\t\t// Assets in the public directory should be served at the root path\n\t\t\t\t\t\tif (publicDirInRoot && pathname.startsWith(publicPath)) {\n\t\t\t\t\t\t\treturn MiniflareResponse.json(null);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst publicDirFilePath = path.join(publicDir, pathname);\n\t\t\t\t\t\tconst rootDirFilePath = path.join(root, pathname);\n\n\t\t\t\t\t\tfor (const resolvedPath of [publicDirFilePath, rootDirFilePath]) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst stats = await fsp.stat(resolvedPath);\n\n\t\t\t\t\t\t\t\tif (stats.isFile()) {\n\t\t\t\t\t\t\t\t\treturn MiniflareResponse.json(\n\t\t\t\t\t\t\t\t\t\tresolvedPath === publicDirFilePath\n\t\t\t\t\t\t\t\t\t\t\t? `${PUBLIC_DIR_PREFIX}${pathname}`\n\t\t\t\t\t\t\t\t\t\t\t: pathname\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (error) {}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn MiniflareResponse.json(null);\n\t\t\t\t},\n\t\t\t\t__VITE_FETCH_HTML__: async (request) => {\n\t\t\t\t\tconst { pathname } = new URL(request.url);\n\t\t\t\t\tconst { root, publicDir } = resolvedViteConfig;\n\t\t\t\t\tconst isInPublicDir = pathname.startsWith(PUBLIC_DIR_PREFIX);\n\t\t\t\t\tconst resolvedPath = isInPublicDir\n\t\t\t\t\t\t? path.join(publicDir, pathname.slice(PUBLIC_DIR_PREFIX.length))\n\t\t\t\t\t\t: path.join(root, pathname);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlet html = await fsp.readFile(resolvedPath, \"utf-8\");\n\n\t\t\t\t\t\t// HTML files in the public directory should not be transformed\n\t\t\t\t\t\tif (!isInPublicDir) {\n\t\t\t\t\t\t\thtml = await viteDevServer.transformIndexHtml(resolvedPath, html);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn new MiniflareResponse(html, {\n\t\t\t\t\t\t\theaders: { \"Content-Type\": \"text/html\" },\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow new Error(`Unexpected error. Failed to load \"${pathname}\".`);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: VITE_PROXY_WORKER_NAME,\n\t\t\tcompatibilityDate: INTERNAL_WORKERS_COMPATIBILITY_DATE,\n\t\t\tmodulesRoot: miniflareModulesRoot,\n\t\t\tmodules: [\n\t\t\t\t{\n\t\t\t\t\ttype: \"ESModule\",\n\t\t\t\t\tpath: path.join(miniflareModulesRoot, VITE_PROXY_WORKER_PATH),\n\t\t\t\t\tcontents: fs.readFileSync(\n\t\t\t\t\t\tfileURLToPath(new URL(VITE_PROXY_WORKER_PATH, import.meta.url))\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t],\n\t\t\tserviceBindings: {\n\t\t\t\t...(entryWorkerConfig\n\t\t\t\t\t? { ENTRY_USER_WORKER: entryWorkerConfig.name }\n\t\t\t\t\t: {}),\n\t\t\t\t__VITE_MIDDLEWARE__: {\n\t\t\t\t\tnode: (req, res) => viteDevServer.middlewares(req, res),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t];\n\n\tconst containerTagToOptionsMap: ContainerTagToOptionsMap = new Map();\n\n\tconst workersFromConfig =\n\t\tresolvedPluginConfig.type === \"workers\"\n\t\t\t? await Promise.all(\n\t\t\t\t\t[...resolvedPluginConfig.environmentNameToWorkerMap].map(\n\t\t\t\t\t\tasync ([environmentName, worker]) => {\n\t\t\t\t\t\t\tconst bindings =\n\t\t\t\t\t\t\t\tunstable_convertConfigBindingsToStartWorkerBindings(\n\t\t\t\t\t\t\t\t\tworker.config\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tconst preExistingRemoteProxySession = worker.config.configPath\n\t\t\t\t\t\t\t\t? remoteProxySessionsDataMap.get(worker.config.configPath)\n\t\t\t\t\t\t\t\t: undefined;\n\n\t\t\t\t\t\t\tconst remoteProxySessionData =\n\t\t\t\t\t\t\t\t!resolvedPluginConfig.remoteBindings\n\t\t\t\t\t\t\t\t\t? // if remote bindings are not enabled then the proxy session can simply be null\n\t\t\t\t\t\t\t\t\t\tnull\n\t\t\t\t\t\t\t\t\t: await maybeStartOrUpdateRemoteProxySession(\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tname: worker.config.name,\n\t\t\t\t\t\t\t\t\t\t\t\tbindings: bindings ?? {},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\tpreExistingRemoteProxySession ?? null\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (worker.config.configPath && remoteProxySessionData) {\n\t\t\t\t\t\t\t\tremoteProxySessionsDataMap.set(\n\t\t\t\t\t\t\t\t\tworker.config.configPath,\n\t\t\t\t\t\t\t\t\tremoteProxySessionData\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlet containerBuildId: string | undefined;\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tworker.config.containers?.length &&\n\t\t\t\t\t\t\t\tworker.config.dev.enable_containers\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tconst dockerPath = getDockerPath();\n\t\t\t\t\t\t\t\tworker.config.dev.container_engine =\n\t\t\t\t\t\t\t\t\tresolveDockerHost(dockerPath);\n\t\t\t\t\t\t\t\tcontainerBuildId = generateContainerBuildId();\n\n\t\t\t\t\t\t\t\tconst options = getContainerOptions({\n\t\t\t\t\t\t\t\t\tcontainersConfig: worker.config.containers,\n\t\t\t\t\t\t\t\t\tcontainerBuildId,\n\t\t\t\t\t\t\t\t\tconfigPath: worker.config.configPath,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tfor (const option of options ?? []) {\n\t\t\t\t\t\t\t\t\tcontainerTagToOptionsMap.set(option.image_tag, option);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst miniflareWorkerOptions = unstable_getMiniflareWorkerOptions(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t...worker.config,\n\t\t\t\t\t\t\t\t\tassets: undefined,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tresolvedPluginConfig.cloudflareEnv,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tremoteProxyConnectionString:\n\t\t\t\t\t\t\t\t\t\tremoteProxySessionData?.session\n\t\t\t\t\t\t\t\t\t\t\t?.remoteProxyConnectionString,\n\n\t\t\t\t\t\t\t\t\tcontainerBuildId,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tconst { externalWorkers } = miniflareWorkerOptions;\n\n\t\t\t\t\t\t\tconst workerOptions = miniflareWorkerOptions.workerOptions;\n\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\texternalWorkers,\n\t\t\t\t\t\t\t\tworker: {\n\t\t\t\t\t\t\t\t\t...workerOptions,\n\t\t\t\t\t\t\t\t\tname: workerOptions.name ?? worker.config.name,\n\t\t\t\t\t\t\t\t\tunsafeInspectorProxy: inputInspectorPort !== false,\n\t\t\t\t\t\t\t\t\tunsafeDirectSockets:\n\t\t\t\t\t\t\t\t\t\tenvironmentName ===\n\t\t\t\t\t\t\t\t\t\tresolvedPluginConfig.entryWorkerEnvironmentName\n\t\t\t\t\t\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// This exposes the default entrypoint of the asset proxy worker\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// on the dev registry with the name of the entry worker\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tserviceName: VITE_PROXY_WORKER_NAME,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tentrypoint: undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tproxy: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t: [],\n\t\t\t\t\t\t\t\t\tmodulesRoot: miniflareModulesRoot,\n\t\t\t\t\t\t\t\t\tunsafeEvalBinding: \"__VITE_UNSAFE_EVAL__\",\n\t\t\t\t\t\t\t\t\tserviceBindings: {\n\t\t\t\t\t\t\t\t\t\t...workerOptions.serviceBindings,\n\t\t\t\t\t\t\t\t\t\t...(environmentName ===\n\t\t\t\t\t\t\t\t\t\t\tresolvedPluginConfig.entryWorkerEnvironmentName &&\n\t\t\t\t\t\t\t\t\t\tworker.config.assets?.binding\n\t\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t\t[worker.config.assets.binding]: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnode: (req, res) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treq[kRequestType] = \"asset\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tviteDevServer.middlewares(req, res);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\t\t__VITE_INVOKE_MODULE__: async (request) => {\n\t\t\t\t\t\t\t\t\t\t\tconst payload =\n\t\t\t\t\t\t\t\t\t\t\t\t(await request.json()) as vite.CustomPayload;\n\t\t\t\t\t\t\t\t\t\t\tconst devEnvironment = viteDevServer.environments[\n\t\t\t\t\t\t\t\t\t\t\t\tenvironmentName\n\t\t\t\t\t\t\t\t\t\t\t] as CloudflareDevEnvironment;\n\t\t\t\t\t\t\t\t\t\t\tconst result =\n\t\t\t\t\t\t\t\t\t\t\t\tawait devEnvironment.hot.handleInvoke(payload);\n\t\t\t\t\t\t\t\t\t\t\treturn MiniflareResponse.json(result);\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t} satisfies Partial<WorkerOptions>,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t: [];\n\n\tconst userWorkers = workersFromConfig.map((options) => options.worker);\n\n\tconst externalWorkers = workersFromConfig.flatMap(\n\t\t(options) => options.externalWorkers\n\t);\n\n\tconst logger = new ViteMiniflareLogger(resolvedViteConfig);\n\n\treturn {\n\t\tminiflareOptions: {\n\t\t\tlog: logger,\n\t\t\tlogRequests: false,\n\t\t\tinspectorPort:\n\t\t\t\tinputInspectorPort === false ? undefined : inputInspectorPort,\n\t\t\tunsafeDevRegistryPath: getDefaultDevRegistryPath(),\n\t\t\tunsafeTriggerHandlers: true,\n\t\t\thandleStructuredLogs: getStructuredLogsLogger(logger),\n\t\t\tdefaultPersistRoot: getPersistenceRoot(\n\t\t\t\tresolvedViteConfig.root,\n\t\t\t\tresolvedPluginConfig.persistState\n\t\t\t),\n\t\t\tworkers: [\n\t\t\t\t...assetWorkers,\n\t\t\t\t...externalWorkers,\n\t\t\t\t...userWorkers.map((workerOptions) => {\n\t\t\t\t\tconst wrappers = [\n\t\t\t\t\t\t`import { createWorkerEntrypointWrapper, createDurableObjectWrapper, createWorkflowEntrypointWrapper } from \"${RUNNER_PATH}\";`,\n\t\t\t\t\t\t`export { __VITE_RUNNER_OBJECT__ } from \"${RUNNER_PATH}\";`,\n\t\t\t\t\t\t`export default createWorkerEntrypointWrapper(\"default\");`,\n\t\t\t\t\t];\n\n\t\t\t\t\tconst exportTypes = ctx.workerNameToExportTypesMap.get(\n\t\t\t\t\t\tworkerOptions.name\n\t\t\t\t\t);\n\t\t\t\t\tassert(exportTypes, `Expected exportTypes to be defined`);\n\n\t\t\t\t\tfor (const [name, type] of Object.entries(exportTypes)) {\n\t\t\t\t\t\twrappers.push(\n\t\t\t\t\t\t\t`export const ${name} = create${type}Wrapper(\"${name}\");`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tlogUnknownTails(\n\t\t\t\t\t\tworkerOptions.tails,\n\t\t\t\t\t\tuserWorkers,\n\t\t\t\t\t\tviteDevServer.config.logger.warn\n\t\t\t\t\t);\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...workerOptions,\n\t\t\t\t\t\tdurableObjects: {\n\t\t\t\t\t\t\t...workerOptions.durableObjects,\n\t\t\t\t\t\t\t__VITE_RUNNER_OBJECT__: {\n\t\t\t\t\t\t\t\tclassName: \"__VITE_RUNNER_OBJECT__\",\n\t\t\t\t\t\t\t\tunsafeUniqueKey: kUnsafeEphemeralUniqueKey,\n\t\t\t\t\t\t\t\tunsafePreventEviction: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmodules: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"ESModule\",\n\t\t\t\t\t\t\t\tpath: path.join(miniflareModulesRoot, WRAPPER_PATH),\n\t\t\t\t\t\t\t\tcontents: wrappers.join(\"\\n\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"ESModule\",\n\t\t\t\t\t\t\t\tpath: path.join(miniflareModulesRoot, RUNNER_PATH),\n\t\t\t\t\t\t\t\tcontents: fs.readFileSync(\n\t\t\t\t\t\t\t\t\tfileURLToPath(new URL(RUNNER_PATH, import.meta.url))\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tunsafeUseModuleFallbackService: true,\n\t\t\t\t\t} satisfies WorkerOptions;\n\t\t\t\t}),\n\t\t\t],\n\t\t\tasync unsafeModuleFallbackService(request) {\n\t\t\t\tconst url = new URL(request.url);\n\t\t\t\tconst rawSpecifier = url.searchParams.get(\"rawSpecifier\");\n\t\t\t\tassert(\n\t\t\t\t\trawSpecifier,\n\t\t\t\t\t`Unexpected error: no specifier in request to module fallback service.`\n\t\t\t\t);\n\n\t\t\t\tconst match = additionalModuleRE.exec(rawSpecifier);\n\t\t\t\tassert(\n\t\t\t\t\tmatch,\n\t\t\t\t\t`Unexpected error: no match for module: ${rawSpecifier}.`\n\t\t\t\t);\n\t\t\t\tconst [full, moduleType, modulePath] = match;\n\t\t\t\tassert(\n\t\t\t\t\tmoduleType,\n\t\t\t\t\t`Unexpected error: module type not found in reference: ${full}.`\n\t\t\t\t);\n\t\t\t\tassert(\n\t\t\t\t\tmodulePath,\n\t\t\t\t\t`Unexpected error: module path not found in reference: ${full}.`\n\t\t\t\t);\n\n\t\t\t\tlet contents: Buffer;\n\n\t\t\t\ttry {\n\t\t\t\t\tcontents = await fsp.readFile(modulePath);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Import \"${modulePath}\" not found. Does the file exist?`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tswitch (moduleType) {\n\t\t\t\t\tcase \"CompiledWasm\": {\n\t\t\t\t\t\treturn MiniflareResponse.json({ wasm: Array.from(contents) });\n\t\t\t\t\t}\n\t\t\t\t\tcase \"Data\": {\n\t\t\t\t\t\treturn MiniflareResponse.json({ data: Array.from(contents) });\n\t\t\t\t\t}\n\t\t\t\t\tcase \"Text\": {\n\t\t\t\t\t\treturn MiniflareResponse.json({ text: contents.toString() });\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\treturn MiniflareResponse.error();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tcontainerTagToOptionsMap,\n\t};\n}\n\nfunction getPreviewModules(\n\tmain: string,\n\tmodulesRules: SourcelessWorkerOptions[\"modulesRules\"]\n) {\n\tassert(modulesRules, `Unexpected error: 'modulesRules' is undefined`);\n\tconst rootPath = path.dirname(main);\n\tconst entryPath = path.basename(main);\n\n\treturn {\n\t\trootPath,\n\t\tmodules: [\n\t\t\t{\n\t\t\t\ttype: \"ESModule\",\n\t\t\t\tpath: entryPath,\n\t\t\t} as const,\n\t\t\t...modulesRules.flatMap(({ type, include }) =>\n\t\t\t\tglobSync(include, { cwd: rootPath, ignore: entryPath }).map((path) => ({\n\t\t\t\t\ttype,\n\t\t\t\t\tpath,\n\t\t\t\t}))\n\t\t\t),\n\t\t],\n\t} satisfies Pick<WorkerOptions, \"rootPath\" | \"modules\">;\n}\n\nexport async function getPreviewMiniflareOptions(\n\tctx: PreviewPluginContext,\n\tvitePreviewServer: vite.PreviewServer\n): Promise<{\n\tminiflareOptions: Extract<MiniflareOptions, { workers: WorkerOptions[] }>;\n\tcontainerTagToOptionsMap: ContainerTagToOptionsMap;\n}> {\n\tconst inputInspectorPort = await getInputInspectorPort(\n\t\tctx,\n\t\tvitePreviewServer\n\t);\n\tconst { resolvedPluginConfig, resolvedViteConfig } = ctx;\n\tconst containerTagToOptionsMap: ContainerTagToOptionsMap = new Map();\n\n\tconst workers: Array<WorkerOptions> = (\n\t\tawait Promise.all(\n\t\t\tresolvedPluginConfig.workers.map(async (workerConfig, i) => {\n\t\t\t\tconst bindings =\n\t\t\t\t\tunstable_convertConfigBindingsToStartWorkerBindings(workerConfig);\n\n\t\t\t\tconst preExistingRemoteProxySessionData = workerConfig.configPath\n\t\t\t\t\t? remoteProxySessionsDataMap.get(workerConfig.configPath)\n\t\t\t\t\t: undefined;\n\n\t\t\t\tconst remoteProxySessionData = !resolvedPluginConfig.remoteBindings\n\t\t\t\t\t? // if remote bindings are not enabled then the proxy session can simply be null\n\t\t\t\t\t\tnull\n\t\t\t\t\t: await maybeStartOrUpdateRemoteProxySession(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: workerConfig.name,\n\t\t\t\t\t\t\t\tbindings: bindings ?? {},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tpreExistingRemoteProxySessionData ?? null\n\t\t\t\t\t\t);\n\n\t\t\t\tif (workerConfig.configPath && remoteProxySessionData) {\n\t\t\t\t\tremoteProxySessionsDataMap.set(\n\t\t\t\t\t\tworkerConfig.configPath,\n\t\t\t\t\t\tremoteProxySessionData\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tlet containerBuildId: string | undefined;\n\t\t\t\tif (\n\t\t\t\t\tworkerConfig.containers?.length &&\n\t\t\t\t\tworkerConfig.dev.enable_containers\n\t\t\t\t) {\n\t\t\t\t\tconst dockerPath = getDockerPath();\n\t\t\t\t\tworkerConfig.dev.container_engine = resolveDockerHost(dockerPath);\n\t\t\t\t\tcontainerBuildId = generateContainerBuildId();\n\n\t\t\t\t\tconst options = getContainerOptions({\n\t\t\t\t\t\tcontainersConfig: workerConfig.containers,\n\t\t\t\t\t\tcontainerBuildId,\n\t\t\t\t\t\tconfigPath: workerConfig.configPath,\n\t\t\t\t\t});\n\t\t\t\t\tfor (const option of options ?? []) {\n\t\t\t\t\t\tcontainerTagToOptionsMap.set(option.image_tag, option);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst miniflareWorkerOptions = unstable_getMiniflareWorkerOptions(\n\t\t\t\t\tworkerConfig,\n\t\t\t\t\tundefined,\n\t\t\t\t\t{\n\t\t\t\t\t\tremoteProxyConnectionString:\n\t\t\t\t\t\t\tremoteProxySessionData?.session?.remoteProxyConnectionString,\n\n\t\t\t\t\t\tcontainerBuildId,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tconst { externalWorkers } = miniflareWorkerOptions;\n\n\t\t\t\tconst { modulesRules, ...workerOptions } =\n\t\t\t\t\tminiflareWorkerOptions.workerOptions;\n\n\t\t\t\tlogUnknownTails(\n\t\t\t\t\tworkerOptions.tails,\n\t\t\t\t\tresolvedPluginConfig.workers,\n\t\t\t\t\tvitePreviewServer.config.logger.warn\n\t\t\t\t);\n\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\t...workerOptions,\n\t\t\t\t\t\tname: workerOptions.name ?? workerConfig.name,\n\t\t\t\t\t\tunsafeInspectorProxy: inputInspectorPort !== false,\n\t\t\t\t\t\tunsafeDirectSockets:\n\t\t\t\t\t\t\t// This exposes the default entrypoint of the entry worker on the dev registry\n\t\t\t\t\t\t\t// Assuming that the first worker config to be the entry worker.\n\t\t\t\t\t\t\ti === 0 ? [{ entrypoint: undefined, proxy: true }] : [],\n\t\t\t\t\t\t...(miniflareWorkerOptions.main\n\t\t\t\t\t\t\t? getPreviewModules(miniflareWorkerOptions.main, modulesRules)\n\t\t\t\t\t\t\t: { modules: true, script: \"\" }),\n\t\t\t\t\t},\n\t\t\t\t\t...externalWorkers,\n\t\t\t\t] satisfies Array<WorkerOptions>;\n\t\t\t})\n\t\t)\n\t).flat();\n\n\tconst logger = new ViteMiniflareLogger(resolvedViteConfig);\n\n\treturn {\n\t\tminiflareOptions: {\n\t\t\tlog: logger,\n\t\t\tinspectorPort:\n\t\t\t\tinputInspectorPort === false ? undefined : inputInspectorPort,\n\t\t\tunsafeDevRegistryPath: getDefaultDevRegistryPath(),\n\t\t\tunsafeTriggerHandlers: true,\n\t\t\thandleStructuredLogs: getStructuredLogsLogger(logger),\n\t\t\tdefaultPersistRoot: getPersistenceRoot(\n\t\t\t\tresolvedViteConfig.root,\n\t\t\t\tresolvedPluginConfig.persistState\n\t\t\t),\n\t\t\tworkers,\n\t\t},\n\t\tcontainerTagToOptionsMap,\n\t};\n}\n\n/**\n * A Miniflare logger that forwards messages onto a Vite logger.\n */\nclass ViteMiniflareLogger extends Log {\n\tprivate logger: vite.Logger;\n\tconstructor(config: vite.ResolvedConfig) {\n\t\tsuper(miniflareLogLevelFromViteLogLevel(config.logLevel));\n\t\tthis.logger = config.logger;\n\t}\n\n\toverride logWithLevel(level: LogLevel, message: string) {\n\t\tswitch (level) {\n\t\t\tcase LogLevel.ERROR:\n\t\t\t\treturn this.logger.error(message);\n\t\t\tcase LogLevel.WARN:\n\t\t\t\treturn this.logger.warn(message);\n\t\t\tcase LogLevel.INFO:\n\t\t\t\treturn this.logger.info(message);\n\t\t}\n\t}\n\n\toverride logReady() {\n\t\t// Noop so that Miniflare server start messages are not logged\n\t}\n}\n\nfunction miniflareLogLevelFromViteLogLevel(\n\tlevel: vite.LogLevel = \"info\"\n): LogLevel {\n\tswitch (level) {\n\t\tcase \"error\":\n\t\t\treturn LogLevel.ERROR;\n\t\tcase \"warn\":\n\t\t\treturn LogLevel.WARN;\n\t\tcase \"info\":\n\t\t\treturn LogLevel.INFO;\n\t\tcase \"silent\":\n\t\t\treturn LogLevel.NONE;\n\t}\n}\n\n/**\n * Generates a log handler to be passed as the `handleStructuredLogs` option to miniflare\n *\n * @param logger the vite logger to use\n * @returns the log handler to pass to miniflare\n */\nfunction getStructuredLogsLogger(logger: Log) {\n\treturn ({ level, message }: WorkerdStructuredLog) => {\n\t\tif (level === \"warn\") {\n\t\t\treturn logger.warn(message);\n\t\t}\n\n\t\tif (level === \"error\") {\n\t\t\treturn logger.logWithLevel(LogLevel.ERROR, message);\n\t\t}\n\n\t\treturn logger.info(message);\n\t};\n}\n","import { createHeaders } from \"@remix-run/node-fetch-server\";\nimport { CoreHeaders, coupleWebSocket } from \"miniflare\";\nimport { WebSocketServer } from \"ws\";\nimport { UNKNOWN_HOST } from \"./shared\";\nimport type { Miniflare } from \"miniflare\";\nimport type { IncomingMessage } from \"node:http\";\nimport type { Duplex } from \"node:stream\";\nimport type * as vite from \"vite\";\n\n/**\n * Handles 'upgrade' requests to the Vite HTTP server and forwards WebSocket events between the client and Worker environments.\n */\nexport function handleWebSocket(\n\thttpServer: vite.HttpServer,\n\tminiflare: Miniflare,\n\tentryWorkerName?: string\n) {\n\tconst nodeWebSocket = new WebSocketServer({ noServer: true });\n\n\thttpServer.on(\n\t\t\"upgrade\",\n\t\tasync (request: IncomingMessage, socket: Duplex, head: Buffer) => {\n\t\t\tconst url = new URL(request.url ?? \"\", UNKNOWN_HOST);\n\n\t\t\t// Ignore Vite HMR WebSockets\n\t\t\tif (request.headers[\"sec-websocket-protocol\"]?.startsWith(\"vite\")) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst headers = createHeaders(request);\n\n\t\t\tif (entryWorkerName) {\n\t\t\t\theaders.set(CoreHeaders.ROUTE_OVERRIDE, entryWorkerName);\n\t\t\t}\n\n\t\t\tconst response = await miniflare.dispatchFetch(url, {\n\t\t\t\theaders,\n\t\t\t\tmethod: request.method,\n\t\t\t});\n\t\t\tconst workerWebSocket = response.webSocket;\n\n\t\t\tif (!workerWebSocket) {\n\t\t\t\tsocket.destroy();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tnodeWebSocket.handleUpgrade(\n\t\t\t\trequest,\n\t\t\t\tsocket,\n\t\t\t\thead,\n\t\t\t\tasync (clientWebSocket) => {\n\t\t\t\t\tcoupleWebSocket(clientWebSocket, workerWebSocket);\n\t\t\t\t\tnodeWebSocket.emit(\"connection\", clientWebSocket, request);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t);\n}\n","import assert from \"node:assert\";\nimport { prepareContainerImagesForDev } from \"@cloudflare/containers-shared\";\nimport { cleanupContainers } from \"@cloudflare/containers-shared/src/utils\";\nimport { generateStaticRoutingRuleMatcher } from \"@cloudflare/workers-shared/asset-worker/src/utils/rules-engine\";\nimport { CoreHeaders } from \"miniflare\";\nimport colors from \"picocolors\";\nimport { initRunners } from \"../cloudflare-environment\";\nimport {\n\tASSET_WORKER_NAME,\n\tkRequestType,\n\tROUTER_WORKER_NAME,\n} from \"../constants\";\nimport { getDockerPath } from \"../containers\";\nimport { assertIsNotPreview } from \"../context\";\nimport {\n\tcompareExportTypes,\n\tcompareWorkerNameToExportTypesMaps,\n\tgetCurrentWorkerNameToExportTypesMap,\n} from \"../export-types\";\nimport { getDevMiniflareOptions } from \"../miniflare-options\";\nimport { UNKNOWN_HOST } from \"../shared\";\nimport { createPlugin, createRequestHandler, debuglog } from \"../utils\";\nimport { handleWebSocket } from \"../websockets\";\nimport type { StaticRouting } from \"@cloudflare/workers-shared/utils/types\";\nimport type * as vite from \"vite\";\n\nlet exitCallback = () => {};\n\nprocess.on(\"exit\", () => {\n\texitCallback();\n});\n\n/**\n * Plugin to provide core development functionality\n */\nexport const devPlugin = createPlugin(\"dev\", (ctx) => {\n\tlet containerImageTags = new Set<string>();\n\n\treturn {\n\t\tasync buildEnd() {\n\t\t\tif (\n\t\t\t\tctx.resolvedViteConfig.command === \"serve\" &&\n\t\t\t\tcontainerImageTags.size\n\t\t\t) {\n\t\t\t\tconst dockerPath = getDockerPath();\n\t\t\t\tcleanupContainers(dockerPath, containerImageTags);\n\t\t\t}\n\n\t\t\tdebuglog(\n\t\t\t\t\"buildEnd:\",\n\t\t\t\tctx.isRestartingDevServer ? \"restarted\" : \"disposing\"\n\t\t\t);\n\t\t\tif (!ctx.isRestartingDevServer) {\n\t\t\t\ttry {\n\t\t\t\t\tawait ctx.disposeMiniflare();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tdebuglog(\"Failed to dispose Miniflare instance:\", error);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasync configureServer(viteDevServer) {\n\t\t\tassertIsNotPreview(ctx);\n\n\t\t\tconst initialOptions = await getDevMiniflareOptions(ctx, viteDevServer);\n\t\t\tlet containerTagToOptionsMap = initialOptions.containerTagToOptionsMap;\n\n\t\t\tawait ctx.startOrUpdateMiniflare(initialOptions.miniflareOptions);\n\n\t\t\tlet preMiddleware: vite.Connect.NextHandleFunction | undefined;\n\n\t\t\tif (ctx.resolvedPluginConfig.type === \"workers\") {\n\t\t\t\tdebuglog(\"Initializing the Vite module runners\");\n\t\t\t\tawait initRunners(\n\t\t\t\t\tctx.resolvedPluginConfig,\n\t\t\t\t\tviteDevServer,\n\t\t\t\t\tctx.miniflare\n\t\t\t\t);\n\t\t\t\tconst currentWorkerNameToExportTypesMap =\n\t\t\t\t\tawait getCurrentWorkerNameToExportTypesMap(\n\t\t\t\t\t\tctx.resolvedPluginConfig,\n\t\t\t\t\t\tviteDevServer,\n\t\t\t\t\t\tctx.miniflare\n\t\t\t\t\t);\n\t\t\t\tconst hasChanged = compareWorkerNameToExportTypesMaps(\n\t\t\t\t\tctx.workerNameToExportTypesMap,\n\t\t\t\t\tcurrentWorkerNameToExportTypesMap\n\t\t\t\t);\n\n\t\t\t\tif (hasChanged) {\n\t\t\t\t\tctx.setWorkerNameToExportTypesMap(currentWorkerNameToExportTypesMap);\n\t\t\t\t\tconst updatedOptions = await getDevMiniflareOptions(\n\t\t\t\t\t\tctx,\n\t\t\t\t\t\tviteDevServer\n\t\t\t\t\t);\n\t\t\t\t\tcontainerTagToOptionsMap = updatedOptions.containerTagToOptionsMap;\n\t\t\t\t\tawait ctx.startOrUpdateMiniflare(updatedOptions.miniflareOptions);\n\t\t\t\t\tawait initRunners(\n\t\t\t\t\t\tctx.resolvedPluginConfig,\n\t\t\t\t\t\tviteDevServer,\n\t\t\t\t\t\tctx.miniflare\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tfor (const environmentName of ctx.resolvedPluginConfig.environmentNameToWorkerMap.keys()) {\n\t\t\t\t\tconst environment = viteDevServer.environments[environmentName];\n\t\t\t\t\tassert(\n\t\t\t\t\t\tenvironment,\n\t\t\t\t\t\t`Expected environment \"${environmentName}\" to be defined`\n\t\t\t\t\t);\n\t\t\t\t\tenvironment.hot.on(\n\t\t\t\t\t\t\"vite-plugin-cloudflare:worker-export-types\",\n\t\t\t\t\t\tasync (newExportTypes) => {\n\t\t\t\t\t\t\tconst workerConfig = ctx.getWorkerConfig(environmentName);\n\t\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\t\tworkerConfig,\n\t\t\t\t\t\t\t\t`Expected workerConfig for environment \"${environmentName}\" to be defined`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst oldExportTypes = ctx.workerNameToExportTypesMap.get(\n\t\t\t\t\t\t\t\tworkerConfig.name\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\t\toldExportTypes,\n\t\t\t\t\t\t\t\t`Expected export types for Worker \"${workerConfig.name}\" to be defined`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst hasChanged = compareExportTypes(\n\t\t\t\t\t\t\t\toldExportTypes,\n\t\t\t\t\t\t\t\tnewExportTypes\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (hasChanged) {\n\t\t\t\t\t\t\t\tviteDevServer.config.logger.info(\n\t\t\t\t\t\t\t\t\tcolors.dim(\n\t\t\t\t\t\t\t\t\t\tcolors.yellow(\n\t\t\t\t\t\t\t\t\t\t\t\"Worker exports have changed. Restarting dev server.\"\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tawait viteDevServer.restart();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst entryWorkerConfig = ctx.entryWorkerConfig;\n\t\t\t\tassert(entryWorkerConfig, `No entry Worker config`);\n\t\t\t\tconst entryWorkerName = entryWorkerConfig.name;\n\n\t\t\t\t// The HTTP server is not available in middleware mode\n\t\t\t\tif (viteDevServer.httpServer) {\n\t\t\t\t\thandleWebSocket(\n\t\t\t\t\t\tviteDevServer.httpServer,\n\t\t\t\t\t\tctx.miniflare,\n\t\t\t\t\t\tentryWorkerName\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst staticRouting: StaticRouting | undefined =\n\t\t\t\t\tentryWorkerConfig.assets?.run_worker_first === true\n\t\t\t\t\t\t? { user_worker: [\"/*\"] }\n\t\t\t\t\t\t: ctx.resolvedPluginConfig.staticRouting;\n\n\t\t\t\tif (staticRouting) {\n\t\t\t\t\tconst excludeRulesMatcher = generateStaticRoutingRuleMatcher(\n\t\t\t\t\t\tstaticRouting.asset_worker ?? []\n\t\t\t\t\t);\n\t\t\t\t\tconst includeRulesMatcher = generateStaticRoutingRuleMatcher(\n\t\t\t\t\t\tstaticRouting.user_worker\n\t\t\t\t\t);\n\t\t\t\t\tconst userWorkerHandler = createRequestHandler(async (request) => {\n\t\t\t\t\t\trequest.headers.set(CoreHeaders.ROUTE_OVERRIDE, entryWorkerName);\n\n\t\t\t\t\t\treturn ctx.miniflare.dispatchFetch(request, {\n\t\t\t\t\t\t\tredirect: \"manual\",\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\tpreMiddleware = async (req, res, next) => {\n\t\t\t\t\t\tassert(req.url, `req.url not defined`);\n\t\t\t\t\t\t// Only the URL pathname is used to match rules\n\t\t\t\t\t\tconst request = new Request(new URL(req.url, UNKNOWN_HOST));\n\n\t\t\t\t\t\tif (req[kRequestType] === \"asset\") {\n\t\t\t\t\t\t\tnext();\n\t\t\t\t\t\t} else if (excludeRulesMatcher({ request })) {\n\t\t\t\t\t\t\treq[kRequestType] = \"asset\";\n\t\t\t\t\t\t\tnext();\n\t\t\t\t\t\t} else if (includeRulesMatcher({ request })) {\n\t\t\t\t\t\t\tuserWorkerHandler(req, res, next);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnext();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (containerTagToOptionsMap.size) {\n\t\t\t\t\tviteDevServer.config.logger.info(\n\t\t\t\t\t\tcolors.dim(\n\t\t\t\t\t\t\tcolors.yellow(\n\t\t\t\t\t\t\t\t\"∷ Building container images for local development...\\n\"\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\tawait prepareContainerImagesForDev({\n\t\t\t\t\t\tdockerPath: getDockerPath(),\n\t\t\t\t\t\tcontainerOptions: [...containerTagToOptionsMap.values()],\n\t\t\t\t\t\tonContainerImagePreparationStart: () => {},\n\t\t\t\t\t\tonContainerImagePreparationEnd: () => {},\n\t\t\t\t\t});\n\n\t\t\t\t\tcontainerImageTags = new Set(containerTagToOptionsMap.keys());\n\t\t\t\t\tviteDevServer.config.logger.info(\n\t\t\t\t\t\tcolors.dim(\n\t\t\t\t\t\t\tcolors.yellow(\n\t\t\t\t\t\t\t\t\"\\n⚡️ Containers successfully built. To rebuild your containers during development, restart the Vite dev server (r + enter).\"\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Upon exiting the dev process we should ensure we perform any\n\t\t\t\t\t * containers-specific cleanup work. Vite recommends using the\n\t\t\t\t\t * `buildEnd` and `closeBundle` hooks, which are called when the\n\t\t\t\t\t * server is closed. Unfortunately none of these hooks work if the\n\t\t\t\t\t * process exits forcefully, via `ctrl+C`, and Vite provides no\n\t\t\t\t\t * other alternatives. For this reason we decided to hook into both\n\t\t\t\t\t * `buildEnd` and the `exit` event, and ensure we always cleanup\n\t\t\t\t\t * (please note that handling the `beforeExit` event, which does\n\t\t\t\t\t * support async ops, is not an option, since Vite calls\n\t\t\t\t\t * `process.exit()` imperatively, and therefore causes `beforeExit`\n\t\t\t\t\t * not to be emitted).\n\t\t\t\t\t *\n\t\t\t\t\t */\n\t\t\t\t\texitCallback = () => {\n\t\t\t\t\t\tif (containerImageTags.size) {\n\t\t\t\t\t\t\tcleanupContainers(getDockerPath(), containerImageTags);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn () => {\n\t\t\t\tif (preMiddleware) {\n\t\t\t\t\tconst middlewareStack = viteDevServer.middlewares.stack;\n\t\t\t\t\tconst cachedTransformMiddlewareIndex = middlewareStack.findIndex(\n\t\t\t\t\t\t(middleware) =>\n\t\t\t\t\t\t\t\"name\" in middleware.handle &&\n\t\t\t\t\t\t\tmiddleware.handle.name === \"viteCachedTransformMiddleware\"\n\t\t\t\t\t);\n\t\t\t\t\tassert(\n\t\t\t\t\t\tcachedTransformMiddlewareIndex !== -1,\n\t\t\t\t\t\t\"Failed to find viteCachedTransformMiddleware\"\n\t\t\t\t\t);\n\n\t\t\t\t\t// Insert our middleware after the host check middleware to prevent DNS rebinding attacks.\n\t\t\t\t\t// TODO: when we drop support for Vite 6 we can provide this middleware as normal.\n\t\t\t\t\t// This is because Vite 7 places pre-middleware here by default.\n\t\t\t\t\tmiddlewareStack.splice(cachedTransformMiddlewareIndex, 0, {\n\t\t\t\t\t\troute: \"\",\n\t\t\t\t\t\thandle: preMiddleware,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// post middleware\n\t\t\t\tviteDevServer.middlewares.use(\n\t\t\t\t\tcreateRequestHandler(async (request, req) => {\n\t\t\t\t\t\tif (req[kRequestType] === \"asset\") {\n\t\t\t\t\t\t\trequest.headers.set(\n\t\t\t\t\t\t\t\tCoreHeaders.ROUTE_OVERRIDE,\n\t\t\t\t\t\t\t\tASSET_WORKER_NAME\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\treturn ctx.miniflare.dispatchFetch(request, {\n\t\t\t\t\t\t\t\tredirect: \"manual\",\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trequest.headers.set(\n\t\t\t\t\t\t\t\tCoreHeaders.ROUTE_OVERRIDE,\n\t\t\t\t\t\t\t\tROUTER_WORKER_NAME\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\treturn ctx.miniflare.dispatchFetch(request, {\n\t\t\t\t\t\t\t\tredirect: \"manual\",\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t};\n\t\t},\n\t};\n});\n","import assert from \"node:assert\";\nimport {\n\tassertHasNodeJsCompat,\n\thasNodeJsAls,\n\tisNodeAlsModule,\n\tNODEJS_MODULES_RE,\n\tnodeJsBuiltins,\n\tNodeJsCompatWarnings,\n} from \"../nodejs-compat\";\nimport { createPlugin } from \"../utils\";\nimport type { WorkerConfig } from \"../plugin-config\";\n\n/**\n * Plugin to support the `nodejs_als` compatibility flag\n */\nexport const nodeJsAlsPlugin = createPlugin(\"nodejs-als\", (ctx) => {\n\treturn {\n\t\tconfigEnvironment(name) {\n\t\t\tif (hasNodeJsAls(ctx.getWorkerConfig(name))) {\n\t\t\t\treturn {\n\t\t\t\t\tresolve: {\n\t\t\t\t\t\tbuiltins: [\"async_hooks\", \"node:async_hooks\"],\n\t\t\t\t\t},\n\t\t\t\t\toptimizeDeps: {\n\t\t\t\t\t\texclude: [\"async_hooks\", \"node:async_hooks\"],\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t};\n});\n\n/**\n * Plugin to support the `nodejs_compat` compatibility flag\n */\nexport const nodeJsCompatPlugin = createPlugin(\"nodejs-compat\", (ctx) => {\n\treturn {\n\t\tconfigEnvironment(name) {\n\t\t\tconst nodeJsCompat = ctx.getNodeJsCompat(name);\n\n\t\t\t// Only configure this environment if it is a Worker using Node.js compatibility.\n\t\t\tif (nodeJsCompat) {\n\t\t\t\treturn {\n\t\t\t\t\tresolve: {\n\t\t\t\t\t\tbuiltins: [...nodeJsCompat.externals],\n\t\t\t\t\t},\n\t\t\t\t\toptimizeDeps: {\n\t\t\t\t\t\t// This is a list of module specifiers that the dependency optimizer should not follow when doing import analysis.\n\t\t\t\t\t\t// In this case we provide a list of all the Node.js modules, both those built-in to workerd and those that will be polyfilled.\n\t\t\t\t\t\t// Obviously we don't want/need the optimizer to try to process modules that are built-in;\n\t\t\t\t\t\t// But also we want to avoid following the ones that are polyfilled since the dependency-optimizer import analyzer does not\n\t\t\t\t\t\t// resolve these imports using our `resolveId()` hook causing the optimization step to fail.\n\t\t\t\t\t\texclude: [...nodeJsBuiltins],\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\tapplyToEnvironment(environment) {\n\t\t\t// Only run this plugin's hooks if it is a Worker with Node.js compatibility.\n\t\t\treturn ctx.getNodeJsCompat(environment.name) !== undefined;\n\t\t},\n\t\t// We need the resolver from this plugin to run before built-in ones, otherwise Vite's built-in\n\t\t// resolver will try to externalize the Node.js module imports (e.g. `perf_hooks` and `node:tty`)\n\t\t// rather than allowing the resolve hook here to alias them to polyfills.\n\t\tenforce: \"pre\",\n\t\tasync resolveId(source, importer, options) {\n\t\t\tconst nodeJsCompat = ctx.getNodeJsCompat(this.environment.name);\n\t\t\tassertHasNodeJsCompat(nodeJsCompat);\n\n\t\t\tif (nodeJsCompat.isGlobalVirtualModule(source)) {\n\t\t\t\treturn source;\n\t\t\t}\n\n\t\t\t// See if we can map the `source` to a Node.js compat alias.\n\t\t\tconst result = nodeJsCompat.resolveNodeJsImport(source);\n\n\t\t\tif (!result) {\n\t\t\t\t// The source is not a Node.js compat alias so just pass it through\n\t\t\t\treturn this.resolve(source, importer, options);\n\t\t\t}\n\n\t\t\tif (this.environment.mode === \"dev\") {\n\t\t\t\tassert(\n\t\t\t\t\tthis.environment.depsOptimizer,\n\t\t\t\t\t\"depsOptimizer is required in dev mode\"\n\t\t\t\t);\n\t\t\t\t// We are in dev mode (rather than build).\n\t\t\t\t// So let's pre-bundle this polyfill entry-point using the dependency optimizer.\n\t\t\t\tconst { id } = this.environment.depsOptimizer.registerMissingImport(\n\t\t\t\t\tresult.unresolved,\n\t\t\t\t\tresult.resolved\n\t\t\t\t);\n\t\t\t\t// We use the unresolved path to the polyfill and let the dependency optimizer's\n\t\t\t\t// resolver find the resolved path to the bundled version.\n\t\t\t\treturn this.resolve(id, importer, options);\n\t\t\t}\n\n\t\t\t// We are in build mode so return the absolute path to the polyfill.\n\t\t\treturn this.resolve(result.resolved, importer, options);\n\t\t},\n\t\tload(id) {\n\t\t\tconst nodeJsCompat = ctx.getNodeJsCompat(this.environment.name);\n\t\t\tassertHasNodeJsCompat(nodeJsCompat);\n\n\t\t\treturn nodeJsCompat.getGlobalVirtualModule(id);\n\t\t},\n\t\tasync configureServer(viteDevServer) {\n\t\t\t// Pre-optimize Node.js compat library entry-points for those environments that need it.\n\t\t\tawait Promise.all(\n\t\t\t\tObject.values(viteDevServer.environments).flatMap(\n\t\t\t\t\tasync (environment) => {\n\t\t\t\t\t\tconst nodeJsCompat = ctx.getNodeJsCompat(environment.name);\n\n\t\t\t\t\t\tif (nodeJsCompat) {\n\t\t\t\t\t\t\t// Make sure that the dependency optimizer has been initialized.\n\t\t\t\t\t\t\t// This ensures that its standard static crawling to identify libraries to optimize still happens.\n\t\t\t\t\t\t\t// If you don't call `init()` then the calls to `registerMissingImport()` appear to cancel the static crawling.\n\t\t\t\t\t\t\tawait environment.depsOptimizer?.init();\n\n\t\t\t\t\t\t\t// Register every unenv-preset entry-point with the dependency optimizer upfront before the first request.\n\t\t\t\t\t\t\t// Without this the dependency optimizer will try to bundle them on-the-fly in the middle of the first request.\n\t\t\t\t\t\t\t// That can potentially cause problems if it causes previously optimized bundles to become stale and need to be bundled.\n\t\t\t\t\t\t\treturn Array.from(nodeJsCompat.entries).map((entry) => {\n\t\t\t\t\t\t\t\tconst result = nodeJsCompat.resolveNodeJsImport(entry);\n\n\t\t\t\t\t\t\t\tif (result) {\n\t\t\t\t\t\t\t\t\tconst registration =\n\t\t\t\t\t\t\t\t\t\tenvironment.depsOptimizer?.registerMissingImport(\n\t\t\t\t\t\t\t\t\t\t\tresult.unresolved,\n\t\t\t\t\t\t\t\t\t\t\tresult.resolved\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\treturn registration?.processing;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t);\n\t\t},\n\t};\n});\n\nlet exitCallback = () => {};\n\nprocess.on(\"exit\", () => {\n\texitCallback();\n});\n\n/**\n * Plugin to warn if Node.js APIs are used without enabling the `nodejs_compat` compatibility flag\n */\nexport const nodeJsCompatWarningsPlugin = createPlugin(\n\t\"nodejs-compat-warnings\",\n\t(ctx) => {\n\t\tconst nodeJsCompatWarningsMap = new Map<\n\t\t\tWorkerConfig,\n\t\t\tNodeJsCompatWarnings\n\t\t>();\n\n\t\texitCallback = () => {\n\t\t\tfor (const nodeJsCompatWarnings of nodeJsCompatWarningsMap.values()) {\n\t\t\t\tnodeJsCompatWarnings.renderWarnings();\n\t\t\t}\n\t\t};\n\n\t\treturn {\n\t\t\t// We must ensure that the `resolveId` hook runs before the built-in ones.\n\t\t\t// Otherwise we never see the Node.js built-in imports since they get handled by default Vite behavior.\n\t\t\tenforce: \"pre\",\n\t\t\tconfigEnvironment(environmentName) {\n\t\t\t\tconst workerConfig = ctx.getWorkerConfig(environmentName);\n\t\t\t\tconst nodeJsCompat = ctx.getNodeJsCompat(environmentName);\n\n\t\t\t\tif (workerConfig && !nodeJsCompat) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\toptimizeDeps: {\n\t\t\t\t\t\t\tesbuildOptions: {\n\t\t\t\t\t\t\t\tplugins: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: \"vite-plugin-cloudflare:nodejs-compat-warnings-resolver\",\n\t\t\t\t\t\t\t\t\t\tsetup(build) {\n\t\t\t\t\t\t\t\t\t\t\tbuild.onResolve(\n\t\t\t\t\t\t\t\t\t\t\t\t{ filter: NODEJS_MODULES_RE },\n\t\t\t\t\t\t\t\t\t\t\t\t({ path, importer }) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thasNodeJsAls(workerConfig) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisNodeAlsModule(path)\n\t\t\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Skip if this is just async_hooks and Node.js ALS support is on.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst nodeJsCompatWarnings =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnodeJsCompatWarningsMap.get(workerConfig);\n\t\t\t\t\t\t\t\t\t\t\t\t\tnodeJsCompatWarnings?.registerImport(path, importer);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Mark this path as external to avoid messy unwanted resolve errors.\n\t\t\t\t\t\t\t\t\t\t\t\t\t// It will fail at runtime but we will log warnings to the user.\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn { path, external: true };\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t},\n\t\t\tconfigResolved(resolvedViteConfig) {\n\t\t\t\tfor (const environmentName of Object.keys(\n\t\t\t\t\tresolvedViteConfig.environments\n\t\t\t\t)) {\n\t\t\t\t\tconst workerConfig = ctx.getWorkerConfig(environmentName);\n\t\t\t\t\tconst nodeJsCompat = ctx.getNodeJsCompat(environmentName);\n\n\t\t\t\t\tif (workerConfig && !nodeJsCompat) {\n\t\t\t\t\t\tnodeJsCompatWarningsMap.set(\n\t\t\t\t\t\t\tworkerConfig,\n\t\t\t\t\t\t\tnew NodeJsCompatWarnings(environmentName, resolvedViteConfig)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync resolveId(source, importer) {\n\t\t\t\tconst workerConfig = ctx.getWorkerConfig(this.environment.name);\n\t\t\t\tconst nodeJsCompat = ctx.getNodeJsCompat(this.environment.name);\n\n\t\t\t\tif (workerConfig && !nodeJsCompat) {\n\t\t\t\t\tif (hasNodeJsAls(workerConfig) && isNodeAlsModule(source)) {\n\t\t\t\t\t\t// Skip if this is just async_hooks and Node.js ALS support is on.\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst nodeJsCompatWarnings =\n\t\t\t\t\t\tnodeJsCompatWarningsMap.get(workerConfig);\n\n\t\t\t\t\tif (nodeJsBuiltins.has(source)) {\n\t\t\t\t\t\tnodeJsCompatWarnings?.registerImport(source, importer);\n\n\t\t\t\t\t\t// Mark this path as external to avoid messy unwanted resolve errors.\n\t\t\t\t\t\t// It will fail at runtime but we will log warnings to the user.\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid: source,\n\t\t\t\t\t\t\texternal: true,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t}\n);\n","import assert from \"node:assert\";\nimport * as path from \"node:path\";\nimport { MAIN_ENTRY_NAME } from \"../cloudflare-environment\";\nimport { assertIsNotPreview } from \"../context\";\nimport { writeDeployConfig } from \"../deploy-config\";\nimport { getLocalDevVarsForPreview } from \"../dev-vars\";\nimport { createPlugin } from \"../utils\";\nimport type * as vite from \"vite\";\nimport type { Unstable_RawConfig } from \"wrangler\";\n\n/**\n * Plugin to generate additional output files as part of the build, including the output `wrangler.json` file.\n */\nexport const outputConfigPlugin = createPlugin(\"output-config\", (ctx) => {\n\treturn {\n\t\tgenerateBundle(_, bundle) {\n\t\t\tassertIsNotPreview(ctx);\n\n\t\t\tlet outputConfig: Unstable_RawConfig | undefined;\n\n\t\t\tif (ctx.resolvedPluginConfig.type === \"workers\") {\n\t\t\t\tconst inputConfig = ctx.getWorkerConfig(this.environment.name);\n\n\t\t\t\tif (!inputConfig) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst entryChunk = Object.values(bundle).find(\n\t\t\t\t\t(chunk) =>\n\t\t\t\t\t\tchunk.type === \"chunk\" &&\n\t\t\t\t\t\tchunk.isEntry &&\n\t\t\t\t\t\tchunk.name === MAIN_ENTRY_NAME\n\t\t\t\t);\n\n\t\t\t\tassert(\n\t\t\t\t\tentryChunk,\n\t\t\t\t\t`Expected entry chunk with name \"${MAIN_ENTRY_NAME}\"`\n\t\t\t\t);\n\n\t\t\t\tconst isEntryWorker =\n\t\t\t\t\tthis.environment.name ===\n\t\t\t\t\tctx.resolvedPluginConfig.entryWorkerEnvironmentName;\n\n\t\t\t\toutputConfig = {\n\t\t\t\t\t...inputConfig,\n\t\t\t\t\tmain: entryChunk.fileName,\n\t\t\t\t\tno_bundle: true,\n\t\t\t\t\trules: [{ type: \"ESModule\", globs: [\"**/*.js\", \"**/*.mjs\"] }],\n\t\t\t\t\tassets: isEntryWorker\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t...inputConfig.assets,\n\t\t\t\t\t\t\t\tdirectory: getAssetsDirectory(\n\t\t\t\t\t\t\t\t\tthis.environment.config.build.outDir,\n\t\t\t\t\t\t\t\t\tctx.resolvedViteConfig\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: undefined,\n\t\t\t\t};\n\n\t\t\t\tif (inputConfig.configPath) {\n\t\t\t\t\tconst localDevVars = getLocalDevVarsForPreview(\n\t\t\t\t\t\tinputConfig.configPath,\n\t\t\t\t\t\tctx.resolvedPluginConfig.cloudflareEnv\n\t\t\t\t\t);\n\t\t\t\t\t// Save a .dev.vars file to the worker's build output directory if there are local dev vars, so that it will be then detected by `vite preview`.\n\t\t\t\t\tif (localDevVars) {\n\t\t\t\t\t\tthis.emitFile({\n\t\t\t\t\t\t\ttype: \"asset\",\n\t\t\t\t\t\t\tfileName: \".dev.vars\",\n\t\t\t\t\t\t\tsource: localDevVars,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (this.environment.name === \"client\") {\n\t\t\t\tconst inputConfig = ctx.resolvedPluginConfig.config;\n\n\t\t\t\toutputConfig = {\n\t\t\t\t\t...inputConfig,\n\t\t\t\t\tassets: {\n\t\t\t\t\t\t...inputConfig.assets,\n\t\t\t\t\t\tdirectory: \".\",\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tconst filesToAssetsIgnore = [\"wrangler.json\", \".dev.vars\"];\n\n\t\t\t\tthis.emitFile({\n\t\t\t\t\ttype: \"asset\",\n\t\t\t\t\tfileName: \".assetsignore\",\n\t\t\t\t\tsource: `${filesToAssetsIgnore.join(\"\\n\")}\\n`,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!outputConfig) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set to `undefined` if it's an empty object so that the user doesn't see a warning about using `unsafe` fields when deploying their Worker.\n\t\t\tif (\n\t\t\t\toutputConfig.unsafe &&\n\t\t\t\tObject.keys(outputConfig.unsafe).length === 0\n\t\t\t) {\n\t\t\t\toutputConfig.unsafe = undefined;\n\t\t\t}\n\n\t\t\tthis.emitFile({\n\t\t\t\ttype: \"asset\",\n\t\t\t\tfileName: \"wrangler.json\",\n\t\t\t\tsource: JSON.stringify(outputConfig),\n\t\t\t});\n\t\t},\n\t\twriteBundle() {\n\t\t\tassertIsNotPreview(ctx);\n\n\t\t\t// These conditions ensure the deploy config is emitted once per application build as `writeBundle` is called for each environment.\n\t\t\t// If Vite introduces an additional hook that runs after the application has built then we could use that instead.\n\t\t\tif (\n\t\t\t\tthis.environment.name ===\n\t\t\t\t(ctx.resolvedPluginConfig.type === \"workers\"\n\t\t\t\t\t? ctx.resolvedPluginConfig.entryWorkerEnvironmentName\n\t\t\t\t\t: \"client\")\n\t\t\t) {\n\t\t\t\twriteDeployConfig(ctx.resolvedPluginConfig, ctx.resolvedViteConfig);\n\t\t\t}\n\t\t},\n\t};\n});\n\nfunction getAssetsDirectory(\n\tworkerOutputDirectory: string,\n\tresolvedViteConfig: vite.ResolvedConfig\n): string {\n\tconst clientOutputDirectory =\n\t\tresolvedViteConfig.environments.client?.build.outDir;\n\n\tassert(\n\t\tclientOutputDirectory,\n\t\t\"Unexpected error: client output directory is undefined\"\n\t);\n\n\treturn path.relative(\n\t\tpath.resolve(resolvedViteConfig.root, workerOutputDirectory),\n\t\tpath.resolve(resolvedViteConfig.root, clientOutputDirectory)\n\t);\n}\n","import { prepareContainerImagesForDev } from \"@cloudflare/containers-shared\";\nimport { cleanupContainers } from \"@cloudflare/containers-shared/src/utils\";\nimport colors from \"picocolors\";\nimport { getDockerPath } from \"../containers\";\nimport { assertIsPreview } from \"../context\";\nimport { getPreviewMiniflareOptions } from \"../miniflare-options\";\nimport { createPlugin, createRequestHandler } from \"../utils\";\nimport { handleWebSocket } from \"../websockets\";\n\nlet exitCallback = () => {};\n\nprocess.on(\"exit\", () => {\n\texitCallback();\n});\n\n/**\n * Plugin to provide core preview functionality\n */\nexport const previewPlugin = createPlugin(\"preview\", (ctx) => {\n\treturn {\n\t\tasync configurePreviewServer(vitePreviewServer) {\n\t\t\tassertIsPreview(ctx);\n\n\t\t\tconst { miniflareOptions, containerTagToOptionsMap } =\n\t\t\t\tawait getPreviewMiniflareOptions(ctx, vitePreviewServer);\n\n\t\t\tawait ctx.startOrUpdateMiniflare(miniflareOptions);\n\n\t\t\tif (containerTagToOptionsMap.size) {\n\t\t\t\tconst dockerPath = getDockerPath();\n\n\t\t\t\tvitePreviewServer.config.logger.info(\n\t\t\t\t\tcolors.dim(\n\t\t\t\t\t\tcolors.yellow(\"∷ Building container images for local preview...\\n\")\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tawait prepareContainerImagesForDev({\n\t\t\t\t\tdockerPath: getDockerPath(),\n\t\t\t\t\tcontainerOptions: [...containerTagToOptionsMap.values()],\n\t\t\t\t\tonContainerImagePreparationStart: () => {},\n\t\t\t\t\tonContainerImagePreparationEnd: () => {},\n\t\t\t\t});\n\n\t\t\t\tconst containerImageTags = new Set(containerTagToOptionsMap.keys());\n\t\t\t\tvitePreviewServer.config.logger.info(\n\t\t\t\t\tcolors.dim(colors.yellow(\"\\n⚡️ Containers successfully built.\\n\"))\n\t\t\t\t);\n\n\t\t\t\texitCallback = () => {\n\t\t\t\t\tif (containerImageTags.size) {\n\t\t\t\t\t\tcleanupContainers(dockerPath, containerImageTags);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\thandleWebSocket(vitePreviewServer.httpServer, ctx.miniflare);\n\n\t\t\t// In preview mode we put our middleware at the front of the chain so that all assets are handled in Miniflare\n\t\t\tvitePreviewServer.middlewares.use(\n\t\t\t\tcreateRequestHandler((request) => {\n\t\t\t\t\treturn ctx.miniflare.dispatchFetch(request, { redirect: \"manual\" });\n\t\t\t\t})\n\t\t\t);\n\t\t},\n\t};\n});\n","import { CoreHeaders } from \"miniflare\";\nimport { createPlugin, createRequestHandler } from \"../utils\";\n\n/**\n * Plugin to forward `/cdn-cgi/handler/*` routes to trigger handlers in development\n */\nexport const triggerHandlersPlugin = createPlugin(\"trigger-handlers\", (ctx) => {\n\treturn {\n\t\tenforce: \"pre\",\n\t\tasync configureServer(viteDevServer) {\n\t\t\tconst entryWorkerConfig = ctx.entryWorkerConfig;\n\n\t\t\tif (!entryWorkerConfig) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst entryWorkerName = entryWorkerConfig.name;\n\t\t\tconst requestHandler = createRequestHandler((request) => {\n\t\t\t\trequest.headers.set(CoreHeaders.ROUTE_OVERRIDE, entryWorkerName);\n\t\t\t\treturn ctx.miniflare.dispatchFetch(request, {\n\t\t\t\t\tredirect: \"manual\",\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tviteDevServer.middlewares.use(\"/cdn-cgi/handler/\", requestHandler);\n\t\t},\n\t};\n});\n","import { cleanUrl, createPlugin } from \"../utils\";\n\n/**\n * Plugin to support the `.wasm?init` extension\n */\nexport const wasmHelperPlugin = createPlugin(\"wasm-helper\", (ctx) => {\n\treturn {\n\t\tenforce: \"pre\",\n\t\tapplyToEnvironment(environment) {\n\t\t\treturn ctx.getWorkerConfig(environment.name) !== undefined;\n\t\t},\n\t\tload(id) {\n\t\t\tif (!id.endsWith(\".wasm?init\")) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn `\n\t\t\t\t\timport wasm from \"${cleanUrl(id)}\";\n\t\t\t\t\texport default function(opts = {}) {\n\t\t\t\t\t\treturn WebAssembly.instantiate(wasm, opts);\n\t\t\t\t\t}\n\t\t\t\t`;\n\t\t},\n\t};\n});\n","import * as vite from \"vite\";\nimport { PluginContext } from \"./context\";\nimport { resolvePluginConfig } from \"./plugin-config\";\nimport { additionalModulesPlugin } from \"./plugins/additional-modules\";\nimport { configPlugin } from \"./plugins/config\";\nimport { debugPlugin } from \"./plugins/debug\";\nimport { devPlugin } from \"./plugins/dev\";\nimport {\n\tnodeJsAlsPlugin,\n\tnodeJsCompatPlugin,\n\tnodeJsCompatWarningsPlugin,\n} from \"./plugins/nodejs-compat\";\nimport { outputConfigPlugin } from \"./plugins/output-config\";\nimport { previewPlugin } from \"./plugins/preview\";\nimport { triggerHandlersPlugin } from \"./plugins/trigger-handlers\";\nimport {\n\tvirtualClientFallbackPlugin,\n\tvirtualModulesPlugin,\n} from \"./plugins/virtual-modules\";\nimport { wasmHelperPlugin } from \"./plugins/wasm\";\nimport { debuglog } from \"./utils\";\nimport type { SharedContext } from \"./context\";\nimport type { PluginConfig } from \"./plugin-config\";\n\nexport type { PluginConfig } from \"./plugin-config\";\n\nconst sharedContext: SharedContext = {\n\thasShownWorkerConfigWarnings: false,\n\tisRestartingDevServer: false,\n};\n\n/**\n * Vite plugin that enables a full-featured integration between Vite and the Cloudflare Workers runtime.\n *\n * See the [README](https://github.com/cloudflare/workers-sdk/tree/main/packages/vite-plugin-cloudflare#readme) for more details.\n *\n * @param pluginConfig An optional {@link PluginConfig} object.\n */\nexport function cloudflare(pluginConfig: PluginConfig = {}): vite.Plugin[] {\n\tconst ctx = new PluginContext(sharedContext);\n\n\treturn [\n\t\t{\n\t\t\tname: \"vite-plugin-cloudflare\",\n\t\t\tsharedDuringBuild: true,\n\t\t\tconfig(userConfig, env) {\n\t\t\t\tctx.setResolvedPluginConfig(\n\t\t\t\t\tresolvePluginConfig(pluginConfig, userConfig, env)\n\t\t\t\t);\n\t\t\t},\n\t\t\tasync configureServer(viteDevServer) {\n\t\t\t\t// Patch the `server.restart` method to track whether the server is restarting or not.\n\t\t\t\tconst restartServer = viteDevServer.restart.bind(viteDevServer);\n\t\t\t\tviteDevServer.restart = async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tctx.setIsRestartingDevServer(true);\n\t\t\t\t\t\tdebuglog(\"From server.restart(): Restarting server...\");\n\t\t\t\t\t\tawait restartServer();\n\t\t\t\t\t\tdebuglog(\"From server.restart(): Restarted server...\");\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tctx.setIsRestartingDevServer(false);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t},\n\t\tconfigPlugin(ctx),\n\t\tdevPlugin(ctx),\n\t\tpreviewPlugin(ctx),\n\t\tdebugPlugin(ctx),\n\t\ttriggerHandlersPlugin(ctx),\n\t\tvirtualModulesPlugin(ctx),\n\t\tvirtualClientFallbackPlugin(ctx),\n\t\toutputConfigPlugin(ctx),\n\t\twasmHelperPlugin(ctx),\n\t\tadditionalModulesPlugin(ctx),\n\t\tnodeJsAlsPlugin(ctx),\n\t\tnodeJsCompatPlugin(ctx),\n\t\tnodeJsCompatWarningsPlugin(ctx),\n\t];\n}\n"],"x_google_ignoreList":[6,7,8,9,13,14,21,22,23,24,25,27],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAa,WAAWA,OAAK,SAAS,0BAA0B;;;;;AAMhE,SAAgB,aACf,MACA,eACsC;AACtC,SAAQ,QAAQ;AACf,SAAO;GACN,MAAM,0BAA0B;GAChC,mBAAmB;GACnB,GAAG,cAAc,IAAI;GACrB;;;AAIH,SAAgB,mBACf,YACA,iBACC;CACD,MAAM,sBAAsB,WAAW,OAAO,UAAU;AAExD,QACC,WAAW,eAAe,kBAAkB,OAAO,UACnDC,OAAK,KAAK,qBAAqB,gBA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